@mcp-use/inspector 0.5.3-canary.5 → 0.5.3-canary.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{chunk-VL2OQCWN-CPjLZdCN.js → chunk-VL2OQCWN-Dt6nIRbO.js} +1 -1
- package/dist/client/assets/{embeddings-DZyiJZhR.js → embeddings-Cb1HC3IA.js} +1 -1
- package/dist/client/assets/{index-BH31Ht-B.js → index-B8UScrpw.js} +1 -1
- package/dist/client/assets/{index-DXiA7HPi.js → index-BYtBsAG_.js} +1 -1
- package/dist/client/assets/{index-BjPwEjLC.js → index-CCjf56iV.js} +1 -1
- package/dist/client/assets/index-DPoppY7E.css +1 -0
- package/dist/client/assets/{index-CIUfLMnd.js → index-DdIIPMyF.js} +1 -1
- package/dist/client/assets/{index-DwI7CLt3.js → index-DrA_ypHv.js} +1 -1
- package/dist/client/assets/{index-C8px8iT7.js → index-TMj4H01Y.js} +5 -5
- package/dist/client/assets/{index-C5Gu6oge.js → index-lHakAqzZ.js} +1 -1
- package/dist/client/assets/{langfuse-C4HKZ3NL-DQkY3G-y.js → langfuse-C4HKZ3NL-W8CMIBGE.js} +3 -3
- package/dist/client/assets/{winston-C-t08lfg.js → winston-Bm6DJeE8.js} +1 -1
- package/dist/client/index.html +3 -3
- package/package.json +2 -2
- package/dist/client/assets/index-B5L7QL4X.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/winston-
|
|
2
|
-
var b6=Object.defineProperty;var y6=(t,e,r)=>e in t?b6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var cp=(t,e,r)=>y6(t,typeof e!="symbol"?e+"":e,r);function E6(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in t)){const s=Object.getOwnPropertyDescriptor(n,a);s&&Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function r(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(a){if(a.ep)return;a.ep=!0;const s=r(a);fetch(a.href,s)}})();function fc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pEe(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){var a=!1;try{a=this instanceof n}catch{}return a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return t[n]}})}),r}var jv={exports:{}},gu={};var zk;function S6(){if(zk)return gu;zk=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,a,s){var l=null;if(s!==void 0&&(l=""+s),a.key!==void 0&&(l=""+a.key),"key"in a){s={};for(var c in a)c!=="key"&&(s[c]=a[c])}else s=a;return a=s.ref,{$$typeof:t,type:n,key:l,ref:a!==void 0?a:null,props:s}}return gu.Fragment=e,gu.jsx=r,gu.jsxs=r,gu}var $k;function x6(){return $k||($k=1,jv.exports=S6()),jv.exports}var g=x6();const w6="modulepreload",_6=function(t){return"/inspector/"+t},Bk={},cs=function(e,r,n){let a=Promise.resolve();if(r&&r.length>0){let d=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");a=d(r.map(f=>{if(f=_6(f),f in Bk)return;Bk[f]=!0;const m=f.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${h}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":w6,m||(v.as="script"),v.crossOrigin="",v.href=f,c&&v.setAttribute("nonce",c),document.head.appendChild(v),m)return new Promise((y,w)=>{v.addEventListener("load",y),v.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return a.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return e().catch(s)})};var T6=Object.defineProperty,Ze=(t,e)=>T6(t,"name",{value:e,configurable:!0}),qk=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),vl={};async function n2(){if(typeof process<"u")try{const t=await cs(()=>import("./__vite-browser-external-DFygW7-s.js").then(r=>r.o),[]),e=await cs(()=>import("./path-C9FudP8b.js").then(r=>r.p),[]);return{fs:t.default,path:e.default}}catch{return{fs:null,path:null}}return{fs:null,path:null}}Ze(n2,"getNodeModules");var Pn=null;function a2(){if(typeof qk<"u")try{Pn=qk("winston")}catch{}}Ze(a2,"loadWinstonSync");async function o2(){return Pn||(Pn=await cs(()=>import("./winston-C-t08lfg.js").then(t=>t.w),__vite__mapDeps([0,1,2,3]))),Pn}Ze(o2,"getWinston");var g_="mcp-use";function Jp(){try{return typeof navigator<"u"&&navigator.userAgent?.includes("Cloudflare-Workers")||typeof globalThis.EdgeRuntime<"u"||typeof globalThis.Deno<"u"?!1:typeof process<"u"&&!0&&typeof __dirname<"u"}catch{return!1}}Ze(Jp,"isNodeJSEnvironment");var Hl,R6=(Hl=class{_level;name;constructor(e=g_,r="info"){this.name=e,this._level=r}shouldLog(e){const r=["error","warn","info","http","verbose","debug","silly"],n=r.indexOf(this._level);return r.indexOf(e)<=n}formatMessage(e,r){return`${new Date().toLocaleTimeString("en-US",{hour12:!1})} [${this.name}] ${e}: ${r}`}error(e){this.shouldLog("error")&&console.error(this.formatMessage("error",e))}warn(e){this.shouldLog("warn")&&console.warn(this.formatMessage("warn",e))}info(e){this.shouldLog("info")&&console.info(this.formatMessage("info",e))}debug(e){this.shouldLog("debug")&&console.debug(this.formatMessage("debug",e))}http(e){this.shouldLog("http")&&console.log(this.formatMessage("http",e))}verbose(e){this.shouldLog("verbose")&&console.log(this.formatMessage("verbose",e))}silly(e){this.shouldLog("silly")&&console.log(this.formatMessage("silly",e))}get level(){return this._level}set level(e){this._level=e}},Ze(Hl,"SimpleConsoleLogger"),Hl);function kp(t){switch((typeof process<"u"&&vl?t:void 0)?.trim()){case"2":return"debug";case"1":return"info";default:return"info"}}Ze(kp,"resolveLevel");var wo,i2=(wo=class{static get(e=g_){if(!Jp()){if(!this.simpleInstances[e]){const r=typeof process<"u"&&vl?.DEBUG||void 0;this.simpleInstances[e]=new R6(e,kp(r))}return this.simpleInstances[e]}if(!this.instances[e]){if(!Pn)throw new Error("Winston not loaded - call Logger.configure() first");const{createLogger:r,format:n}=Pn,{combine:a,timestamp:s,label:l,colorize:c,splat:d}=n;this.instances[e]=r({level:kp(vl.DEBUG),format:a(c(),d(),l({label:e}),s({format:"HH:mm:ss"}),this.getFormatter()),transports:[]})}return this.instances[e]}static getFormatter(){if(!Pn)throw new Error("Winston not loaded");const{format:e}=Pn,{printf:r}=e,n=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l}: ${c}`),a=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l.toUpperCase()}: ${c}`),s=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l.toUpperCase()}: ${c}`);switch(this.currentFormat){case"minimal":return n;case"detailed":return a;case"emoji":return s;default:return n}}static async configure(e={}){const{level:r,console:n=!0,file:a,format:s="minimal"}=e,l=typeof process<"u"&&vl?.DEBUG||void 0,c=r??kp(l);if(this.currentFormat=s,!Jp()){Object.values(this.simpleInstances).forEach(R=>{R.level=c});return}if(await o2(),!Pn)throw new Error("Failed to load winston");const d=this.get();d.level=c;const f=d;if(f.clear(),n&&f.add(new Pn.transports.Console),a){const{fs:R,path:x}=await n2();if(R&&x){const _=x.dirname(x.resolve(a));R.existsSync(_)||R.mkdirSync(_,{recursive:!0}),f.add(new Pn.transports.File({filename:a}))}}const{format:m}=Pn,{combine:h,timestamp:v,label:y,colorize:w,splat:S}=m;Object.values(this.instances).forEach(R=>{R&&"format"in R&&(R.level=c,R.format=h(w(),S(),y({label:g_}),v({format:"HH:mm:ss"}),this.getFormatter()))})}static setDebug(e){let r;e===2||e===!0?r="debug":r="info",Object.values(this.simpleInstances).forEach(n=>{n.level=r}),Object.values(this.instances).forEach(n=>{n&&(n.level=r)}),typeof process<"u"&&vl&&(vl.DEBUG=e?e===!0?"2":String(e):"0")}static setFormat(e){this.currentFormat=e,this.configure({format:e})}},Ze(wo,"Logger"),cp(wo,"instances",{}),cp(wo,"simpleInstances",{}),cp(wo,"currentFormat","minimal"),wo);Jp()&&(a2(),Pn&&i2.configure());var Le=i2.get(),At;(function(t){t.assertEqual=a=>{};function e(a){}t.assertIs=e;function r(a){throw new Error}t.assertNever=r,t.arrayToEnum=a=>{const s={};for(const l of a)s[l]=l;return s},t.getValidEnumValues=a=>{const s=t.objectKeys(a).filter(c=>typeof a[a[c]]!="number"),l={};for(const c of s)l[c]=a[c];return t.objectValues(l)},t.objectValues=a=>t.objectKeys(a).map(function(s){return a[s]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&s.push(l);return s},t.find=(a,s)=>{for(const l of a)if(s(l))return l},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,s=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(At||(At={}));var Hk;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Hk||(Hk={}));const qe=At.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vi=t=>{switch(typeof t){case"undefined":return qe.undefined;case"string":return qe.string;case"number":return Number.isNaN(t)?qe.nan:qe.number;case"boolean":return qe.boolean;case"function":return qe.function;case"bigint":return qe.bigint;case"symbol":return qe.symbol;case"object":return Array.isArray(t)?qe.array:t===null?qe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?qe.promise:typeof Map<"u"&&t instanceof Map?qe.map:typeof Set<"u"&&t instanceof Set?qe.set:typeof Date<"u"&&t instanceof Date?qe.date:qe.object;default:return qe.unknown}},ke=At.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class na extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(s){return s.message},n={_errors:[]},a=s=>{for(const l of s.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)n._errors.push(r(l));else{let c=n,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(r(l))):c[f]=c[f]||{_errors:[]},c=c[f],d++}}};return a(this),n}static assert(e){if(!(e instanceof na))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,At.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const a of this.issues)if(a.path.length>0){const s=a.path[0];r[s]=r[s]||[],r[s].push(e(a))}else n.push(e(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}na.create=t=>new na(t);const ed=(t,e)=>{let r;switch(t.code){case ke.invalid_type:t.received===qe.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case ke.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,At.jsonStringifyReplacer)}`;break;case ke.unrecognized_keys:r=`Unrecognized key(s) in object: ${At.joinValues(t.keys,", ")}`;break;case ke.invalid_union:r="Invalid input";break;case ke.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${At.joinValues(t.options)}`;break;case ke.invalid_enum_value:r=`Invalid enum value. Expected ${At.joinValues(t.options)}, received '${t.received}'`;break;case ke.invalid_arguments:r="Invalid function arguments";break;case ke.invalid_return_type:r="Invalid function return type";break;case ke.invalid_date:r="Invalid date";break;case ke.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:At.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case ke.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case ke.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case ke.custom:r="Invalid input";break;case ke.invalid_intersection_types:r="Intersection results could not be merged";break;case ke.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ke.not_finite:r="Number must be finite";break;default:r=e.defaultError,At.assertNever(t)}return{message:r}};let C6=ed;function v_(){return C6}const b_=t=>{const{data:e,path:r,errorMaps:n,issueData:a}=t,s=[...r,...a.path||[]],l={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let c="";const d=n.filter(f=>!!f).slice().reverse();for(const f of d)c=f(l,{data:e,defaultError:c}).message;return{...a,path:s,message:c}};function Ue(t,e){const r=v_(),n=b_({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===ed?void 0:ed].filter(a=>!!a)});t.common.issues.push(n)}class un{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const a of r){if(a.status==="aborted")return nt;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const a of r){const s=await a.key,l=await a.value;n.push({key:s,value:l})}return un.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const a of r){const{key:s,value:l}=a;if(s.status==="aborted"||l.status==="aborted")return nt;s.status==="dirty"&&e.dirty(),l.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(n[s.value]=l.value)}return{status:e.value,value:n}}}const nt=Object.freeze({status:"aborted"}),_u=t=>({status:"dirty",value:t}),_n=t=>({status:"valid",value:t}),Vk=t=>t.status==="aborted",Gk=t=>t.status==="dirty",tc=t=>t.status==="valid",em=t=>typeof Promise<"u"&&t instanceof Promise;var Xe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Xe||(Xe={}));class Ba{constructor(e,r,n,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Wk=(t,e)=>{if(tc(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new na(t.common.issues);return this._error=r,this._error}}};function ft(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:a}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(l,c)=>{const{message:d}=t;return l.code==="invalid_enum_value"?{message:d??c.defaultError}:typeof c.data>"u"?{message:d??n??c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:d??r??c.defaultError}},description:a}}class wt{get description(){return this._def.description}_getType(e){return vi(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:vi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new un,ctx:{common:e.parent.common,data:e.data,parsedType:vi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(em(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vi(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Wk(n,a)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vi(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:r});return tc(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>tc(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vi(e)},a=this._parse({data:e,path:n.path,parent:n}),s=await(em(a)?a:Promise.resolve(a));return Wk(n,s)}refine(e,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,s)=>{const l=e(a),c=()=>s.addIssue({code:ke.custom,...n(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(c(),!1)):l?!0:(c(),!1)})}refinement(e,r){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(e){return new ys({schema:this,typeName:st.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ro.create(this,this._def)}nullable(){return Es.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ua.create(this)}promise(){return ad.create(this,this._def)}or(e){return am.create([this,e],this._def)}and(e){return om.create(this,e,this._def)}transform(e){return new ys({...ft(this._def),schema:this,typeName:st.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new lm({...ft(this._def),innerType:this,defaultValue:r,typeName:st.ZodDefault})}brand(){return new u2({typeName:st.ZodBranded,type:this,...ft(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new cm({...ft(this._def),innerType:this,catchValue:r,typeName:st.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return YT.create(this,e)}readonly(){return um.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const A6=/^c[^\s-]{8,}$/i,N6=/^[0-9a-z]+$/,k6=/^[0-9A-HJKMNP-TV-Z]{26}$/i,I6=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,O6=/^[a-z0-9_-]{21}$/i,D6=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,L6=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,M6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,P6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Uv;const j6=/^(?:(?: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])$/,U6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,F6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,z6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,B6=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,s2="((\\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])))",q6=new RegExp(`^${s2}$`);function l2(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function H6(t){return new RegExp(`^${l2(t)}$`)}function V6(t){let e=`${s2}T${l2(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function G6(t,e){return!!((e==="v4"||!e)&&j6.test(t)||(e==="v6"||!e)&&F6.test(t))}function W6(t,e){if(!D6.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function Y6(t,e){return!!((e==="v4"||!e)&&U6.test(t)||(e==="v6"||!e)&&z6.test(t))}class To extends wt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==qe.string){const s=this._getOrReturnCtx(e);return Ue(s,{code:ke.invalid_type,expected:qe.string,received:s.parsedType}),nt}const n=new un;let a;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const l=e.data.length>s.value,c=e.data.length<s.value;(l||c)&&(a=this._getOrReturnCtx(e,a),l?Ue(a,{code:ke.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):c&&Ue(a,{code:ke.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")M6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"email",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Uv||(Uv=new RegExp(P6,"u")),Uv.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"emoji",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")I6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"uuid",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")O6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"nanoid",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")A6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"cuid",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")N6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"cuid2",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")k6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"ulid",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),Ue(a,{validation:"url",code:ke.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"regex",code:ke.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?V6(s).test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?q6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?H6(s).test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?L6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"duration",code:ke.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?G6(e.data,s.version)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"ip",code:ke.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?W6(e.data,s.alg)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"jwt",code:ke.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Y6(e.data,s.version)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"cidr",code:ke.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?$6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"base64",code:ke.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?B6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"base64url",code:ke.invalid_string,message:s.message}),n.dirty()):At.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(a=>e.test(a),{validation:r,code:ke.invalid_string,...Xe.errToObj(n)})}_addCheck(e){return new To({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Xe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Xe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Xe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Xe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Xe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Xe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Xe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Xe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Xe.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Xe.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Xe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Xe.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Xe.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Xe.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Xe.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Xe.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Xe.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...Xe.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Xe.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Xe.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Xe.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Xe.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Xe.errToObj(r)})}nonempty(e){return this.min(1,Xe.errToObj(e))}trim(){return new To({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new To({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new To({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}To.create=t=>new To({checks:[],typeName:st.ZodString,coerce:t?.coerce??!1,...ft(t)});function K6(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=r>n?r:n,s=Number.parseInt(t.toFixed(a).replace(".","")),l=Number.parseInt(e.toFixed(a).replace(".",""));return s%l/10**a}class rc extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==qe.number){const s=this._getOrReturnCtx(e);return Ue(s,{code:ke.invalid_type,expected:qe.number,received:s.parsedType}),nt}let n;const a=new un;for(const s of this._def.checks)s.kind==="int"?At.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?K6(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.not_finite,message:s.message}),a.dirty()):At.assertNever(s);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Xe.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Xe.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Xe.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Xe.toString(r))}setLimit(e,r,n,a){return new rc({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Xe.toString(a)}]})}_addCheck(e){return new rc({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Xe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Xe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Xe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Xe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Xe.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Xe.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Xe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Xe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Xe.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&At.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}rc.create=t=>new rc({checks:[],typeName:st.ZodNumber,coerce:t?.coerce||!1,...ft(t)});class td extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==qe.bigint)return this._getInvalidInput(e);let n;const a=new un;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):At.assertNever(s);return{status:a.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return Ue(r,{code:ke.invalid_type,expected:qe.bigint,received:r.parsedType}),nt}gte(e,r){return this.setLimit("min",e,!0,Xe.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Xe.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Xe.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Xe.toString(r))}setLimit(e,r,n,a){return new td({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Xe.toString(a)}]})}_addCheck(e){return new td({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Xe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Xe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Xe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Xe.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Xe.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}td.create=t=>new td({checks:[],typeName:st.ZodBigInt,coerce:t?.coerce??!1,...ft(t)});class y_ extends wt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==qe.boolean){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.boolean,received:n.parsedType}),nt}return _n(e.data)}}y_.create=t=>new y_({typeName:st.ZodBoolean,coerce:t?.coerce||!1,...ft(t)});class tm extends wt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==qe.date){const s=this._getOrReturnCtx(e);return Ue(s,{code:ke.invalid_type,expected:qe.date,received:s.parsedType}),nt}if(Number.isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return Ue(s,{code:ke.invalid_date}),nt}const n=new un;let a;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):At.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new tm({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Xe.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Xe.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}tm.create=t=>new tm({checks:[],coerce:t?.coerce||!1,typeName:st.ZodDate,...ft(t)});class Yk extends wt{_parse(e){if(this._getType(e)!==qe.symbol){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.symbol,received:n.parsedType}),nt}return _n(e.data)}}Yk.create=t=>new Yk({typeName:st.ZodSymbol,...ft(t)});class rm extends wt{_parse(e){if(this._getType(e)!==qe.undefined){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.undefined,received:n.parsedType}),nt}return _n(e.data)}}rm.create=t=>new rm({typeName:st.ZodUndefined,...ft(t)});class nm extends wt{_parse(e){if(this._getType(e)!==qe.null){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.null,received:n.parsedType}),nt}return _n(e.data)}}nm.create=t=>new nm({typeName:st.ZodNull,...ft(t)});class rd extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return _n(e.data)}}rd.create=t=>new rd({typeName:st.ZodAny,...ft(t)});class jl extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _n(e.data)}}jl.create=t=>new jl({typeName:st.ZodUnknown,...ft(t)});class wi extends wt{_parse(e){const r=this._getOrReturnCtx(e);return Ue(r,{code:ke.invalid_type,expected:qe.never,received:r.parsedType}),nt}}wi.create=t=>new wi({typeName:st.ZodNever,...ft(t)});class Kk extends wt{_parse(e){if(this._getType(e)!==qe.undefined){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.void,received:n.parsedType}),nt}return _n(e.data)}}Kk.create=t=>new Kk({typeName:st.ZodVoid,...ft(t)});class Ua extends wt{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),a=this._def;if(r.parsedType!==qe.array)return Ue(r,{code:ke.invalid_type,expected:qe.array,received:r.parsedType}),nt;if(a.exactLength!==null){const l=r.data.length>a.exactLength.value,c=r.data.length<a.exactLength.value;(l||c)&&(Ue(r,{code:l?ke.too_big:ke.too_small,minimum:c?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(Ue(r,{code:ke.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(Ue(r,{code:ke.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((l,c)=>a.type._parseAsync(new Ba(r,l,r.path,c)))).then(l=>un.mergeArray(n,l));const s=[...r.data].map((l,c)=>a.type._parseSync(new Ba(r,l,r.path,c)));return un.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Ua({...this._def,minLength:{value:e,message:Xe.toString(r)}})}max(e,r){return new Ua({...this._def,maxLength:{value:e,message:Xe.toString(r)}})}length(e,r){return new Ua({...this._def,exactLength:{value:e,message:Xe.toString(r)}})}nonempty(e){return this.min(1,e)}}Ua.create=(t,e)=>new Ua({type:t,minLength:null,maxLength:null,exactLength:null,typeName:st.ZodArray,...ft(e)});function bl(t){if(t instanceof Rr){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Ro.create(bl(n))}return new Rr({...t._def,shape:()=>e})}else return t instanceof Ua?new Ua({...t._def,type:bl(t.element)}):t instanceof Ro?Ro.create(bl(t.unwrap())):t instanceof Es?Es.create(bl(t.unwrap())):t instanceof Ao?Ao.create(t.items.map(e=>bl(e))):t}class Rr extends wt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=At.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==qe.object){const f=this._getOrReturnCtx(e);return Ue(f,{code:ke.invalid_type,expected:qe.object,received:f.parsedType}),nt}const{status:n,ctx:a}=this._processInputParams(e),{shape:s,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof wi&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||c.push(f);const d=[];for(const f of l){const m=s[f],h=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new Ba(a,h,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof wi){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of c)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")c.length>0&&(Ue(a,{code:ke.unrecognized_keys,keys:c}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of c){const h=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new Ba(a,h,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const h=await m.key,v=await m.value;f.push({key:h,value:v,alwaysSet:m.alwaysSet})}return f}).then(f=>un.mergeObjectSync(n,f)):un.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return Xe.errToObj,new Rr({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{const a=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Xe.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new Rr({...this._def,unknownKeys:"strip"})}passthrough(){return new Rr({...this._def,unknownKeys:"passthrough"})}extend(e){return new Rr({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Rr({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:st.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Rr({...this._def,catchall:e})}pick(e){const r={};for(const n of At.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Rr({...this._def,shape:()=>r})}omit(e){const r={};for(const n of At.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new Rr({...this._def,shape:()=>r})}deepPartial(){return bl(this)}partial(e){const r={};for(const n of At.objectKeys(this.shape)){const a=this.shape[n];e&&!e[n]?r[n]=a:r[n]=a.optional()}return new Rr({...this._def,shape:()=>r})}required(e){const r={};for(const n of At.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Ro;)s=s._def.innerType;r[n]=s}return new Rr({...this._def,shape:()=>r})}keyof(){return c2(At.objectKeys(this.shape))}}Rr.create=(t,e)=>new Rr({shape:()=>t,unknownKeys:"strip",catchall:wi.create(),typeName:st.ZodObject,...ft(e)});Rr.strictCreate=(t,e)=>new Rr({shape:()=>t,unknownKeys:"strict",catchall:wi.create(),typeName:st.ZodObject,...ft(e)});Rr.lazycreate=(t,e)=>new Rr({shape:t,unknownKeys:"strip",catchall:wi.create(),typeName:st.ZodObject,...ft(e)});class am extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function a(s){for(const c of s)if(c.result.status==="valid")return c.result;for(const c of s)if(c.result.status==="dirty")return r.common.issues.push(...c.ctx.common.issues),c.result;const l=s.map(c=>new na(c.ctx.common.issues));return Ue(r,{code:ke.invalid_union,unionErrors:l}),nt}if(r.common.async)return Promise.all(n.map(async s=>{const l={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:l}),ctx:l}})).then(a);{let s;const l=[];for(const d of n){const f={...r,common:{...r.common,issues:[]},parent:null},m=d._parseSync({data:r.data,path:r.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!s&&(s={result:m,ctx:f}),f.common.issues.length&&l.push(f.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const c=l.map(d=>new na(d));return Ue(r,{code:ke.invalid_union,unionErrors:c}),nt}}get options(){return this._def.options}}am.create=(t,e)=>new am({options:t,typeName:st.ZodUnion,...ft(e)});const Eo=t=>t instanceof S_?Eo(t.schema):t instanceof ys?Eo(t.innerType()):t instanceof sm?[t.value]:t instanceof bs?t.options:t instanceof x_?At.objectValues(t.enum):t instanceof lm?Eo(t._def.innerType):t instanceof rm?[void 0]:t instanceof nm?[null]:t instanceof Ro?[void 0,...Eo(t.unwrap())]:t instanceof Es?[null,...Eo(t.unwrap())]:t instanceof u2||t instanceof um?Eo(t.unwrap()):t instanceof cm?Eo(t._def.innerType):[];class WT extends wt{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==qe.object)return Ue(r,{code:ke.invalid_type,expected:qe.object,received:r.parsedType}),nt;const n=this.discriminator,a=r.data[n],s=this.optionsMap.get(a);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(Ue(r,{code:ke.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),nt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const a=new Map;for(const s of r){const l=Eo(s.shape[e]);if(!l.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of l){if(a.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);a.set(c,s)}}return new WT({typeName:st.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a,...ft(n)})}}function E_(t,e){const r=vi(t),n=vi(e);if(t===e)return{valid:!0,data:t};if(r===qe.object&&n===qe.object){const a=At.objectKeys(e),s=At.objectKeys(t).filter(c=>a.indexOf(c)!==-1),l={...t,...e};for(const c of s){const d=E_(t[c],e[c]);if(!d.valid)return{valid:!1};l[c]=d.data}return{valid:!0,data:l}}else if(r===qe.array&&n===qe.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let s=0;s<t.length;s++){const l=t[s],c=e[s],d=E_(l,c);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return r===qe.date&&n===qe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class om extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=(s,l)=>{if(Vk(s)||Vk(l))return nt;const c=E_(s.value,l.value);return c.valid?((Gk(s)||Gk(l))&&r.dirty(),{status:r.value,value:c.data}):(Ue(n,{code:ke.invalid_intersection_types}),nt)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,l])=>a(s,l)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}om.create=(t,e,r)=>new om({left:t,right:e,typeName:st.ZodIntersection,...ft(r)});class Ao extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==qe.array)return Ue(n,{code:ke.invalid_type,expected:qe.array,received:n.parsedType}),nt;if(n.data.length<this._def.items.length)return Ue(n,{code:ke.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),nt;!this._def.rest&&n.data.length>this._def.items.length&&(Ue(n,{code:ke.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((l,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new Ba(n,l,n.path,c)):null}).filter(l=>!!l);return n.common.async?Promise.all(s).then(l=>un.mergeArray(r,l)):un.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new Ao({...this._def,rest:e})}}Ao.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ao({items:t,typeName:st.ZodTuple,rest:null,...ft(e)})};class im extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==qe.object)return Ue(n,{code:ke.invalid_type,expected:qe.object,received:n.parsedType}),nt;const a=[],s=this._def.keyType,l=this._def.valueType;for(const c in n.data)a.push({key:s._parse(new Ba(n,c,n.path,c)),value:l._parse(new Ba(n,n.data[c],n.path,c)),alwaysSet:c in n.data});return n.common.async?un.mergeObjectAsync(r,a):un.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof wt?new im({keyType:e,valueType:r,typeName:st.ZodRecord,...ft(n)}):new im({keyType:To.create(),valueType:e,typeName:st.ZodRecord,...ft(r)})}}class Zk extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==qe.map)return Ue(n,{code:ke.invalid_type,expected:qe.map,received:n.parsedType}),nt;const a=this._def.keyType,s=this._def.valueType,l=[...n.data.entries()].map(([c,d],f)=>({key:a._parse(new Ba(n,c,n.path,[f,"key"])),value:s._parse(new Ba(n,d,n.path,[f,"value"]))}));if(n.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return nt;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),c.set(f.value,m.value)}return{status:r.value,value:c}})}else{const c=new Map;for(const d of l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return nt;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),c.set(f.value,m.value)}return{status:r.value,value:c}}}}Zk.create=(t,e,r)=>new Zk({valueType:e,keyType:t,typeName:st.ZodMap,...ft(r)});class nd extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==qe.set)return Ue(n,{code:ke.invalid_type,expected:qe.set,received:n.parsedType}),nt;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(Ue(n,{code:ke.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(Ue(n,{code:ke.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const s=this._def.valueType;function l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return nt;m.status==="dirty"&&r.dirty(),f.add(m.value)}return{status:r.value,value:f}}const c=[...n.data.values()].map((d,f)=>s._parse(new Ba(n,d,n.path,f)));return n.common.async?Promise.all(c).then(d=>l(d)):l(c)}min(e,r){return new nd({...this._def,minSize:{value:e,message:Xe.toString(r)}})}max(e,r){return new nd({...this._def,maxSize:{value:e,message:Xe.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}nd.create=(t,e)=>new nd({valueType:t,minSize:null,maxSize:null,typeName:st.ZodSet,...ft(e)});class ju extends wt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==qe.function)return Ue(r,{code:ke.invalid_type,expected:qe.function,received:r.parsedType}),nt;function n(c,d){return b_({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,v_(),ed].filter(f=>!!f),issueData:{code:ke.invalid_arguments,argumentsError:d}})}function a(c,d){return b_({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,v_(),ed].filter(f=>!!f),issueData:{code:ke.invalid_return_type,returnTypeError:d}})}const s={errorMap:r.common.contextualErrorMap},l=r.data;if(this._def.returns instanceof ad){const c=this;return _n(async function(...d){const f=new na([]),m=await c._def.args.parseAsync(d,s).catch(y=>{throw f.addIssue(n(d,y)),f}),h=await Reflect.apply(l,this,m);return await c._def.returns._def.type.parseAsync(h,s).catch(y=>{throw f.addIssue(a(h,y)),f})})}else{const c=this;return _n(function(...d){const f=c._def.args.safeParse(d,s);if(!f.success)throw new na([n(d,f.error)]);const m=Reflect.apply(l,this,f.data),h=c._def.returns.safeParse(m,s);if(!h.success)throw new na([a(m,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ju({...this._def,args:Ao.create(e).rest(jl.create())})}returns(e){return new ju({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new ju({args:e||Ao.create([]).rest(jl.create()),returns:r||jl.create(),typeName:st.ZodFunction,...ft(n)})}}class S_ extends wt{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}S_.create=(t,e)=>new S_({getter:t,typeName:st.ZodLazy,...ft(e)});class sm extends wt{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return Ue(r,{received:r.data,code:ke.invalid_literal,expected:this._def.value}),nt}return{status:"valid",value:e.data}}get value(){return this._def.value}}sm.create=(t,e)=>new sm({value:t,typeName:st.ZodLiteral,...ft(e)});function c2(t,e){return new bs({values:t,typeName:st.ZodEnum,...ft(e)})}class bs extends wt{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return Ue(r,{expected:At.joinValues(n),received:r.parsedType,code:ke.invalid_type}),nt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return Ue(r,{received:r.data,code:ke.invalid_enum_value,options:n}),nt}return _n(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return bs.create(e,{...this._def,...r})}exclude(e,r=this._def){return bs.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}bs.create=c2;class x_ extends wt{_parse(e){const r=At.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==qe.string&&n.parsedType!==qe.number){const a=At.objectValues(r);return Ue(n,{expected:At.joinValues(a),received:n.parsedType,code:ke.invalid_type}),nt}if(this._cache||(this._cache=new Set(At.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=At.objectValues(r);return Ue(n,{received:n.data,code:ke.invalid_enum_value,options:a}),nt}return _n(e.data)}get enum(){return this._def.values}}x_.create=(t,e)=>new x_({values:t,typeName:st.ZodNativeEnum,...ft(e)});class ad extends wt{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==qe.promise&&r.common.async===!1)return Ue(r,{code:ke.invalid_type,expected:qe.promise,received:r.parsedType}),nt;const n=r.parsedType===qe.promise?r.data:Promise.resolve(r.data);return _n(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ad.create=(t,e)=>new ad({type:t,typeName:st.ZodPromise,...ft(e)});class ys extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===st.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:l=>{Ue(n,l),l.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const l=a.transform(n.data,s);if(n.common.async)return Promise.resolve(l).then(async c=>{if(r.value==="aborted")return nt;const d=await this._def.schema._parseAsync({data:c,path:n.path,parent:n});return d.status==="aborted"?nt:d.status==="dirty"||r.value==="dirty"?_u(d.value):d});{if(r.value==="aborted")return nt;const c=this._def.schema._parseSync({data:l,path:n.path,parent:n});return c.status==="aborted"?nt:c.status==="dirty"||r.value==="dirty"?_u(c.value):c}}if(a.type==="refinement"){const l=c=>{const d=a.refinement(c,s);if(n.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(n.common.async===!1){const c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return c.status==="aborted"?nt:(c.status==="dirty"&&r.dirty(),l(c.value),{status:r.value,value:c.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>c.status==="aborted"?nt:(c.status==="dirty"&&r.dirty(),l(c.value).then(()=>({status:r.value,value:c.value}))))}if(a.type==="transform")if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!tc(l))return nt;const c=a.transform(l.value,s);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:c}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>tc(l)?Promise.resolve(a.transform(l.value,s)).then(c=>({status:r.value,value:c})):nt);At.assertNever(a)}}ys.create=(t,e,r)=>new ys({schema:t,typeName:st.ZodEffects,effect:e,...ft(r)});ys.createWithPreprocess=(t,e,r)=>new ys({schema:e,effect:{type:"preprocess",transform:t},typeName:st.ZodEffects,...ft(r)});class Ro extends wt{_parse(e){return this._getType(e)===qe.undefined?_n(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ro.create=(t,e)=>new Ro({innerType:t,typeName:st.ZodOptional,...ft(e)});class Es extends wt{_parse(e){return this._getType(e)===qe.null?_n(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Es.create=(t,e)=>new Es({innerType:t,typeName:st.ZodNullable,...ft(e)});class lm extends wt{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===qe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}lm.create=(t,e)=>new lm({innerType:t,typeName:st.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ft(e)});class cm extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return em(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new na(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new na(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}cm.create=(t,e)=>new cm({innerType:t,typeName:st.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ft(e)});class Xk extends wt{_parse(e){if(this._getType(e)!==qe.nan){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.nan,received:n.parsedType}),nt}return{status:"valid",value:e.data}}}Xk.create=t=>new Xk({typeName:st.ZodNaN,...ft(t)});class u2 extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class YT extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?nt:s.status==="dirty"?(r.dirty(),_u(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?nt:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,r){return new YT({in:e,out:r,typeName:st.ZodPipeline})}}class um extends wt{_parse(e){const r=this._def.innerType._parse(e),n=a=>(tc(a)&&(a.value=Object.freeze(a.value)),a);return em(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}um.create=(t,e)=>new um({innerType:t,typeName:st.ZodReadonly,...ft(e)});function Qk(t,e){const r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Z6(t,e={},r){return t?rd.create().superRefine((n,a)=>{const s=t(n);if(s instanceof Promise)return s.then(l=>{if(!l){const c=Qk(e,n),d=c.fatal??r??!0;a.addIssue({code:"custom",...c,fatal:d})}});if(!s){const l=Qk(e,n),c=l.fatal??r??!0;a.addIssue({code:"custom",...l,fatal:c})}}):rd.create()}var st;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(st||(st={}));const mEe=(t,e={message:`Input not instance of ${t.name}`})=>Z6(r=>r instanceof t,e),ve=To.create,$r=rc.create,Dr=y_.create,hEe=rm.create,gEe=nm.create,X6=rd.create,Td=jl.create;wi.create;const Ye=Ua.create,Pe=Rr.create,dn=am.create,Q6=WT.create;om.create;Ao.create;const Rd=im.create,vEe=ju.create,pt=sm.create,No=bs.create,bEe=ad.create,Ae=Ro.create;Es.create;const J6=nt,Pm="2025-06-18",e9=[Pm,"2025-03-26","2024-11-05","2024-10-07"],jm="2.0",d2=dn([ve(),$r().int()]),f2=ve(),t9=Pe({progressToken:Ae(d2)}).passthrough(),sa=Pe({_meta:Ae(t9)}).passthrough(),Tn=Pe({method:ve(),params:Ae(sa)}),Cd=Pe({_meta:Ae(Pe({}).passthrough())}).passthrough(),Ya=Pe({method:ve(),params:Ae(Cd)}),la=Pe({_meta:Ae(Pe({}).passthrough())}).passthrough(),Um=dn([ve(),$r().int()]),p2=Pe({jsonrpc:pt(jm),id:Um}).merge(Tn).strict(),m2=t=>p2.safeParse(t).success,h2=Pe({jsonrpc:pt(jm)}).merge(Ya).strict(),r9=t=>h2.safeParse(t).success,g2=Pe({jsonrpc:pt(jm),id:Um,result:la}).strict(),w_=t=>g2.safeParse(t).success;var Oa;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError"})(Oa||(Oa={}));const v2=Pe({jsonrpc:pt(jm),id:Um,error:Pe({code:$r().int(),message:ve(),data:Ae(Td())})}).strict(),n9=t=>v2.safeParse(t).success,Ip=dn([p2,h2,g2,v2]),Al=la.strict(),KT=Ya.extend({method:pt("notifications/cancelled"),params:Cd.extend({requestId:Um,reason:ve().optional()})}),a9=Pe({src:ve(),mimeType:Ae(ve()),sizes:Ae(Ye(ve()))}).passthrough(),Ad=Pe({icons:Ye(a9).optional()}).passthrough(),Nd=Pe({name:ve(),title:Ae(ve())}).passthrough(),b2=Nd.extend({version:ve(),websiteUrl:Ae(ve())}).merge(Ad),o9=Pe({experimental:Ae(Pe({}).passthrough()),sampling:Ae(Pe({}).passthrough()),elicitation:Ae(Pe({}).passthrough()),roots:Ae(Pe({listChanged:Ae(Dr())}).passthrough())}).passthrough(),i9=Tn.extend({method:pt("initialize"),params:sa.extend({protocolVersion:ve(),capabilities:o9,clientInfo:b2})}),s9=Pe({experimental:Ae(Pe({}).passthrough()),logging:Ae(Pe({}).passthrough()),completions:Ae(Pe({}).passthrough()),prompts:Ae(Pe({listChanged:Ae(Dr())}).passthrough()),resources:Ae(Pe({subscribe:Ae(Dr()),listChanged:Ae(Dr())}).passthrough()),tools:Ae(Pe({listChanged:Ae(Dr())}).passthrough())}).passthrough(),y2=la.extend({protocolVersion:ve(),capabilities:s9,serverInfo:b2,instructions:Ae(ve())}),E2=Ya.extend({method:pt("notifications/initialized")}),l9=t=>E2.safeParse(t).success,ZT=Tn.extend({method:pt("ping")}),c9=Pe({progress:$r(),total:Ae($r()),message:Ae(ve())}).passthrough(),XT=Ya.extend({method:pt("notifications/progress"),params:Cd.merge(c9).extend({progressToken:d2})}),Fm=Tn.extend({params:sa.extend({cursor:Ae(f2)}).optional()}),zm=la.extend({nextCursor:Ae(f2)}),S2=Pe({uri:ve(),mimeType:Ae(ve()),_meta:Ae(Pe({}).passthrough())}).passthrough(),x2=S2.extend({text:ve()}),QT=ve().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),w2=S2.extend({blob:QT}),_2=Nd.extend({uri:ve(),description:Ae(ve()),mimeType:Ae(ve()),_meta:Ae(Pe({}).passthrough())}).merge(Ad),u9=Nd.extend({uriTemplate:ve(),description:Ae(ve()),mimeType:Ae(ve()),_meta:Ae(Pe({}).passthrough())}).merge(Ad),d9=Fm.extend({method:pt("resources/list")}),T2=zm.extend({resources:Ye(_2)}),f9=Fm.extend({method:pt("resources/templates/list")}),R2=zm.extend({resourceTemplates:Ye(u9)}),p9=Tn.extend({method:pt("resources/read"),params:sa.extend({uri:ve()})}),C2=la.extend({contents:Ye(dn([x2,w2]))}),m9=Ya.extend({method:pt("notifications/resources/list_changed")}),h9=Tn.extend({method:pt("resources/subscribe"),params:sa.extend({uri:ve()})}),g9=Tn.extend({method:pt("resources/unsubscribe"),params:sa.extend({uri:ve()})}),v9=Ya.extend({method:pt("notifications/resources/updated"),params:Cd.extend({uri:ve()})}),b9=Pe({name:ve(),description:Ae(ve()),required:Ae(Dr())}).passthrough(),y9=Nd.extend({description:Ae(ve()),arguments:Ae(Ye(b9)),_meta:Ae(Pe({}).passthrough())}).merge(Ad),E9=Fm.extend({method:pt("prompts/list")}),A2=zm.extend({prompts:Ye(y9)}),S9=Tn.extend({method:pt("prompts/get"),params:sa.extend({name:ve(),arguments:Ae(Rd(ve()))})}),JT=Pe({type:pt("text"),text:ve(),_meta:Ae(Pe({}).passthrough())}).passthrough(),eR=Pe({type:pt("image"),data:QT,mimeType:ve(),_meta:Ae(Pe({}).passthrough())}).passthrough(),tR=Pe({type:pt("audio"),data:QT,mimeType:ve(),_meta:Ae(Pe({}).passthrough())}).passthrough(),x9=Pe({type:pt("resource"),resource:dn([x2,w2]),_meta:Ae(Pe({}).passthrough())}).passthrough(),w9=_2.extend({type:pt("resource_link")}),N2=dn([JT,eR,tR,w9,x9]),_9=Pe({role:No(["user","assistant"]),content:N2}).passthrough(),k2=la.extend({description:Ae(ve()),messages:Ye(_9)}),T9=Ya.extend({method:pt("notifications/prompts/list_changed")}),R9=Pe({title:Ae(ve()),readOnlyHint:Ae(Dr()),destructiveHint:Ae(Dr()),idempotentHint:Ae(Dr()),openWorldHint:Ae(Dr())}).passthrough(),C9=Nd.extend({description:Ae(ve()),inputSchema:Pe({type:pt("object"),properties:Ae(Pe({}).passthrough()),required:Ae(Ye(ve()))}).passthrough(),outputSchema:Ae(Pe({type:pt("object"),properties:Ae(Pe({}).passthrough()),required:Ae(Ye(ve()))}).passthrough()),annotations:Ae(R9),_meta:Ae(Pe({}).passthrough())}).merge(Ad),A9=Fm.extend({method:pt("tools/list")}),I2=zm.extend({tools:Ye(C9)}),rR=la.extend({content:Ye(N2).default([]),structuredContent:Pe({}).passthrough().optional(),isError:Ae(Dr())});rR.or(la.extend({toolResult:Td()}));const N9=Tn.extend({method:pt("tools/call"),params:sa.extend({name:ve(),arguments:Ae(Rd(Td()))})}),k9=Ya.extend({method:pt("notifications/tools/list_changed")}),O2=No(["debug","info","notice","warning","error","critical","alert","emergency"]),I9=Tn.extend({method:pt("logging/setLevel"),params:sa.extend({level:O2})}),O9=Ya.extend({method:pt("notifications/message"),params:Cd.extend({level:O2,logger:Ae(ve()),data:Td()})}),D9=Pe({name:ve().optional()}).passthrough(),L9=Pe({hints:Ae(Ye(D9)),costPriority:Ae($r().min(0).max(1)),speedPriority:Ae($r().min(0).max(1)),intelligencePriority:Ae($r().min(0).max(1))}).passthrough(),M9=Pe({role:No(["user","assistant"]),content:dn([JT,eR,tR])}).passthrough(),P9=Tn.extend({method:pt("sampling/createMessage"),params:sa.extend({messages:Ye(M9),systemPrompt:Ae(ve()),includeContext:Ae(No(["none","thisServer","allServers"])),temperature:Ae($r()),maxTokens:$r().int(),stopSequences:Ae(Ye(ve())),metadata:Ae(Pe({}).passthrough()),modelPreferences:Ae(L9)})}),j9=la.extend({model:ve(),stopReason:Ae(No(["endTurn","stopSequence","maxTokens"]).or(ve())),role:No(["user","assistant"]),content:Q6("type",[JT,eR,tR])}),U9=Pe({type:pt("boolean"),title:Ae(ve()),description:Ae(ve()),default:Ae(Dr())}).passthrough(),F9=Pe({type:pt("string"),title:Ae(ve()),description:Ae(ve()),minLength:Ae($r()),maxLength:Ae($r()),format:Ae(No(["email","uri","date","date-time"]))}).passthrough(),z9=Pe({type:No(["number","integer"]),title:Ae(ve()),description:Ae(ve()),minimum:Ae($r()),maximum:Ae($r())}).passthrough(),$9=Pe({type:pt("string"),title:Ae(ve()),description:Ae(ve()),enum:Ye(ve()),enumNames:Ae(Ye(ve()))}).passthrough(),B9=dn([U9,F9,z9,$9]),q9=Tn.extend({method:pt("elicitation/create"),params:sa.extend({message:ve(),requestedSchema:Pe({type:pt("object"),properties:Rd(ve(),B9),required:Ae(Ye(ve()))}).passthrough()})}),H9=la.extend({action:No(["accept","decline","cancel"]),content:Ae(Rd(ve(),Td()))}),V9=Pe({type:pt("ref/resource"),uri:ve()}).passthrough(),G9=Pe({type:pt("ref/prompt"),name:ve()}).passthrough(),W9=Tn.extend({method:pt("completion/complete"),params:sa.extend({ref:dn([G9,V9]),argument:Pe({name:ve(),value:ve()}).passthrough(),context:Ae(Pe({arguments:Ae(Rd(ve(),ve()))}))})}),D2=la.extend({completion:Pe({values:Ye(ve()).max(100),total:Ae($r().int()),hasMore:Ae(Dr())}).passthrough()}),Y9=Pe({uri:ve().startsWith("file://"),name:Ae(ve()),_meta:Ae(Pe({}).passthrough())}).passthrough(),K9=Tn.extend({method:pt("roots/list")}),Z9=la.extend({roots:Ye(Y9)}),X9=Ya.extend({method:pt("notifications/roots/list_changed")});dn([ZT,i9,W9,I9,S9,E9,d9,f9,p9,h9,g9,N9,A9]);dn([KT,XT,E2,X9]);dn([Al,j9,H9,Z9]);dn([ZT,P9,q9,K9]);dn([KT,XT,O9,v9,m9,k9,T9]);dn([Al,y2,D2,k2,A2,T2,R2,C2,rR,I2]);class Si extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}}const Q9=6e4;class J9{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this.setNotificationHandler(KT,r=>{const n=this._requestHandlerAbortControllers.get(r.params.requestId);n?.abort(r.params.reason)}),this.setNotificationHandler(XT,r=>{this._onprogress(r)}),this.setRequestHandler(ZT,r=>({}))}_setupTimeout(e,r,n,a,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(a,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:s,onTimeout:a})}_resetTimeout(e){const r=this._timeoutInfo.get(e);if(!r)return!1;const n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),new Si(Oa.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){const r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var r,n,a;this._transport=e;const s=(r=this.transport)===null||r===void 0?void 0:r.onclose;this._transport.onclose=()=>{s?.(),this._onclose()};const l=(n=this.transport)===null||n===void 0?void 0:n.onerror;this._transport.onerror=d=>{l?.(d),this._onerror(d)};const c=(a=this._transport)===null||a===void 0?void 0:a.onmessage;this._transport.onmessage=(d,f)=>{c?.(d,f),w_(d)||n9(d)?this._onresponse(d):m2(d)?this._onrequest(d,f):r9(d)?this._onnotification(d):this._onerror(new Error(`Unknown message type: ${JSON.stringify(d)}`))},await this._transport.start()}_onclose(){var e;const r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._transport=void 0,(e=this.onclose)===null||e===void 0||e.call(this);const n=new Si(Oa.ConnectionClosed,"Connection closed");for(const a of r.values())a(n)}_onerror(e){var r;(r=this.onerror)===null||r===void 0||r.call(this,e)}_onnotification(e){var r;const n=(r=this._notificationHandlers.get(e.method))!==null&&r!==void 0?r:this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(e)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,r){var n,a;const s=(n=this._requestHandlers.get(e.method))!==null&&n!==void 0?n:this.fallbackRequestHandler,l=this._transport;if(s===void 0){l?.send({jsonrpc:"2.0",id:e.id,error:{code:Oa.MethodNotFound,message:"Method not found"}}).catch(f=>this._onerror(new Error(`Failed to send an error response: ${f}`)));return}const c=new AbortController;this._requestHandlerAbortControllers.set(e.id,c);const d={signal:c.signal,sessionId:l?.sessionId,_meta:(a=e.params)===null||a===void 0?void 0:a._meta,sendNotification:f=>this.notification(f,{relatedRequestId:e.id}),sendRequest:(f,m,h)=>this.request(f,m,{...h,relatedRequestId:e.id}),authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo};Promise.resolve().then(()=>s(e,d)).then(f=>{if(!c.signal.aborted)return l?.send({result:f,jsonrpc:"2.0",id:e.id})},f=>{var m;if(!c.signal.aborted)return l?.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(f.code)?f.code:Oa.InternalError,message:(m=f.message)!==null&&m!==void 0?m:"Internal error"}})}).catch(f=>this._onerror(new Error(`Failed to send response: ${f}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:r,...n}=e.params,a=Number(r),s=this._progressHandlers.get(a);if(!s){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const l=this._responseHandlers.get(a),c=this._timeoutInfo.get(a);if(c&&l&&c.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(d){l(d);return}s(n)}_onresponse(e){const r=Number(e.id),n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),w_(e))n(e);else{const a=new Si(e.error.code,e.error.message,e.error.data);n(a)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)===null||e===void 0?void 0:e.close())}request(e,r,n){const{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}=n??{};return new Promise((c,d)=>{var f,m,h,v,y,w;if(!this._transport){d(new Error("Not connected"));return}((f=this._options)===null||f===void 0?void 0:f.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(e.method),(m=n?.signal)===null||m===void 0||m.throwIfAborted();const S=this._requestMessageId++,R={...e,jsonrpc:"2.0",id:S};n?.onprogress&&(this._progressHandlers.set(S,n.onprogress),R.params={...e.params,_meta:{...((h=e.params)===null||h===void 0?void 0:h._meta)||{},progressToken:S}});const x=N=>{var k;this._responseHandlers.delete(S),this._progressHandlers.delete(S),this._cleanupTimeout(S),(k=this._transport)===null||k===void 0||k.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:S,reason:String(N)}},{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}).catch(A=>this._onerror(new Error(`Failed to send cancellation: ${A}`))),d(N)};this._responseHandlers.set(S,N=>{var k;if(!(!((k=n?.signal)===null||k===void 0)&&k.aborted)){if(N instanceof Error)return d(N);try{const A=r.parse(N.result);c(A)}catch(A){d(A)}}}),(v=n?.signal)===null||v===void 0||v.addEventListener("abort",()=>{var N;x((N=n?.signal)===null||N===void 0?void 0:N.reason)});const _=(y=n?.timeout)!==null&&y!==void 0?y:Q9,C=()=>x(new Si(Oa.RequestTimeout,"Request timed out",{timeout:_}));this._setupTimeout(S,_,n?.maxTotalTimeout,C,(w=n?.resetTimeoutOnProgress)!==null&&w!==void 0?w:!1),this._transport.send(R,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}).catch(N=>{this._cleanupTimeout(S),d(N)})})}async notification(e,r){var n,a;if(!this._transport)throw new Error("Not connected");if(this.assertNotificationCapability(e.method),((a=(n=this._options)===null||n===void 0?void 0:n.debouncedNotificationMethods)!==null&&a!==void 0?a:[]).includes(e.method)&&!e.params&&!r?.relatedRequestId){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var d;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;const f={...e,jsonrpc:"2.0"};(d=this._transport)===null||d===void 0||d.send(f,r).catch(m=>this._onerror(m))});return}const c={...e,jsonrpc:"2.0"};await this._transport.send(c,r)}setRequestHandler(e,r){const n=e.shape.method.value;this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(a,s)=>Promise.resolve(r(e.parse(a),s)))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){this._notificationHandlers.set(e.shape.method.value,n=>Promise.resolve(r(e.parse(n))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}function e8(t,e){return Object.entries(e).reduce((r,[n,a])=>(a&&typeof a=="object"?r[n]=r[n]?{...r[n],...a}:a:r[n]=a,r),{...t})}var Tu={exports:{}};var t8=Tu.exports,Jk;function r8(){return Jk||(Jk=1,(function(t,e){(function(r,n){n(e)})(t8,(function(r){function n(){for(var oe=arguments.length,K=Array(oe),ie=0;ie<oe;ie++)K[ie]=arguments[ie];if(K.length>1){K[0]=K[0].slice(0,-1);for(var ye=K.length-1,ge=1;ge<ye;++ge)K[ge]=K[ge].slice(1,-1);return K[ye]=K[ye].slice(1),K.join("")}else return K[0]}function a(oe){return"(?:"+oe+")"}function s(oe){return oe===void 0?"undefined":oe===null?"null":Object.prototype.toString.call(oe).split(" ").pop().split("]").shift().toLowerCase()}function l(oe){return oe.toUpperCase()}function c(oe){return oe!=null?oe instanceof Array?oe:typeof oe.length!="number"||oe.split||oe.setInterval||oe.call?[oe]:Array.prototype.slice.call(oe):[]}function d(oe,K){var ie=oe;if(K)for(var ye in K)ie[ye]=K[ye];return ie}function f(oe){var K="[A-Za-z]",ie="[0-9]",ye=n(ie,"[A-Fa-f]"),ge=a(a("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+a("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+a("%"+ye+ye)),je="[\\:\\/\\?\\#\\[\\]\\@]",Be="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",mt=n(je,Be),Ut=oe?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",sr=oe?"[\\uE000-\\uF8FF]":"[]",yt=n(K,ie,"[\\-\\.\\_\\~]",Ut);a(K+n(K,ie,"[\\+\\-\\.]")+"*"),a(a(ge+"|"+n(yt,Be,"[\\:]"))+"*");var Ft=a(a("25[0-5]")+"|"+a("2[0-4]"+ie)+"|"+a("1"+ie+ie)+"|"+a("0?[1-9]"+ie)+"|0?0?"+ie),Wt=a(Ft+"\\."+Ft+"\\."+Ft+"\\."+Ft),ot=a(ye+"{1,4}"),Dt=a(a(ot+"\\:"+ot)+"|"+Wt),Yt=a(a(ot+"\\:")+"{6}"+Dt),Pt=a("\\:\\:"+a(ot+"\\:")+"{5}"+Dt),on=a(a(ot)+"?\\:\\:"+a(ot+"\\:")+"{4}"+Dt),zt=a(a(a(ot+"\\:")+"{0,1}"+ot)+"?\\:\\:"+a(ot+"\\:")+"{3}"+Dt),An=a(a(a(ot+"\\:")+"{0,2}"+ot)+"?\\:\\:"+a(ot+"\\:")+"{2}"+Dt),Qa=a(a(a(ot+"\\:")+"{0,3}"+ot)+"?\\:\\:"+ot+"\\:"+Dt),sn=a(a(a(ot+"\\:")+"{0,4}"+ot)+"?\\:\\:"+Dt),Ar=a(a(a(ot+"\\:")+"{0,5}"+ot)+"?\\:\\:"+ot),Bn=a(a(a(ot+"\\:")+"{0,6}"+ot)+"?\\:\\:"),Ta=a([Yt,Pt,on,zt,An,Qa,sn,Ar,Bn].join("|")),qn=a(a(yt+"|"+ge)+"+");a("[vV]"+ye+"+\\."+n(yt,Be,"[\\:]")+"+"),a(a(ge+"|"+n(yt,Be))+"*");var Mi=a(ge+"|"+n(yt,Be,"[\\:\\@]"));return a(a(ge+"|"+n(yt,Be,"[\\@]"))+"+"),a(a(Mi+"|"+n("[\\/\\?]",sr))+"*"),{NOT_SCHEME:new RegExp(n("[^]",K,ie,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",yt,Be),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",yt,Be),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",yt,Be),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",yt,Be),"g"),NOT_QUERY:new RegExp(n("[^\\%]",yt,Be,"[\\:\\@\\/\\?]",sr),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",yt,Be,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",yt,Be),"g"),UNRESERVED:new RegExp(yt,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",yt,mt),"g"),PCT_ENCODED:new RegExp(ge,"g"),IPV4ADDRESS:new RegExp("^("+Wt+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Ta+")"+a(a("\\%25|\\%(?!"+ye+"{2})")+"("+qn+")")+"?\\]?$")}}var m=f(!1),h=f(!0),v=(function(){function oe(K,ie){var ye=[],ge=!0,je=!1,Be=void 0;try{for(var mt=K[Symbol.iterator](),Ut;!(ge=(Ut=mt.next()).done)&&(ye.push(Ut.value),!(ie&&ye.length===ie));ge=!0);}catch(sr){je=!0,Be=sr}finally{try{!ge&&mt.return&&mt.return()}finally{if(je)throw Be}}return ye}return function(K,ie){if(Array.isArray(K))return K;if(Symbol.iterator in Object(K))return oe(K,ie);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),y=function(oe){if(Array.isArray(oe)){for(var K=0,ie=Array(oe.length);K<oe.length;K++)ie[K]=oe[K];return ie}else return Array.from(oe)},w=2147483647,S=36,R=1,x=26,_=38,C=700,N=72,k=128,A="-",I=/^xn--/,O=/[^\0-\x7E]/,L=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=S-R,Y=Math.floor,Q=String.fromCharCode;function J(oe){throw new RangeError(M[oe])}function ee(oe,K){for(var ie=[],ye=oe.length;ye--;)ie[ye]=K(oe[ye]);return ie}function U(oe,K){var ie=oe.split("@"),ye="";ie.length>1&&(ye=ie[0]+"@",oe=ie[1]),oe=oe.replace(L,".");var ge=oe.split("."),je=ee(ge,K).join(".");return ye+je}function G(oe){for(var K=[],ie=0,ye=oe.length;ie<ye;){var ge=oe.charCodeAt(ie++);if(ge>=55296&&ge<=56319&&ie<ye){var je=oe.charCodeAt(ie++);(je&64512)==56320?K.push(((ge&1023)<<10)+(je&1023)+65536):(K.push(ge),ie--)}else K.push(ge)}return K}var H=function(K){return String.fromCodePoint.apply(String,y(K))},X=function(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:S},ae=function(K,ie){return K+22+75*(K<26)-((ie!=0)<<5)},z=function(K,ie,ye){var ge=0;for(K=ye?Y(K/C):K>>1,K+=Y(K/ie);K>P*x>>1;ge+=S)K=Y(K/P);return Y(ge+(P+1)*K/(K+_))},q=function(K){var ie=[],ye=K.length,ge=0,je=k,Be=N,mt=K.lastIndexOf(A);mt<0&&(mt=0);for(var Ut=0;Ut<mt;++Ut)K.charCodeAt(Ut)>=128&&J("not-basic"),ie.push(K.charCodeAt(Ut));for(var sr=mt>0?mt+1:0;sr<ye;){for(var yt=ge,Ft=1,Wt=S;;Wt+=S){sr>=ye&&J("invalid-input");var ot=X(K.charCodeAt(sr++));(ot>=S||ot>Y((w-ge)/Ft))&&J("overflow"),ge+=ot*Ft;var Dt=Wt<=Be?R:Wt>=Be+x?x:Wt-Be;if(ot<Dt)break;var Yt=S-Dt;Ft>Y(w/Yt)&&J("overflow"),Ft*=Yt}var Pt=ie.length+1;Be=z(ge-yt,Pt,yt==0),Y(ge/Pt)>w-je&&J("overflow"),je+=Y(ge/Pt),ge%=Pt,ie.splice(ge++,0,je)}return String.fromCodePoint.apply(String,ie)},$=function(K){var ie=[];K=G(K);var ye=K.length,ge=k,je=0,Be=N,mt=!0,Ut=!1,sr=void 0;try{for(var yt=K[Symbol.iterator](),Ft;!(mt=(Ft=yt.next()).done);mt=!0){var Wt=Ft.value;Wt<128&&ie.push(Q(Wt))}}catch(zo){Ut=!0,sr=zo}finally{try{!mt&&yt.return&&yt.return()}finally{if(Ut)throw sr}}var ot=ie.length,Dt=ot;for(ot&&ie.push(A);Dt<ye;){var Yt=w,Pt=!0,on=!1,zt=void 0;try{for(var An=K[Symbol.iterator](),Qa;!(Pt=(Qa=An.next()).done);Pt=!0){var sn=Qa.value;sn>=ge&&sn<Yt&&(Yt=sn)}}catch(zo){on=!0,zt=zo}finally{try{!Pt&&An.return&&An.return()}finally{if(on)throw zt}}var Ar=Dt+1;Yt-ge>Y((w-je)/Ar)&&J("overflow"),je+=(Yt-ge)*Ar,ge=Yt;var Bn=!0,Ta=!1,qn=void 0;try{for(var Mi=K[Symbol.iterator](),Pi;!(Bn=(Pi=Mi.next()).done);Bn=!0){var ji=Pi.value;if(ji<ge&&++je>w&&J("overflow"),ji==ge){for(var mn=je,qr=S;;qr+=S){var Ui=qr<=Be?R:qr>=Be+x?x:qr-Be;if(mn<Ui)break;var Xd=mn-Ui,Os=S-Ui;ie.push(Q(ae(Ui+Xd%Os,0))),mn=Y(Xd/Os)}ie.push(Q(ae(mn,0))),Be=z(je,Ar,Dt==ot),je=0,++Dt}}}catch(zo){Ta=!0,qn=zo}finally{try{!Bn&&Mi.return&&Mi.return()}finally{if(Ta)throw qn}}++je,++ge}return ie.join("")},W=function(K){return U(K,function(ie){return I.test(ie)?q(ie.slice(4).toLowerCase()):ie})},te=function(K){return U(K,function(ie){return O.test(ie)?"xn--"+$(ie):ie})},F={version:"2.1.0",ucs2:{decode:G,encode:H},decode:q,encode:$,toASCII:te,toUnicode:W},j={};function Z(oe){var K=oe.charCodeAt(0),ie=void 0;return K<16?ie="%0"+K.toString(16).toUpperCase():K<128?ie="%"+K.toString(16).toUpperCase():K<2048?ie="%"+(K>>6|192).toString(16).toUpperCase()+"%"+(K&63|128).toString(16).toUpperCase():ie="%"+(K>>12|224).toString(16).toUpperCase()+"%"+(K>>6&63|128).toString(16).toUpperCase()+"%"+(K&63|128).toString(16).toUpperCase(),ie}function ne(oe){for(var K="",ie=0,ye=oe.length;ie<ye;){var ge=parseInt(oe.substr(ie+1,2),16);if(ge<128)K+=String.fromCharCode(ge),ie+=3;else if(ge>=194&&ge<224){if(ye-ie>=6){var je=parseInt(oe.substr(ie+4,2),16);K+=String.fromCharCode((ge&31)<<6|je&63)}else K+=oe.substr(ie,6);ie+=6}else if(ge>=224){if(ye-ie>=9){var Be=parseInt(oe.substr(ie+4,2),16),mt=parseInt(oe.substr(ie+7,2),16);K+=String.fromCharCode((ge&15)<<12|(Be&63)<<6|mt&63)}else K+=oe.substr(ie,9);ie+=9}else K+=oe.substr(ie,3),ie+=3}return K}function V(oe,K){function ie(ye){var ge=ne(ye);return ge.match(K.UNRESERVED)?ge:ye}return oe.scheme&&(oe.scheme=String(oe.scheme).replace(K.PCT_ENCODED,ie).toLowerCase().replace(K.NOT_SCHEME,"")),oe.userinfo!==void 0&&(oe.userinfo=String(oe.userinfo).replace(K.PCT_ENCODED,ie).replace(K.NOT_USERINFO,Z).replace(K.PCT_ENCODED,l)),oe.host!==void 0&&(oe.host=String(oe.host).replace(K.PCT_ENCODED,ie).toLowerCase().replace(K.NOT_HOST,Z).replace(K.PCT_ENCODED,l)),oe.path!==void 0&&(oe.path=String(oe.path).replace(K.PCT_ENCODED,ie).replace(oe.scheme?K.NOT_PATH:K.NOT_PATH_NOSCHEME,Z).replace(K.PCT_ENCODED,l)),oe.query!==void 0&&(oe.query=String(oe.query).replace(K.PCT_ENCODED,ie).replace(K.NOT_QUERY,Z).replace(K.PCT_ENCODED,l)),oe.fragment!==void 0&&(oe.fragment=String(oe.fragment).replace(K.PCT_ENCODED,ie).replace(K.NOT_FRAGMENT,Z).replace(K.PCT_ENCODED,l)),oe}function de(oe){return oe.replace(/^0*(.*)/,"$1")||"0"}function fe(oe,K){var ie=oe.match(K.IPV4ADDRESS)||[],ye=v(ie,2),ge=ye[1];return ge?ge.split(".").map(de).join("."):oe}function Re(oe,K){var ie=oe.match(K.IPV6ADDRESS)||[],ye=v(ie,3),ge=ye[1],je=ye[2];if(ge){for(var Be=ge.toLowerCase().split("::").reverse(),mt=v(Be,2),Ut=mt[0],sr=mt[1],yt=sr?sr.split(":").map(de):[],Ft=Ut.split(":").map(de),Wt=K.IPV4ADDRESS.test(Ft[Ft.length-1]),ot=Wt?7:8,Dt=Ft.length-ot,Yt=Array(ot),Pt=0;Pt<ot;++Pt)Yt[Pt]=yt[Pt]||Ft[Dt+Pt]||"";Wt&&(Yt[ot-1]=fe(Yt[ot-1],K));var on=Yt.reduce(function(Ar,Bn,Ta){if(!Bn||Bn==="0"){var qn=Ar[Ar.length-1];qn&&qn.index+qn.length===Ta?qn.length++:Ar.push({index:Ta,length:1})}return Ar},[]),zt=on.sort(function(Ar,Bn){return Bn.length-Ar.length})[0],An=void 0;if(zt&&zt.length>1){var Qa=Yt.slice(0,zt.index),sn=Yt.slice(zt.index+zt.length);An=Qa.join(":")+"::"+sn.join(":")}else An=Yt.join(":");return je&&(An+="%"+je),An}else return oe}var be=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,xe="".match(/(){0}/)[1]===void 0;function Ne(oe){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie={},ye=K.iri!==!1?h:m;K.reference==="suffix"&&(oe=(K.scheme?K.scheme+":":"")+"//"+oe);var ge=oe.match(be);if(ge){xe?(ie.scheme=ge[1],ie.userinfo=ge[3],ie.host=ge[4],ie.port=parseInt(ge[5],10),ie.path=ge[6]||"",ie.query=ge[7],ie.fragment=ge[8],isNaN(ie.port)&&(ie.port=ge[5])):(ie.scheme=ge[1]||void 0,ie.userinfo=oe.indexOf("@")!==-1?ge[3]:void 0,ie.host=oe.indexOf("//")!==-1?ge[4]:void 0,ie.port=parseInt(ge[5],10),ie.path=ge[6]||"",ie.query=oe.indexOf("?")!==-1?ge[7]:void 0,ie.fragment=oe.indexOf("#")!==-1?ge[8]:void 0,isNaN(ie.port)&&(ie.port=oe.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?ge[4]:void 0)),ie.host&&(ie.host=Re(fe(ie.host,ye),ye)),ie.scheme===void 0&&ie.userinfo===void 0&&ie.host===void 0&&ie.port===void 0&&!ie.path&&ie.query===void 0?ie.reference="same-document":ie.scheme===void 0?ie.reference="relative":ie.fragment===void 0?ie.reference="absolute":ie.reference="uri",K.reference&&K.reference!=="suffix"&&K.reference!==ie.reference&&(ie.error=ie.error||"URI is not a "+K.reference+" reference.");var je=j[(K.scheme||ie.scheme||"").toLowerCase()];if(!K.unicodeSupport&&(!je||!je.unicodeSupport)){if(ie.host&&(K.domainHost||je&&je.domainHost))try{ie.host=F.toASCII(ie.host.replace(ye.PCT_ENCODED,ne).toLowerCase())}catch(Be){ie.error=ie.error||"Host's domain name can not be converted to ASCII via punycode: "+Be}V(ie,m)}else V(ie,ye);je&&je.parse&&je.parse(ie,K)}else ie.error=ie.error||"URI can not be parsed.";return ie}function ze(oe,K){var ie=K.iri!==!1?h:m,ye=[];return oe.userinfo!==void 0&&(ye.push(oe.userinfo),ye.push("@")),oe.host!==void 0&&ye.push(Re(fe(String(oe.host),ie),ie).replace(ie.IPV6ADDRESS,function(ge,je,Be){return"["+je+(Be?"%25"+Be:"")+"]"})),(typeof oe.port=="number"||typeof oe.port=="string")&&(ye.push(":"),ye.push(String(oe.port))),ye.length?ye.join(""):void 0}var Me=/^\.\.?\//,$e=/^\/\.(\/|$)/,ct=/^\/\.\.(\/|$)/,ce=/^\/?(?:.|\n)*?(?=\/|$)/;function Ce(oe){for(var K=[];oe.length;)if(oe.match(Me))oe=oe.replace(Me,"");else if(oe.match($e))oe=oe.replace($e,"/");else if(oe.match(ct))oe=oe.replace(ct,"/"),K.pop();else if(oe==="."||oe==="..")oe="";else{var ie=oe.match(ce);if(ie){var ye=ie[0];oe=oe.slice(ye.length),K.push(ye)}else throw new Error("Unexpected dot segment condition")}return K.join("")}function Fe(oe){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=K.iri?h:m,ye=[],ge=j[(K.scheme||oe.scheme||"").toLowerCase()];if(ge&&ge.serialize&&ge.serialize(oe,K),oe.host&&!ie.IPV6ADDRESS.test(oe.host)){if(K.domainHost||ge&&ge.domainHost)try{oe.host=K.iri?F.toUnicode(oe.host):F.toASCII(oe.host.replace(ie.PCT_ENCODED,ne).toLowerCase())}catch(mt){oe.error=oe.error||"Host's domain name can not be converted to "+(K.iri?"Unicode":"ASCII")+" via punycode: "+mt}}V(oe,ie),K.reference!=="suffix"&&oe.scheme&&(ye.push(oe.scheme),ye.push(":"));var je=ze(oe,K);if(je!==void 0&&(K.reference!=="suffix"&&ye.push("//"),ye.push(je),oe.path&&oe.path.charAt(0)!=="/"&&ye.push("/")),oe.path!==void 0){var Be=oe.path;!K.absolutePath&&(!ge||!ge.absolutePath)&&(Be=Ce(Be)),je===void 0&&(Be=Be.replace(/^\/\//,"/%2F")),ye.push(Be)}return oe.query!==void 0&&(ye.push("?"),ye.push(oe.query)),oe.fragment!==void 0&&(ye.push("#"),ye.push(oe.fragment)),ye.join("")}function _e(oe,K){var ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ye=arguments[3],ge={};return ye||(oe=Ne(Fe(oe,ie),ie),K=Ne(Fe(K,ie),ie)),ie=ie||{},!ie.tolerant&&K.scheme?(ge.scheme=K.scheme,ge.userinfo=K.userinfo,ge.host=K.host,ge.port=K.port,ge.path=Ce(K.path||""),ge.query=K.query):(K.userinfo!==void 0||K.host!==void 0||K.port!==void 0?(ge.userinfo=K.userinfo,ge.host=K.host,ge.port=K.port,ge.path=Ce(K.path||""),ge.query=K.query):(K.path?(K.path.charAt(0)==="/"?ge.path=Ce(K.path):((oe.userinfo!==void 0||oe.host!==void 0||oe.port!==void 0)&&!oe.path?ge.path="/"+K.path:oe.path?ge.path=oe.path.slice(0,oe.path.lastIndexOf("/")+1)+K.path:ge.path=K.path,ge.path=Ce(ge.path)),ge.query=K.query):(ge.path=oe.path,K.query!==void 0?ge.query=K.query:ge.query=oe.query),ge.userinfo=oe.userinfo,ge.host=oe.host,ge.port=oe.port),ge.scheme=oe.scheme),ge.fragment=K.fragment,ge}function Ie(oe,K,ie){var ye=d({scheme:"null"},ie);return Fe(_e(Ne(oe,ye),Ne(K,ye),ye,!0),ye)}function Oe(oe,K){return typeof oe=="string"?oe=Fe(Ne(oe,K),K):s(oe)==="object"&&(oe=Ne(Fe(oe,K),K)),oe}function Je(oe,K,ie){return typeof oe=="string"?oe=Fe(Ne(oe,ie),ie):s(oe)==="object"&&(oe=Fe(oe,ie)),typeof K=="string"?K=Fe(Ne(K,ie),ie):s(K)==="object"&&(K=Fe(K,ie)),oe===K}function at(oe,K){return oe&&oe.toString().replace(!K||!K.iri?m.ESCAPE:h.ESCAPE,Z)}function Rt(oe,K){return oe&&oe.toString().replace(!K||!K.iri?m.PCT_ENCODED:h.PCT_ENCODED,ne)}var Ot={scheme:"http",domainHost:!0,parse:function(K,ie){return K.host||(K.error=K.error||"HTTP URIs must have a host."),K},serialize:function(K,ie){var ye=String(K.scheme).toLowerCase()==="https";return(K.port===(ye?443:80)||K.port==="")&&(K.port=void 0),K.path||(K.path="/"),K}},Cn={scheme:"https",domainHost:Ot.domainHost,parse:Ot.parse,serialize:Ot.serialize};function vr(oe){return typeof oe.secure=="boolean"?oe.secure:String(oe.scheme).toLowerCase()==="wss"}var or={scheme:"ws",domainHost:!0,parse:function(K,ie){var ye=K;return ye.secure=vr(ye),ye.resourceName=(ye.path||"/")+(ye.query?"?"+ye.query:""),ye.path=void 0,ye.query=void 0,ye},serialize:function(K,ie){if((K.port===(vr(K)?443:80)||K.port==="")&&(K.port=void 0),typeof K.secure=="boolean"&&(K.scheme=K.secure?"wss":"ws",K.secure=void 0),K.resourceName){var ye=K.resourceName.split("?"),ge=v(ye,2),je=ge[0],Be=ge[1];K.path=je&&je!=="/"?je:void 0,K.query=Be,K.resourceName=void 0}return K.fragment=void 0,K}},Mt={scheme:"wss",domainHost:or.domainHost,parse:or.parse,serialize:or.serialize},Zt={},fr="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Sr="[0-9A-Fa-f]",zn=a(a("%[EFef]"+Sr+"%"+Sr+Sr+"%"+Sr+Sr)+"|"+a("%[89A-Fa-f]"+Sr+"%"+Sr+Sr)+"|"+a("%"+Sr+Sr)),ir="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Gt="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",pn=n(Gt,'[\\"\\\\]'),ua="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",an=new RegExp(fr,"g"),Qe=new RegExp(zn,"g"),jt=new RegExp(n("[^]",ir,"[\\.]",'[\\"]',pn),"g"),Qt=new RegExp(n("[^]",fr,ua),"g"),Lr=Qt;function $n(oe){var K=ne(oe);return K.match(an)?K:oe}var Xt={scheme:"mailto",parse:function(K,ie){var ye=K,ge=ye.to=ye.path?ye.path.split(","):[];if(ye.path=void 0,ye.query){for(var je=!1,Be={},mt=ye.query.split("&"),Ut=0,sr=mt.length;Ut<sr;++Ut){var yt=mt[Ut].split("=");switch(yt[0]){case"to":for(var Ft=yt[1].split(","),Wt=0,ot=Ft.length;Wt<ot;++Wt)ge.push(Ft[Wt]);break;case"subject":ye.subject=Rt(yt[1],ie);break;case"body":ye.body=Rt(yt[1],ie);break;default:je=!0,Be[Rt(yt[0],ie)]=Rt(yt[1],ie);break}}je&&(ye.headers=Be)}ye.query=void 0;for(var Dt=0,Yt=ge.length;Dt<Yt;++Dt){var Pt=ge[Dt].split("@");if(Pt[0]=Rt(Pt[0]),ie.unicodeSupport)Pt[1]=Rt(Pt[1],ie).toLowerCase();else try{Pt[1]=F.toASCII(Rt(Pt[1],ie).toLowerCase())}catch(on){ye.error=ye.error||"Email address's domain name can not be converted to ASCII via punycode: "+on}ge[Dt]=Pt.join("@")}return ye},serialize:function(K,ie){var ye=K,ge=c(K.to);if(ge){for(var je=0,Be=ge.length;je<Be;++je){var mt=String(ge[je]),Ut=mt.lastIndexOf("@"),sr=mt.slice(0,Ut).replace(Qe,$n).replace(Qe,l).replace(jt,Z),yt=mt.slice(Ut+1);try{yt=ie.iri?F.toUnicode(yt):F.toASCII(Rt(yt,ie).toLowerCase())}catch(Dt){ye.error=ye.error||"Email address's domain name can not be converted to "+(ie.iri?"Unicode":"ASCII")+" via punycode: "+Dt}ge[je]=sr+"@"+yt}ye.path=ge.join(",")}var Ft=K.headers=K.headers||{};K.subject&&(Ft.subject=K.subject),K.body&&(Ft.body=K.body);var Wt=[];for(var ot in Ft)Ft[ot]!==Zt[ot]&&Wt.push(ot.replace(Qe,$n).replace(Qe,l).replace(Qt,Z)+"="+Ft[ot].replace(Qe,$n).replace(Qe,l).replace(Lr,Z));return Wt.length&&(ye.query=Wt.join("&")),ye}},Jr=/^([^\:]+)\:(.*)/,_a={scheme:"urn",parse:function(K,ie){var ye=K.path&&K.path.match(Jr),ge=K;if(ye){var je=ie.scheme||ge.scheme||"urn",Be=ye[1].toLowerCase(),mt=ye[2],Ut=je+":"+(ie.nid||Be),sr=j[Ut];ge.nid=Be,ge.nss=mt,ge.path=void 0,sr&&(ge=sr.parse(ge,ie))}else ge.error=ge.error||"URN can not be parsed.";return ge},serialize:function(K,ie){var ye=ie.scheme||K.scheme||"urn",ge=K.nid,je=ye+":"+(ie.nid||ge),Be=j[je];Be&&(K=Be.serialize(K,ie));var mt=K,Ut=K.nss;return mt.path=(ge||ie.nid)+":"+Ut,mt}},en=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Br={scheme:"urn:uuid",parse:function(K,ie){var ye=K;return ye.uuid=ye.nss,ye.nss=void 0,!ie.tolerant&&(!ye.uuid||!ye.uuid.match(en))&&(ye.error=ye.error||"UUID is not valid."),ye},serialize:function(K,ie){var ye=K;return ye.nss=(K.uuid||"").toLowerCase(),ye}};j[Ot.scheme]=Ot,j[Cn.scheme]=Cn,j[or.scheme]=or,j[Mt.scheme]=Mt,j[Xt.scheme]=Xt,j[_a.scheme]=_a,j[Br.scheme]=Br,r.SCHEMES=j,r.pctEncChar=Z,r.pctDecChars=ne,r.parse=Ne,r.removeDotSegments=Ce,r.serialize=Fe,r.resolveComponents=_e,r.resolve=Ie,r.normalize=Oe,r.equal=Je,r.escapeComponent=at,r.unescapeComponent=Rt,Object.defineProperty(r,"__esModule",{value:!0})}))})(Tu,Tu.exports)),Tu.exports}var Fv,eI;function nR(){return eI||(eI=1,Fv=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!t(e[a],r[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=n;a--!==0;){var l=s[a];if(!t(e[l],r[l]))return!1}return!0}return e!==e&&r!==r}),Fv}var zv,tI;function n8(){return tI||(tI=1,zv=function(e){for(var r=0,n=e.length,a=0,s;a<n;)r++,s=e.charCodeAt(a++),s>=55296&&s<=56319&&a<n&&(s=e.charCodeAt(a),(s&64512)==56320&&a++);return r}),zv}var $v,rI;function pc(){if(rI)return $v;rI=1,$v={copy:t,checkDataType:e,checkDataTypes:r,coerceToTypes:a,toHash:s,getProperty:d,escapeQuotes:f,equal:nR(),ucs2length:n8(),varOccurences:m,varReplace:h,schemaHasRules:v,schemaHasRulesExcept:y,schemaUnknownRules:w,toQuotedString:S,getPathExpr:R,getPath:x,getData:N,unescapeFragment:A,unescapeJsonPointer:L,escapeFragment:I,escapeJsonPointer:O};function t(M,P){P=P||{};for(var Y in M)P[Y]=M[Y];return P}function e(M,P,Y,Q){var J=Q?" !== ":" === ",ee=Q?" || ":" && ",U=Q?"!":"",G=Q?"":"!";switch(M){case"null":return P+J+"null";case"array":return U+"Array.isArray("+P+")";case"object":return"("+U+P+ee+"typeof "+P+J+'"object"'+ee+G+"Array.isArray("+P+"))";case"integer":return"(typeof "+P+J+'"number"'+ee+G+"("+P+" % 1)"+ee+P+J+P+(Y?ee+U+"isFinite("+P+")":"")+")";case"number":return"(typeof "+P+J+'"'+M+'"'+(Y?ee+U+"isFinite("+P+")":"")+")";default:return"typeof "+P+J+'"'+M+'"'}}function r(M,P,Y){switch(M.length){case 1:return e(M[0],P,Y,!0);default:var Q="",J=s(M);J.array&&J.object&&(Q=J.null?"(":"(!"+P+" || ",Q+="typeof "+P+' !== "object")',delete J.null,delete J.array,delete J.object),J.number&&delete J.integer;for(var ee in J)Q+=(Q?" && ":"")+e(ee,P,Y,!0);return Q}}var n=s(["string","number","integer","boolean","null"]);function a(M,P){if(Array.isArray(P)){for(var Y=[],Q=0;Q<P.length;Q++){var J=P[Q];(n[J]||M==="array"&&J==="array")&&(Y[Y.length]=J)}if(Y.length)return Y}else{if(n[P])return[P];if(M==="array"&&P==="array")return["array"]}}function s(M){for(var P={},Y=0;Y<M.length;Y++)P[M[Y]]=!0;return P}var l=/^[a-z$_][a-z$_0-9]*$/i,c=/'|\\/g;function d(M){return typeof M=="number"?"["+M+"]":l.test(M)?"."+M:"['"+f(M)+"']"}function f(M){return M.replace(c,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function m(M,P){P+="[^0-9]";var Y=M.match(new RegExp(P,"g"));return Y?Y.length:0}function h(M,P,Y){return P+="([^0-9])",Y=Y.replace(/\$/g,"$$$$"),M.replace(new RegExp(P,"g"),Y+"$1")}function v(M,P){if(typeof M=="boolean")return!M;for(var Y in M)if(P[Y])return!0}function y(M,P,Y){if(typeof M=="boolean")return!M&&Y!="not";for(var Q in M)if(Q!=Y&&P[Q])return!0}function w(M,P){if(typeof M!="boolean"){for(var Y in M)if(!P[Y])return Y}}function S(M){return"'"+f(M)+"'"}function R(M,P,Y,Q){var J=Y?"'/' + "+P+(Q?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):Q?"'[' + "+P+" + ']'":"'[\\'' + "+P+" + '\\']'";return k(M,J)}function x(M,P,Y){var Q=S(Y?"/"+O(P):d(P));return k(M,Q)}var _=/^\/(?:[^~]|~0|~1)*$/,C=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function N(M,P,Y){var Q,J,ee,U;if(M==="")return"rootData";if(M[0]=="/"){if(!_.test(M))throw new Error("Invalid JSON-pointer: "+M);J=M,ee="rootData"}else{if(U=M.match(C),!U)throw new Error("Invalid JSON-pointer: "+M);if(Q=+U[1],J=U[2],J=="#"){if(Q>=P)throw new Error("Cannot access property/index "+Q+" levels up, current level is "+P);return Y[P-Q]}if(Q>P)throw new Error("Cannot access data "+Q+" levels up, current level is "+P);if(ee="data"+(P-Q||""),!J)return ee}for(var G=ee,H=J.split("/"),X=0;X<H.length;X++){var ae=H[X];ae&&(ee+=d(L(ae)),G+=" && "+ee)}return G}function k(M,P){return M=='""'?P:(M+" + "+P).replace(/([^\\])' \+ '/g,"$1")}function A(M){return L(decodeURIComponent(M))}function I(M){return encodeURIComponent(O(M))}function O(M){return M.replace(/~/g,"~0").replace(/\//g,"~1")}function L(M){return M.replace(/~1/g,"/").replace(/~0/g,"~")}return $v}var Bv,nI;function L2(){if(nI)return Bv;nI=1;var t=pc();Bv=e;function e(r){t.copy(r,this)}return Bv}var qv={exports:{}},aI;function a8(){if(aI)return qv.exports;aI=1;var t=qv.exports=function(n,a,s){typeof a=="function"&&(s=a,a={}),s=a.cb||s;var l=typeof s=="function"?s:s.pre||function(){},c=s.post||function(){};e(a,l,c,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,a,s,l,c,d,f,m,h,v){if(l&&typeof l=="object"&&!Array.isArray(l)){a(l,c,d,f,m,h,v);for(var y in l){var w=l[y];if(Array.isArray(w)){if(y in t.arrayKeywords)for(var S=0;S<w.length;S++)e(n,a,s,w[S],c+"/"+y+"/"+S,d,c,y,l,S)}else if(y in t.propsKeywords){if(w&&typeof w=="object")for(var R in w)e(n,a,s,w[R],c+"/"+y+"/"+r(R),d,c,y,l,R)}else(y in t.keywords||n.allKeys&&!(y in t.skipKeywords))&&e(n,a,s,w,c+"/"+y,d,c,y,l)}s(l,c,d,f,m,h,v)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return qv.exports}var Hv,oI;function aR(){if(oI)return Hv;oI=1;var t=r8(),e=nR(),r=pc(),n=L2(),a=a8();Hv=s,s.normalizeId=x,s.fullPath=w,s.url=_,s.ids=C,s.inlineRef=h,s.schema=l;function s(N,k,A){var I=this._refs[A];if(typeof I=="string")if(this._refs[I])I=this._refs[I];else return s.call(this,N,k,I);if(I=I||this._schemas[A],I instanceof n)return h(I.schema,this._opts.inlineRefs)?I.schema:I.validate||this._compile(I);var O=l.call(this,k,A),L,M,P;return O&&(L=O.schema,k=O.root,P=O.baseId),L instanceof n?M=L.validate||N.call(this,L.schema,k,void 0,P):L!==void 0&&(M=h(L,this._opts.inlineRefs)?L:N.call(this,L,k,void 0,P)),M}function l(N,k){var A=t.parse(k),I=S(A),O=w(this._getId(N.schema));if(Object.keys(N.schema).length===0||I!==O){var L=x(I),M=this._refs[L];if(typeof M=="string")return c.call(this,N,M,A);if(M instanceof n)M.validate||this._compile(M),N=M;else if(M=this._schemas[L],M instanceof n){if(M.validate||this._compile(M),L==x(k))return{schema:M,root:N,baseId:O};N=M}else return;if(!N.schema)return;O=w(this._getId(N.schema))}return f.call(this,A,O,N.schema,N)}function c(N,k,A){var I=l.call(this,N,k);if(I){var O=I.schema,L=I.baseId;N=I.root;var M=this._getId(O);return M&&(L=_(L,M)),f.call(this,A,L,O,N)}}var d=r.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function f(N,k,A,I){if(N.fragment=N.fragment||"",N.fragment.slice(0,1)=="/"){for(var O=N.fragment.split("/"),L=1;L<O.length;L++){var M=O[L];if(M){if(M=r.unescapeFragment(M),A=A[M],A===void 0)break;var P;if(!d[M]&&(P=this._getId(A),P&&(k=_(k,P)),A.$ref)){var Y=_(k,A.$ref),Q=l.call(this,I,Y);Q&&(A=Q.schema,I=Q.root,k=Q.baseId)}}}if(A!==void 0&&A!==I.schema)return{schema:A,root:I,baseId:k}}}var m=r.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function h(N,k){if(k===!1)return!1;if(k===void 0||k===!0)return v(N);if(k)return y(N)<=k}function v(N){var k;if(Array.isArray(N)){for(var A=0;A<N.length;A++)if(k=N[A],typeof k=="object"&&!v(k))return!1}else for(var I in N)if(I=="$ref"||(k=N[I],typeof k=="object"&&!v(k)))return!1;return!0}function y(N){var k=0,A;if(Array.isArray(N)){for(var I=0;I<N.length;I++)if(A=N[I],typeof A=="object"&&(k+=y(A)),k==1/0)return 1/0}else for(var O in N){if(O=="$ref")return 1/0;if(m[O])k++;else if(A=N[O],typeof A=="object"&&(k+=y(A)+1),k==1/0)return 1/0}return k}function w(N,k){k!==!1&&(N=x(N));var A=t.parse(N);return S(A)}function S(N){return t.serialize(N).split("#")[0]+"#"}var R=/#\/?$/;function x(N){return N?N.replace(R,""):""}function _(N,k){return k=x(k),t.resolve(N,k)}function C(N){var k=x(this._getId(N)),A={"":k},I={"":w(k,!1)},O={},L=this;return a(N,{allKeys:!0},function(M,P,Y,Q,J,ee,U){if(P!==""){var G=L._getId(M),H=A[Q],X=I[Q]+"/"+J;if(U!==void 0&&(X+="/"+(typeof U=="number"?U:r.escapeFragment(U))),typeof G=="string"){G=H=x(H?t.resolve(H,G):G);var ae=L._refs[G];if(typeof ae=="string"&&(ae=L._refs[ae]),ae&&ae.schema){if(!e(M,ae.schema))throw new Error('id "'+G+'" resolves to more than one schema')}else if(G!=x(X))if(G[0]=="#"){if(O[G]&&!e(M,O[G]))throw new Error('id "'+G+'" resolves to more than one schema');O[G]=M}else L._refs[G]=X}A[P]=H,I[P]=X}}),O}return Hv}var Vv,iI;function oR(){if(iI)return Vv;iI=1;var t=aR();Vv={Validation:n(e),MissingRef:n(r)};function e(a){this.message="validation failed",this.errors=a,this.ajv=this.validation=!0}r.message=function(a,s){return"can't resolve reference "+s+" from id "+a};function r(a,s,l){this.message=l||r.message(a,s),this.missingRef=t.url(a,s),this.missingSchema=t.normalizeId(t.fullPath(this.missingRef))}function n(a){return a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a}return Vv}var Gv,sI;function M2(){return sI||(sI=1,Gv=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=typeof e.cycles=="boolean"?e.cycles:!1,n=e.cmp&&(function(s){return function(l){return function(c,d){var f={key:c,value:l[c]},m={key:d,value:l[d]};return s(f,m)}}})(e.cmp),a=[];return(function s(l){if(l&&l.toJSON&&typeof l.toJSON=="function"&&(l=l.toJSON()),l!==void 0){if(typeof l=="number")return isFinite(l)?""+l:"null";if(typeof l!="object")return JSON.stringify(l);var c,d;if(Array.isArray(l)){for(d="[",c=0;c<l.length;c++)c&&(d+=","),d+=s(l[c])||"null";return d+"]"}if(l===null)return"null";if(a.indexOf(l)!==-1){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var f=a.push(l)-1,m=Object.keys(l).sort(n&&n(l));for(d="",c=0;c<m.length;c++){var h=m[c],v=s(l[h]);v&&(d&&(d+=","),d+=JSON.stringify(h)+":"+v)}return a.splice(f,1),"{"+d+"}"}})(t)}),Gv}var Wv,lI;function P2(){return lI||(lI=1,Wv=function(e,r,n){var a="",s=e.schema.$async===!0,l=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),c=e.self._getId(e.schema);if(e.opts.strictKeywords){var d=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(d){var f="unknown keyword: "+d;if(e.opts.strictKeywords==="log")e.logger.warn(f);else throw new Error(f)}}if(e.isTop&&(a+=" var validate = ",s&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",c&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" "+("/*# sourceURL="+c+" */")+" ")),typeof e.schema=="boolean"||!(l||e.schema.$ref)){var r="false schema",m=e.level,h=e.dataLevel,v=e.schema[r],y=e.schemaPath+e.util.getProperty(r),w=e.errSchemaPath+"/"+r,k=!e.opts.allErrors,O,S="data"+(h||""),N="valid"+m;if(e.schema===!1){e.isTop?k=!0:a+=" var "+N+" = false; ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(w)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var x=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?s?a+=" return data; ":a+=" validate.errors = null; return true; ":a+=" var "+N+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var _=e.isTop,m=e.level=0,h=e.dataLevel=0,S="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],e.schema.default!==void 0&&e.opts.useDefaults&&e.opts.strictDefaults){var C="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(C);else throw new Error(C)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{var m=e.level,h=e.dataLevel,S="data"+(h||"");if(c&&(e.baseId=e.resolve.url(e.baseId,c)),s&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+m+" = errors;"}var N="valid"+m,k=!e.opts.allErrors,A="",I="",O,L=e.schema.type,M=Array.isArray(L);if(L&&e.opts.nullable&&e.schema.nullable===!0&&(M?L.indexOf("null")==-1&&(L=L.concat("null")):L!="null"&&(L=[L,"null"],M=!0)),M&&L.length==1&&(L=L[0],M=!1),e.schema.$ref&&l){if(e.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');e.opts.extendRefs!==!0&&(l=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),L){if(e.opts.coerceTypes)var P=e.util.coerceToTypes(e.opts.coerceTypes,L);var Y=e.RULES.types[L];if(P||M||Y===!0||Y&&!$e(Y)){var y=e.schemaPath+".type",w=e.errSchemaPath+"/type",y=e.schemaPath+".type",w=e.errSchemaPath+"/type",Q=M?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[Q](L,S,e.opts.strictNumbers,!0)+") { ",P){var J="dataType"+m,ee="coerced"+m;a+=" var "+J+" = typeof "+S+"; var "+ee+" = undefined; ",e.opts.coerceTypes=="array"&&(a+=" if ("+J+" == 'object' && Array.isArray("+S+") && "+S+".length == 1) { "+S+" = "+S+"[0]; "+J+" = typeof "+S+"; if ("+e.util.checkDataType(e.schema.type,S,e.opts.strictNumbers)+") "+ee+" = "+S+"; } "),a+=" if ("+ee+" !== undefined) ; ";var U=P;if(U)for(var G,H=-1,X=U.length-1;H<X;)G=U[H+=1],G=="string"?a+=" else if ("+J+" == 'number' || "+J+" == 'boolean') "+ee+" = '' + "+S+"; else if ("+S+" === null) "+ee+" = ''; ":G=="number"||G=="integer"?(a+=" else if ("+J+" == 'boolean' || "+S+" === null || ("+J+" == 'string' && "+S+" && "+S+" == +"+S+" ",G=="integer"&&(a+=" && !("+S+" % 1)"),a+=")) "+ee+" = +"+S+"; "):G=="boolean"?a+=" else if ("+S+" === 'false' || "+S+" === 0 || "+S+" === null) "+ee+" = false; else if ("+S+" === 'true' || "+S+" === 1) "+ee+" = true; ":G=="null"?a+=" else if ("+S+" === '' || "+S+" === 0 || "+S+" === false) "+ee+" = null; ":e.opts.coerceTypes=="array"&&G=="array"&&(a+=" else if ("+J+" == 'string' || "+J+" == 'number' || "+J+" == 'boolean' || "+S+" == null) "+ee+" = ["+S+"]; ");a+=" else { ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(w)+" , params: { type: '",M?a+=""+L.join(","):a+=""+L,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",M?a+=""+L.join(","):a+=""+L,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var x=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+ee+" !== undefined) { ";var ae=h?"data"+(h-1||""):"parentData",z=h?e.dataPathArr[h]:"parentDataProperty";a+=" "+S+" = "+ee+"; ",h||(a+="if ("+ae+" !== undefined)"),a+=" "+ae+"["+z+"] = "+ee+"; } "}else{var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(w)+" , params: { type: '",M?a+=""+L.join(","):a+=""+L,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",M?a+=""+L.join(","):a+=""+L,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var x=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!l)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",k&&(a+=" } if (errors === ",_?a+="0":a+="errs_"+m,a+=") { ",I+="}");else{var q=e.RULES;if(q){for(var Y,$=-1,W=q.length-1;$<W;)if(Y=q[$+=1],$e(Y)){if(Y.type&&(a+=" if ("+e.util.checkDataType(Y.type,S,e.opts.strictNumbers)+") { "),e.opts.useDefaults){if(Y.type=="object"&&e.schema.properties){var v=e.schema.properties,te=Object.keys(v),F=te;if(F)for(var j,Z=-1,ne=F.length-1;Z<ne;){j=F[Z+=1];var V=v[j];if(V.default!==void 0){var de=S+e.util.getProperty(j);if(e.compositeRule){if(e.opts.strictDefaults){var C="default is ignored for: "+de;if(e.opts.strictDefaults==="log")e.logger.warn(C);else throw new Error(C)}}else a+=" if ("+de+" === undefined ",e.opts.useDefaults=="empty"&&(a+=" || "+de+" === null || "+de+" === '' "),a+=" ) "+de+" = ",e.opts.useDefaults=="shared"?a+=" "+e.useDefault(V.default)+" ":a+=" "+JSON.stringify(V.default)+" ",a+="; "}}}else if(Y.type=="array"&&Array.isArray(e.schema.items)){var fe=e.schema.items;if(fe){for(var V,H=-1,Re=fe.length-1;H<Re;)if(V=fe[H+=1],V.default!==void 0){var de=S+"["+H+"]";if(e.compositeRule){if(e.opts.strictDefaults){var C="default is ignored for: "+de;if(e.opts.strictDefaults==="log")e.logger.warn(C);else throw new Error(C)}}else a+=" if ("+de+" === undefined ",e.opts.useDefaults=="empty"&&(a+=" || "+de+" === null || "+de+" === '' "),a+=" ) "+de+" = ",e.opts.useDefaults=="shared"?a+=" "+e.useDefault(V.default)+" ":a+=" "+JSON.stringify(V.default)+" ",a+="; "}}}}var be=Y.rules;if(be){for(var xe,Ne=-1,ze=be.length-1;Ne<ze;)if(xe=be[Ne+=1],ct(xe)){var Me=xe.code(e,xe.keyword,Y.type);Me&&(a+=" "+Me+" ",k&&(A+="}"))}}if(k&&(a+=" "+A+" ",A=""),Y.type&&(a+=" } ",L&&L===Y.type&&!P)){a+=" else { ";var y=e.schemaPath+".type",w=e.errSchemaPath+"/type",R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(w)+" , params: { type: '",M?a+=""+L.join(","):a+=""+L,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",M?a+=""+L.join(","):a+=""+L,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var x=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}k&&(a+=" if (errors === ",_?a+="0":a+="errs_"+m,a+=") { ",I+="}")}}}k&&(a+=" "+I+" "),_?(s?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+N+" = errors === errs_"+m+";";function $e(Ce){for(var Fe=Ce.rules,_e=0;_e<Fe.length;_e++)if(ct(Fe[_e]))return!0}function ct(Ce){return e.schema[Ce.keyword]!==void 0||Ce.implements&&ce(Ce)}function ce(Ce){for(var Fe=Ce.implements,_e=0;_e<Fe.length;_e++)if(e.schema[Fe[_e]]!==void 0)return!0}return a}),Wv}var Yv,cI;function o8(){if(cI)return Yv;cI=1;var t=aR(),e=pc(),r=oR(),n=M2(),a=P2(),s=e.ucs2length,l=nR(),c=r.Validation;Yv=d;function d(x,_,C,N){var k=this,A=this._opts,I=[void 0],O={},L=[],M={},P=[],Y={},Q=[];_=_||{schema:x,refVal:I,refs:O};var J=f.call(this,x,_,N),ee=this._compilations[J.index];if(J.compiling)return ee.callValidate=ae;var U=this._formats,G=this.RULES;try{var H=z(x,_,C,N);ee.validate=H;var X=ee.callValidate;return X&&(X.schema=H.schema,X.errors=null,X.refs=H.refs,X.refVal=H.refVal,X.root=H.root,X.$async=H.$async,A.sourceCode&&(X.source=H.source)),H}finally{m.call(this,x,_,N)}function ae(){var V=ee.validate,de=V.apply(this,arguments);return ae.errors=V.errors,de}function z(V,de,fe,Re){var be=!de||de&&de.schema==V;if(de.schema!=_.schema)return d.call(k,V,de,fe,Re);var xe=V.$async===!0,Ne=a({isTop:!0,schema:V,isRoot:be,baseId:Re,root:de,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:r.MissingRef,RULES:G,validate:a,util:e,resolve:t,resolveRef:q,usePattern:j,useDefault:Z,useCustomRule:ne,opts:A,formats:U,logger:k.logger,self:k});Ne=R(I,w)+R(L,v)+R(P,y)+R(Q,S)+Ne,A.processCode&&(Ne=A.processCode(Ne,V));var ze;try{var Me=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",Ne);ze=Me(k,G,U,_,I,P,Q,l,s,c),I[0]=ze}catch($e){throw k.logger.error("Error compiling schema, function code:",Ne),$e}return ze.schema=V,ze.errors=null,ze.refs=O,ze.refVal=I,ze.root=be?ze:de,xe&&(ze.$async=!0),A.sourceCode===!0&&(ze.source={code:Ne,patterns:L,defaults:P}),ze}function q(V,de,fe){de=t.url(V,de);var Re=O[de],be,xe;if(Re!==void 0)return be=I[Re],xe="refVal["+Re+"]",F(be,xe);if(!fe&&_.refs){var Ne=_.refs[de];if(Ne!==void 0)return be=_.refVal[Ne],xe=$(de,be),F(be,xe)}xe=$(de);var ze=t.call(k,z,_,de);if(ze===void 0){var Me=C&&C[de];Me&&(ze=t.inlineRef(Me,A.inlineRefs)?Me:d.call(k,Me,_,C,V))}if(ze===void 0)W(de);else return te(de,ze),F(ze,xe)}function $(V,de){var fe=I.length;return I[fe]=de,O[V]=fe,"refVal"+fe}function W(V){delete O[V]}function te(V,de){var fe=O[V];I[fe]=de}function F(V,de){return typeof V=="object"||typeof V=="boolean"?{code:de,schema:V,inline:!0}:{code:de,$async:V&&!!V.$async}}function j(V){var de=M[V];return de===void 0&&(de=M[V]=L.length,L[de]=V),"pattern"+de}function Z(V){switch(typeof V){case"boolean":case"number":return""+V;case"string":return e.toQuotedString(V);case"object":if(V===null)return"null";var de=n(V),fe=Y[de];return fe===void 0&&(fe=Y[de]=P.length,P[fe]=V),"default"+fe}}function ne(V,de,fe,Re){if(k._opts.validateSchema!==!1){var be=V.definition.dependencies;if(be&&!be.every(function(Fe){return Object.prototype.hasOwnProperty.call(fe,Fe)}))throw new Error("parent schema must have all required keywords: "+be.join(","));var xe=V.definition.validateSchema;if(xe){var Ne=xe(de);if(!Ne){var ze="keyword schema is invalid: "+k.errorsText(xe.errors);if(k._opts.validateSchema=="log")k.logger.error(ze);else throw new Error(ze)}}}var Me=V.definition.compile,$e=V.definition.inline,ct=V.definition.macro,ce;if(Me)ce=Me.call(k,de,fe,Re);else if(ct)ce=ct.call(k,de,fe,Re),A.validateSchema!==!1&&k.validateSchema(ce,!0);else if($e)ce=$e.call(k,Re,V.keyword,de,fe);else if(ce=V.definition.validate,!ce)return;if(ce===void 0)throw new Error('custom keyword "'+V.keyword+'"failed to compile');var Ce=Q.length;return Q[Ce]=ce,{code:"customRule"+Ce,validate:ce}}}function f(x,_,C){var N=h.call(this,x,_,C);return N>=0?{index:N,compiling:!0}:(N=this._compilations.length,this._compilations[N]={schema:x,root:_,baseId:C},{index:N,compiling:!1})}function m(x,_,C){var N=h.call(this,x,_,C);N>=0&&this._compilations.splice(N,1)}function h(x,_,C){for(var N=0;N<this._compilations.length;N++){var k=this._compilations[N];if(k.schema==x&&k.root==_&&k.baseId==C)return N}return-1}function v(x,_){return"var pattern"+x+" = new RegExp("+e.toQuotedString(_[x])+");"}function y(x){return"var default"+x+" = defaults["+x+"];"}function w(x,_){return _[x]===void 0?"":"var refVal"+x+" = refVal["+x+"];"}function S(x){return"var customRule"+x+" = customRules["+x+"];"}function R(x,_){if(!x.length)return"";for(var C="",N=0;N<x.length;N++)C+=_(N,x);return C}return Yv}var Kv={exports:{}},uI;function i8(){if(uI)return Kv.exports;uI=1;var t=Kv.exports=function(){this._cache={}};return t.prototype.put=function(r,n){this._cache[r]=n},t.prototype.get=function(r){return this._cache[r]},t.prototype.del=function(r){delete this._cache[r]},t.prototype.clear=function(){this._cache={}},Kv.exports}var Zv,dI;function s8(){if(dI)return Zv;dI=1;var t=pc(),e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,a=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,s=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,d=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,f=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,m=/^(?:\/(?:[^~/]|~0|~1)*)*$/,h=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,v=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;Zv=y;function y(I){return I=I=="full"?"full":"fast",t.copy(y[I])}y.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:d,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:A,uuid:f,"json-pointer":m,"json-pointer-uri-fragment":h,"relative-json-pointer":v},y.full={date:S,time:R,"date-time":_,uri:N,"uri-reference":l,"uri-template":c,url:d,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:A,uuid:f,"json-pointer":m,"json-pointer-uri-fragment":h,"relative-json-pointer":v};function w(I){return I%4===0&&(I%100!==0||I%400===0)}function S(I){var O=I.match(e);if(!O)return!1;var L=+O[1],M=+O[2],P=+O[3];return M>=1&&M<=12&&P>=1&&P<=(M==2&&w(L)?29:r[M])}function R(I,O){var L=I.match(n);if(!L)return!1;var M=L[1],P=L[2],Y=L[3],Q=L[5];return(M<=23&&P<=59&&Y<=59||M==23&&P==59&&Y==60)&&(!O||Q)}var x=/t|\s/i;function _(I){var O=I.split(x);return O.length==2&&S(O[0])&&R(O[1],!0)}var C=/\/|:/;function N(I){return C.test(I)&&s.test(I)}var k=/[^\\]\\Z/;function A(I){if(k.test(I))return!1;try{return new RegExp(I),!0}catch{return!1}}return Zv}var Xv,fI;function l8(){return fI||(fI=1,Xv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.errSchemaPath+"/"+r,f=!e.opts.allErrors,m="data"+(l||""),h="valid"+s,v,y;if(c=="#"||c=="#/")e.isRoot?(v=e.async,y="validate"):(v=e.root.schema.$async===!0,y="root.refVal[0]");else{var w=e.resolveRef(e.baseId,c,e.isRoot);if(w===void 0){var S=e.MissingRefError.message(e.baseId,c);if(e.opts.missingRefs=="fail"){e.logger.error(S);var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",e.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(a+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),a+=" } "):a+=" {} ";var x=a;a=R.pop(),!e.compositeRule&&f?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f&&(a+=" if (false) { ")}else if(e.opts.missingRefs=="ignore")e.logger.warn(S),f&&(a+=" if (true) { ");else throw new e.MissingRefError(e.baseId,c,S)}else if(w.inline){var _=e.util.copy(e);_.level++;var C="valid"+_.level;_.schema=w.schema,_.schemaPath="",_.errSchemaPath=c;var N=e.validate(_).replace(/validate\.schema/g,w.code);a+=" "+N+" ",f&&(a+=" if ("+C+") { ")}else v=w.$async===!0||e.async&&w.$async!==!1,y=w.code}if(y){var R=R||[];R.push(a),a="",e.opts.passContext?a+=" "+y+".call(this, ":a+=" "+y+"( ",a+=" "+m+", (dataPath || '')",e.errorPath!='""'&&(a+=" + "+e.errorPath);var k=l?"data"+(l-1||""):"parentData",A=l?e.dataPathArr[l]:"parentDataProperty";a+=" , "+k+" , "+A+", rootData) ";var I=a;if(a=R.pop(),v){if(!e.async)throw new Error("async schema referenced by sync schema");f&&(a+=" var "+h+"; "),a+=" try { await "+I+"; ",f&&(a+=" "+h+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",f&&(a+=" "+h+" = false; "),a+=" } ",f&&(a+=" if ("+h+") { ")}else a+=" if (!"+I+") { if (vErrors === null) vErrors = "+y+".errors; else vErrors = vErrors.concat("+y+".errors); errors = vErrors.length; } ",f&&(a+=" else { ")}return a}),Xv}var Qv,pI;function c8(){return pI||(pI=1,Qv=function(e,r,n){var a=" ",s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,f=e.util.copy(e),m="";f.level++;var h="valid"+f.level,v=f.baseId,y=!0,w=s;if(w)for(var S,R=-1,x=w.length-1;R<x;)S=w[R+=1],(e.opts.strictKeywords?typeof S=="object"&&Object.keys(S).length>0||S===!1:e.util.schemaHasRules(S,e.RULES.all))&&(y=!1,f.schema=S,f.schemaPath=l+"["+R+"]",f.errSchemaPath=c+"/"+R,a+=" "+e.validate(f)+" ",f.baseId=v,d&&(a+=" if ("+h+") { ",m+="}"));return d&&(y?a+=" if (true) { ":a+=" "+m.slice(0,-1)+" "),a}),Qv}var Jv,mI;function u8(){return mI||(mI=1,Jv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y="errs__"+s,w=e.util.copy(e),S="";w.level++;var R="valid"+w.level,x=c.every(function(O){return e.opts.strictKeywords?typeof O=="object"&&Object.keys(O).length>0||O===!1:e.util.schemaHasRules(O,e.RULES.all)});if(x){var _=w.baseId;a+=" var "+y+" = errors; var "+v+" = false; ";var C=e.compositeRule;e.compositeRule=w.compositeRule=!0;var N=c;if(N)for(var k,A=-1,I=N.length-1;A<I;)k=N[A+=1],w.schema=k,w.schemaPath=d+"["+A+"]",w.errSchemaPath=f+"/"+A,a+=" "+e.validate(w)+" ",w.baseId=_,a+=" "+v+" = "+v+" || "+R+"; if (!"+v+") { ",S+="}";e.compositeRule=w.compositeRule=C,a+=" "+S+" if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+y+"; if (vErrors !== null) { if ("+y+") vErrors.length = "+y+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else m&&(a+=" if (true) { ");return a}),Jv}var eb,hI;function d8(){return hI||(hI=1,eb=function(e,r,n){var a=" ",s=e.schema[r],l=e.errSchemaPath+"/"+r;e.opts.allErrors;var c=e.util.toQuotedString(s);return e.opts.$comment===!0?a+=" console.log("+c+");":typeof e.opts.$comment=="function"&&(a+=" self._opts.$comment("+c+", "+e.util.toQuotedString(l)+", validate.root.schema);"),a}),eb}var tb,gI;function f8(){return gI||(gI=1,tb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y=e.opts.$data&&c&&c.$data;y&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; "),y||(a+=" var schema"+s+" = validate.schema"+d+";"),a+="var "+v+" = equal("+h+", schema"+s+"); if (!"+v+") { ";var w=w||[];w.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { allowedValue: schema"+s+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var S=a;return a=w.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",m&&(a+=" else { "),a}),tb}var rb,vI;function p8(){return vI||(vI=1,rb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y="errs__"+s,w=e.util.copy(e),S="";w.level++;var R="valid"+w.level,x="i"+s,_=w.dataLevel=e.dataLevel+1,C="data"+_,N=e.baseId,k=e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all);if(a+="var "+y+" = errors;var "+v+";",k){var A=e.compositeRule;e.compositeRule=w.compositeRule=!0,w.schema=c,w.schemaPath=d,w.errSchemaPath=f,a+=" var "+R+" = false; for (var "+x+" = 0; "+x+" < "+h+".length; "+x+"++) { ",w.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0);var I=h+"["+x+"]";w.dataPathArr[_]=x;var O=e.validate(w);w.baseId=N,e.util.varOccurences(O,C)<2?a+=" "+e.util.varReplace(O,C,I)+" ":a+=" var "+C+" = "+I+"; "+O+" ",a+=" if ("+R+") break; } ",e.compositeRule=w.compositeRule=A,a+=" "+S+" if (!"+R+") {"}else a+=" if ("+h+".length == 0) {";var L=L||[];L.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var M=a;return a=L.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",k&&(a+=" errors = "+y+"; if (vErrors !== null) { if ("+y+") vErrors.length = "+y+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a}),rb}var nb,bI;function m8(){return bI||(bI=1,nb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,y=e.util.copy(e),w="";y.level++;var S="valid"+y.level,R={},x={},_=e.opts.ownProperties;for(A in c)if(A!="__proto__"){var C=c[A],N=Array.isArray(C)?x:R;N[A]=C}a+="var "+v+" = errors;";var k=e.errorPath;a+="var missing"+s+";";for(var A in x)if(N=x[A],N.length){if(a+=" if ( "+h+e.util.getProperty(A)+" !== undefined ",_&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(A)+"') "),m){a+=" && ( ";var I=N;if(I)for(var O,L=-1,M=I.length-1;L<M;){O=I[L+=1],L&&(a+=" || ");var P=e.util.getProperty(O),Y=h+P;a+=" ( ( "+Y+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(O)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:P)+") ) "}a+=")) { ";var Q="missing"+s,J="' + "+Q+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(k,Q,!0):k+" + "+Q);var ee=ee||[];ee.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { property: '"+e.util.escapeQuotes(A)+"', missingProperty: '"+J+"', depsCount: "+N.length+", deps: '"+e.util.escapeQuotes(N.length==1?N[0]:N.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",N.length==1?a+="property "+e.util.escapeQuotes(N[0]):a+="properties "+e.util.escapeQuotes(N.join(", ")),a+=" when property "+e.util.escapeQuotes(A)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var U=a;a=ee.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var G=N;if(G)for(var O,H=-1,X=G.length-1;H<X;){O=G[H+=1];var P=e.util.getProperty(O),J=e.util.escapeQuotes(O),Y=h+P;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(k,O,e.opts.jsonPointers)),a+=" if ( "+Y+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(O)+"') "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { property: '"+e.util.escapeQuotes(A)+"', missingProperty: '"+J+"', depsCount: "+N.length+", deps: '"+e.util.escapeQuotes(N.length==1?N[0]:N.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",N.length==1?a+="property "+e.util.escapeQuotes(N[0]):a+="properties "+e.util.escapeQuotes(N.join(", ")),a+=" when property "+e.util.escapeQuotes(A)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",m&&(w+="}",a+=" else { ")}e.errorPath=k;var ae=y.baseId;for(var A in R){var C=R[A];(e.opts.strictKeywords?typeof C=="object"&&Object.keys(C).length>0||C===!1:e.util.schemaHasRules(C,e.RULES.all))&&(a+=" "+S+" = true; if ( "+h+e.util.getProperty(A)+" !== undefined ",_&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(A)+"') "),a+=") { ",y.schema=C,y.schemaPath=d+e.util.getProperty(A),y.errSchemaPath=f+"/"+e.util.escapeFragment(A),a+=" "+e.validate(y)+" ",y.baseId=ae,a+=" } ",m&&(a+=" if ("+S+") { ",w+="}"))}return m&&(a+=" "+w+" if ("+v+" == errors) {"),a}),nb}var ab,yI;function h8(){return yI||(yI=1,ab=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y=e.opts.$data&&c&&c.$data;y&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ");var w="i"+s,S="schema"+s;y||(a+=" var "+S+" = validate.schema"+d+";"),a+="var "+v+";",y&&(a+=" if (schema"+s+" === undefined) "+v+" = true; else if (!Array.isArray(schema"+s+")) "+v+" = false; else {"),a+=""+v+" = false;for (var "+w+"=0; "+w+"<"+S+".length; "+w+"++) if (equal("+h+", "+S+"["+w+"])) { "+v+" = true; break; }",y&&(a+=" } "),a+=" if (!"+v+") { ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { allowedValues: schema"+s+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var x=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",m&&(a+=" else { "),a}),ab}var ob,EI;function g8(){return EI||(EI=1,ob=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||"");if(e.opts.format===!1)return m&&(a+=" if (true) { "),a;var v=e.opts.$data&&c&&c.$data,y;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c;var w=e.opts.unknownFormats,S=Array.isArray(w);if(v){var R="format"+s,x="isObject"+s,_="formatType"+s;a+=" var "+R+" = formats["+y+"]; var "+x+" = typeof "+R+" == 'object' && !("+R+" instanceof RegExp) && "+R+".validate; var "+_+" = "+x+" && "+R+".type || 'string'; if ("+x+") { ",e.async&&(a+=" var async"+s+" = "+R+".async; "),a+=" "+R+" = "+R+".validate; } if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'string') || "),a+=" (",w!="ignore"&&(a+=" ("+y+" && !"+R+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+y+") == -1 "),a+=") || "),a+=" ("+R+" && "+_+" == '"+n+"' && !(typeof "+R+" == 'function' ? ",e.async?a+=" (async"+s+" ? await "+R+"("+h+") : "+R+"("+h+")) ":a+=" "+R+"("+h+") ",a+=" : "+R+".test("+h+"))))) {"}else{var R=e.formats[c];if(!R){if(w=="ignore")return e.logger.warn('unknown format "'+c+'" ignored in schema at path "'+e.errSchemaPath+'"'),m&&(a+=" if (true) { "),a;if(S&&w.indexOf(c)>=0)return m&&(a+=" if (true) { "),a;throw new Error('unknown format "'+c+'" is used in schema at path "'+e.errSchemaPath+'"')}var x=typeof R=="object"&&!(R instanceof RegExp)&&R.validate,_=x&&R.type||"string";if(x){var C=R.async===!0;R=R.validate}if(_!=n)return m&&(a+=" if (true) { "),a;if(C){if(!e.async)throw new Error("async format in sync schema");var N="formats"+e.util.getProperty(c)+".validate";a+=" if (!(await "+N+"("+h+"))) { "}else{a+=" if (! ";var N="formats"+e.util.getProperty(c);x&&(N+=".validate"),typeof R=="function"?a+=" "+N+"("+h+") ":a+=" "+N+".test("+h+") ",a+=") { "}}var k=k||[];k.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { format: ",v?a+=""+y:a+=""+e.util.toQuotedString(c),a+=" } ",e.opts.messages!==!1&&(a+=` , message: 'should match format "`,v?a+="' + "+y+" + '":a+=""+e.util.escapeQuotes(c),a+=`"' `),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+e.util.toQuotedString(c),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;return a=k.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+A+"]); ":a+=" validate.errors = ["+A+"]; return false; ":a+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { "),a}),ob}var ib,SI;function v8(){return SI||(SI=1,ib=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y="errs__"+s,w=e.util.copy(e);w.level++;var S="valid"+w.level,R=e.schema.then,x=e.schema.else,_=R!==void 0&&(e.opts.strictKeywords?typeof R=="object"&&Object.keys(R).length>0||R===!1:e.util.schemaHasRules(R,e.RULES.all)),C=x!==void 0&&(e.opts.strictKeywords?typeof x=="object"&&Object.keys(x).length>0||x===!1:e.util.schemaHasRules(x,e.RULES.all)),N=w.baseId;if(_||C){var k;w.createErrors=!1,w.schema=c,w.schemaPath=d,w.errSchemaPath=f,a+=" var "+y+" = errors; var "+v+" = true; ";var A=e.compositeRule;e.compositeRule=w.compositeRule=!0,a+=" "+e.validate(w)+" ",w.baseId=N,w.createErrors=!0,a+=" errors = "+y+"; if (vErrors !== null) { if ("+y+") vErrors.length = "+y+"; else vErrors = null; } ",e.compositeRule=w.compositeRule=A,_?(a+=" if ("+S+") { ",w.schema=e.schema.then,w.schemaPath=e.schemaPath+".then",w.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(w)+" ",w.baseId=N,a+=" "+v+" = "+S+"; ",_&&C?(k="ifClause"+s,a+=" var "+k+" = 'then'; "):k="'then'",a+=" } ",C&&(a+=" else { ")):a+=" if (!"+S+") { ",C&&(w.schema=e.schema.else,w.schemaPath=e.schemaPath+".else",w.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(w)+" ",w.baseId=N,a+=" "+v+" = "+S+"; ",_&&C?(k="ifClause"+s,a+=" var "+k+" = 'else'; "):k="'else'",a+=" } "),a+=" if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { failingKeyword: "+k+" } ",e.opts.messages!==!1&&(a+=` , message: 'should match "' + `+k+` + '" schema' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",m&&(a+=" else { ")}else m&&(a+=" if (true) { ");return a}),ib}var sb,xI;function b8(){return xI||(xI=1,sb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y="errs__"+s,w=e.util.copy(e),S="";w.level++;var R="valid"+w.level,x="i"+s,_=w.dataLevel=e.dataLevel+1,C="data"+_,N=e.baseId;if(a+="var "+y+" = errors;var "+v+";",Array.isArray(c)){var k=e.schema.additionalItems;if(k===!1){a+=" "+v+" = "+h+".length <= "+c.length+"; ";var A=f;f=e.errSchemaPath+"/additionalItems",a+=" if (!"+v+") { ";var I=I||[];I.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+c.length+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+c.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var O=a;a=I.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",f=A,m&&(S+="}",a+=" else { ")}var L=c;if(L){for(var M,P=-1,Y=L.length-1;P<Y;)if(M=L[P+=1],e.opts.strictKeywords?typeof M=="object"&&Object.keys(M).length>0||M===!1:e.util.schemaHasRules(M,e.RULES.all)){a+=" "+R+" = true; if ("+h+".length > "+P+") { ";var Q=h+"["+P+"]";w.schema=M,w.schemaPath=d+"["+P+"]",w.errSchemaPath=f+"/"+P,w.errorPath=e.util.getPathExpr(e.errorPath,P,e.opts.jsonPointers,!0),w.dataPathArr[_]=P;var J=e.validate(w);w.baseId=N,e.util.varOccurences(J,C)<2?a+=" "+e.util.varReplace(J,C,Q)+" ":a+=" var "+C+" = "+Q+"; "+J+" ",a+=" } ",m&&(a+=" if ("+R+") { ",S+="}")}}if(typeof k=="object"&&(e.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:e.util.schemaHasRules(k,e.RULES.all))){w.schema=k,w.schemaPath=e.schemaPath+".additionalItems",w.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+R+" = true; if ("+h+".length > "+c.length+") { for (var "+x+" = "+c.length+"; "+x+" < "+h+".length; "+x+"++) { ",w.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0);var Q=h+"["+x+"]";w.dataPathArr[_]=x;var J=e.validate(w);w.baseId=N,e.util.varOccurences(J,C)<2?a+=" "+e.util.varReplace(J,C,Q)+" ":a+=" var "+C+" = "+Q+"; "+J+" ",m&&(a+=" if (!"+R+") break; "),a+=" } } ",m&&(a+=" if ("+R+") { ",S+="}")}}else if(e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){w.schema=c,w.schemaPath=d,w.errSchemaPath=f,a+=" for (var "+x+" = 0; "+x+" < "+h+".length; "+x+"++) { ",w.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0);var Q=h+"["+x+"]";w.dataPathArr[_]=x;var J=e.validate(w);w.baseId=N,e.util.varOccurences(J,C)<2?a+=" "+e.util.varReplace(J,C,Q)+" ":a+=" var "+C+" = "+Q+"; "+J+" ",m&&(a+=" if (!"+R+") break; "),a+=" }"}return m&&(a+=" "+S+" if ("+y+" == errors) {"),a}),sb}var lb,wI;function _I(){return wI||(wI=1,lb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,N,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c;var w=r=="maximum",S=w?"exclusiveMaximum":"exclusiveMinimum",R=e.schema[S],x=e.opts.$data&&R&&R.$data,_=w?"<":">",C=w?">":"<",N=void 0;if(!(v||typeof c=="number"||c===void 0))throw new Error(r+" must be number");if(!(x||R===void 0||typeof R=="number"||typeof R=="boolean"))throw new Error(S+" must be number or boolean");if(x){var k=e.util.getData(R.$data,l,e.dataPathArr),A="exclusive"+s,I="exclType"+s,O="exclIsNumber"+s,L="op"+s,M="' + "+L+" + '";a+=" var schemaExcl"+s+" = "+k+"; ",k="schemaExcl"+s,a+=" var "+A+"; var "+I+" = typeof "+k+"; if ("+I+" != 'boolean' && "+I+" != 'undefined' && "+I+" != 'number') { ";var N=S,P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(N||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var Y=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+Y+"]); ":a+=" validate.errors = ["+Y+"]; return false; ":a+=" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),a+=" "+I+" == 'number' ? ( ("+A+" = "+y+" === undefined || "+k+" "+_+"= "+y+") ? "+h+" "+C+"= "+k+" : "+h+" "+C+" "+y+" ) : ( ("+A+" = "+k+" === true) ? "+h+" "+C+"= "+y+" : "+h+" "+C+" "+y+" ) || "+h+" !== "+h+") { var op"+s+" = "+A+" ? '"+_+"' : '"+_+"='; ",c===void 0&&(N=S,f=e.errSchemaPath+"/"+S,y=k,v=x)}else{var O=typeof R=="number",M=_;if(O&&v){var L="'"+M+"'";a+=" if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),a+=" ( "+y+" === undefined || "+R+" "+_+"= "+y+" ? "+h+" "+C+"= "+R+" : "+h+" "+C+" "+y+" ) || "+h+" !== "+h+") { "}else{O&&c===void 0?(A=!0,N=S,f=e.errSchemaPath+"/"+S,y=R,C+="="):(O&&(y=Math[w?"min":"max"](R,c)),R===(O?y:!0)?(A=!0,N=S,f=e.errSchemaPath+"/"+S,C+="="):(A=!1,M+="="));var L="'"+M+"'";a+=" if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),a+=" "+h+" "+C+" "+y+" || "+h+" !== "+h+") { "}}N=N||r;var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(N||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { comparison: "+L+", limit: "+y+", exclusive: "+A+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be "+M+" ",v?a+="' + "+y:a+=""+y+"'"),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var Y=a;return a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+Y+"]); ":a+=" validate.errors = ["+Y+"]; return false; ":a+=" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { "),a}),lb}var cb,TI;function RI(){return TI||(TI=1,cb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var w=r=="maxItems"?">":"<";a+="if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),a+=" "+h+".length "+w+" "+y+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+y+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",r=="maxItems"?a+="more":a+="fewer",a+=" than ",v?a+="' + "+y+" + '":a+=""+c,a+=" items' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var x=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),cb}var ub,CI;function AI(){return CI||(CI=1,ub=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var w=r=="maxLength"?">":"<";a+="if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),e.opts.unicode===!1?a+=" "+h+".length ":a+=" ucs2length("+h+") ",a+=" "+w+" "+y+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+y+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be ",r=="maxLength"?a+="longer":a+="shorter",a+=" than ",v?a+="' + "+y+" + '":a+=""+c,a+=" characters' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var x=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),ub}var db,NI;function kI(){return NI||(NI=1,db=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var w=r=="maxProperties"?">":"<";a+="if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),a+=" Object.keys("+h+").length "+w+" "+y+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+y+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",r=="maxProperties"?a+="more":a+="fewer",a+=" than ",v?a+="' + "+y+" + '":a+=""+c,a+=" properties' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var x=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),db}var fb,II;function y8(){return II||(II=1,fb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c,!(v||typeof c=="number"))throw new Error(r+" must be number");a+="var division"+s+";if (",v&&(a+=" "+y+" !== undefined && ( typeof "+y+" != 'number' || "),a+=" (division"+s+" = "+h+" / "+y+", ",e.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":a+=" division"+s+" !== parseInt(division"+s+") ",a+=" ) ",v&&(a+=" ) "),a+=" ) { ";var w=w||[];w.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { multipleOf: "+y+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",v?a+="' + "+y:a+=""+y+"'"),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var S=a;return a=w.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),fb}var pb,OI;function E8(){return OI||(OI=1,pb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,y=e.util.copy(e);y.level++;var w="valid"+y.level;if(e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){y.schema=c,y.schemaPath=d,y.errSchemaPath=f,a+=" var "+v+" = errors; ";var S=e.compositeRule;e.compositeRule=y.compositeRule=!0,y.createErrors=!1;var R;y.opts.allErrors&&(R=y.opts.allErrors,y.opts.allErrors=!1),a+=" "+e.validate(y)+" ",y.createErrors=!0,R&&(y.opts.allErrors=R),e.compositeRule=y.compositeRule=S,a+=" if ("+w+") { ";var x=x||[];x.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var _=a;a=x.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+_+"]); ":a+=" validate.errors = ["+_+"]; return false; ":a+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+v+"; if (vErrors !== null) { if ("+v+") vErrors.length = "+v+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",e.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",m&&(a+=" if (false) { ");return a}),pb}var mb,DI;function S8(){return DI||(DI=1,mb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y="errs__"+s,w=e.util.copy(e),S="";w.level++;var R="valid"+w.level,x=w.baseId,_="prevValid"+s,C="passingSchemas"+s;a+="var "+y+" = errors , "+_+" = false , "+v+" = false , "+C+" = null; ";var N=e.compositeRule;e.compositeRule=w.compositeRule=!0;var k=c;if(k)for(var A,I=-1,O=k.length-1;I<O;)A=k[I+=1],(e.opts.strictKeywords?typeof A=="object"&&Object.keys(A).length>0||A===!1:e.util.schemaHasRules(A,e.RULES.all))?(w.schema=A,w.schemaPath=d+"["+I+"]",w.errSchemaPath=f+"/"+I,a+=" "+e.validate(w)+" ",w.baseId=x):a+=" var "+R+" = true; ",I&&(a+=" if ("+R+" && "+_+") { "+v+" = false; "+C+" = ["+C+", "+I+"]; } else { ",S+="}"),a+=" if ("+R+") { "+v+" = "+_+" = true; "+C+" = "+I+"; }";return e.compositeRule=w.compositeRule=N,a+=""+S+"if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { passingSchemas: "+C+" } ",e.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+y+"; if (vErrors !== null) { if ("+y+") vErrors.length = "+y+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}),mb}var hb,LI;function x8(){return LI||(LI=1,hb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c;var w=v?"(new RegExp("+y+"))":e.usePattern(c);a+="if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'string') || "),a+=" !"+w+".test("+h+") ) { ";var S=S||[];S.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { pattern: ",v?a+=""+y:a+=""+e.util.toQuotedString(c),a+=" } ",e.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,v?a+="' + "+y+" + '":a+=""+e.util.escapeQuotes(c),a+=`"' `),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+e.util.toQuotedString(c),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var R=a;return a=S.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+R+"]); ":a+=" validate.errors = ["+R+"]; return false; ":a+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),hb}var gb,MI;function w8(){return MI||(MI=1,gb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,y=e.util.copy(e),w="";y.level++;var S="valid"+y.level,R="key"+s,x="idx"+s,_=y.dataLevel=e.dataLevel+1,C="data"+_,N="dataProperties"+s,k=Object.keys(c||{}).filter(H),A=e.schema.patternProperties||{},I=Object.keys(A).filter(H),O=e.schema.additionalProperties,L=k.length||I.length,M=O===!1,P=typeof O=="object"&&Object.keys(O).length,Y=e.opts.removeAdditional,Q=M||P||Y,J=e.opts.ownProperties,ee=e.baseId,U=e.schema.required;if(U&&!(e.opts.$data&&U.$data)&&U.length<e.opts.loopRequired)var G=e.util.toHash(U);function H(Je){return Je!=="__proto__"}if(a+="var "+v+" = errors;var "+S+" = true;",J&&(a+=" var "+N+" = undefined;"),Q){if(J?a+=" "+N+" = "+N+" || Object.keys("+h+"); for (var "+x+"=0; "+x+"<"+N+".length; "+x+"++) { var "+R+" = "+N+"["+x+"]; ":a+=" for (var "+R+" in "+h+") { ",L){if(a+=" var isAdditional"+s+" = !(false ",k.length)if(k.length>8)a+=" || validate.schema"+d+".hasOwnProperty("+R+") ";else{var X=k;if(X)for(var ae,z=-1,q=X.length-1;z<q;)ae=X[z+=1],a+=" || "+R+" == "+e.util.toQuotedString(ae)+" "}if(I.length){var $=I;if($)for(var W,te=-1,F=$.length-1;te<F;)W=$[te+=1],a+=" || "+e.usePattern(W)+".test("+R+") "}a+=" ); if (isAdditional"+s+") { "}if(Y=="all")a+=" delete "+h+"["+R+"]; ";else{var j=e.errorPath,Z="' + "+R+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers)),M)if(Y)a+=" delete "+h+"["+R+"]; ";else{a+=" "+S+" = false; ";var ne=f;f=e.errSchemaPath+"/additionalProperties";var V=V||[];V.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { additionalProperty: '"+Z+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var de=a;a=V.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+de+"]); ":a+=" validate.errors = ["+de+"]; return false; ":a+=" var err = "+de+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f=ne,m&&(a+=" break; ")}else if(P)if(Y=="failing"){a+=" var "+v+" = errors; ";var fe=e.compositeRule;e.compositeRule=y.compositeRule=!0,y.schema=O,y.schemaPath=e.schemaPath+".additionalProperties",y.errSchemaPath=e.errSchemaPath+"/additionalProperties",y.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var Re=h+"["+R+"]";y.dataPathArr[_]=R;var be=e.validate(y);y.baseId=ee,e.util.varOccurences(be,C)<2?a+=" "+e.util.varReplace(be,C,Re)+" ":a+=" var "+C+" = "+Re+"; "+be+" ",a+=" if (!"+S+") { errors = "+v+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+h+"["+R+"]; } ",e.compositeRule=y.compositeRule=fe}else{y.schema=O,y.schemaPath=e.schemaPath+".additionalProperties",y.errSchemaPath=e.errSchemaPath+"/additionalProperties",y.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var Re=h+"["+R+"]";y.dataPathArr[_]=R;var be=e.validate(y);y.baseId=ee,e.util.varOccurences(be,C)<2?a+=" "+e.util.varReplace(be,C,Re)+" ":a+=" var "+C+" = "+Re+"; "+be+" ",m&&(a+=" if (!"+S+") break; ")}e.errorPath=j}L&&(a+=" } "),a+=" } ",m&&(a+=" if ("+S+") { ",w+="}")}var xe=e.opts.useDefaults&&!e.compositeRule;if(k.length){var Ne=k;if(Ne)for(var ae,ze=-1,Me=Ne.length-1;ze<Me;){ae=Ne[ze+=1];var $e=c[ae];if(e.opts.strictKeywords?typeof $e=="object"&&Object.keys($e).length>0||$e===!1:e.util.schemaHasRules($e,e.RULES.all)){var ct=e.util.getProperty(ae),Re=h+ct,ce=xe&&$e.default!==void 0;y.schema=$e,y.schemaPath=d+ct,y.errSchemaPath=f+"/"+e.util.escapeFragment(ae),y.errorPath=e.util.getPath(e.errorPath,ae,e.opts.jsonPointers),y.dataPathArr[_]=e.util.toQuotedString(ae);var be=e.validate(y);if(y.baseId=ee,e.util.varOccurences(be,C)<2){be=e.util.varReplace(be,C,Re);var Ce=Re}else{var Ce=C;a+=" var "+C+" = "+Re+"; "}if(ce)a+=" "+be+" ";else{if(G&&G[ae]){a+=" if ( "+Ce+" === undefined ",J&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(ae)+"') "),a+=") { "+S+" = false; ";var j=e.errorPath,ne=f,Fe=e.util.escapeQuotes(ae);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(j,ae,e.opts.jsonPointers)),f=e.errSchemaPath+"/required";var V=V||[];V.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+Fe+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+Fe+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var de=a;a=V.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+de+"]); ":a+=" validate.errors = ["+de+"]; return false; ":a+=" var err = "+de+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f=ne,e.errorPath=j,a+=" } else { "}else m?(a+=" if ( "+Ce+" === undefined ",J&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(ae)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+Ce+" !== undefined ",J&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(ae)+"') "),a+=" ) { ");a+=" "+be+" } "}}m&&(a+=" if ("+S+") { ",w+="}")}}if(I.length){var _e=I;if(_e)for(var W,Ie=-1,Oe=_e.length-1;Ie<Oe;){W=_e[Ie+=1];var $e=A[W];if(e.opts.strictKeywords?typeof $e=="object"&&Object.keys($e).length>0||$e===!1:e.util.schemaHasRules($e,e.RULES.all)){y.schema=$e,y.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(W),y.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(W),J?a+=" "+N+" = "+N+" || Object.keys("+h+"); for (var "+x+"=0; "+x+"<"+N+".length; "+x+"++) { var "+R+" = "+N+"["+x+"]; ":a+=" for (var "+R+" in "+h+") { ",a+=" if ("+e.usePattern(W)+".test("+R+")) { ",y.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var Re=h+"["+R+"]";y.dataPathArr[_]=R;var be=e.validate(y);y.baseId=ee,e.util.varOccurences(be,C)<2?a+=" "+e.util.varReplace(be,C,Re)+" ":a+=" var "+C+" = "+Re+"; "+be+" ",m&&(a+=" if (!"+S+") break; "),a+=" } ",m&&(a+=" else "+S+" = true; "),a+=" } ",m&&(a+=" if ("+S+") { ",w+="}")}}}return m&&(a+=" "+w+" if ("+v+" == errors) {"),a}),gb}var vb,PI;function _8(){return PI||(PI=1,vb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,y=e.util.copy(e),w="";y.level++;var S="valid"+y.level;if(a+="var "+v+" = errors;",e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){y.schema=c,y.schemaPath=d,y.errSchemaPath=f;var R="key"+s,x="idx"+s,_="i"+s,C="' + "+R+" + '",N=y.dataLevel=e.dataLevel+1,k="data"+N,A="dataProperties"+s,I=e.opts.ownProperties,O=e.baseId;I&&(a+=" var "+A+" = undefined; "),I?a+=" "+A+" = "+A+" || Object.keys("+h+"); for (var "+x+"=0; "+x+"<"+A+".length; "+x+"++) { var "+R+" = "+A+"["+x+"]; ":a+=" for (var "+R+" in "+h+") { ",a+=" var startErrs"+s+" = errors; ";var L=R,M=e.compositeRule;e.compositeRule=y.compositeRule=!0;var P=e.validate(y);y.baseId=O,e.util.varOccurences(P,k)<2?a+=" "+e.util.varReplace(P,k,L)+" ":a+=" var "+k+" = "+L+"; "+P+" ",e.compositeRule=y.compositeRule=M,a+=" if (!"+S+") { for (var "+_+"=startErrs"+s+"; "+_+"<errors; "+_+"++) { vErrors["+_+"].propertyName = "+R+"; } var err = ",e.createErrors!==!1?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { propertyName: '"+C+"' } ",e.opts.messages!==!1&&(a+=" , message: 'property name \\'"+C+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),m&&(a+=" break; "),a+=" } }"}return m&&(a+=" "+w+" if ("+v+" == errors) {"),a}),vb}var bb,jI;function T8(){return jI||(jI=1,bb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y=e.opts.$data&&c&&c.$data;y&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ");var w="schema"+s;if(!y)if(c.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var S=[],R=c;if(R)for(var x,_=-1,C=R.length-1;_<C;){x=R[_+=1];var N=e.schema.properties[x];N&&(e.opts.strictKeywords?typeof N=="object"&&Object.keys(N).length>0||N===!1:e.util.schemaHasRules(N,e.RULES.all))||(S[S.length]=x)}}else var S=c;if(y||S.length){var k=e.errorPath,A=y||S.length>=e.opts.loopRequired,I=e.opts.ownProperties;if(m)if(a+=" var missing"+s+"; ",A){y||(a+=" var "+w+" = validate.schema"+d+"; ");var O="i"+s,L="schema"+s+"["+O+"]",M="' + "+L+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(k,L,e.opts.jsonPointers)),a+=" var "+v+" = true; ",y&&(a+=" if (schema"+s+" === undefined) "+v+" = true; else if (!Array.isArray(schema"+s+")) "+v+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+w+".length; "+O+"++) { "+v+" = "+h+"["+w+"["+O+"]] !== undefined ",I&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", "+w+"["+O+"]) "),a+="; if (!"+v+") break; } ",y&&(a+=" } "),a+=" if (!"+v+") { ";var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+M+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+M+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var Y=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+Y+"]); ":a+=" validate.errors = ["+Y+"]; return false; ":a+=" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var Q=S;if(Q)for(var J,O=-1,ee=Q.length-1;O<ee;){J=Q[O+=1],O&&(a+=" || ");var U=e.util.getProperty(J),G=h+U;a+=" ( ( "+G+" === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(J)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?J:U)+") ) "}a+=") { ";var L="missing"+s,M="' + "+L+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(k,L,!0):k+" + "+L);var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+M+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+M+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var Y=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+Y+"]); ":a+=" validate.errors = ["+Y+"]; return false; ":a+=" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(A){y||(a+=" var "+w+" = validate.schema"+d+"; ");var O="i"+s,L="schema"+s+"["+O+"]",M="' + "+L+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(k,L,e.opts.jsonPointers)),y&&(a+=" if ("+w+" && !Array.isArray("+w+")) { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+M+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+M+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+w+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+w+".length; "+O+"++) { if ("+h+"["+w+"["+O+"]] === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", "+w+"["+O+"]) "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+M+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+M+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",y&&(a+=" } ")}else{var H=S;if(H)for(var J,X=-1,ae=H.length-1;X<ae;){J=H[X+=1];var U=e.util.getProperty(J),M=e.util.escapeQuotes(J),G=h+U;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(k,J,e.opts.jsonPointers)),a+=" if ( "+G+" === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(J)+"') "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+M+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+M+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=k}else m&&(a+=" if (true) {");return a}),bb}var yb,UI;function R8(){return UI||(UI=1,yb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y=e.opts.$data&&c&&c.$data,w;if(y?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",w="schema"+s):w=c,(c||y)&&e.opts.uniqueItems!==!1){y&&(a+=" var "+v+"; if ("+w+" === false || "+w+" === undefined) "+v+" = true; else if (typeof "+w+" != 'boolean') "+v+" = false; else { "),a+=" var i = "+h+".length , "+v+" = true , j; if (i > 1) { ";var S=e.schema.items&&e.schema.items.type,R=Array.isArray(S);if(!S||S=="object"||S=="array"||R&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+v+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var x="checkDataType"+(R?"s":"");a+=" if ("+e.util[x](S,"item",e.opts.strictNumbers,!0)+") continue; ",R&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+v+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",y&&(a+=" } "),a+=" if (!"+v+") { ";var _=_||[];_.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { i: i, j: j } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(a+=" , schema: ",y?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var C=a;a=_.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+C+"]); ":a+=" validate.errors = ["+C+"]; return false; ":a+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { ")}else m&&(a+=" if (true) { ");return a}),yb}var Eb,FI;function C8(){return FI||(FI=1,Eb={$ref:l8(),allOf:c8(),anyOf:u8(),$comment:d8(),const:f8(),contains:p8(),dependencies:m8(),enum:h8(),format:g8(),if:v8(),items:b8(),maximum:_I(),minimum:_I(),maxItems:RI(),minItems:RI(),maxLength:AI(),minLength:AI(),maxProperties:kI(),minProperties:kI(),multipleOf:y8(),not:E8(),oneOf:S8(),pattern:x8(),properties:w8(),propertyNames:_8(),required:T8(),uniqueItems:R8(),validate:P2()}),Eb}var Sb,zI;function A8(){if(zI)return Sb;zI=1;var t=C8(),e=pc().toHash;return Sb=function(){var n=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],s=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],l=["number","integer","string","array","object","boolean","null"];return n.all=e(a),n.types=e(l),n.forEach(function(c){c.rules=c.rules.map(function(d){var f;if(typeof d=="object"){var m=Object.keys(d)[0];f=d[m],d=m,f.forEach(function(v){a.push(v),n.all[v]=!0})}a.push(d);var h=n.all[d]={keyword:d,code:t[d],implements:f};return h}),n.all.$comment={keyword:"$comment",code:t.$comment},c.type&&(n.types[c.type]=c)}),n.keywords=e(a.concat(s)),n.custom={},n},Sb}var xb,$I;function N8(){if($I)return xb;$I=1;var t=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return xb=function(e,r){for(var n=0;n<r.length;n++){e=JSON.parse(JSON.stringify(e));var a=r[n].split("/"),s=e,l;for(l=1;l<a.length;l++)s=s[a[l]];for(l=0;l<t.length;l++){var c=t[l],d=s[c];d&&(s[c]={anyOf:[d,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},xb}var wb,BI;function k8(){if(BI)return wb;BI=1;var t=oR().MissingRef;wb=e;function e(r,n,a){var s=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof n=="function"&&(a=n,n=void 0);var l=c(r).then(function(){var f=s._addSchema(r,void 0,n);return f.validate||d(f)});return a&&l.then(function(f){a(null,f)},a),l;function c(f){var m=f.$schema;return m&&!s.getSchema(m)?e.call(s,{$ref:m},!0):Promise.resolve()}function d(f){try{return s._compile(f)}catch(h){if(h instanceof t)return m(h);throw h}function m(h){var v=h.missingSchema;if(S(v))throw new Error("Schema "+v+" is loaded but "+h.missingRef+" cannot be resolved");var y=s._loadingSchemas[v];return y||(y=s._loadingSchemas[v]=s._opts.loadSchema(v),y.then(w,w)),y.then(function(R){if(!S(v))return c(R).then(function(){S(v)||s.addSchema(R,v,void 0,n)})}).then(function(){return d(f)});function w(){delete s._loadingSchemas[v]}function S(R){return s._refs[R]||s._schemas[R]}}}}return wb}var _b,qI;function I8(){return qI||(qI=1,_b=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h,v="data"+(l||""),y="valid"+s,w="errs__"+s,S=e.opts.$data&&c&&c.$data,R;S?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",R="schema"+s):R=c;var x=this,_="definition"+s,C=x.definition,N="",k,A,I,O,L;if(S&&C.$data){L="keywordValidate"+s;var M=C.validateSchema;a+=" var "+_+" = RULES.custom['"+r+"'].definition; var "+L+" = "+_+".validate;"}else{if(O=e.useCustomRule(x,c,e.schema,e),!O)return;R="validate.schema"+d,L=O.code,k=C.compile,A=C.inline,I=C.macro}var P=L+".errors",Y="i"+s,Q="ruleErr"+s,J=C.async;if(J&&!e.async)throw new Error("async keyword in sync schema");if(A||I||(a+=""+P+" = null;"),a+="var "+w+" = errors;var "+y+";",S&&C.$data&&(N+="}",a+=" if ("+R+" === undefined) { "+y+" = true; } else { ",M&&(N+="}",a+=" "+y+" = "+_+".validateSchema("+R+"); if ("+y+") { ")),A)C.statements?a+=" "+O.validate+" ":a+=" "+y+" = "+O.validate+"; ";else if(I){var ee=e.util.copy(e),N="";ee.level++;var U="valid"+ee.level;ee.schema=O.validate,ee.schemaPath="";var G=e.compositeRule;e.compositeRule=ee.compositeRule=!0;var H=e.validate(ee).replace(/validate\.schema/g,L);e.compositeRule=ee.compositeRule=G,a+=" "+H}else{var X=X||[];X.push(a),a="",a+=" "+L+".call( ",e.opts.passContext?a+="this":a+="self",k||C.schema===!1?a+=" , "+v+" ":a+=" , "+R+" , "+v+" , validate.schema"+e.schemaPath+" ",a+=" , (dataPath || '')",e.errorPath!='""'&&(a+=" + "+e.errorPath);var ae=l?"data"+(l-1||""):"parentData",z=l?e.dataPathArr[l]:"parentDataProperty";a+=" , "+ae+" , "+z+" , rootData ) ";var q=a;a=X.pop(),C.errors===!1?(a+=" "+y+" = ",J&&(a+="await "),a+=""+q+"; "):J?(P="customErrors"+s,a+=" var "+P+" = null; try { "+y+" = await "+q+"; } catch (e) { "+y+" = false; if (e instanceof ValidationError) "+P+" = e.errors; else throw e; } "):a+=" "+P+" = null; "+y+" = "+q+"; "}if(C.modifying&&(a+=" if ("+ae+") "+v+" = "+ae+"["+z+"];"),a+=""+N,C.valid)m&&(a+=" if (true) { ");else{a+=" if ( ",C.valid===void 0?(a+=" !",I?a+=""+U:a+=""+y):a+=" "+!C.valid+" ",a+=") { ",h=x.keyword;var X=X||[];X.push(a),a="";var X=X||[];X.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { keyword: '"+x.keyword+"' } ",e.opts.messages!==!1&&(a+=` , message: 'should pass "`+x.keyword+`" keyword validation' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var $=a;a=X.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+$+"]); ":a+=" validate.errors = ["+$+"]; return false; ":a+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var W=a;a=X.pop(),A?C.errors?C.errors!="full"&&(a+=" for (var "+Y+"="+w+"; "+Y+"<errors; "+Y+"++) { var "+Q+" = vErrors["+Y+"]; if ("+Q+".dataPath === undefined) "+Q+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+Q+".schemaPath === undefined) { "+Q+'.schemaPath = "'+f+'"; } ',e.opts.verbose&&(a+=" "+Q+".schema = "+R+"; "+Q+".data = "+v+"; "),a+=" } "):C.errors===!1?a+=" "+W+" ":(a+=" if ("+w+" == errors) { "+W+" } else { for (var "+Y+"="+w+"; "+Y+"<errors; "+Y+"++) { var "+Q+" = vErrors["+Y+"]; if ("+Q+".dataPath === undefined) "+Q+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+Q+".schemaPath === undefined) { "+Q+'.schemaPath = "'+f+'"; } ',e.opts.verbose&&(a+=" "+Q+".schema = "+R+"; "+Q+".data = "+v+"; "),a+=" } } "):I?(a+=" var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { keyword: '"+x.keyword+"' } ",e.opts.messages!==!1&&(a+=` , message: 'should pass "`+x.keyword+`" keyword validation' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; ")):C.errors===!1?a+=" "+W+" ":(a+=" if (Array.isArray("+P+")) { if (vErrors === null) vErrors = "+P+"; else vErrors = vErrors.concat("+P+"); errors = vErrors.length; for (var "+Y+"="+w+"; "+Y+"<errors; "+Y+"++) { var "+Q+" = vErrors["+Y+"]; if ("+Q+".dataPath === undefined) "+Q+".dataPath = (dataPath || '') + "+e.errorPath+"; "+Q+'.schemaPath = "'+f+'"; ',e.opts.verbose&&(a+=" "+Q+".schema = "+R+"; "+Q+".data = "+v+"; "),a+=" } } else { "+W+" } "),a+=" } ",m&&(a+=" else { ")}return a}),_b}const O8="http://json-schema.org/draft-07/schema#",D8="http://json-schema.org/draft-07/schema#",L8="Core schema meta-schema",M8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},P8=["object","boolean"],j8={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},j2={$schema:O8,$id:D8,title:L8,definitions:M8,type:P8,properties:j8,default:!0};var Tb,HI;function U8(){if(HI)return Tb;HI=1;var t=j2;return Tb={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:t.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:t.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Tb}var Rb,VI;function F8(){if(VI)return Rb;VI=1;var t=/^[a-z_$][a-z0-9_$-]*$/i,e=I8(),r=U8();Rb={add:n,get:a,remove:s,validate:l};function n(c,d){var f=this.RULES;if(f.keywords[c])throw new Error("Keyword "+c+" is already defined");if(!t.test(c))throw new Error("Keyword "+c+" is not a valid identifier");if(d){this.validateKeyword(d,!0);var m=d.type;if(Array.isArray(m))for(var h=0;h<m.length;h++)y(c,m[h],d);else y(c,m,d);var v=d.metaSchema;v&&(d.$data&&this._opts.$data&&(v={anyOf:[v,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),d.validateSchema=this.compile(v,!0))}f.keywords[c]=f.all[c]=!0;function y(w,S,R){for(var x,_=0;_<f.length;_++){var C=f[_];if(C.type==S){x=C;break}}x||(x={type:S,rules:[]},f.push(x));var N={keyword:w,definition:R,custom:!0,code:e,implements:R.implements};x.rules.push(N),f.custom[w]=N}return this}function a(c){var d=this.RULES.custom[c];return d?d.definition:this.RULES.keywords[c]||!1}function s(c){var d=this.RULES;delete d.keywords[c],delete d.all[c],delete d.custom[c];for(var f=0;f<d.length;f++)for(var m=d[f].rules,h=0;h<m.length;h++)if(m[h].keyword==c){m.splice(h,1);break}return this}function l(c,d){l.errors=null;var f=this._validateKeyword=this._validateKeyword||this.compile(r,!0);if(f(c))return!0;if(l.errors=f.errors,d)throw new Error("custom keyword definition is invalid: "+this.errorsText(f.errors));return!1}return Rb}const z8="http://json-schema.org/draft-07/schema#",$8="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",B8="Meta-schema for $data reference (JSON Schema extension proposal)",q8="object",H8=["$data"],V8={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},G8=!1,W8={$schema:z8,$id:$8,description:B8,type:q8,required:H8,properties:V8,additionalProperties:G8};var Cb,GI;function Y8(){if(GI)return Cb;GI=1;var t=o8(),e=aR(),r=i8(),n=L2(),a=M2(),s=s8(),l=A8(),c=N8(),d=pc();Cb=w,w.prototype.validate=S,w.prototype.compile=R,w.prototype.addSchema=x,w.prototype.addMetaSchema=_,w.prototype.validateSchema=C,w.prototype.getSchema=k,w.prototype.removeSchema=O,w.prototype.addFormat=G,w.prototype.errorsText=U,w.prototype._addSchema=M,w.prototype._compile=P,w.prototype.compileAsync=k8();var f=F8();w.prototype.addKeyword=f.add,w.prototype.getKeyword=f.get,w.prototype.removeKeyword=f.remove,w.prototype.validateKeyword=f.validate;var m=oR();w.ValidationError=m.Validation,w.MissingRefError=m.MissingRef,w.$dataMetaSchema=c;var h="http://json-schema.org/draft-07/schema",v=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],y=["/properties"];function w(F){if(!(this instanceof w))return new w(F);F=this._opts=d.copy(F)||{},W(this),this._schemas={},this._refs={},this._fragments={},this._formats=s(F.format),this._cache=F.cache||new r,this._loadingSchemas={},this._compilations=[],this.RULES=l(),this._getId=Y(F),F.loopRequired=F.loopRequired||1/0,F.errorDataPath=="property"&&(F._errorDataPathProperty=!0),F.serialize===void 0&&(F.serialize=a),this._metaOpts=$(this),F.formats&&ae(this),F.keywords&&z(this),H(this),typeof F.meta=="object"&&this.addMetaSchema(F.meta),F.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),X(this)}function S(F,j){var Z;if(typeof F=="string"){if(Z=this.getSchema(F),!Z)throw new Error('no schema with key or ref "'+F+'"')}else{var ne=this._addSchema(F);Z=ne.validate||this._compile(ne)}var V=Z(j);return Z.$async!==!0&&(this.errors=Z.errors),V}function R(F,j){var Z=this._addSchema(F,void 0,j);return Z.validate||this._compile(Z)}function x(F,j,Z,ne){if(Array.isArray(F)){for(var V=0;V<F.length;V++)this.addSchema(F[V],void 0,Z,ne);return this}var de=this._getId(F);if(de!==void 0&&typeof de!="string")throw new Error("schema id must be string");return j=e.normalizeId(j||de),q(this,j),this._schemas[j]=this._addSchema(F,Z,ne,!0),this}function _(F,j,Z){return this.addSchema(F,j,Z,!0),this}function C(F,j){var Z=F.$schema;if(Z!==void 0&&typeof Z!="string")throw new Error("$schema must be a string");if(Z=Z||this._opts.defaultMeta||N(this),!Z)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var ne=this.validate(Z,F);if(!ne&&j){var V="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(V);else throw new Error(V)}return ne}function N(F){var j=F._opts.meta;return F._opts.defaultMeta=typeof j=="object"?F._getId(j)||j:F.getSchema(h)?h:void 0,F._opts.defaultMeta}function k(F){var j=I(this,F);switch(typeof j){case"object":return j.validate||this._compile(j);case"string":return this.getSchema(j);case"undefined":return A(this,F)}}function A(F,j){var Z=e.schema.call(F,{schema:{}},j);if(Z){var ne=Z.schema,V=Z.root,de=Z.baseId,fe=t.call(F,ne,V,void 0,de);return F._fragments[j]=new n({ref:j,fragment:!0,schema:ne,root:V,baseId:de,validate:fe}),fe}}function I(F,j){return j=e.normalizeId(j),F._schemas[j]||F._refs[j]||F._fragments[j]}function O(F){if(F instanceof RegExp)return L(this,this._schemas,F),L(this,this._refs,F),this;switch(typeof F){case"undefined":return L(this,this._schemas),L(this,this._refs),this._cache.clear(),this;case"string":var j=I(this,F);return j&&this._cache.del(j.cacheKey),delete this._schemas[F],delete this._refs[F],this;case"object":var Z=this._opts.serialize,ne=Z?Z(F):F;this._cache.del(ne);var V=this._getId(F);V&&(V=e.normalizeId(V),delete this._schemas[V],delete this._refs[V])}return this}function L(F,j,Z){for(var ne in j){var V=j[ne];!V.meta&&(!Z||Z.test(ne))&&(F._cache.del(V.cacheKey),delete j[ne])}}function M(F,j,Z,ne){if(typeof F!="object"&&typeof F!="boolean")throw new Error("schema should be object or boolean");var V=this._opts.serialize,de=V?V(F):F,fe=this._cache.get(de);if(fe)return fe;ne=ne||this._opts.addUsedSchema!==!1;var Re=e.normalizeId(this._getId(F));Re&&ne&&q(this,Re);var be=this._opts.validateSchema!==!1&&!j,xe;be&&!(xe=Re&&Re==e.normalizeId(F.$schema))&&this.validateSchema(F,!0);var Ne=e.ids.call(this,F),ze=new n({id:Re,schema:F,localRefs:Ne,cacheKey:de,meta:Z});return Re[0]!="#"&&ne&&(this._refs[Re]=ze),this._cache.put(de,ze),be&&xe&&this.validateSchema(F,!0),ze}function P(F,j){if(F.compiling)return F.validate=V,V.schema=F.schema,V.errors=null,V.root=j||V,F.schema.$async===!0&&(V.$async=!0),V;F.compiling=!0;var Z;F.meta&&(Z=this._opts,this._opts=this._metaOpts);var ne;try{ne=t.call(this,F.schema,j,F.localRefs)}catch(de){throw delete F.validate,de}finally{F.compiling=!1,F.meta&&(this._opts=Z)}return F.validate=ne,F.refs=ne.refs,F.refVal=ne.refVal,F.root=ne.root,ne;function V(){var de=F.validate,fe=de.apply(this,arguments);return V.errors=de.errors,fe}}function Y(F){switch(F.schemaId){case"auto":return ee;case"id":return Q;default:return J}}function Q(F){return F.$id&&this.logger.warn("schema $id ignored",F.$id),F.id}function J(F){return F.id&&this.logger.warn("schema id ignored",F.id),F.$id}function ee(F){if(F.$id&&F.id&&F.$id!=F.id)throw new Error("schema $id is different from id");return F.$id||F.id}function U(F,j){if(F=F||this.errors,!F)return"No errors";j=j||{};for(var Z=j.separator===void 0?", ":j.separator,ne=j.dataVar===void 0?"data":j.dataVar,V="",de=0;de<F.length;de++){var fe=F[de];fe&&(V+=ne+fe.dataPath+" "+fe.message+Z)}return V.slice(0,-Z.length)}function G(F,j){return typeof j=="string"&&(j=new RegExp(j)),this._formats[F]=j,this}function H(F){var j;if(F._opts.$data&&(j=W8,F.addMetaSchema(j,j.$id,!0)),F._opts.meta!==!1){var Z=j2;F._opts.$data&&(Z=c(Z,y)),F.addMetaSchema(Z,h,!0),F._refs["http://json-schema.org/schema"]=h}}function X(F){var j=F._opts.schemas;if(j)if(Array.isArray(j))F.addSchema(j);else for(var Z in j)F.addSchema(j[Z],Z)}function ae(F){for(var j in F._opts.formats){var Z=F._opts.formats[j];F.addFormat(j,Z)}}function z(F){for(var j in F._opts.keywords){var Z=F._opts.keywords[j];F.addKeyword(j,Z)}}function q(F,j){if(F._schemas[j]||F._refs[j])throw new Error('schema with key or id "'+j+'" already exists')}function $(F){for(var j=d.copy(F._opts),Z=0;Z<v.length;Z++)delete j[v[Z]];return j}function W(F){var j=F._opts.logger;if(j===!1)F.logger={log:te,warn:te,error:te};else{if(j===void 0&&(j=console),!(typeof j=="object"&&j.log&&j.warn&&j.error))throw new Error("logger must implement log, warn and error methods");F.logger=j}}function te(){}return Cb}var K8=Y8();const Z8=fc(K8);class WI extends J9{constructor(e,r){var n;super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._capabilities=(n=r?.capabilities)!==null&&n!==void 0?n:{},this._ajv=new Z8}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=e8(this._capabilities,e)}assertCapability(e,r){var n;if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n[e]))throw new Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),e.sessionId===void 0)try{const n=await this.request({method:"initialize",params:{protocolVersion:Pm,capabilities:this._capabilities,clientInfo:this._clientInfo}},y2,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!e9.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:"notifications/initialized"})}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){var r,n,a,s,l;switch(e){case"logging/setLevel":if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r.logging))throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n.prompts))throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(!((a=this._serverCapabilities)===null||a===void 0)&&a.resources))throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!(!((s=this._serverCapabilities)===null||s===void 0)&&s.tools))throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!(!((l=this._serverCapabilities)===null||l===void 0)&&l.completions))throw new Error(`Server does not support completions (required for ${e})`);break}}assertNotificationCapability(e){var r;switch(e){case"notifications/roots/list_changed":if(!(!((r=this._capabilities.roots)===null||r===void 0)&&r.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break}}async ping(e){return this.request({method:"ping"},Al,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},D2,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},Al,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},k2,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},A2,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},T2,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},R2,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},C2,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},Al,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},Al,r)}async callTool(e,r=rR,n){const a=await this.request({method:"tools/call",params:e},r,n),s=this.getToolOutputValidator(e.name);if(s){if(!a.structuredContent&&!a.isError)throw new Si(Oa.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(a.structuredContent)try{if(!s(a.structuredContent))throw new Si(Oa.InvalidParams,`Structured content does not match the tool's output schema: ${this._ajv.errorsText(s.errors)}`)}catch(l){throw l instanceof Si?l:new Si(Oa.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)}}return a}cacheToolOutputSchemas(e){this._cachedToolOutputValidators.clear();for(const r of e)if(r.outputSchema)try{const n=this._ajv.compile(r.outputSchema);this._cachedToolOutputValidators.set(r.name,n)}catch{}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){const n=await this.request({method:"tools/list",params:e},I2,r);return this.cacheToolOutputSchemas(n.tools),n}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}let iR;iR=globalThis.crypto;async function X8(t){return(await iR).getRandomValues(new Uint8Array(t))}async function Q8(t){const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";let r="";const n=await X8(t);for(let a=0;a<t;a++){const s=n[a]%e.length;r+=e[s]}return r}async function J8(t){return await Q8(t)}async function eW(t){const e=await(await iR).subtle.digest("SHA-256",new TextEncoder().encode(t));return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function tW(t){if(t||(t=43),t<43||t>128)throw`Expected a length between 43 and 128. Received ${t}.`;const e=await J8(t),r=await eW(e);return{code_verifier:e,code_challenge:r}}const Pr=ve().url().superRefine((t,e)=>{if(!URL.canParse(t))return e.addIssue({code:ke.custom,message:"URL must be parseable",fatal:!0}),J6}).refine(t=>{const e=new URL(t);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),rW=Pe({resource:ve().url(),authorization_servers:Ye(Pr).optional(),jwks_uri:ve().url().optional(),scopes_supported:Ye(ve()).optional(),bearer_methods_supported:Ye(ve()).optional(),resource_signing_alg_values_supported:Ye(ve()).optional(),resource_name:ve().optional(),resource_documentation:ve().optional(),resource_policy_uri:ve().url().optional(),resource_tos_uri:ve().url().optional(),tls_client_certificate_bound_access_tokens:Dr().optional(),authorization_details_types_supported:Ye(ve()).optional(),dpop_signing_alg_values_supported:Ye(ve()).optional(),dpop_bound_access_tokens_required:Dr().optional()}).passthrough(),U2=Pe({issuer:ve(),authorization_endpoint:Pr,token_endpoint:Pr,registration_endpoint:Pr.optional(),scopes_supported:Ye(ve()).optional(),response_types_supported:Ye(ve()),response_modes_supported:Ye(ve()).optional(),grant_types_supported:Ye(ve()).optional(),token_endpoint_auth_methods_supported:Ye(ve()).optional(),token_endpoint_auth_signing_alg_values_supported:Ye(ve()).optional(),service_documentation:Pr.optional(),revocation_endpoint:Pr.optional(),revocation_endpoint_auth_methods_supported:Ye(ve()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ye(ve()).optional(),introspection_endpoint:ve().optional(),introspection_endpoint_auth_methods_supported:Ye(ve()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ye(ve()).optional(),code_challenge_methods_supported:Ye(ve()).optional()}).passthrough(),nW=Pe({issuer:ve(),authorization_endpoint:Pr,token_endpoint:Pr,userinfo_endpoint:Pr.optional(),jwks_uri:Pr,registration_endpoint:Pr.optional(),scopes_supported:Ye(ve()).optional(),response_types_supported:Ye(ve()),response_modes_supported:Ye(ve()).optional(),grant_types_supported:Ye(ve()).optional(),acr_values_supported:Ye(ve()).optional(),subject_types_supported:Ye(ve()),id_token_signing_alg_values_supported:Ye(ve()),id_token_encryption_alg_values_supported:Ye(ve()).optional(),id_token_encryption_enc_values_supported:Ye(ve()).optional(),userinfo_signing_alg_values_supported:Ye(ve()).optional(),userinfo_encryption_alg_values_supported:Ye(ve()).optional(),userinfo_encryption_enc_values_supported:Ye(ve()).optional(),request_object_signing_alg_values_supported:Ye(ve()).optional(),request_object_encryption_alg_values_supported:Ye(ve()).optional(),request_object_encryption_enc_values_supported:Ye(ve()).optional(),token_endpoint_auth_methods_supported:Ye(ve()).optional(),token_endpoint_auth_signing_alg_values_supported:Ye(ve()).optional(),display_values_supported:Ye(ve()).optional(),claim_types_supported:Ye(ve()).optional(),claims_supported:Ye(ve()).optional(),service_documentation:ve().optional(),claims_locales_supported:Ye(ve()).optional(),ui_locales_supported:Ye(ve()).optional(),claims_parameter_supported:Dr().optional(),request_parameter_supported:Dr().optional(),request_uri_parameter_supported:Dr().optional(),require_request_uri_registration:Dr().optional(),op_policy_uri:Pr.optional(),op_tos_uri:Pr.optional()}).passthrough(),aW=nW.merge(U2.pick({code_challenge_methods_supported:!0})),F2=Pe({access_token:ve(),id_token:ve().optional(),token_type:ve(),expires_in:$r().optional(),scope:ve().optional(),refresh_token:ve().optional()}).strip(),oW=Pe({error:ve(),error_description:ve().optional(),error_uri:ve().optional()}),iW=Pe({redirect_uris:Ye(Pr),token_endpoint_auth_method:ve().optional(),grant_types:Ye(ve()).optional(),response_types:Ye(ve()).optional(),client_name:ve().optional(),client_uri:Pr.optional(),logo_uri:Pr.optional(),scope:ve().optional(),contacts:Ye(ve()).optional(),tos_uri:Pr.optional(),policy_uri:ve().optional(),jwks_uri:Pr.optional(),jwks:X6().optional(),software_id:ve().optional(),software_version:ve().optional(),software_statement:ve().optional()}).strip(),sW=Pe({client_id:ve(),client_secret:ve().optional(),client_id_issued_at:$r().optional(),client_secret_expires_at:$r().optional()}).strip(),lW=iW.merge(sW);Pe({error:ve(),error_description:ve().optional()}).strip();Pe({token:ve(),token_type_hint:ve().optional()}).strip();function cW(t){const e=typeof t=="string"?new URL(t):new URL(t.href);return e.hash="",e}function uW({requestedResource:t,configuredResource:e}){const r=typeof t=="string"?new URL(t):new URL(t.href),n=typeof e=="string"?new URL(e):new URL(e.href);if(r.origin!==n.origin||r.pathname.length<n.pathname.length)return!1;const a=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",s=n.pathname.endsWith("/")?n.pathname:n.pathname+"/";return a.startsWith(s)}class Qr extends Error{constructor(e,r){super(e),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){const e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}}class __ extends Qr{}__.errorCode="invalid_request";class dm extends Qr{}dm.errorCode="invalid_client";class fm extends Qr{}fm.errorCode="invalid_grant";class pm extends Qr{}pm.errorCode="unauthorized_client";class T_ extends Qr{}T_.errorCode="unsupported_grant_type";class R_ extends Qr{}R_.errorCode="invalid_scope";class C_ extends Qr{}C_.errorCode="access_denied";class nc extends Qr{}nc.errorCode="server_error";class A_ extends Qr{}A_.errorCode="temporarily_unavailable";class N_ extends Qr{}N_.errorCode="unsupported_response_type";class k_ extends Qr{}k_.errorCode="unsupported_token_type";class I_ extends Qr{}I_.errorCode="invalid_token";class O_ extends Qr{}O_.errorCode="method_not_allowed";class D_ extends Qr{}D_.errorCode="too_many_requests";class L_ extends Qr{}L_.errorCode="invalid_client_metadata";class M_ extends Qr{}M_.errorCode="insufficient_scope";const dW={[__.errorCode]:__,[dm.errorCode]:dm,[fm.errorCode]:fm,[pm.errorCode]:pm,[T_.errorCode]:T_,[R_.errorCode]:R_,[C_.errorCode]:C_,[nc.errorCode]:nc,[A_.errorCode]:A_,[N_.errorCode]:N_,[k_.errorCode]:k_,[I_.errorCode]:I_,[O_.errorCode]:O_,[D_.errorCode]:D_,[L_.errorCode]:L_,[M_.errorCode]:M_};class Da extends Error{constructor(e){super(e??"Unauthorized")}}const Ab="code",Nb="S256";function z2(t,e){const r=t.client_secret!==void 0;return e.length===0?r?"client_secret_post":"none":r&&e.includes("client_secret_basic")?"client_secret_basic":r&&e.includes("client_secret_post")?"client_secret_post":e.includes("none")?"none":r?"client_secret_post":"none"}function $2(t,e,r,n){const{client_id:a,client_secret:s}=e;switch(t){case"client_secret_basic":fW(a,s,r);return;case"client_secret_post":pW(a,s,n);return;case"none":mW(a,n);return;default:throw new Error(`Unsupported client authentication method: ${t}`)}}function fW(t,e,r){if(!e)throw new Error("client_secret_basic authentication requires a client_secret");const n=btoa(`${t}:${e}`);r.set("Authorization",`Basic ${n}`)}function pW(t,e,r){r.set("client_id",t),e&&r.set("client_secret",e)}function mW(t,e){e.set("client_id",t)}async function sR(t){const e=t instanceof Response?t.status:void 0,r=t instanceof Response?await t.text():t;try{const n=oW.parse(JSON.parse(r)),{error:a,error_description:s,error_uri:l}=n,c=dW[a]||nc;return new c(s||"",l)}catch(n){const a=`${e?`HTTP ${e}: `:""}Invalid OAuth error response: ${n}. Raw body: ${r}`;return new nc(a)}}async function ps(t,e){var r,n;try{return await kb(t,e)}catch(a){if(a instanceof dm||a instanceof pm)return await((r=t.invalidateCredentials)===null||r===void 0?void 0:r.call(t,"all")),await kb(t,e);if(a instanceof fm)return await((n=t.invalidateCredentials)===null||n===void 0?void 0:n.call(t,"tokens")),await kb(t,e);throw a}}async function kb(t,{serverUrl:e,authorizationCode:r,scope:n,resourceMetadataUrl:a,fetchFn:s}){let l,c;try{l=await gW(e,{resourceMetadataUrl:a},s),l.authorization_servers&&l.authorization_servers.length>0&&(c=l.authorization_servers[0])}catch{}c||(c=e);const d=await hW(e,t,l),f=await SW(c,{fetchFn:s});let m=await Promise.resolve(t.clientInformation());if(!m){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");if(!t.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await TW(c,{metadata:f,clientMetadata:t.clientMetadata,fetchFn:s});await t.saveClientInformation(S),m=S}if(r!==void 0){const S=await t.codeVerifier(),R=await wW(c,{metadata:f,clientInformation:m,authorizationCode:r,codeVerifier:S,redirectUri:t.redirectUrl,resource:d,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(R),"AUTHORIZED"}const h=await t.tokens();if(h?.refresh_token)try{const S=await _W(c,{metadata:f,clientInformation:m,refreshToken:h.refresh_token,resource:d,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(S),"AUTHORIZED"}catch(S){if(!(!(S instanceof Qr)||S instanceof nc))throw S}const v=t.state?await t.state():void 0,{authorizationUrl:y,codeVerifier:w}=await xW(c,{metadata:f,clientInformation:m,state:v,redirectUrl:t.redirectUrl,scope:n||t.clientMetadata.scope,resource:d});return await t.saveCodeVerifier(w),await t.redirectToAuthorization(y),"REDIRECT"}async function hW(t,e,r){const n=cW(t);if(e.validateResourceURL)return await e.validateResourceURL(n,r?.resource);if(r){if(!uW({requestedResource:n,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${n} (or origin)`);return new URL(r.resource)}}function P_(t){const e=t.headers.get("WWW-Authenticate");if(!e)return;const[r,n]=e.split(" ");if(r.toLowerCase()!=="bearer"||!n)return;const s=/resource_metadata="([^"]*)"/.exec(e);if(s)try{return new URL(s[1])}catch{return}}async function gW(t,e,r=fetch){const n=await yW(t,"oauth-protected-resource",r,{protocolVersion:e?.protocolVersion,metadataUrl:e?.resourceMetadataUrl});if(!n||n.status===404)throw new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!n.ok)throw new Error(`HTTP ${n.status} trying to load well-known OAuth protected resource metadata.`);return rW.parse(await n.json())}async function lR(t,e,r=fetch){try{return await r(t,{headers:e})}catch(n){if(n instanceof TypeError)return e?lR(t,void 0,r):void 0;throw n}}function vW(t,e="",r={}){return e.endsWith("/")&&(e=e.slice(0,-1)),r.prependPathname?`${e}/.well-known/${t}`:`/.well-known/${t}${e}`}async function YI(t,e,r=fetch){return await lR(t,{"MCP-Protocol-Version":e},r)}function bW(t,e){return!t||t.status>=400&&t.status<500&&e!=="/"}async function yW(t,e,r,n){var a,s;const l=new URL(t),c=(a=n?.protocolVersion)!==null&&a!==void 0?a:Pm;let d;if(n?.metadataUrl)d=new URL(n.metadataUrl);else{const m=vW(e,l.pathname);d=new URL(m,(s=n?.metadataServerUrl)!==null&&s!==void 0?s:l),d.search=l.search}let f=await YI(d,c,r);if(!n?.metadataUrl&&bW(f,l.pathname)){const m=new URL(`/.well-known/${e}`,l);f=await YI(m,c,r)}return f}function EW(t){const e=typeof t=="string"?new URL(t):t,r=e.pathname!=="/",n=[];if(!r)return n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/openid-configuration",e.origin),type:"oidc"}),n;let a=e.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),n.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL(`/.well-known/openid-configuration${a}`,e.origin),type:"oidc"}),n.push({url:new URL(`${a}/.well-known/openid-configuration`,e.origin),type:"oidc"}),n}async function SW(t,{fetchFn:e=fetch,protocolVersion:r=Pm}={}){const n={"MCP-Protocol-Version":r},a=EW(t);for(const{url:s,type:l}of a){const c=await lR(s,n,e);if(c){if(!c.ok){if(c.status>=400&&c.status<500)continue;throw new Error(`HTTP ${c.status} trying to load ${l==="oauth"?"OAuth":"OpenID provider"} metadata from ${s}`)}return l==="oauth"?U2.parse(await c.json()):aW.parse(await c.json())}}}async function xW(t,{metadata:e,clientInformation:r,redirectUrl:n,scope:a,state:s,resource:l}){let c;if(e){if(c=new URL(e.authorization_endpoint),!e.response_types_supported.includes(Ab))throw new Error(`Incompatible auth server: does not support response type ${Ab}`);if(e.code_challenge_methods_supported&&!e.code_challenge_methods_supported.includes(Nb))throw new Error(`Incompatible auth server: does not support code challenge method ${Nb}`)}else c=new URL("/authorize",t);const d=await tW(),f=d.code_verifier,m=d.code_challenge;return c.searchParams.set("response_type",Ab),c.searchParams.set("client_id",r.client_id),c.searchParams.set("code_challenge",m),c.searchParams.set("code_challenge_method",Nb),c.searchParams.set("redirect_uri",String(n)),s&&c.searchParams.set("state",s),a&&c.searchParams.set("scope",a),a?.includes("offline_access")&&c.searchParams.append("prompt","consent"),l&&c.searchParams.set("resource",l.href),{authorizationUrl:c,codeVerifier:f}}async function wW(t,{metadata:e,clientInformation:r,authorizationCode:n,codeVerifier:a,redirectUri:s,resource:l,addClientAuthentication:c,fetchFn:d}){var f;const m="authorization_code",h=e?.token_endpoint?new URL(e.token_endpoint):new URL("/token",t);if(e?.grant_types_supported&&!e.grant_types_supported.includes(m))throw new Error(`Incompatible auth server: does not support grant type ${m}`);const v=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}),y=new URLSearchParams({grant_type:m,code:n,code_verifier:a,redirect_uri:String(s)});if(c)c(v,y,t,e);else{const S=(f=e?.token_endpoint_auth_methods_supported)!==null&&f!==void 0?f:[],R=z2(r,S);$2(R,r,v,y)}l&&y.set("resource",l.href);const w=await(d??fetch)(h,{method:"POST",headers:v,body:y});if(!w.ok)throw await sR(w);return F2.parse(await w.json())}async function _W(t,{metadata:e,clientInformation:r,refreshToken:n,resource:a,addClientAuthentication:s,fetchFn:l}){var c;const d="refresh_token";let f;if(e){if(f=new URL(e.token_endpoint),e.grant_types_supported&&!e.grant_types_supported.includes(d))throw new Error(`Incompatible auth server: does not support grant type ${d}`)}else f=new URL("/token",t);const m=new Headers({"Content-Type":"application/x-www-form-urlencoded"}),h=new URLSearchParams({grant_type:d,refresh_token:n});if(s)s(m,h,t,e);else{const y=(c=e?.token_endpoint_auth_methods_supported)!==null&&c!==void 0?c:[],w=z2(r,y);$2(w,r,m,h)}a&&h.set("resource",a.href);const v=await(l??fetch)(f,{method:"POST",headers:m,body:h});if(!v.ok)throw await sR(v);return F2.parse({refresh_token:n,...await v.json()})}async function TW(t,{metadata:e,clientMetadata:r,fetchFn:n}){let a;if(e){if(!e.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");a=new URL(e.registration_endpoint)}else a=new URL("/register",t);const s=await(n??fetch)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok)throw await sR(s);return lW.parse(await s.json())}class KI extends Error{constructor(e,r){super(e),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}function Ib(t){}function B2(t){if(typeof t=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:e=Ib,onError:r=Ib,onRetry:n=Ib,onComment:a}=t;let s="",l=!0,c,d="",f="";function m(S){const R=l?S.replace(/^\xEF\xBB\xBF/,""):S,[x,_]=RW(`${s}${R}`);for(const C of x)h(C);s=_,l=!1}function h(S){if(S===""){y();return}if(S.startsWith(":")){a&&a(S.slice(S.startsWith(": ")?2:1));return}const R=S.indexOf(":");if(R!==-1){const x=S.slice(0,R),_=S[R+1]===" "?2:1,C=S.slice(R+_);v(x,C,S);return}v(S,"",S)}function v(S,R,x){switch(S){case"event":f=R;break;case"data":d=`${d}${R}
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/winston-Bm6DJeE8.js","assets/__vite-browser-external-DFygW7-s.js","assets/index-DRz5BQNA.js","assets/path-C9FudP8b.js","assets/index-CCjf56iV.js","assets/index-DrA_ypHv.js","assets/chunk-VL2OQCWN-Dt6nIRbO.js","assets/embeddings-Cb1HC3IA.js","assets/index-DdIIPMyF.js","assets/index-BYtBsAG_.js","assets/langfuse-C4HKZ3NL-W8CMIBGE.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var b6=Object.defineProperty;var y6=(t,e,r)=>e in t?b6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var cp=(t,e,r)=>y6(t,typeof e!="symbol"?e+"":e,r);function E6(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in t)){const s=Object.getOwnPropertyDescriptor(n,a);s&&Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function r(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(a){if(a.ep)return;a.ep=!0;const s=r(a);fetch(a.href,s)}})();function fc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pEe(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){var a=!1;try{a=this instanceof n}catch{}return a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return t[n]}})}),r}var jv={exports:{}},gu={};var zk;function S6(){if(zk)return gu;zk=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,a,s){var l=null;if(s!==void 0&&(l=""+s),a.key!==void 0&&(l=""+a.key),"key"in a){s={};for(var c in a)c!=="key"&&(s[c]=a[c])}else s=a;return a=s.ref,{$$typeof:t,type:n,key:l,ref:a!==void 0?a:null,props:s}}return gu.Fragment=e,gu.jsx=r,gu.jsxs=r,gu}var $k;function x6(){return $k||($k=1,jv.exports=S6()),jv.exports}var g=x6();const w6="modulepreload",_6=function(t){return"/inspector/"+t},Bk={},cs=function(e,r,n){let a=Promise.resolve();if(r&&r.length>0){let d=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");a=d(r.map(f=>{if(f=_6(f),f in Bk)return;Bk[f]=!0;const m=f.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${h}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":w6,m||(v.as="script"),v.crossOrigin="",v.href=f,c&&v.setAttribute("nonce",c),document.head.appendChild(v),m)return new Promise((y,w)=>{v.addEventListener("load",y),v.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return a.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return e().catch(s)})};var T6=Object.defineProperty,Ze=(t,e)=>T6(t,"name",{value:e,configurable:!0}),qk=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),vl={};async function n2(){if(typeof process<"u")try{const t=await cs(()=>import("./__vite-browser-external-DFygW7-s.js").then(r=>r.o),[]),e=await cs(()=>import("./path-C9FudP8b.js").then(r=>r.p),[]);return{fs:t.default,path:e.default}}catch{return{fs:null,path:null}}return{fs:null,path:null}}Ze(n2,"getNodeModules");var Pn=null;function a2(){if(typeof qk<"u")try{Pn=qk("winston")}catch{}}Ze(a2,"loadWinstonSync");async function o2(){return Pn||(Pn=await cs(()=>import("./winston-Bm6DJeE8.js").then(t=>t.w),__vite__mapDeps([0,1,2,3]))),Pn}Ze(o2,"getWinston");var g_="mcp-use";function Jp(){try{return typeof navigator<"u"&&navigator.userAgent?.includes("Cloudflare-Workers")||typeof globalThis.EdgeRuntime<"u"||typeof globalThis.Deno<"u"?!1:typeof process<"u"&&!0&&typeof __dirname<"u"}catch{return!1}}Ze(Jp,"isNodeJSEnvironment");var Hl,R6=(Hl=class{_level;name;constructor(e=g_,r="info"){this.name=e,this._level=r}shouldLog(e){const r=["error","warn","info","http","verbose","debug","silly"],n=r.indexOf(this._level);return r.indexOf(e)<=n}formatMessage(e,r){return`${new Date().toLocaleTimeString("en-US",{hour12:!1})} [${this.name}] ${e}: ${r}`}error(e){this.shouldLog("error")&&console.error(this.formatMessage("error",e))}warn(e){this.shouldLog("warn")&&console.warn(this.formatMessage("warn",e))}info(e){this.shouldLog("info")&&console.info(this.formatMessage("info",e))}debug(e){this.shouldLog("debug")&&console.debug(this.formatMessage("debug",e))}http(e){this.shouldLog("http")&&console.log(this.formatMessage("http",e))}verbose(e){this.shouldLog("verbose")&&console.log(this.formatMessage("verbose",e))}silly(e){this.shouldLog("silly")&&console.log(this.formatMessage("silly",e))}get level(){return this._level}set level(e){this._level=e}},Ze(Hl,"SimpleConsoleLogger"),Hl);function kp(t){switch((typeof process<"u"&&vl?t:void 0)?.trim()){case"2":return"debug";case"1":return"info";default:return"info"}}Ze(kp,"resolveLevel");var wo,i2=(wo=class{static get(e=g_){if(!Jp()){if(!this.simpleInstances[e]){const r=typeof process<"u"&&vl?.DEBUG||void 0;this.simpleInstances[e]=new R6(e,kp(r))}return this.simpleInstances[e]}if(!this.instances[e]){if(!Pn)throw new Error("Winston not loaded - call Logger.configure() first");const{createLogger:r,format:n}=Pn,{combine:a,timestamp:s,label:l,colorize:c,splat:d}=n;this.instances[e]=r({level:kp(vl.DEBUG),format:a(c(),d(),l({label:e}),s({format:"HH:mm:ss"}),this.getFormatter()),transports:[]})}return this.instances[e]}static getFormatter(){if(!Pn)throw new Error("Winston not loaded");const{format:e}=Pn,{printf:r}=e,n=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l}: ${c}`),a=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l.toUpperCase()}: ${c}`),s=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l.toUpperCase()}: ${c}`);switch(this.currentFormat){case"minimal":return n;case"detailed":return a;case"emoji":return s;default:return n}}static async configure(e={}){const{level:r,console:n=!0,file:a,format:s="minimal"}=e,l=typeof process<"u"&&vl?.DEBUG||void 0,c=r??kp(l);if(this.currentFormat=s,!Jp()){Object.values(this.simpleInstances).forEach(R=>{R.level=c});return}if(await o2(),!Pn)throw new Error("Failed to load winston");const d=this.get();d.level=c;const f=d;if(f.clear(),n&&f.add(new Pn.transports.Console),a){const{fs:R,path:x}=await n2();if(R&&x){const _=x.dirname(x.resolve(a));R.existsSync(_)||R.mkdirSync(_,{recursive:!0}),f.add(new Pn.transports.File({filename:a}))}}const{format:m}=Pn,{combine:h,timestamp:v,label:y,colorize:w,splat:S}=m;Object.values(this.instances).forEach(R=>{R&&"format"in R&&(R.level=c,R.format=h(w(),S(),y({label:g_}),v({format:"HH:mm:ss"}),this.getFormatter()))})}static setDebug(e){let r;e===2||e===!0?r="debug":r="info",Object.values(this.simpleInstances).forEach(n=>{n.level=r}),Object.values(this.instances).forEach(n=>{n&&(n.level=r)}),typeof process<"u"&&vl&&(vl.DEBUG=e?e===!0?"2":String(e):"0")}static setFormat(e){this.currentFormat=e,this.configure({format:e})}},Ze(wo,"Logger"),cp(wo,"instances",{}),cp(wo,"simpleInstances",{}),cp(wo,"currentFormat","minimal"),wo);Jp()&&(a2(),Pn&&i2.configure());var Le=i2.get(),At;(function(t){t.assertEqual=a=>{};function e(a){}t.assertIs=e;function r(a){throw new Error}t.assertNever=r,t.arrayToEnum=a=>{const s={};for(const l of a)s[l]=l;return s},t.getValidEnumValues=a=>{const s=t.objectKeys(a).filter(c=>typeof a[a[c]]!="number"),l={};for(const c of s)l[c]=a[c];return t.objectValues(l)},t.objectValues=a=>t.objectKeys(a).map(function(s){return a[s]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&s.push(l);return s},t.find=(a,s)=>{for(const l of a)if(s(l))return l},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,s=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(At||(At={}));var Hk;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Hk||(Hk={}));const qe=At.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vi=t=>{switch(typeof t){case"undefined":return qe.undefined;case"string":return qe.string;case"number":return Number.isNaN(t)?qe.nan:qe.number;case"boolean":return qe.boolean;case"function":return qe.function;case"bigint":return qe.bigint;case"symbol":return qe.symbol;case"object":return Array.isArray(t)?qe.array:t===null?qe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?qe.promise:typeof Map<"u"&&t instanceof Map?qe.map:typeof Set<"u"&&t instanceof Set?qe.set:typeof Date<"u"&&t instanceof Date?qe.date:qe.object;default:return qe.unknown}},ke=At.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class na extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(s){return s.message},n={_errors:[]},a=s=>{for(const l of s.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)n._errors.push(r(l));else{let c=n,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(r(l))):c[f]=c[f]||{_errors:[]},c=c[f],d++}}};return a(this),n}static assert(e){if(!(e instanceof na))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,At.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const a of this.issues)if(a.path.length>0){const s=a.path[0];r[s]=r[s]||[],r[s].push(e(a))}else n.push(e(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}na.create=t=>new na(t);const ed=(t,e)=>{let r;switch(t.code){case ke.invalid_type:t.received===qe.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case ke.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,At.jsonStringifyReplacer)}`;break;case ke.unrecognized_keys:r=`Unrecognized key(s) in object: ${At.joinValues(t.keys,", ")}`;break;case ke.invalid_union:r="Invalid input";break;case ke.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${At.joinValues(t.options)}`;break;case ke.invalid_enum_value:r=`Invalid enum value. Expected ${At.joinValues(t.options)}, received '${t.received}'`;break;case ke.invalid_arguments:r="Invalid function arguments";break;case ke.invalid_return_type:r="Invalid function return type";break;case ke.invalid_date:r="Invalid date";break;case ke.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:At.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case ke.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case ke.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case ke.custom:r="Invalid input";break;case ke.invalid_intersection_types:r="Intersection results could not be merged";break;case ke.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ke.not_finite:r="Number must be finite";break;default:r=e.defaultError,At.assertNever(t)}return{message:r}};let C6=ed;function v_(){return C6}const b_=t=>{const{data:e,path:r,errorMaps:n,issueData:a}=t,s=[...r,...a.path||[]],l={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let c="";const d=n.filter(f=>!!f).slice().reverse();for(const f of d)c=f(l,{data:e,defaultError:c}).message;return{...a,path:s,message:c}};function Ue(t,e){const r=v_(),n=b_({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===ed?void 0:ed].filter(a=>!!a)});t.common.issues.push(n)}class un{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const a of r){if(a.status==="aborted")return nt;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const a of r){const s=await a.key,l=await a.value;n.push({key:s,value:l})}return un.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const a of r){const{key:s,value:l}=a;if(s.status==="aborted"||l.status==="aborted")return nt;s.status==="dirty"&&e.dirty(),l.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(n[s.value]=l.value)}return{status:e.value,value:n}}}const nt=Object.freeze({status:"aborted"}),_u=t=>({status:"dirty",value:t}),_n=t=>({status:"valid",value:t}),Vk=t=>t.status==="aborted",Gk=t=>t.status==="dirty",tc=t=>t.status==="valid",em=t=>typeof Promise<"u"&&t instanceof Promise;var Xe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Xe||(Xe={}));class Ba{constructor(e,r,n,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Wk=(t,e)=>{if(tc(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new na(t.common.issues);return this._error=r,this._error}}};function ft(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:a}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(l,c)=>{const{message:d}=t;return l.code==="invalid_enum_value"?{message:d??c.defaultError}:typeof c.data>"u"?{message:d??n??c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:d??r??c.defaultError}},description:a}}class wt{get description(){return this._def.description}_getType(e){return vi(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:vi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new un,ctx:{common:e.parent.common,data:e.data,parsedType:vi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(em(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vi(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Wk(n,a)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vi(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:r});return tc(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>tc(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vi(e)},a=this._parse({data:e,path:n.path,parent:n}),s=await(em(a)?a:Promise.resolve(a));return Wk(n,s)}refine(e,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,s)=>{const l=e(a),c=()=>s.addIssue({code:ke.custom,...n(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(c(),!1)):l?!0:(c(),!1)})}refinement(e,r){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(e){return new ys({schema:this,typeName:st.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ro.create(this,this._def)}nullable(){return Es.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ua.create(this)}promise(){return ad.create(this,this._def)}or(e){return am.create([this,e],this._def)}and(e){return om.create(this,e,this._def)}transform(e){return new ys({...ft(this._def),schema:this,typeName:st.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new lm({...ft(this._def),innerType:this,defaultValue:r,typeName:st.ZodDefault})}brand(){return new u2({typeName:st.ZodBranded,type:this,...ft(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new cm({...ft(this._def),innerType:this,catchValue:r,typeName:st.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return YT.create(this,e)}readonly(){return um.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const A6=/^c[^\s-]{8,}$/i,N6=/^[0-9a-z]+$/,k6=/^[0-9A-HJKMNP-TV-Z]{26}$/i,I6=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,O6=/^[a-z0-9_-]{21}$/i,D6=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,L6=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,M6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,P6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Uv;const j6=/^(?:(?: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])$/,U6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,F6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,z6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,B6=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,s2="((\\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])))",q6=new RegExp(`^${s2}$`);function l2(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function H6(t){return new RegExp(`^${l2(t)}$`)}function V6(t){let e=`${s2}T${l2(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function G6(t,e){return!!((e==="v4"||!e)&&j6.test(t)||(e==="v6"||!e)&&F6.test(t))}function W6(t,e){if(!D6.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function Y6(t,e){return!!((e==="v4"||!e)&&U6.test(t)||(e==="v6"||!e)&&z6.test(t))}class To extends wt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==qe.string){const s=this._getOrReturnCtx(e);return Ue(s,{code:ke.invalid_type,expected:qe.string,received:s.parsedType}),nt}const n=new un;let a;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const l=e.data.length>s.value,c=e.data.length<s.value;(l||c)&&(a=this._getOrReturnCtx(e,a),l?Ue(a,{code:ke.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):c&&Ue(a,{code:ke.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")M6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"email",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Uv||(Uv=new RegExp(P6,"u")),Uv.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"emoji",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")I6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"uuid",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")O6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"nanoid",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")A6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"cuid",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")N6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"cuid2",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")k6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"ulid",code:ke.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),Ue(a,{validation:"url",code:ke.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"regex",code:ke.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?V6(s).test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?q6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?H6(s).test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?L6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"duration",code:ke.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?G6(e.data,s.version)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"ip",code:ke.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?W6(e.data,s.alg)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"jwt",code:ke.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Y6(e.data,s.version)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"cidr",code:ke.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?$6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"base64",code:ke.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?B6.test(e.data)||(a=this._getOrReturnCtx(e,a),Ue(a,{validation:"base64url",code:ke.invalid_string,message:s.message}),n.dirty()):At.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(a=>e.test(a),{validation:r,code:ke.invalid_string,...Xe.errToObj(n)})}_addCheck(e){return new To({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Xe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Xe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Xe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Xe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Xe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Xe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Xe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Xe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Xe.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Xe.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Xe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Xe.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Xe.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Xe.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Xe.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Xe.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Xe.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...Xe.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Xe.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Xe.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Xe.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Xe.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Xe.errToObj(r)})}nonempty(e){return this.min(1,Xe.errToObj(e))}trim(){return new To({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new To({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new To({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}To.create=t=>new To({checks:[],typeName:st.ZodString,coerce:t?.coerce??!1,...ft(t)});function K6(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=r>n?r:n,s=Number.parseInt(t.toFixed(a).replace(".","")),l=Number.parseInt(e.toFixed(a).replace(".",""));return s%l/10**a}class rc extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==qe.number){const s=this._getOrReturnCtx(e);return Ue(s,{code:ke.invalid_type,expected:qe.number,received:s.parsedType}),nt}let n;const a=new un;for(const s of this._def.checks)s.kind==="int"?At.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?K6(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.not_finite,message:s.message}),a.dirty()):At.assertNever(s);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Xe.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Xe.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Xe.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Xe.toString(r))}setLimit(e,r,n,a){return new rc({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Xe.toString(a)}]})}_addCheck(e){return new rc({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Xe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Xe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Xe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Xe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Xe.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Xe.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Xe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Xe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Xe.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&At.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}rc.create=t=>new rc({checks:[],typeName:st.ZodNumber,coerce:t?.coerce||!1,...ft(t)});class td extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==qe.bigint)return this._getInvalidInput(e);let n;const a=new un;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),Ue(n,{code:ke.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):At.assertNever(s);return{status:a.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return Ue(r,{code:ke.invalid_type,expected:qe.bigint,received:r.parsedType}),nt}gte(e,r){return this.setLimit("min",e,!0,Xe.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Xe.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Xe.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Xe.toString(r))}setLimit(e,r,n,a){return new td({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Xe.toString(a)}]})}_addCheck(e){return new td({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Xe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Xe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Xe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Xe.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Xe.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}td.create=t=>new td({checks:[],typeName:st.ZodBigInt,coerce:t?.coerce??!1,...ft(t)});class y_ extends wt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==qe.boolean){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.boolean,received:n.parsedType}),nt}return _n(e.data)}}y_.create=t=>new y_({typeName:st.ZodBoolean,coerce:t?.coerce||!1,...ft(t)});class tm extends wt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==qe.date){const s=this._getOrReturnCtx(e);return Ue(s,{code:ke.invalid_type,expected:qe.date,received:s.parsedType}),nt}if(Number.isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return Ue(s,{code:ke.invalid_date}),nt}const n=new un;let a;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),Ue(a,{code:ke.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):At.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new tm({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Xe.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Xe.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}tm.create=t=>new tm({checks:[],coerce:t?.coerce||!1,typeName:st.ZodDate,...ft(t)});class Yk extends wt{_parse(e){if(this._getType(e)!==qe.symbol){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.symbol,received:n.parsedType}),nt}return _n(e.data)}}Yk.create=t=>new Yk({typeName:st.ZodSymbol,...ft(t)});class rm extends wt{_parse(e){if(this._getType(e)!==qe.undefined){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.undefined,received:n.parsedType}),nt}return _n(e.data)}}rm.create=t=>new rm({typeName:st.ZodUndefined,...ft(t)});class nm extends wt{_parse(e){if(this._getType(e)!==qe.null){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.null,received:n.parsedType}),nt}return _n(e.data)}}nm.create=t=>new nm({typeName:st.ZodNull,...ft(t)});class rd extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return _n(e.data)}}rd.create=t=>new rd({typeName:st.ZodAny,...ft(t)});class jl extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _n(e.data)}}jl.create=t=>new jl({typeName:st.ZodUnknown,...ft(t)});class wi extends wt{_parse(e){const r=this._getOrReturnCtx(e);return Ue(r,{code:ke.invalid_type,expected:qe.never,received:r.parsedType}),nt}}wi.create=t=>new wi({typeName:st.ZodNever,...ft(t)});class Kk extends wt{_parse(e){if(this._getType(e)!==qe.undefined){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.void,received:n.parsedType}),nt}return _n(e.data)}}Kk.create=t=>new Kk({typeName:st.ZodVoid,...ft(t)});class Ua extends wt{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),a=this._def;if(r.parsedType!==qe.array)return Ue(r,{code:ke.invalid_type,expected:qe.array,received:r.parsedType}),nt;if(a.exactLength!==null){const l=r.data.length>a.exactLength.value,c=r.data.length<a.exactLength.value;(l||c)&&(Ue(r,{code:l?ke.too_big:ke.too_small,minimum:c?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(Ue(r,{code:ke.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(Ue(r,{code:ke.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((l,c)=>a.type._parseAsync(new Ba(r,l,r.path,c)))).then(l=>un.mergeArray(n,l));const s=[...r.data].map((l,c)=>a.type._parseSync(new Ba(r,l,r.path,c)));return un.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Ua({...this._def,minLength:{value:e,message:Xe.toString(r)}})}max(e,r){return new Ua({...this._def,maxLength:{value:e,message:Xe.toString(r)}})}length(e,r){return new Ua({...this._def,exactLength:{value:e,message:Xe.toString(r)}})}nonempty(e){return this.min(1,e)}}Ua.create=(t,e)=>new Ua({type:t,minLength:null,maxLength:null,exactLength:null,typeName:st.ZodArray,...ft(e)});function bl(t){if(t instanceof Rr){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Ro.create(bl(n))}return new Rr({...t._def,shape:()=>e})}else return t instanceof Ua?new Ua({...t._def,type:bl(t.element)}):t instanceof Ro?Ro.create(bl(t.unwrap())):t instanceof Es?Es.create(bl(t.unwrap())):t instanceof Ao?Ao.create(t.items.map(e=>bl(e))):t}class Rr extends wt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=At.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==qe.object){const f=this._getOrReturnCtx(e);return Ue(f,{code:ke.invalid_type,expected:qe.object,received:f.parsedType}),nt}const{status:n,ctx:a}=this._processInputParams(e),{shape:s,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof wi&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||c.push(f);const d=[];for(const f of l){const m=s[f],h=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new Ba(a,h,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof wi){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of c)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")c.length>0&&(Ue(a,{code:ke.unrecognized_keys,keys:c}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of c){const h=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new Ba(a,h,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const h=await m.key,v=await m.value;f.push({key:h,value:v,alwaysSet:m.alwaysSet})}return f}).then(f=>un.mergeObjectSync(n,f)):un.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return Xe.errToObj,new Rr({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{const a=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Xe.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new Rr({...this._def,unknownKeys:"strip"})}passthrough(){return new Rr({...this._def,unknownKeys:"passthrough"})}extend(e){return new Rr({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Rr({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:st.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Rr({...this._def,catchall:e})}pick(e){const r={};for(const n of At.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Rr({...this._def,shape:()=>r})}omit(e){const r={};for(const n of At.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new Rr({...this._def,shape:()=>r})}deepPartial(){return bl(this)}partial(e){const r={};for(const n of At.objectKeys(this.shape)){const a=this.shape[n];e&&!e[n]?r[n]=a:r[n]=a.optional()}return new Rr({...this._def,shape:()=>r})}required(e){const r={};for(const n of At.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Ro;)s=s._def.innerType;r[n]=s}return new Rr({...this._def,shape:()=>r})}keyof(){return c2(At.objectKeys(this.shape))}}Rr.create=(t,e)=>new Rr({shape:()=>t,unknownKeys:"strip",catchall:wi.create(),typeName:st.ZodObject,...ft(e)});Rr.strictCreate=(t,e)=>new Rr({shape:()=>t,unknownKeys:"strict",catchall:wi.create(),typeName:st.ZodObject,...ft(e)});Rr.lazycreate=(t,e)=>new Rr({shape:t,unknownKeys:"strip",catchall:wi.create(),typeName:st.ZodObject,...ft(e)});class am extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function a(s){for(const c of s)if(c.result.status==="valid")return c.result;for(const c of s)if(c.result.status==="dirty")return r.common.issues.push(...c.ctx.common.issues),c.result;const l=s.map(c=>new na(c.ctx.common.issues));return Ue(r,{code:ke.invalid_union,unionErrors:l}),nt}if(r.common.async)return Promise.all(n.map(async s=>{const l={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:l}),ctx:l}})).then(a);{let s;const l=[];for(const d of n){const f={...r,common:{...r.common,issues:[]},parent:null},m=d._parseSync({data:r.data,path:r.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!s&&(s={result:m,ctx:f}),f.common.issues.length&&l.push(f.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const c=l.map(d=>new na(d));return Ue(r,{code:ke.invalid_union,unionErrors:c}),nt}}get options(){return this._def.options}}am.create=(t,e)=>new am({options:t,typeName:st.ZodUnion,...ft(e)});const Eo=t=>t instanceof S_?Eo(t.schema):t instanceof ys?Eo(t.innerType()):t instanceof sm?[t.value]:t instanceof bs?t.options:t instanceof x_?At.objectValues(t.enum):t instanceof lm?Eo(t._def.innerType):t instanceof rm?[void 0]:t instanceof nm?[null]:t instanceof Ro?[void 0,...Eo(t.unwrap())]:t instanceof Es?[null,...Eo(t.unwrap())]:t instanceof u2||t instanceof um?Eo(t.unwrap()):t instanceof cm?Eo(t._def.innerType):[];class WT extends wt{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==qe.object)return Ue(r,{code:ke.invalid_type,expected:qe.object,received:r.parsedType}),nt;const n=this.discriminator,a=r.data[n],s=this.optionsMap.get(a);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(Ue(r,{code:ke.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),nt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const a=new Map;for(const s of r){const l=Eo(s.shape[e]);if(!l.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of l){if(a.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);a.set(c,s)}}return new WT({typeName:st.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a,...ft(n)})}}function E_(t,e){const r=vi(t),n=vi(e);if(t===e)return{valid:!0,data:t};if(r===qe.object&&n===qe.object){const a=At.objectKeys(e),s=At.objectKeys(t).filter(c=>a.indexOf(c)!==-1),l={...t,...e};for(const c of s){const d=E_(t[c],e[c]);if(!d.valid)return{valid:!1};l[c]=d.data}return{valid:!0,data:l}}else if(r===qe.array&&n===qe.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let s=0;s<t.length;s++){const l=t[s],c=e[s],d=E_(l,c);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return r===qe.date&&n===qe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class om extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=(s,l)=>{if(Vk(s)||Vk(l))return nt;const c=E_(s.value,l.value);return c.valid?((Gk(s)||Gk(l))&&r.dirty(),{status:r.value,value:c.data}):(Ue(n,{code:ke.invalid_intersection_types}),nt)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,l])=>a(s,l)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}om.create=(t,e,r)=>new om({left:t,right:e,typeName:st.ZodIntersection,...ft(r)});class Ao extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==qe.array)return Ue(n,{code:ke.invalid_type,expected:qe.array,received:n.parsedType}),nt;if(n.data.length<this._def.items.length)return Ue(n,{code:ke.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),nt;!this._def.rest&&n.data.length>this._def.items.length&&(Ue(n,{code:ke.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((l,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new Ba(n,l,n.path,c)):null}).filter(l=>!!l);return n.common.async?Promise.all(s).then(l=>un.mergeArray(r,l)):un.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new Ao({...this._def,rest:e})}}Ao.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ao({items:t,typeName:st.ZodTuple,rest:null,...ft(e)})};class im extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==qe.object)return Ue(n,{code:ke.invalid_type,expected:qe.object,received:n.parsedType}),nt;const a=[],s=this._def.keyType,l=this._def.valueType;for(const c in n.data)a.push({key:s._parse(new Ba(n,c,n.path,c)),value:l._parse(new Ba(n,n.data[c],n.path,c)),alwaysSet:c in n.data});return n.common.async?un.mergeObjectAsync(r,a):un.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof wt?new im({keyType:e,valueType:r,typeName:st.ZodRecord,...ft(n)}):new im({keyType:To.create(),valueType:e,typeName:st.ZodRecord,...ft(r)})}}class Zk extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==qe.map)return Ue(n,{code:ke.invalid_type,expected:qe.map,received:n.parsedType}),nt;const a=this._def.keyType,s=this._def.valueType,l=[...n.data.entries()].map(([c,d],f)=>({key:a._parse(new Ba(n,c,n.path,[f,"key"])),value:s._parse(new Ba(n,d,n.path,[f,"value"]))}));if(n.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return nt;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),c.set(f.value,m.value)}return{status:r.value,value:c}})}else{const c=new Map;for(const d of l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return nt;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),c.set(f.value,m.value)}return{status:r.value,value:c}}}}Zk.create=(t,e,r)=>new Zk({valueType:e,keyType:t,typeName:st.ZodMap,...ft(r)});class nd extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==qe.set)return Ue(n,{code:ke.invalid_type,expected:qe.set,received:n.parsedType}),nt;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(Ue(n,{code:ke.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(Ue(n,{code:ke.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const s=this._def.valueType;function l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return nt;m.status==="dirty"&&r.dirty(),f.add(m.value)}return{status:r.value,value:f}}const c=[...n.data.values()].map((d,f)=>s._parse(new Ba(n,d,n.path,f)));return n.common.async?Promise.all(c).then(d=>l(d)):l(c)}min(e,r){return new nd({...this._def,minSize:{value:e,message:Xe.toString(r)}})}max(e,r){return new nd({...this._def,maxSize:{value:e,message:Xe.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}nd.create=(t,e)=>new nd({valueType:t,minSize:null,maxSize:null,typeName:st.ZodSet,...ft(e)});class ju extends wt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==qe.function)return Ue(r,{code:ke.invalid_type,expected:qe.function,received:r.parsedType}),nt;function n(c,d){return b_({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,v_(),ed].filter(f=>!!f),issueData:{code:ke.invalid_arguments,argumentsError:d}})}function a(c,d){return b_({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,v_(),ed].filter(f=>!!f),issueData:{code:ke.invalid_return_type,returnTypeError:d}})}const s={errorMap:r.common.contextualErrorMap},l=r.data;if(this._def.returns instanceof ad){const c=this;return _n(async function(...d){const f=new na([]),m=await c._def.args.parseAsync(d,s).catch(y=>{throw f.addIssue(n(d,y)),f}),h=await Reflect.apply(l,this,m);return await c._def.returns._def.type.parseAsync(h,s).catch(y=>{throw f.addIssue(a(h,y)),f})})}else{const c=this;return _n(function(...d){const f=c._def.args.safeParse(d,s);if(!f.success)throw new na([n(d,f.error)]);const m=Reflect.apply(l,this,f.data),h=c._def.returns.safeParse(m,s);if(!h.success)throw new na([a(m,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ju({...this._def,args:Ao.create(e).rest(jl.create())})}returns(e){return new ju({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new ju({args:e||Ao.create([]).rest(jl.create()),returns:r||jl.create(),typeName:st.ZodFunction,...ft(n)})}}class S_ extends wt{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}S_.create=(t,e)=>new S_({getter:t,typeName:st.ZodLazy,...ft(e)});class sm extends wt{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return Ue(r,{received:r.data,code:ke.invalid_literal,expected:this._def.value}),nt}return{status:"valid",value:e.data}}get value(){return this._def.value}}sm.create=(t,e)=>new sm({value:t,typeName:st.ZodLiteral,...ft(e)});function c2(t,e){return new bs({values:t,typeName:st.ZodEnum,...ft(e)})}class bs extends wt{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return Ue(r,{expected:At.joinValues(n),received:r.parsedType,code:ke.invalid_type}),nt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return Ue(r,{received:r.data,code:ke.invalid_enum_value,options:n}),nt}return _n(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return bs.create(e,{...this._def,...r})}exclude(e,r=this._def){return bs.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}bs.create=c2;class x_ extends wt{_parse(e){const r=At.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==qe.string&&n.parsedType!==qe.number){const a=At.objectValues(r);return Ue(n,{expected:At.joinValues(a),received:n.parsedType,code:ke.invalid_type}),nt}if(this._cache||(this._cache=new Set(At.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=At.objectValues(r);return Ue(n,{received:n.data,code:ke.invalid_enum_value,options:a}),nt}return _n(e.data)}get enum(){return this._def.values}}x_.create=(t,e)=>new x_({values:t,typeName:st.ZodNativeEnum,...ft(e)});class ad extends wt{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==qe.promise&&r.common.async===!1)return Ue(r,{code:ke.invalid_type,expected:qe.promise,received:r.parsedType}),nt;const n=r.parsedType===qe.promise?r.data:Promise.resolve(r.data);return _n(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ad.create=(t,e)=>new ad({type:t,typeName:st.ZodPromise,...ft(e)});class ys extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===st.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:l=>{Ue(n,l),l.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const l=a.transform(n.data,s);if(n.common.async)return Promise.resolve(l).then(async c=>{if(r.value==="aborted")return nt;const d=await this._def.schema._parseAsync({data:c,path:n.path,parent:n});return d.status==="aborted"?nt:d.status==="dirty"||r.value==="dirty"?_u(d.value):d});{if(r.value==="aborted")return nt;const c=this._def.schema._parseSync({data:l,path:n.path,parent:n});return c.status==="aborted"?nt:c.status==="dirty"||r.value==="dirty"?_u(c.value):c}}if(a.type==="refinement"){const l=c=>{const d=a.refinement(c,s);if(n.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(n.common.async===!1){const c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return c.status==="aborted"?nt:(c.status==="dirty"&&r.dirty(),l(c.value),{status:r.value,value:c.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>c.status==="aborted"?nt:(c.status==="dirty"&&r.dirty(),l(c.value).then(()=>({status:r.value,value:c.value}))))}if(a.type==="transform")if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!tc(l))return nt;const c=a.transform(l.value,s);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:c}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>tc(l)?Promise.resolve(a.transform(l.value,s)).then(c=>({status:r.value,value:c})):nt);At.assertNever(a)}}ys.create=(t,e,r)=>new ys({schema:t,typeName:st.ZodEffects,effect:e,...ft(r)});ys.createWithPreprocess=(t,e,r)=>new ys({schema:e,effect:{type:"preprocess",transform:t},typeName:st.ZodEffects,...ft(r)});class Ro extends wt{_parse(e){return this._getType(e)===qe.undefined?_n(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ro.create=(t,e)=>new Ro({innerType:t,typeName:st.ZodOptional,...ft(e)});class Es extends wt{_parse(e){return this._getType(e)===qe.null?_n(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Es.create=(t,e)=>new Es({innerType:t,typeName:st.ZodNullable,...ft(e)});class lm extends wt{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===qe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}lm.create=(t,e)=>new lm({innerType:t,typeName:st.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ft(e)});class cm extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return em(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new na(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new na(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}cm.create=(t,e)=>new cm({innerType:t,typeName:st.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ft(e)});class Xk extends wt{_parse(e){if(this._getType(e)!==qe.nan){const n=this._getOrReturnCtx(e);return Ue(n,{code:ke.invalid_type,expected:qe.nan,received:n.parsedType}),nt}return{status:"valid",value:e.data}}}Xk.create=t=>new Xk({typeName:st.ZodNaN,...ft(t)});class u2 extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class YT extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?nt:s.status==="dirty"?(r.dirty(),_u(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?nt:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,r){return new YT({in:e,out:r,typeName:st.ZodPipeline})}}class um extends wt{_parse(e){const r=this._def.innerType._parse(e),n=a=>(tc(a)&&(a.value=Object.freeze(a.value)),a);return em(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}um.create=(t,e)=>new um({innerType:t,typeName:st.ZodReadonly,...ft(e)});function Qk(t,e){const r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Z6(t,e={},r){return t?rd.create().superRefine((n,a)=>{const s=t(n);if(s instanceof Promise)return s.then(l=>{if(!l){const c=Qk(e,n),d=c.fatal??r??!0;a.addIssue({code:"custom",...c,fatal:d})}});if(!s){const l=Qk(e,n),c=l.fatal??r??!0;a.addIssue({code:"custom",...l,fatal:c})}}):rd.create()}var st;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(st||(st={}));const mEe=(t,e={message:`Input not instance of ${t.name}`})=>Z6(r=>r instanceof t,e),ve=To.create,$r=rc.create,Dr=y_.create,hEe=rm.create,gEe=nm.create,X6=rd.create,Td=jl.create;wi.create;const Ye=Ua.create,Pe=Rr.create,dn=am.create,Q6=WT.create;om.create;Ao.create;const Rd=im.create,vEe=ju.create,pt=sm.create,No=bs.create,bEe=ad.create,Ae=Ro.create;Es.create;const J6=nt,Pm="2025-06-18",e9=[Pm,"2025-03-26","2024-11-05","2024-10-07"],jm="2.0",d2=dn([ve(),$r().int()]),f2=ve(),t9=Pe({progressToken:Ae(d2)}).passthrough(),sa=Pe({_meta:Ae(t9)}).passthrough(),Tn=Pe({method:ve(),params:Ae(sa)}),Cd=Pe({_meta:Ae(Pe({}).passthrough())}).passthrough(),Ya=Pe({method:ve(),params:Ae(Cd)}),la=Pe({_meta:Ae(Pe({}).passthrough())}).passthrough(),Um=dn([ve(),$r().int()]),p2=Pe({jsonrpc:pt(jm),id:Um}).merge(Tn).strict(),m2=t=>p2.safeParse(t).success,h2=Pe({jsonrpc:pt(jm)}).merge(Ya).strict(),r9=t=>h2.safeParse(t).success,g2=Pe({jsonrpc:pt(jm),id:Um,result:la}).strict(),w_=t=>g2.safeParse(t).success;var Oa;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError"})(Oa||(Oa={}));const v2=Pe({jsonrpc:pt(jm),id:Um,error:Pe({code:$r().int(),message:ve(),data:Ae(Td())})}).strict(),n9=t=>v2.safeParse(t).success,Ip=dn([p2,h2,g2,v2]),Al=la.strict(),KT=Ya.extend({method:pt("notifications/cancelled"),params:Cd.extend({requestId:Um,reason:ve().optional()})}),a9=Pe({src:ve(),mimeType:Ae(ve()),sizes:Ae(Ye(ve()))}).passthrough(),Ad=Pe({icons:Ye(a9).optional()}).passthrough(),Nd=Pe({name:ve(),title:Ae(ve())}).passthrough(),b2=Nd.extend({version:ve(),websiteUrl:Ae(ve())}).merge(Ad),o9=Pe({experimental:Ae(Pe({}).passthrough()),sampling:Ae(Pe({}).passthrough()),elicitation:Ae(Pe({}).passthrough()),roots:Ae(Pe({listChanged:Ae(Dr())}).passthrough())}).passthrough(),i9=Tn.extend({method:pt("initialize"),params:sa.extend({protocolVersion:ve(),capabilities:o9,clientInfo:b2})}),s9=Pe({experimental:Ae(Pe({}).passthrough()),logging:Ae(Pe({}).passthrough()),completions:Ae(Pe({}).passthrough()),prompts:Ae(Pe({listChanged:Ae(Dr())}).passthrough()),resources:Ae(Pe({subscribe:Ae(Dr()),listChanged:Ae(Dr())}).passthrough()),tools:Ae(Pe({listChanged:Ae(Dr())}).passthrough())}).passthrough(),y2=la.extend({protocolVersion:ve(),capabilities:s9,serverInfo:b2,instructions:Ae(ve())}),E2=Ya.extend({method:pt("notifications/initialized")}),l9=t=>E2.safeParse(t).success,ZT=Tn.extend({method:pt("ping")}),c9=Pe({progress:$r(),total:Ae($r()),message:Ae(ve())}).passthrough(),XT=Ya.extend({method:pt("notifications/progress"),params:Cd.merge(c9).extend({progressToken:d2})}),Fm=Tn.extend({params:sa.extend({cursor:Ae(f2)}).optional()}),zm=la.extend({nextCursor:Ae(f2)}),S2=Pe({uri:ve(),mimeType:Ae(ve()),_meta:Ae(Pe({}).passthrough())}).passthrough(),x2=S2.extend({text:ve()}),QT=ve().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),w2=S2.extend({blob:QT}),_2=Nd.extend({uri:ve(),description:Ae(ve()),mimeType:Ae(ve()),_meta:Ae(Pe({}).passthrough())}).merge(Ad),u9=Nd.extend({uriTemplate:ve(),description:Ae(ve()),mimeType:Ae(ve()),_meta:Ae(Pe({}).passthrough())}).merge(Ad),d9=Fm.extend({method:pt("resources/list")}),T2=zm.extend({resources:Ye(_2)}),f9=Fm.extend({method:pt("resources/templates/list")}),R2=zm.extend({resourceTemplates:Ye(u9)}),p9=Tn.extend({method:pt("resources/read"),params:sa.extend({uri:ve()})}),C2=la.extend({contents:Ye(dn([x2,w2]))}),m9=Ya.extend({method:pt("notifications/resources/list_changed")}),h9=Tn.extend({method:pt("resources/subscribe"),params:sa.extend({uri:ve()})}),g9=Tn.extend({method:pt("resources/unsubscribe"),params:sa.extend({uri:ve()})}),v9=Ya.extend({method:pt("notifications/resources/updated"),params:Cd.extend({uri:ve()})}),b9=Pe({name:ve(),description:Ae(ve()),required:Ae(Dr())}).passthrough(),y9=Nd.extend({description:Ae(ve()),arguments:Ae(Ye(b9)),_meta:Ae(Pe({}).passthrough())}).merge(Ad),E9=Fm.extend({method:pt("prompts/list")}),A2=zm.extend({prompts:Ye(y9)}),S9=Tn.extend({method:pt("prompts/get"),params:sa.extend({name:ve(),arguments:Ae(Rd(ve()))})}),JT=Pe({type:pt("text"),text:ve(),_meta:Ae(Pe({}).passthrough())}).passthrough(),eR=Pe({type:pt("image"),data:QT,mimeType:ve(),_meta:Ae(Pe({}).passthrough())}).passthrough(),tR=Pe({type:pt("audio"),data:QT,mimeType:ve(),_meta:Ae(Pe({}).passthrough())}).passthrough(),x9=Pe({type:pt("resource"),resource:dn([x2,w2]),_meta:Ae(Pe({}).passthrough())}).passthrough(),w9=_2.extend({type:pt("resource_link")}),N2=dn([JT,eR,tR,w9,x9]),_9=Pe({role:No(["user","assistant"]),content:N2}).passthrough(),k2=la.extend({description:Ae(ve()),messages:Ye(_9)}),T9=Ya.extend({method:pt("notifications/prompts/list_changed")}),R9=Pe({title:Ae(ve()),readOnlyHint:Ae(Dr()),destructiveHint:Ae(Dr()),idempotentHint:Ae(Dr()),openWorldHint:Ae(Dr())}).passthrough(),C9=Nd.extend({description:Ae(ve()),inputSchema:Pe({type:pt("object"),properties:Ae(Pe({}).passthrough()),required:Ae(Ye(ve()))}).passthrough(),outputSchema:Ae(Pe({type:pt("object"),properties:Ae(Pe({}).passthrough()),required:Ae(Ye(ve()))}).passthrough()),annotations:Ae(R9),_meta:Ae(Pe({}).passthrough())}).merge(Ad),A9=Fm.extend({method:pt("tools/list")}),I2=zm.extend({tools:Ye(C9)}),rR=la.extend({content:Ye(N2).default([]),structuredContent:Pe({}).passthrough().optional(),isError:Ae(Dr())});rR.or(la.extend({toolResult:Td()}));const N9=Tn.extend({method:pt("tools/call"),params:sa.extend({name:ve(),arguments:Ae(Rd(Td()))})}),k9=Ya.extend({method:pt("notifications/tools/list_changed")}),O2=No(["debug","info","notice","warning","error","critical","alert","emergency"]),I9=Tn.extend({method:pt("logging/setLevel"),params:sa.extend({level:O2})}),O9=Ya.extend({method:pt("notifications/message"),params:Cd.extend({level:O2,logger:Ae(ve()),data:Td()})}),D9=Pe({name:ve().optional()}).passthrough(),L9=Pe({hints:Ae(Ye(D9)),costPriority:Ae($r().min(0).max(1)),speedPriority:Ae($r().min(0).max(1)),intelligencePriority:Ae($r().min(0).max(1))}).passthrough(),M9=Pe({role:No(["user","assistant"]),content:dn([JT,eR,tR])}).passthrough(),P9=Tn.extend({method:pt("sampling/createMessage"),params:sa.extend({messages:Ye(M9),systemPrompt:Ae(ve()),includeContext:Ae(No(["none","thisServer","allServers"])),temperature:Ae($r()),maxTokens:$r().int(),stopSequences:Ae(Ye(ve())),metadata:Ae(Pe({}).passthrough()),modelPreferences:Ae(L9)})}),j9=la.extend({model:ve(),stopReason:Ae(No(["endTurn","stopSequence","maxTokens"]).or(ve())),role:No(["user","assistant"]),content:Q6("type",[JT,eR,tR])}),U9=Pe({type:pt("boolean"),title:Ae(ve()),description:Ae(ve()),default:Ae(Dr())}).passthrough(),F9=Pe({type:pt("string"),title:Ae(ve()),description:Ae(ve()),minLength:Ae($r()),maxLength:Ae($r()),format:Ae(No(["email","uri","date","date-time"]))}).passthrough(),z9=Pe({type:No(["number","integer"]),title:Ae(ve()),description:Ae(ve()),minimum:Ae($r()),maximum:Ae($r())}).passthrough(),$9=Pe({type:pt("string"),title:Ae(ve()),description:Ae(ve()),enum:Ye(ve()),enumNames:Ae(Ye(ve()))}).passthrough(),B9=dn([U9,F9,z9,$9]),q9=Tn.extend({method:pt("elicitation/create"),params:sa.extend({message:ve(),requestedSchema:Pe({type:pt("object"),properties:Rd(ve(),B9),required:Ae(Ye(ve()))}).passthrough()})}),H9=la.extend({action:No(["accept","decline","cancel"]),content:Ae(Rd(ve(),Td()))}),V9=Pe({type:pt("ref/resource"),uri:ve()}).passthrough(),G9=Pe({type:pt("ref/prompt"),name:ve()}).passthrough(),W9=Tn.extend({method:pt("completion/complete"),params:sa.extend({ref:dn([G9,V9]),argument:Pe({name:ve(),value:ve()}).passthrough(),context:Ae(Pe({arguments:Ae(Rd(ve(),ve()))}))})}),D2=la.extend({completion:Pe({values:Ye(ve()).max(100),total:Ae($r().int()),hasMore:Ae(Dr())}).passthrough()}),Y9=Pe({uri:ve().startsWith("file://"),name:Ae(ve()),_meta:Ae(Pe({}).passthrough())}).passthrough(),K9=Tn.extend({method:pt("roots/list")}),Z9=la.extend({roots:Ye(Y9)}),X9=Ya.extend({method:pt("notifications/roots/list_changed")});dn([ZT,i9,W9,I9,S9,E9,d9,f9,p9,h9,g9,N9,A9]);dn([KT,XT,E2,X9]);dn([Al,j9,H9,Z9]);dn([ZT,P9,q9,K9]);dn([KT,XT,O9,v9,m9,k9,T9]);dn([Al,y2,D2,k2,A2,T2,R2,C2,rR,I2]);class Si extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}}const Q9=6e4;class J9{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this.setNotificationHandler(KT,r=>{const n=this._requestHandlerAbortControllers.get(r.params.requestId);n?.abort(r.params.reason)}),this.setNotificationHandler(XT,r=>{this._onprogress(r)}),this.setRequestHandler(ZT,r=>({}))}_setupTimeout(e,r,n,a,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(a,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:s,onTimeout:a})}_resetTimeout(e){const r=this._timeoutInfo.get(e);if(!r)return!1;const n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),new Si(Oa.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){const r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var r,n,a;this._transport=e;const s=(r=this.transport)===null||r===void 0?void 0:r.onclose;this._transport.onclose=()=>{s?.(),this._onclose()};const l=(n=this.transport)===null||n===void 0?void 0:n.onerror;this._transport.onerror=d=>{l?.(d),this._onerror(d)};const c=(a=this._transport)===null||a===void 0?void 0:a.onmessage;this._transport.onmessage=(d,f)=>{c?.(d,f),w_(d)||n9(d)?this._onresponse(d):m2(d)?this._onrequest(d,f):r9(d)?this._onnotification(d):this._onerror(new Error(`Unknown message type: ${JSON.stringify(d)}`))},await this._transport.start()}_onclose(){var e;const r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._transport=void 0,(e=this.onclose)===null||e===void 0||e.call(this);const n=new Si(Oa.ConnectionClosed,"Connection closed");for(const a of r.values())a(n)}_onerror(e){var r;(r=this.onerror)===null||r===void 0||r.call(this,e)}_onnotification(e){var r;const n=(r=this._notificationHandlers.get(e.method))!==null&&r!==void 0?r:this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(e)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,r){var n,a;const s=(n=this._requestHandlers.get(e.method))!==null&&n!==void 0?n:this.fallbackRequestHandler,l=this._transport;if(s===void 0){l?.send({jsonrpc:"2.0",id:e.id,error:{code:Oa.MethodNotFound,message:"Method not found"}}).catch(f=>this._onerror(new Error(`Failed to send an error response: ${f}`)));return}const c=new AbortController;this._requestHandlerAbortControllers.set(e.id,c);const d={signal:c.signal,sessionId:l?.sessionId,_meta:(a=e.params)===null||a===void 0?void 0:a._meta,sendNotification:f=>this.notification(f,{relatedRequestId:e.id}),sendRequest:(f,m,h)=>this.request(f,m,{...h,relatedRequestId:e.id}),authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo};Promise.resolve().then(()=>s(e,d)).then(f=>{if(!c.signal.aborted)return l?.send({result:f,jsonrpc:"2.0",id:e.id})},f=>{var m;if(!c.signal.aborted)return l?.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(f.code)?f.code:Oa.InternalError,message:(m=f.message)!==null&&m!==void 0?m:"Internal error"}})}).catch(f=>this._onerror(new Error(`Failed to send response: ${f}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:r,...n}=e.params,a=Number(r),s=this._progressHandlers.get(a);if(!s){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const l=this._responseHandlers.get(a),c=this._timeoutInfo.get(a);if(c&&l&&c.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(d){l(d);return}s(n)}_onresponse(e){const r=Number(e.id),n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),w_(e))n(e);else{const a=new Si(e.error.code,e.error.message,e.error.data);n(a)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)===null||e===void 0?void 0:e.close())}request(e,r,n){const{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}=n??{};return new Promise((c,d)=>{var f,m,h,v,y,w;if(!this._transport){d(new Error("Not connected"));return}((f=this._options)===null||f===void 0?void 0:f.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(e.method),(m=n?.signal)===null||m===void 0||m.throwIfAborted();const S=this._requestMessageId++,R={...e,jsonrpc:"2.0",id:S};n?.onprogress&&(this._progressHandlers.set(S,n.onprogress),R.params={...e.params,_meta:{...((h=e.params)===null||h===void 0?void 0:h._meta)||{},progressToken:S}});const x=N=>{var k;this._responseHandlers.delete(S),this._progressHandlers.delete(S),this._cleanupTimeout(S),(k=this._transport)===null||k===void 0||k.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:S,reason:String(N)}},{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}).catch(A=>this._onerror(new Error(`Failed to send cancellation: ${A}`))),d(N)};this._responseHandlers.set(S,N=>{var k;if(!(!((k=n?.signal)===null||k===void 0)&&k.aborted)){if(N instanceof Error)return d(N);try{const A=r.parse(N.result);c(A)}catch(A){d(A)}}}),(v=n?.signal)===null||v===void 0||v.addEventListener("abort",()=>{var N;x((N=n?.signal)===null||N===void 0?void 0:N.reason)});const _=(y=n?.timeout)!==null&&y!==void 0?y:Q9,C=()=>x(new Si(Oa.RequestTimeout,"Request timed out",{timeout:_}));this._setupTimeout(S,_,n?.maxTotalTimeout,C,(w=n?.resetTimeoutOnProgress)!==null&&w!==void 0?w:!1),this._transport.send(R,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}).catch(N=>{this._cleanupTimeout(S),d(N)})})}async notification(e,r){var n,a;if(!this._transport)throw new Error("Not connected");if(this.assertNotificationCapability(e.method),((a=(n=this._options)===null||n===void 0?void 0:n.debouncedNotificationMethods)!==null&&a!==void 0?a:[]).includes(e.method)&&!e.params&&!r?.relatedRequestId){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var d;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;const f={...e,jsonrpc:"2.0"};(d=this._transport)===null||d===void 0||d.send(f,r).catch(m=>this._onerror(m))});return}const c={...e,jsonrpc:"2.0"};await this._transport.send(c,r)}setRequestHandler(e,r){const n=e.shape.method.value;this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(a,s)=>Promise.resolve(r(e.parse(a),s)))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){this._notificationHandlers.set(e.shape.method.value,n=>Promise.resolve(r(e.parse(n))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}function e8(t,e){return Object.entries(e).reduce((r,[n,a])=>(a&&typeof a=="object"?r[n]=r[n]?{...r[n],...a}:a:r[n]=a,r),{...t})}var Tu={exports:{}};var t8=Tu.exports,Jk;function r8(){return Jk||(Jk=1,(function(t,e){(function(r,n){n(e)})(t8,(function(r){function n(){for(var oe=arguments.length,K=Array(oe),ie=0;ie<oe;ie++)K[ie]=arguments[ie];if(K.length>1){K[0]=K[0].slice(0,-1);for(var ye=K.length-1,ge=1;ge<ye;++ge)K[ge]=K[ge].slice(1,-1);return K[ye]=K[ye].slice(1),K.join("")}else return K[0]}function a(oe){return"(?:"+oe+")"}function s(oe){return oe===void 0?"undefined":oe===null?"null":Object.prototype.toString.call(oe).split(" ").pop().split("]").shift().toLowerCase()}function l(oe){return oe.toUpperCase()}function c(oe){return oe!=null?oe instanceof Array?oe:typeof oe.length!="number"||oe.split||oe.setInterval||oe.call?[oe]:Array.prototype.slice.call(oe):[]}function d(oe,K){var ie=oe;if(K)for(var ye in K)ie[ye]=K[ye];return ie}function f(oe){var K="[A-Za-z]",ie="[0-9]",ye=n(ie,"[A-Fa-f]"),ge=a(a("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+a("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+a("%"+ye+ye)),je="[\\:\\/\\?\\#\\[\\]\\@]",Be="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",mt=n(je,Be),Ut=oe?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",sr=oe?"[\\uE000-\\uF8FF]":"[]",yt=n(K,ie,"[\\-\\.\\_\\~]",Ut);a(K+n(K,ie,"[\\+\\-\\.]")+"*"),a(a(ge+"|"+n(yt,Be,"[\\:]"))+"*");var Ft=a(a("25[0-5]")+"|"+a("2[0-4]"+ie)+"|"+a("1"+ie+ie)+"|"+a("0?[1-9]"+ie)+"|0?0?"+ie),Wt=a(Ft+"\\."+Ft+"\\."+Ft+"\\."+Ft),ot=a(ye+"{1,4}"),Dt=a(a(ot+"\\:"+ot)+"|"+Wt),Yt=a(a(ot+"\\:")+"{6}"+Dt),Pt=a("\\:\\:"+a(ot+"\\:")+"{5}"+Dt),on=a(a(ot)+"?\\:\\:"+a(ot+"\\:")+"{4}"+Dt),zt=a(a(a(ot+"\\:")+"{0,1}"+ot)+"?\\:\\:"+a(ot+"\\:")+"{3}"+Dt),An=a(a(a(ot+"\\:")+"{0,2}"+ot)+"?\\:\\:"+a(ot+"\\:")+"{2}"+Dt),Qa=a(a(a(ot+"\\:")+"{0,3}"+ot)+"?\\:\\:"+ot+"\\:"+Dt),sn=a(a(a(ot+"\\:")+"{0,4}"+ot)+"?\\:\\:"+Dt),Ar=a(a(a(ot+"\\:")+"{0,5}"+ot)+"?\\:\\:"+ot),Bn=a(a(a(ot+"\\:")+"{0,6}"+ot)+"?\\:\\:"),Ta=a([Yt,Pt,on,zt,An,Qa,sn,Ar,Bn].join("|")),qn=a(a(yt+"|"+ge)+"+");a("[vV]"+ye+"+\\."+n(yt,Be,"[\\:]")+"+"),a(a(ge+"|"+n(yt,Be))+"*");var Mi=a(ge+"|"+n(yt,Be,"[\\:\\@]"));return a(a(ge+"|"+n(yt,Be,"[\\@]"))+"+"),a(a(Mi+"|"+n("[\\/\\?]",sr))+"*"),{NOT_SCHEME:new RegExp(n("[^]",K,ie,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",yt,Be),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",yt,Be),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",yt,Be),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",yt,Be),"g"),NOT_QUERY:new RegExp(n("[^\\%]",yt,Be,"[\\:\\@\\/\\?]",sr),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",yt,Be,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",yt,Be),"g"),UNRESERVED:new RegExp(yt,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",yt,mt),"g"),PCT_ENCODED:new RegExp(ge,"g"),IPV4ADDRESS:new RegExp("^("+Wt+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Ta+")"+a(a("\\%25|\\%(?!"+ye+"{2})")+"("+qn+")")+"?\\]?$")}}var m=f(!1),h=f(!0),v=(function(){function oe(K,ie){var ye=[],ge=!0,je=!1,Be=void 0;try{for(var mt=K[Symbol.iterator](),Ut;!(ge=(Ut=mt.next()).done)&&(ye.push(Ut.value),!(ie&&ye.length===ie));ge=!0);}catch(sr){je=!0,Be=sr}finally{try{!ge&&mt.return&&mt.return()}finally{if(je)throw Be}}return ye}return function(K,ie){if(Array.isArray(K))return K;if(Symbol.iterator in Object(K))return oe(K,ie);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),y=function(oe){if(Array.isArray(oe)){for(var K=0,ie=Array(oe.length);K<oe.length;K++)ie[K]=oe[K];return ie}else return Array.from(oe)},w=2147483647,S=36,R=1,x=26,_=38,C=700,N=72,k=128,A="-",I=/^xn--/,O=/[^\0-\x7E]/,L=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=S-R,Y=Math.floor,Q=String.fromCharCode;function J(oe){throw new RangeError(M[oe])}function ee(oe,K){for(var ie=[],ye=oe.length;ye--;)ie[ye]=K(oe[ye]);return ie}function U(oe,K){var ie=oe.split("@"),ye="";ie.length>1&&(ye=ie[0]+"@",oe=ie[1]),oe=oe.replace(L,".");var ge=oe.split("."),je=ee(ge,K).join(".");return ye+je}function G(oe){for(var K=[],ie=0,ye=oe.length;ie<ye;){var ge=oe.charCodeAt(ie++);if(ge>=55296&&ge<=56319&&ie<ye){var je=oe.charCodeAt(ie++);(je&64512)==56320?K.push(((ge&1023)<<10)+(je&1023)+65536):(K.push(ge),ie--)}else K.push(ge)}return K}var H=function(K){return String.fromCodePoint.apply(String,y(K))},X=function(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:S},ae=function(K,ie){return K+22+75*(K<26)-((ie!=0)<<5)},z=function(K,ie,ye){var ge=0;for(K=ye?Y(K/C):K>>1,K+=Y(K/ie);K>P*x>>1;ge+=S)K=Y(K/P);return Y(ge+(P+1)*K/(K+_))},q=function(K){var ie=[],ye=K.length,ge=0,je=k,Be=N,mt=K.lastIndexOf(A);mt<0&&(mt=0);for(var Ut=0;Ut<mt;++Ut)K.charCodeAt(Ut)>=128&&J("not-basic"),ie.push(K.charCodeAt(Ut));for(var sr=mt>0?mt+1:0;sr<ye;){for(var yt=ge,Ft=1,Wt=S;;Wt+=S){sr>=ye&&J("invalid-input");var ot=X(K.charCodeAt(sr++));(ot>=S||ot>Y((w-ge)/Ft))&&J("overflow"),ge+=ot*Ft;var Dt=Wt<=Be?R:Wt>=Be+x?x:Wt-Be;if(ot<Dt)break;var Yt=S-Dt;Ft>Y(w/Yt)&&J("overflow"),Ft*=Yt}var Pt=ie.length+1;Be=z(ge-yt,Pt,yt==0),Y(ge/Pt)>w-je&&J("overflow"),je+=Y(ge/Pt),ge%=Pt,ie.splice(ge++,0,je)}return String.fromCodePoint.apply(String,ie)},$=function(K){var ie=[];K=G(K);var ye=K.length,ge=k,je=0,Be=N,mt=!0,Ut=!1,sr=void 0;try{for(var yt=K[Symbol.iterator](),Ft;!(mt=(Ft=yt.next()).done);mt=!0){var Wt=Ft.value;Wt<128&&ie.push(Q(Wt))}}catch(zo){Ut=!0,sr=zo}finally{try{!mt&&yt.return&&yt.return()}finally{if(Ut)throw sr}}var ot=ie.length,Dt=ot;for(ot&&ie.push(A);Dt<ye;){var Yt=w,Pt=!0,on=!1,zt=void 0;try{for(var An=K[Symbol.iterator](),Qa;!(Pt=(Qa=An.next()).done);Pt=!0){var sn=Qa.value;sn>=ge&&sn<Yt&&(Yt=sn)}}catch(zo){on=!0,zt=zo}finally{try{!Pt&&An.return&&An.return()}finally{if(on)throw zt}}var Ar=Dt+1;Yt-ge>Y((w-je)/Ar)&&J("overflow"),je+=(Yt-ge)*Ar,ge=Yt;var Bn=!0,Ta=!1,qn=void 0;try{for(var Mi=K[Symbol.iterator](),Pi;!(Bn=(Pi=Mi.next()).done);Bn=!0){var ji=Pi.value;if(ji<ge&&++je>w&&J("overflow"),ji==ge){for(var mn=je,qr=S;;qr+=S){var Ui=qr<=Be?R:qr>=Be+x?x:qr-Be;if(mn<Ui)break;var Xd=mn-Ui,Os=S-Ui;ie.push(Q(ae(Ui+Xd%Os,0))),mn=Y(Xd/Os)}ie.push(Q(ae(mn,0))),Be=z(je,Ar,Dt==ot),je=0,++Dt}}}catch(zo){Ta=!0,qn=zo}finally{try{!Bn&&Mi.return&&Mi.return()}finally{if(Ta)throw qn}}++je,++ge}return ie.join("")},W=function(K){return U(K,function(ie){return I.test(ie)?q(ie.slice(4).toLowerCase()):ie})},te=function(K){return U(K,function(ie){return O.test(ie)?"xn--"+$(ie):ie})},F={version:"2.1.0",ucs2:{decode:G,encode:H},decode:q,encode:$,toASCII:te,toUnicode:W},j={};function Z(oe){var K=oe.charCodeAt(0),ie=void 0;return K<16?ie="%0"+K.toString(16).toUpperCase():K<128?ie="%"+K.toString(16).toUpperCase():K<2048?ie="%"+(K>>6|192).toString(16).toUpperCase()+"%"+(K&63|128).toString(16).toUpperCase():ie="%"+(K>>12|224).toString(16).toUpperCase()+"%"+(K>>6&63|128).toString(16).toUpperCase()+"%"+(K&63|128).toString(16).toUpperCase(),ie}function ne(oe){for(var K="",ie=0,ye=oe.length;ie<ye;){var ge=parseInt(oe.substr(ie+1,2),16);if(ge<128)K+=String.fromCharCode(ge),ie+=3;else if(ge>=194&&ge<224){if(ye-ie>=6){var je=parseInt(oe.substr(ie+4,2),16);K+=String.fromCharCode((ge&31)<<6|je&63)}else K+=oe.substr(ie,6);ie+=6}else if(ge>=224){if(ye-ie>=9){var Be=parseInt(oe.substr(ie+4,2),16),mt=parseInt(oe.substr(ie+7,2),16);K+=String.fromCharCode((ge&15)<<12|(Be&63)<<6|mt&63)}else K+=oe.substr(ie,9);ie+=9}else K+=oe.substr(ie,3),ie+=3}return K}function V(oe,K){function ie(ye){var ge=ne(ye);return ge.match(K.UNRESERVED)?ge:ye}return oe.scheme&&(oe.scheme=String(oe.scheme).replace(K.PCT_ENCODED,ie).toLowerCase().replace(K.NOT_SCHEME,"")),oe.userinfo!==void 0&&(oe.userinfo=String(oe.userinfo).replace(K.PCT_ENCODED,ie).replace(K.NOT_USERINFO,Z).replace(K.PCT_ENCODED,l)),oe.host!==void 0&&(oe.host=String(oe.host).replace(K.PCT_ENCODED,ie).toLowerCase().replace(K.NOT_HOST,Z).replace(K.PCT_ENCODED,l)),oe.path!==void 0&&(oe.path=String(oe.path).replace(K.PCT_ENCODED,ie).replace(oe.scheme?K.NOT_PATH:K.NOT_PATH_NOSCHEME,Z).replace(K.PCT_ENCODED,l)),oe.query!==void 0&&(oe.query=String(oe.query).replace(K.PCT_ENCODED,ie).replace(K.NOT_QUERY,Z).replace(K.PCT_ENCODED,l)),oe.fragment!==void 0&&(oe.fragment=String(oe.fragment).replace(K.PCT_ENCODED,ie).replace(K.NOT_FRAGMENT,Z).replace(K.PCT_ENCODED,l)),oe}function de(oe){return oe.replace(/^0*(.*)/,"$1")||"0"}function fe(oe,K){var ie=oe.match(K.IPV4ADDRESS)||[],ye=v(ie,2),ge=ye[1];return ge?ge.split(".").map(de).join("."):oe}function Re(oe,K){var ie=oe.match(K.IPV6ADDRESS)||[],ye=v(ie,3),ge=ye[1],je=ye[2];if(ge){for(var Be=ge.toLowerCase().split("::").reverse(),mt=v(Be,2),Ut=mt[0],sr=mt[1],yt=sr?sr.split(":").map(de):[],Ft=Ut.split(":").map(de),Wt=K.IPV4ADDRESS.test(Ft[Ft.length-1]),ot=Wt?7:8,Dt=Ft.length-ot,Yt=Array(ot),Pt=0;Pt<ot;++Pt)Yt[Pt]=yt[Pt]||Ft[Dt+Pt]||"";Wt&&(Yt[ot-1]=fe(Yt[ot-1],K));var on=Yt.reduce(function(Ar,Bn,Ta){if(!Bn||Bn==="0"){var qn=Ar[Ar.length-1];qn&&qn.index+qn.length===Ta?qn.length++:Ar.push({index:Ta,length:1})}return Ar},[]),zt=on.sort(function(Ar,Bn){return Bn.length-Ar.length})[0],An=void 0;if(zt&&zt.length>1){var Qa=Yt.slice(0,zt.index),sn=Yt.slice(zt.index+zt.length);An=Qa.join(":")+"::"+sn.join(":")}else An=Yt.join(":");return je&&(An+="%"+je),An}else return oe}var be=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,xe="".match(/(){0}/)[1]===void 0;function Ne(oe){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie={},ye=K.iri!==!1?h:m;K.reference==="suffix"&&(oe=(K.scheme?K.scheme+":":"")+"//"+oe);var ge=oe.match(be);if(ge){xe?(ie.scheme=ge[1],ie.userinfo=ge[3],ie.host=ge[4],ie.port=parseInt(ge[5],10),ie.path=ge[6]||"",ie.query=ge[7],ie.fragment=ge[8],isNaN(ie.port)&&(ie.port=ge[5])):(ie.scheme=ge[1]||void 0,ie.userinfo=oe.indexOf("@")!==-1?ge[3]:void 0,ie.host=oe.indexOf("//")!==-1?ge[4]:void 0,ie.port=parseInt(ge[5],10),ie.path=ge[6]||"",ie.query=oe.indexOf("?")!==-1?ge[7]:void 0,ie.fragment=oe.indexOf("#")!==-1?ge[8]:void 0,isNaN(ie.port)&&(ie.port=oe.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?ge[4]:void 0)),ie.host&&(ie.host=Re(fe(ie.host,ye),ye)),ie.scheme===void 0&&ie.userinfo===void 0&&ie.host===void 0&&ie.port===void 0&&!ie.path&&ie.query===void 0?ie.reference="same-document":ie.scheme===void 0?ie.reference="relative":ie.fragment===void 0?ie.reference="absolute":ie.reference="uri",K.reference&&K.reference!=="suffix"&&K.reference!==ie.reference&&(ie.error=ie.error||"URI is not a "+K.reference+" reference.");var je=j[(K.scheme||ie.scheme||"").toLowerCase()];if(!K.unicodeSupport&&(!je||!je.unicodeSupport)){if(ie.host&&(K.domainHost||je&&je.domainHost))try{ie.host=F.toASCII(ie.host.replace(ye.PCT_ENCODED,ne).toLowerCase())}catch(Be){ie.error=ie.error||"Host's domain name can not be converted to ASCII via punycode: "+Be}V(ie,m)}else V(ie,ye);je&&je.parse&&je.parse(ie,K)}else ie.error=ie.error||"URI can not be parsed.";return ie}function ze(oe,K){var ie=K.iri!==!1?h:m,ye=[];return oe.userinfo!==void 0&&(ye.push(oe.userinfo),ye.push("@")),oe.host!==void 0&&ye.push(Re(fe(String(oe.host),ie),ie).replace(ie.IPV6ADDRESS,function(ge,je,Be){return"["+je+(Be?"%25"+Be:"")+"]"})),(typeof oe.port=="number"||typeof oe.port=="string")&&(ye.push(":"),ye.push(String(oe.port))),ye.length?ye.join(""):void 0}var Me=/^\.\.?\//,$e=/^\/\.(\/|$)/,ct=/^\/\.\.(\/|$)/,ce=/^\/?(?:.|\n)*?(?=\/|$)/;function Ce(oe){for(var K=[];oe.length;)if(oe.match(Me))oe=oe.replace(Me,"");else if(oe.match($e))oe=oe.replace($e,"/");else if(oe.match(ct))oe=oe.replace(ct,"/"),K.pop();else if(oe==="."||oe==="..")oe="";else{var ie=oe.match(ce);if(ie){var ye=ie[0];oe=oe.slice(ye.length),K.push(ye)}else throw new Error("Unexpected dot segment condition")}return K.join("")}function Fe(oe){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=K.iri?h:m,ye=[],ge=j[(K.scheme||oe.scheme||"").toLowerCase()];if(ge&&ge.serialize&&ge.serialize(oe,K),oe.host&&!ie.IPV6ADDRESS.test(oe.host)){if(K.domainHost||ge&&ge.domainHost)try{oe.host=K.iri?F.toUnicode(oe.host):F.toASCII(oe.host.replace(ie.PCT_ENCODED,ne).toLowerCase())}catch(mt){oe.error=oe.error||"Host's domain name can not be converted to "+(K.iri?"Unicode":"ASCII")+" via punycode: "+mt}}V(oe,ie),K.reference!=="suffix"&&oe.scheme&&(ye.push(oe.scheme),ye.push(":"));var je=ze(oe,K);if(je!==void 0&&(K.reference!=="suffix"&&ye.push("//"),ye.push(je),oe.path&&oe.path.charAt(0)!=="/"&&ye.push("/")),oe.path!==void 0){var Be=oe.path;!K.absolutePath&&(!ge||!ge.absolutePath)&&(Be=Ce(Be)),je===void 0&&(Be=Be.replace(/^\/\//,"/%2F")),ye.push(Be)}return oe.query!==void 0&&(ye.push("?"),ye.push(oe.query)),oe.fragment!==void 0&&(ye.push("#"),ye.push(oe.fragment)),ye.join("")}function _e(oe,K){var ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ye=arguments[3],ge={};return ye||(oe=Ne(Fe(oe,ie),ie),K=Ne(Fe(K,ie),ie)),ie=ie||{},!ie.tolerant&&K.scheme?(ge.scheme=K.scheme,ge.userinfo=K.userinfo,ge.host=K.host,ge.port=K.port,ge.path=Ce(K.path||""),ge.query=K.query):(K.userinfo!==void 0||K.host!==void 0||K.port!==void 0?(ge.userinfo=K.userinfo,ge.host=K.host,ge.port=K.port,ge.path=Ce(K.path||""),ge.query=K.query):(K.path?(K.path.charAt(0)==="/"?ge.path=Ce(K.path):((oe.userinfo!==void 0||oe.host!==void 0||oe.port!==void 0)&&!oe.path?ge.path="/"+K.path:oe.path?ge.path=oe.path.slice(0,oe.path.lastIndexOf("/")+1)+K.path:ge.path=K.path,ge.path=Ce(ge.path)),ge.query=K.query):(ge.path=oe.path,K.query!==void 0?ge.query=K.query:ge.query=oe.query),ge.userinfo=oe.userinfo,ge.host=oe.host,ge.port=oe.port),ge.scheme=oe.scheme),ge.fragment=K.fragment,ge}function Ie(oe,K,ie){var ye=d({scheme:"null"},ie);return Fe(_e(Ne(oe,ye),Ne(K,ye),ye,!0),ye)}function Oe(oe,K){return typeof oe=="string"?oe=Fe(Ne(oe,K),K):s(oe)==="object"&&(oe=Ne(Fe(oe,K),K)),oe}function Je(oe,K,ie){return typeof oe=="string"?oe=Fe(Ne(oe,ie),ie):s(oe)==="object"&&(oe=Fe(oe,ie)),typeof K=="string"?K=Fe(Ne(K,ie),ie):s(K)==="object"&&(K=Fe(K,ie)),oe===K}function at(oe,K){return oe&&oe.toString().replace(!K||!K.iri?m.ESCAPE:h.ESCAPE,Z)}function Rt(oe,K){return oe&&oe.toString().replace(!K||!K.iri?m.PCT_ENCODED:h.PCT_ENCODED,ne)}var Ot={scheme:"http",domainHost:!0,parse:function(K,ie){return K.host||(K.error=K.error||"HTTP URIs must have a host."),K},serialize:function(K,ie){var ye=String(K.scheme).toLowerCase()==="https";return(K.port===(ye?443:80)||K.port==="")&&(K.port=void 0),K.path||(K.path="/"),K}},Cn={scheme:"https",domainHost:Ot.domainHost,parse:Ot.parse,serialize:Ot.serialize};function vr(oe){return typeof oe.secure=="boolean"?oe.secure:String(oe.scheme).toLowerCase()==="wss"}var or={scheme:"ws",domainHost:!0,parse:function(K,ie){var ye=K;return ye.secure=vr(ye),ye.resourceName=(ye.path||"/")+(ye.query?"?"+ye.query:""),ye.path=void 0,ye.query=void 0,ye},serialize:function(K,ie){if((K.port===(vr(K)?443:80)||K.port==="")&&(K.port=void 0),typeof K.secure=="boolean"&&(K.scheme=K.secure?"wss":"ws",K.secure=void 0),K.resourceName){var ye=K.resourceName.split("?"),ge=v(ye,2),je=ge[0],Be=ge[1];K.path=je&&je!=="/"?je:void 0,K.query=Be,K.resourceName=void 0}return K.fragment=void 0,K}},Mt={scheme:"wss",domainHost:or.domainHost,parse:or.parse,serialize:or.serialize},Zt={},fr="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Sr="[0-9A-Fa-f]",zn=a(a("%[EFef]"+Sr+"%"+Sr+Sr+"%"+Sr+Sr)+"|"+a("%[89A-Fa-f]"+Sr+"%"+Sr+Sr)+"|"+a("%"+Sr+Sr)),ir="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Gt="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",pn=n(Gt,'[\\"\\\\]'),ua="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",an=new RegExp(fr,"g"),Qe=new RegExp(zn,"g"),jt=new RegExp(n("[^]",ir,"[\\.]",'[\\"]',pn),"g"),Qt=new RegExp(n("[^]",fr,ua),"g"),Lr=Qt;function $n(oe){var K=ne(oe);return K.match(an)?K:oe}var Xt={scheme:"mailto",parse:function(K,ie){var ye=K,ge=ye.to=ye.path?ye.path.split(","):[];if(ye.path=void 0,ye.query){for(var je=!1,Be={},mt=ye.query.split("&"),Ut=0,sr=mt.length;Ut<sr;++Ut){var yt=mt[Ut].split("=");switch(yt[0]){case"to":for(var Ft=yt[1].split(","),Wt=0,ot=Ft.length;Wt<ot;++Wt)ge.push(Ft[Wt]);break;case"subject":ye.subject=Rt(yt[1],ie);break;case"body":ye.body=Rt(yt[1],ie);break;default:je=!0,Be[Rt(yt[0],ie)]=Rt(yt[1],ie);break}}je&&(ye.headers=Be)}ye.query=void 0;for(var Dt=0,Yt=ge.length;Dt<Yt;++Dt){var Pt=ge[Dt].split("@");if(Pt[0]=Rt(Pt[0]),ie.unicodeSupport)Pt[1]=Rt(Pt[1],ie).toLowerCase();else try{Pt[1]=F.toASCII(Rt(Pt[1],ie).toLowerCase())}catch(on){ye.error=ye.error||"Email address's domain name can not be converted to ASCII via punycode: "+on}ge[Dt]=Pt.join("@")}return ye},serialize:function(K,ie){var ye=K,ge=c(K.to);if(ge){for(var je=0,Be=ge.length;je<Be;++je){var mt=String(ge[je]),Ut=mt.lastIndexOf("@"),sr=mt.slice(0,Ut).replace(Qe,$n).replace(Qe,l).replace(jt,Z),yt=mt.slice(Ut+1);try{yt=ie.iri?F.toUnicode(yt):F.toASCII(Rt(yt,ie).toLowerCase())}catch(Dt){ye.error=ye.error||"Email address's domain name can not be converted to "+(ie.iri?"Unicode":"ASCII")+" via punycode: "+Dt}ge[je]=sr+"@"+yt}ye.path=ge.join(",")}var Ft=K.headers=K.headers||{};K.subject&&(Ft.subject=K.subject),K.body&&(Ft.body=K.body);var Wt=[];for(var ot in Ft)Ft[ot]!==Zt[ot]&&Wt.push(ot.replace(Qe,$n).replace(Qe,l).replace(Qt,Z)+"="+Ft[ot].replace(Qe,$n).replace(Qe,l).replace(Lr,Z));return Wt.length&&(ye.query=Wt.join("&")),ye}},Jr=/^([^\:]+)\:(.*)/,_a={scheme:"urn",parse:function(K,ie){var ye=K.path&&K.path.match(Jr),ge=K;if(ye){var je=ie.scheme||ge.scheme||"urn",Be=ye[1].toLowerCase(),mt=ye[2],Ut=je+":"+(ie.nid||Be),sr=j[Ut];ge.nid=Be,ge.nss=mt,ge.path=void 0,sr&&(ge=sr.parse(ge,ie))}else ge.error=ge.error||"URN can not be parsed.";return ge},serialize:function(K,ie){var ye=ie.scheme||K.scheme||"urn",ge=K.nid,je=ye+":"+(ie.nid||ge),Be=j[je];Be&&(K=Be.serialize(K,ie));var mt=K,Ut=K.nss;return mt.path=(ge||ie.nid)+":"+Ut,mt}},en=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Br={scheme:"urn:uuid",parse:function(K,ie){var ye=K;return ye.uuid=ye.nss,ye.nss=void 0,!ie.tolerant&&(!ye.uuid||!ye.uuid.match(en))&&(ye.error=ye.error||"UUID is not valid."),ye},serialize:function(K,ie){var ye=K;return ye.nss=(K.uuid||"").toLowerCase(),ye}};j[Ot.scheme]=Ot,j[Cn.scheme]=Cn,j[or.scheme]=or,j[Mt.scheme]=Mt,j[Xt.scheme]=Xt,j[_a.scheme]=_a,j[Br.scheme]=Br,r.SCHEMES=j,r.pctEncChar=Z,r.pctDecChars=ne,r.parse=Ne,r.removeDotSegments=Ce,r.serialize=Fe,r.resolveComponents=_e,r.resolve=Ie,r.normalize=Oe,r.equal=Je,r.escapeComponent=at,r.unescapeComponent=Rt,Object.defineProperty(r,"__esModule",{value:!0})}))})(Tu,Tu.exports)),Tu.exports}var Fv,eI;function nR(){return eI||(eI=1,Fv=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!t(e[a],r[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=n;a--!==0;){var l=s[a];if(!t(e[l],r[l]))return!1}return!0}return e!==e&&r!==r}),Fv}var zv,tI;function n8(){return tI||(tI=1,zv=function(e){for(var r=0,n=e.length,a=0,s;a<n;)r++,s=e.charCodeAt(a++),s>=55296&&s<=56319&&a<n&&(s=e.charCodeAt(a),(s&64512)==56320&&a++);return r}),zv}var $v,rI;function pc(){if(rI)return $v;rI=1,$v={copy:t,checkDataType:e,checkDataTypes:r,coerceToTypes:a,toHash:s,getProperty:d,escapeQuotes:f,equal:nR(),ucs2length:n8(),varOccurences:m,varReplace:h,schemaHasRules:v,schemaHasRulesExcept:y,schemaUnknownRules:w,toQuotedString:S,getPathExpr:R,getPath:x,getData:N,unescapeFragment:A,unescapeJsonPointer:L,escapeFragment:I,escapeJsonPointer:O};function t(M,P){P=P||{};for(var Y in M)P[Y]=M[Y];return P}function e(M,P,Y,Q){var J=Q?" !== ":" === ",ee=Q?" || ":" && ",U=Q?"!":"",G=Q?"":"!";switch(M){case"null":return P+J+"null";case"array":return U+"Array.isArray("+P+")";case"object":return"("+U+P+ee+"typeof "+P+J+'"object"'+ee+G+"Array.isArray("+P+"))";case"integer":return"(typeof "+P+J+'"number"'+ee+G+"("+P+" % 1)"+ee+P+J+P+(Y?ee+U+"isFinite("+P+")":"")+")";case"number":return"(typeof "+P+J+'"'+M+'"'+(Y?ee+U+"isFinite("+P+")":"")+")";default:return"typeof "+P+J+'"'+M+'"'}}function r(M,P,Y){switch(M.length){case 1:return e(M[0],P,Y,!0);default:var Q="",J=s(M);J.array&&J.object&&(Q=J.null?"(":"(!"+P+" || ",Q+="typeof "+P+' !== "object")',delete J.null,delete J.array,delete J.object),J.number&&delete J.integer;for(var ee in J)Q+=(Q?" && ":"")+e(ee,P,Y,!0);return Q}}var n=s(["string","number","integer","boolean","null"]);function a(M,P){if(Array.isArray(P)){for(var Y=[],Q=0;Q<P.length;Q++){var J=P[Q];(n[J]||M==="array"&&J==="array")&&(Y[Y.length]=J)}if(Y.length)return Y}else{if(n[P])return[P];if(M==="array"&&P==="array")return["array"]}}function s(M){for(var P={},Y=0;Y<M.length;Y++)P[M[Y]]=!0;return P}var l=/^[a-z$_][a-z$_0-9]*$/i,c=/'|\\/g;function d(M){return typeof M=="number"?"["+M+"]":l.test(M)?"."+M:"['"+f(M)+"']"}function f(M){return M.replace(c,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function m(M,P){P+="[^0-9]";var Y=M.match(new RegExp(P,"g"));return Y?Y.length:0}function h(M,P,Y){return P+="([^0-9])",Y=Y.replace(/\$/g,"$$$$"),M.replace(new RegExp(P,"g"),Y+"$1")}function v(M,P){if(typeof M=="boolean")return!M;for(var Y in M)if(P[Y])return!0}function y(M,P,Y){if(typeof M=="boolean")return!M&&Y!="not";for(var Q in M)if(Q!=Y&&P[Q])return!0}function w(M,P){if(typeof M!="boolean"){for(var Y in M)if(!P[Y])return Y}}function S(M){return"'"+f(M)+"'"}function R(M,P,Y,Q){var J=Y?"'/' + "+P+(Q?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):Q?"'[' + "+P+" + ']'":"'[\\'' + "+P+" + '\\']'";return k(M,J)}function x(M,P,Y){var Q=S(Y?"/"+O(P):d(P));return k(M,Q)}var _=/^\/(?:[^~]|~0|~1)*$/,C=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function N(M,P,Y){var Q,J,ee,U;if(M==="")return"rootData";if(M[0]=="/"){if(!_.test(M))throw new Error("Invalid JSON-pointer: "+M);J=M,ee="rootData"}else{if(U=M.match(C),!U)throw new Error("Invalid JSON-pointer: "+M);if(Q=+U[1],J=U[2],J=="#"){if(Q>=P)throw new Error("Cannot access property/index "+Q+" levels up, current level is "+P);return Y[P-Q]}if(Q>P)throw new Error("Cannot access data "+Q+" levels up, current level is "+P);if(ee="data"+(P-Q||""),!J)return ee}for(var G=ee,H=J.split("/"),X=0;X<H.length;X++){var ae=H[X];ae&&(ee+=d(L(ae)),G+=" && "+ee)}return G}function k(M,P){return M=='""'?P:(M+" + "+P).replace(/([^\\])' \+ '/g,"$1")}function A(M){return L(decodeURIComponent(M))}function I(M){return encodeURIComponent(O(M))}function O(M){return M.replace(/~/g,"~0").replace(/\//g,"~1")}function L(M){return M.replace(/~1/g,"/").replace(/~0/g,"~")}return $v}var Bv,nI;function L2(){if(nI)return Bv;nI=1;var t=pc();Bv=e;function e(r){t.copy(r,this)}return Bv}var qv={exports:{}},aI;function a8(){if(aI)return qv.exports;aI=1;var t=qv.exports=function(n,a,s){typeof a=="function"&&(s=a,a={}),s=a.cb||s;var l=typeof s=="function"?s:s.pre||function(){},c=s.post||function(){};e(a,l,c,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,a,s,l,c,d,f,m,h,v){if(l&&typeof l=="object"&&!Array.isArray(l)){a(l,c,d,f,m,h,v);for(var y in l){var w=l[y];if(Array.isArray(w)){if(y in t.arrayKeywords)for(var S=0;S<w.length;S++)e(n,a,s,w[S],c+"/"+y+"/"+S,d,c,y,l,S)}else if(y in t.propsKeywords){if(w&&typeof w=="object")for(var R in w)e(n,a,s,w[R],c+"/"+y+"/"+r(R),d,c,y,l,R)}else(y in t.keywords||n.allKeys&&!(y in t.skipKeywords))&&e(n,a,s,w,c+"/"+y,d,c,y,l)}s(l,c,d,f,m,h,v)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return qv.exports}var Hv,oI;function aR(){if(oI)return Hv;oI=1;var t=r8(),e=nR(),r=pc(),n=L2(),a=a8();Hv=s,s.normalizeId=x,s.fullPath=w,s.url=_,s.ids=C,s.inlineRef=h,s.schema=l;function s(N,k,A){var I=this._refs[A];if(typeof I=="string")if(this._refs[I])I=this._refs[I];else return s.call(this,N,k,I);if(I=I||this._schemas[A],I instanceof n)return h(I.schema,this._opts.inlineRefs)?I.schema:I.validate||this._compile(I);var O=l.call(this,k,A),L,M,P;return O&&(L=O.schema,k=O.root,P=O.baseId),L instanceof n?M=L.validate||N.call(this,L.schema,k,void 0,P):L!==void 0&&(M=h(L,this._opts.inlineRefs)?L:N.call(this,L,k,void 0,P)),M}function l(N,k){var A=t.parse(k),I=S(A),O=w(this._getId(N.schema));if(Object.keys(N.schema).length===0||I!==O){var L=x(I),M=this._refs[L];if(typeof M=="string")return c.call(this,N,M,A);if(M instanceof n)M.validate||this._compile(M),N=M;else if(M=this._schemas[L],M instanceof n){if(M.validate||this._compile(M),L==x(k))return{schema:M,root:N,baseId:O};N=M}else return;if(!N.schema)return;O=w(this._getId(N.schema))}return f.call(this,A,O,N.schema,N)}function c(N,k,A){var I=l.call(this,N,k);if(I){var O=I.schema,L=I.baseId;N=I.root;var M=this._getId(O);return M&&(L=_(L,M)),f.call(this,A,L,O,N)}}var d=r.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function f(N,k,A,I){if(N.fragment=N.fragment||"",N.fragment.slice(0,1)=="/"){for(var O=N.fragment.split("/"),L=1;L<O.length;L++){var M=O[L];if(M){if(M=r.unescapeFragment(M),A=A[M],A===void 0)break;var P;if(!d[M]&&(P=this._getId(A),P&&(k=_(k,P)),A.$ref)){var Y=_(k,A.$ref),Q=l.call(this,I,Y);Q&&(A=Q.schema,I=Q.root,k=Q.baseId)}}}if(A!==void 0&&A!==I.schema)return{schema:A,root:I,baseId:k}}}var m=r.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function h(N,k){if(k===!1)return!1;if(k===void 0||k===!0)return v(N);if(k)return y(N)<=k}function v(N){var k;if(Array.isArray(N)){for(var A=0;A<N.length;A++)if(k=N[A],typeof k=="object"&&!v(k))return!1}else for(var I in N)if(I=="$ref"||(k=N[I],typeof k=="object"&&!v(k)))return!1;return!0}function y(N){var k=0,A;if(Array.isArray(N)){for(var I=0;I<N.length;I++)if(A=N[I],typeof A=="object"&&(k+=y(A)),k==1/0)return 1/0}else for(var O in N){if(O=="$ref")return 1/0;if(m[O])k++;else if(A=N[O],typeof A=="object"&&(k+=y(A)+1),k==1/0)return 1/0}return k}function w(N,k){k!==!1&&(N=x(N));var A=t.parse(N);return S(A)}function S(N){return t.serialize(N).split("#")[0]+"#"}var R=/#\/?$/;function x(N){return N?N.replace(R,""):""}function _(N,k){return k=x(k),t.resolve(N,k)}function C(N){var k=x(this._getId(N)),A={"":k},I={"":w(k,!1)},O={},L=this;return a(N,{allKeys:!0},function(M,P,Y,Q,J,ee,U){if(P!==""){var G=L._getId(M),H=A[Q],X=I[Q]+"/"+J;if(U!==void 0&&(X+="/"+(typeof U=="number"?U:r.escapeFragment(U))),typeof G=="string"){G=H=x(H?t.resolve(H,G):G);var ae=L._refs[G];if(typeof ae=="string"&&(ae=L._refs[ae]),ae&&ae.schema){if(!e(M,ae.schema))throw new Error('id "'+G+'" resolves to more than one schema')}else if(G!=x(X))if(G[0]=="#"){if(O[G]&&!e(M,O[G]))throw new Error('id "'+G+'" resolves to more than one schema');O[G]=M}else L._refs[G]=X}A[P]=H,I[P]=X}}),O}return Hv}var Vv,iI;function oR(){if(iI)return Vv;iI=1;var t=aR();Vv={Validation:n(e),MissingRef:n(r)};function e(a){this.message="validation failed",this.errors=a,this.ajv=this.validation=!0}r.message=function(a,s){return"can't resolve reference "+s+" from id "+a};function r(a,s,l){this.message=l||r.message(a,s),this.missingRef=t.url(a,s),this.missingSchema=t.normalizeId(t.fullPath(this.missingRef))}function n(a){return a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a}return Vv}var Gv,sI;function M2(){return sI||(sI=1,Gv=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=typeof e.cycles=="boolean"?e.cycles:!1,n=e.cmp&&(function(s){return function(l){return function(c,d){var f={key:c,value:l[c]},m={key:d,value:l[d]};return s(f,m)}}})(e.cmp),a=[];return(function s(l){if(l&&l.toJSON&&typeof l.toJSON=="function"&&(l=l.toJSON()),l!==void 0){if(typeof l=="number")return isFinite(l)?""+l:"null";if(typeof l!="object")return JSON.stringify(l);var c,d;if(Array.isArray(l)){for(d="[",c=0;c<l.length;c++)c&&(d+=","),d+=s(l[c])||"null";return d+"]"}if(l===null)return"null";if(a.indexOf(l)!==-1){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var f=a.push(l)-1,m=Object.keys(l).sort(n&&n(l));for(d="",c=0;c<m.length;c++){var h=m[c],v=s(l[h]);v&&(d&&(d+=","),d+=JSON.stringify(h)+":"+v)}return a.splice(f,1),"{"+d+"}"}})(t)}),Gv}var Wv,lI;function P2(){return lI||(lI=1,Wv=function(e,r,n){var a="",s=e.schema.$async===!0,l=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),c=e.self._getId(e.schema);if(e.opts.strictKeywords){var d=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(d){var f="unknown keyword: "+d;if(e.opts.strictKeywords==="log")e.logger.warn(f);else throw new Error(f)}}if(e.isTop&&(a+=" var validate = ",s&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",c&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" "+("/*# sourceURL="+c+" */")+" ")),typeof e.schema=="boolean"||!(l||e.schema.$ref)){var r="false schema",m=e.level,h=e.dataLevel,v=e.schema[r],y=e.schemaPath+e.util.getProperty(r),w=e.errSchemaPath+"/"+r,k=!e.opts.allErrors,O,S="data"+(h||""),N="valid"+m;if(e.schema===!1){e.isTop?k=!0:a+=" var "+N+" = false; ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(w)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var x=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?s?a+=" return data; ":a+=" validate.errors = null; return true; ":a+=" var "+N+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var _=e.isTop,m=e.level=0,h=e.dataLevel=0,S="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],e.schema.default!==void 0&&e.opts.useDefaults&&e.opts.strictDefaults){var C="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(C);else throw new Error(C)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{var m=e.level,h=e.dataLevel,S="data"+(h||"");if(c&&(e.baseId=e.resolve.url(e.baseId,c)),s&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+m+" = errors;"}var N="valid"+m,k=!e.opts.allErrors,A="",I="",O,L=e.schema.type,M=Array.isArray(L);if(L&&e.opts.nullable&&e.schema.nullable===!0&&(M?L.indexOf("null")==-1&&(L=L.concat("null")):L!="null"&&(L=[L,"null"],M=!0)),M&&L.length==1&&(L=L[0],M=!1),e.schema.$ref&&l){if(e.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');e.opts.extendRefs!==!0&&(l=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),L){if(e.opts.coerceTypes)var P=e.util.coerceToTypes(e.opts.coerceTypes,L);var Y=e.RULES.types[L];if(P||M||Y===!0||Y&&!$e(Y)){var y=e.schemaPath+".type",w=e.errSchemaPath+"/type",y=e.schemaPath+".type",w=e.errSchemaPath+"/type",Q=M?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[Q](L,S,e.opts.strictNumbers,!0)+") { ",P){var J="dataType"+m,ee="coerced"+m;a+=" var "+J+" = typeof "+S+"; var "+ee+" = undefined; ",e.opts.coerceTypes=="array"&&(a+=" if ("+J+" == 'object' && Array.isArray("+S+") && "+S+".length == 1) { "+S+" = "+S+"[0]; "+J+" = typeof "+S+"; if ("+e.util.checkDataType(e.schema.type,S,e.opts.strictNumbers)+") "+ee+" = "+S+"; } "),a+=" if ("+ee+" !== undefined) ; ";var U=P;if(U)for(var G,H=-1,X=U.length-1;H<X;)G=U[H+=1],G=="string"?a+=" else if ("+J+" == 'number' || "+J+" == 'boolean') "+ee+" = '' + "+S+"; else if ("+S+" === null) "+ee+" = ''; ":G=="number"||G=="integer"?(a+=" else if ("+J+" == 'boolean' || "+S+" === null || ("+J+" == 'string' && "+S+" && "+S+" == +"+S+" ",G=="integer"&&(a+=" && !("+S+" % 1)"),a+=")) "+ee+" = +"+S+"; "):G=="boolean"?a+=" else if ("+S+" === 'false' || "+S+" === 0 || "+S+" === null) "+ee+" = false; else if ("+S+" === 'true' || "+S+" === 1) "+ee+" = true; ":G=="null"?a+=" else if ("+S+" === '' || "+S+" === 0 || "+S+" === false) "+ee+" = null; ":e.opts.coerceTypes=="array"&&G=="array"&&(a+=" else if ("+J+" == 'string' || "+J+" == 'number' || "+J+" == 'boolean' || "+S+" == null) "+ee+" = ["+S+"]; ");a+=" else { ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(w)+" , params: { type: '",M?a+=""+L.join(","):a+=""+L,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",M?a+=""+L.join(","):a+=""+L,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var x=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+ee+" !== undefined) { ";var ae=h?"data"+(h-1||""):"parentData",z=h?e.dataPathArr[h]:"parentDataProperty";a+=" "+S+" = "+ee+"; ",h||(a+="if ("+ae+" !== undefined)"),a+=" "+ae+"["+z+"] = "+ee+"; } "}else{var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(w)+" , params: { type: '",M?a+=""+L.join(","):a+=""+L,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",M?a+=""+L.join(","):a+=""+L,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var x=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!l)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",k&&(a+=" } if (errors === ",_?a+="0":a+="errs_"+m,a+=") { ",I+="}");else{var q=e.RULES;if(q){for(var Y,$=-1,W=q.length-1;$<W;)if(Y=q[$+=1],$e(Y)){if(Y.type&&(a+=" if ("+e.util.checkDataType(Y.type,S,e.opts.strictNumbers)+") { "),e.opts.useDefaults){if(Y.type=="object"&&e.schema.properties){var v=e.schema.properties,te=Object.keys(v),F=te;if(F)for(var j,Z=-1,ne=F.length-1;Z<ne;){j=F[Z+=1];var V=v[j];if(V.default!==void 0){var de=S+e.util.getProperty(j);if(e.compositeRule){if(e.opts.strictDefaults){var C="default is ignored for: "+de;if(e.opts.strictDefaults==="log")e.logger.warn(C);else throw new Error(C)}}else a+=" if ("+de+" === undefined ",e.opts.useDefaults=="empty"&&(a+=" || "+de+" === null || "+de+" === '' "),a+=" ) "+de+" = ",e.opts.useDefaults=="shared"?a+=" "+e.useDefault(V.default)+" ":a+=" "+JSON.stringify(V.default)+" ",a+="; "}}}else if(Y.type=="array"&&Array.isArray(e.schema.items)){var fe=e.schema.items;if(fe){for(var V,H=-1,Re=fe.length-1;H<Re;)if(V=fe[H+=1],V.default!==void 0){var de=S+"["+H+"]";if(e.compositeRule){if(e.opts.strictDefaults){var C="default is ignored for: "+de;if(e.opts.strictDefaults==="log")e.logger.warn(C);else throw new Error(C)}}else a+=" if ("+de+" === undefined ",e.opts.useDefaults=="empty"&&(a+=" || "+de+" === null || "+de+" === '' "),a+=" ) "+de+" = ",e.opts.useDefaults=="shared"?a+=" "+e.useDefault(V.default)+" ":a+=" "+JSON.stringify(V.default)+" ",a+="; "}}}}var be=Y.rules;if(be){for(var xe,Ne=-1,ze=be.length-1;Ne<ze;)if(xe=be[Ne+=1],ct(xe)){var Me=xe.code(e,xe.keyword,Y.type);Me&&(a+=" "+Me+" ",k&&(A+="}"))}}if(k&&(a+=" "+A+" ",A=""),Y.type&&(a+=" } ",L&&L===Y.type&&!P)){a+=" else { ";var y=e.schemaPath+".type",w=e.errSchemaPath+"/type",R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(w)+" , params: { type: '",M?a+=""+L.join(","):a+=""+L,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",M?a+=""+L.join(","):a+=""+L,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var x=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}k&&(a+=" if (errors === ",_?a+="0":a+="errs_"+m,a+=") { ",I+="}")}}}k&&(a+=" "+I+" "),_?(s?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+N+" = errors === errs_"+m+";";function $e(Ce){for(var Fe=Ce.rules,_e=0;_e<Fe.length;_e++)if(ct(Fe[_e]))return!0}function ct(Ce){return e.schema[Ce.keyword]!==void 0||Ce.implements&&ce(Ce)}function ce(Ce){for(var Fe=Ce.implements,_e=0;_e<Fe.length;_e++)if(e.schema[Fe[_e]]!==void 0)return!0}return a}),Wv}var Yv,cI;function o8(){if(cI)return Yv;cI=1;var t=aR(),e=pc(),r=oR(),n=M2(),a=P2(),s=e.ucs2length,l=nR(),c=r.Validation;Yv=d;function d(x,_,C,N){var k=this,A=this._opts,I=[void 0],O={},L=[],M={},P=[],Y={},Q=[];_=_||{schema:x,refVal:I,refs:O};var J=f.call(this,x,_,N),ee=this._compilations[J.index];if(J.compiling)return ee.callValidate=ae;var U=this._formats,G=this.RULES;try{var H=z(x,_,C,N);ee.validate=H;var X=ee.callValidate;return X&&(X.schema=H.schema,X.errors=null,X.refs=H.refs,X.refVal=H.refVal,X.root=H.root,X.$async=H.$async,A.sourceCode&&(X.source=H.source)),H}finally{m.call(this,x,_,N)}function ae(){var V=ee.validate,de=V.apply(this,arguments);return ae.errors=V.errors,de}function z(V,de,fe,Re){var be=!de||de&&de.schema==V;if(de.schema!=_.schema)return d.call(k,V,de,fe,Re);var xe=V.$async===!0,Ne=a({isTop:!0,schema:V,isRoot:be,baseId:Re,root:de,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:r.MissingRef,RULES:G,validate:a,util:e,resolve:t,resolveRef:q,usePattern:j,useDefault:Z,useCustomRule:ne,opts:A,formats:U,logger:k.logger,self:k});Ne=R(I,w)+R(L,v)+R(P,y)+R(Q,S)+Ne,A.processCode&&(Ne=A.processCode(Ne,V));var ze;try{var Me=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",Ne);ze=Me(k,G,U,_,I,P,Q,l,s,c),I[0]=ze}catch($e){throw k.logger.error("Error compiling schema, function code:",Ne),$e}return ze.schema=V,ze.errors=null,ze.refs=O,ze.refVal=I,ze.root=be?ze:de,xe&&(ze.$async=!0),A.sourceCode===!0&&(ze.source={code:Ne,patterns:L,defaults:P}),ze}function q(V,de,fe){de=t.url(V,de);var Re=O[de],be,xe;if(Re!==void 0)return be=I[Re],xe="refVal["+Re+"]",F(be,xe);if(!fe&&_.refs){var Ne=_.refs[de];if(Ne!==void 0)return be=_.refVal[Ne],xe=$(de,be),F(be,xe)}xe=$(de);var ze=t.call(k,z,_,de);if(ze===void 0){var Me=C&&C[de];Me&&(ze=t.inlineRef(Me,A.inlineRefs)?Me:d.call(k,Me,_,C,V))}if(ze===void 0)W(de);else return te(de,ze),F(ze,xe)}function $(V,de){var fe=I.length;return I[fe]=de,O[V]=fe,"refVal"+fe}function W(V){delete O[V]}function te(V,de){var fe=O[V];I[fe]=de}function F(V,de){return typeof V=="object"||typeof V=="boolean"?{code:de,schema:V,inline:!0}:{code:de,$async:V&&!!V.$async}}function j(V){var de=M[V];return de===void 0&&(de=M[V]=L.length,L[de]=V),"pattern"+de}function Z(V){switch(typeof V){case"boolean":case"number":return""+V;case"string":return e.toQuotedString(V);case"object":if(V===null)return"null";var de=n(V),fe=Y[de];return fe===void 0&&(fe=Y[de]=P.length,P[fe]=V),"default"+fe}}function ne(V,de,fe,Re){if(k._opts.validateSchema!==!1){var be=V.definition.dependencies;if(be&&!be.every(function(Fe){return Object.prototype.hasOwnProperty.call(fe,Fe)}))throw new Error("parent schema must have all required keywords: "+be.join(","));var xe=V.definition.validateSchema;if(xe){var Ne=xe(de);if(!Ne){var ze="keyword schema is invalid: "+k.errorsText(xe.errors);if(k._opts.validateSchema=="log")k.logger.error(ze);else throw new Error(ze)}}}var Me=V.definition.compile,$e=V.definition.inline,ct=V.definition.macro,ce;if(Me)ce=Me.call(k,de,fe,Re);else if(ct)ce=ct.call(k,de,fe,Re),A.validateSchema!==!1&&k.validateSchema(ce,!0);else if($e)ce=$e.call(k,Re,V.keyword,de,fe);else if(ce=V.definition.validate,!ce)return;if(ce===void 0)throw new Error('custom keyword "'+V.keyword+'"failed to compile');var Ce=Q.length;return Q[Ce]=ce,{code:"customRule"+Ce,validate:ce}}}function f(x,_,C){var N=h.call(this,x,_,C);return N>=0?{index:N,compiling:!0}:(N=this._compilations.length,this._compilations[N]={schema:x,root:_,baseId:C},{index:N,compiling:!1})}function m(x,_,C){var N=h.call(this,x,_,C);N>=0&&this._compilations.splice(N,1)}function h(x,_,C){for(var N=0;N<this._compilations.length;N++){var k=this._compilations[N];if(k.schema==x&&k.root==_&&k.baseId==C)return N}return-1}function v(x,_){return"var pattern"+x+" = new RegExp("+e.toQuotedString(_[x])+");"}function y(x){return"var default"+x+" = defaults["+x+"];"}function w(x,_){return _[x]===void 0?"":"var refVal"+x+" = refVal["+x+"];"}function S(x){return"var customRule"+x+" = customRules["+x+"];"}function R(x,_){if(!x.length)return"";for(var C="",N=0;N<x.length;N++)C+=_(N,x);return C}return Yv}var Kv={exports:{}},uI;function i8(){if(uI)return Kv.exports;uI=1;var t=Kv.exports=function(){this._cache={}};return t.prototype.put=function(r,n){this._cache[r]=n},t.prototype.get=function(r){return this._cache[r]},t.prototype.del=function(r){delete this._cache[r]},t.prototype.clear=function(){this._cache={}},Kv.exports}var Zv,dI;function s8(){if(dI)return Zv;dI=1;var t=pc(),e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,a=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,s=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,d=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,f=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,m=/^(?:\/(?:[^~/]|~0|~1)*)*$/,h=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,v=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;Zv=y;function y(I){return I=I=="full"?"full":"fast",t.copy(y[I])}y.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:d,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:A,uuid:f,"json-pointer":m,"json-pointer-uri-fragment":h,"relative-json-pointer":v},y.full={date:S,time:R,"date-time":_,uri:N,"uri-reference":l,"uri-template":c,url:d,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:A,uuid:f,"json-pointer":m,"json-pointer-uri-fragment":h,"relative-json-pointer":v};function w(I){return I%4===0&&(I%100!==0||I%400===0)}function S(I){var O=I.match(e);if(!O)return!1;var L=+O[1],M=+O[2],P=+O[3];return M>=1&&M<=12&&P>=1&&P<=(M==2&&w(L)?29:r[M])}function R(I,O){var L=I.match(n);if(!L)return!1;var M=L[1],P=L[2],Y=L[3],Q=L[5];return(M<=23&&P<=59&&Y<=59||M==23&&P==59&&Y==60)&&(!O||Q)}var x=/t|\s/i;function _(I){var O=I.split(x);return O.length==2&&S(O[0])&&R(O[1],!0)}var C=/\/|:/;function N(I){return C.test(I)&&s.test(I)}var k=/[^\\]\\Z/;function A(I){if(k.test(I))return!1;try{return new RegExp(I),!0}catch{return!1}}return Zv}var Xv,fI;function l8(){return fI||(fI=1,Xv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.errSchemaPath+"/"+r,f=!e.opts.allErrors,m="data"+(l||""),h="valid"+s,v,y;if(c=="#"||c=="#/")e.isRoot?(v=e.async,y="validate"):(v=e.root.schema.$async===!0,y="root.refVal[0]");else{var w=e.resolveRef(e.baseId,c,e.isRoot);if(w===void 0){var S=e.MissingRefError.message(e.baseId,c);if(e.opts.missingRefs=="fail"){e.logger.error(S);var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",e.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(a+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),a+=" } "):a+=" {} ";var x=a;a=R.pop(),!e.compositeRule&&f?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f&&(a+=" if (false) { ")}else if(e.opts.missingRefs=="ignore")e.logger.warn(S),f&&(a+=" if (true) { ");else throw new e.MissingRefError(e.baseId,c,S)}else if(w.inline){var _=e.util.copy(e);_.level++;var C="valid"+_.level;_.schema=w.schema,_.schemaPath="",_.errSchemaPath=c;var N=e.validate(_).replace(/validate\.schema/g,w.code);a+=" "+N+" ",f&&(a+=" if ("+C+") { ")}else v=w.$async===!0||e.async&&w.$async!==!1,y=w.code}if(y){var R=R||[];R.push(a),a="",e.opts.passContext?a+=" "+y+".call(this, ":a+=" "+y+"( ",a+=" "+m+", (dataPath || '')",e.errorPath!='""'&&(a+=" + "+e.errorPath);var k=l?"data"+(l-1||""):"parentData",A=l?e.dataPathArr[l]:"parentDataProperty";a+=" , "+k+" , "+A+", rootData) ";var I=a;if(a=R.pop(),v){if(!e.async)throw new Error("async schema referenced by sync schema");f&&(a+=" var "+h+"; "),a+=" try { await "+I+"; ",f&&(a+=" "+h+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",f&&(a+=" "+h+" = false; "),a+=" } ",f&&(a+=" if ("+h+") { ")}else a+=" if (!"+I+") { if (vErrors === null) vErrors = "+y+".errors; else vErrors = vErrors.concat("+y+".errors); errors = vErrors.length; } ",f&&(a+=" else { ")}return a}),Xv}var Qv,pI;function c8(){return pI||(pI=1,Qv=function(e,r,n){var a=" ",s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,f=e.util.copy(e),m="";f.level++;var h="valid"+f.level,v=f.baseId,y=!0,w=s;if(w)for(var S,R=-1,x=w.length-1;R<x;)S=w[R+=1],(e.opts.strictKeywords?typeof S=="object"&&Object.keys(S).length>0||S===!1:e.util.schemaHasRules(S,e.RULES.all))&&(y=!1,f.schema=S,f.schemaPath=l+"["+R+"]",f.errSchemaPath=c+"/"+R,a+=" "+e.validate(f)+" ",f.baseId=v,d&&(a+=" if ("+h+") { ",m+="}"));return d&&(y?a+=" if (true) { ":a+=" "+m.slice(0,-1)+" "),a}),Qv}var Jv,mI;function u8(){return mI||(mI=1,Jv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y="errs__"+s,w=e.util.copy(e),S="";w.level++;var R="valid"+w.level,x=c.every(function(O){return e.opts.strictKeywords?typeof O=="object"&&Object.keys(O).length>0||O===!1:e.util.schemaHasRules(O,e.RULES.all)});if(x){var _=w.baseId;a+=" var "+y+" = errors; var "+v+" = false; ";var C=e.compositeRule;e.compositeRule=w.compositeRule=!0;var N=c;if(N)for(var k,A=-1,I=N.length-1;A<I;)k=N[A+=1],w.schema=k,w.schemaPath=d+"["+A+"]",w.errSchemaPath=f+"/"+A,a+=" "+e.validate(w)+" ",w.baseId=_,a+=" "+v+" = "+v+" || "+R+"; if (!"+v+") { ",S+="}";e.compositeRule=w.compositeRule=C,a+=" "+S+" if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+y+"; if (vErrors !== null) { if ("+y+") vErrors.length = "+y+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else m&&(a+=" if (true) { ");return a}),Jv}var eb,hI;function d8(){return hI||(hI=1,eb=function(e,r,n){var a=" ",s=e.schema[r],l=e.errSchemaPath+"/"+r;e.opts.allErrors;var c=e.util.toQuotedString(s);return e.opts.$comment===!0?a+=" console.log("+c+");":typeof e.opts.$comment=="function"&&(a+=" self._opts.$comment("+c+", "+e.util.toQuotedString(l)+", validate.root.schema);"),a}),eb}var tb,gI;function f8(){return gI||(gI=1,tb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y=e.opts.$data&&c&&c.$data;y&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; "),y||(a+=" var schema"+s+" = validate.schema"+d+";"),a+="var "+v+" = equal("+h+", schema"+s+"); if (!"+v+") { ";var w=w||[];w.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { allowedValue: schema"+s+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var S=a;return a=w.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",m&&(a+=" else { "),a}),tb}var rb,vI;function p8(){return vI||(vI=1,rb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y="errs__"+s,w=e.util.copy(e),S="";w.level++;var R="valid"+w.level,x="i"+s,_=w.dataLevel=e.dataLevel+1,C="data"+_,N=e.baseId,k=e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all);if(a+="var "+y+" = errors;var "+v+";",k){var A=e.compositeRule;e.compositeRule=w.compositeRule=!0,w.schema=c,w.schemaPath=d,w.errSchemaPath=f,a+=" var "+R+" = false; for (var "+x+" = 0; "+x+" < "+h+".length; "+x+"++) { ",w.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0);var I=h+"["+x+"]";w.dataPathArr[_]=x;var O=e.validate(w);w.baseId=N,e.util.varOccurences(O,C)<2?a+=" "+e.util.varReplace(O,C,I)+" ":a+=" var "+C+" = "+I+"; "+O+" ",a+=" if ("+R+") break; } ",e.compositeRule=w.compositeRule=A,a+=" "+S+" if (!"+R+") {"}else a+=" if ("+h+".length == 0) {";var L=L||[];L.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var M=a;return a=L.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",k&&(a+=" errors = "+y+"; if (vErrors !== null) { if ("+y+") vErrors.length = "+y+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a}),rb}var nb,bI;function m8(){return bI||(bI=1,nb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,y=e.util.copy(e),w="";y.level++;var S="valid"+y.level,R={},x={},_=e.opts.ownProperties;for(A in c)if(A!="__proto__"){var C=c[A],N=Array.isArray(C)?x:R;N[A]=C}a+="var "+v+" = errors;";var k=e.errorPath;a+="var missing"+s+";";for(var A in x)if(N=x[A],N.length){if(a+=" if ( "+h+e.util.getProperty(A)+" !== undefined ",_&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(A)+"') "),m){a+=" && ( ";var I=N;if(I)for(var O,L=-1,M=I.length-1;L<M;){O=I[L+=1],L&&(a+=" || ");var P=e.util.getProperty(O),Y=h+P;a+=" ( ( "+Y+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(O)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:P)+") ) "}a+=")) { ";var Q="missing"+s,J="' + "+Q+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(k,Q,!0):k+" + "+Q);var ee=ee||[];ee.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { property: '"+e.util.escapeQuotes(A)+"', missingProperty: '"+J+"', depsCount: "+N.length+", deps: '"+e.util.escapeQuotes(N.length==1?N[0]:N.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",N.length==1?a+="property "+e.util.escapeQuotes(N[0]):a+="properties "+e.util.escapeQuotes(N.join(", ")),a+=" when property "+e.util.escapeQuotes(A)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var U=a;a=ee.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var G=N;if(G)for(var O,H=-1,X=G.length-1;H<X;){O=G[H+=1];var P=e.util.getProperty(O),J=e.util.escapeQuotes(O),Y=h+P;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(k,O,e.opts.jsonPointers)),a+=" if ( "+Y+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(O)+"') "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { property: '"+e.util.escapeQuotes(A)+"', missingProperty: '"+J+"', depsCount: "+N.length+", deps: '"+e.util.escapeQuotes(N.length==1?N[0]:N.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",N.length==1?a+="property "+e.util.escapeQuotes(N[0]):a+="properties "+e.util.escapeQuotes(N.join(", ")),a+=" when property "+e.util.escapeQuotes(A)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",m&&(w+="}",a+=" else { ")}e.errorPath=k;var ae=y.baseId;for(var A in R){var C=R[A];(e.opts.strictKeywords?typeof C=="object"&&Object.keys(C).length>0||C===!1:e.util.schemaHasRules(C,e.RULES.all))&&(a+=" "+S+" = true; if ( "+h+e.util.getProperty(A)+" !== undefined ",_&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(A)+"') "),a+=") { ",y.schema=C,y.schemaPath=d+e.util.getProperty(A),y.errSchemaPath=f+"/"+e.util.escapeFragment(A),a+=" "+e.validate(y)+" ",y.baseId=ae,a+=" } ",m&&(a+=" if ("+S+") { ",w+="}"))}return m&&(a+=" "+w+" if ("+v+" == errors) {"),a}),nb}var ab,yI;function h8(){return yI||(yI=1,ab=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y=e.opts.$data&&c&&c.$data;y&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ");var w="i"+s,S="schema"+s;y||(a+=" var "+S+" = validate.schema"+d+";"),a+="var "+v+";",y&&(a+=" if (schema"+s+" === undefined) "+v+" = true; else if (!Array.isArray(schema"+s+")) "+v+" = false; else {"),a+=""+v+" = false;for (var "+w+"=0; "+w+"<"+S+".length; "+w+"++) if (equal("+h+", "+S+"["+w+"])) { "+v+" = true; break; }",y&&(a+=" } "),a+=" if (!"+v+") { ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { allowedValues: schema"+s+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var x=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",m&&(a+=" else { "),a}),ab}var ob,EI;function g8(){return EI||(EI=1,ob=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||"");if(e.opts.format===!1)return m&&(a+=" if (true) { "),a;var v=e.opts.$data&&c&&c.$data,y;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c;var w=e.opts.unknownFormats,S=Array.isArray(w);if(v){var R="format"+s,x="isObject"+s,_="formatType"+s;a+=" var "+R+" = formats["+y+"]; var "+x+" = typeof "+R+" == 'object' && !("+R+" instanceof RegExp) && "+R+".validate; var "+_+" = "+x+" && "+R+".type || 'string'; if ("+x+") { ",e.async&&(a+=" var async"+s+" = "+R+".async; "),a+=" "+R+" = "+R+".validate; } if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'string') || "),a+=" (",w!="ignore"&&(a+=" ("+y+" && !"+R+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+y+") == -1 "),a+=") || "),a+=" ("+R+" && "+_+" == '"+n+"' && !(typeof "+R+" == 'function' ? ",e.async?a+=" (async"+s+" ? await "+R+"("+h+") : "+R+"("+h+")) ":a+=" "+R+"("+h+") ",a+=" : "+R+".test("+h+"))))) {"}else{var R=e.formats[c];if(!R){if(w=="ignore")return e.logger.warn('unknown format "'+c+'" ignored in schema at path "'+e.errSchemaPath+'"'),m&&(a+=" if (true) { "),a;if(S&&w.indexOf(c)>=0)return m&&(a+=" if (true) { "),a;throw new Error('unknown format "'+c+'" is used in schema at path "'+e.errSchemaPath+'"')}var x=typeof R=="object"&&!(R instanceof RegExp)&&R.validate,_=x&&R.type||"string";if(x){var C=R.async===!0;R=R.validate}if(_!=n)return m&&(a+=" if (true) { "),a;if(C){if(!e.async)throw new Error("async format in sync schema");var N="formats"+e.util.getProperty(c)+".validate";a+=" if (!(await "+N+"("+h+"))) { "}else{a+=" if (! ";var N="formats"+e.util.getProperty(c);x&&(N+=".validate"),typeof R=="function"?a+=" "+N+"("+h+") ":a+=" "+N+".test("+h+") ",a+=") { "}}var k=k||[];k.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { format: ",v?a+=""+y:a+=""+e.util.toQuotedString(c),a+=" } ",e.opts.messages!==!1&&(a+=` , message: 'should match format "`,v?a+="' + "+y+" + '":a+=""+e.util.escapeQuotes(c),a+=`"' `),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+e.util.toQuotedString(c),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;return a=k.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+A+"]); ":a+=" validate.errors = ["+A+"]; return false; ":a+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { "),a}),ob}var ib,SI;function v8(){return SI||(SI=1,ib=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y="errs__"+s,w=e.util.copy(e);w.level++;var S="valid"+w.level,R=e.schema.then,x=e.schema.else,_=R!==void 0&&(e.opts.strictKeywords?typeof R=="object"&&Object.keys(R).length>0||R===!1:e.util.schemaHasRules(R,e.RULES.all)),C=x!==void 0&&(e.opts.strictKeywords?typeof x=="object"&&Object.keys(x).length>0||x===!1:e.util.schemaHasRules(x,e.RULES.all)),N=w.baseId;if(_||C){var k;w.createErrors=!1,w.schema=c,w.schemaPath=d,w.errSchemaPath=f,a+=" var "+y+" = errors; var "+v+" = true; ";var A=e.compositeRule;e.compositeRule=w.compositeRule=!0,a+=" "+e.validate(w)+" ",w.baseId=N,w.createErrors=!0,a+=" errors = "+y+"; if (vErrors !== null) { if ("+y+") vErrors.length = "+y+"; else vErrors = null; } ",e.compositeRule=w.compositeRule=A,_?(a+=" if ("+S+") { ",w.schema=e.schema.then,w.schemaPath=e.schemaPath+".then",w.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(w)+" ",w.baseId=N,a+=" "+v+" = "+S+"; ",_&&C?(k="ifClause"+s,a+=" var "+k+" = 'then'; "):k="'then'",a+=" } ",C&&(a+=" else { ")):a+=" if (!"+S+") { ",C&&(w.schema=e.schema.else,w.schemaPath=e.schemaPath+".else",w.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(w)+" ",w.baseId=N,a+=" "+v+" = "+S+"; ",_&&C?(k="ifClause"+s,a+=" var "+k+" = 'else'; "):k="'else'",a+=" } "),a+=" if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { failingKeyword: "+k+" } ",e.opts.messages!==!1&&(a+=` , message: 'should match "' + `+k+` + '" schema' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",m&&(a+=" else { ")}else m&&(a+=" if (true) { ");return a}),ib}var sb,xI;function b8(){return xI||(xI=1,sb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y="errs__"+s,w=e.util.copy(e),S="";w.level++;var R="valid"+w.level,x="i"+s,_=w.dataLevel=e.dataLevel+1,C="data"+_,N=e.baseId;if(a+="var "+y+" = errors;var "+v+";",Array.isArray(c)){var k=e.schema.additionalItems;if(k===!1){a+=" "+v+" = "+h+".length <= "+c.length+"; ";var A=f;f=e.errSchemaPath+"/additionalItems",a+=" if (!"+v+") { ";var I=I||[];I.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+c.length+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+c.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var O=a;a=I.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",f=A,m&&(S+="}",a+=" else { ")}var L=c;if(L){for(var M,P=-1,Y=L.length-1;P<Y;)if(M=L[P+=1],e.opts.strictKeywords?typeof M=="object"&&Object.keys(M).length>0||M===!1:e.util.schemaHasRules(M,e.RULES.all)){a+=" "+R+" = true; if ("+h+".length > "+P+") { ";var Q=h+"["+P+"]";w.schema=M,w.schemaPath=d+"["+P+"]",w.errSchemaPath=f+"/"+P,w.errorPath=e.util.getPathExpr(e.errorPath,P,e.opts.jsonPointers,!0),w.dataPathArr[_]=P;var J=e.validate(w);w.baseId=N,e.util.varOccurences(J,C)<2?a+=" "+e.util.varReplace(J,C,Q)+" ":a+=" var "+C+" = "+Q+"; "+J+" ",a+=" } ",m&&(a+=" if ("+R+") { ",S+="}")}}if(typeof k=="object"&&(e.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:e.util.schemaHasRules(k,e.RULES.all))){w.schema=k,w.schemaPath=e.schemaPath+".additionalItems",w.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+R+" = true; if ("+h+".length > "+c.length+") { for (var "+x+" = "+c.length+"; "+x+" < "+h+".length; "+x+"++) { ",w.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0);var Q=h+"["+x+"]";w.dataPathArr[_]=x;var J=e.validate(w);w.baseId=N,e.util.varOccurences(J,C)<2?a+=" "+e.util.varReplace(J,C,Q)+" ":a+=" var "+C+" = "+Q+"; "+J+" ",m&&(a+=" if (!"+R+") break; "),a+=" } } ",m&&(a+=" if ("+R+") { ",S+="}")}}else if(e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){w.schema=c,w.schemaPath=d,w.errSchemaPath=f,a+=" for (var "+x+" = 0; "+x+" < "+h+".length; "+x+"++) { ",w.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0);var Q=h+"["+x+"]";w.dataPathArr[_]=x;var J=e.validate(w);w.baseId=N,e.util.varOccurences(J,C)<2?a+=" "+e.util.varReplace(J,C,Q)+" ":a+=" var "+C+" = "+Q+"; "+J+" ",m&&(a+=" if (!"+R+") break; "),a+=" }"}return m&&(a+=" "+S+" if ("+y+" == errors) {"),a}),sb}var lb,wI;function _I(){return wI||(wI=1,lb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,N,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c;var w=r=="maximum",S=w?"exclusiveMaximum":"exclusiveMinimum",R=e.schema[S],x=e.opts.$data&&R&&R.$data,_=w?"<":">",C=w?">":"<",N=void 0;if(!(v||typeof c=="number"||c===void 0))throw new Error(r+" must be number");if(!(x||R===void 0||typeof R=="number"||typeof R=="boolean"))throw new Error(S+" must be number or boolean");if(x){var k=e.util.getData(R.$data,l,e.dataPathArr),A="exclusive"+s,I="exclType"+s,O="exclIsNumber"+s,L="op"+s,M="' + "+L+" + '";a+=" var schemaExcl"+s+" = "+k+"; ",k="schemaExcl"+s,a+=" var "+A+"; var "+I+" = typeof "+k+"; if ("+I+" != 'boolean' && "+I+" != 'undefined' && "+I+" != 'number') { ";var N=S,P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(N||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var Y=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+Y+"]); ":a+=" validate.errors = ["+Y+"]; return false; ":a+=" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),a+=" "+I+" == 'number' ? ( ("+A+" = "+y+" === undefined || "+k+" "+_+"= "+y+") ? "+h+" "+C+"= "+k+" : "+h+" "+C+" "+y+" ) : ( ("+A+" = "+k+" === true) ? "+h+" "+C+"= "+y+" : "+h+" "+C+" "+y+" ) || "+h+" !== "+h+") { var op"+s+" = "+A+" ? '"+_+"' : '"+_+"='; ",c===void 0&&(N=S,f=e.errSchemaPath+"/"+S,y=k,v=x)}else{var O=typeof R=="number",M=_;if(O&&v){var L="'"+M+"'";a+=" if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),a+=" ( "+y+" === undefined || "+R+" "+_+"= "+y+" ? "+h+" "+C+"= "+R+" : "+h+" "+C+" "+y+" ) || "+h+" !== "+h+") { "}else{O&&c===void 0?(A=!0,N=S,f=e.errSchemaPath+"/"+S,y=R,C+="="):(O&&(y=Math[w?"min":"max"](R,c)),R===(O?y:!0)?(A=!0,N=S,f=e.errSchemaPath+"/"+S,C+="="):(A=!1,M+="="));var L="'"+M+"'";a+=" if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),a+=" "+h+" "+C+" "+y+" || "+h+" !== "+h+") { "}}N=N||r;var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(N||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { comparison: "+L+", limit: "+y+", exclusive: "+A+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be "+M+" ",v?a+="' + "+y:a+=""+y+"'"),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var Y=a;return a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+Y+"]); ":a+=" validate.errors = ["+Y+"]; return false; ":a+=" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { "),a}),lb}var cb,TI;function RI(){return TI||(TI=1,cb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var w=r=="maxItems"?">":"<";a+="if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),a+=" "+h+".length "+w+" "+y+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+y+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",r=="maxItems"?a+="more":a+="fewer",a+=" than ",v?a+="' + "+y+" + '":a+=""+c,a+=" items' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var x=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),cb}var ub,CI;function AI(){return CI||(CI=1,ub=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var w=r=="maxLength"?">":"<";a+="if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),e.opts.unicode===!1?a+=" "+h+".length ":a+=" ucs2length("+h+") ",a+=" "+w+" "+y+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+y+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be ",r=="maxLength"?a+="longer":a+="shorter",a+=" than ",v?a+="' + "+y+" + '":a+=""+c,a+=" characters' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var x=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),ub}var db,NI;function kI(){return NI||(NI=1,db=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var w=r=="maxProperties"?">":"<";a+="if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),a+=" Object.keys("+h+").length "+w+" "+y+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+y+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",r=="maxProperties"?a+="more":a+="fewer",a+=" than ",v?a+="' + "+y+" + '":a+=""+c,a+=" properties' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var x=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),db}var fb,II;function y8(){return II||(II=1,fb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c,!(v||typeof c=="number"))throw new Error(r+" must be number");a+="var division"+s+";if (",v&&(a+=" "+y+" !== undefined && ( typeof "+y+" != 'number' || "),a+=" (division"+s+" = "+h+" / "+y+", ",e.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":a+=" division"+s+" !== parseInt(division"+s+") ",a+=" ) ",v&&(a+=" ) "),a+=" ) { ";var w=w||[];w.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { multipleOf: "+y+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",v?a+="' + "+y:a+=""+y+"'"),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var S=a;return a=w.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),fb}var pb,OI;function E8(){return OI||(OI=1,pb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,y=e.util.copy(e);y.level++;var w="valid"+y.level;if(e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){y.schema=c,y.schemaPath=d,y.errSchemaPath=f,a+=" var "+v+" = errors; ";var S=e.compositeRule;e.compositeRule=y.compositeRule=!0,y.createErrors=!1;var R;y.opts.allErrors&&(R=y.opts.allErrors,y.opts.allErrors=!1),a+=" "+e.validate(y)+" ",y.createErrors=!0,R&&(y.opts.allErrors=R),e.compositeRule=y.compositeRule=S,a+=" if ("+w+") { ";var x=x||[];x.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var _=a;a=x.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+_+"]); ":a+=" validate.errors = ["+_+"]; return false; ":a+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+v+"; if (vErrors !== null) { if ("+v+") vErrors.length = "+v+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",e.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",m&&(a+=" if (false) { ");return a}),pb}var mb,DI;function S8(){return DI||(DI=1,mb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y="errs__"+s,w=e.util.copy(e),S="";w.level++;var R="valid"+w.level,x=w.baseId,_="prevValid"+s,C="passingSchemas"+s;a+="var "+y+" = errors , "+_+" = false , "+v+" = false , "+C+" = null; ";var N=e.compositeRule;e.compositeRule=w.compositeRule=!0;var k=c;if(k)for(var A,I=-1,O=k.length-1;I<O;)A=k[I+=1],(e.opts.strictKeywords?typeof A=="object"&&Object.keys(A).length>0||A===!1:e.util.schemaHasRules(A,e.RULES.all))?(w.schema=A,w.schemaPath=d+"["+I+"]",w.errSchemaPath=f+"/"+I,a+=" "+e.validate(w)+" ",w.baseId=x):a+=" var "+R+" = true; ",I&&(a+=" if ("+R+" && "+_+") { "+v+" = false; "+C+" = ["+C+", "+I+"]; } else { ",S+="}"),a+=" if ("+R+") { "+v+" = "+_+" = true; "+C+" = "+I+"; }";return e.compositeRule=w.compositeRule=N,a+=""+S+"if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { passingSchemas: "+C+" } ",e.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+y+"; if (vErrors !== null) { if ("+y+") vErrors.length = "+y+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}),mb}var hb,LI;function x8(){return LI||(LI=1,hb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,y;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",y="schema"+s):y=c;var w=v?"(new RegExp("+y+"))":e.usePattern(c);a+="if ( ",v&&(a+=" ("+y+" !== undefined && typeof "+y+" != 'string') || "),a+=" !"+w+".test("+h+") ) { ";var S=S||[];S.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { pattern: ",v?a+=""+y:a+=""+e.util.toQuotedString(c),a+=" } ",e.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,v?a+="' + "+y+" + '":a+=""+e.util.escapeQuotes(c),a+=`"' `),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+e.util.toQuotedString(c),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var R=a;return a=S.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+R+"]); ":a+=" validate.errors = ["+R+"]; return false; ":a+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),hb}var gb,MI;function w8(){return MI||(MI=1,gb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,y=e.util.copy(e),w="";y.level++;var S="valid"+y.level,R="key"+s,x="idx"+s,_=y.dataLevel=e.dataLevel+1,C="data"+_,N="dataProperties"+s,k=Object.keys(c||{}).filter(H),A=e.schema.patternProperties||{},I=Object.keys(A).filter(H),O=e.schema.additionalProperties,L=k.length||I.length,M=O===!1,P=typeof O=="object"&&Object.keys(O).length,Y=e.opts.removeAdditional,Q=M||P||Y,J=e.opts.ownProperties,ee=e.baseId,U=e.schema.required;if(U&&!(e.opts.$data&&U.$data)&&U.length<e.opts.loopRequired)var G=e.util.toHash(U);function H(Je){return Je!=="__proto__"}if(a+="var "+v+" = errors;var "+S+" = true;",J&&(a+=" var "+N+" = undefined;"),Q){if(J?a+=" "+N+" = "+N+" || Object.keys("+h+"); for (var "+x+"=0; "+x+"<"+N+".length; "+x+"++) { var "+R+" = "+N+"["+x+"]; ":a+=" for (var "+R+" in "+h+") { ",L){if(a+=" var isAdditional"+s+" = !(false ",k.length)if(k.length>8)a+=" || validate.schema"+d+".hasOwnProperty("+R+") ";else{var X=k;if(X)for(var ae,z=-1,q=X.length-1;z<q;)ae=X[z+=1],a+=" || "+R+" == "+e.util.toQuotedString(ae)+" "}if(I.length){var $=I;if($)for(var W,te=-1,F=$.length-1;te<F;)W=$[te+=1],a+=" || "+e.usePattern(W)+".test("+R+") "}a+=" ); if (isAdditional"+s+") { "}if(Y=="all")a+=" delete "+h+"["+R+"]; ";else{var j=e.errorPath,Z="' + "+R+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers)),M)if(Y)a+=" delete "+h+"["+R+"]; ";else{a+=" "+S+" = false; ";var ne=f;f=e.errSchemaPath+"/additionalProperties";var V=V||[];V.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { additionalProperty: '"+Z+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var de=a;a=V.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+de+"]); ":a+=" validate.errors = ["+de+"]; return false; ":a+=" var err = "+de+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f=ne,m&&(a+=" break; ")}else if(P)if(Y=="failing"){a+=" var "+v+" = errors; ";var fe=e.compositeRule;e.compositeRule=y.compositeRule=!0,y.schema=O,y.schemaPath=e.schemaPath+".additionalProperties",y.errSchemaPath=e.errSchemaPath+"/additionalProperties",y.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var Re=h+"["+R+"]";y.dataPathArr[_]=R;var be=e.validate(y);y.baseId=ee,e.util.varOccurences(be,C)<2?a+=" "+e.util.varReplace(be,C,Re)+" ":a+=" var "+C+" = "+Re+"; "+be+" ",a+=" if (!"+S+") { errors = "+v+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+h+"["+R+"]; } ",e.compositeRule=y.compositeRule=fe}else{y.schema=O,y.schemaPath=e.schemaPath+".additionalProperties",y.errSchemaPath=e.errSchemaPath+"/additionalProperties",y.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var Re=h+"["+R+"]";y.dataPathArr[_]=R;var be=e.validate(y);y.baseId=ee,e.util.varOccurences(be,C)<2?a+=" "+e.util.varReplace(be,C,Re)+" ":a+=" var "+C+" = "+Re+"; "+be+" ",m&&(a+=" if (!"+S+") break; ")}e.errorPath=j}L&&(a+=" } "),a+=" } ",m&&(a+=" if ("+S+") { ",w+="}")}var xe=e.opts.useDefaults&&!e.compositeRule;if(k.length){var Ne=k;if(Ne)for(var ae,ze=-1,Me=Ne.length-1;ze<Me;){ae=Ne[ze+=1];var $e=c[ae];if(e.opts.strictKeywords?typeof $e=="object"&&Object.keys($e).length>0||$e===!1:e.util.schemaHasRules($e,e.RULES.all)){var ct=e.util.getProperty(ae),Re=h+ct,ce=xe&&$e.default!==void 0;y.schema=$e,y.schemaPath=d+ct,y.errSchemaPath=f+"/"+e.util.escapeFragment(ae),y.errorPath=e.util.getPath(e.errorPath,ae,e.opts.jsonPointers),y.dataPathArr[_]=e.util.toQuotedString(ae);var be=e.validate(y);if(y.baseId=ee,e.util.varOccurences(be,C)<2){be=e.util.varReplace(be,C,Re);var Ce=Re}else{var Ce=C;a+=" var "+C+" = "+Re+"; "}if(ce)a+=" "+be+" ";else{if(G&&G[ae]){a+=" if ( "+Ce+" === undefined ",J&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(ae)+"') "),a+=") { "+S+" = false; ";var j=e.errorPath,ne=f,Fe=e.util.escapeQuotes(ae);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(j,ae,e.opts.jsonPointers)),f=e.errSchemaPath+"/required";var V=V||[];V.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+Fe+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+Fe+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var de=a;a=V.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+de+"]); ":a+=" validate.errors = ["+de+"]; return false; ":a+=" var err = "+de+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f=ne,e.errorPath=j,a+=" } else { "}else m?(a+=" if ( "+Ce+" === undefined ",J&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(ae)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+Ce+" !== undefined ",J&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(ae)+"') "),a+=" ) { ");a+=" "+be+" } "}}m&&(a+=" if ("+S+") { ",w+="}")}}if(I.length){var _e=I;if(_e)for(var W,Ie=-1,Oe=_e.length-1;Ie<Oe;){W=_e[Ie+=1];var $e=A[W];if(e.opts.strictKeywords?typeof $e=="object"&&Object.keys($e).length>0||$e===!1:e.util.schemaHasRules($e,e.RULES.all)){y.schema=$e,y.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(W),y.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(W),J?a+=" "+N+" = "+N+" || Object.keys("+h+"); for (var "+x+"=0; "+x+"<"+N+".length; "+x+"++) { var "+R+" = "+N+"["+x+"]; ":a+=" for (var "+R+" in "+h+") { ",a+=" if ("+e.usePattern(W)+".test("+R+")) { ",y.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var Re=h+"["+R+"]";y.dataPathArr[_]=R;var be=e.validate(y);y.baseId=ee,e.util.varOccurences(be,C)<2?a+=" "+e.util.varReplace(be,C,Re)+" ":a+=" var "+C+" = "+Re+"; "+be+" ",m&&(a+=" if (!"+S+") break; "),a+=" } ",m&&(a+=" else "+S+" = true; "),a+=" } ",m&&(a+=" if ("+S+") { ",w+="}")}}}return m&&(a+=" "+w+" if ("+v+" == errors) {"),a}),gb}var vb,PI;function _8(){return PI||(PI=1,vb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,y=e.util.copy(e),w="";y.level++;var S="valid"+y.level;if(a+="var "+v+" = errors;",e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){y.schema=c,y.schemaPath=d,y.errSchemaPath=f;var R="key"+s,x="idx"+s,_="i"+s,C="' + "+R+" + '",N=y.dataLevel=e.dataLevel+1,k="data"+N,A="dataProperties"+s,I=e.opts.ownProperties,O=e.baseId;I&&(a+=" var "+A+" = undefined; "),I?a+=" "+A+" = "+A+" || Object.keys("+h+"); for (var "+x+"=0; "+x+"<"+A+".length; "+x+"++) { var "+R+" = "+A+"["+x+"]; ":a+=" for (var "+R+" in "+h+") { ",a+=" var startErrs"+s+" = errors; ";var L=R,M=e.compositeRule;e.compositeRule=y.compositeRule=!0;var P=e.validate(y);y.baseId=O,e.util.varOccurences(P,k)<2?a+=" "+e.util.varReplace(P,k,L)+" ":a+=" var "+k+" = "+L+"; "+P+" ",e.compositeRule=y.compositeRule=M,a+=" if (!"+S+") { for (var "+_+"=startErrs"+s+"; "+_+"<errors; "+_+"++) { vErrors["+_+"].propertyName = "+R+"; } var err = ",e.createErrors!==!1?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { propertyName: '"+C+"' } ",e.opts.messages!==!1&&(a+=" , message: 'property name \\'"+C+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),m&&(a+=" break; "),a+=" } }"}return m&&(a+=" "+w+" if ("+v+" == errors) {"),a}),vb}var bb,jI;function T8(){return jI||(jI=1,bb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y=e.opts.$data&&c&&c.$data;y&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ");var w="schema"+s;if(!y)if(c.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var S=[],R=c;if(R)for(var x,_=-1,C=R.length-1;_<C;){x=R[_+=1];var N=e.schema.properties[x];N&&(e.opts.strictKeywords?typeof N=="object"&&Object.keys(N).length>0||N===!1:e.util.schemaHasRules(N,e.RULES.all))||(S[S.length]=x)}}else var S=c;if(y||S.length){var k=e.errorPath,A=y||S.length>=e.opts.loopRequired,I=e.opts.ownProperties;if(m)if(a+=" var missing"+s+"; ",A){y||(a+=" var "+w+" = validate.schema"+d+"; ");var O="i"+s,L="schema"+s+"["+O+"]",M="' + "+L+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(k,L,e.opts.jsonPointers)),a+=" var "+v+" = true; ",y&&(a+=" if (schema"+s+" === undefined) "+v+" = true; else if (!Array.isArray(schema"+s+")) "+v+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+w+".length; "+O+"++) { "+v+" = "+h+"["+w+"["+O+"]] !== undefined ",I&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", "+w+"["+O+"]) "),a+="; if (!"+v+") break; } ",y&&(a+=" } "),a+=" if (!"+v+") { ";var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+M+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+M+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var Y=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+Y+"]); ":a+=" validate.errors = ["+Y+"]; return false; ":a+=" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var Q=S;if(Q)for(var J,O=-1,ee=Q.length-1;O<ee;){J=Q[O+=1],O&&(a+=" || ");var U=e.util.getProperty(J),G=h+U;a+=" ( ( "+G+" === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(J)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?J:U)+") ) "}a+=") { ";var L="missing"+s,M="' + "+L+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(k,L,!0):k+" + "+L);var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+M+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+M+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var Y=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+Y+"]); ":a+=" validate.errors = ["+Y+"]; return false; ":a+=" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(A){y||(a+=" var "+w+" = validate.schema"+d+"; ");var O="i"+s,L="schema"+s+"["+O+"]",M="' + "+L+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(k,L,e.opts.jsonPointers)),y&&(a+=" if ("+w+" && !Array.isArray("+w+")) { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+M+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+M+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+w+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+w+".length; "+O+"++) { if ("+h+"["+w+"["+O+"]] === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", "+w+"["+O+"]) "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+M+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+M+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",y&&(a+=" } ")}else{var H=S;if(H)for(var J,X=-1,ae=H.length-1;X<ae;){J=H[X+=1];var U=e.util.getProperty(J),M=e.util.escapeQuotes(J),G=h+U;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(k,J,e.opts.jsonPointers)),a+=" if ( "+G+" === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(J)+"') "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+M+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+M+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=k}else m&&(a+=" if (true) {");return a}),bb}var yb,UI;function R8(){return UI||(UI=1,yb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,y=e.opts.$data&&c&&c.$data,w;if(y?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",w="schema"+s):w=c,(c||y)&&e.opts.uniqueItems!==!1){y&&(a+=" var "+v+"; if ("+w+" === false || "+w+" === undefined) "+v+" = true; else if (typeof "+w+" != 'boolean') "+v+" = false; else { "),a+=" var i = "+h+".length , "+v+" = true , j; if (i > 1) { ";var S=e.schema.items&&e.schema.items.type,R=Array.isArray(S);if(!S||S=="object"||S=="array"||R&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+v+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var x="checkDataType"+(R?"s":"");a+=" if ("+e.util[x](S,"item",e.opts.strictNumbers,!0)+") continue; ",R&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+v+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",y&&(a+=" } "),a+=" if (!"+v+") { ";var _=_||[];_.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { i: i, j: j } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(a+=" , schema: ",y?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var C=a;a=_.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+C+"]); ":a+=" validate.errors = ["+C+"]; return false; ":a+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { ")}else m&&(a+=" if (true) { ");return a}),yb}var Eb,FI;function C8(){return FI||(FI=1,Eb={$ref:l8(),allOf:c8(),anyOf:u8(),$comment:d8(),const:f8(),contains:p8(),dependencies:m8(),enum:h8(),format:g8(),if:v8(),items:b8(),maximum:_I(),minimum:_I(),maxItems:RI(),minItems:RI(),maxLength:AI(),minLength:AI(),maxProperties:kI(),minProperties:kI(),multipleOf:y8(),not:E8(),oneOf:S8(),pattern:x8(),properties:w8(),propertyNames:_8(),required:T8(),uniqueItems:R8(),validate:P2()}),Eb}var Sb,zI;function A8(){if(zI)return Sb;zI=1;var t=C8(),e=pc().toHash;return Sb=function(){var n=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],s=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],l=["number","integer","string","array","object","boolean","null"];return n.all=e(a),n.types=e(l),n.forEach(function(c){c.rules=c.rules.map(function(d){var f;if(typeof d=="object"){var m=Object.keys(d)[0];f=d[m],d=m,f.forEach(function(v){a.push(v),n.all[v]=!0})}a.push(d);var h=n.all[d]={keyword:d,code:t[d],implements:f};return h}),n.all.$comment={keyword:"$comment",code:t.$comment},c.type&&(n.types[c.type]=c)}),n.keywords=e(a.concat(s)),n.custom={},n},Sb}var xb,$I;function N8(){if($I)return xb;$I=1;var t=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return xb=function(e,r){for(var n=0;n<r.length;n++){e=JSON.parse(JSON.stringify(e));var a=r[n].split("/"),s=e,l;for(l=1;l<a.length;l++)s=s[a[l]];for(l=0;l<t.length;l++){var c=t[l],d=s[c];d&&(s[c]={anyOf:[d,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},xb}var wb,BI;function k8(){if(BI)return wb;BI=1;var t=oR().MissingRef;wb=e;function e(r,n,a){var s=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof n=="function"&&(a=n,n=void 0);var l=c(r).then(function(){var f=s._addSchema(r,void 0,n);return f.validate||d(f)});return a&&l.then(function(f){a(null,f)},a),l;function c(f){var m=f.$schema;return m&&!s.getSchema(m)?e.call(s,{$ref:m},!0):Promise.resolve()}function d(f){try{return s._compile(f)}catch(h){if(h instanceof t)return m(h);throw h}function m(h){var v=h.missingSchema;if(S(v))throw new Error("Schema "+v+" is loaded but "+h.missingRef+" cannot be resolved");var y=s._loadingSchemas[v];return y||(y=s._loadingSchemas[v]=s._opts.loadSchema(v),y.then(w,w)),y.then(function(R){if(!S(v))return c(R).then(function(){S(v)||s.addSchema(R,v,void 0,n)})}).then(function(){return d(f)});function w(){delete s._loadingSchemas[v]}function S(R){return s._refs[R]||s._schemas[R]}}}}return wb}var _b,qI;function I8(){return qI||(qI=1,_b=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h,v="data"+(l||""),y="valid"+s,w="errs__"+s,S=e.opts.$data&&c&&c.$data,R;S?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",R="schema"+s):R=c;var x=this,_="definition"+s,C=x.definition,N="",k,A,I,O,L;if(S&&C.$data){L="keywordValidate"+s;var M=C.validateSchema;a+=" var "+_+" = RULES.custom['"+r+"'].definition; var "+L+" = "+_+".validate;"}else{if(O=e.useCustomRule(x,c,e.schema,e),!O)return;R="validate.schema"+d,L=O.code,k=C.compile,A=C.inline,I=C.macro}var P=L+".errors",Y="i"+s,Q="ruleErr"+s,J=C.async;if(J&&!e.async)throw new Error("async keyword in sync schema");if(A||I||(a+=""+P+" = null;"),a+="var "+w+" = errors;var "+y+";",S&&C.$data&&(N+="}",a+=" if ("+R+" === undefined) { "+y+" = true; } else { ",M&&(N+="}",a+=" "+y+" = "+_+".validateSchema("+R+"); if ("+y+") { ")),A)C.statements?a+=" "+O.validate+" ":a+=" "+y+" = "+O.validate+"; ";else if(I){var ee=e.util.copy(e),N="";ee.level++;var U="valid"+ee.level;ee.schema=O.validate,ee.schemaPath="";var G=e.compositeRule;e.compositeRule=ee.compositeRule=!0;var H=e.validate(ee).replace(/validate\.schema/g,L);e.compositeRule=ee.compositeRule=G,a+=" "+H}else{var X=X||[];X.push(a),a="",a+=" "+L+".call( ",e.opts.passContext?a+="this":a+="self",k||C.schema===!1?a+=" , "+v+" ":a+=" , "+R+" , "+v+" , validate.schema"+e.schemaPath+" ",a+=" , (dataPath || '')",e.errorPath!='""'&&(a+=" + "+e.errorPath);var ae=l?"data"+(l-1||""):"parentData",z=l?e.dataPathArr[l]:"parentDataProperty";a+=" , "+ae+" , "+z+" , rootData ) ";var q=a;a=X.pop(),C.errors===!1?(a+=" "+y+" = ",J&&(a+="await "),a+=""+q+"; "):J?(P="customErrors"+s,a+=" var "+P+" = null; try { "+y+" = await "+q+"; } catch (e) { "+y+" = false; if (e instanceof ValidationError) "+P+" = e.errors; else throw e; } "):a+=" "+P+" = null; "+y+" = "+q+"; "}if(C.modifying&&(a+=" if ("+ae+") "+v+" = "+ae+"["+z+"];"),a+=""+N,C.valid)m&&(a+=" if (true) { ");else{a+=" if ( ",C.valid===void 0?(a+=" !",I?a+=""+U:a+=""+y):a+=" "+!C.valid+" ",a+=") { ",h=x.keyword;var X=X||[];X.push(a),a="";var X=X||[];X.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { keyword: '"+x.keyword+"' } ",e.opts.messages!==!1&&(a+=` , message: 'should pass "`+x.keyword+`" keyword validation' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var $=a;a=X.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+$+"]); ":a+=" validate.errors = ["+$+"]; return false; ":a+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var W=a;a=X.pop(),A?C.errors?C.errors!="full"&&(a+=" for (var "+Y+"="+w+"; "+Y+"<errors; "+Y+"++) { var "+Q+" = vErrors["+Y+"]; if ("+Q+".dataPath === undefined) "+Q+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+Q+".schemaPath === undefined) { "+Q+'.schemaPath = "'+f+'"; } ',e.opts.verbose&&(a+=" "+Q+".schema = "+R+"; "+Q+".data = "+v+"; "),a+=" } "):C.errors===!1?a+=" "+W+" ":(a+=" if ("+w+" == errors) { "+W+" } else { for (var "+Y+"="+w+"; "+Y+"<errors; "+Y+"++) { var "+Q+" = vErrors["+Y+"]; if ("+Q+".dataPath === undefined) "+Q+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+Q+".schemaPath === undefined) { "+Q+'.schemaPath = "'+f+'"; } ',e.opts.verbose&&(a+=" "+Q+".schema = "+R+"; "+Q+".data = "+v+"; "),a+=" } } "):I?(a+=" var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { keyword: '"+x.keyword+"' } ",e.opts.messages!==!1&&(a+=` , message: 'should pass "`+x.keyword+`" keyword validation' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; ")):C.errors===!1?a+=" "+W+" ":(a+=" if (Array.isArray("+P+")) { if (vErrors === null) vErrors = "+P+"; else vErrors = vErrors.concat("+P+"); errors = vErrors.length; for (var "+Y+"="+w+"; "+Y+"<errors; "+Y+"++) { var "+Q+" = vErrors["+Y+"]; if ("+Q+".dataPath === undefined) "+Q+".dataPath = (dataPath || '') + "+e.errorPath+"; "+Q+'.schemaPath = "'+f+'"; ',e.opts.verbose&&(a+=" "+Q+".schema = "+R+"; "+Q+".data = "+v+"; "),a+=" } } else { "+W+" } "),a+=" } ",m&&(a+=" else { ")}return a}),_b}const O8="http://json-schema.org/draft-07/schema#",D8="http://json-schema.org/draft-07/schema#",L8="Core schema meta-schema",M8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},P8=["object","boolean"],j8={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},j2={$schema:O8,$id:D8,title:L8,definitions:M8,type:P8,properties:j8,default:!0};var Tb,HI;function U8(){if(HI)return Tb;HI=1;var t=j2;return Tb={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:t.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:t.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Tb}var Rb,VI;function F8(){if(VI)return Rb;VI=1;var t=/^[a-z_$][a-z0-9_$-]*$/i,e=I8(),r=U8();Rb={add:n,get:a,remove:s,validate:l};function n(c,d){var f=this.RULES;if(f.keywords[c])throw new Error("Keyword "+c+" is already defined");if(!t.test(c))throw new Error("Keyword "+c+" is not a valid identifier");if(d){this.validateKeyword(d,!0);var m=d.type;if(Array.isArray(m))for(var h=0;h<m.length;h++)y(c,m[h],d);else y(c,m,d);var v=d.metaSchema;v&&(d.$data&&this._opts.$data&&(v={anyOf:[v,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),d.validateSchema=this.compile(v,!0))}f.keywords[c]=f.all[c]=!0;function y(w,S,R){for(var x,_=0;_<f.length;_++){var C=f[_];if(C.type==S){x=C;break}}x||(x={type:S,rules:[]},f.push(x));var N={keyword:w,definition:R,custom:!0,code:e,implements:R.implements};x.rules.push(N),f.custom[w]=N}return this}function a(c){var d=this.RULES.custom[c];return d?d.definition:this.RULES.keywords[c]||!1}function s(c){var d=this.RULES;delete d.keywords[c],delete d.all[c],delete d.custom[c];for(var f=0;f<d.length;f++)for(var m=d[f].rules,h=0;h<m.length;h++)if(m[h].keyword==c){m.splice(h,1);break}return this}function l(c,d){l.errors=null;var f=this._validateKeyword=this._validateKeyword||this.compile(r,!0);if(f(c))return!0;if(l.errors=f.errors,d)throw new Error("custom keyword definition is invalid: "+this.errorsText(f.errors));return!1}return Rb}const z8="http://json-schema.org/draft-07/schema#",$8="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",B8="Meta-schema for $data reference (JSON Schema extension proposal)",q8="object",H8=["$data"],V8={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},G8=!1,W8={$schema:z8,$id:$8,description:B8,type:q8,required:H8,properties:V8,additionalProperties:G8};var Cb,GI;function Y8(){if(GI)return Cb;GI=1;var t=o8(),e=aR(),r=i8(),n=L2(),a=M2(),s=s8(),l=A8(),c=N8(),d=pc();Cb=w,w.prototype.validate=S,w.prototype.compile=R,w.prototype.addSchema=x,w.prototype.addMetaSchema=_,w.prototype.validateSchema=C,w.prototype.getSchema=k,w.prototype.removeSchema=O,w.prototype.addFormat=G,w.prototype.errorsText=U,w.prototype._addSchema=M,w.prototype._compile=P,w.prototype.compileAsync=k8();var f=F8();w.prototype.addKeyword=f.add,w.prototype.getKeyword=f.get,w.prototype.removeKeyword=f.remove,w.prototype.validateKeyword=f.validate;var m=oR();w.ValidationError=m.Validation,w.MissingRefError=m.MissingRef,w.$dataMetaSchema=c;var h="http://json-schema.org/draft-07/schema",v=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],y=["/properties"];function w(F){if(!(this instanceof w))return new w(F);F=this._opts=d.copy(F)||{},W(this),this._schemas={},this._refs={},this._fragments={},this._formats=s(F.format),this._cache=F.cache||new r,this._loadingSchemas={},this._compilations=[],this.RULES=l(),this._getId=Y(F),F.loopRequired=F.loopRequired||1/0,F.errorDataPath=="property"&&(F._errorDataPathProperty=!0),F.serialize===void 0&&(F.serialize=a),this._metaOpts=$(this),F.formats&&ae(this),F.keywords&&z(this),H(this),typeof F.meta=="object"&&this.addMetaSchema(F.meta),F.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),X(this)}function S(F,j){var Z;if(typeof F=="string"){if(Z=this.getSchema(F),!Z)throw new Error('no schema with key or ref "'+F+'"')}else{var ne=this._addSchema(F);Z=ne.validate||this._compile(ne)}var V=Z(j);return Z.$async!==!0&&(this.errors=Z.errors),V}function R(F,j){var Z=this._addSchema(F,void 0,j);return Z.validate||this._compile(Z)}function x(F,j,Z,ne){if(Array.isArray(F)){for(var V=0;V<F.length;V++)this.addSchema(F[V],void 0,Z,ne);return this}var de=this._getId(F);if(de!==void 0&&typeof de!="string")throw new Error("schema id must be string");return j=e.normalizeId(j||de),q(this,j),this._schemas[j]=this._addSchema(F,Z,ne,!0),this}function _(F,j,Z){return this.addSchema(F,j,Z,!0),this}function C(F,j){var Z=F.$schema;if(Z!==void 0&&typeof Z!="string")throw new Error("$schema must be a string");if(Z=Z||this._opts.defaultMeta||N(this),!Z)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var ne=this.validate(Z,F);if(!ne&&j){var V="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(V);else throw new Error(V)}return ne}function N(F){var j=F._opts.meta;return F._opts.defaultMeta=typeof j=="object"?F._getId(j)||j:F.getSchema(h)?h:void 0,F._opts.defaultMeta}function k(F){var j=I(this,F);switch(typeof j){case"object":return j.validate||this._compile(j);case"string":return this.getSchema(j);case"undefined":return A(this,F)}}function A(F,j){var Z=e.schema.call(F,{schema:{}},j);if(Z){var ne=Z.schema,V=Z.root,de=Z.baseId,fe=t.call(F,ne,V,void 0,de);return F._fragments[j]=new n({ref:j,fragment:!0,schema:ne,root:V,baseId:de,validate:fe}),fe}}function I(F,j){return j=e.normalizeId(j),F._schemas[j]||F._refs[j]||F._fragments[j]}function O(F){if(F instanceof RegExp)return L(this,this._schemas,F),L(this,this._refs,F),this;switch(typeof F){case"undefined":return L(this,this._schemas),L(this,this._refs),this._cache.clear(),this;case"string":var j=I(this,F);return j&&this._cache.del(j.cacheKey),delete this._schemas[F],delete this._refs[F],this;case"object":var Z=this._opts.serialize,ne=Z?Z(F):F;this._cache.del(ne);var V=this._getId(F);V&&(V=e.normalizeId(V),delete this._schemas[V],delete this._refs[V])}return this}function L(F,j,Z){for(var ne in j){var V=j[ne];!V.meta&&(!Z||Z.test(ne))&&(F._cache.del(V.cacheKey),delete j[ne])}}function M(F,j,Z,ne){if(typeof F!="object"&&typeof F!="boolean")throw new Error("schema should be object or boolean");var V=this._opts.serialize,de=V?V(F):F,fe=this._cache.get(de);if(fe)return fe;ne=ne||this._opts.addUsedSchema!==!1;var Re=e.normalizeId(this._getId(F));Re&&ne&&q(this,Re);var be=this._opts.validateSchema!==!1&&!j,xe;be&&!(xe=Re&&Re==e.normalizeId(F.$schema))&&this.validateSchema(F,!0);var Ne=e.ids.call(this,F),ze=new n({id:Re,schema:F,localRefs:Ne,cacheKey:de,meta:Z});return Re[0]!="#"&&ne&&(this._refs[Re]=ze),this._cache.put(de,ze),be&&xe&&this.validateSchema(F,!0),ze}function P(F,j){if(F.compiling)return F.validate=V,V.schema=F.schema,V.errors=null,V.root=j||V,F.schema.$async===!0&&(V.$async=!0),V;F.compiling=!0;var Z;F.meta&&(Z=this._opts,this._opts=this._metaOpts);var ne;try{ne=t.call(this,F.schema,j,F.localRefs)}catch(de){throw delete F.validate,de}finally{F.compiling=!1,F.meta&&(this._opts=Z)}return F.validate=ne,F.refs=ne.refs,F.refVal=ne.refVal,F.root=ne.root,ne;function V(){var de=F.validate,fe=de.apply(this,arguments);return V.errors=de.errors,fe}}function Y(F){switch(F.schemaId){case"auto":return ee;case"id":return Q;default:return J}}function Q(F){return F.$id&&this.logger.warn("schema $id ignored",F.$id),F.id}function J(F){return F.id&&this.logger.warn("schema id ignored",F.id),F.$id}function ee(F){if(F.$id&&F.id&&F.$id!=F.id)throw new Error("schema $id is different from id");return F.$id||F.id}function U(F,j){if(F=F||this.errors,!F)return"No errors";j=j||{};for(var Z=j.separator===void 0?", ":j.separator,ne=j.dataVar===void 0?"data":j.dataVar,V="",de=0;de<F.length;de++){var fe=F[de];fe&&(V+=ne+fe.dataPath+" "+fe.message+Z)}return V.slice(0,-Z.length)}function G(F,j){return typeof j=="string"&&(j=new RegExp(j)),this._formats[F]=j,this}function H(F){var j;if(F._opts.$data&&(j=W8,F.addMetaSchema(j,j.$id,!0)),F._opts.meta!==!1){var Z=j2;F._opts.$data&&(Z=c(Z,y)),F.addMetaSchema(Z,h,!0),F._refs["http://json-schema.org/schema"]=h}}function X(F){var j=F._opts.schemas;if(j)if(Array.isArray(j))F.addSchema(j);else for(var Z in j)F.addSchema(j[Z],Z)}function ae(F){for(var j in F._opts.formats){var Z=F._opts.formats[j];F.addFormat(j,Z)}}function z(F){for(var j in F._opts.keywords){var Z=F._opts.keywords[j];F.addKeyword(j,Z)}}function q(F,j){if(F._schemas[j]||F._refs[j])throw new Error('schema with key or id "'+j+'" already exists')}function $(F){for(var j=d.copy(F._opts),Z=0;Z<v.length;Z++)delete j[v[Z]];return j}function W(F){var j=F._opts.logger;if(j===!1)F.logger={log:te,warn:te,error:te};else{if(j===void 0&&(j=console),!(typeof j=="object"&&j.log&&j.warn&&j.error))throw new Error("logger must implement log, warn and error methods");F.logger=j}}function te(){}return Cb}var K8=Y8();const Z8=fc(K8);class WI extends J9{constructor(e,r){var n;super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._capabilities=(n=r?.capabilities)!==null&&n!==void 0?n:{},this._ajv=new Z8}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=e8(this._capabilities,e)}assertCapability(e,r){var n;if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n[e]))throw new Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),e.sessionId===void 0)try{const n=await this.request({method:"initialize",params:{protocolVersion:Pm,capabilities:this._capabilities,clientInfo:this._clientInfo}},y2,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!e9.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:"notifications/initialized"})}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){var r,n,a,s,l;switch(e){case"logging/setLevel":if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r.logging))throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n.prompts))throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(!((a=this._serverCapabilities)===null||a===void 0)&&a.resources))throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!(!((s=this._serverCapabilities)===null||s===void 0)&&s.tools))throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!(!((l=this._serverCapabilities)===null||l===void 0)&&l.completions))throw new Error(`Server does not support completions (required for ${e})`);break}}assertNotificationCapability(e){var r;switch(e){case"notifications/roots/list_changed":if(!(!((r=this._capabilities.roots)===null||r===void 0)&&r.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break}}async ping(e){return this.request({method:"ping"},Al,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},D2,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},Al,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},k2,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},A2,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},T2,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},R2,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},C2,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},Al,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},Al,r)}async callTool(e,r=rR,n){const a=await this.request({method:"tools/call",params:e},r,n),s=this.getToolOutputValidator(e.name);if(s){if(!a.structuredContent&&!a.isError)throw new Si(Oa.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(a.structuredContent)try{if(!s(a.structuredContent))throw new Si(Oa.InvalidParams,`Structured content does not match the tool's output schema: ${this._ajv.errorsText(s.errors)}`)}catch(l){throw l instanceof Si?l:new Si(Oa.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)}}return a}cacheToolOutputSchemas(e){this._cachedToolOutputValidators.clear();for(const r of e)if(r.outputSchema)try{const n=this._ajv.compile(r.outputSchema);this._cachedToolOutputValidators.set(r.name,n)}catch{}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){const n=await this.request({method:"tools/list",params:e},I2,r);return this.cacheToolOutputSchemas(n.tools),n}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}let iR;iR=globalThis.crypto;async function X8(t){return(await iR).getRandomValues(new Uint8Array(t))}async function Q8(t){const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";let r="";const n=await X8(t);for(let a=0;a<t;a++){const s=n[a]%e.length;r+=e[s]}return r}async function J8(t){return await Q8(t)}async function eW(t){const e=await(await iR).subtle.digest("SHA-256",new TextEncoder().encode(t));return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function tW(t){if(t||(t=43),t<43||t>128)throw`Expected a length between 43 and 128. Received ${t}.`;const e=await J8(t),r=await eW(e);return{code_verifier:e,code_challenge:r}}const Pr=ve().url().superRefine((t,e)=>{if(!URL.canParse(t))return e.addIssue({code:ke.custom,message:"URL must be parseable",fatal:!0}),J6}).refine(t=>{const e=new URL(t);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),rW=Pe({resource:ve().url(),authorization_servers:Ye(Pr).optional(),jwks_uri:ve().url().optional(),scopes_supported:Ye(ve()).optional(),bearer_methods_supported:Ye(ve()).optional(),resource_signing_alg_values_supported:Ye(ve()).optional(),resource_name:ve().optional(),resource_documentation:ve().optional(),resource_policy_uri:ve().url().optional(),resource_tos_uri:ve().url().optional(),tls_client_certificate_bound_access_tokens:Dr().optional(),authorization_details_types_supported:Ye(ve()).optional(),dpop_signing_alg_values_supported:Ye(ve()).optional(),dpop_bound_access_tokens_required:Dr().optional()}).passthrough(),U2=Pe({issuer:ve(),authorization_endpoint:Pr,token_endpoint:Pr,registration_endpoint:Pr.optional(),scopes_supported:Ye(ve()).optional(),response_types_supported:Ye(ve()),response_modes_supported:Ye(ve()).optional(),grant_types_supported:Ye(ve()).optional(),token_endpoint_auth_methods_supported:Ye(ve()).optional(),token_endpoint_auth_signing_alg_values_supported:Ye(ve()).optional(),service_documentation:Pr.optional(),revocation_endpoint:Pr.optional(),revocation_endpoint_auth_methods_supported:Ye(ve()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ye(ve()).optional(),introspection_endpoint:ve().optional(),introspection_endpoint_auth_methods_supported:Ye(ve()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ye(ve()).optional(),code_challenge_methods_supported:Ye(ve()).optional()}).passthrough(),nW=Pe({issuer:ve(),authorization_endpoint:Pr,token_endpoint:Pr,userinfo_endpoint:Pr.optional(),jwks_uri:Pr,registration_endpoint:Pr.optional(),scopes_supported:Ye(ve()).optional(),response_types_supported:Ye(ve()),response_modes_supported:Ye(ve()).optional(),grant_types_supported:Ye(ve()).optional(),acr_values_supported:Ye(ve()).optional(),subject_types_supported:Ye(ve()),id_token_signing_alg_values_supported:Ye(ve()),id_token_encryption_alg_values_supported:Ye(ve()).optional(),id_token_encryption_enc_values_supported:Ye(ve()).optional(),userinfo_signing_alg_values_supported:Ye(ve()).optional(),userinfo_encryption_alg_values_supported:Ye(ve()).optional(),userinfo_encryption_enc_values_supported:Ye(ve()).optional(),request_object_signing_alg_values_supported:Ye(ve()).optional(),request_object_encryption_alg_values_supported:Ye(ve()).optional(),request_object_encryption_enc_values_supported:Ye(ve()).optional(),token_endpoint_auth_methods_supported:Ye(ve()).optional(),token_endpoint_auth_signing_alg_values_supported:Ye(ve()).optional(),display_values_supported:Ye(ve()).optional(),claim_types_supported:Ye(ve()).optional(),claims_supported:Ye(ve()).optional(),service_documentation:ve().optional(),claims_locales_supported:Ye(ve()).optional(),ui_locales_supported:Ye(ve()).optional(),claims_parameter_supported:Dr().optional(),request_parameter_supported:Dr().optional(),request_uri_parameter_supported:Dr().optional(),require_request_uri_registration:Dr().optional(),op_policy_uri:Pr.optional(),op_tos_uri:Pr.optional()}).passthrough(),aW=nW.merge(U2.pick({code_challenge_methods_supported:!0})),F2=Pe({access_token:ve(),id_token:ve().optional(),token_type:ve(),expires_in:$r().optional(),scope:ve().optional(),refresh_token:ve().optional()}).strip(),oW=Pe({error:ve(),error_description:ve().optional(),error_uri:ve().optional()}),iW=Pe({redirect_uris:Ye(Pr),token_endpoint_auth_method:ve().optional(),grant_types:Ye(ve()).optional(),response_types:Ye(ve()).optional(),client_name:ve().optional(),client_uri:Pr.optional(),logo_uri:Pr.optional(),scope:ve().optional(),contacts:Ye(ve()).optional(),tos_uri:Pr.optional(),policy_uri:ve().optional(),jwks_uri:Pr.optional(),jwks:X6().optional(),software_id:ve().optional(),software_version:ve().optional(),software_statement:ve().optional()}).strip(),sW=Pe({client_id:ve(),client_secret:ve().optional(),client_id_issued_at:$r().optional(),client_secret_expires_at:$r().optional()}).strip(),lW=iW.merge(sW);Pe({error:ve(),error_description:ve().optional()}).strip();Pe({token:ve(),token_type_hint:ve().optional()}).strip();function cW(t){const e=typeof t=="string"?new URL(t):new URL(t.href);return e.hash="",e}function uW({requestedResource:t,configuredResource:e}){const r=typeof t=="string"?new URL(t):new URL(t.href),n=typeof e=="string"?new URL(e):new URL(e.href);if(r.origin!==n.origin||r.pathname.length<n.pathname.length)return!1;const a=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",s=n.pathname.endsWith("/")?n.pathname:n.pathname+"/";return a.startsWith(s)}class Qr extends Error{constructor(e,r){super(e),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){const e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}}class __ extends Qr{}__.errorCode="invalid_request";class dm extends Qr{}dm.errorCode="invalid_client";class fm extends Qr{}fm.errorCode="invalid_grant";class pm extends Qr{}pm.errorCode="unauthorized_client";class T_ extends Qr{}T_.errorCode="unsupported_grant_type";class R_ extends Qr{}R_.errorCode="invalid_scope";class C_ extends Qr{}C_.errorCode="access_denied";class nc extends Qr{}nc.errorCode="server_error";class A_ extends Qr{}A_.errorCode="temporarily_unavailable";class N_ extends Qr{}N_.errorCode="unsupported_response_type";class k_ extends Qr{}k_.errorCode="unsupported_token_type";class I_ extends Qr{}I_.errorCode="invalid_token";class O_ extends Qr{}O_.errorCode="method_not_allowed";class D_ extends Qr{}D_.errorCode="too_many_requests";class L_ extends Qr{}L_.errorCode="invalid_client_metadata";class M_ extends Qr{}M_.errorCode="insufficient_scope";const dW={[__.errorCode]:__,[dm.errorCode]:dm,[fm.errorCode]:fm,[pm.errorCode]:pm,[T_.errorCode]:T_,[R_.errorCode]:R_,[C_.errorCode]:C_,[nc.errorCode]:nc,[A_.errorCode]:A_,[N_.errorCode]:N_,[k_.errorCode]:k_,[I_.errorCode]:I_,[O_.errorCode]:O_,[D_.errorCode]:D_,[L_.errorCode]:L_,[M_.errorCode]:M_};class Da extends Error{constructor(e){super(e??"Unauthorized")}}const Ab="code",Nb="S256";function z2(t,e){const r=t.client_secret!==void 0;return e.length===0?r?"client_secret_post":"none":r&&e.includes("client_secret_basic")?"client_secret_basic":r&&e.includes("client_secret_post")?"client_secret_post":e.includes("none")?"none":r?"client_secret_post":"none"}function $2(t,e,r,n){const{client_id:a,client_secret:s}=e;switch(t){case"client_secret_basic":fW(a,s,r);return;case"client_secret_post":pW(a,s,n);return;case"none":mW(a,n);return;default:throw new Error(`Unsupported client authentication method: ${t}`)}}function fW(t,e,r){if(!e)throw new Error("client_secret_basic authentication requires a client_secret");const n=btoa(`${t}:${e}`);r.set("Authorization",`Basic ${n}`)}function pW(t,e,r){r.set("client_id",t),e&&r.set("client_secret",e)}function mW(t,e){e.set("client_id",t)}async function sR(t){const e=t instanceof Response?t.status:void 0,r=t instanceof Response?await t.text():t;try{const n=oW.parse(JSON.parse(r)),{error:a,error_description:s,error_uri:l}=n,c=dW[a]||nc;return new c(s||"",l)}catch(n){const a=`${e?`HTTP ${e}: `:""}Invalid OAuth error response: ${n}. Raw body: ${r}`;return new nc(a)}}async function ps(t,e){var r,n;try{return await kb(t,e)}catch(a){if(a instanceof dm||a instanceof pm)return await((r=t.invalidateCredentials)===null||r===void 0?void 0:r.call(t,"all")),await kb(t,e);if(a instanceof fm)return await((n=t.invalidateCredentials)===null||n===void 0?void 0:n.call(t,"tokens")),await kb(t,e);throw a}}async function kb(t,{serverUrl:e,authorizationCode:r,scope:n,resourceMetadataUrl:a,fetchFn:s}){let l,c;try{l=await gW(e,{resourceMetadataUrl:a},s),l.authorization_servers&&l.authorization_servers.length>0&&(c=l.authorization_servers[0])}catch{}c||(c=e);const d=await hW(e,t,l),f=await SW(c,{fetchFn:s});let m=await Promise.resolve(t.clientInformation());if(!m){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");if(!t.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await TW(c,{metadata:f,clientMetadata:t.clientMetadata,fetchFn:s});await t.saveClientInformation(S),m=S}if(r!==void 0){const S=await t.codeVerifier(),R=await wW(c,{metadata:f,clientInformation:m,authorizationCode:r,codeVerifier:S,redirectUri:t.redirectUrl,resource:d,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(R),"AUTHORIZED"}const h=await t.tokens();if(h?.refresh_token)try{const S=await _W(c,{metadata:f,clientInformation:m,refreshToken:h.refresh_token,resource:d,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(S),"AUTHORIZED"}catch(S){if(!(!(S instanceof Qr)||S instanceof nc))throw S}const v=t.state?await t.state():void 0,{authorizationUrl:y,codeVerifier:w}=await xW(c,{metadata:f,clientInformation:m,state:v,redirectUrl:t.redirectUrl,scope:n||t.clientMetadata.scope,resource:d});return await t.saveCodeVerifier(w),await t.redirectToAuthorization(y),"REDIRECT"}async function hW(t,e,r){const n=cW(t);if(e.validateResourceURL)return await e.validateResourceURL(n,r?.resource);if(r){if(!uW({requestedResource:n,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${n} (or origin)`);return new URL(r.resource)}}function P_(t){const e=t.headers.get("WWW-Authenticate");if(!e)return;const[r,n]=e.split(" ");if(r.toLowerCase()!=="bearer"||!n)return;const s=/resource_metadata="([^"]*)"/.exec(e);if(s)try{return new URL(s[1])}catch{return}}async function gW(t,e,r=fetch){const n=await yW(t,"oauth-protected-resource",r,{protocolVersion:e?.protocolVersion,metadataUrl:e?.resourceMetadataUrl});if(!n||n.status===404)throw new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!n.ok)throw new Error(`HTTP ${n.status} trying to load well-known OAuth protected resource metadata.`);return rW.parse(await n.json())}async function lR(t,e,r=fetch){try{return await r(t,{headers:e})}catch(n){if(n instanceof TypeError)return e?lR(t,void 0,r):void 0;throw n}}function vW(t,e="",r={}){return e.endsWith("/")&&(e=e.slice(0,-1)),r.prependPathname?`${e}/.well-known/${t}`:`/.well-known/${t}${e}`}async function YI(t,e,r=fetch){return await lR(t,{"MCP-Protocol-Version":e},r)}function bW(t,e){return!t||t.status>=400&&t.status<500&&e!=="/"}async function yW(t,e,r,n){var a,s;const l=new URL(t),c=(a=n?.protocolVersion)!==null&&a!==void 0?a:Pm;let d;if(n?.metadataUrl)d=new URL(n.metadataUrl);else{const m=vW(e,l.pathname);d=new URL(m,(s=n?.metadataServerUrl)!==null&&s!==void 0?s:l),d.search=l.search}let f=await YI(d,c,r);if(!n?.metadataUrl&&bW(f,l.pathname)){const m=new URL(`/.well-known/${e}`,l);f=await YI(m,c,r)}return f}function EW(t){const e=typeof t=="string"?new URL(t):t,r=e.pathname!=="/",n=[];if(!r)return n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/openid-configuration",e.origin),type:"oidc"}),n;let a=e.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),n.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL(`/.well-known/openid-configuration${a}`,e.origin),type:"oidc"}),n.push({url:new URL(`${a}/.well-known/openid-configuration`,e.origin),type:"oidc"}),n}async function SW(t,{fetchFn:e=fetch,protocolVersion:r=Pm}={}){const n={"MCP-Protocol-Version":r},a=EW(t);for(const{url:s,type:l}of a){const c=await lR(s,n,e);if(c){if(!c.ok){if(c.status>=400&&c.status<500)continue;throw new Error(`HTTP ${c.status} trying to load ${l==="oauth"?"OAuth":"OpenID provider"} metadata from ${s}`)}return l==="oauth"?U2.parse(await c.json()):aW.parse(await c.json())}}}async function xW(t,{metadata:e,clientInformation:r,redirectUrl:n,scope:a,state:s,resource:l}){let c;if(e){if(c=new URL(e.authorization_endpoint),!e.response_types_supported.includes(Ab))throw new Error(`Incompatible auth server: does not support response type ${Ab}`);if(e.code_challenge_methods_supported&&!e.code_challenge_methods_supported.includes(Nb))throw new Error(`Incompatible auth server: does not support code challenge method ${Nb}`)}else c=new URL("/authorize",t);const d=await tW(),f=d.code_verifier,m=d.code_challenge;return c.searchParams.set("response_type",Ab),c.searchParams.set("client_id",r.client_id),c.searchParams.set("code_challenge",m),c.searchParams.set("code_challenge_method",Nb),c.searchParams.set("redirect_uri",String(n)),s&&c.searchParams.set("state",s),a&&c.searchParams.set("scope",a),a?.includes("offline_access")&&c.searchParams.append("prompt","consent"),l&&c.searchParams.set("resource",l.href),{authorizationUrl:c,codeVerifier:f}}async function wW(t,{metadata:e,clientInformation:r,authorizationCode:n,codeVerifier:a,redirectUri:s,resource:l,addClientAuthentication:c,fetchFn:d}){var f;const m="authorization_code",h=e?.token_endpoint?new URL(e.token_endpoint):new URL("/token",t);if(e?.grant_types_supported&&!e.grant_types_supported.includes(m))throw new Error(`Incompatible auth server: does not support grant type ${m}`);const v=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}),y=new URLSearchParams({grant_type:m,code:n,code_verifier:a,redirect_uri:String(s)});if(c)c(v,y,t,e);else{const S=(f=e?.token_endpoint_auth_methods_supported)!==null&&f!==void 0?f:[],R=z2(r,S);$2(R,r,v,y)}l&&y.set("resource",l.href);const w=await(d??fetch)(h,{method:"POST",headers:v,body:y});if(!w.ok)throw await sR(w);return F2.parse(await w.json())}async function _W(t,{metadata:e,clientInformation:r,refreshToken:n,resource:a,addClientAuthentication:s,fetchFn:l}){var c;const d="refresh_token";let f;if(e){if(f=new URL(e.token_endpoint),e.grant_types_supported&&!e.grant_types_supported.includes(d))throw new Error(`Incompatible auth server: does not support grant type ${d}`)}else f=new URL("/token",t);const m=new Headers({"Content-Type":"application/x-www-form-urlencoded"}),h=new URLSearchParams({grant_type:d,refresh_token:n});if(s)s(m,h,t,e);else{const y=(c=e?.token_endpoint_auth_methods_supported)!==null&&c!==void 0?c:[],w=z2(r,y);$2(w,r,m,h)}a&&h.set("resource",a.href);const v=await(l??fetch)(f,{method:"POST",headers:m,body:h});if(!v.ok)throw await sR(v);return F2.parse({refresh_token:n,...await v.json()})}async function TW(t,{metadata:e,clientMetadata:r,fetchFn:n}){let a;if(e){if(!e.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");a=new URL(e.registration_endpoint)}else a=new URL("/register",t);const s=await(n??fetch)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok)throw await sR(s);return lW.parse(await s.json())}class KI extends Error{constructor(e,r){super(e),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}function Ib(t){}function B2(t){if(typeof t=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:e=Ib,onError:r=Ib,onRetry:n=Ib,onComment:a}=t;let s="",l=!0,c,d="",f="";function m(S){const R=l?S.replace(/^\xEF\xBB\xBF/,""):S,[x,_]=RW(`${s}${R}`);for(const C of x)h(C);s=_,l=!1}function h(S){if(S===""){y();return}if(S.startsWith(":")){a&&a(S.slice(S.startsWith(": ")?2:1));return}const R=S.indexOf(":");if(R!==-1){const x=S.slice(0,R),_=S[R+1]===" "?2:1,C=S.slice(R+_);v(x,C,S);return}v(S,"",S)}function v(S,R,x){switch(S){case"event":f=R;break;case"data":d=`${d}${R}
|
|
3
3
|
`;break;case"id":c=R.includes("\0")?void 0:R;break;case"retry":/^\d+$/.test(R)?n(parseInt(R,10)):r(new KI(`Invalid \`retry\` value: "${R}"`,{type:"invalid-retry",value:R,line:x}));break;default:r(new KI(`Unknown field "${S.length>20?`${S.slice(0,20)}…`:S}"`,{type:"unknown-field",field:S,value:R,line:x}));break}}function y(){d.length>0&&e({id:c,event:f||void 0,data:d.endsWith(`
|
|
4
4
|
`)?d.slice(0,-1):d}),c=void 0,d="",f=""}function w(S={}){s&&S.consume&&h(s),l=!0,c=void 0,d="",f="",s=""}return{feed:m,reset:w}}function RW(t){const e=[];let r="",n=0;for(;n<t.length;){const a=t.indexOf("\r",n),s=t.indexOf(`
|
|
5
5
|
`,n);let l=-1;if(a!==-1&&s!==-1?l=Math.min(a,s):a!==-1?a===t.length-1?l=-1:l=a:s!==-1&&(l=s),l===-1){r=t.slice(n);break}else{const c=t.slice(n,l);e.push(c),n=l+1,t[n-1]==="\r"&&t[n]===`
|
|
@@ -22,7 +22,7 @@ Error generating stack: `+p.message+`
|
|
|
22
22
|
`+p.stack}}var $e=Object.prototype.hasOwnProperty,ct=t.unstable_scheduleCallback,ce=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,Fe=t.unstable_requestPaint,_e=t.unstable_now,Ie=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,Je=t.unstable_UserBlockingPriority,at=t.unstable_NormalPriority,Rt=t.unstable_LowPriority,Ot=t.unstable_IdlePriority,Cn=t.log,vr=t.unstable_setDisableYieldValue,or=null,Mt=null;function Zt(o){if(typeof Cn=="function"&&vr(o),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(or,o)}catch{}}var fr=Math.clz32?Math.clz32:ir,Sr=Math.log,zn=Math.LN2;function ir(o){return o>>>=0,o===0?32:31-(Sr(o)/zn|0)|0}var Gt=256,pn=262144,ua=4194304;function an(o){var i=o&42;if(i!==0)return i;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Qe(o,i,u){var p=o.pendingLanes;if(p===0)return 0;var E=0,T=o.suspendedLanes,D=o.pingedLanes;o=o.warmLanes;var B=p&134217727;return B!==0?(p=B&~T,p!==0?E=an(p):(D&=B,D!==0?E=an(D):u||(u=B&~o,u!==0&&(E=an(u))))):(B=p&~T,B!==0?E=an(B):D!==0?E=an(D):u||(u=p&~o,u!==0&&(E=an(u)))),E===0?0:i!==0&&i!==E&&(i&T)===0&&(T=E&-E,u=i&-i,T>=u||T===32&&(u&4194048)!==0)?i:E}function jt(o,i){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&i)===0}function Qt(o,i){switch(o){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Lr(){var o=ua;return ua<<=1,(ua&62914560)===0&&(ua=4194304),o}function $n(o){for(var i=[],u=0;31>u;u++)i.push(o);return i}function Xt(o,i){o.pendingLanes|=i,i!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Jr(o,i,u,p,E,T){var D=o.pendingLanes;o.pendingLanes=u,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=u,o.entangledLanes&=u,o.errorRecoveryDisabledLanes&=u,o.shellSuspendCounter=0;var B=o.entanglements,re=o.expirationTimes,me=o.hiddenUpdates;for(u=D&~u;0<u;){var Se=31-fr(u),Te=1<<Se;B[Se]=0,re[Se]=-1;var he=me[Se];if(he!==null)for(me[Se]=null,Se=0;Se<he.length;Se++){var Ee=he[Se];Ee!==null&&(Ee.lane&=-536870913)}u&=~Te}p!==0&&_a(o,p,0),T!==0&&E===0&&o.tag!==0&&(o.suspendedLanes|=T&~(D&~i))}function _a(o,i,u){o.pendingLanes|=i,o.suspendedLanes&=~i;var p=31-fr(i);o.entangledLanes|=i,o.entanglements[p]=o.entanglements[p]|1073741824|u&261930}function en(o,i){var u=o.entangledLanes|=i;for(o=o.entanglements;u;){var p=31-fr(u),E=1<<p;E&i|o[p]&i&&(o[p]|=i),u&=~E}}function Br(o,i){var u=i&-i;return u=(u&42)!==0?1:oe(u),(u&(o.suspendedLanes|i))!==0?0:u}function oe(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function K(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function ie(){var o=G.p;return o!==0?o:(o=window.event,o===void 0?32:Dk(o.type))}function ye(o,i){var u=G.p;try{return G.p=o,i()}finally{G.p=u}}var ge=Math.random().toString(36).slice(2),je="__reactFiber$"+ge,Be="__reactProps$"+ge,mt="__reactContainer$"+ge,Ut="__reactEvents$"+ge,sr="__reactListeners$"+ge,yt="__reactHandles$"+ge,Ft="__reactResources$"+ge,Wt="__reactMarker$"+ge;function ot(o){delete o[je],delete o[Be],delete o[Ut],delete o[sr],delete o[yt]}function Dt(o){var i=o[je];if(i)return i;for(var u=o.parentNode;u;){if(i=u[mt]||u[je]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(o=vk(o);o!==null;){if(u=o[je])return u;o=vk(o)}return i}o=u,u=o.parentNode}return null}function Yt(o){if(o=o[je]||o[mt]){var i=o.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return o}return null}function Pt(o){var i=o.tag;if(i===5||i===26||i===27||i===6)return o.stateNode;throw Error(n(33))}function on(o){var i=o[Ft];return i||(i=o[Ft]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function zt(o){o[Wt]=!0}var An=new Set,Qa={};function sn(o,i){Ar(o,i),Ar(o+"Capture",i)}function Ar(o,i){for(Qa[o]=i,o=0;o<i.length;o++)An.add(i[o])}var Bn=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]*$"),Ta={},qn={};function Mi(o){return $e.call(qn,o)?!0:$e.call(Ta,o)?!1:Bn.test(o)?qn[o]=!0:(Ta[o]=!0,!1)}function Pi(o,i,u){if(Mi(i))if(u===null)o.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":o.removeAttribute(i);return;case"boolean":var p=i.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){o.removeAttribute(i);return}}o.setAttribute(i,""+u)}}function ji(o,i,u){if(u===null)o.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(i);return}o.setAttribute(i,""+u)}}function mn(o,i,u,p){if(p===null)o.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttributeNS(i,u,""+p)}}function qr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Ui(o){var i=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Xd(o,i,u){var p=Object.getOwnPropertyDescriptor(o.constructor.prototype,i);if(!o.hasOwnProperty(i)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var E=p.get,T=p.set;return Object.defineProperty(o,i,{configurable:!0,get:function(){return E.call(this)},set:function(D){u=""+D,T.call(this,D)}}),Object.defineProperty(o,i,{enumerable:p.enumerable}),{getValue:function(){return u},setValue:function(D){u=""+D},stopTracking:function(){o._valueTracker=null,delete o[i]}}}}function Os(o){if(!o._valueTracker){var i=Ui(o)?"checked":"value";o._valueTracker=Xd(o,i,""+o[i])}}function zo(o){if(!o)return!1;var i=o._valueTracker;if(!i)return!0;var u=i.getValue(),p="";return o&&(p=Ui(o)?o.checked?"true":"false":o.value),o=p,o!==u?(i.setValue(o),!0):!1}function Qd(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var fV=/[\n"\\]/g;function Hn(o){return o.replace(fV,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Ih(o,i,u,p,E,T,D,B){o.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?o.type=D:o.removeAttribute("type"),i!=null?D==="number"?(i===0&&o.value===""||o.value!=i)&&(o.value=""+qr(i)):o.value!==""+qr(i)&&(o.value=""+qr(i)):D!=="submit"&&D!=="reset"||o.removeAttribute("value"),i!=null?Oh(o,D,qr(i)):u!=null?Oh(o,D,qr(u)):p!=null&&o.removeAttribute("value"),E==null&&T!=null&&(o.defaultChecked=!!T),E!=null&&(o.checked=E&&typeof E!="function"&&typeof E!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?o.name=""+qr(B):o.removeAttribute("name")}function nA(o,i,u,p,E,T,D,B){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(o.type=T),i!=null||u!=null){if(!(T!=="submit"&&T!=="reset"||i!=null)){Os(o);return}u=u!=null?""+qr(u):"",i=i!=null?""+qr(i):u,B||i===o.value||(o.value=i),o.defaultValue=i}p=p??E,p=typeof p!="function"&&typeof p!="symbol"&&!!p,o.checked=B?o.checked:!!p,o.defaultChecked=!!p,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(o.name=D),Os(o)}function Oh(o,i,u){i==="number"&&Qd(o.ownerDocument)===o||o.defaultValue===""+u||(o.defaultValue=""+u)}function Ds(o,i,u,p){if(o=o.options,i){i={};for(var E=0;E<u.length;E++)i["$"+u[E]]=!0;for(u=0;u<o.length;u++)E=i.hasOwnProperty("$"+o[u].value),o[u].selected!==E&&(o[u].selected=E),E&&p&&(o[u].defaultSelected=!0)}else{for(u=""+qr(u),i=null,E=0;E<o.length;E++){if(o[E].value===u){o[E].selected=!0,p&&(o[E].defaultSelected=!0);return}i!==null||o[E].disabled||(i=o[E])}i!==null&&(i.selected=!0)}}function aA(o,i,u){if(i!=null&&(i=""+qr(i),i!==o.value&&(o.value=i),u==null)){o.defaultValue!==i&&(o.defaultValue=i);return}o.defaultValue=u!=null?""+qr(u):""}function oA(o,i,u,p){if(i==null){if(p!=null){if(u!=null)throw Error(n(92));if(ee(p)){if(1<p.length)throw Error(n(93));p=p[0]}u=p}u==null&&(u=""),i=u}u=qr(i),o.defaultValue=u,p=o.textContent,p===u&&p!==""&&p!==null&&(o.value=p),Os(o)}function Ls(o,i){if(i){var u=o.firstChild;if(u&&u===o.lastChild&&u.nodeType===3){u.nodeValue=i;return}}o.textContent=i}var pV=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 iA(o,i,u){var p=i.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?p?o.setProperty(i,""):i==="float"?o.cssFloat="":o[i]="":p?o.setProperty(i,u):typeof u!="number"||u===0||pV.has(i)?i==="float"?o.cssFloat=u:o[i]=(""+u).trim():o[i]=u+"px"}function sA(o,i,u){if(i!=null&&typeof i!="object")throw Error(n(62));if(o=o.style,u!=null){for(var p in u)!u.hasOwnProperty(p)||i!=null&&i.hasOwnProperty(p)||(p.indexOf("--")===0?o.setProperty(p,""):p==="float"?o.cssFloat="":o[p]="");for(var E in i)p=i[E],i.hasOwnProperty(E)&&u[E]!==p&&iA(o,E,p)}else for(var T in i)i.hasOwnProperty(T)&&iA(o,T,i[T])}function Dh(o){if(o.indexOf("-")===-1)return!1;switch(o){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 mV=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"]]),hV=/^[\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 Jd(o){return hV.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function Ja(){}var Lh=null;function Mh(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Ms=null,Ps=null;function lA(o){var i=Yt(o);if(i&&(o=i.stateNode)){var u=o[Be]||null;e:switch(o=i.stateNode,i.type){case"input":if(Ih(o,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),i=u.name,u.type==="radio"&&i!=null){for(u=o;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Hn(""+i)+'"][type="radio"]'),i=0;i<u.length;i++){var p=u[i];if(p!==o&&p.form===o.form){var E=p[Be]||null;if(!E)throw Error(n(90));Ih(p,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(i=0;i<u.length;i++)p=u[i],p.form===o.form&&zo(p)}break e;case"textarea":aA(o,u.value,u.defaultValue);break e;case"select":i=u.value,i!=null&&Ds(o,!!u.multiple,i,!1)}}}var Ph=!1;function cA(o,i,u){if(Ph)return o(i,u);Ph=!0;try{var p=o(i);return p}finally{if(Ph=!1,(Ms!==null||Ps!==null)&&($f(),Ms&&(i=Ms,o=Ps,Ps=Ms=null,lA(i),o)))for(i=0;i<o.length;i++)lA(o[i])}}function Nc(o,i){var u=o.stateNode;if(u===null)return null;var p=u[Be]||null;if(p===null)return null;u=p[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(o=o.type,p=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!p;break e;default:o=!1}if(o)return null;if(u&&typeof u!="function")throw Error(n(231,i,typeof u));return u}var eo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jh=!1;if(eo)try{var kc={};Object.defineProperty(kc,"passive",{get:function(){jh=!0}}),window.addEventListener("test",kc,kc),window.removeEventListener("test",kc,kc)}catch{jh=!1}var $o=null,Uh=null,ef=null;function uA(){if(ef)return ef;var o,i=Uh,u=i.length,p,E="value"in $o?$o.value:$o.textContent,T=E.length;for(o=0;o<u&&i[o]===E[o];o++);var D=u-o;for(p=1;p<=D&&i[u-p]===E[T-p];p++);return ef=E.slice(o,1<p?1-p:void 0)}function tf(o){var i=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&i===13&&(o=13)):o=i,o===10&&(o=13),32<=o||o===13?o:0}function rf(){return!0}function dA(){return!1}function hn(o){function i(u,p,E,T,D){this._reactName=u,this._targetInst=E,this.type=p,this.nativeEvent=T,this.target=D,this.currentTarget=null;for(var B in o)o.hasOwnProperty(B)&&(u=o[B],this[B]=u?u(T):T[B]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?rf:dA,this.isPropagationStopped=dA,this}return h(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=rf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=rf)},persist:function(){},isPersistent:rf}),i}var Fi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nf=hn(Fi),Ic=h({},Fi,{view:0,detail:0}),gV=hn(Ic),Fh,zh,Oc,af=h({},Ic,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bh,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Oc&&(Oc&&o.type==="mousemove"?(Fh=o.screenX-Oc.screenX,zh=o.screenY-Oc.screenY):zh=Fh=0,Oc=o),Fh)},movementY:function(o){return"movementY"in o?o.movementY:zh}}),fA=hn(af),vV=h({},af,{dataTransfer:0}),bV=hn(vV),yV=h({},Ic,{relatedTarget:0}),$h=hn(yV),EV=h({},Fi,{animationName:0,elapsedTime:0,pseudoElement:0}),SV=hn(EV),xV=h({},Fi,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),wV=hn(xV),_V=h({},Fi,{data:0}),pA=hn(_V),TV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},RV={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"},CV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function AV(o){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(o):(o=CV[o])?!!i[o]:!1}function Bh(){return AV}var NV=h({},Ic,{key:function(o){if(o.key){var i=TV[o.key]||o.key;if(i!=="Unidentified")return i}return o.type==="keypress"?(o=tf(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?RV[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bh,charCode:function(o){return o.type==="keypress"?tf(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?tf(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),kV=hn(NV),IV=h({},af,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mA=hn(IV),OV=h({},Ic,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bh}),DV=hn(OV),LV=h({},Fi,{propertyName:0,elapsedTime:0,pseudoElement:0}),MV=hn(LV),PV=h({},af,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),jV=hn(PV),UV=h({},Fi,{newState:0,oldState:0}),FV=hn(UV),zV=[9,13,27,32],qh=eo&&"CompositionEvent"in window,Dc=null;eo&&"documentMode"in document&&(Dc=document.documentMode);var $V=eo&&"TextEvent"in window&&!Dc,hA=eo&&(!qh||Dc&&8<Dc&&11>=Dc),gA=" ",vA=!1;function bA(o,i){switch(o){case"keyup":return zV.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yA(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var js=!1;function BV(o,i){switch(o){case"compositionend":return yA(i);case"keypress":return i.which!==32?null:(vA=!0,gA);case"textInput":return o=i.data,o===gA&&vA?null:o;default:return null}}function qV(o,i){if(js)return o==="compositionend"||!qh&&bA(o,i)?(o=uA(),ef=Uh=$o=null,js=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return hA&&i.locale!=="ko"?null:i.data;default:return null}}var HV={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 EA(o){var i=o&&o.nodeName&&o.nodeName.toLowerCase();return i==="input"?!!HV[o.type]:i==="textarea"}function SA(o,i,u,p){Ms?Ps?Ps.push(p):Ps=[p]:Ms=p,i=Yf(i,"onChange"),0<i.length&&(u=new nf("onChange","change",null,u,p),o.push({event:u,listeners:i}))}var Lc=null,Mc=null;function VV(o){nk(o,0)}function of(o){var i=Pt(o);if(zo(i))return o}function xA(o,i){if(o==="change")return i}var wA=!1;if(eo){var Hh;if(eo){var Vh="oninput"in document;if(!Vh){var _A=document.createElement("div");_A.setAttribute("oninput","return;"),Vh=typeof _A.oninput=="function"}Hh=Vh}else Hh=!1;wA=Hh&&(!document.documentMode||9<document.documentMode)}function TA(){Lc&&(Lc.detachEvent("onpropertychange",RA),Mc=Lc=null)}function RA(o){if(o.propertyName==="value"&&of(Mc)){var i=[];SA(i,Mc,o,Mh(o)),cA(VV,i)}}function GV(o,i,u){o==="focusin"?(TA(),Lc=i,Mc=u,Lc.attachEvent("onpropertychange",RA)):o==="focusout"&&TA()}function WV(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return of(Mc)}function YV(o,i){if(o==="click")return of(i)}function KV(o,i){if(o==="input"||o==="change")return of(i)}function ZV(o,i){return o===i&&(o!==0||1/o===1/i)||o!==o&&i!==i}var Nn=typeof Object.is=="function"?Object.is:ZV;function Pc(o,i){if(Nn(o,i))return!0;if(typeof o!="object"||o===null||typeof i!="object"||i===null)return!1;var u=Object.keys(o),p=Object.keys(i);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var E=u[p];if(!$e.call(i,E)||!Nn(o[E],i[E]))return!1}return!0}function CA(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function AA(o,i){var u=CA(o);o=0;for(var p;u;){if(u.nodeType===3){if(p=o+u.textContent.length,o<=i&&p>=i)return{node:u,offset:i-o};o=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=CA(u)}}function NA(o,i){return o&&i?o===i?!0:o&&o.nodeType===3?!1:i&&i.nodeType===3?NA(o,i.parentNode):"contains"in o?o.contains(i):o.compareDocumentPosition?!!(o.compareDocumentPosition(i)&16):!1:!1}function kA(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var i=Qd(o.document);i instanceof o.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)o=i.contentWindow;else break;i=Qd(o.document)}return i}function Gh(o){var i=o&&o.nodeName&&o.nodeName.toLowerCase();return i&&(i==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||i==="textarea"||o.contentEditable==="true")}var XV=eo&&"documentMode"in document&&11>=document.documentMode,Us=null,Wh=null,jc=null,Yh=!1;function IA(o,i,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Yh||Us==null||Us!==Qd(p)||(p=Us,"selectionStart"in p&&Gh(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),jc&&Pc(jc,p)||(jc=p,p=Yf(Wh,"onSelect"),0<p.length&&(i=new nf("onSelect","select",null,i,u),o.push({event:i,listeners:p}),i.target=Us)))}function zi(o,i){var u={};return u[o.toLowerCase()]=i.toLowerCase(),u["Webkit"+o]="webkit"+i,u["Moz"+o]="moz"+i,u}var Fs={animationend:zi("Animation","AnimationEnd"),animationiteration:zi("Animation","AnimationIteration"),animationstart:zi("Animation","AnimationStart"),transitionrun:zi("Transition","TransitionRun"),transitionstart:zi("Transition","TransitionStart"),transitioncancel:zi("Transition","TransitionCancel"),transitionend:zi("Transition","TransitionEnd")},Kh={},OA={};eo&&(OA=document.createElement("div").style,"AnimationEvent"in window||(delete Fs.animationend.animation,delete Fs.animationiteration.animation,delete Fs.animationstart.animation),"TransitionEvent"in window||delete Fs.transitionend.transition);function $i(o){if(Kh[o])return Kh[o];if(!Fs[o])return o;var i=Fs[o],u;for(u in i)if(i.hasOwnProperty(u)&&u in OA)return Kh[o]=i[u];return o}var DA=$i("animationend"),LA=$i("animationiteration"),MA=$i("animationstart"),QV=$i("transitionrun"),JV=$i("transitionstart"),eG=$i("transitioncancel"),PA=$i("transitionend"),jA=new Map,Zh="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(" ");Zh.push("scrollEnd");function da(o,i){jA.set(o,i),sn(i,[o])}var sf=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Vn=[],zs=0,Xh=0;function lf(){for(var o=zs,i=Xh=zs=0;i<o;){var u=Vn[i];Vn[i++]=null;var p=Vn[i];Vn[i++]=null;var E=Vn[i];Vn[i++]=null;var T=Vn[i];if(Vn[i++]=null,p!==null&&E!==null){var D=p.pending;D===null?E.next=E:(E.next=D.next,D.next=E),p.pending=E}T!==0&&UA(u,E,T)}}function cf(o,i,u,p){Vn[zs++]=o,Vn[zs++]=i,Vn[zs++]=u,Vn[zs++]=p,Xh|=p,o.lanes|=p,o=o.alternate,o!==null&&(o.lanes|=p)}function Qh(o,i,u,p){return cf(o,i,u,p),uf(o)}function Bi(o,i){return cf(o,null,null,i),uf(o)}function UA(o,i,u){o.lanes|=u;var p=o.alternate;p!==null&&(p.lanes|=u);for(var E=!1,T=o.return;T!==null;)T.childLanes|=u,p=T.alternate,p!==null&&(p.childLanes|=u),T.tag===22&&(o=T.stateNode,o===null||o._visibility&1||(E=!0)),o=T,T=T.return;return o.tag===3?(T=o.stateNode,E&&i!==null&&(E=31-fr(u),o=T.hiddenUpdates,p=o[E],p===null?o[E]=[i]:p.push(i),i.lane=u|536870912),T):null}function uf(o){if(50<ou)throw ou=0,sv=null,Error(n(185));for(var i=o.return;i!==null;)o=i,i=o.return;return o.tag===3?o.stateNode:null}var $s={};function tG(o,i,u,p){this.tag=o,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kn(o,i,u,p){return new tG(o,i,u,p)}function Jh(o){return o=o.prototype,!(!o||!o.isReactComponent)}function to(o,i){var u=o.alternate;return u===null?(u=kn(o.tag,i,o.key,o.mode),u.elementType=o.elementType,u.type=o.type,u.stateNode=o.stateNode,u.alternate=o,o.alternate=u):(u.pendingProps=i,u.type=o.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=o.flags&65011712,u.childLanes=o.childLanes,u.lanes=o.lanes,u.child=o.child,u.memoizedProps=o.memoizedProps,u.memoizedState=o.memoizedState,u.updateQueue=o.updateQueue,i=o.dependencies,u.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=o.sibling,u.index=o.index,u.ref=o.ref,u.refCleanup=o.refCleanup,u}function FA(o,i){o.flags&=65011714;var u=o.alternate;return u===null?(o.childLanes=0,o.lanes=i,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=u.childLanes,o.lanes=u.lanes,o.child=u.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=u.memoizedProps,o.memoizedState=u.memoizedState,o.updateQueue=u.updateQueue,o.type=u.type,i=u.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),o}function df(o,i,u,p,E,T){var D=0;if(p=o,typeof o=="function")Jh(o)&&(D=1);else if(typeof o=="string")D=i6(o,u,W.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case L:return o=kn(31,u,i,E),o.elementType=L,o.lanes=T,o;case S:return qi(u.children,E,T,i);case R:D=8,E|=24;break;case x:return o=kn(12,u,i,E|2),o.elementType=x,o.lanes=T,o;case k:return o=kn(13,u,i,E),o.elementType=k,o.lanes=T,o;case A:return o=kn(19,u,i,E),o.elementType=A,o.lanes=T,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case C:D=10;break e;case _:D=9;break e;case N:D=11;break e;case I:D=14;break e;case O:D=16,p=null;break e}D=29,u=Error(n(130,o===null?"null":typeof o,"")),p=null}return i=kn(D,u,i,E),i.elementType=o,i.type=p,i.lanes=T,i}function qi(o,i,u,p){return o=kn(7,o,p,i),o.lanes=u,o}function eg(o,i,u){return o=kn(6,o,null,i),o.lanes=u,o}function zA(o){var i=kn(18,null,null,0);return i.stateNode=o,i}function tg(o,i,u){return i=kn(4,o.children!==null?o.children:[],o.key,i),i.lanes=u,i.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},i}var $A=new WeakMap;function Gn(o,i){if(typeof o=="object"&&o!==null){var u=$A.get(o);return u!==void 0?u:(i={value:o,source:i,stack:Me(i)},$A.set(o,i),i)}return{value:o,source:i,stack:Me(i)}}var Bs=[],qs=0,ff=null,Uc=0,Wn=[],Yn=0,Bo=null,Ra=1,Ca="";function ro(o,i){Bs[qs++]=Uc,Bs[qs++]=ff,ff=o,Uc=i}function BA(o,i,u){Wn[Yn++]=Ra,Wn[Yn++]=Ca,Wn[Yn++]=Bo,Bo=o;var p=Ra;o=Ca;var E=32-fr(p)-1;p&=~(1<<E),u+=1;var T=32-fr(i)+E;if(30<T){var D=E-E%5;T=(p&(1<<D)-1).toString(32),p>>=D,E-=D,Ra=1<<32-fr(i)+E|u<<E|p,Ca=T+o}else Ra=1<<T|u<<E|p,Ca=o}function rg(o){o.return!==null&&(ro(o,1),BA(o,1,0))}function ng(o){for(;o===ff;)ff=Bs[--qs],Bs[qs]=null,Uc=Bs[--qs],Bs[qs]=null;for(;o===Bo;)Bo=Wn[--Yn],Wn[Yn]=null,Ca=Wn[--Yn],Wn[Yn]=null,Ra=Wn[--Yn],Wn[Yn]=null}function qA(o,i){Wn[Yn++]=Ra,Wn[Yn++]=Ca,Wn[Yn++]=Bo,Ra=i.id,Ca=i.overflow,Bo=o}var Hr=null,Jt=null,Ct=!1,qo=null,Kn=!1,ag=Error(n(519));function Ho(o){var i=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fc(Gn(i,o)),ag}function HA(o){var i=o.stateNode,u=o.type,p=o.memoizedProps;switch(i[je]=o,i[Be]=p,u){case"dialog":St("cancel",i),St("close",i);break;case"iframe":case"object":case"embed":St("load",i);break;case"video":case"audio":for(u=0;u<su.length;u++)St(su[u],i);break;case"source":St("error",i);break;case"img":case"image":case"link":St("error",i),St("load",i);break;case"details":St("toggle",i);break;case"input":St("invalid",i),nA(i,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":St("invalid",i);break;case"textarea":St("invalid",i),oA(i,p.value,p.defaultValue,p.children)}u=p.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||i.textContent===""+u||p.suppressHydrationWarning===!0||sk(i.textContent,u)?(p.popover!=null&&(St("beforetoggle",i),St("toggle",i)),p.onScroll!=null&&St("scroll",i),p.onScrollEnd!=null&&St("scrollend",i),p.onClick!=null&&(i.onclick=Ja),i=!0):i=!1,i||Ho(o,!0)}function VA(o){for(Hr=o.return;Hr;)switch(Hr.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:Hr=Hr.return}}function Hs(o){if(o!==Hr)return!1;if(!Ct)return VA(o),Ct=!0,!1;var i=o.tag,u;if((u=i!==3&&i!==27)&&((u=i===5)&&(u=o.type,u=!(u!=="form"&&u!=="button")||xv(o.type,o.memoizedProps)),u=!u),u&&Jt&&Ho(o),VA(o),i===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(317));Jt=gk(o)}else if(i===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(317));Jt=gk(o)}else i===27?(i=Jt,ai(o.type)?(o=Cv,Cv=null,Jt=o):Jt=i):Jt=Hr?Xn(o.stateNode.nextSibling):null;return!0}function Hi(){Jt=Hr=null,Ct=!1}function og(){var o=qo;return o!==null&&(yn===null?yn=o:yn.push.apply(yn,o),qo=null),o}function Fc(o){qo===null?qo=[o]:qo.push(o)}var ig=z(null),Vi=null,no=null;function Vo(o,i,u){$(ig,i._currentValue),i._currentValue=u}function ao(o){o._currentValue=ig.current,q(ig)}function sg(o,i,u){for(;o!==null;){var p=o.alternate;if((o.childLanes&i)!==i?(o.childLanes|=i,p!==null&&(p.childLanes|=i)):p!==null&&(p.childLanes&i)!==i&&(p.childLanes|=i),o===u)break;o=o.return}}function lg(o,i,u,p){var E=o.child;for(E!==null&&(E.return=o);E!==null;){var T=E.dependencies;if(T!==null){var D=E.child;T=T.firstContext;e:for(;T!==null;){var B=T;T=E;for(var re=0;re<i.length;re++)if(B.context===i[re]){T.lanes|=u,B=T.alternate,B!==null&&(B.lanes|=u),sg(T.return,u,o),p||(D=null);break e}T=B.next}}else if(E.tag===18){if(D=E.return,D===null)throw Error(n(341));D.lanes|=u,T=D.alternate,T!==null&&(T.lanes|=u),sg(D,u,o),D=null}else D=E.child;if(D!==null)D.return=E;else for(D=E;D!==null;){if(D===o){D=null;break}if(E=D.sibling,E!==null){E.return=D.return,D=E;break}D=D.return}E=D}}function Vs(o,i,u,p){o=null;for(var E=i,T=!1;E!==null;){if(!T){if((E.flags&524288)!==0)T=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var D=E.alternate;if(D===null)throw Error(n(387));if(D=D.memoizedProps,D!==null){var B=E.type;Nn(E.pendingProps.value,D.value)||(o!==null?o.push(B):o=[B])}}else if(E===j.current){if(D=E.alternate,D===null)throw Error(n(387));D.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(o!==null?o.push(fu):o=[fu])}E=E.return}o!==null&&lg(i,o,u,p),i.flags|=262144}function pf(o){for(o=o.firstContext;o!==null;){if(!Nn(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function Gi(o){Vi=o,no=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Vr(o){return GA(Vi,o)}function mf(o,i){return Vi===null&&Gi(o),GA(o,i)}function GA(o,i){var u=i._currentValue;if(i={context:i,memoizedValue:u,next:null},no===null){if(o===null)throw Error(n(308));no=i,o.dependencies={lanes:0,firstContext:i},o.flags|=524288}else no=no.next=i;return u}var rG=typeof AbortController<"u"?AbortController:function(){var o=[],i=this.signal={aborted:!1,addEventListener:function(u,p){o.push(p)}};this.abort=function(){i.aborted=!0,o.forEach(function(u){return u()})}},nG=t.unstable_scheduleCallback,aG=t.unstable_NormalPriority,xr={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function cg(){return{controller:new rG,data:new Map,refCount:0}}function zc(o){o.refCount--,o.refCount===0&&nG(aG,function(){o.controller.abort()})}var $c=null,ug=0,Gs=0,Ws=null;function oG(o,i){if($c===null){var u=$c=[];ug=0,Gs=pv(),Ws={status:"pending",value:void 0,then:function(p){u.push(p)}}}return ug++,i.then(WA,WA),i}function WA(){if(--ug===0&&$c!==null){Ws!==null&&(Ws.status="fulfilled");var o=$c;$c=null,Gs=0,Ws=null;for(var i=0;i<o.length;i++)(0,o[i])()}}function iG(o,i){var u=[],p={status:"pending",value:null,reason:null,then:function(E){u.push(E)}};return o.then(function(){p.status="fulfilled",p.value=i;for(var E=0;E<u.length;E++)(0,u[E])(i)},function(E){for(p.status="rejected",p.reason=E,E=0;E<u.length;E++)(0,u[E])(void 0)}),p}var YA=U.S;U.S=function(o,i){I1=_e(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&oG(o,i),YA!==null&&YA(o,i)};var Wi=z(null);function dg(){var o=Wi.current;return o!==null?o:Kt.pooledCache}function hf(o,i){i===null?$(Wi,Wi.current):$(Wi,i.pool)}function KA(){var o=dg();return o===null?null:{parent:xr._currentValue,pool:o}}var Ys=Error(n(460)),fg=Error(n(474)),gf=Error(n(542)),vf={then:function(){}};function ZA(o){return o=o.status,o==="fulfilled"||o==="rejected"}function XA(o,i,u){switch(u=o[u],u===void 0?o.push(i):u!==i&&(i.then(Ja,Ja),i=u),i.status){case"fulfilled":return i.value;case"rejected":throw o=i.reason,JA(o),o;default:if(typeof i.status=="string")i.then(Ja,Ja);else{if(o=Kt,o!==null&&100<o.shellSuspendCounter)throw Error(n(482));o=i,o.status="pending",o.then(function(p){if(i.status==="pending"){var E=i;E.status="fulfilled",E.value=p}},function(p){if(i.status==="pending"){var E=i;E.status="rejected",E.reason=p}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw o=i.reason,JA(o),o}throw Ki=i,Ys}}function Yi(o){try{var i=o._init;return i(o._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Ki=u,Ys):u}}var Ki=null;function QA(){if(Ki===null)throw Error(n(459));var o=Ki;return Ki=null,o}function JA(o){if(o===Ys||o===gf)throw Error(n(483))}var Ks=null,Bc=0;function bf(o){var i=Bc;return Bc+=1,Ks===null&&(Ks=[]),XA(Ks,o,i)}function qc(o,i){i=i.props.ref,o.ref=i!==void 0?i:null}function yf(o,i){throw i.$$typeof===v?Error(n(525)):(o=Object.prototype.toString.call(i),Error(n(31,o==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":o)))}function eN(o){function i(ue,se){if(o){var pe=ue.deletions;pe===null?(ue.deletions=[se],ue.flags|=16):pe.push(se)}}function u(ue,se){if(!o)return null;for(;se!==null;)i(ue,se),se=se.sibling;return null}function p(ue){for(var se=new Map;ue!==null;)ue.key!==null?se.set(ue.key,ue):se.set(ue.index,ue),ue=ue.sibling;return se}function E(ue,se){return ue=to(ue,se),ue.index=0,ue.sibling=null,ue}function T(ue,se,pe){return ue.index=pe,o?(pe=ue.alternate,pe!==null?(pe=pe.index,pe<se?(ue.flags|=67108866,se):pe):(ue.flags|=67108866,se)):(ue.flags|=1048576,se)}function D(ue){return o&&ue.alternate===null&&(ue.flags|=67108866),ue}function B(ue,se,pe,we){return se===null||se.tag!==6?(se=eg(pe,ue.mode,we),se.return=ue,se):(se=E(se,pe),se.return=ue,se)}function re(ue,se,pe,we){var et=pe.type;return et===S?Se(ue,se,pe.props.children,we,pe.key):se!==null&&(se.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===O&&Yi(et)===se.type)?(se=E(se,pe.props),qc(se,pe),se.return=ue,se):(se=df(pe.type,pe.key,pe.props,null,ue.mode,we),qc(se,pe),se.return=ue,se)}function me(ue,se,pe,we){return se===null||se.tag!==4||se.stateNode.containerInfo!==pe.containerInfo||se.stateNode.implementation!==pe.implementation?(se=tg(pe,ue.mode,we),se.return=ue,se):(se=E(se,pe.children||[]),se.return=ue,se)}function Se(ue,se,pe,we,et){return se===null||se.tag!==7?(se=qi(pe,ue.mode,we,et),se.return=ue,se):(se=E(se,pe),se.return=ue,se)}function Te(ue,se,pe){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return se=eg(""+se,ue.mode,pe),se.return=ue,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case y:return pe=df(se.type,se.key,se.props,null,ue.mode,pe),qc(pe,se),pe.return=ue,pe;case w:return se=tg(se,ue.mode,pe),se.return=ue,se;case O:return se=Yi(se),Te(ue,se,pe)}if(ee(se)||Y(se))return se=qi(se,ue.mode,pe,null),se.return=ue,se;if(typeof se.then=="function")return Te(ue,bf(se),pe);if(se.$$typeof===C)return Te(ue,mf(ue,se),pe);yf(ue,se)}return null}function he(ue,se,pe,we){var et=se!==null?se.key:null;if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return et!==null?null:B(ue,se,""+pe,we);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case y:return pe.key===et?re(ue,se,pe,we):null;case w:return pe.key===et?me(ue,se,pe,we):null;case O:return pe=Yi(pe),he(ue,se,pe,we)}if(ee(pe)||Y(pe))return et!==null?null:Se(ue,se,pe,we,null);if(typeof pe.then=="function")return he(ue,se,bf(pe),we);if(pe.$$typeof===C)return he(ue,se,mf(ue,pe),we);yf(ue,pe)}return null}function Ee(ue,se,pe,we,et){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return ue=ue.get(pe)||null,B(se,ue,""+we,et);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case y:return ue=ue.get(we.key===null?pe:we.key)||null,re(se,ue,we,et);case w:return ue=ue.get(we.key===null?pe:we.key)||null,me(se,ue,we,et);case O:return we=Yi(we),Ee(ue,se,pe,we,et)}if(ee(we)||Y(we))return ue=ue.get(pe)||null,Se(se,ue,we,et,null);if(typeof we.then=="function")return Ee(ue,se,pe,bf(we),et);if(we.$$typeof===C)return Ee(ue,se,pe,mf(se,we),et);yf(se,we)}return null}function Ve(ue,se,pe,we){for(var et=null,kt=null,Ke=se,ht=se=0,Tt=null;Ke!==null&&ht<pe.length;ht++){Ke.index>ht?(Tt=Ke,Ke=null):Tt=Ke.sibling;var It=he(ue,Ke,pe[ht],we);if(It===null){Ke===null&&(Ke=Tt);break}o&&Ke&&It.alternate===null&&i(ue,Ke),se=T(It,se,ht),kt===null?et=It:kt.sibling=It,kt=It,Ke=Tt}if(ht===pe.length)return u(ue,Ke),Ct&&ro(ue,ht),et;if(Ke===null){for(;ht<pe.length;ht++)Ke=Te(ue,pe[ht],we),Ke!==null&&(se=T(Ke,se,ht),kt===null?et=Ke:kt.sibling=Ke,kt=Ke);return Ct&&ro(ue,ht),et}for(Ke=p(Ke);ht<pe.length;ht++)Tt=Ee(Ke,ue,ht,pe[ht],we),Tt!==null&&(o&&Tt.alternate!==null&&Ke.delete(Tt.key===null?ht:Tt.key),se=T(Tt,se,ht),kt===null?et=Tt:kt.sibling=Tt,kt=Tt);return o&&Ke.forEach(function(ci){return i(ue,ci)}),Ct&&ro(ue,ht),et}function rt(ue,se,pe,we){if(pe==null)throw Error(n(151));for(var et=null,kt=null,Ke=se,ht=se=0,Tt=null,It=pe.next();Ke!==null&&!It.done;ht++,It=pe.next()){Ke.index>ht?(Tt=Ke,Ke=null):Tt=Ke.sibling;var ci=he(ue,Ke,It.value,we);if(ci===null){Ke===null&&(Ke=Tt);break}o&&Ke&&ci.alternate===null&&i(ue,Ke),se=T(ci,se,ht),kt===null?et=ci:kt.sibling=ci,kt=ci,Ke=Tt}if(It.done)return u(ue,Ke),Ct&&ro(ue,ht),et;if(Ke===null){for(;!It.done;ht++,It=pe.next())It=Te(ue,It.value,we),It!==null&&(se=T(It,se,ht),kt===null?et=It:kt.sibling=It,kt=It);return Ct&&ro(ue,ht),et}for(Ke=p(Ke);!It.done;ht++,It=pe.next())It=Ee(Ke,ue,ht,It.value,we),It!==null&&(o&&It.alternate!==null&&Ke.delete(It.key===null?ht:It.key),se=T(It,se,ht),kt===null?et=It:kt.sibling=It,kt=It);return o&&Ke.forEach(function(v6){return i(ue,v6)}),Ct&&ro(ue,ht),et}function Vt(ue,se,pe,we){if(typeof pe=="object"&&pe!==null&&pe.type===S&&pe.key===null&&(pe=pe.props.children),typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case y:e:{for(var et=pe.key;se!==null;){if(se.key===et){if(et=pe.type,et===S){if(se.tag===7){u(ue,se.sibling),we=E(se,pe.props.children),we.return=ue,ue=we;break e}}else if(se.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===O&&Yi(et)===se.type){u(ue,se.sibling),we=E(se,pe.props),qc(we,pe),we.return=ue,ue=we;break e}u(ue,se);break}else i(ue,se);se=se.sibling}pe.type===S?(we=qi(pe.props.children,ue.mode,we,pe.key),we.return=ue,ue=we):(we=df(pe.type,pe.key,pe.props,null,ue.mode,we),qc(we,pe),we.return=ue,ue=we)}return D(ue);case w:e:{for(et=pe.key;se!==null;){if(se.key===et)if(se.tag===4&&se.stateNode.containerInfo===pe.containerInfo&&se.stateNode.implementation===pe.implementation){u(ue,se.sibling),we=E(se,pe.children||[]),we.return=ue,ue=we;break e}else{u(ue,se);break}else i(ue,se);se=se.sibling}we=tg(pe,ue.mode,we),we.return=ue,ue=we}return D(ue);case O:return pe=Yi(pe),Vt(ue,se,pe,we)}if(ee(pe))return Ve(ue,se,pe,we);if(Y(pe)){if(et=Y(pe),typeof et!="function")throw Error(n(150));return pe=et.call(pe),rt(ue,se,pe,we)}if(typeof pe.then=="function")return Vt(ue,se,bf(pe),we);if(pe.$$typeof===C)return Vt(ue,se,mf(ue,pe),we);yf(ue,pe)}return typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint"?(pe=""+pe,se!==null&&se.tag===6?(u(ue,se.sibling),we=E(se,pe),we.return=ue,ue=we):(u(ue,se),we=eg(pe,ue.mode,we),we.return=ue,ue=we),D(ue)):u(ue,se)}return function(ue,se,pe,we){try{Bc=0;var et=Vt(ue,se,pe,we);return Ks=null,et}catch(Ke){if(Ke===Ys||Ke===gf)throw Ke;var kt=kn(29,Ke,null,ue.mode);return kt.lanes=we,kt.return=ue,kt}finally{}}}var Zi=eN(!0),tN=eN(!1),Go=!1;function pg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mg(o,i){o=o.updateQueue,i.updateQueue===o&&(i.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Wo(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Yo(o,i,u){var p=o.updateQueue;if(p===null)return null;if(p=p.shared,(Lt&2)!==0){var E=p.pending;return E===null?i.next=i:(i.next=E.next,E.next=i),p.pending=i,i=uf(o),UA(o,null,u),i}return cf(o,p,i,u),uf(o)}function Hc(o,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194048)!==0)){var p=i.lanes;p&=o.pendingLanes,u|=p,i.lanes=u,en(o,u)}}function hg(o,i){var u=o.updateQueue,p=o.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var E=null,T=null;if(u=u.firstBaseUpdate,u!==null){do{var D={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};T===null?E=T=D:T=T.next=D,u=u.next}while(u!==null);T===null?E=T=i:T=T.next=i}else E=T=i;u={baseState:p.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:p.shared,callbacks:p.callbacks},o.updateQueue=u;return}o=u.lastBaseUpdate,o===null?u.firstBaseUpdate=i:o.next=i,u.lastBaseUpdate=i}var gg=!1;function Vc(){if(gg){var o=Ws;if(o!==null)throw o}}function Gc(o,i,u,p){gg=!1;var E=o.updateQueue;Go=!1;var T=E.firstBaseUpdate,D=E.lastBaseUpdate,B=E.shared.pending;if(B!==null){E.shared.pending=null;var re=B,me=re.next;re.next=null,D===null?T=me:D.next=me,D=re;var Se=o.alternate;Se!==null&&(Se=Se.updateQueue,B=Se.lastBaseUpdate,B!==D&&(B===null?Se.firstBaseUpdate=me:B.next=me,Se.lastBaseUpdate=re))}if(T!==null){var Te=E.baseState;D=0,Se=me=re=null,B=T;do{var he=B.lane&-536870913,Ee=he!==B.lane;if(Ee?(_t&he)===he:(p&he)===he){he!==0&&he===Gs&&(gg=!0),Se!==null&&(Se=Se.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var Ve=o,rt=B;he=i;var Vt=u;switch(rt.tag){case 1:if(Ve=rt.payload,typeof Ve=="function"){Te=Ve.call(Vt,Te,he);break e}Te=Ve;break e;case 3:Ve.flags=Ve.flags&-65537|128;case 0:if(Ve=rt.payload,he=typeof Ve=="function"?Ve.call(Vt,Te,he):Ve,he==null)break e;Te=h({},Te,he);break e;case 2:Go=!0}}he=B.callback,he!==null&&(o.flags|=64,Ee&&(o.flags|=8192),Ee=E.callbacks,Ee===null?E.callbacks=[he]:Ee.push(he))}else Ee={lane:he,tag:B.tag,payload:B.payload,callback:B.callback,next:null},Se===null?(me=Se=Ee,re=Te):Se=Se.next=Ee,D|=he;if(B=B.next,B===null){if(B=E.shared.pending,B===null)break;Ee=B,B=Ee.next,Ee.next=null,E.lastBaseUpdate=Ee,E.shared.pending=null}}while(!0);Se===null&&(re=Te),E.baseState=re,E.firstBaseUpdate=me,E.lastBaseUpdate=Se,T===null&&(E.shared.lanes=0),Jo|=D,o.lanes=D,o.memoizedState=Te}}function rN(o,i){if(typeof o!="function")throw Error(n(191,o));o.call(i)}function nN(o,i){var u=o.callbacks;if(u!==null)for(o.callbacks=null,o=0;o<u.length;o++)rN(u[o],i)}var Zs=z(null),Ef=z(0);function aN(o,i){o=mo,$(Ef,o),$(Zs,i),mo=o|i.baseLanes}function vg(){$(Ef,mo),$(Zs,Zs.current)}function bg(){mo=Ef.current,q(Zs),q(Ef)}var In=z(null),Zn=null;function Ko(o){var i=o.alternate;$(br,br.current&1),$(In,o),Zn===null&&(i===null||Zs.current!==null||i.memoizedState!==null)&&(Zn=o)}function yg(o){$(br,br.current),$(In,o),Zn===null&&(Zn=o)}function oN(o){o.tag===22?($(br,br.current),$(In,o),Zn===null&&(Zn=o)):Zo()}function Zo(){$(br,br.current),$(In,In.current)}function On(o){q(In),Zn===o&&(Zn=null),q(br)}var br=z(0);function Sf(o){for(var i=o;i!==null;){if(i.tag===13){var u=i.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Tv(u)||Rv(u)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break;for(;i.sibling===null;){if(i.return===null||i.return===o)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var oo=0,dt=null,qt=null,wr=null,xf=!1,Xs=!1,Xi=!1,wf=0,Wc=0,Qs=null,sG=0;function pr(){throw Error(n(321))}function Eg(o,i){if(i===null)return!1;for(var u=0;u<i.length&&u<o.length;u++)if(!Nn(o[u],i[u]))return!1;return!0}function Sg(o,i,u,p,E,T){return oo=T,dt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,U.H=o===null||o.memoizedState===null?BN:Pg,Xi=!1,T=u(p,E),Xi=!1,Xs&&(T=sN(i,u,p,E)),iN(o),T}function iN(o){U.H=Zc;var i=qt!==null&&qt.next!==null;if(oo=0,wr=qt=dt=null,xf=!1,Wc=0,Qs=null,i)throw Error(n(300));o===null||_r||(o=o.dependencies,o!==null&&pf(o)&&(_r=!0))}function sN(o,i,u,p){dt=o;var E=0;do{if(Xs&&(Qs=null),Wc=0,Xs=!1,25<=E)throw Error(n(301));if(E+=1,wr=qt=null,o.updateQueue!=null){var T=o.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}U.H=qN,T=i(u,p)}while(Xs);return T}function lG(){var o=U.H,i=o.useState()[0];return i=typeof i.then=="function"?Yc(i):i,o=o.useState()[0],(qt!==null?qt.memoizedState:null)!==o&&(dt.flags|=1024),i}function xg(){var o=wf!==0;return wf=0,o}function wg(o,i,u){i.updateQueue=o.updateQueue,i.flags&=-2053,o.lanes&=~u}function _g(o){if(xf){for(o=o.memoizedState;o!==null;){var i=o.queue;i!==null&&(i.pending=null),o=o.next}xf=!1}oo=0,wr=qt=dt=null,Xs=!1,Wc=wf=0,Qs=null}function ln(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wr===null?dt.memoizedState=wr=o:wr=wr.next=o,wr}function yr(){if(qt===null){var o=dt.alternate;o=o!==null?o.memoizedState:null}else o=qt.next;var i=wr===null?dt.memoizedState:wr.next;if(i!==null)wr=i,qt=o;else{if(o===null)throw dt.alternate===null?Error(n(467)):Error(n(310));qt=o,o={memoizedState:qt.memoizedState,baseState:qt.baseState,baseQueue:qt.baseQueue,queue:qt.queue,next:null},wr===null?dt.memoizedState=wr=o:wr=wr.next=o}return wr}function _f(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yc(o){var i=Wc;return Wc+=1,Qs===null&&(Qs=[]),o=XA(Qs,o,i),i=dt,(wr===null?i.memoizedState:wr.next)===null&&(i=i.alternate,U.H=i===null||i.memoizedState===null?BN:Pg),o}function Tf(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Yc(o);if(o.$$typeof===C)return Vr(o)}throw Error(n(438,String(o)))}function Tg(o){var i=null,u=dt.updateQueue;if(u!==null&&(i=u.memoCache),i==null){var p=dt.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(i={data:p.data.map(function(E){return E.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),u===null&&(u=_f(),dt.updateQueue=u),u.memoCache=i,u=i.data[i.index],u===void 0)for(u=i.data[i.index]=Array(o),p=0;p<o;p++)u[p]=M;return i.index++,u}function io(o,i){return typeof i=="function"?i(o):i}function Rf(o){var i=yr();return Rg(i,qt,o)}function Rg(o,i,u){var p=o.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=u;var E=o.baseQueue,T=p.pending;if(T!==null){if(E!==null){var D=E.next;E.next=T.next,T.next=D}i.baseQueue=E=T,p.pending=null}if(T=o.baseState,E===null)o.memoizedState=T;else{i=E.next;var B=D=null,re=null,me=i,Se=!1;do{var Te=me.lane&-536870913;if(Te!==me.lane?(_t&Te)===Te:(oo&Te)===Te){var he=me.revertLane;if(he===0)re!==null&&(re=re.next={lane:0,revertLane:0,gesture:null,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null}),Te===Gs&&(Se=!0);else if((oo&he)===he){me=me.next,he===Gs&&(Se=!0);continue}else Te={lane:0,revertLane:me.revertLane,gesture:null,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},re===null?(B=re=Te,D=T):re=re.next=Te,dt.lanes|=he,Jo|=he;Te=me.action,Xi&&u(T,Te),T=me.hasEagerState?me.eagerState:u(T,Te)}else he={lane:Te,revertLane:me.revertLane,gesture:me.gesture,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},re===null?(B=re=he,D=T):re=re.next=he,dt.lanes|=Te,Jo|=Te;me=me.next}while(me!==null&&me!==i);if(re===null?D=T:re.next=B,!Nn(T,o.memoizedState)&&(_r=!0,Se&&(u=Ws,u!==null)))throw u;o.memoizedState=T,o.baseState=D,o.baseQueue=re,p.lastRenderedState=T}return E===null&&(p.lanes=0),[o.memoizedState,p.dispatch]}function Cg(o){var i=yr(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=o;var p=u.dispatch,E=u.pending,T=i.memoizedState;if(E!==null){u.pending=null;var D=E=E.next;do T=o(T,D.action),D=D.next;while(D!==E);Nn(T,i.memoizedState)||(_r=!0),i.memoizedState=T,i.baseQueue===null&&(i.baseState=T),u.lastRenderedState=T}return[T,p]}function lN(o,i,u){var p=dt,E=yr(),T=Ct;if(T){if(u===void 0)throw Error(n(407));u=u()}else u=i();var D=!Nn((qt||E).memoizedState,u);if(D&&(E.memoizedState=u,_r=!0),E=E.queue,kg(dN.bind(null,p,E,o),[o]),E.getSnapshot!==i||D||wr!==null&&wr.memoizedState.tag&1){if(p.flags|=2048,Js(9,{destroy:void 0},uN.bind(null,p,E,u,i),null),Kt===null)throw Error(n(349));T||(oo&127)!==0||cN(p,i,u)}return u}function cN(o,i,u){o.flags|=16384,o={getSnapshot:i,value:u},i=dt.updateQueue,i===null?(i=_f(),dt.updateQueue=i,i.stores=[o]):(u=i.stores,u===null?i.stores=[o]:u.push(o))}function uN(o,i,u,p){i.value=u,i.getSnapshot=p,fN(i)&&pN(o)}function dN(o,i,u){return u(function(){fN(i)&&pN(o)})}function fN(o){var i=o.getSnapshot;o=o.value;try{var u=i();return!Nn(o,u)}catch{return!0}}function pN(o){var i=Bi(o,2);i!==null&&En(i,o,2)}function Ag(o){var i=ln();if(typeof o=="function"){var u=o;if(o=u(),Xi){Zt(!0);try{u()}finally{Zt(!1)}}}return i.memoizedState=i.baseState=o,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:io,lastRenderedState:o},i}function mN(o,i,u,p){return o.baseState=u,Rg(o,qt,typeof p=="function"?p:io)}function cG(o,i,u,p,E){if(Nf(o))throw Error(n(485));if(o=i.action,o!==null){var T={payload:E,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){T.listeners.push(D)}};U.T!==null?u(!0):T.isTransition=!1,p(T),u=i.pending,u===null?(T.next=i.pending=T,hN(i,T)):(T.next=u.next,i.pending=u.next=T)}}function hN(o,i){var u=i.action,p=i.payload,E=o.state;if(i.isTransition){var T=U.T,D={};U.T=D;try{var B=u(E,p),re=U.S;re!==null&&re(D,B),gN(o,i,B)}catch(me){Ng(o,i,me)}finally{T!==null&&D.types!==null&&(T.types=D.types),U.T=T}}else try{T=u(E,p),gN(o,i,T)}catch(me){Ng(o,i,me)}}function gN(o,i,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){vN(o,i,p)},function(p){return Ng(o,i,p)}):vN(o,i,u)}function vN(o,i,u){i.status="fulfilled",i.value=u,bN(i),o.state=u,i=o.pending,i!==null&&(u=i.next,u===i?o.pending=null:(u=u.next,i.next=u,hN(o,u)))}function Ng(o,i,u){var p=o.pending;if(o.pending=null,p!==null){p=p.next;do i.status="rejected",i.reason=u,bN(i),i=i.next;while(i!==p)}o.action=null}function bN(o){o=o.listeners;for(var i=0;i<o.length;i++)(0,o[i])()}function yN(o,i){return i}function EN(o,i){if(Ct){var u=Kt.formState;if(u!==null){e:{var p=dt;if(Ct){if(Jt){t:{for(var E=Jt,T=Kn;E.nodeType!==8;){if(!T){E=null;break t}if(E=Xn(E.nextSibling),E===null){E=null;break t}}T=E.data,E=T==="F!"||T==="F"?E:null}if(E){Jt=Xn(E.nextSibling),p=E.data==="F!";break e}}Ho(p)}p=!1}p&&(i=u[0])}}return u=ln(),u.memoizedState=u.baseState=i,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yN,lastRenderedState:i},u.queue=p,u=FN.bind(null,dt,p),p.dispatch=u,p=Ag(!1),T=Mg.bind(null,dt,!1,p.queue),p=ln(),E={state:i,dispatch:null,action:o,pending:null},p.queue=E,u=cG.bind(null,dt,E,T,u),E.dispatch=u,p.memoizedState=o,[i,u,!1]}function SN(o){var i=yr();return xN(i,qt,o)}function xN(o,i,u){if(i=Rg(o,i,yN)[0],o=Rf(io)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var p=Yc(i)}catch(D){throw D===Ys?gf:D}else p=i;i=yr();var E=i.queue,T=E.dispatch;return u!==i.memoizedState&&(dt.flags|=2048,Js(9,{destroy:void 0},uG.bind(null,E,u),null)),[p,T,o]}function uG(o,i){o.action=i}function wN(o){var i=yr(),u=qt;if(u!==null)return xN(i,u,o);yr(),i=i.memoizedState,u=yr();var p=u.queue.dispatch;return u.memoizedState=o,[i,p,!1]}function Js(o,i,u,p){return o={tag:o,create:u,deps:p,inst:i,next:null},i=dt.updateQueue,i===null&&(i=_f(),dt.updateQueue=i),u=i.lastEffect,u===null?i.lastEffect=o.next=o:(p=u.next,u.next=o,o.next=p,i.lastEffect=o),o}function _N(){return yr().memoizedState}function Cf(o,i,u,p){var E=ln();dt.flags|=o,E.memoizedState=Js(1|i,{destroy:void 0},u,p===void 0?null:p)}function Af(o,i,u,p){var E=yr();p=p===void 0?null:p;var T=E.memoizedState.inst;qt!==null&&p!==null&&Eg(p,qt.memoizedState.deps)?E.memoizedState=Js(i,T,u,p):(dt.flags|=o,E.memoizedState=Js(1|i,T,u,p))}function TN(o,i){Cf(8390656,8,o,i)}function kg(o,i){Af(2048,8,o,i)}function dG(o){dt.flags|=4;var i=dt.updateQueue;if(i===null)i=_f(),dt.updateQueue=i,i.events=[o];else{var u=i.events;u===null?i.events=[o]:u.push(o)}}function RN(o){var i=yr().memoizedState;return dG({ref:i,nextImpl:o}),function(){if((Lt&2)!==0)throw Error(n(440));return i.impl.apply(void 0,arguments)}}function CN(o,i){return Af(4,2,o,i)}function AN(o,i){return Af(4,4,o,i)}function NN(o,i){if(typeof i=="function"){o=o();var u=i(o);return function(){typeof u=="function"?u():i(null)}}if(i!=null)return o=o(),i.current=o,function(){i.current=null}}function kN(o,i,u){u=u!=null?u.concat([o]):null,Af(4,4,NN.bind(null,i,o),u)}function Ig(){}function IN(o,i){var u=yr();i=i===void 0?null:i;var p=u.memoizedState;return i!==null&&Eg(i,p[1])?p[0]:(u.memoizedState=[o,i],o)}function ON(o,i){var u=yr();i=i===void 0?null:i;var p=u.memoizedState;if(i!==null&&Eg(i,p[1]))return p[0];if(p=o(),Xi){Zt(!0);try{o()}finally{Zt(!1)}}return u.memoizedState=[p,i],p}function Og(o,i,u){return u===void 0||(oo&1073741824)!==0&&(_t&261930)===0?o.memoizedState=i:(o.memoizedState=u,o=D1(),dt.lanes|=o,Jo|=o,u)}function DN(o,i,u,p){return Nn(u,i)?u:Zs.current!==null?(o=Og(o,u,p),Nn(o,i)||(_r=!0),o):(oo&42)===0||(oo&1073741824)!==0&&(_t&261930)===0?(_r=!0,o.memoizedState=u):(o=D1(),dt.lanes|=o,Jo|=o,i)}function LN(o,i,u,p,E){var T=G.p;G.p=T!==0&&8>T?T:8;var D=U.T,B={};U.T=B,Mg(o,!1,i,u);try{var re=E(),me=U.S;if(me!==null&&me(B,re),re!==null&&typeof re=="object"&&typeof re.then=="function"){var Se=iG(re,p);Kc(o,i,Se,Mn(o))}else Kc(o,i,p,Mn(o))}catch(Te){Kc(o,i,{then:function(){},status:"rejected",reason:Te},Mn())}finally{G.p=T,D!==null&&B.types!==null&&(D.types=B.types),U.T=D}}function fG(){}function Dg(o,i,u,p){if(o.tag!==5)throw Error(n(476));var E=MN(o).queue;LN(o,E,i,H,u===null?fG:function(){return PN(o),u(p)})}function MN(o){var i=o.memoizedState;if(i!==null)return i;i={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:io,lastRenderedState:H},next:null};var u={};return i.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:io,lastRenderedState:u},next:null},o.memoizedState=i,o=o.alternate,o!==null&&(o.memoizedState=i),i}function PN(o){var i=MN(o);i.next===null&&(i=o.alternate.memoizedState),Kc(o,i.next.queue,{},Mn())}function Lg(){return Vr(fu)}function jN(){return yr().memoizedState}function UN(){return yr().memoizedState}function pG(o){for(var i=o.return;i!==null;){switch(i.tag){case 24:case 3:var u=Mn();o=Wo(u);var p=Yo(i,o,u);p!==null&&(En(p,i,u),Hc(p,i,u)),i={cache:cg()},o.payload=i;return}i=i.return}}function mG(o,i,u){var p=Mn();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Nf(o)?zN(i,u):(u=Qh(o,i,u,p),u!==null&&(En(u,o,p),$N(u,i,p)))}function FN(o,i,u){var p=Mn();Kc(o,i,u,p)}function Kc(o,i,u,p){var E={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Nf(o))zN(i,E);else{var T=o.alternate;if(o.lanes===0&&(T===null||T.lanes===0)&&(T=i.lastRenderedReducer,T!==null))try{var D=i.lastRenderedState,B=T(D,u);if(E.hasEagerState=!0,E.eagerState=B,Nn(B,D))return cf(o,i,E,0),Kt===null&&lf(),!1}catch{}finally{}if(u=Qh(o,i,E,p),u!==null)return En(u,o,p),$N(u,i,p),!0}return!1}function Mg(o,i,u,p){if(p={lane:2,revertLane:pv(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Nf(o)){if(i)throw Error(n(479))}else i=Qh(o,u,p,2),i!==null&&En(i,o,2)}function Nf(o){var i=o.alternate;return o===dt||i!==null&&i===dt}function zN(o,i){Xs=xf=!0;var u=o.pending;u===null?i.next=i:(i.next=u.next,u.next=i),o.pending=i}function $N(o,i,u){if((u&4194048)!==0){var p=i.lanes;p&=o.pendingLanes,u|=p,i.lanes=u,en(o,u)}}var Zc={readContext:Vr,use:Tf,useCallback:pr,useContext:pr,useEffect:pr,useImperativeHandle:pr,useLayoutEffect:pr,useInsertionEffect:pr,useMemo:pr,useReducer:pr,useRef:pr,useState:pr,useDebugValue:pr,useDeferredValue:pr,useTransition:pr,useSyncExternalStore:pr,useId:pr,useHostTransitionStatus:pr,useFormState:pr,useActionState:pr,useOptimistic:pr,useMemoCache:pr,useCacheRefresh:pr};Zc.useEffectEvent=pr;var BN={readContext:Vr,use:Tf,useCallback:function(o,i){return ln().memoizedState=[o,i===void 0?null:i],o},useContext:Vr,useEffect:TN,useImperativeHandle:function(o,i,u){u=u!=null?u.concat([o]):null,Cf(4194308,4,NN.bind(null,i,o),u)},useLayoutEffect:function(o,i){return Cf(4194308,4,o,i)},useInsertionEffect:function(o,i){Cf(4,2,o,i)},useMemo:function(o,i){var u=ln();i=i===void 0?null:i;var p=o();if(Xi){Zt(!0);try{o()}finally{Zt(!1)}}return u.memoizedState=[p,i],p},useReducer:function(o,i,u){var p=ln();if(u!==void 0){var E=u(i);if(Xi){Zt(!0);try{u(i)}finally{Zt(!1)}}}else E=i;return p.memoizedState=p.baseState=E,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:E},p.queue=o,o=o.dispatch=mG.bind(null,dt,o),[p.memoizedState,o]},useRef:function(o){var i=ln();return o={current:o},i.memoizedState=o},useState:function(o){o=Ag(o);var i=o.queue,u=FN.bind(null,dt,i);return i.dispatch=u,[o.memoizedState,u]},useDebugValue:Ig,useDeferredValue:function(o,i){var u=ln();return Og(u,o,i)},useTransition:function(){var o=Ag(!1);return o=LN.bind(null,dt,o.queue,!0,!1),ln().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,i,u){var p=dt,E=ln();if(Ct){if(u===void 0)throw Error(n(407));u=u()}else{if(u=i(),Kt===null)throw Error(n(349));(_t&127)!==0||cN(p,i,u)}E.memoizedState=u;var T={value:u,getSnapshot:i};return E.queue=T,TN(dN.bind(null,p,T,o),[o]),p.flags|=2048,Js(9,{destroy:void 0},uN.bind(null,p,T,u,i),null),u},useId:function(){var o=ln(),i=Kt.identifierPrefix;if(Ct){var u=Ca,p=Ra;u=(p&~(1<<32-fr(p)-1)).toString(32)+u,i="_"+i+"R_"+u,u=wf++,0<u&&(i+="H"+u.toString(32)),i+="_"}else u=sG++,i="_"+i+"r_"+u.toString(32)+"_";return o.memoizedState=i},useHostTransitionStatus:Lg,useFormState:EN,useActionState:EN,useOptimistic:function(o){var i=ln();i.memoizedState=i.baseState=o;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=u,i=Mg.bind(null,dt,!0,u),u.dispatch=i,[o,i]},useMemoCache:Tg,useCacheRefresh:function(){return ln().memoizedState=pG.bind(null,dt)},useEffectEvent:function(o){var i=ln(),u={impl:o};return i.memoizedState=u,function(){if((Lt&2)!==0)throw Error(n(440));return u.impl.apply(void 0,arguments)}}},Pg={readContext:Vr,use:Tf,useCallback:IN,useContext:Vr,useEffect:kg,useImperativeHandle:kN,useInsertionEffect:CN,useLayoutEffect:AN,useMemo:ON,useReducer:Rf,useRef:_N,useState:function(){return Rf(io)},useDebugValue:Ig,useDeferredValue:function(o,i){var u=yr();return DN(u,qt.memoizedState,o,i)},useTransition:function(){var o=Rf(io)[0],i=yr().memoizedState;return[typeof o=="boolean"?o:Yc(o),i]},useSyncExternalStore:lN,useId:jN,useHostTransitionStatus:Lg,useFormState:SN,useActionState:SN,useOptimistic:function(o,i){var u=yr();return mN(u,qt,o,i)},useMemoCache:Tg,useCacheRefresh:UN};Pg.useEffectEvent=RN;var qN={readContext:Vr,use:Tf,useCallback:IN,useContext:Vr,useEffect:kg,useImperativeHandle:kN,useInsertionEffect:CN,useLayoutEffect:AN,useMemo:ON,useReducer:Cg,useRef:_N,useState:function(){return Cg(io)},useDebugValue:Ig,useDeferredValue:function(o,i){var u=yr();return qt===null?Og(u,o,i):DN(u,qt.memoizedState,o,i)},useTransition:function(){var o=Cg(io)[0],i=yr().memoizedState;return[typeof o=="boolean"?o:Yc(o),i]},useSyncExternalStore:lN,useId:jN,useHostTransitionStatus:Lg,useFormState:wN,useActionState:wN,useOptimistic:function(o,i){var u=yr();return qt!==null?mN(u,qt,o,i):(u.baseState=o,[o,u.queue.dispatch])},useMemoCache:Tg,useCacheRefresh:UN};qN.useEffectEvent=RN;function jg(o,i,u,p){i=o.memoizedState,u=u(p,i),u=u==null?i:h({},i,u),o.memoizedState=u,o.lanes===0&&(o.updateQueue.baseState=u)}var Ug={enqueueSetState:function(o,i,u){o=o._reactInternals;var p=Mn(),E=Wo(p);E.payload=i,u!=null&&(E.callback=u),i=Yo(o,E,p),i!==null&&(En(i,o,p),Hc(i,o,p))},enqueueReplaceState:function(o,i,u){o=o._reactInternals;var p=Mn(),E=Wo(p);E.tag=1,E.payload=i,u!=null&&(E.callback=u),i=Yo(o,E,p),i!==null&&(En(i,o,p),Hc(i,o,p))},enqueueForceUpdate:function(o,i){o=o._reactInternals;var u=Mn(),p=Wo(u);p.tag=2,i!=null&&(p.callback=i),i=Yo(o,p,u),i!==null&&(En(i,o,u),Hc(i,o,u))}};function HN(o,i,u,p,E,T,D){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(p,T,D):i.prototype&&i.prototype.isPureReactComponent?!Pc(u,p)||!Pc(E,T):!0}function VN(o,i,u,p){o=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(u,p),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(u,p),i.state!==o&&Ug.enqueueReplaceState(i,i.state,null)}function Qi(o,i){var u=i;if("ref"in i){u={};for(var p in i)p!=="ref"&&(u[p]=i[p])}if(o=o.defaultProps){u===i&&(u=h({},u));for(var E in o)u[E]===void 0&&(u[E]=o[E])}return u}function GN(o){sf(o)}function WN(o){console.error(o)}function YN(o){sf(o)}function kf(o,i){try{var u=o.onUncaughtError;u(i.value,{componentStack:i.stack})}catch(p){setTimeout(function(){throw p})}}function KN(o,i,u){try{var p=o.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function Fg(o,i,u){return u=Wo(u),u.tag=3,u.payload={element:null},u.callback=function(){kf(o,i)},u}function ZN(o){return o=Wo(o),o.tag=3,o}function XN(o,i,u,p){var E=u.type.getDerivedStateFromError;if(typeof E=="function"){var T=p.value;o.payload=function(){return E(T)},o.callback=function(){KN(i,u,p)}}var D=u.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(o.callback=function(){KN(i,u,p),typeof E!="function"&&(ei===null?ei=new Set([this]):ei.add(this));var B=p.stack;this.componentDidCatch(p.value,{componentStack:B!==null?B:""})})}function hG(o,i,u,p,E){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(i=u.alternate,i!==null&&Vs(i,u,E,!0),u=In.current,u!==null){switch(u.tag){case 31:case 13:return Zn===null?Bf():u.alternate===null&&mr===0&&(mr=3),u.flags&=-257,u.flags|=65536,u.lanes=E,p===vf?u.flags|=16384:(i=u.updateQueue,i===null?u.updateQueue=new Set([p]):i.add(p),uv(o,p,E)),!1;case 22:return u.flags|=65536,p===vf?u.flags|=16384:(i=u.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=i):(u=i.retryQueue,u===null?i.retryQueue=new Set([p]):u.add(p)),uv(o,p,E)),!1}throw Error(n(435,u.tag))}return uv(o,p,E),Bf(),!1}if(Ct)return i=In.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=E,p!==ag&&(o=Error(n(422),{cause:p}),Fc(Gn(o,u)))):(p!==ag&&(i=Error(n(423),{cause:p}),Fc(Gn(i,u))),o=o.current.alternate,o.flags|=65536,E&=-E,o.lanes|=E,p=Gn(p,u),E=Fg(o.stateNode,p,E),hg(o,E),mr!==4&&(mr=2)),!1;var T=Error(n(520),{cause:p});if(T=Gn(T,u),au===null?au=[T]:au.push(T),mr!==4&&(mr=2),i===null)return!0;p=Gn(p,u),u=i;do{switch(u.tag){case 3:return u.flags|=65536,o=E&-E,u.lanes|=o,o=Fg(u.stateNode,p,o),hg(u,o),!1;case 1:if(i=u.type,T=u.stateNode,(u.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(ei===null||!ei.has(T))))return u.flags|=65536,E&=-E,u.lanes|=E,E=ZN(E),XN(E,o,u,p),hg(u,E),!1}u=u.return}while(u!==null);return!1}var zg=Error(n(461)),_r=!1;function Gr(o,i,u,p){i.child=o===null?tN(i,null,u,p):Zi(i,o.child,u,p)}function QN(o,i,u,p,E){u=u.render;var T=i.ref;if("ref"in p){var D={};for(var B in p)B!=="ref"&&(D[B]=p[B])}else D=p;return Gi(i),p=Sg(o,i,u,D,T,E),B=xg(),o!==null&&!_r?(wg(o,i,E),so(o,i,E)):(Ct&&B&&rg(i),i.flags|=1,Gr(o,i,p,E),i.child)}function JN(o,i,u,p,E){if(o===null){var T=u.type;return typeof T=="function"&&!Jh(T)&&T.defaultProps===void 0&&u.compare===null?(i.tag=15,i.type=T,e1(o,i,T,p,E)):(o=df(u.type,null,p,i,i.mode,E),o.ref=i.ref,o.return=i,i.child=o)}if(T=o.child,!Yg(o,E)){var D=T.memoizedProps;if(u=u.compare,u=u!==null?u:Pc,u(D,p)&&o.ref===i.ref)return so(o,i,E)}return i.flags|=1,o=to(T,p),o.ref=i.ref,o.return=i,i.child=o}function e1(o,i,u,p,E){if(o!==null){var T=o.memoizedProps;if(Pc(T,p)&&o.ref===i.ref)if(_r=!1,i.pendingProps=p=T,Yg(o,E))(o.flags&131072)!==0&&(_r=!0);else return i.lanes=o.lanes,so(o,i,E)}return $g(o,i,u,p,E)}function t1(o,i,u,p){var E=p.children,T=o!==null?o.memoizedState:null;if(o===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((i.flags&128)!==0){if(T=T!==null?T.baseLanes|u:u,o!==null){for(p=i.child=o.child,E=0;p!==null;)E=E|p.lanes|p.childLanes,p=p.sibling;p=E&~T}else p=0,i.child=null;return r1(o,i,T,u,p)}if((u&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},o!==null&&hf(i,T!==null?T.cachePool:null),T!==null?aN(i,T):vg(),oN(i);else return p=i.lanes=536870912,r1(o,i,T!==null?T.baseLanes|u:u,u,p)}else T!==null?(hf(i,T.cachePool),aN(i,T),Zo(),i.memoizedState=null):(o!==null&&hf(i,null),vg(),Zo());return Gr(o,i,E,u),i.child}function Xc(o,i){return o!==null&&o.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function r1(o,i,u,p,E){var T=dg();return T=T===null?null:{parent:xr._currentValue,pool:T},i.memoizedState={baseLanes:u,cachePool:T},o!==null&&hf(i,null),vg(),oN(i),o!==null&&Vs(o,i,p,!0),i.childLanes=E,null}function If(o,i){return i=Df({mode:i.mode,children:i.children},o.mode),i.ref=o.ref,o.child=i,i.return=o,i}function n1(o,i,u){return Zi(i,o.child,null,u),o=If(i,i.pendingProps),o.flags|=2,On(i),i.memoizedState=null,o}function gG(o,i,u){var p=i.pendingProps,E=(i.flags&128)!==0;if(i.flags&=-129,o===null){if(Ct){if(p.mode==="hidden")return o=If(i,p),i.lanes=536870912,Xc(null,o);if(yg(i),(o=Jt)?(o=hk(o,Kn),o=o!==null&&o.data==="&"?o:null,o!==null&&(i.memoizedState={dehydrated:o,treeContext:Bo!==null?{id:Ra,overflow:Ca}:null,retryLane:536870912,hydrationErrors:null},u=zA(o),u.return=i,i.child=u,Hr=i,Jt=null)):o=null,o===null)throw Ho(i);return i.lanes=536870912,null}return If(i,p)}var T=o.memoizedState;if(T!==null){var D=T.dehydrated;if(yg(i),E)if(i.flags&256)i.flags&=-257,i=n1(o,i,u);else if(i.memoizedState!==null)i.child=o.child,i.flags|=128,i=null;else throw Error(n(558));else if(_r||Vs(o,i,u,!1),E=(u&o.childLanes)!==0,_r||E){if(p=Kt,p!==null&&(D=Br(p,u),D!==0&&D!==T.retryLane))throw T.retryLane=D,Bi(o,D),En(p,o,D),zg;Bf(),i=n1(o,i,u)}else o=T.treeContext,Jt=Xn(D.nextSibling),Hr=i,Ct=!0,qo=null,Kn=!1,o!==null&&qA(i,o),i=If(i,p),i.flags|=4096;return i}return o=to(o.child,{mode:p.mode,children:p.children}),o.ref=i.ref,i.child=o,o.return=i,o}function Of(o,i){var u=i.ref;if(u===null)o!==null&&o.ref!==null&&(i.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(n(284));(o===null||o.ref!==u)&&(i.flags|=4194816)}}function $g(o,i,u,p,E){return Gi(i),u=Sg(o,i,u,p,void 0,E),p=xg(),o!==null&&!_r?(wg(o,i,E),so(o,i,E)):(Ct&&p&&rg(i),i.flags|=1,Gr(o,i,u,E),i.child)}function a1(o,i,u,p,E,T){return Gi(i),i.updateQueue=null,u=sN(i,p,u,E),iN(o),p=xg(),o!==null&&!_r?(wg(o,i,T),so(o,i,T)):(Ct&&p&&rg(i),i.flags|=1,Gr(o,i,u,T),i.child)}function o1(o,i,u,p,E){if(Gi(i),i.stateNode===null){var T=$s,D=u.contextType;typeof D=="object"&&D!==null&&(T=Vr(D)),T=new u(p,T),i.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=Ug,i.stateNode=T,T._reactInternals=i,T=i.stateNode,T.props=p,T.state=i.memoizedState,T.refs={},pg(i),D=u.contextType,T.context=typeof D=="object"&&D!==null?Vr(D):$s,T.state=i.memoizedState,D=u.getDerivedStateFromProps,typeof D=="function"&&(jg(i,u,D,p),T.state=i.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(D=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),D!==T.state&&Ug.enqueueReplaceState(T,T.state,null),Gc(i,p,T,E),Vc(),T.state=i.memoizedState),typeof T.componentDidMount=="function"&&(i.flags|=4194308),p=!0}else if(o===null){T=i.stateNode;var B=i.memoizedProps,re=Qi(u,B);T.props=re;var me=T.context,Se=u.contextType;D=$s,typeof Se=="object"&&Se!==null&&(D=Vr(Se));var Te=u.getDerivedStateFromProps;Se=typeof Te=="function"||typeof T.getSnapshotBeforeUpdate=="function",B=i.pendingProps!==B,Se||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(B||me!==D)&&VN(i,T,p,D),Go=!1;var he=i.memoizedState;T.state=he,Gc(i,p,T,E),Vc(),me=i.memoizedState,B||he!==me||Go?(typeof Te=="function"&&(jg(i,u,Te,p),me=i.memoizedState),(re=Go||HN(i,u,re,p,he,me,D))?(Se||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(i.flags|=4194308)):(typeof T.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=p,i.memoizedState=me),T.props=p,T.state=me,T.context=D,p=re):(typeof T.componentDidMount=="function"&&(i.flags|=4194308),p=!1)}else{T=i.stateNode,mg(o,i),D=i.memoizedProps,Se=Qi(u,D),T.props=Se,Te=i.pendingProps,he=T.context,me=u.contextType,re=$s,typeof me=="object"&&me!==null&&(re=Vr(me)),B=u.getDerivedStateFromProps,(me=typeof B=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(D!==Te||he!==re)&&VN(i,T,p,re),Go=!1,he=i.memoizedState,T.state=he,Gc(i,p,T,E),Vc();var Ee=i.memoizedState;D!==Te||he!==Ee||Go||o!==null&&o.dependencies!==null&&pf(o.dependencies)?(typeof B=="function"&&(jg(i,u,B,p),Ee=i.memoizedState),(Se=Go||HN(i,u,Se,p,he,Ee,re)||o!==null&&o.dependencies!==null&&pf(o.dependencies))?(me||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(p,Ee,re),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(p,Ee,re)),typeof T.componentDidUpdate=="function"&&(i.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof T.componentDidUpdate!="function"||D===o.memoizedProps&&he===o.memoizedState||(i.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||D===o.memoizedProps&&he===o.memoizedState||(i.flags|=1024),i.memoizedProps=p,i.memoizedState=Ee),T.props=p,T.state=Ee,T.context=re,p=Se):(typeof T.componentDidUpdate!="function"||D===o.memoizedProps&&he===o.memoizedState||(i.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||D===o.memoizedProps&&he===o.memoizedState||(i.flags|=1024),p=!1)}return T=p,Of(o,i),p=(i.flags&128)!==0,T||p?(T=i.stateNode,u=p&&typeof u.getDerivedStateFromError!="function"?null:T.render(),i.flags|=1,o!==null&&p?(i.child=Zi(i,o.child,null,E),i.child=Zi(i,null,u,E)):Gr(o,i,u,E),i.memoizedState=T.state,o=i.child):o=so(o,i,E),o}function i1(o,i,u,p){return Hi(),i.flags|=256,Gr(o,i,u,p),i.child}var Bg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qg(o){return{baseLanes:o,cachePool:KA()}}function Hg(o,i,u){return o=o!==null?o.childLanes&~u:0,i&&(o|=Ln),o}function s1(o,i,u){var p=i.pendingProps,E=!1,T=(i.flags&128)!==0,D;if((D=T)||(D=o!==null&&o.memoizedState===null?!1:(br.current&2)!==0),D&&(E=!0,i.flags&=-129),D=(i.flags&32)!==0,i.flags&=-33,o===null){if(Ct){if(E?Ko(i):Zo(),(o=Jt)?(o=hk(o,Kn),o=o!==null&&o.data!=="&"?o:null,o!==null&&(i.memoizedState={dehydrated:o,treeContext:Bo!==null?{id:Ra,overflow:Ca}:null,retryLane:536870912,hydrationErrors:null},u=zA(o),u.return=i,i.child=u,Hr=i,Jt=null)):o=null,o===null)throw Ho(i);return Rv(o)?i.lanes=32:i.lanes=536870912,null}var B=p.children;return p=p.fallback,E?(Zo(),E=i.mode,B=Df({mode:"hidden",children:B},E),p=qi(p,E,u,null),B.return=i,p.return=i,B.sibling=p,i.child=B,p=i.child,p.memoizedState=qg(u),p.childLanes=Hg(o,D,u),i.memoizedState=Bg,Xc(null,p)):(Ko(i),Vg(i,B))}var re=o.memoizedState;if(re!==null&&(B=re.dehydrated,B!==null)){if(T)i.flags&256?(Ko(i),i.flags&=-257,i=Gg(o,i,u)):i.memoizedState!==null?(Zo(),i.child=o.child,i.flags|=128,i=null):(Zo(),B=p.fallback,E=i.mode,p=Df({mode:"visible",children:p.children},E),B=qi(B,E,u,null),B.flags|=2,p.return=i,B.return=i,p.sibling=B,i.child=p,Zi(i,o.child,null,u),p=i.child,p.memoizedState=qg(u),p.childLanes=Hg(o,D,u),i.memoizedState=Bg,i=Xc(null,p));else if(Ko(i),Rv(B)){if(D=B.nextSibling&&B.nextSibling.dataset,D)var me=D.dgst;D=me,p=Error(n(419)),p.stack="",p.digest=D,Fc({value:p,source:null,stack:null}),i=Gg(o,i,u)}else if(_r||Vs(o,i,u,!1),D=(u&o.childLanes)!==0,_r||D){if(D=Kt,D!==null&&(p=Br(D,u),p!==0&&p!==re.retryLane))throw re.retryLane=p,Bi(o,p),En(D,o,p),zg;Tv(B)||Bf(),i=Gg(o,i,u)}else Tv(B)?(i.flags|=192,i.child=o.child,i=null):(o=re.treeContext,Jt=Xn(B.nextSibling),Hr=i,Ct=!0,qo=null,Kn=!1,o!==null&&qA(i,o),i=Vg(i,p.children),i.flags|=4096);return i}return E?(Zo(),B=p.fallback,E=i.mode,re=o.child,me=re.sibling,p=to(re,{mode:"hidden",children:p.children}),p.subtreeFlags=re.subtreeFlags&65011712,me!==null?B=to(me,B):(B=qi(B,E,u,null),B.flags|=2),B.return=i,p.return=i,p.sibling=B,i.child=p,Xc(null,p),p=i.child,B=o.child.memoizedState,B===null?B=qg(u):(E=B.cachePool,E!==null?(re=xr._currentValue,E=E.parent!==re?{parent:re,pool:re}:E):E=KA(),B={baseLanes:B.baseLanes|u,cachePool:E}),p.memoizedState=B,p.childLanes=Hg(o,D,u),i.memoizedState=Bg,Xc(o.child,p)):(Ko(i),u=o.child,o=u.sibling,u=to(u,{mode:"visible",children:p.children}),u.return=i,u.sibling=null,o!==null&&(D=i.deletions,D===null?(i.deletions=[o],i.flags|=16):D.push(o)),i.child=u,i.memoizedState=null,u)}function Vg(o,i){return i=Df({mode:"visible",children:i},o.mode),i.return=o,o.child=i}function Df(o,i){return o=kn(22,o,null,i),o.lanes=0,o}function Gg(o,i,u){return Zi(i,o.child,null,u),o=Vg(i,i.pendingProps.children),o.flags|=2,i.memoizedState=null,o}function l1(o,i,u){o.lanes|=i;var p=o.alternate;p!==null&&(p.lanes|=i),sg(o.return,i,u)}function Wg(o,i,u,p,E,T){var D=o.memoizedState;D===null?o.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:E,treeForkCount:T}:(D.isBackwards=i,D.rendering=null,D.renderingStartTime=0,D.last=p,D.tail=u,D.tailMode=E,D.treeForkCount=T)}function c1(o,i,u){var p=i.pendingProps,E=p.revealOrder,T=p.tail;p=p.children;var D=br.current,B=(D&2)!==0;if(B?(D=D&1|2,i.flags|=128):D&=1,$(br,D),Gr(o,i,p,u),p=Ct?Uc:0,!B&&o!==null&&(o.flags&128)!==0)e:for(o=i.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&l1(o,u,i);else if(o.tag===19)l1(o,u,i);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(E){case"forwards":for(u=i.child,E=null;u!==null;)o=u.alternate,o!==null&&Sf(o)===null&&(E=u),u=u.sibling;u=E,u===null?(E=i.child,i.child=null):(E=u.sibling,u.sibling=null),Wg(i,!1,E,u,T,p);break;case"backwards":case"unstable_legacy-backwards":for(u=null,E=i.child,i.child=null;E!==null;){if(o=E.alternate,o!==null&&Sf(o)===null){i.child=E;break}o=E.sibling,E.sibling=u,u=E,E=o}Wg(i,!0,u,null,T,p);break;case"together":Wg(i,!1,null,null,void 0,p);break;default:i.memoizedState=null}return i.child}function so(o,i,u){if(o!==null&&(i.dependencies=o.dependencies),Jo|=i.lanes,(u&i.childLanes)===0)if(o!==null){if(Vs(o,i,u,!1),(u&i.childLanes)===0)return null}else return null;if(o!==null&&i.child!==o.child)throw Error(n(153));if(i.child!==null){for(o=i.child,u=to(o,o.pendingProps),i.child=u,u.return=i;o.sibling!==null;)o=o.sibling,u=u.sibling=to(o,o.pendingProps),u.return=i;u.sibling=null}return i.child}function Yg(o,i){return(o.lanes&i)!==0?!0:(o=o.dependencies,!!(o!==null&&pf(o)))}function vG(o,i,u){switch(i.tag){case 3:Z(i,i.stateNode.containerInfo),Vo(i,xr,o.memoizedState.cache),Hi();break;case 27:case 5:V(i);break;case 4:Z(i,i.stateNode.containerInfo);break;case 10:Vo(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,yg(i),null;break;case 13:var p=i.memoizedState;if(p!==null)return p.dehydrated!==null?(Ko(i),i.flags|=128,null):(u&i.child.childLanes)!==0?s1(o,i,u):(Ko(i),o=so(o,i,u),o!==null?o.sibling:null);Ko(i);break;case 19:var E=(o.flags&128)!==0;if(p=(u&i.childLanes)!==0,p||(Vs(o,i,u,!1),p=(u&i.childLanes)!==0),E){if(p)return c1(o,i,u);i.flags|=128}if(E=i.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),$(br,br.current),p)break;return null;case 22:return i.lanes=0,t1(o,i,u,i.pendingProps);case 24:Vo(i,xr,o.memoizedState.cache)}return so(o,i,u)}function u1(o,i,u){if(o!==null)if(o.memoizedProps!==i.pendingProps)_r=!0;else{if(!Yg(o,u)&&(i.flags&128)===0)return _r=!1,vG(o,i,u);_r=(o.flags&131072)!==0}else _r=!1,Ct&&(i.flags&1048576)!==0&&BA(i,Uc,i.index);switch(i.lanes=0,i.tag){case 16:e:{var p=i.pendingProps;if(o=Yi(i.elementType),i.type=o,typeof o=="function")Jh(o)?(p=Qi(o,p),i.tag=1,i=o1(null,i,o,p,u)):(i.tag=0,i=$g(null,i,o,p,u));else{if(o!=null){var E=o.$$typeof;if(E===N){i.tag=11,i=QN(null,i,o,p,u);break e}else if(E===I){i.tag=14,i=JN(null,i,o,p,u);break e}}throw i=J(o)||o,Error(n(306,i,""))}}return i;case 0:return $g(o,i,i.type,i.pendingProps,u);case 1:return p=i.type,E=Qi(p,i.pendingProps),o1(o,i,p,E,u);case 3:e:{if(Z(i,i.stateNode.containerInfo),o===null)throw Error(n(387));p=i.pendingProps;var T=i.memoizedState;E=T.element,mg(o,i),Gc(i,p,null,u);var D=i.memoizedState;if(p=D.cache,Vo(i,xr,p),p!==T.cache&&lg(i,[xr],u,!0),Vc(),p=D.element,T.isDehydrated)if(T={element:p,isDehydrated:!1,cache:D.cache},i.updateQueue.baseState=T,i.memoizedState=T,i.flags&256){i=i1(o,i,p,u);break e}else if(p!==E){E=Gn(Error(n(424)),i),Fc(E),i=i1(o,i,p,u);break e}else{switch(o=i.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(Jt=Xn(o.firstChild),Hr=i,Ct=!0,qo=null,Kn=!0,u=tN(i,null,p,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Hi(),p===E){i=so(o,i,u);break e}Gr(o,i,p,u)}i=i.child}return i;case 26:return Of(o,i),o===null?(u=Sk(i.type,null,i.pendingProps,null))?i.memoizedState=u:Ct||(u=i.type,o=i.pendingProps,p=Kf(F.current).createElement(u),p[je]=i,p[Be]=o,Wr(p,u,o),zt(p),i.stateNode=p):i.memoizedState=Sk(i.type,o.memoizedProps,i.pendingProps,o.memoizedState),null;case 27:return V(i),o===null&&Ct&&(p=i.stateNode=bk(i.type,i.pendingProps,F.current),Hr=i,Kn=!0,E=Jt,ai(i.type)?(Cv=E,Jt=Xn(p.firstChild)):Jt=E),Gr(o,i,i.pendingProps.children,u),Of(o,i),o===null&&(i.flags|=4194304),i.child;case 5:return o===null&&Ct&&((E=p=Jt)&&(p=WG(p,i.type,i.pendingProps,Kn),p!==null?(i.stateNode=p,Hr=i,Jt=Xn(p.firstChild),Kn=!1,E=!0):E=!1),E||Ho(i)),V(i),E=i.type,T=i.pendingProps,D=o!==null?o.memoizedProps:null,p=T.children,xv(E,T)?p=null:D!==null&&xv(E,D)&&(i.flags|=32),i.memoizedState!==null&&(E=Sg(o,i,lG,null,null,u),fu._currentValue=E),Of(o,i),Gr(o,i,p,u),i.child;case 6:return o===null&&Ct&&((o=u=Jt)&&(u=YG(u,i.pendingProps,Kn),u!==null?(i.stateNode=u,Hr=i,Jt=null,o=!0):o=!1),o||Ho(i)),null;case 13:return s1(o,i,u);case 4:return Z(i,i.stateNode.containerInfo),p=i.pendingProps,o===null?i.child=Zi(i,null,p,u):Gr(o,i,p,u),i.child;case 11:return QN(o,i,i.type,i.pendingProps,u);case 7:return Gr(o,i,i.pendingProps,u),i.child;case 8:return Gr(o,i,i.pendingProps.children,u),i.child;case 12:return Gr(o,i,i.pendingProps.children,u),i.child;case 10:return p=i.pendingProps,Vo(i,i.type,p.value),Gr(o,i,p.children,u),i.child;case 9:return E=i.type._context,p=i.pendingProps.children,Gi(i),E=Vr(E),p=p(E),i.flags|=1,Gr(o,i,p,u),i.child;case 14:return JN(o,i,i.type,i.pendingProps,u);case 15:return e1(o,i,i.type,i.pendingProps,u);case 19:return c1(o,i,u);case 31:return gG(o,i,u);case 22:return t1(o,i,u,i.pendingProps);case 24:return Gi(i),p=Vr(xr),o===null?(E=dg(),E===null&&(E=Kt,T=cg(),E.pooledCache=T,T.refCount++,T!==null&&(E.pooledCacheLanes|=u),E=T),i.memoizedState={parent:p,cache:E},pg(i),Vo(i,xr,E)):((o.lanes&u)!==0&&(mg(o,i),Gc(i,null,null,u),Vc()),E=o.memoizedState,T=i.memoizedState,E.parent!==p?(E={parent:p,cache:p},i.memoizedState=E,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=E),Vo(i,xr,p)):(p=T.cache,Vo(i,xr,p),p!==E.cache&&lg(i,[xr],u,!0))),Gr(o,i,i.pendingProps.children,u),i.child;case 29:throw i.pendingProps}throw Error(n(156,i.tag))}function lo(o){o.flags|=4}function Kg(o,i,u,p,E){if((i=(o.mode&32)!==0)&&(i=!1),i){if(o.flags|=16777216,(E&335544128)===E)if(o.stateNode.complete)o.flags|=8192;else if(j1())o.flags|=8192;else throw Ki=vf,fg}else o.flags&=-16777217}function d1(o,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!Rk(i))if(j1())o.flags|=8192;else throw Ki=vf,fg}function Lf(o,i){i!==null&&(o.flags|=4),o.flags&16384&&(i=o.tag!==22?Lr():536870912,o.lanes|=i,nl|=i)}function Qc(o,i){if(!Ct)switch(o.tailMode){case"hidden":i=o.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?o.tail=null:u.sibling=null;break;case"collapsed":u=o.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?i||o.tail===null?o.tail=null:o.tail.sibling=null:p.sibling=null}}function er(o){var i=o.alternate!==null&&o.alternate.child===o.child,u=0,p=0;if(i)for(var E=o.child;E!==null;)u|=E.lanes|E.childLanes,p|=E.subtreeFlags&65011712,p|=E.flags&65011712,E.return=o,E=E.sibling;else for(E=o.child;E!==null;)u|=E.lanes|E.childLanes,p|=E.subtreeFlags,p|=E.flags,E.return=o,E=E.sibling;return o.subtreeFlags|=p,o.childLanes=u,i}function bG(o,i,u){var p=i.pendingProps;switch(ng(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(i),null;case 1:return er(i),null;case 3:return u=i.stateNode,p=null,o!==null&&(p=o.memoizedState.cache),i.memoizedState.cache!==p&&(i.flags|=2048),ao(xr),ne(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(o===null||o.child===null)&&(Hs(i)?lo(i):o===null||o.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,og())),er(i),null;case 26:var E=i.type,T=i.memoizedState;return o===null?(lo(i),T!==null?(er(i),d1(i,T)):(er(i),Kg(i,E,null,p,u))):T?T!==o.memoizedState?(lo(i),er(i),d1(i,T)):(er(i),i.flags&=-16777217):(o=o.memoizedProps,o!==p&&lo(i),er(i),Kg(i,E,o,p,u)),null;case 27:if(de(i),u=F.current,E=i.type,o!==null&&i.stateNode!=null)o.memoizedProps!==p&&lo(i);else{if(!p){if(i.stateNode===null)throw Error(n(166));return er(i),null}o=W.current,Hs(i)?HA(i):(o=bk(E,p,u),i.stateNode=o,lo(i))}return er(i),null;case 5:if(de(i),E=i.type,o!==null&&i.stateNode!=null)o.memoizedProps!==p&&lo(i);else{if(!p){if(i.stateNode===null)throw Error(n(166));return er(i),null}if(T=W.current,Hs(i))HA(i);else{var D=Kf(F.current);switch(T){case 1:T=D.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:T=D.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case"svg":T=D.createElementNS("http://www.w3.org/2000/svg",E);break;case"math":T=D.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case"script":T=D.createElement("div"),T.innerHTML="<script><\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof p.is=="string"?D.createElement("select",{is:p.is}):D.createElement("select"),p.multiple?T.multiple=!0:p.size&&(T.size=p.size);break;default:T=typeof p.is=="string"?D.createElement(E,{is:p.is}):D.createElement(E)}}T[je]=i,T[Be]=p;e:for(D=i.child;D!==null;){if(D.tag===5||D.tag===6)T.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===i)break e;for(;D.sibling===null;){if(D.return===null||D.return===i)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}i.stateNode=T;e:switch(Wr(T,E,p),E){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&lo(i)}}return er(i),Kg(i,i.type,o===null?null:o.memoizedProps,i.pendingProps,u),null;case 6:if(o&&i.stateNode!=null)o.memoizedProps!==p&&lo(i);else{if(typeof p!="string"&&i.stateNode===null)throw Error(n(166));if(o=F.current,Hs(i)){if(o=i.stateNode,u=i.memoizedProps,p=null,E=Hr,E!==null)switch(E.tag){case 27:case 5:p=E.memoizedProps}o[je]=i,o=!!(o.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||sk(o.nodeValue,u)),o||Ho(i,!0)}else o=Kf(o).createTextNode(p),o[je]=i,i.stateNode=o}return er(i),null;case 31:if(u=i.memoizedState,o===null||o.memoizedState!==null){if(p=Hs(i),u!==null){if(o===null){if(!p)throw Error(n(318));if(o=i.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(557));o[je]=i}else Hi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;er(i),o=!1}else u=og(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=u),o=!0;if(!o)return i.flags&256?(On(i),i):(On(i),null);if((i.flags&128)!==0)throw Error(n(558))}return er(i),null;case 13:if(p=i.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(E=Hs(i),p!==null&&p.dehydrated!==null){if(o===null){if(!E)throw Error(n(318));if(E=i.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(n(317));E[je]=i}else Hi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;er(i),E=!1}else E=og(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=E),E=!0;if(!E)return i.flags&256?(On(i),i):(On(i),null)}return On(i),(i.flags&128)!==0?(i.lanes=u,i):(u=p!==null,o=o!==null&&o.memoizedState!==null,u&&(p=i.child,E=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(E=p.alternate.memoizedState.cachePool.pool),T=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(T=p.memoizedState.cachePool.pool),T!==E&&(p.flags|=2048)),u!==o&&u&&(i.child.flags|=8192),Lf(i,i.updateQueue),er(i),null);case 4:return ne(),o===null&&vv(i.stateNode.containerInfo),er(i),null;case 10:return ao(i.type),er(i),null;case 19:if(q(br),p=i.memoizedState,p===null)return er(i),null;if(E=(i.flags&128)!==0,T=p.rendering,T===null)if(E)Qc(p,!1);else{if(mr!==0||o!==null&&(o.flags&128)!==0)for(o=i.child;o!==null;){if(T=Sf(o),T!==null){for(i.flags|=128,Qc(p,!1),o=T.updateQueue,i.updateQueue=o,Lf(i,o),i.subtreeFlags=0,o=u,u=i.child;u!==null;)FA(u,o),u=u.sibling;return $(br,br.current&1|2),Ct&&ro(i,p.treeForkCount),i.child}o=o.sibling}p.tail!==null&&_e()>Ff&&(i.flags|=128,E=!0,Qc(p,!1),i.lanes=4194304)}else{if(!E)if(o=Sf(T),o!==null){if(i.flags|=128,E=!0,o=o.updateQueue,i.updateQueue=o,Lf(i,o),Qc(p,!0),p.tail===null&&p.tailMode==="hidden"&&!T.alternate&&!Ct)return er(i),null}else 2*_e()-p.renderingStartTime>Ff&&u!==536870912&&(i.flags|=128,E=!0,Qc(p,!1),i.lanes=4194304);p.isBackwards?(T.sibling=i.child,i.child=T):(o=p.last,o!==null?o.sibling=T:i.child=T,p.last=T)}return p.tail!==null?(o=p.tail,p.rendering=o,p.tail=o.sibling,p.renderingStartTime=_e(),o.sibling=null,u=br.current,$(br,E?u&1|2:u&1),Ct&&ro(i,p.treeForkCount),o):(er(i),null);case 22:case 23:return On(i),bg(),p=i.memoizedState!==null,o!==null?o.memoizedState!==null!==p&&(i.flags|=8192):p&&(i.flags|=8192),p?(u&536870912)!==0&&(i.flags&128)===0&&(er(i),i.subtreeFlags&6&&(i.flags|=8192)):er(i),u=i.updateQueue,u!==null&&Lf(i,u.retryQueue),u=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),p=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(p=i.memoizedState.cachePool.pool),p!==u&&(i.flags|=2048),o!==null&&q(Wi),null;case 24:return u=null,o!==null&&(u=o.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),ao(xr),er(i),null;case 25:return null;case 30:return null}throw Error(n(156,i.tag))}function yG(o,i){switch(ng(i),i.tag){case 1:return o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 3:return ao(xr),ne(),o=i.flags,(o&65536)!==0&&(o&128)===0?(i.flags=o&-65537|128,i):null;case 26:case 27:case 5:return de(i),null;case 31:if(i.memoizedState!==null){if(On(i),i.alternate===null)throw Error(n(340));Hi()}return o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 13:if(On(i),o=i.memoizedState,o!==null&&o.dehydrated!==null){if(i.alternate===null)throw Error(n(340));Hi()}return o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 19:return q(br),null;case 4:return ne(),null;case 10:return ao(i.type),null;case 22:case 23:return On(i),bg(),o!==null&&q(Wi),o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 24:return ao(xr),null;case 25:return null;default:return null}}function f1(o,i){switch(ng(i),i.tag){case 3:ao(xr),ne();break;case 26:case 27:case 5:de(i);break;case 4:ne();break;case 31:i.memoizedState!==null&&On(i);break;case 13:On(i);break;case 19:q(br);break;case 10:ao(i.type);break;case 22:case 23:On(i),bg(),o!==null&&q(Wi);break;case 24:ao(xr)}}function Jc(o,i){try{var u=i.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var E=p.next;u=E;do{if((u.tag&o)===o){p=void 0;var T=u.create,D=u.inst;p=T(),D.destroy=p}u=u.next}while(u!==E)}}catch(B){Bt(i,i.return,B)}}function Xo(o,i,u){try{var p=i.updateQueue,E=p!==null?p.lastEffect:null;if(E!==null){var T=E.next;p=T;do{if((p.tag&o)===o){var D=p.inst,B=D.destroy;if(B!==void 0){D.destroy=void 0,E=i;var re=u,me=B;try{me()}catch(Se){Bt(E,re,Se)}}}p=p.next}while(p!==T)}}catch(Se){Bt(i,i.return,Se)}}function p1(o){var i=o.updateQueue;if(i!==null){var u=o.stateNode;try{nN(i,u)}catch(p){Bt(o,o.return,p)}}}function m1(o,i,u){u.props=Qi(o.type,o.memoizedProps),u.state=o.memoizedState;try{u.componentWillUnmount()}catch(p){Bt(o,i,p)}}function eu(o,i){try{var u=o.ref;if(u!==null){switch(o.tag){case 26:case 27:case 5:var p=o.stateNode;break;case 30:p=o.stateNode;break;default:p=o.stateNode}typeof u=="function"?o.refCleanup=u(p):u.current=p}}catch(E){Bt(o,i,E)}}function Aa(o,i){var u=o.ref,p=o.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(E){Bt(o,i,E)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(E){Bt(o,i,E)}else u.current=null}function h1(o){var i=o.type,u=o.memoizedProps,p=o.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":u.autoFocus&&p.focus();break e;case"img":u.src?p.src=u.src:u.srcSet&&(p.srcset=u.srcSet)}}catch(E){Bt(o,o.return,E)}}function Zg(o,i,u){try{var p=o.stateNode;$G(p,o.type,u,i),p[Be]=i}catch(E){Bt(o,o.return,E)}}function g1(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&ai(o.type)||o.tag===4}function Xg(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||g1(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&ai(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Qg(o,i,u){var p=o.tag;if(p===5||p===6)o=o.stateNode,i?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(o,i):(i=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,i.appendChild(o),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=Ja));else if(p!==4&&(p===27&&ai(o.type)&&(u=o.stateNode,i=null),o=o.child,o!==null))for(Qg(o,i,u),o=o.sibling;o!==null;)Qg(o,i,u),o=o.sibling}function Mf(o,i,u){var p=o.tag;if(p===5||p===6)o=o.stateNode,i?u.insertBefore(o,i):u.appendChild(o);else if(p!==4&&(p===27&&ai(o.type)&&(u=o.stateNode),o=o.child,o!==null))for(Mf(o,i,u),o=o.sibling;o!==null;)Mf(o,i,u),o=o.sibling}function v1(o){var i=o.stateNode,u=o.memoizedProps;try{for(var p=o.type,E=i.attributes;E.length;)i.removeAttributeNode(E[0]);Wr(i,p,u),i[je]=o,i[Be]=u}catch(T){Bt(o,o.return,T)}}var co=!1,Tr=!1,Jg=!1,b1=typeof WeakSet=="function"?WeakSet:Set,Mr=null;function EG(o,i){if(o=o.containerInfo,Ev=rp,o=kA(o),Gh(o)){if("selectionStart"in o)var u={start:o.selectionStart,end:o.selectionEnd};else e:{u=(u=o.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var E=p.anchorOffset,T=p.focusNode;p=p.focusOffset;try{u.nodeType,T.nodeType}catch{u=null;break e}var D=0,B=-1,re=-1,me=0,Se=0,Te=o,he=null;t:for(;;){for(var Ee;Te!==u||E!==0&&Te.nodeType!==3||(B=D+E),Te!==T||p!==0&&Te.nodeType!==3||(re=D+p),Te.nodeType===3&&(D+=Te.nodeValue.length),(Ee=Te.firstChild)!==null;)he=Te,Te=Ee;for(;;){if(Te===o)break t;if(he===u&&++me===E&&(B=D),he===T&&++Se===p&&(re=D),(Ee=Te.nextSibling)!==null)break;Te=he,he=Te.parentNode}Te=Ee}u=B===-1||re===-1?null:{start:B,end:re}}else u=null}u=u||{start:0,end:0}}else u=null;for(Sv={focusedElem:o,selectionRange:u},rp=!1,Mr=i;Mr!==null;)if(i=Mr,o=i.child,(i.subtreeFlags&1028)!==0&&o!==null)o.return=i,Mr=o;else for(;Mr!==null;){switch(i=Mr,T=i.alternate,o=i.flags,i.tag){case 0:if((o&4)!==0&&(o=i.updateQueue,o=o!==null?o.events:null,o!==null))for(u=0;u<o.length;u++)E=o[u],E.ref.impl=E.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&T!==null){o=void 0,u=i,E=T.memoizedProps,T=T.memoizedState,p=u.stateNode;try{var Ve=Qi(u.type,E);o=p.getSnapshotBeforeUpdate(Ve,T),p.__reactInternalSnapshotBeforeUpdate=o}catch(rt){Bt(u,u.return,rt)}}break;case 3:if((o&1024)!==0){if(o=i.stateNode.containerInfo,u=o.nodeType,u===9)_v(o);else if(u===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":_v(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(n(163))}if(o=i.sibling,o!==null){o.return=i.return,Mr=o;break}Mr=i.return}}function y1(o,i,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:fo(o,u),p&4&&Jc(5,u);break;case 1:if(fo(o,u),p&4)if(o=u.stateNode,i===null)try{o.componentDidMount()}catch(D){Bt(u,u.return,D)}else{var E=Qi(u.type,i.memoizedProps);i=i.memoizedState;try{o.componentDidUpdate(E,i,o.__reactInternalSnapshotBeforeUpdate)}catch(D){Bt(u,u.return,D)}}p&64&&p1(u),p&512&&eu(u,u.return);break;case 3:if(fo(o,u),p&64&&(o=u.updateQueue,o!==null)){if(i=null,u.child!==null)switch(u.child.tag){case 27:case 5:i=u.child.stateNode;break;case 1:i=u.child.stateNode}try{nN(o,i)}catch(D){Bt(u,u.return,D)}}break;case 27:i===null&&p&4&&v1(u);case 26:case 5:fo(o,u),i===null&&p&4&&h1(u),p&512&&eu(u,u.return);break;case 12:fo(o,u);break;case 31:fo(o,u),p&4&&x1(o,u);break;case 13:fo(o,u),p&4&&w1(o,u),p&64&&(o=u.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(u=NG.bind(null,u),KG(o,u))));break;case 22:if(p=u.memoizedState!==null||co,!p){i=i!==null&&i.memoizedState!==null||Tr,E=co;var T=Tr;co=p,(Tr=i)&&!T?po(o,u,(u.subtreeFlags&8772)!==0):fo(o,u),co=E,Tr=T}break;case 30:break;default:fo(o,u)}}function E1(o){var i=o.alternate;i!==null&&(o.alternate=null,E1(i)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(i=o.stateNode,i!==null&&ot(i)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var tr=null,gn=!1;function uo(o,i,u){for(u=u.child;u!==null;)S1(o,i,u),u=u.sibling}function S1(o,i,u){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(or,u)}catch{}switch(u.tag){case 26:Tr||Aa(u,i),uo(o,i,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Tr||Aa(u,i);var p=tr,E=gn;ai(u.type)&&(tr=u.stateNode,gn=!1),uo(o,i,u),cu(u.stateNode),tr=p,gn=E;break;case 5:Tr||Aa(u,i);case 6:if(p=tr,E=gn,tr=null,uo(o,i,u),tr=p,gn=E,tr!==null)if(gn)try{(tr.nodeType===9?tr.body:tr.nodeName==="HTML"?tr.ownerDocument.body:tr).removeChild(u.stateNode)}catch(T){Bt(u,i,T)}else try{tr.removeChild(u.stateNode)}catch(T){Bt(u,i,T)}break;case 18:tr!==null&&(gn?(o=tr,pk(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,u.stateNode),dl(o)):pk(tr,u.stateNode));break;case 4:p=tr,E=gn,tr=u.stateNode.containerInfo,gn=!0,uo(o,i,u),tr=p,gn=E;break;case 0:case 11:case 14:case 15:Xo(2,u,i),Tr||Xo(4,u,i),uo(o,i,u);break;case 1:Tr||(Aa(u,i),p=u.stateNode,typeof p.componentWillUnmount=="function"&&m1(u,i,p)),uo(o,i,u);break;case 21:uo(o,i,u);break;case 22:Tr=(p=Tr)||u.memoizedState!==null,uo(o,i,u),Tr=p;break;default:uo(o,i,u)}}function x1(o,i){if(i.memoizedState===null&&(o=i.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{dl(o)}catch(u){Bt(i,i.return,u)}}}function w1(o,i){if(i.memoizedState===null&&(o=i.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{dl(o)}catch(u){Bt(i,i.return,u)}}function SG(o){switch(o.tag){case 31:case 13:case 19:var i=o.stateNode;return i===null&&(i=o.stateNode=new b1),i;case 22:return o=o.stateNode,i=o._retryCache,i===null&&(i=o._retryCache=new b1),i;default:throw Error(n(435,o.tag))}}function Pf(o,i){var u=SG(o);i.forEach(function(p){if(!u.has(p)){u.add(p);var E=kG.bind(null,o,p);p.then(E,E)}})}function vn(o,i){var u=i.deletions;if(u!==null)for(var p=0;p<u.length;p++){var E=u[p],T=o,D=i,B=D;e:for(;B!==null;){switch(B.tag){case 27:if(ai(B.type)){tr=B.stateNode,gn=!1;break e}break;case 5:tr=B.stateNode,gn=!1;break e;case 3:case 4:tr=B.stateNode.containerInfo,gn=!0;break e}B=B.return}if(tr===null)throw Error(n(160));S1(T,D,E),tr=null,gn=!1,T=E.alternate,T!==null&&(T.return=null),E.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)_1(i,o),i=i.sibling}var fa=null;function _1(o,i){var u=o.alternate,p=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:vn(i,o),bn(o),p&4&&(Xo(3,o,o.return),Jc(3,o),Xo(5,o,o.return));break;case 1:vn(i,o),bn(o),p&512&&(Tr||u===null||Aa(u,u.return)),p&64&&co&&(o=o.updateQueue,o!==null&&(p=o.callbacks,p!==null&&(u=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=u===null?p:u.concat(p))));break;case 26:var E=fa;if(vn(i,o),bn(o),p&512&&(Tr||u===null||Aa(u,u.return)),p&4){var T=u!==null?u.memoizedState:null;if(p=o.memoizedState,u===null)if(p===null)if(o.stateNode===null){e:{p=o.type,u=o.memoizedProps,E=E.ownerDocument||E;t:switch(p){case"title":T=E.getElementsByTagName("title")[0],(!T||T[Wt]||T[je]||T.namespaceURI==="http://www.w3.org/2000/svg"||T.hasAttribute("itemprop"))&&(T=E.createElement(p),E.head.insertBefore(T,E.querySelector("head > title"))),Wr(T,p,u),T[je]=o,zt(T),p=T;break e;case"link":var D=_k("link","href",E).get(p+(u.href||""));if(D){for(var B=0;B<D.length;B++)if(T=D[B],T.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&T.getAttribute("rel")===(u.rel==null?null:u.rel)&&T.getAttribute("title")===(u.title==null?null:u.title)&&T.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){D.splice(B,1);break t}}T=E.createElement(p),Wr(T,p,u),E.head.appendChild(T);break;case"meta":if(D=_k("meta","content",E).get(p+(u.content||""))){for(B=0;B<D.length;B++)if(T=D[B],T.getAttribute("content")===(u.content==null?null:""+u.content)&&T.getAttribute("name")===(u.name==null?null:u.name)&&T.getAttribute("property")===(u.property==null?null:u.property)&&T.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&T.getAttribute("charset")===(u.charSet==null?null:u.charSet)){D.splice(B,1);break t}}T=E.createElement(p),Wr(T,p,u),E.head.appendChild(T);break;default:throw Error(n(468,p))}T[je]=o,zt(T),p=T}o.stateNode=p}else Tk(E,o.type,o.stateNode);else o.stateNode=wk(E,p,o.memoizedProps);else T!==p?(T===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):T.count--,p===null?Tk(E,o.type,o.stateNode):wk(E,p,o.memoizedProps)):p===null&&o.stateNode!==null&&Zg(o,o.memoizedProps,u.memoizedProps)}break;case 27:vn(i,o),bn(o),p&512&&(Tr||u===null||Aa(u,u.return)),u!==null&&p&4&&Zg(o,o.memoizedProps,u.memoizedProps);break;case 5:if(vn(i,o),bn(o),p&512&&(Tr||u===null||Aa(u,u.return)),o.flags&32){E=o.stateNode;try{Ls(E,"")}catch(Ve){Bt(o,o.return,Ve)}}p&4&&o.stateNode!=null&&(E=o.memoizedProps,Zg(o,E,u!==null?u.memoizedProps:E)),p&1024&&(Jg=!0);break;case 6:if(vn(i,o),bn(o),p&4){if(o.stateNode===null)throw Error(n(162));p=o.memoizedProps,u=o.stateNode;try{u.nodeValue=p}catch(Ve){Bt(o,o.return,Ve)}}break;case 3:if(Qf=null,E=fa,fa=Zf(i.containerInfo),vn(i,o),fa=E,bn(o),p&4&&u!==null&&u.memoizedState.isDehydrated)try{dl(i.containerInfo)}catch(Ve){Bt(o,o.return,Ve)}Jg&&(Jg=!1,T1(o));break;case 4:p=fa,fa=Zf(o.stateNode.containerInfo),vn(i,o),bn(o),fa=p;break;case 12:vn(i,o),bn(o);break;case 31:vn(i,o),bn(o),p&4&&(p=o.updateQueue,p!==null&&(o.updateQueue=null,Pf(o,p)));break;case 13:vn(i,o),bn(o),o.child.flags&8192&&o.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Uf=_e()),p&4&&(p=o.updateQueue,p!==null&&(o.updateQueue=null,Pf(o,p)));break;case 22:E=o.memoizedState!==null;var re=u!==null&&u.memoizedState!==null,me=co,Se=Tr;if(co=me||E,Tr=Se||re,vn(i,o),Tr=Se,co=me,bn(o),p&8192)e:for(i=o.stateNode,i._visibility=E?i._visibility&-2:i._visibility|1,E&&(u===null||re||co||Tr||Ji(o)),u=null,i=o;;){if(i.tag===5||i.tag===26){if(u===null){re=u=i;try{if(T=re.stateNode,E)D=T.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{B=re.stateNode;var Te=re.memoizedProps.style,he=Te!=null&&Te.hasOwnProperty("display")?Te.display:null;B.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(Ve){Bt(re,re.return,Ve)}}}else if(i.tag===6){if(u===null){re=i;try{re.stateNode.nodeValue=E?"":re.memoizedProps}catch(Ve){Bt(re,re.return,Ve)}}}else if(i.tag===18){if(u===null){re=i;try{var Ee=re.stateNode;E?mk(Ee,!0):mk(re.stateNode,!1)}catch(Ve){Bt(re,re.return,Ve)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===o)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;u===i&&(u=null),i=i.return}u===i&&(u=null),i.sibling.return=i.return,i=i.sibling}p&4&&(p=o.updateQueue,p!==null&&(u=p.retryQueue,u!==null&&(p.retryQueue=null,Pf(o,u))));break;case 19:vn(i,o),bn(o),p&4&&(p=o.updateQueue,p!==null&&(o.updateQueue=null,Pf(o,p)));break;case 30:break;case 21:break;default:vn(i,o),bn(o)}}function bn(o){var i=o.flags;if(i&2){try{for(var u,p=o.return;p!==null;){if(g1(p)){u=p;break}p=p.return}if(u==null)throw Error(n(160));switch(u.tag){case 27:var E=u.stateNode,T=Xg(o);Mf(o,T,E);break;case 5:var D=u.stateNode;u.flags&32&&(Ls(D,""),u.flags&=-33);var B=Xg(o);Mf(o,B,D);break;case 3:case 4:var re=u.stateNode.containerInfo,me=Xg(o);Qg(o,me,re);break;default:throw Error(n(161))}}catch(Se){Bt(o,o.return,Se)}o.flags&=-3}i&4096&&(o.flags&=-4097)}function T1(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var i=o;T1(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),o=o.sibling}}function fo(o,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)y1(o,i.alternate,i),i=i.sibling}function Ji(o){for(o=o.child;o!==null;){var i=o;switch(i.tag){case 0:case 11:case 14:case 15:Xo(4,i,i.return),Ji(i);break;case 1:Aa(i,i.return);var u=i.stateNode;typeof u.componentWillUnmount=="function"&&m1(i,i.return,u),Ji(i);break;case 27:cu(i.stateNode);case 26:case 5:Aa(i,i.return),Ji(i);break;case 22:i.memoizedState===null&&Ji(i);break;case 30:Ji(i);break;default:Ji(i)}o=o.sibling}}function po(o,i,u){for(u=u&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var p=i.alternate,E=o,T=i,D=T.flags;switch(T.tag){case 0:case 11:case 15:po(E,T,u),Jc(4,T);break;case 1:if(po(E,T,u),p=T,E=p.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(me){Bt(p,p.return,me)}if(p=T,E=p.updateQueue,E!==null){var B=p.stateNode;try{var re=E.shared.hiddenCallbacks;if(re!==null)for(E.shared.hiddenCallbacks=null,E=0;E<re.length;E++)rN(re[E],B)}catch(me){Bt(p,p.return,me)}}u&&D&64&&p1(T),eu(T,T.return);break;case 27:v1(T);case 26:case 5:po(E,T,u),u&&p===null&&D&4&&h1(T),eu(T,T.return);break;case 12:po(E,T,u);break;case 31:po(E,T,u),u&&D&4&&x1(E,T);break;case 13:po(E,T,u),u&&D&4&&w1(E,T);break;case 22:T.memoizedState===null&&po(E,T,u),eu(T,T.return);break;case 30:break;default:po(E,T,u)}i=i.sibling}}function ev(o,i){var u=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==u&&(o!=null&&o.refCount++,u!=null&&zc(u))}function tv(o,i){o=null,i.alternate!==null&&(o=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==o&&(i.refCount++,o!=null&&zc(o))}function pa(o,i,u,p){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)R1(o,i,u,p),i=i.sibling}function R1(o,i,u,p){var E=i.flags;switch(i.tag){case 0:case 11:case 15:pa(o,i,u,p),E&2048&&Jc(9,i);break;case 1:pa(o,i,u,p);break;case 3:pa(o,i,u,p),E&2048&&(o=null,i.alternate!==null&&(o=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==o&&(i.refCount++,o!=null&&zc(o)));break;case 12:if(E&2048){pa(o,i,u,p),o=i.stateNode;try{var T=i.memoizedProps,D=T.id,B=T.onPostCommit;typeof B=="function"&&B(D,i.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(re){Bt(i,i.return,re)}}else pa(o,i,u,p);break;case 31:pa(o,i,u,p);break;case 13:pa(o,i,u,p);break;case 23:break;case 22:T=i.stateNode,D=i.alternate,i.memoizedState!==null?T._visibility&2?pa(o,i,u,p):tu(o,i):T._visibility&2?pa(o,i,u,p):(T._visibility|=2,el(o,i,u,p,(i.subtreeFlags&10256)!==0||!1)),E&2048&&ev(D,i);break;case 24:pa(o,i,u,p),E&2048&&tv(i.alternate,i);break;default:pa(o,i,u,p)}}function el(o,i,u,p,E){for(E=E&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var T=o,D=i,B=u,re=p,me=D.flags;switch(D.tag){case 0:case 11:case 15:el(T,D,B,re,E),Jc(8,D);break;case 23:break;case 22:var Se=D.stateNode;D.memoizedState!==null?Se._visibility&2?el(T,D,B,re,E):tu(T,D):(Se._visibility|=2,el(T,D,B,re,E)),E&&me&2048&&ev(D.alternate,D);break;case 24:el(T,D,B,re,E),E&&me&2048&&tv(D.alternate,D);break;default:el(T,D,B,re,E)}i=i.sibling}}function tu(o,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var u=o,p=i,E=p.flags;switch(p.tag){case 22:tu(u,p),E&2048&&ev(p.alternate,p);break;case 24:tu(u,p),E&2048&&tv(p.alternate,p);break;default:tu(u,p)}i=i.sibling}}var ru=8192;function tl(o,i,u){if(o.subtreeFlags&ru)for(o=o.child;o!==null;)C1(o,i,u),o=o.sibling}function C1(o,i,u){switch(o.tag){case 26:tl(o,i,u),o.flags&ru&&o.memoizedState!==null&&s6(u,fa,o.memoizedState,o.memoizedProps);break;case 5:tl(o,i,u);break;case 3:case 4:var p=fa;fa=Zf(o.stateNode.containerInfo),tl(o,i,u),fa=p;break;case 22:o.memoizedState===null&&(p=o.alternate,p!==null&&p.memoizedState!==null?(p=ru,ru=16777216,tl(o,i,u),ru=p):tl(o,i,u));break;default:tl(o,i,u)}}function A1(o){var i=o.alternate;if(i!==null&&(o=i.child,o!==null)){i.child=null;do i=o.sibling,o.sibling=null,o=i;while(o!==null)}}function nu(o){var i=o.deletions;if((o.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var p=i[u];Mr=p,k1(p,o)}A1(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)N1(o),o=o.sibling}function N1(o){switch(o.tag){case 0:case 11:case 15:nu(o),o.flags&2048&&Xo(9,o,o.return);break;case 3:nu(o);break;case 12:nu(o);break;case 22:var i=o.stateNode;o.memoizedState!==null&&i._visibility&2&&(o.return===null||o.return.tag!==13)?(i._visibility&=-3,jf(o)):nu(o);break;default:nu(o)}}function jf(o){var i=o.deletions;if((o.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var p=i[u];Mr=p,k1(p,o)}A1(o)}for(o=o.child;o!==null;){switch(i=o,i.tag){case 0:case 11:case 15:Xo(8,i,i.return),jf(i);break;case 22:u=i.stateNode,u._visibility&2&&(u._visibility&=-3,jf(i));break;default:jf(i)}o=o.sibling}}function k1(o,i){for(;Mr!==null;){var u=Mr;switch(u.tag){case 0:case 11:case 15:Xo(8,u,i);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var p=u.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:zc(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,Mr=p;else e:for(u=o;Mr!==null;){p=Mr;var E=p.sibling,T=p.return;if(E1(p),p===u){Mr=null;break e}if(E!==null){E.return=T,Mr=E;break e}Mr=T}}}var xG={getCacheForType:function(o){var i=Vr(xr),u=i.data.get(o);return u===void 0&&(u=o(),i.data.set(o,u)),u},cacheSignal:function(){return Vr(xr).controller.signal}},wG=typeof WeakMap=="function"?WeakMap:Map,Lt=0,Kt=null,Et=null,_t=0,$t=0,Dn=null,Qo=!1,rl=!1,rv=!1,mo=0,mr=0,Jo=0,es=0,nv=0,Ln=0,nl=0,au=null,yn=null,av=!1,Uf=0,I1=0,Ff=1/0,zf=null,ei=null,Nr=0,ti=null,al=null,ho=0,ov=0,iv=null,O1=null,ou=0,sv=null;function Mn(){return(Lt&2)!==0&&_t!==0?_t&-_t:U.T!==null?pv():ie()}function D1(){if(Ln===0)if((_t&536870912)===0||Ct){var o=pn;pn<<=1,(pn&3932160)===0&&(pn=262144),Ln=o}else Ln=536870912;return o=In.current,o!==null&&(o.flags|=32),Ln}function En(o,i,u){(o===Kt&&($t===2||$t===9)||o.cancelPendingCommit!==null)&&(ol(o,0),ri(o,_t,Ln,!1)),Xt(o,u),((Lt&2)===0||o!==Kt)&&(o===Kt&&((Lt&2)===0&&(es|=u),mr===4&&ri(o,_t,Ln,!1)),Na(o))}function L1(o,i,u){if((Lt&6)!==0)throw Error(n(327));var p=!u&&(i&127)===0&&(i&o.expiredLanes)===0||jt(o,i),E=p?RG(o,i):cv(o,i,!0),T=p;do{if(E===0){rl&&!p&&ri(o,i,0,!1);break}else{if(u=o.current.alternate,T&&!_G(u)){E=cv(o,i,!1),T=!1;continue}if(E===2){if(T=i,o.errorRecoveryDisabledLanes&T)var D=0;else D=o.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){i=D;e:{var B=o;E=au;var re=B.current.memoizedState.isDehydrated;if(re&&(ol(B,D).flags|=256),D=cv(B,D,!1),D!==2){if(rv&&!re){B.errorRecoveryDisabledLanes|=T,es|=T,E=4;break e}T=yn,yn=E,T!==null&&(yn===null?yn=T:yn.push.apply(yn,T))}E=D}if(T=!1,E!==2)continue}}if(E===1){ol(o,0),ri(o,i,0,!0);break}e:{switch(p=o,T=E,T){case 0:case 1:throw Error(n(345));case 4:if((i&4194048)!==i)break;case 6:ri(p,i,Ln,!Qo);break e;case 2:yn=null;break;case 3:case 5:break;default:throw Error(n(329))}if((i&62914560)===i&&(E=Uf+300-_e(),10<E)){if(ri(p,i,Ln,!Qo),Qe(p,0,!0)!==0)break e;ho=i,p.timeoutHandle=dk(M1.bind(null,p,u,yn,zf,av,i,Ln,es,nl,Qo,T,"Throttled",-0,0),E);break e}M1(p,u,yn,zf,av,i,Ln,es,nl,Qo,T,null,-0,0)}}break}while(!0);Na(o)}function M1(o,i,u,p,E,T,D,B,re,me,Se,Te,he,Ee){if(o.timeoutHandle=-1,Te=i.subtreeFlags,Te&8192||(Te&16785408)===16785408){Te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ja},C1(i,T,Te);var Ve=(T&62914560)===T?Uf-_e():(T&4194048)===T?I1-_e():0;if(Ve=l6(Te,Ve),Ve!==null){ho=T,o.cancelPendingCommit=Ve(q1.bind(null,o,i,T,u,p,E,D,B,re,Se,Te,null,he,Ee)),ri(o,T,D,!me);return}}q1(o,i,T,u,p,E,D,B,re)}function _G(o){for(var i=o;;){var u=i.tag;if((u===0||u===11||u===15)&&i.flags&16384&&(u=i.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var p=0;p<u.length;p++){var E=u[p],T=E.getSnapshot;E=E.value;try{if(!Nn(T(),E))return!1}catch{return!1}}if(u=i.child,i.subtreeFlags&16384&&u!==null)u.return=i,i=u;else{if(i===o)break;for(;i.sibling===null;){if(i.return===null||i.return===o)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ri(o,i,u,p){i&=~nv,i&=~es,o.suspendedLanes|=i,o.pingedLanes&=~i,p&&(o.warmLanes|=i),p=o.expirationTimes;for(var E=i;0<E;){var T=31-fr(E),D=1<<T;p[T]=-1,E&=~D}u!==0&&_a(o,u,i)}function $f(){return(Lt&6)===0?(iu(0),!1):!0}function lv(){if(Et!==null){if($t===0)var o=Et.return;else o=Et,no=Vi=null,_g(o),Ks=null,Bc=0,o=Et;for(;o!==null;)f1(o.alternate,o),o=o.return;Et=null}}function ol(o,i){var u=o.timeoutHandle;u!==-1&&(o.timeoutHandle=-1,HG(u)),u=o.cancelPendingCommit,u!==null&&(o.cancelPendingCommit=null,u()),ho=0,lv(),Kt=o,Et=u=to(o.current,null),_t=i,$t=0,Dn=null,Qo=!1,rl=jt(o,i),rv=!1,nl=Ln=nv=es=Jo=mr=0,yn=au=null,av=!1,(i&8)!==0&&(i|=i&32);var p=o.entangledLanes;if(p!==0)for(o=o.entanglements,p&=i;0<p;){var E=31-fr(p),T=1<<E;i|=o[E],p&=~T}return mo=i,lf(),u}function P1(o,i){dt=null,U.H=Zc,i===Ys||i===gf?(i=QA(),$t=3):i===fg?(i=QA(),$t=4):$t=i===zg?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Dn=i,Et===null&&(mr=1,kf(o,Gn(i,o.current)))}function j1(){var o=In.current;return o===null?!0:(_t&4194048)===_t?Zn===null:(_t&62914560)===_t||(_t&536870912)!==0?o===Zn:!1}function U1(){var o=U.H;return U.H=Zc,o===null?Zc:o}function F1(){var o=U.A;return U.A=xG,o}function Bf(){mr=4,Qo||(_t&4194048)!==_t&&In.current!==null||(rl=!0),(Jo&134217727)===0&&(es&134217727)===0||Kt===null||ri(Kt,_t,Ln,!1)}function cv(o,i,u){var p=Lt;Lt|=2;var E=U1(),T=F1();(Kt!==o||_t!==i)&&(zf=null,ol(o,i)),i=!1;var D=mr;e:do try{if($t!==0&&Et!==null){var B=Et,re=Dn;switch($t){case 8:lv(),D=6;break e;case 3:case 2:case 9:case 6:In.current===null&&(i=!0);var me=$t;if($t=0,Dn=null,il(o,B,re,me),u&&rl){D=0;break e}break;default:me=$t,$t=0,Dn=null,il(o,B,re,me)}}TG(),D=mr;break}catch(Se){P1(o,Se)}while(!0);return i&&o.shellSuspendCounter++,no=Vi=null,Lt=p,U.H=E,U.A=T,Et===null&&(Kt=null,_t=0,lf()),D}function TG(){for(;Et!==null;)z1(Et)}function RG(o,i){var u=Lt;Lt|=2;var p=U1(),E=F1();Kt!==o||_t!==i?(zf=null,Ff=_e()+500,ol(o,i)):rl=jt(o,i);e:do try{if($t!==0&&Et!==null){i=Et;var T=Dn;t:switch($t){case 1:$t=0,Dn=null,il(o,i,T,1);break;case 2:case 9:if(ZA(T)){$t=0,Dn=null,$1(i);break}i=function(){$t!==2&&$t!==9||Kt!==o||($t=7),Na(o)},T.then(i,i);break e;case 3:$t=7;break e;case 4:$t=5;break e;case 7:ZA(T)?($t=0,Dn=null,$1(i)):($t=0,Dn=null,il(o,i,T,7));break;case 5:var D=null;switch(Et.tag){case 26:D=Et.memoizedState;case 5:case 27:var B=Et;if(D?Rk(D):B.stateNode.complete){$t=0,Dn=null;var re=B.sibling;if(re!==null)Et=re;else{var me=B.return;me!==null?(Et=me,qf(me)):Et=null}break t}}$t=0,Dn=null,il(o,i,T,5);break;case 6:$t=0,Dn=null,il(o,i,T,6);break;case 8:lv(),mr=6;break e;default:throw Error(n(462))}}CG();break}catch(Se){P1(o,Se)}while(!0);return no=Vi=null,U.H=p,U.A=E,Lt=u,Et!==null?0:(Kt=null,_t=0,lf(),mr)}function CG(){for(;Et!==null&&!Ce();)z1(Et)}function z1(o){var i=u1(o.alternate,o,mo);o.memoizedProps=o.pendingProps,i===null?qf(o):Et=i}function $1(o){var i=o,u=i.alternate;switch(i.tag){case 15:case 0:i=a1(u,i,i.pendingProps,i.type,void 0,_t);break;case 11:i=a1(u,i,i.pendingProps,i.type.render,i.ref,_t);break;case 5:_g(i);default:f1(u,i),i=Et=FA(i,mo),i=u1(u,i,mo)}o.memoizedProps=o.pendingProps,i===null?qf(o):Et=i}function il(o,i,u,p){no=Vi=null,_g(i),Ks=null,Bc=0;var E=i.return;try{if(hG(o,E,i,u,_t)){mr=1,kf(o,Gn(u,o.current)),Et=null;return}}catch(T){if(E!==null)throw Et=E,T;mr=1,kf(o,Gn(u,o.current)),Et=null;return}i.flags&32768?(Ct||p===1?o=!0:rl||(_t&536870912)!==0?o=!1:(Qo=o=!0,(p===2||p===9||p===3||p===6)&&(p=In.current,p!==null&&p.tag===13&&(p.flags|=16384))),B1(i,o)):qf(i)}function qf(o){var i=o;do{if((i.flags&32768)!==0){B1(i,Qo);return}o=i.return;var u=bG(i.alternate,i,mo);if(u!==null){Et=u;return}if(i=i.sibling,i!==null){Et=i;return}Et=i=o}while(i!==null);mr===0&&(mr=5)}function B1(o,i){do{var u=yG(o.alternate,o);if(u!==null){u.flags&=32767,Et=u;return}if(u=o.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!i&&(o=o.sibling,o!==null)){Et=o;return}Et=o=u}while(o!==null);mr=6,Et=null}function q1(o,i,u,p,E,T,D,B,re){o.cancelPendingCommit=null;do Hf();while(Nr!==0);if((Lt&6)!==0)throw Error(n(327));if(i!==null){if(i===o.current)throw Error(n(177));if(T=i.lanes|i.childLanes,T|=Xh,Jr(o,u,T,D,B,re),o===Kt&&(Et=Kt=null,_t=0),al=i,ti=o,ho=u,ov=T,iv=E,O1=p,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,IG(at,function(){return Y1(),null})):(o.callbackNode=null,o.callbackPriority=0),p=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||p){p=U.T,U.T=null,E=G.p,G.p=2,D=Lt,Lt|=4;try{EG(o,i,u)}finally{Lt=D,G.p=E,U.T=p}}Nr=1,H1(),V1(),G1()}}function H1(){if(Nr===1){Nr=0;var o=ti,i=al,u=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||u){u=U.T,U.T=null;var p=G.p;G.p=2;var E=Lt;Lt|=4;try{_1(i,o);var T=Sv,D=kA(o.containerInfo),B=T.focusedElem,re=T.selectionRange;if(D!==B&&B&&B.ownerDocument&&NA(B.ownerDocument.documentElement,B)){if(re!==null&&Gh(B)){var me=re.start,Se=re.end;if(Se===void 0&&(Se=me),"selectionStart"in B)B.selectionStart=me,B.selectionEnd=Math.min(Se,B.value.length);else{var Te=B.ownerDocument||document,he=Te&&Te.defaultView||window;if(he.getSelection){var Ee=he.getSelection(),Ve=B.textContent.length,rt=Math.min(re.start,Ve),Vt=re.end===void 0?rt:Math.min(re.end,Ve);!Ee.extend&&rt>Vt&&(D=Vt,Vt=rt,rt=D);var ue=AA(B,rt),se=AA(B,Vt);if(ue&&se&&(Ee.rangeCount!==1||Ee.anchorNode!==ue.node||Ee.anchorOffset!==ue.offset||Ee.focusNode!==se.node||Ee.focusOffset!==se.offset)){var pe=Te.createRange();pe.setStart(ue.node,ue.offset),Ee.removeAllRanges(),rt>Vt?(Ee.addRange(pe),Ee.extend(se.node,se.offset)):(pe.setEnd(se.node,se.offset),Ee.addRange(pe))}}}}for(Te=[],Ee=B;Ee=Ee.parentNode;)Ee.nodeType===1&&Te.push({element:Ee,left:Ee.scrollLeft,top:Ee.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<Te.length;B++){var we=Te[B];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}rp=!!Ev,Sv=Ev=null}finally{Lt=E,G.p=p,U.T=u}}o.current=i,Nr=2}}function V1(){if(Nr===2){Nr=0;var o=ti,i=al,u=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||u){u=U.T,U.T=null;var p=G.p;G.p=2;var E=Lt;Lt|=4;try{y1(o,i.alternate,i)}finally{Lt=E,G.p=p,U.T=u}}Nr=3}}function G1(){if(Nr===4||Nr===3){Nr=0,Fe();var o=ti,i=al,u=ho,p=O1;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Nr=5:(Nr=0,al=ti=null,W1(o,o.pendingLanes));var E=o.pendingLanes;if(E===0&&(ei=null),K(u),i=i.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(or,i,void 0,(i.current.flags&128)===128)}catch{}if(p!==null){i=U.T,E=G.p,G.p=2,U.T=null;try{for(var T=o.onRecoverableError,D=0;D<p.length;D++){var B=p[D];T(B.value,{componentStack:B.stack})}}finally{U.T=i,G.p=E}}(ho&3)!==0&&Hf(),Na(o),E=o.pendingLanes,(u&261930)!==0&&(E&42)!==0?o===sv?ou++:(ou=0,sv=o):ou=0,iu(0)}}function W1(o,i){(o.pooledCacheLanes&=i)===0&&(i=o.pooledCache,i!=null&&(o.pooledCache=null,zc(i)))}function Hf(){return H1(),V1(),G1(),Y1()}function Y1(){if(Nr!==5)return!1;var o=ti,i=ov;ov=0;var u=K(ho),p=U.T,E=G.p;try{G.p=32>u?32:u,U.T=null,u=iv,iv=null;var T=ti,D=ho;if(Nr=0,al=ti=null,ho=0,(Lt&6)!==0)throw Error(n(331));var B=Lt;if(Lt|=4,N1(T.current),R1(T,T.current,D,u),Lt=B,iu(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(or,T)}catch{}return!0}finally{G.p=E,U.T=p,W1(o,i)}}function K1(o,i,u){i=Gn(u,i),i=Fg(o.stateNode,i,2),o=Yo(o,i,2),o!==null&&(Xt(o,2),Na(o))}function Bt(o,i,u){if(o.tag===3)K1(o,o,u);else for(;i!==null;){if(i.tag===3){K1(i,o,u);break}else if(i.tag===1){var p=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(ei===null||!ei.has(p))){o=Gn(u,o),u=ZN(2),p=Yo(i,u,2),p!==null&&(XN(u,p,i,o),Xt(p,2),Na(p));break}}i=i.return}}function uv(o,i,u){var p=o.pingCache;if(p===null){p=o.pingCache=new wG;var E=new Set;p.set(i,E)}else E=p.get(i),E===void 0&&(E=new Set,p.set(i,E));E.has(u)||(rv=!0,E.add(u),o=AG.bind(null,o,i,u),i.then(o,o))}function AG(o,i,u){var p=o.pingCache;p!==null&&p.delete(i),o.pingedLanes|=o.suspendedLanes&u,o.warmLanes&=~u,Kt===o&&(_t&u)===u&&(mr===4||mr===3&&(_t&62914560)===_t&&300>_e()-Uf?(Lt&2)===0&&ol(o,0):nv|=u,nl===_t&&(nl=0)),Na(o)}function Z1(o,i){i===0&&(i=Lr()),o=Bi(o,i),o!==null&&(Xt(o,i),Na(o))}function NG(o){var i=o.memoizedState,u=0;i!==null&&(u=i.retryLane),Z1(o,u)}function kG(o,i){var u=0;switch(o.tag){case 31:case 13:var p=o.stateNode,E=o.memoizedState;E!==null&&(u=E.retryLane);break;case 19:p=o.stateNode;break;case 22:p=o.stateNode._retryCache;break;default:throw Error(n(314))}p!==null&&p.delete(i),Z1(o,u)}function IG(o,i){return ct(o,i)}var Vf=null,sl=null,dv=!1,Gf=!1,fv=!1,ni=0;function Na(o){o!==sl&&o.next===null&&(sl===null?Vf=sl=o:sl=sl.next=o),Gf=!0,dv||(dv=!0,DG())}function iu(o,i){if(!fv&&Gf){fv=!0;do for(var u=!1,p=Vf;p!==null;){if(o!==0){var E=p.pendingLanes;if(E===0)var T=0;else{var D=p.suspendedLanes,B=p.pingedLanes;T=(1<<31-fr(42|o)+1)-1,T&=E&~(D&~B),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(u=!0,ek(p,T))}else T=_t,T=Qe(p,p===Kt?T:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(T&3)===0||jt(p,T)||(u=!0,ek(p,T));p=p.next}while(u);fv=!1}}function OG(){X1()}function X1(){Gf=dv=!1;var o=0;ni!==0&&qG()&&(o=ni);for(var i=_e(),u=null,p=Vf;p!==null;){var E=p.next,T=Q1(p,i);T===0?(p.next=null,u===null?Vf=E:u.next=E,E===null&&(sl=u)):(u=p,(o!==0||(T&3)!==0)&&(Gf=!0)),p=E}Nr!==0&&Nr!==5||iu(o),ni!==0&&(ni=0)}function Q1(o,i){for(var u=o.suspendedLanes,p=o.pingedLanes,E=o.expirationTimes,T=o.pendingLanes&-62914561;0<T;){var D=31-fr(T),B=1<<D,re=E[D];re===-1?((B&u)===0||(B&p)!==0)&&(E[D]=Qt(B,i)):re<=i&&(o.expiredLanes|=B),T&=~B}if(i=Kt,u=_t,u=Qe(o,o===i?u:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),p=o.callbackNode,u===0||o===i&&($t===2||$t===9)||o.cancelPendingCommit!==null)return p!==null&&p!==null&&ce(p),o.callbackNode=null,o.callbackPriority=0;if((u&3)===0||jt(o,u)){if(i=u&-u,i===o.callbackPriority)return i;switch(p!==null&&ce(p),K(u)){case 2:case 8:u=Je;break;case 32:u=at;break;case 268435456:u=Ot;break;default:u=at}return p=J1.bind(null,o),u=ct(u,p),o.callbackPriority=i,o.callbackNode=u,i}return p!==null&&p!==null&&ce(p),o.callbackPriority=2,o.callbackNode=null,2}function J1(o,i){if(Nr!==0&&Nr!==5)return o.callbackNode=null,o.callbackPriority=0,null;var u=o.callbackNode;if(Hf()&&o.callbackNode!==u)return null;var p=_t;return p=Qe(o,o===Kt?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),p===0?null:(L1(o,p,i),Q1(o,_e()),o.callbackNode!=null&&o.callbackNode===u?J1.bind(null,o):null)}function ek(o,i){if(Hf())return null;L1(o,i,!0)}function DG(){VG(function(){(Lt&6)!==0?ct(Oe,OG):X1()})}function pv(){if(ni===0){var o=Gs;o===0&&(o=Gt,Gt<<=1,(Gt&261888)===0&&(Gt=256)),ni=o}return ni}function tk(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Jd(""+o)}function rk(o,i){var u=i.ownerDocument.createElement("input");return u.name=i.name,u.value=i.value,o.id&&u.setAttribute("form",o.id),i.parentNode.insertBefore(u,i),o=new FormData(o),u.parentNode.removeChild(u),o}function LG(o,i,u,p,E){if(i==="submit"&&u&&u.stateNode===E){var T=tk((E[Be]||null).action),D=p.submitter;D&&(i=(i=D[Be]||null)?tk(i.formAction):D.getAttribute("formAction"),i!==null&&(T=i,D=null));var B=new nf("action","action",null,p,E);o.push({event:B,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(ni!==0){var re=D?rk(E,D):new FormData(E);Dg(u,{pending:!0,data:re,method:E.method,action:T},null,re)}}else typeof T=="function"&&(B.preventDefault(),re=D?rk(E,D):new FormData(E),Dg(u,{pending:!0,data:re,method:E.method,action:T},T,re))},currentTarget:E}]})}}for(var mv=0;mv<Zh.length;mv++){var hv=Zh[mv],MG=hv.toLowerCase(),PG=hv[0].toUpperCase()+hv.slice(1);da(MG,"on"+PG)}da(DA,"onAnimationEnd"),da(LA,"onAnimationIteration"),da(MA,"onAnimationStart"),da("dblclick","onDoubleClick"),da("focusin","onFocus"),da("focusout","onBlur"),da(QV,"onTransitionRun"),da(JV,"onTransitionStart"),da(eG,"onTransitionCancel"),da(PA,"onTransitionEnd"),Ar("onMouseEnter",["mouseout","mouseover"]),Ar("onMouseLeave",["mouseout","mouseover"]),Ar("onPointerEnter",["pointerout","pointerover"]),Ar("onPointerLeave",["pointerout","pointerover"]),sn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),sn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),sn("onBeforeInput",["compositionend","keypress","textInput","paste"]),sn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),sn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),sn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var su="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(" "),jG=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(su));function nk(o,i){i=(i&4)!==0;for(var u=0;u<o.length;u++){var p=o[u],E=p.event;p=p.listeners;e:{var T=void 0;if(i)for(var D=p.length-1;0<=D;D--){var B=p[D],re=B.instance,me=B.currentTarget;if(B=B.listener,re!==T&&E.isPropagationStopped())break e;T=B,E.currentTarget=me;try{T(E)}catch(Se){sf(Se)}E.currentTarget=null,T=re}else for(D=0;D<p.length;D++){if(B=p[D],re=B.instance,me=B.currentTarget,B=B.listener,re!==T&&E.isPropagationStopped())break e;T=B,E.currentTarget=me;try{T(E)}catch(Se){sf(Se)}E.currentTarget=null,T=re}}}}function St(o,i){var u=i[Ut];u===void 0&&(u=i[Ut]=new Set);var p=o+"__bubble";u.has(p)||(ak(i,o,2,!1),u.add(p))}function gv(o,i,u){var p=0;i&&(p|=4),ak(u,o,p,i)}var Wf="_reactListening"+Math.random().toString(36).slice(2);function vv(o){if(!o[Wf]){o[Wf]=!0,An.forEach(function(u){u!=="selectionchange"&&(jG.has(u)||gv(u,!1,o),gv(u,!0,o))});var i=o.nodeType===9?o:o.ownerDocument;i===null||i[Wf]||(i[Wf]=!0,gv("selectionchange",!1,i))}}function ak(o,i,u,p){switch(Dk(i)){case 2:var E=d6;break;case 8:E=f6;break;default:E=Ov}u=E.bind(null,i,u,o),E=void 0,!jh||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(E=!0),p?E!==void 0?o.addEventListener(i,u,{capture:!0,passive:E}):o.addEventListener(i,u,!0):E!==void 0?o.addEventListener(i,u,{passive:E}):o.addEventListener(i,u,!1)}function bv(o,i,u,p,E){var T=p;if((i&1)===0&&(i&2)===0&&p!==null)e:for(;;){if(p===null)return;var D=p.tag;if(D===3||D===4){var B=p.stateNode.containerInfo;if(B===E)break;if(D===4)for(D=p.return;D!==null;){var re=D.tag;if((re===3||re===4)&&D.stateNode.containerInfo===E)return;D=D.return}for(;B!==null;){if(D=Dt(B),D===null)return;if(re=D.tag,re===5||re===6||re===26||re===27){p=T=D;continue e}B=B.parentNode}}p=p.return}cA(function(){var me=T,Se=Mh(u),Te=[];e:{var he=jA.get(o);if(he!==void 0){var Ee=nf,Ve=o;switch(o){case"keypress":if(tf(u)===0)break e;case"keydown":case"keyup":Ee=kV;break;case"focusin":Ve="focus",Ee=$h;break;case"focusout":Ve="blur",Ee=$h;break;case"beforeblur":case"afterblur":Ee=$h;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ee=fA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ee=bV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ee=DV;break;case DA:case LA:case MA:Ee=SV;break;case PA:Ee=MV;break;case"scroll":case"scrollend":Ee=gV;break;case"wheel":Ee=jV;break;case"copy":case"cut":case"paste":Ee=wV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ee=mA;break;case"toggle":case"beforetoggle":Ee=FV}var rt=(i&4)!==0,Vt=!rt&&(o==="scroll"||o==="scrollend"),ue=rt?he!==null?he+"Capture":null:he;rt=[];for(var se=me,pe;se!==null;){var we=se;if(pe=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||pe===null||ue===null||(we=Nc(se,ue),we!=null&&rt.push(lu(se,we,pe))),Vt)break;se=se.return}0<rt.length&&(he=new Ee(he,Ve,null,u,Se),Te.push({event:he,listeners:rt}))}}if((i&7)===0){e:{if(he=o==="mouseover"||o==="pointerover",Ee=o==="mouseout"||o==="pointerout",he&&u!==Lh&&(Ve=u.relatedTarget||u.fromElement)&&(Dt(Ve)||Ve[mt]))break e;if((Ee||he)&&(he=Se.window===Se?Se:(he=Se.ownerDocument)?he.defaultView||he.parentWindow:window,Ee?(Ve=u.relatedTarget||u.toElement,Ee=me,Ve=Ve?Dt(Ve):null,Ve!==null&&(Vt=s(Ve),rt=Ve.tag,Ve!==Vt||rt!==5&&rt!==27&&rt!==6)&&(Ve=null)):(Ee=null,Ve=me),Ee!==Ve)){if(rt=fA,we="onMouseLeave",ue="onMouseEnter",se="mouse",(o==="pointerout"||o==="pointerover")&&(rt=mA,we="onPointerLeave",ue="onPointerEnter",se="pointer"),Vt=Ee==null?he:Pt(Ee),pe=Ve==null?he:Pt(Ve),he=new rt(we,se+"leave",Ee,u,Se),he.target=Vt,he.relatedTarget=pe,we=null,Dt(Se)===me&&(rt=new rt(ue,se+"enter",Ve,u,Se),rt.target=pe,rt.relatedTarget=Vt,we=rt),Vt=we,Ee&&Ve)t:{for(rt=UG,ue=Ee,se=Ve,pe=0,we=ue;we;we=rt(we))pe++;we=0;for(var et=se;et;et=rt(et))we++;for(;0<pe-we;)ue=rt(ue),pe--;for(;0<we-pe;)se=rt(se),we--;for(;pe--;){if(ue===se||se!==null&&ue===se.alternate){rt=ue;break t}ue=rt(ue),se=rt(se)}rt=null}else rt=null;Ee!==null&&ok(Te,he,Ee,rt,!1),Ve!==null&&Vt!==null&&ok(Te,Vt,Ve,rt,!0)}}e:{if(he=me?Pt(me):window,Ee=he.nodeName&&he.nodeName.toLowerCase(),Ee==="select"||Ee==="input"&&he.type==="file")var kt=xA;else if(EA(he))if(wA)kt=KV;else{kt=WV;var Ke=GV}else Ee=he.nodeName,!Ee||Ee.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?me&&Dh(me.elementType)&&(kt=xA):kt=YV;if(kt&&(kt=kt(o,me))){SA(Te,kt,u,Se);break e}Ke&&Ke(o,he,me),o==="focusout"&&me&&he.type==="number"&&me.memoizedProps.value!=null&&Oh(he,"number",he.value)}switch(Ke=me?Pt(me):window,o){case"focusin":(EA(Ke)||Ke.contentEditable==="true")&&(Us=Ke,Wh=me,jc=null);break;case"focusout":jc=Wh=Us=null;break;case"mousedown":Yh=!0;break;case"contextmenu":case"mouseup":case"dragend":Yh=!1,IA(Te,u,Se);break;case"selectionchange":if(XV)break;case"keydown":case"keyup":IA(Te,u,Se)}var ht;if(qh)e:{switch(o){case"compositionstart":var Tt="onCompositionStart";break e;case"compositionend":Tt="onCompositionEnd";break e;case"compositionupdate":Tt="onCompositionUpdate";break e}Tt=void 0}else js?bA(o,u)&&(Tt="onCompositionEnd"):o==="keydown"&&u.keyCode===229&&(Tt="onCompositionStart");Tt&&(hA&&u.locale!=="ko"&&(js||Tt!=="onCompositionStart"?Tt==="onCompositionEnd"&&js&&(ht=uA()):($o=Se,Uh="value"in $o?$o.value:$o.textContent,js=!0)),Ke=Yf(me,Tt),0<Ke.length&&(Tt=new pA(Tt,o,null,u,Se),Te.push({event:Tt,listeners:Ke}),ht?Tt.data=ht:(ht=yA(u),ht!==null&&(Tt.data=ht)))),(ht=$V?BV(o,u):qV(o,u))&&(Tt=Yf(me,"onBeforeInput"),0<Tt.length&&(Ke=new pA("onBeforeInput","beforeinput",null,u,Se),Te.push({event:Ke,listeners:Tt}),Ke.data=ht)),LG(Te,o,me,u,Se)}nk(Te,i)})}function lu(o,i,u){return{instance:o,listener:i,currentTarget:u}}function Yf(o,i){for(var u=i+"Capture",p=[];o!==null;){var E=o,T=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||T===null||(E=Nc(o,u),E!=null&&p.unshift(lu(o,E,T)),E=Nc(o,i),E!=null&&p.push(lu(o,E,T))),o.tag===3)return p;o=o.return}return[]}function UG(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function ok(o,i,u,p,E){for(var T=i._reactName,D=[];u!==null&&u!==p;){var B=u,re=B.alternate,me=B.stateNode;if(B=B.tag,re!==null&&re===p)break;B!==5&&B!==26&&B!==27||me===null||(re=me,E?(me=Nc(u,T),me!=null&&D.unshift(lu(u,me,re))):E||(me=Nc(u,T),me!=null&&D.push(lu(u,me,re)))),u=u.return}D.length!==0&&o.push({event:i,listeners:D})}var FG=/\r\n?/g,zG=/\u0000|\uFFFD/g;function ik(o){return(typeof o=="string"?o:""+o).replace(FG,`
|
|
23
23
|
`).replace(zG,"")}function sk(o,i){return i=ik(i),ik(o)===i}function Ht(o,i,u,p,E,T){switch(u){case"children":typeof p=="string"?i==="body"||i==="textarea"&&p===""||Ls(o,p):(typeof p=="number"||typeof p=="bigint")&&i!=="body"&&Ls(o,""+p);break;case"className":ji(o,"class",p);break;case"tabIndex":ji(o,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":ji(o,u,p);break;case"style":sA(o,p,T);break;case"data":if(i!=="object"){ji(o,"data",p);break}case"src":case"href":if(p===""&&(i!=="a"||u!=="href")){o.removeAttribute(u);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){o.removeAttribute(u);break}p=Jd(""+p),o.setAttribute(u,p);break;case"action":case"formAction":if(typeof p=="function"){o.setAttribute(u,"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 T=="function"&&(u==="formAction"?(i!=="input"&&Ht(o,i,"name",E.name,E,null),Ht(o,i,"formEncType",E.formEncType,E,null),Ht(o,i,"formMethod",E.formMethod,E,null),Ht(o,i,"formTarget",E.formTarget,E,null)):(Ht(o,i,"encType",E.encType,E,null),Ht(o,i,"method",E.method,E,null),Ht(o,i,"target",E.target,E,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){o.removeAttribute(u);break}p=Jd(""+p),o.setAttribute(u,p);break;case"onClick":p!=null&&(o.onclick=Ja);break;case"onScroll":p!=null&&St("scroll",o);break;case"onScrollEnd":p!=null&&St("scrollend",o);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(u=p.__html,u!=null){if(E.children!=null)throw Error(n(60));o.innerHTML=u}}break;case"multiple":o.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":o.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){o.removeAttribute("xlink:href");break}u=Jd(""+p),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(u,""+p):o.removeAttribute(u);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":p&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(u,""):o.removeAttribute(u);break;case"capture":case"download":p===!0?o.setAttribute(u,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(u,p):o.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?o.setAttribute(u,p):o.removeAttribute(u);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?o.removeAttribute(u):o.setAttribute(u,p);break;case"popover":St("beforetoggle",o),St("toggle",o),Pi(o,"popover",p);break;case"xlinkActuate":mn(o,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":mn(o,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":mn(o,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":mn(o,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":mn(o,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":mn(o,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":mn(o,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":mn(o,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":mn(o,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Pi(o,"is",p);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=mV.get(u)||u,Pi(o,u,p))}}function yv(o,i,u,p,E,T){switch(u){case"style":sA(o,p,T);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(u=p.__html,u!=null){if(E.children!=null)throw Error(n(60));o.innerHTML=u}}break;case"children":typeof p=="string"?Ls(o,p):(typeof p=="number"||typeof p=="bigint")&&Ls(o,""+p);break;case"onScroll":p!=null&&St("scroll",o);break;case"onScrollEnd":p!=null&&St("scrollend",o);break;case"onClick":p!=null&&(o.onclick=Ja);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qa.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(E=u.endsWith("Capture"),i=u.slice(2,E?u.length-7:void 0),T=o[Be]||null,T=T!=null?T[u]:null,typeof T=="function"&&o.removeEventListener(i,T,E),typeof p=="function")){typeof T!="function"&&T!==null&&(u in o?o[u]=null:o.hasAttribute(u)&&o.removeAttribute(u)),o.addEventListener(i,p,E);break e}u in o?o[u]=p:p===!0?o.setAttribute(u,""):Pi(o,u,p)}}}function Wr(o,i,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":St("error",o),St("load",o);var p=!1,E=!1,T;for(T in u)if(u.hasOwnProperty(T)){var D=u[T];if(D!=null)switch(T){case"src":p=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,i));default:Ht(o,i,T,D,u,null)}}E&&Ht(o,i,"srcSet",u.srcSet,u,null),p&&Ht(o,i,"src",u.src,u,null);return;case"input":St("invalid",o);var B=T=D=E=null,re=null,me=null;for(p in u)if(u.hasOwnProperty(p)){var Se=u[p];if(Se!=null)switch(p){case"name":E=Se;break;case"type":D=Se;break;case"checked":re=Se;break;case"defaultChecked":me=Se;break;case"value":T=Se;break;case"defaultValue":B=Se;break;case"children":case"dangerouslySetInnerHTML":if(Se!=null)throw Error(n(137,i));break;default:Ht(o,i,p,Se,u,null)}}nA(o,T,B,re,me,D,E,!1);return;case"select":St("invalid",o),p=D=T=null;for(E in u)if(u.hasOwnProperty(E)&&(B=u[E],B!=null))switch(E){case"value":T=B;break;case"defaultValue":D=B;break;case"multiple":p=B;default:Ht(o,i,E,B,u,null)}i=T,u=D,o.multiple=!!p,i!=null?Ds(o,!!p,i,!1):u!=null&&Ds(o,!!p,u,!0);return;case"textarea":St("invalid",o),T=E=p=null;for(D in u)if(u.hasOwnProperty(D)&&(B=u[D],B!=null))switch(D){case"value":p=B;break;case"defaultValue":E=B;break;case"children":T=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(n(91));break;default:Ht(o,i,D,B,u,null)}oA(o,p,E,T);return;case"option":for(re in u)if(u.hasOwnProperty(re)&&(p=u[re],p!=null))switch(re){case"selected":o.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:Ht(o,i,re,p,u,null)}return;case"dialog":St("beforetoggle",o),St("toggle",o),St("cancel",o),St("close",o);break;case"iframe":case"object":St("load",o);break;case"video":case"audio":for(p=0;p<su.length;p++)St(su[p],o);break;case"image":St("error",o),St("load",o);break;case"details":St("toggle",o);break;case"embed":case"source":case"link":St("error",o),St("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(me in u)if(u.hasOwnProperty(me)&&(p=u[me],p!=null))switch(me){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,i));default:Ht(o,i,me,p,u,null)}return;default:if(Dh(i)){for(Se in u)u.hasOwnProperty(Se)&&(p=u[Se],p!==void 0&&yv(o,i,Se,p,u,void 0));return}}for(B in u)u.hasOwnProperty(B)&&(p=u[B],p!=null&&Ht(o,i,B,p,u,null))}function $G(o,i,u,p){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,T=null,D=null,B=null,re=null,me=null,Se=null;for(Ee in u){var Te=u[Ee];if(u.hasOwnProperty(Ee)&&Te!=null)switch(Ee){case"checked":break;case"value":break;case"defaultValue":re=Te;default:p.hasOwnProperty(Ee)||Ht(o,i,Ee,null,p,Te)}}for(var he in p){var Ee=p[he];if(Te=u[he],p.hasOwnProperty(he)&&(Ee!=null||Te!=null))switch(he){case"type":T=Ee;break;case"name":E=Ee;break;case"checked":me=Ee;break;case"defaultChecked":Se=Ee;break;case"value":D=Ee;break;case"defaultValue":B=Ee;break;case"children":case"dangerouslySetInnerHTML":if(Ee!=null)throw Error(n(137,i));break;default:Ee!==Te&&Ht(o,i,he,Ee,p,Te)}}Ih(o,D,B,re,me,Se,T,E);return;case"select":Ee=D=B=he=null;for(T in u)if(re=u[T],u.hasOwnProperty(T)&&re!=null)switch(T){case"value":break;case"multiple":Ee=re;default:p.hasOwnProperty(T)||Ht(o,i,T,null,p,re)}for(E in p)if(T=p[E],re=u[E],p.hasOwnProperty(E)&&(T!=null||re!=null))switch(E){case"value":he=T;break;case"defaultValue":B=T;break;case"multiple":D=T;default:T!==re&&Ht(o,i,E,T,p,re)}i=B,u=D,p=Ee,he!=null?Ds(o,!!u,he,!1):!!p!=!!u&&(i!=null?Ds(o,!!u,i,!0):Ds(o,!!u,u?[]:"",!1));return;case"textarea":Ee=he=null;for(B in u)if(E=u[B],u.hasOwnProperty(B)&&E!=null&&!p.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:Ht(o,i,B,null,p,E)}for(D in p)if(E=p[D],T=u[D],p.hasOwnProperty(D)&&(E!=null||T!=null))switch(D){case"value":he=E;break;case"defaultValue":Ee=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(n(91));break;default:E!==T&&Ht(o,i,D,E,p,T)}aA(o,he,Ee);return;case"option":for(var Ve in u)if(he=u[Ve],u.hasOwnProperty(Ve)&&he!=null&&!p.hasOwnProperty(Ve))switch(Ve){case"selected":o.selected=!1;break;default:Ht(o,i,Ve,null,p,he)}for(re in p)if(he=p[re],Ee=u[re],p.hasOwnProperty(re)&&he!==Ee&&(he!=null||Ee!=null))switch(re){case"selected":o.selected=he&&typeof he!="function"&&typeof he!="symbol";break;default:Ht(o,i,re,he,p,Ee)}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 rt in u)he=u[rt],u.hasOwnProperty(rt)&&he!=null&&!p.hasOwnProperty(rt)&&Ht(o,i,rt,null,p,he);for(me in p)if(he=p[me],Ee=u[me],p.hasOwnProperty(me)&&he!==Ee&&(he!=null||Ee!=null))switch(me){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(n(137,i));break;default:Ht(o,i,me,he,p,Ee)}return;default:if(Dh(i)){for(var Vt in u)he=u[Vt],u.hasOwnProperty(Vt)&&he!==void 0&&!p.hasOwnProperty(Vt)&&yv(o,i,Vt,void 0,p,he);for(Se in p)he=p[Se],Ee=u[Se],!p.hasOwnProperty(Se)||he===Ee||he===void 0&&Ee===void 0||yv(o,i,Se,he,p,Ee);return}}for(var ue in u)he=u[ue],u.hasOwnProperty(ue)&&he!=null&&!p.hasOwnProperty(ue)&&Ht(o,i,ue,null,p,he);for(Te in p)he=p[Te],Ee=u[Te],!p.hasOwnProperty(Te)||he===Ee||he==null&&Ee==null||Ht(o,i,Te,he,p,Ee)}function lk(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function BG(){if(typeof performance.getEntriesByType=="function"){for(var o=0,i=0,u=performance.getEntriesByType("resource"),p=0;p<u.length;p++){var E=u[p],T=E.transferSize,D=E.initiatorType,B=E.duration;if(T&&B&&lk(D)){for(D=0,B=E.responseEnd,p+=1;p<u.length;p++){var re=u[p],me=re.startTime;if(me>B)break;var Se=re.transferSize,Te=re.initiatorType;Se&&lk(Te)&&(re=re.responseEnd,D+=Se*(re<B?1:(B-me)/(re-me)))}if(--p,i+=8*(T+D)/(E.duration/1e3),o++,10<o)break}}if(0<o)return i/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var Ev=null,Sv=null;function Kf(o){return o.nodeType===9?o:o.ownerDocument}function ck(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function uk(o,i){if(o===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&i==="foreignObject"?0:o}function xv(o,i){return o==="textarea"||o==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var wv=null;function qG(){var o=window.event;return o&&o.type==="popstate"?o===wv?!1:(wv=o,!0):(wv=null,!1)}var dk=typeof setTimeout=="function"?setTimeout:void 0,HG=typeof clearTimeout=="function"?clearTimeout:void 0,fk=typeof Promise=="function"?Promise:void 0,VG=typeof queueMicrotask=="function"?queueMicrotask:typeof fk<"u"?function(o){return fk.resolve(null).then(o).catch(GG)}:dk;function GG(o){setTimeout(function(){throw o})}function ai(o){return o==="head"}function pk(o,i){var u=i,p=0;do{var E=u.nextSibling;if(o.removeChild(u),E&&E.nodeType===8)if(u=E.data,u==="/$"||u==="/&"){if(p===0){o.removeChild(E),dl(i);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")cu(o.ownerDocument.documentElement);else if(u==="head"){u=o.ownerDocument.head,cu(u);for(var T=u.firstChild;T;){var D=T.nextSibling,B=T.nodeName;T[Wt]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&T.rel.toLowerCase()==="stylesheet"||u.removeChild(T),T=D}}else u==="body"&&cu(o.ownerDocument.body);u=E}while(u);dl(i)}function mk(o,i){var u=o;o=0;do{var p=u.nextSibling;if(u.nodeType===1?i?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(i?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),p&&p.nodeType===8)if(u=p.data,u==="/$"){if(o===0)break;o--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||o++;u=p}while(u)}function _v(o){var i=o.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var u=i;switch(i=i.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":_v(u),ot(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}o.removeChild(u)}}function WG(o,i,u,p){for(;o.nodeType===1;){var E=u;if(o.nodeName.toLowerCase()!==i.toLowerCase()){if(!p&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(p){if(!o[Wt])switch(i){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(T=o.getAttribute("rel"),T==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(T!==E.rel||o.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||o.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||o.getAttribute("title")!==(E.title==null?null:E.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(T=o.getAttribute("src"),(T!==(E.src==null?null:E.src)||o.getAttribute("type")!==(E.type==null?null:E.type)||o.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&T&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(i==="input"&&o.type==="hidden"){var T=E.name==null?null:""+E.name;if(E.type==="hidden"&&o.getAttribute("name")===T)return o}else return o;if(o=Xn(o.nextSibling),o===null)break}return null}function YG(o,i,u){if(i==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!u||(o=Xn(o.nextSibling),o===null))return null;return o}function hk(o,i){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!i||(o=Xn(o.nextSibling),o===null))return null;return o}function Tv(o){return o.data==="$?"||o.data==="$~"}function Rv(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function KG(o,i){var u=o.ownerDocument;if(o.data==="$~")o._reactRetry=i;else if(o.data!=="$?"||u.readyState!=="loading")i();else{var p=function(){i(),u.removeEventListener("DOMContentLoaded",p)};u.addEventListener("DOMContentLoaded",p),o._reactRetry=p}}function Xn(o){for(;o!=null;o=o.nextSibling){var i=o.nodeType;if(i===1||i===3)break;if(i===8){if(i=o.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return o}var Cv=null;function gk(o){o=o.nextSibling;for(var i=0;o;){if(o.nodeType===8){var u=o.data;if(u==="/$"||u==="/&"){if(i===0)return Xn(o.nextSibling);i--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||i++}o=o.nextSibling}return null}function vk(o){o=o.previousSibling;for(var i=0;o;){if(o.nodeType===8){var u=o.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(i===0)return o;i--}else u!=="/$"&&u!=="/&"||i++}o=o.previousSibling}return null}function bk(o,i,u){switch(i=Kf(u),o){case"html":if(o=i.documentElement,!o)throw Error(n(452));return o;case"head":if(o=i.head,!o)throw Error(n(453));return o;case"body":if(o=i.body,!o)throw Error(n(454));return o;default:throw Error(n(451))}}function cu(o){for(var i=o.attributes;i.length;)o.removeAttributeNode(i[0]);ot(o)}var Qn=new Map,yk=new Set;function Zf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var go=G.d;G.d={f:ZG,r:XG,D:QG,C:JG,L:e6,m:t6,X:n6,S:r6,M:a6};function ZG(){var o=go.f(),i=$f();return o||i}function XG(o){var i=Yt(o);i!==null&&i.tag===5&&i.type==="form"?PN(i):go.r(o)}var ll=typeof document>"u"?null:document;function Ek(o,i,u){var p=ll;if(p&&typeof i=="string"&&i){var E=Hn(i);E='link[rel="'+o+'"][href="'+E+'"]',typeof u=="string"&&(E+='[crossorigin="'+u+'"]'),yk.has(E)||(yk.add(E),o={rel:o,crossOrigin:u,href:i},p.querySelector(E)===null&&(i=p.createElement("link"),Wr(i,"link",o),zt(i),p.head.appendChild(i)))}}function QG(o){go.D(o),Ek("dns-prefetch",o,null)}function JG(o,i){go.C(o,i),Ek("preconnect",o,i)}function e6(o,i,u){go.L(o,i,u);var p=ll;if(p&&o&&i){var E='link[rel="preload"][as="'+Hn(i)+'"]';i==="image"&&u&&u.imageSrcSet?(E+='[imagesrcset="'+Hn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(E+='[imagesizes="'+Hn(u.imageSizes)+'"]')):E+='[href="'+Hn(o)+'"]';var T=E;switch(i){case"style":T=cl(o);break;case"script":T=ul(o)}Qn.has(T)||(o=h({rel:"preload",href:i==="image"&&u&&u.imageSrcSet?void 0:o,as:i},u),Qn.set(T,o),p.querySelector(E)!==null||i==="style"&&p.querySelector(uu(T))||i==="script"&&p.querySelector(du(T))||(i=p.createElement("link"),Wr(i,"link",o),zt(i),p.head.appendChild(i)))}}function t6(o,i){go.m(o,i);var u=ll;if(u&&o){var p=i&&typeof i.as=="string"?i.as:"script",E='link[rel="modulepreload"][as="'+Hn(p)+'"][href="'+Hn(o)+'"]',T=E;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=ul(o)}if(!Qn.has(T)&&(o=h({rel:"modulepreload",href:o},i),Qn.set(T,o),u.querySelector(E)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(du(T)))return}p=u.createElement("link"),Wr(p,"link",o),zt(p),u.head.appendChild(p)}}}function r6(o,i,u){go.S(o,i,u);var p=ll;if(p&&o){var E=on(p).hoistableStyles,T=cl(o);i=i||"default";var D=E.get(T);if(!D){var B={loading:0,preload:null};if(D=p.querySelector(uu(T)))B.loading=5;else{o=h({rel:"stylesheet",href:o,"data-precedence":i},u),(u=Qn.get(T))&&Av(o,u);var re=D=p.createElement("link");zt(re),Wr(re,"link",o),re._p=new Promise(function(me,Se){re.onload=me,re.onerror=Se}),re.addEventListener("load",function(){B.loading|=1}),re.addEventListener("error",function(){B.loading|=2}),B.loading|=4,Xf(D,i,p)}D={type:"stylesheet",instance:D,count:1,state:B},E.set(T,D)}}}function n6(o,i){go.X(o,i);var u=ll;if(u&&o){var p=on(u).hoistableScripts,E=ul(o),T=p.get(E);T||(T=u.querySelector(du(E)),T||(o=h({src:o,async:!0},i),(i=Qn.get(E))&&Nv(o,i),T=u.createElement("script"),zt(T),Wr(T,"link",o),u.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},p.set(E,T))}}function a6(o,i){go.M(o,i);var u=ll;if(u&&o){var p=on(u).hoistableScripts,E=ul(o),T=p.get(E);T||(T=u.querySelector(du(E)),T||(o=h({src:o,async:!0,type:"module"},i),(i=Qn.get(E))&&Nv(o,i),T=u.createElement("script"),zt(T),Wr(T,"link",o),u.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},p.set(E,T))}}function Sk(o,i,u,p){var E=(E=F.current)?Zf(E):null;if(!E)throw Error(n(446));switch(o){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(i=cl(u.href),u=on(E).hoistableStyles,p=u.get(i),p||(p={type:"style",instance:null,count:0,state:null},u.set(i,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){o=cl(u.href);var T=on(E).hoistableStyles,D=T.get(o);if(D||(E=E.ownerDocument||E,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(o,D),(T=E.querySelector(uu(o)))&&!T._p&&(D.instance=T,D.state.loading=5),Qn.has(o)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Qn.set(o,u),T||o6(E,o,u,D.state))),i&&p===null)throw Error(n(528,""));return D}if(i&&p!==null)throw Error(n(529,""));return null;case"script":return i=u.async,u=u.src,typeof u=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=ul(u),u=on(E).hoistableScripts,p=u.get(i),p||(p={type:"script",instance:null,count:0,state:null},u.set(i,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,o))}}function cl(o){return'href="'+Hn(o)+'"'}function uu(o){return'link[rel="stylesheet"]['+o+"]"}function xk(o){return h({},o,{"data-precedence":o.precedence,precedence:null})}function o6(o,i,u,p){o.querySelector('link[rel="preload"][as="style"]['+i+"]")?p.loading=1:(i=o.createElement("link"),p.preload=i,i.addEventListener("load",function(){return p.loading|=1}),i.addEventListener("error",function(){return p.loading|=2}),Wr(i,"link",u),zt(i),o.head.appendChild(i))}function ul(o){return'[src="'+Hn(o)+'"]'}function du(o){return"script[async]"+o}function wk(o,i,u){if(i.count++,i.instance===null)switch(i.type){case"style":var p=o.querySelector('style[data-href~="'+Hn(u.href)+'"]');if(p)return i.instance=p,zt(p),p;var E=h({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return p=(o.ownerDocument||o).createElement("style"),zt(p),Wr(p,"style",E),Xf(p,u.precedence,o),i.instance=p;case"stylesheet":E=cl(u.href);var T=o.querySelector(uu(E));if(T)return i.state.loading|=4,i.instance=T,zt(T),T;p=xk(u),(E=Qn.get(E))&&Av(p,E),T=(o.ownerDocument||o).createElement("link"),zt(T);var D=T;return D._p=new Promise(function(B,re){D.onload=B,D.onerror=re}),Wr(T,"link",p),i.state.loading|=4,Xf(T,u.precedence,o),i.instance=T;case"script":return T=ul(u.src),(E=o.querySelector(du(T)))?(i.instance=E,zt(E),E):(p=u,(E=Qn.get(T))&&(p=h({},u),Nv(p,E)),o=o.ownerDocument||o,E=o.createElement("script"),zt(E),Wr(E,"link",p),o.head.appendChild(E),i.instance=E);case"void":return null;default:throw Error(n(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(p=i.instance,i.state.loading|=4,Xf(p,u.precedence,o));return i.instance}function Xf(o,i,u){for(var p=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=p.length?p[p.length-1]:null,T=E,D=0;D<p.length;D++){var B=p[D];if(B.dataset.precedence===i)T=B;else if(T!==E)break}T?T.parentNode.insertBefore(o,T.nextSibling):(i=u.nodeType===9?u.head:u,i.insertBefore(o,i.firstChild))}function Av(o,i){o.crossOrigin==null&&(o.crossOrigin=i.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=i.referrerPolicy),o.title==null&&(o.title=i.title)}function Nv(o,i){o.crossOrigin==null&&(o.crossOrigin=i.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=i.referrerPolicy),o.integrity==null&&(o.integrity=i.integrity)}var Qf=null;function _k(o,i,u){if(Qf===null){var p=new Map,E=Qf=new Map;E.set(u,p)}else E=Qf,p=E.get(u),p||(p=new Map,E.set(u,p));if(p.has(o))return p;for(p.set(o,null),u=u.getElementsByTagName(o),E=0;E<u.length;E++){var T=u[E];if(!(T[Wt]||T[je]||o==="link"&&T.getAttribute("rel")==="stylesheet")&&T.namespaceURI!=="http://www.w3.org/2000/svg"){var D=T.getAttribute(i)||"";D=o+D;var B=p.get(D);B?B.push(T):p.set(D,[T])}}return p}function Tk(o,i,u){o=o.ownerDocument||o,o.head.insertBefore(u,i==="title"?o.querySelector("head > title"):null)}function i6(o,i,u){if(u===1||i.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return o=i.disabled,typeof i.precedence=="string"&&o==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Rk(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function s6(o,i,u,p){if(u.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var E=cl(p.href),T=i.querySelector(uu(E));if(T){i=T._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(o.count++,o=Jf.bind(o),i.then(o,o)),u.state.loading|=4,u.instance=T,zt(T);return}T=i.ownerDocument||i,p=xk(p),(E=Qn.get(E))&&Av(p,E),T=T.createElement("link"),zt(T);var D=T;D._p=new Promise(function(B,re){D.onload=B,D.onerror=re}),Wr(T,"link",p),u.instance=T}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(u,i),(i=u.state.preload)&&(u.state.loading&3)===0&&(o.count++,u=Jf.bind(o),i.addEventListener("load",u),i.addEventListener("error",u))}}var kv=0;function l6(o,i){return o.stylesheets&&o.count===0&&tp(o,o.stylesheets),0<o.count||0<o.imgCount?function(u){var p=setTimeout(function(){if(o.stylesheets&&tp(o,o.stylesheets),o.unsuspend){var T=o.unsuspend;o.unsuspend=null,T()}},6e4+i);0<o.imgBytes&&kv===0&&(kv=62500*BG());var E=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&tp(o,o.stylesheets),o.unsuspend)){var T=o.unsuspend;o.unsuspend=null,T()}},(o.imgBytes>kv?50:800)+i);return o.unsuspend=u,function(){o.unsuspend=null,clearTimeout(p),clearTimeout(E)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tp(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var ep=null;function tp(o,i){o.stylesheets=null,o.unsuspend!==null&&(o.count++,ep=new Map,i.forEach(c6,o),ep=null,Jf.call(o))}function c6(o,i){if(!(i.state.loading&4)){var u=ep.get(o);if(u)var p=u.get(null);else{u=new Map,ep.set(o,u);for(var E=o.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T<E.length;T++){var D=E[T];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(u.set(D.dataset.precedence,D),p=D)}p&&u.set(null,p)}E=i.instance,D=E.getAttribute("data-precedence"),T=u.get(D)||p,T===p&&u.set(null,E),u.set(D,E),this.count++,p=Jf.bind(this),E.addEventListener("load",p),E.addEventListener("error",p),T?T.parentNode.insertBefore(E,T.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(E,o.firstChild)),i.state.loading|=4}}var fu={$$typeof:C,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function u6(o,i,u,p,E,T,D,B,re){this.tag=1,this.containerInfo=o,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=$n(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$n(0),this.hiddenUpdates=$n(null),this.identifierPrefix=p,this.onUncaughtError=E,this.onCaughtError=T,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function Ck(o,i,u,p,E,T,D,B,re,me,Se,Te){return o=new u6(o,i,u,D,re,me,Se,Te,B),i=1,T===!0&&(i|=24),T=kn(3,null,null,i),o.current=T,T.stateNode=o,i=cg(),i.refCount++,o.pooledCache=i,i.refCount++,T.memoizedState={element:p,isDehydrated:u,cache:i},pg(T),o}function Ak(o){return o?(o=$s,o):$s}function Nk(o,i,u,p,E,T){E=Ak(E),p.context===null?p.context=E:p.pendingContext=E,p=Wo(i),p.payload={element:u},T=T===void 0?null:T,T!==null&&(p.callback=T),u=Yo(o,p,i),u!==null&&(En(u,o,i),Hc(u,o,i))}function kk(o,i){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var u=o.retryLane;o.retryLane=u!==0&&u<i?u:i}}function Iv(o,i){kk(o,i),(o=o.alternate)&&kk(o,i)}function Ik(o){if(o.tag===13||o.tag===31){var i=Bi(o,67108864);i!==null&&En(i,o,67108864),Iv(o,67108864)}}function Ok(o){if(o.tag===13||o.tag===31){var i=Mn();i=oe(i);var u=Bi(o,i);u!==null&&En(u,o,i),Iv(o,i)}}var rp=!0;function d6(o,i,u,p){var E=U.T;U.T=null;var T=G.p;try{G.p=2,Ov(o,i,u,p)}finally{G.p=T,U.T=E}}function f6(o,i,u,p){var E=U.T;U.T=null;var T=G.p;try{G.p=8,Ov(o,i,u,p)}finally{G.p=T,U.T=E}}function Ov(o,i,u,p){if(rp){var E=Dv(p);if(E===null)bv(o,i,p,np,u),Lk(o,p);else if(m6(E,o,i,u,p))p.stopPropagation();else if(Lk(o,p),i&4&&-1<p6.indexOf(o)){for(;E!==null;){var T=Yt(E);if(T!==null)switch(T.tag){case 3:if(T=T.stateNode,T.current.memoizedState.isDehydrated){var D=an(T.pendingLanes);if(D!==0){var B=T;for(B.pendingLanes|=2,B.entangledLanes|=2;D;){var re=1<<31-fr(D);B.entanglements[1]|=re,D&=~re}Na(T),(Lt&6)===0&&(Ff=_e()+500,iu(0))}}break;case 31:case 13:B=Bi(T,2),B!==null&&En(B,T,2),$f(),Iv(T,2)}if(T=Dv(p),T===null&&bv(o,i,p,np,u),T===E)break;E=T}E!==null&&p.stopPropagation()}else bv(o,i,p,null,u)}}function Dv(o){return o=Mh(o),Lv(o)}var np=null;function Lv(o){if(np=null,o=Dt(o),o!==null){var i=s(o);if(i===null)o=null;else{var u=i.tag;if(u===13){if(o=l(i),o!==null)return o;o=null}else if(u===31){if(o=c(i),o!==null)return o;o=null}else if(u===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return np=o,null}function Dk(o){switch(o){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(Ie()){case Oe:return 2;case Je:return 8;case at:case Rt:return 32;case Ot:return 268435456;default:return 32}default:return 32}}var Mv=!1,oi=null,ii=null,si=null,pu=new Map,mu=new Map,li=[],p6="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 Lk(o,i){switch(o){case"focusin":case"focusout":oi=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":si=null;break;case"pointerover":case"pointerout":pu.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":mu.delete(i.pointerId)}}function hu(o,i,u,p,E,T){return o===null||o.nativeEvent!==T?(o={blockedOn:i,domEventName:u,eventSystemFlags:p,nativeEvent:T,targetContainers:[E]},i!==null&&(i=Yt(i),i!==null&&Ik(i)),o):(o.eventSystemFlags|=p,i=o.targetContainers,E!==null&&i.indexOf(E)===-1&&i.push(E),o)}function m6(o,i,u,p,E){switch(i){case"focusin":return oi=hu(oi,o,i,u,p,E),!0;case"dragenter":return ii=hu(ii,o,i,u,p,E),!0;case"mouseover":return si=hu(si,o,i,u,p,E),!0;case"pointerover":var T=E.pointerId;return pu.set(T,hu(pu.get(T)||null,o,i,u,p,E)),!0;case"gotpointercapture":return T=E.pointerId,mu.set(T,hu(mu.get(T)||null,o,i,u,p,E)),!0}return!1}function Mk(o){var i=Dt(o.target);if(i!==null){var u=s(i);if(u!==null){if(i=u.tag,i===13){if(i=l(u),i!==null){o.blockedOn=i,ye(o.priority,function(){Ok(u)});return}}else if(i===31){if(i=c(u),i!==null){o.blockedOn=i,ye(o.priority,function(){Ok(u)});return}}else if(i===3&&u.stateNode.current.memoizedState.isDehydrated){o.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}o.blockedOn=null}function ap(o){if(o.blockedOn!==null)return!1;for(var i=o.targetContainers;0<i.length;){var u=Dv(o.nativeEvent);if(u===null){u=o.nativeEvent;var p=new u.constructor(u.type,u);Lh=p,u.target.dispatchEvent(p),Lh=null}else return i=Yt(u),i!==null&&Ik(i),o.blockedOn=u,!1;i.shift()}return!0}function Pk(o,i,u){ap(o)&&u.delete(i)}function h6(){Mv=!1,oi!==null&&ap(oi)&&(oi=null),ii!==null&&ap(ii)&&(ii=null),si!==null&&ap(si)&&(si=null),pu.forEach(Pk),mu.forEach(Pk)}function op(o,i){o.blockedOn===i&&(o.blockedOn=null,Mv||(Mv=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,h6)))}var ip=null;function jk(o){ip!==o&&(ip=o,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){ip===o&&(ip=null);for(var i=0;i<o.length;i+=3){var u=o[i],p=o[i+1],E=o[i+2];if(typeof p!="function"){if(Lv(p||u)===null)continue;break}var T=Yt(u);T!==null&&(o.splice(i,3),i-=3,Dg(T,{pending:!0,data:E,method:u.method,action:p},p,E))}}))}function dl(o){function i(re){return op(re,o)}oi!==null&&op(oi,o),ii!==null&&op(ii,o),si!==null&&op(si,o),pu.forEach(i),mu.forEach(i);for(var u=0;u<li.length;u++){var p=li[u];p.blockedOn===o&&(p.blockedOn=null)}for(;0<li.length&&(u=li[0],u.blockedOn===null);)Mk(u),u.blockedOn===null&&li.shift();if(u=(o.ownerDocument||o).$$reactFormReplay,u!=null)for(p=0;p<u.length;p+=3){var E=u[p],T=u[p+1],D=E[Be]||null;if(typeof T=="function")D||jk(u);else if(D){var B=null;if(T&&T.hasAttribute("formAction")){if(E=T,D=T[Be]||null)B=D.formAction;else if(Lv(E)!==null)continue}else B=D.action;typeof B=="function"?u[p+1]=B:(u.splice(p,3),p-=3),jk(u)}}}function Uk(){function o(T){T.canIntercept&&T.info==="react-transition"&&T.intercept({handler:function(){return new Promise(function(D){return E=D})},focusReset:"manual",scroll:"manual"})}function i(){E!==null&&(E(),E=null),p||setTimeout(u,20)}function u(){if(!p&&!navigation.transition){var T=navigation.currentEntry;T&&T.url!=null&&navigation.navigate(T.url,{state:T.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,E=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(u,100),function(){p=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),E!==null&&(E(),E=null)}}}function Pv(o){this._internalRoot=o}sp.prototype.render=Pv.prototype.render=function(o){var i=this._internalRoot;if(i===null)throw Error(n(409));var u=i.current,p=Mn();Nk(u,p,o,i,null,null)},sp.prototype.unmount=Pv.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var i=o.containerInfo;Nk(o.current,2,null,o,null,null),$f(),i[mt]=null}};function sp(o){this._internalRoot=o}sp.prototype.unstable_scheduleHydration=function(o){if(o){var i=ie();o={blockedOn:null,target:o,priority:i};for(var u=0;u<li.length&&i!==0&&i<li[u].priority;u++);li.splice(u,0,o),u===0&&Mk(o)}};var Fk=e.version;if(Fk!=="19.2.0")throw Error(n(527,Fk,"19.2.0"));G.findDOMNode=function(o){var i=o._reactInternals;if(i===void 0)throw typeof o.render=="function"?Error(n(188)):(o=Object.keys(o).join(","),Error(n(268,o)));return o=f(i),o=o!==null?m(o):null,o=o===null?null:o.stateNode,o};var g6={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lp.isDisabled&&lp.supportsFiber)try{or=lp.inject(g6),Mt=lp}catch{}}return vu.createRoot=function(o,i){if(!a(o))throw Error(n(299));var u=!1,p="",E=GN,T=WN,D=YN;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onUncaughtError!==void 0&&(E=i.onUncaughtError),i.onCaughtError!==void 0&&(T=i.onCaughtError),i.onRecoverableError!==void 0&&(D=i.onRecoverableError)),i=Ck(o,1,!1,null,null,u,p,null,E,T,D,Uk),o[mt]=i.current,vv(o),new Pv(i)},vu.hydrateRoot=function(o,i,u){if(!a(o))throw Error(n(299));var p=!1,E="",T=GN,D=WN,B=YN,re=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(E=u.identifierPrefix),u.onUncaughtError!==void 0&&(T=u.onUncaughtError),u.onCaughtError!==void 0&&(D=u.onCaughtError),u.onRecoverableError!==void 0&&(B=u.onRecoverableError),u.formState!==void 0&&(re=u.formState)),i=Ck(o,1,!0,i,u??null,p,E,re,T,D,B,Uk),i.context=Ak(null),u=i.current,p=Mn(),p=oe(p),E=Wo(p),E.callback=null,Yo(u,E,p),u=p,i.current.lanes=u,Xt(i,u),Na(i),o[mt]=i.current,vv(o),new sp(i)},vu.version="19.2.0",vu}var uO;function l7(){if(uO)return Mb.exports;uO=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Mb.exports=s7(),Mb.exports}var c7=l7();const u7=fc(c7);var dO="popstate";function d7(t={}){function e(n,a){let{pathname:s,search:l,hash:c}=n.location;return W_("",{pathname:s,search:l,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:od(a)}return p7(e,r,null,t)}function dr(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function qa(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function f7(){return Math.random().toString(36).substring(2,10)}function fO(t,e){return{usr:t.state,key:t.key,idx:e}}function W_(t,e,r=null,n){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?hc(e):e,state:r,key:e&&e.key||n||f7()}}function od({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function hc(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substring(n),t=t.substring(0,n)),t&&(e.pathname=t)}return e}function p7(t,e,r,n={}){let{window:a=document.defaultView,v5Compat:s=!1}=n,l=a.history,c="POP",d=null,f=m();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function m(){return(l.state||{idx:null}).idx}function h(){c="POP";let R=m(),x=R==null?null:R-f;f=R,d&&d({action:c,location:S.location,delta:x})}function v(R,x){c="PUSH";let _=W_(S.location,R,x);f=m()+1;let C=fO(_,f),N=S.createHref(_);try{l.pushState(C,"",N)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(N)}s&&d&&d({action:c,location:S.location,delta:1})}function y(R,x){c="REPLACE";let _=W_(S.location,R,x);f=m();let C=fO(_,f),N=S.createHref(_);l.replaceState(C,"",N),s&&d&&d({action:c,location:S.location,delta:0})}function w(R){return m7(R)}let S={get action(){return c},get location(){return t(a,l)},listen(R){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(dO,h),d=R,()=>{a.removeEventListener(dO,h),d=null}},createHref(R){return e(a,R)},createURL:w,encodeLocation(R){let x=w(R);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:v,replace:y,go(R){return l.go(R)}};return S}function m7(t,e=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),dr(r,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:od(t);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function W2(t,e,r="/"){return h7(t,e,r,!1)}function h7(t,e,r,n){let a=typeof e=="string"?hc(e):e,s=ko(a.pathname||"/",r);if(s==null)return null;let l=Y2(t);g7(l);let c=null;for(let d=0;c==null&&d<l.length;++d){let f=C7(s);c=T7(l[d],f,n)}return c}function Y2(t,e=[],r=[],n="",a=!1){let s=(l,c,d=a,f)=>{let m={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(n)&&d)return;dr(m.relativePath.startsWith(n),`Absolute route path "${m.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(n.length)}let h=Co([n,m.relativePath]),v=r.concat(m);l.children&&l.children.length>0&&(dr(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Y2(l.children,e,v,h,d)),!(l.path==null&&!l.index)&&e.push({path:h,score:w7(h,l.index),routesMeta:v})};return t.forEach((l,c)=>{if(l.path===""||!l.path?.includes("?"))s(l,c);else for(let d of K2(l.path))s(l,c,!0,d)}),e}function K2(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return a?[s,""]:[s];let l=K2(n.join("/")),c=[];return c.push(...l.map(d=>d===""?s:[s,d].join("/"))),a&&c.push(...l),c.map(d=>t.startsWith("/")&&d===""?"/":d)}function g7(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:_7(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var v7=/^:[\w-]+$/,b7=3,y7=2,E7=1,S7=10,x7=-2,pO=t=>t==="*";function w7(t,e){let r=t.split("/"),n=r.length;return r.some(pO)&&(n+=x7),e&&(n+=y7),r.filter(a=>!pO(a)).reduce((a,s)=>a+(v7.test(s)?b7:s===""?E7:S7),n)}function _7(t,e){return t.length===e.length&&t.slice(0,-1).every((n,a)=>n===e[a])?t[t.length-1]-e[e.length-1]:0}function T7(t,e,r=!1){let{routesMeta:n}=t,a={},s="/",l=[];for(let c=0;c<n.length;++c){let d=n[c],f=c===n.length-1,m=s==="/"?e:e.slice(s.length)||"/",h=hm({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},m),v=d.route;if(!h&&f&&r&&!n[n.length-1].route.index&&(h=hm({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!h)return null;Object.assign(a,h.params),l.push({params:a,pathname:Co([s,h.pathname]),pathnameBase:I7(Co([s,h.pathnameBase])),route:v}),h.pathnameBase!=="/"&&(s=Co([s,h.pathnameBase]))}return l}function hm(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=R7(t.path,t.caseSensitive,t.end),a=e.match(r);if(!a)return null;let s=a[0],l=s.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:n.reduce((f,{paramName:m,isOptional:h},v)=>{if(m==="*"){let w=c[v]||"";l=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const y=c[v];return h&&!y?f[m]=void 0:f[m]=(y||"").replace(/%2F/g,"/"),f},{}),pathname:s,pathnameBase:l,pattern:t}}function R7(t,e=!1,r=!0){qa(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let n=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,d)=>(n.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(n.push({paramName:"*"}),a+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":t!==""&&t!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),n]}function C7(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return qa(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function ko(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function A7(t,e="/"){let{pathname:r,search:n="",hash:a=""}=typeof t=="string"?hc(t):t;return{pathname:r?r.startsWith("/")?r:N7(r,e):e,search:O7(n),hash:D7(a)}}function N7(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Fb(t,e,r,n){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function k7(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Z2(t){let e=k7(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function X2(t,e,r,n=!1){let a;typeof t=="string"?a=hc(t):(a={...t},dr(!a.pathname||!a.pathname.includes("?"),Fb("?","pathname","search",a)),dr(!a.pathname||!a.pathname.includes("#"),Fb("#","pathname","hash",a)),dr(!a.search||!a.search.includes("#"),Fb("#","search","hash",a)));let s=t===""||a.pathname==="",l=s?"/":a.pathname,c;if(l==null)c=r;else{let h=e.length-1;if(!n&&l.startsWith("..")){let v=l.split("/");for(;v[0]==="..";)v.shift(),h-=1;a.pathname=v.join("/")}c=h>=0?e[h]:"/"}let d=A7(a,c),f=l&&l!=="/"&&l.endsWith("/"),m=(s||l===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(f||m)&&(d.pathname+="/"),d}var Co=t=>t.join("/").replace(/\/\/+/g,"/"),I7=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),O7=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,D7=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function L7(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Q2=["POST","PUT","PATCH","DELETE"];new Set(Q2);var M7=["GET",...Q2];new Set(M7);var gc=b.createContext(null);gc.displayName="DataRouter";var Bm=b.createContext(null);Bm.displayName="DataRouterState";b.createContext(!1);var J2=b.createContext({isTransitioning:!1});J2.displayName="ViewTransition";var P7=b.createContext(new Map);P7.displayName="Fetchers";var j7=b.createContext(null);j7.displayName="Await";var Ka=b.createContext(null);Ka.displayName="Navigation";var kd=b.createContext(null);kd.displayName="Location";var jo=b.createContext({outlet:null,matches:[],isDataRoute:!1});jo.displayName="Route";var pR=b.createContext(null);pR.displayName="RouteError";function U7(t,{relative:e}={}){dr(Id(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=b.useContext(Ka),{hash:a,pathname:s,search:l}=Od(t,{relative:e}),c=s;return r!=="/"&&(c=s==="/"?r:Co([r,s])),n.createHref({pathname:c,search:l,hash:a})}function Id(){return b.useContext(kd)!=null}function Uo(){return dr(Id(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(kd).location}var e$="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function t$(t){b.useContext(Ka).static||b.useLayoutEffect(t)}function vc(){let{isDataRoute:t}=b.useContext(jo);return t?X7():F7()}function F7(){dr(Id(),"useNavigate() may be used only in the context of a <Router> component.");let t=b.useContext(gc),{basename:e,navigator:r}=b.useContext(Ka),{matches:n}=b.useContext(jo),{pathname:a}=Uo(),s=JSON.stringify(Z2(n)),l=b.useRef(!1);return t$(()=>{l.current=!0}),b.useCallback((d,f={})=>{if(qa(l.current,e$),!l.current)return;if(typeof d=="number"){r.go(d);return}let m=X2(d,JSON.parse(s),a,f.relative==="path");t==null&&e!=="/"&&(m.pathname=m.pathname==="/"?e:Co([e,m.pathname])),(f.replace?r.replace:r.push)(m,f.state,f)},[e,r,s,a,t])}b.createContext(null);function Od(t,{relative:e}={}){let{matches:r}=b.useContext(jo),{pathname:n}=Uo(),a=JSON.stringify(Z2(r));return b.useMemo(()=>X2(t,JSON.parse(a),n,e==="path"),[t,a,n,e])}function z7(t,e){return r$(t,e)}function r$(t,e,r,n,a){dr(Id(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=b.useContext(Ka),{matches:l}=b.useContext(jo),c=l[l.length-1],d=c?c.params:{},f=c?c.pathname:"/",m=c?c.pathnameBase:"/",h=c&&c.route;{let _=h&&h.path||"";n$(f,!h||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
24
24
|
|
|
25
|
-
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let v=Uo(),y;if(e){let _=typeof e=="string"?hc(e):e;dr(m==="/"||_.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${_.pathname}" was given in the \`location\` prop.`),y=_}else y=v;let w=y.pathname||"/",S=w;if(m!=="/"){let _=m.replace(/^\//,"").split("/");S="/"+w.replace(/^\//,"").split("/").slice(_.length).join("/")}let R=W2(t,{pathname:S});qa(h||R!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),qa(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=V7(R&&R.map(_=>Object.assign({},_,{params:Object.assign({},d,_.params),pathname:Co([m,s.encodeLocation?s.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?m:Co([m,s.encodeLocation?s.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),l,r,n,a);return e&&x?b.createElement(kd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...y},navigationType:"POP"}},x):x}function $7(){let t=Z7(),e=L7(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",t),l=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:s},"ErrorBoundary")," or"," ",b.createElement("code",{style:s},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),r?b.createElement("pre",{style:a},r):null,l)}var B7=b.createElement($7,null),q7=class extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.unstable_onError?this.props.unstable_onError(t,e):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?b.createElement(jo.Provider,{value:this.props.routeContext},b.createElement(pR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function H7({routeContext:t,match:e,children:r}){let n=b.useContext(gc);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),b.createElement(jo.Provider,{value:t},r)}function V7(t,e=[],r=null,n=null,a=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let s=t,l=r?.errors;if(l!=null){let f=s.findIndex(m=>m.route.id&&l?.[m.route.id]!==void 0);dr(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,f+1))}let c=!1,d=-1;if(r)for(let f=0;f<s.length;f++){let m=s[f];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=f),m.route.id){let{loaderData:h,errors:v}=r,y=m.route.loader&&!h.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||y){c=!0,d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((f,m,h)=>{let v,y=!1,w=null,S=null;r&&(v=l&&m.route.id?l[m.route.id]:void 0,w=m.route.errorElement||B7,c&&(d<0&&h===0?(n$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,S=null):d===h&&(y=!0,S=m.route.hydrateFallbackElement||null)));let R=e.concat(s.slice(0,h+1)),x=()=>{let _;return v?_=w:y?_=S:m.route.Component?_=b.createElement(m.route.Component,null):m.route.element?_=m.route.element:_=f,b.createElement(H7,{match:m,routeContext:{outlet:f,matches:R,isDataRoute:r!=null},children:_})};return r&&(m.route.ErrorBoundary||m.route.errorElement||h===0)?b.createElement(q7,{location:r.location,revalidation:r.revalidation,component:w,error:v,children:x(),routeContext:{outlet:null,matches:R,isDataRoute:!0},unstable_onError:n}):x()},null)}function mR(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function G7(t){let e=b.useContext(gc);return dr(e,mR(t)),e}function W7(t){let e=b.useContext(Bm);return dr(e,mR(t)),e}function Y7(t){let e=b.useContext(jo);return dr(e,mR(t)),e}function hR(t){let e=Y7(t),r=e.matches[e.matches.length-1];return dr(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function K7(){return hR("useRouteId")}function Z7(){let t=b.useContext(pR),e=W7("useRouteError"),r=hR("useRouteError");return t!==void 0?t:e.errors?.[r]}function X7(){let{router:t}=G7("useNavigate"),e=hR("useNavigate"),r=b.useRef(!1);return t$(()=>{r.current=!0}),b.useCallback(async(a,s={})=>{qa(r.current,e$),r.current&&(typeof a=="number"?t.navigate(a):await t.navigate(a,{fromRouteId:e,...s}))},[t,e])}var mO={};function n$(t,e,r){!e&&!mO[t]&&(mO[t]=!0,qa(!1,r))}b.memo(Q7);function Q7({routes:t,future:e,state:r,unstable_onError:n}){return r$(t,void 0,r,n,e)}function a$(t){dr(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function J7({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:a,static:s=!1}){dr(!Id(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:a,static:s,future:{}}),[l,a,s]);typeof r=="string"&&(r=hc(r));let{pathname:d="/",search:f="",hash:m="",state:h=null,key:v="default"}=r,y=b.useMemo(()=>{let w=ko(d,l);return w==null?null:{location:{pathname:w,search:f,hash:m,state:h,key:v},navigationType:n}},[l,d,f,m,h,v,n]);return qa(y!=null,`<Router basename="${l}"> is not able to match the URL "${d}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:b.createElement(Ka.Provider,{value:c},b.createElement(kd.Provider,{children:e,value:y}))}function eY({children:t,location:e}){return z7(Y_(t),e)}function Y_(t,e=[]){let r=[];return b.Children.forEach(t,(n,a)=>{if(!b.isValidElement(n))return;let s=[...e,a];if(n.type===b.Fragment){r.push.apply(r,Y_(n.props.children,s));return}dr(n.type===a$,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),dr(!n.props.index||!n.props.children,"An index route cannot have child routes.");let l={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=Y_(n.props.children,s)),r.push(l)}),r}var Lp="get",Mp="application/x-www-form-urlencoded";function qm(t){return t!=null&&typeof t.tagName=="string"}function tY(t){return qm(t)&&t.tagName.toLowerCase()==="button"}function rY(t){return qm(t)&&t.tagName.toLowerCase()==="form"}function nY(t){return qm(t)&&t.tagName.toLowerCase()==="input"}function aY(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function oY(t,e){return t.button===0&&(!e||e==="_self")&&!aY(t)}var up=null;function iY(){if(up===null)try{new FormData(document.createElement("form"),0),up=!1}catch{up=!0}return up}var sY=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zb(t){return t!=null&&!sY.has(t)?(qa(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Mp}"`),null):t}function lY(t,e){let r,n,a,s,l;if(rY(t)){let c=t.getAttribute("action");n=c?ko(c,e):null,r=t.getAttribute("method")||Lp,a=zb(t.getAttribute("enctype"))||Mp,s=new FormData(t)}else if(tY(t)||nY(t)&&(t.type==="submit"||t.type==="image")){let c=t.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=t.getAttribute("formaction")||c.getAttribute("action");if(n=d?ko(d,e):null,r=t.getAttribute("formmethod")||c.getAttribute("method")||Lp,a=zb(t.getAttribute("formenctype"))||zb(c.getAttribute("enctype"))||Mp,s=new FormData(c,t),!iY()){let{name:f,type:m,value:h}=t;if(m==="image"){let v=f?`${f}.`:"";s.append(`${v}x`,"0"),s.append(`${v}y`,"0")}else f&&s.append(f,h)}}else{if(qm(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Lp,n=null,a=Mp,l=t}return s&&a==="text/plain"&&(l=s,s=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gR(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function cY(t,e,r){let n=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n.pathname==="/"?n.pathname=`_root.${r}`:e&&ko(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function uY(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dY(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function fY(t,e,r){let n=await Promise.all(t.map(async a=>{let s=e.routes[a.route.id];if(s){let l=await uY(s,r);return l.links?l.links():[]}return[]}));return gY(n.flat(1).filter(dY).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function hO(t,e,r,n,a,s){let l=(d,f)=>r[f]?d.route.id!==r[f].route.id:!0,c=(d,f)=>r[f].pathname!==d.pathname||r[f].route.path?.endsWith("*")&&r[f].params["*"]!==d.params["*"];return s==="assets"?e.filter((d,f)=>l(d,f)||c(d,f)):s==="data"?e.filter((d,f)=>{let m=n.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,f)||c(d,f))return!0;if(d.route.shouldRevalidate){let h=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function pY(t,e,{includeHydrateFallback:r}={}){return mY(t.map(n=>{let a=e.routes[n.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function mY(t){return[...new Set(t)]}function hY(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function gY(t,e){let r=new Set;return new Set(e),t.reduce((n,a)=>{let s=JSON.stringify(hY(a));return r.has(s)||(r.add(s),n.push({key:s,link:a})),n},[])}function o$(){let t=b.useContext(gc);return gR(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function vY(){let t=b.useContext(Bm);return gR(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var vR=b.createContext(void 0);vR.displayName="FrameworkContext";function i$(){let t=b.useContext(vR);return gR(t,"You must render this element inside a <HydratedRouter> element"),t}function bY(t,e){let r=b.useContext(vR),[n,a]=b.useState(!1),[s,l]=b.useState(!1),{onFocus:c,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:h}=e,v=b.useRef(null);b.useEffect(()=>{if(t==="render"&&l(!0),t==="viewport"){let S=x=>{x.forEach(_=>{l(_.isIntersecting)})},R=new IntersectionObserver(S,{threshold:.5});return v.current&&R.observe(v.current),()=>{R.disconnect()}}},[t]),b.useEffect(()=>{if(n){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[n]);let y=()=>{a(!0)},w=()=>{a(!1),l(!1)};return r?t!=="intent"?[s,v,{}]:[s,v,{onFocus:bu(c,y),onBlur:bu(d,w),onMouseEnter:bu(f,y),onMouseLeave:bu(m,w),onTouchStart:bu(h,y)}]:[!1,v,{}]}function bu(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function yY({page:t,...e}){let{router:r}=o$(),n=b.useMemo(()=>W2(r.routes,t,r.basename),[r.routes,t,r.basename]);return n?b.createElement(SY,{page:t,matches:n,...e}):null}function EY(t){let{manifest:e,routeModules:r}=i$(),[n,a]=b.useState([]);return b.useEffect(()=>{let s=!1;return fY(t,e,r).then(l=>{s||a(l)}),()=>{s=!0}},[t,e,r]),n}function SY({page:t,matches:e,...r}){let n=Uo(),{manifest:a,routeModules:s}=i$(),{basename:l}=o$(),{loaderData:c,matches:d}=vY(),f=b.useMemo(()=>hO(t,e,d,a,n,"data"),[t,e,d,a,n]),m=b.useMemo(()=>hO(t,e,d,a,n,"assets"),[t,e,d,a,n]),h=b.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let w=new Set,S=!1;if(e.forEach(x=>{let _=a.routes[x.route.id];!_||!_.hasLoader||(!f.some(C=>C.route.id===x.route.id)&&x.route.id in c&&s[x.route.id]?.shouldRevalidate||_.hasClientLoader?S=!0:w.add(x.route.id))}),w.size===0)return[];let R=cY(t,l,"data");return S&&w.size>0&&R.searchParams.set("_routes",e.filter(x=>w.has(x.route.id)).map(x=>x.route.id).join(",")),[R.pathname+R.search]},[l,c,n,a,f,e,t,s]),v=b.useMemo(()=>pY(m,a),[m,a]),y=EY(m);return b.createElement(b.Fragment,null,h.map(w=>b.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),v.map(w=>b.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),y.map(({key:w,link:S})=>b.createElement("link",{key:w,nonce:r.nonce,...S})))}function xY(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var s$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{s$&&(window.__reactRouterVersion="7.9.5")}catch{}function wY({basename:t,children:e,window:r}){let n=b.useRef();n.current==null&&(n.current=d7({window:r,v5Compat:!0}));let a=n.current,[s,l]=b.useState({action:a.action,location:a.location}),c=b.useCallback(d=>{b.startTransition(()=>l(d))},[l]);return b.useLayoutEffect(()=>a.listen(c),[a,c]),b.createElement(J7,{basename:t,children:e,location:s.location,navigationType:s.action,navigator:a})}var l$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,c$=b.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:a,reloadDocument:s,replace:l,state:c,target:d,to:f,preventScrollReset:m,viewTransition:h,...v},y){let{basename:w}=b.useContext(Ka),S=typeof f=="string"&&l$.test(f),R,x=!1;if(typeof f=="string"&&S&&(R=f,s$))try{let L=new URL(window.location.href),M=f.startsWith("//")?new URL(L.protocol+f):new URL(f),P=ko(M.pathname,w);M.origin===L.origin&&P!=null?f=P+M.search+M.hash:x=!0}catch{qa(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let _=U7(f,{relative:a}),[C,N,k]=bY(n,v),A=CY(f,{replace:l,state:c,target:d,preventScrollReset:m,relative:a,viewTransition:h});function I(L){e&&e(L),L.defaultPrevented||A(L)}let O=b.createElement("a",{...v,...k,href:R||_,onClick:x||s?e:I,ref:xY(y,N),target:d,"data-discover":!S&&r==="render"?"true":void 0});return C&&!S?b.createElement(b.Fragment,null,O,b.createElement(yY,{page:_})):O});c$.displayName="Link";var _Y=b.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:a=!1,style:s,to:l,viewTransition:c,children:d,...f},m){let h=Od(l,{relative:f.relative}),v=Uo(),y=b.useContext(Bm),{navigator:w,basename:S}=b.useContext(Ka),R=y!=null&&OY(h)&&c===!0,x=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,_=v.pathname,C=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;r||(_=_.toLowerCase(),C=C?C.toLowerCase():null,x=x.toLowerCase()),C&&S&&(C=ko(C,S)||C);const N=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let k=_===x||!a&&_.startsWith(x)&&_.charAt(N)==="/",A=C!=null&&(C===x||!a&&C.startsWith(x)&&C.charAt(x.length)==="/"),I={isActive:k,isPending:A,isTransitioning:R},O=k?e:void 0,L;typeof n=="function"?L=n(I):L=[n,k?"active":null,A?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let M=typeof s=="function"?s(I):s;return b.createElement(c$,{...f,"aria-current":O,className:L,ref:m,style:M,to:l,viewTransition:c},typeof d=="function"?d(I):d)});_Y.displayName="NavLink";var TY=b.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:a,state:s,method:l=Lp,action:c,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:h,...v},y)=>{let w=kY(),S=IY(c,{relative:f}),R=l.toLowerCase()==="get"?"get":"post",x=typeof c=="string"&&l$.test(c),_=C=>{if(d&&d(C),C.defaultPrevented)return;C.preventDefault();let N=C.nativeEvent.submitter,k=N?.getAttribute("formmethod")||l;w(N||C.currentTarget,{fetcherKey:e,method:k,navigate:r,replace:a,state:s,relative:f,preventScrollReset:m,viewTransition:h})};return b.createElement("form",{ref:y,method:R,action:S,onSubmit:n?d:_,...v,"data-discover":!x&&t==="render"?"true":void 0})});TY.displayName="Form";function RY(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function u$(t){let e=b.useContext(gc);return dr(e,RY(t)),e}function CY(t,{target:e,replace:r,state:n,preventScrollReset:a,relative:s,viewTransition:l}={}){let c=vc(),d=Uo(),f=Od(t,{relative:s});return b.useCallback(m=>{if(oY(m,e)){m.preventDefault();let h=r!==void 0?r:od(d)===od(f);c(t,{replace:h,state:n,preventScrollReset:a,relative:s,viewTransition:l})}},[d,c,f,r,n,e,t,a,s,l])}var AY=0,NY=()=>`__${String(++AY)}__`;function kY(){let{router:t}=u$("useSubmit"),{basename:e}=b.useContext(Ka),r=K7();return b.useCallback(async(n,a={})=>{let{action:s,method:l,encType:c,formData:d,body:f}=lY(n,e);if(a.navigate===!1){let m=a.fetcherKey||NY();await t.fetch(m,r,a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||c,flushSync:a.flushSync})}else await t.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[t,e,r])}function IY(t,{relative:e}={}){let{basename:r}=b.useContext(Ka),n=b.useContext(jo);dr(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),s={...Od(t||".",{relative:e})},l=Uo();if(t==null){s.search=l.search;let c=new URLSearchParams(s.search),d=c.getAll("index");if(d.some(m=>m==="")){c.delete("index"),d.filter(h=>h).forEach(h=>c.append("index",h));let m=c.toString();s.search=m?`?${m}`:""}}return(!t||t===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Co([r,s.pathname])),od(s)}function OY(t,{relative:e}={}){let r=b.useContext(J2);dr(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=u$("useViewTransitionState"),a=Od(t,{relative:e});if(!r.isTransitioning)return!1;let s=ko(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=ko(r.nextLocation.pathname,n)||r.nextLocation.pathname;return hm(a.pathname,l)!=null||hm(a.pathname,s)!=null}var bc=G2();const d$=fc(bc);function gO(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ha(...t){return e=>{let r=!1;const n=t.map(a=>{const s=gO(a,e);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a<n.length;a++){const s=n[a];typeof s=="function"?s():gO(t[a],null)}}}}function Nt(...t){return b.useCallback(Ha(...t),t)}var DY=Symbol.for("react.lazy"),gm=$m[" use ".trim().toString()];function LY(t){return typeof t=="object"&&t!==null&&"then"in t}function f$(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===DY&&"_payload"in t&&LY(t._payload)}function p$(t){const e=MY(t),r=b.forwardRef((n,a)=>{let{children:s,...l}=n;f$(s)&&typeof gm=="function"&&(s=gm(s._payload));const c=b.Children.toArray(s),d=c.find(jY);if(d){const f=d.props.children,m=c.map(h=>h===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...l,ref:a,children:b.isValidElement(f)?b.cloneElement(f,void 0,m):null})}return g.jsx(e,{...l,ref:a,children:s})});return r.displayName=`${t}.Slot`,r}var m$=p$("Slot");function MY(t){const e=b.forwardRef((r,n)=>{let{children:a,...s}=r;if(f$(a)&&typeof gm=="function"&&(a=gm(a._payload)),b.isValidElement(a)){const l=FY(a),c=UY(s,a.props);return a.type!==b.Fragment&&(c.ref=n?Ha(n,l):l),b.cloneElement(a,c)}return b.Children.count(a)>1?b.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var PY=Symbol("radix.slottable");function jY(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===PY}function UY(t,e){const r={...e};for(const n in e){const a=t[n],s=e[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...c)=>{const d=s(...c);return a(...c),d}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...t,...r}}function FY(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function h$(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=h$(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function g$(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=h$(t))&&(n&&(n+=" "),n+=e);return n}const vO=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,bO=g$,v$=(t,e)=>r=>{var n;if(e?.variants==null)return bO(t,r?.class,r?.className);const{variants:a,defaultVariants:s}=e,l=Object.keys(a).map(f=>{const m=r?.[f],h=s?.[f];if(m===null)return null;const v=vO(m)||vO(h);return a[f][v]}),c=r&&Object.entries(r).reduce((f,m)=>{let[h,v]=m;return v===void 0||(f[h]=v),f},{}),d=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((f,m)=>{let{class:h,className:v,...y}=m;return Object.entries(y).every(w=>{let[S,R]=w;return Array.isArray(R)?R.includes({...s,...c}[S]):{...s,...c}[S]===R})?[...f,h,v]:f},[]);return bO(t,l,d,r?.class,r?.className)},zY=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},$Y=(t,e)=>({classGroupId:t,validator:e}),b$=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),vm="-",yO=[],BY="arbitrary..",qY=t=>{const e=VY(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return HY(l);const c=l.split(vm),d=c[0]===""&&c.length>1?1:0;return y$(c,d,e)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=n[l],f=r[l];return d?f?zY(f,d):d:f||yO}return r[l]||yO}}},y$=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const a=t[e],s=r.nextPart.get(a);if(s){const f=y$(t,e+1,s);if(f)return f}const l=r.validators;if(l===null)return;const c=e===0?t.join(vm):t.slice(e).join(vm),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(c))return m.classGroupId}},HY=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?BY+n:void 0})(),VY=t=>{const{theme:e,classGroups:r}=t;return GY(r,e)},GY=(t,e)=>{const r=b$();for(const n in t){const a=t[n];bR(a,r,n,e)}return r},bR=(t,e,r,n)=>{const a=t.length;for(let s=0;s<a;s++){const l=t[s];WY(l,e,r,n)}},WY=(t,e,r,n)=>{if(typeof t=="string"){YY(t,e,r);return}if(typeof t=="function"){KY(t,e,r,n);return}ZY(t,e,r,n)},YY=(t,e,r)=>{const n=t===""?e:E$(e,t);n.classGroupId=r},KY=(t,e,r,n)=>{if(XY(t)){bR(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push($Y(r,t))},ZY=(t,e,r,n)=>{const a=Object.entries(t),s=a.length;for(let l=0;l<s;l++){const[c,d]=a[l];bR(d,E$(e,c),r,n)}},E$=(t,e)=>{let r=t;const n=e.split(vm),a=n.length;for(let s=0;s<a;s++){const l=n[s];let c=r.nextPart.get(l);c||(c=b$(),r.nextPart.set(l,c)),r=c}return r},XY=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,QY=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const a=(s,l)=>{r[s]=l,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(s){let l=r[s];if(l!==void 0)return l;if((l=n[s])!==void 0)return a(s,l),l},set(s,l){s in r?r[s]=l:a(s,l)}}},K_="!",EO=":",JY=[],SO=(t,e,r,n,a)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),eK=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=a=>{const s=[];let l=0,c=0,d=0,f;const m=a.length;for(let S=0;S<m;S++){const R=a[S];if(l===0&&c===0){if(R===EO){s.push(a.slice(d,S)),d=S+1;continue}if(R==="/"){f=S;continue}}R==="["?l++:R==="]"?l--:R==="("?c++:R===")"&&c--}const h=s.length===0?a:a.slice(d);let v=h,y=!1;h.endsWith(K_)?(v=h.slice(0,-1),y=!0):h.startsWith(K_)&&(v=h.slice(1),y=!0);const w=f&&f>d?f-d:void 0;return SO(s,y,v,w)};if(e){const a=e+EO,s=n;n=l=>l.startsWith(a)?s(l.slice(a.length)):SO(JY,!1,l,void 0,!0)}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},tK=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let a=[];for(let s=0;s<r.length;s++){const l=r[s],c=l[0]==="[",d=e.has(l);c||d?(a.length>0&&(a.sort(),n.push(...a),a=[]),n.push(l)):a.push(l)}return a.length>0&&(a.sort(),n.push(...a)),n}},rK=t=>({cache:QY(t.cacheSize),parseClassName:eK(t),sortModifiers:tK(t),...qY(t)}),nK=/\s+/,aK=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=e,l=[],c=t.trim().split(nK);let d="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{isExternal:h,modifiers:v,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:S}=r(m);if(h){d=m+(d.length>0?" "+d:d);continue}let R=!!S,x=n(R?w.substring(0,S):w);if(!x){if(!R){d=m+(d.length>0?" "+d:d);continue}if(x=n(w),!x){d=m+(d.length>0?" "+d:d);continue}R=!1}const _=v.length===0?"":v.length===1?v[0]:s(v).join(":"),C=y?_+K_:_,N=C+x;if(l.indexOf(N)>-1)continue;l.push(N);const k=a(x,R);for(let A=0;A<k.length;++A){const I=k[A];l.push(C+I)}d=m+(d.length>0?" "+d:d)}return d},oK=(...t)=>{let e=0,r,n,a="";for(;e<t.length;)(r=t[e++])&&(n=S$(r))&&(a&&(a+=" "),a+=n);return a},S$=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=S$(t[n]))&&(r&&(r+=" "),r+=e);return r},iK=(t,...e)=>{let r,n,a,s;const l=d=>{const f=e.reduce((m,h)=>h(m),t());return r=rK(f),n=r.cache.get,a=r.cache.set,s=c,c(d)},c=d=>{const f=n(d);if(f)return f;const m=aK(d,r);return a(d,m),m};return s=l,(...d)=>s(oK(...d))},sK=[],Ir=t=>{const e=r=>r[t]||sK;return e.isThemeGetter=!0,e},x$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,w$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lK=/^\d+\/\d+$/,cK=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uK=/\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$/,dK=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fK=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pK=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fl=t=>lK.test(t),vt=t=>!!t&&!Number.isNaN(Number(t)),ui=t=>!!t&&Number.isInteger(Number(t)),$b=t=>t.endsWith("%")&&vt(t.slice(0,-1)),vo=t=>cK.test(t),mK=()=>!0,hK=t=>uK.test(t)&&!dK.test(t),_$=()=>!1,gK=t=>fK.test(t),vK=t=>pK.test(t),bK=t=>!Ge(t)&&!We(t),yK=t=>yc(t,C$,_$),Ge=t=>x$.test(t),ts=t=>yc(t,A$,hK),Bb=t=>yc(t,_K,vt),xO=t=>yc(t,T$,_$),EK=t=>yc(t,R$,vK),dp=t=>yc(t,N$,gK),We=t=>w$.test(t),yu=t=>Ec(t,A$),SK=t=>Ec(t,TK),wO=t=>Ec(t,T$),xK=t=>Ec(t,C$),wK=t=>Ec(t,R$),fp=t=>Ec(t,N$,!0),yc=(t,e,r)=>{const n=x$.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},Ec=(t,e,r=!1)=>{const n=w$.exec(t);return n?n[1]?e(n[1]):r:!1},T$=t=>t==="position"||t==="percentage",R$=t=>t==="image"||t==="url",C$=t=>t==="length"||t==="size"||t==="bg-size",A$=t=>t==="length",_K=t=>t==="number",TK=t=>t==="family-name",N$=t=>t==="shadow",RK=()=>{const t=Ir("color"),e=Ir("font"),r=Ir("text"),n=Ir("font-weight"),a=Ir("tracking"),s=Ir("leading"),l=Ir("breakpoint"),c=Ir("container"),d=Ir("spacing"),f=Ir("radius"),m=Ir("shadow"),h=Ir("inset-shadow"),v=Ir("text-shadow"),y=Ir("drop-shadow"),w=Ir("blur"),S=Ir("perspective"),R=Ir("aspect"),x=Ir("ease"),_=Ir("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...N(),We,Ge],A=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],O=()=>[We,Ge,d],L=()=>[fl,"full","auto",...O()],M=()=>[ui,"none","subgrid",We,Ge],P=()=>["auto",{span:["full",ui,We,Ge]},ui,We,Ge],Y=()=>[ui,"auto",We,Ge],Q=()=>["auto","min","max","fr",We,Ge],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...O()],G=()=>[fl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],H=()=>[t,We,Ge],X=()=>[...N(),wO,xO,{position:[We,Ge]}],ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",xK,yK,{size:[We,Ge]}],q=()=>[$b,yu,ts],$=()=>["","none","full",f,We,Ge],W=()=>["",vt,yu,ts],te=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>[vt,$b,wO,xO],Z=()=>["","none",w,We,Ge],ne=()=>["none",vt,We,Ge],V=()=>["none",vt,We,Ge],de=()=>[vt,We,Ge],fe=()=>[fl,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[vo],breakpoint:[vo],color:[mK],container:[vo],"drop-shadow":[vo],ease:["in","out","in-out"],font:[bK],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[vo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[vo],shadow:[vo],spacing:["px",vt],text:[vo],"text-shadow":[vo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fl,Ge,We,R]}],container:["container"],columns:[{columns:[vt,Ge,We,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],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:k()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[ui,"auto",We,Ge]}],basis:[{basis:[fl,"full","auto",c,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[vt,fl,"auto","initial","none",Ge]}],grow:[{grow:["",vt,We,Ge]}],shrink:[{shrink:["",vt,We,Ge]}],order:[{order:[ui,"first","last","none",We,Ge]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[c,"screen",...G()]}],"min-w":[{"min-w":[c,"screen","none",...G()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,yu,ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,We,Bb]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$b,Ge]}],"font-family":[{font:[SK,Ge,e]}],"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:[a,We,Ge]}],"line-clamp":[{"line-clamp":[vt,"none",We,Bb]}],leading:[{leading:[s,...O()]}],"list-image":[{"list-image":["none",We,Ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",We,Ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[vt,"from-font","auto",We,ts]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[vt,"auto",We,Ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",We,Ge]}],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",We,Ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ui,We,Ge],radial:["",We,Ge],conic:[ui,We,Ge]},wK,EK]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[vt,We,Ge]}],"outline-w":[{outline:["",vt,yu,ts]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",m,fp,dp]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",h,fp,dp]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[vt,ts]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",v,fp,dp]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[vt,We,Ge]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],"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":[vt]}],"mask-image-linear-from-pos":[{"mask-linear-from":j()}],"mask-image-linear-to-pos":[{"mask-linear-to":j()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":j()}],"mask-image-t-to-pos":[{"mask-t-to":j()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":j()}],"mask-image-r-to-pos":[{"mask-r-to":j()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":j()}],"mask-image-b-to-pos":[{"mask-b-to":j()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":j()}],"mask-image-l-to-pos":[{"mask-l-to":j()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":j()}],"mask-image-x-to-pos":[{"mask-x-to":j()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":j()}],"mask-image-y-to-pos":[{"mask-y-to":j()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[We,Ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":j()}],"mask-image-radial-to-pos":[{"mask-radial-to":j()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":N()}],"mask-image-conic-pos":[{"mask-conic":[vt]}],"mask-image-conic-from-pos":[{"mask-conic-from":j()}],"mask-image-conic-to-pos":[{"mask-conic-to":j()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",We,Ge]}],filter:[{filter:["","none",We,Ge]}],blur:[{blur:Z()}],brightness:[{brightness:[vt,We,Ge]}],contrast:[{contrast:[vt,We,Ge]}],"drop-shadow":[{"drop-shadow":["","none",y,fp,dp]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",vt,We,Ge]}],"hue-rotate":[{"hue-rotate":[vt,We,Ge]}],invert:[{invert:["",vt,We,Ge]}],saturate:[{saturate:[vt,We,Ge]}],sepia:[{sepia:["",vt,We,Ge]}],"backdrop-filter":[{"backdrop-filter":["","none",We,Ge]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[vt,We,Ge]}],"backdrop-contrast":[{"backdrop-contrast":[vt,We,Ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",vt,We,Ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[vt,We,Ge]}],"backdrop-invert":[{"backdrop-invert":["",vt,We,Ge]}],"backdrop-opacity":[{"backdrop-opacity":[vt,We,Ge]}],"backdrop-saturate":[{"backdrop-saturate":[vt,We,Ge]}],"backdrop-sepia":[{"backdrop-sepia":["",vt,We,Ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",We,Ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[vt,"initial",We,Ge]}],ease:[{ease:["linear","initial",x,We,Ge]}],delay:[{delay:[vt,We,Ge]}],animate:[{animate:["none",_,We,Ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,We,Ge]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:V()}],"scale-x":[{"scale-x":V()}],"scale-y":[{"scale-y":V()}],"scale-z":[{"scale-z":V()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[We,Ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",We,Ge]}],"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":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",We,Ge]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[vt,yu,ts,Bb]}],stroke:[{stroke:["none",...H()]}],"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"]}},CK=iK(RK);function De(...t){return CK(g$(t))}const AK=v$("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 Va({className:t,variant:e,asChild:r=!1,...n}){const a=r?m$:"span";return g.jsx(a,{"data-slot":"badge",className:De(AK({variant:e}),t),...n})}const NK=v$("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-full 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-full gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-full px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function tt({className:t,variant:e,size:r,asChild:n=!1,...a}){const s=n?m$:"button";return g.jsx(s,{"data-slot":"button",className:De(NK({variant:e,size:r,className:t})),...a})}var kK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fo=kK.reduce((t,e)=>{const r=p$(`Primitive.${e}`),n=b.forwardRef((a,s)=>{const{asChild:l,...c}=a,d=l?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...c,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),IK="Label",k$=b.forwardRef((t,e)=>g.jsx(Fo.label,{...t,ref:e,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));k$.displayName=IK;var OK=k$;function lr({className:t,...e}){return g.jsx(OK,{"data-slot":"label",className:De("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",t),...e})}function yR({message:t,className:e="",vertical:r,noBorder:n}){return g.jsx("div",{className:De(`mt-2 rounded-md p-6 ${e}`,!n&&"border"),children:g.jsxs("p",{className:De("text-sm text-muted-foreground flex items-center gap-4",r&&"flex-col"),children:[g.jsx("svg",{width:"40",height:"40",viewBox:"0 0 273 273",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",children:g.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:g.jsxs("g",{transform:"translate(5.320900, 5.320900)",fillRule:"nonzero",className:"stroke-black dark:stroke-white",strokeWidth:"4",children:[g.jsx("path",{d:"M49.953025,-2.10854389 C63.26892,-2.21867124 76.6185256,2.70621155 86.9019463,12.6653164 L86.9019463,12.6653164 L87.505627,13.2592944 C97.5154947,23.2654892 102.640454,36.3074513 102.880738,49.4222247 C103.08932,77.4533067 113.877287,105.391753 135.242867,126.757333 C156.613383,148.127849 184.559216,158.914875 212.568138,159.119313 L212.568138,159.119313 L213.212264,159.134159 C225.843948,159.517566 238.363557,164.434972 248.121998,173.886137 L248.121998,173.886137 L248.725621,174.480088 C258.982114,184.732164 264.11035,198.171134 264.11035,211.6101 C264.11035,225.04592 258.984514,238.481745 248.732867,248.732867 C238.592792,258.872942 225.336706,263.997882 212.046872,264.107794 C198.731075,264.21792 185.381569,259.293085 175.098248,249.334078 L175.098248,249.334078 L174.494602,248.740134 C163.75802,238.008189 158.640853,223.784027 159.143413,209.719372 C158.258245,182.640933 147.489786,155.83332 126.828333,135.171867 C106.351297,114.694831 79.8363505,103.934873 53.0237258,102.891841 L53.0237258,102.891841 L52.2811438,102.865674 C38.4791718,103.347421 24.5325234,98.4328111 13.8776628,88.1140866 L13.8776628,88.1140866 L13.2739843,87.5201168 C3.12895117,77.3789607 -1.9984796,64.1195994 -2.10841888,50.8264755 C-2.21854669,37.5105567 2.70635908,24.1609269 12.6655135,13.8774565 L12.6655135,13.8774565 L13.2594878,13.2737797 C23.4005926,3.12880025 36.659927,-1.99860507 49.953025,-2.10854389 Z"}),g.jsx("circle",{cx:"50",cy:"212.0001",r:"52.5"}),g.jsx("circle",{cx:"212.0001",cy:"50",r:"52.5"})]})})}),t]})})}function I$({className:t,color:e,children:r,grayscaled:n=!1}){const a=b.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[1]||"0")}return n?0:.2},[e,n]),s=b.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[0]||"0.5")}return n?.3:.4},[e,n]),l=b.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[2]||"0")}return Math.floor(Math.random()*360)},[e]),c=b.useMemo(()=>e||`oklch(${Math.min(s,1)} ${a} ${l})`,[l,a,s]),d=b.useMemo(()=>`oklch(${Math.min(s*2,1)} ${a} ${l})`,[l,a,s,e]),f=b.useMemo(()=>Math.floor(Math.random()*360),[l]),m=b.useMemo(()=>"1000%",[]);return g.jsx("section",{className:De("relative w-full h-full overflow-hidden",t),style:{background:`${d}`},children:g.jsxs("div",{className:"isolate relative w-full h-full",children:[g.jsx("div",{className:"noise w-full h-full",style:{background:`linear-gradient(${f}deg, ${c}, transparent), url(https://grainy-gradients.vercel.app/noise.svg)`,filter:`contrast(120%) brightness(${m})`}}),r&&g.jsx("div",{className:"relative z-10 w-full h-full",children:r})]})})}function He(t,e,{checkForDefaultPrevented:r=!0}={}){return function(a){if(t?.(a),r===!1||!a.defaultPrevented)return e?.(a)}}function DK(t,e){const r=b.createContext(e),n=s=>{const{children:l,...c}=s,d=b.useMemo(()=>c,Object.values(c));return g.jsx(r.Provider,{value:d,children:l})};n.displayName=t+"Provider";function a(s){const l=b.useContext(r);if(l)return l;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[n,a]}function Za(t,e=[]){let r=[];function n(s,l){const c=b.createContext(l),d=r.length;r=[...r,l];const f=h=>{const{scope:v,children:y,...w}=h,S=v?.[t]?.[d]||c,R=b.useMemo(()=>w,Object.values(w));return g.jsx(S.Provider,{value:R,children:y})};f.displayName=s+"Provider";function m(h,v){const y=v?.[t]?.[d]||c,w=b.useContext(y);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[f,m]}const a=()=>{const s=r.map(l=>b.createContext(l));return function(c){const d=c?.[t]||s;return b.useMemo(()=>({[`__scope${t}`]:{...c,[t]:d}}),[c,d])}};return a.scopeName=t,[n,LK(a,...e)]}function LK(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const l=n.reduce((c,{useScope:d,scopeName:f})=>{const h=d(s)[`__scope${f}`];return{...c,...h}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:l}),[l])}};return r.scopeName=e.scopeName,r}var nn=globalThis?.document?b.useLayoutEffect:()=>{},MK=$m[" useInsertionEffect ".trim().toString()]||nn;function _i({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[a,s,l]=PK({defaultProp:e,onChange:r}),c=t!==void 0,d=c?t:a;{const m=b.useRef(t!==void 0);b.useEffect(()=>{const h=m.current;h!==c&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${c?"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.`),m.current=c},[c,n])}const f=b.useCallback(m=>{if(c){const h=jK(m)?m(t):m;h!==t&&l.current?.(h)}else s(m)},[c,t,s,l]);return[d,f]}function PK({defaultProp:t,onChange:e}){const[r,n]=b.useState(t),a=b.useRef(r),s=b.useRef(e);return MK(()=>{s.current=e},[e]),b.useEffect(()=>{a.current!==r&&(s.current?.(r),a.current=r)},[r,a]),[r,n,s]}function jK(t){return typeof t=="function"}function O$(t){const e=b.useRef({value:t,previous:t});return b.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function D$(t){const[e,r]=b.useState(void 0);return nn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let l,c;if("borderBoxSize"in s){const d=s.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,c=f.blockSize}else l=t.offsetWidth,c=t.offsetHeight;r({width:l,height:c})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function Ss(t){const e=UK(t),r=b.forwardRef((n,a)=>{const{children:s,...l}=n,c=b.Children.toArray(s),d=c.find(zK);if(d){const f=d.props.children,m=c.map(h=>h===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...l,ref:a,children:b.isValidElement(f)?b.cloneElement(f,void 0,m):null})}return g.jsx(e,{...l,ref:a,children:s})});return r.displayName=`${t}.Slot`,r}function UK(t){const e=b.forwardRef((r,n)=>{const{children:a,...s}=r;if(b.isValidElement(a)){const l=BK(a),c=$K(s,a.props);return a.type!==b.Fragment&&(c.ref=n?Ha(n,l):l),b.cloneElement(a,c)}return b.Children.count(a)>1?b.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var L$=Symbol("radix.slottable");function FK(t){const e=({children:r})=>g.jsx(g.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=L$,e}function zK(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===L$}function $K(t,e){const r={...e};for(const n in e){const a=t[n],s=e[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...c)=>{const d=s(...c);return a(...c),d}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...t,...r}}function BK(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var qK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],bt=qK.reduce((t,e)=>{const r=Ss(`Primitive.${e}`),n=b.forwardRef((a,s)=>{const{asChild:l,...c}=a,d=l?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...c,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function M$(t,e){t&&bc.flushSync(()=>t.dispatchEvent(e))}var Hm="Switch",[HK]=Za(Hm),[VK,GK]=HK(Hm),P$=b.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:a,defaultChecked:s,required:l,disabled:c,value:d="on",onCheckedChange:f,form:m,...h}=t,[v,y]=b.useState(null),w=Nt(e,C=>y(C)),S=b.useRef(!1),R=v?m||!!v.closest("form"):!0,[x,_]=_i({prop:a,defaultProp:s??!1,onChange:f,caller:Hm});return g.jsxs(VK,{scope:r,checked:x,disabled:c,children:[g.jsx(bt.button,{type:"button",role:"switch","aria-checked":x,"aria-required":l,"data-state":z$(x),"data-disabled":c?"":void 0,disabled:c,value:d,...h,ref:w,onClick:He(t.onClick,C=>{_(N=>!N),R&&(S.current=C.isPropagationStopped(),S.current||C.stopPropagation())})}),R&&g.jsx(F$,{control:v,bubbles:!S.current,name:n,value:d,checked:x,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});P$.displayName=Hm;var j$="SwitchThumb",U$=b.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,a=GK(j$,r);return g.jsx(bt.span,{"data-state":z$(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:e})});U$.displayName=j$;var WK="SwitchBubbleInput",F$=b.forwardRef(({__scopeSwitch:t,control:e,checked:r,bubbles:n=!0,...a},s)=>{const l=b.useRef(null),c=Nt(l,s),d=O$(r),f=D$(e);return b.useEffect(()=>{const m=l.current;if(!m)return;const h=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(h,"checked").set;if(d!==r&&y){const w=new Event("click",{bubbles:n});y.call(m,r),m.dispatchEvent(w)}},[d,r,n]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:c,style:{...a.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});F$.displayName=WK;function z$(t){return t?"checked":"unchecked"}var $$=P$,YK=U$;function ER({ref:t,className:e,...r}){return g.jsx($$,{className:De("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...r,ref:t,children:g.jsx(YK,{className:De("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})}ER.displayName=$$.displayName;function Ga(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...r)=>e.current?.(...r),[])}function KK(t,e=globalThis?.document){const r=Ga(t);b.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var ZK="DismissableLayer",Z_="dismissableLayer.update",XK="dismissableLayer.pointerDownOutside",QK="dismissableLayer.focusOutside",_O,B$=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sc=b.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=t,f=b.useContext(B$),[m,h]=b.useState(null),v=m?.ownerDocument??globalThis?.document,[,y]=b.useState({}),w=Nt(e,I=>h(I)),S=Array.from(f.layers),[R]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=S.indexOf(R),_=m?S.indexOf(m):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,N=_>=x,k=tZ(I=>{const O=I.target,L=[...f.branches].some(M=>M.contains(O));!N||L||(a?.(I),l?.(I),I.defaultPrevented||c?.())},v),A=rZ(I=>{const O=I.target;[...f.branches].some(M=>M.contains(O))||(s?.(I),l?.(I),I.defaultPrevented||c?.())},v);return KK(I=>{_===f.layers.size-1&&(n?.(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},v),b.useEffect(()=>{if(m)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(_O=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),TO(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=_O)}},[m,v,r,f]),b.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),TO())},[m,f]),b.useEffect(()=>{const I=()=>y({});return document.addEventListener(Z_,I),()=>document.removeEventListener(Z_,I)},[]),g.jsx(bt.div,{...d,ref:w,style:{pointerEvents:C?N?"auto":"none":void 0,...t.style},onFocusCapture:He(t.onFocusCapture,A.onFocusCapture),onBlurCapture:He(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:He(t.onPointerDownCapture,k.onPointerDownCapture)})});Sc.displayName=ZK;var JK="DismissableLayerBranch",eZ=b.forwardRef((t,e)=>{const r=b.useContext(B$),n=b.useRef(null),a=Nt(e,n);return b.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),g.jsx(bt.div,{...t,ref:a})});eZ.displayName=JK;function tZ(t,e=globalThis?.document){const r=Ga(t),n=b.useRef(!1),a=b.useRef(()=>{});return b.useEffect(()=>{const s=c=>{if(c.target&&!n.current){let d=function(){q$(XK,r,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(e.removeEventListener("click",a.current),a.current=d,e.addEventListener("click",a.current,{once:!0})):d()}else e.removeEventListener("click",a.current);n.current=!1},l=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),e.removeEventListener("pointerdown",s),e.removeEventListener("click",a.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function rZ(t,e=globalThis?.document){const r=Ga(t),n=b.useRef(!1);return b.useEffect(()=>{const a=s=>{s.target&&!n.current&&q$(QK,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",a),()=>e.removeEventListener("focusin",a)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function TO(){const t=new CustomEvent(Z_);document.dispatchEvent(t)}function q$(t,e,r,{discrete:n}){const a=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&a.addEventListener(t,e,{once:!0}),n?M$(a,s):a.dispatchEvent(s)}var nZ=$m[" useId ".trim().toString()]||(()=>{}),aZ=0;function Xr(t){const[e,r]=b.useState(nZ());return nn(()=>{r(n=>n??String(aZ++))},[t]),t||(e?`radix-${e}`:"")}const oZ=["top","right","bottom","left"],Ti=Math.min,Un=Math.max,bm=Math.round,pp=Math.floor,Fa=t=>({x:t,y:t}),iZ={left:"right",right:"left",bottom:"top",top:"bottom"},sZ={start:"end",end:"start"};function X_(t,e,r){return Un(t,Ti(e,r))}function Io(t,e){return typeof t=="function"?t(e):t}function Oo(t){return t.split("-")[0]}function xc(t){return t.split("-")[1]}function SR(t){return t==="x"?"y":"x"}function xR(t){return t==="y"?"height":"width"}const lZ=new Set(["top","bottom"]);function Ma(t){return lZ.has(Oo(t))?"y":"x"}function wR(t){return SR(Ma(t))}function cZ(t,e,r){r===void 0&&(r=!1);const n=xc(t),a=wR(t),s=xR(a);let l=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(l=ym(l)),[l,ym(l)]}function uZ(t){const e=ym(t);return[Q_(t),e,Q_(e)]}function Q_(t){return t.replace(/start|end/g,e=>sZ[e])}const RO=["left","right"],CO=["right","left"],dZ=["top","bottom"],fZ=["bottom","top"];function pZ(t,e,r){switch(t){case"top":case"bottom":return r?e?CO:RO:e?RO:CO;case"left":case"right":return e?dZ:fZ;default:return[]}}function mZ(t,e,r,n){const a=xc(t);let s=pZ(Oo(t),r==="start",n);return a&&(s=s.map(l=>l+"-"+a),e&&(s=s.concat(s.map(Q_)))),s}function ym(t){return t.replace(/left|right|bottom|top/g,e=>iZ[e])}function hZ(t){return{top:0,right:0,bottom:0,left:0,...t}}function H$(t){return typeof t!="number"?hZ(t):{top:t,right:t,bottom:t,left:t}}function Em(t){const{x:e,y:r,width:n,height:a}=t;return{width:n,height:a,top:r,left:e,right:e+n,bottom:r+a,x:e,y:r}}function AO(t,e,r){let{reference:n,floating:a}=t;const s=Ma(e),l=wR(e),c=xR(l),d=Oo(e),f=s==="y",m=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2,v=n[c]/2-a[c]/2;let y;switch(d){case"top":y={x:m,y:n.y-a.height};break;case"bottom":y={x:m,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:h};break;case"left":y={x:n.x-a.width,y:h};break;default:y={x:n.x,y:n.y}}switch(xc(e)){case"start":y[l]-=v*(r&&f?-1:1);break;case"end":y[l]+=v*(r&&f?-1:1);break}return y}const gZ=async(t,e,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:s=[],platform:l}=r,c=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:a}),{x:m,y:h}=AO(f,n,d),v=n,y={},w=0;for(let S=0;S<c.length;S++){const{name:R,fn:x}=c[S],{x:_,y:C,data:N,reset:k}=await x({x:m,y:h,initialPlacement:n,placement:v,strategy:a,middlewareData:y,rects:f,platform:l,elements:{reference:t,floating:e}});m=_??m,h=C??h,y={...y,[R]:{...y[R],...N}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(v=k.placement),k.rects&&(f=k.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:a}):k.rects),{x:m,y:h}=AO(f,v,d)),S=-1)}return{x:m,y:h,placement:v,strategy:a,middlewareData:y}};async function id(t,e){var r;e===void 0&&(e={});const{x:n,y:a,platform:s,rects:l,elements:c,strategy:d}=t,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:v=!1,padding:y=0}=Io(e,t),w=H$(y),R=c[v?h==="floating"?"reference":"floating":h],x=Em(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(R)))==null||r?R:R.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:m,strategy:d})),_=h==="floating"?{x:n,y:a,width:l.floating.width,height:l.floating.height}:l.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),N=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},k=Em(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:C,strategy:d}):_);return{top:(x.top-k.top+w.top)/N.y,bottom:(k.bottom-x.bottom+w.bottom)/N.y,left:(x.left-k.left+w.left)/N.x,right:(k.right-x.right+w.right)/N.x}}const vZ=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:a,rects:s,platform:l,elements:c,middlewareData:d}=e,{element:f,padding:m=0}=Io(t,e)||{};if(f==null)return{};const h=H$(m),v={x:r,y:n},y=wR(a),w=xR(y),S=await l.getDimensions(f),R=y==="y",x=R?"top":"left",_=R?"bottom":"right",C=R?"clientHeight":"clientWidth",N=s.reference[w]+s.reference[y]-v[y]-s.floating[w],k=v[y]-s.reference[y],A=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let I=A?A[C]:0;(!I||!await(l.isElement==null?void 0:l.isElement(A)))&&(I=c.floating[C]||s.floating[w]);const O=N/2-k/2,L=I/2-S[w]/2-1,M=Ti(h[x],L),P=Ti(h[_],L),Y=M,Q=I-S[w]-P,J=I/2-S[w]/2+O,ee=X_(Y,J,Q),U=!d.arrow&&xc(a)!=null&&J!==ee&&s.reference[w]/2-(J<Y?M:P)-S[w]/2<0,G=U?J<Y?J-Y:J-Q:0;return{[y]:v[y]+G,data:{[y]:ee,centerOffset:J-ee-G,...U&&{alignmentOffset:G}},reset:U}}}),bZ=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:a,middlewareData:s,rects:l,initialPlacement:c,platform:d,elements:f}=e,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...R}=Io(t,e);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const x=Oo(a),_=Ma(c),C=Oo(c)===c,N=await(d.isRTL==null?void 0:d.isRTL(f.floating)),k=v||(C||!S?[ym(c)]:uZ(c)),A=w!=="none";!v&&A&&k.push(...mZ(c,S,w,N));const I=[c,...k],O=await id(e,R),L=[];let M=((n=s.flip)==null?void 0:n.overflows)||[];if(m&&L.push(O[x]),h){const J=cZ(a,l,N);L.push(O[J[0]],O[J[1]])}if(M=[...M,{placement:a,overflows:L}],!L.every(J=>J<=0)){var P,Y;const J=(((P=s.flip)==null?void 0:P.index)||0)+1,ee=I[J];if(ee&&(!(h==="alignment"?_!==Ma(ee):!1)||M.every(H=>Ma(H.placement)===_?H.overflows[0]>0:!0)))return{data:{index:J,overflows:M},reset:{placement:ee}};let U=(Y=M.filter(G=>G.overflows[0]<=0).sort((G,H)=>G.overflows[1]-H.overflows[1])[0])==null?void 0:Y.placement;if(!U)switch(y){case"bestFit":{var Q;const G=(Q=M.filter(H=>{if(A){const X=Ma(H.placement);return X===_||X==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(X=>X>0).reduce((X,ae)=>X+ae,0)]).sort((H,X)=>H[1]-X[1])[0])==null?void 0:Q[0];G&&(U=G);break}case"initialPlacement":U=c;break}if(a!==U)return{reset:{placement:U}}}return{}}}};function NO(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function kO(t){return oZ.some(e=>t[e]>=0)}const yZ=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...a}=Io(t,e);switch(n){case"referenceHidden":{const s=await id(e,{...a,elementContext:"reference"}),l=NO(s,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:kO(l)}}}case"escaped":{const s=await id(e,{...a,altBoundary:!0}),l=NO(s,r.floating);return{data:{escapedOffsets:l,escaped:kO(l)}}}default:return{}}}}},V$=new Set(["left","top"]);async function EZ(t,e){const{placement:r,platform:n,elements:a}=t,s=await(n.isRTL==null?void 0:n.isRTL(a.floating)),l=Oo(r),c=xc(r),d=Ma(r)==="y",f=V$.has(l)?-1:1,m=s&&d?-1:1,h=Io(e,t);let{mainAxis:v,crossAxis:y,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof w=="number"&&(y=c==="end"?w*-1:w),d?{x:y*m,y:v*f}:{x:v*f,y:y*m}}const SZ=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:a,y:s,placement:l,middlewareData:c}=e,d=await EZ(e,t);return l===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:a+d.x,y:s+d.y,data:{...d,placement:l}}}}},xZ=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:a}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:R=>{let{x,y:_}=R;return{x,y:_}}},...d}=Io(t,e),f={x:r,y:n},m=await id(e,d),h=Ma(Oo(a)),v=SR(h);let y=f[v],w=f[h];if(s){const R=v==="y"?"top":"left",x=v==="y"?"bottom":"right",_=y+m[R],C=y-m[x];y=X_(_,y,C)}if(l){const R=h==="y"?"top":"left",x=h==="y"?"bottom":"right",_=w+m[R],C=w-m[x];w=X_(_,w,C)}const S=c.fn({...e,[v]:y,[h]:w});return{...S,data:{x:S.x-r,y:S.y-n,enabled:{[v]:s,[h]:l}}}}}},wZ=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:a,rects:s,middlewareData:l}=e,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=Io(t,e),m={x:r,y:n},h=Ma(a),v=SR(h);let y=m[v],w=m[h];const S=Io(c,e),R=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const C=v==="y"?"height":"width",N=s.reference[v]-s.floating[C]+R.mainAxis,k=s.reference[v]+s.reference[C]-R.mainAxis;y<N?y=N:y>k&&(y=k)}if(f){var x,_;const C=v==="y"?"width":"height",N=V$.has(Oo(a)),k=s.reference[h]-s.floating[C]+(N&&((x=l.offset)==null?void 0:x[h])||0)+(N?0:R.crossAxis),A=s.reference[h]+s.reference[C]+(N?0:((_=l.offset)==null?void 0:_[h])||0)-(N?R.crossAxis:0);w<k?w=k:w>A&&(w=A)}return{[v]:y,[h]:w}}}},_Z=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:a,rects:s,platform:l,elements:c}=e,{apply:d=()=>{},...f}=Io(t,e),m=await id(e,f),h=Oo(a),v=xc(a),y=Ma(a)==="y",{width:w,height:S}=s.floating;let R,x;h==="top"||h==="bottom"?(R=h,x=v===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(x=h,R=v==="end"?"top":"bottom");const _=S-m.top-m.bottom,C=w-m.left-m.right,N=Ti(S-m[R],_),k=Ti(w-m[x],C),A=!e.middlewareData.shift;let I=N,O=k;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(O=C),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(I=_),A&&!v){const M=Un(m.left,0),P=Un(m.right,0),Y=Un(m.top,0),Q=Un(m.bottom,0);y?O=w-2*(M!==0||P!==0?M+P:Un(m.left,m.right)):I=S-2*(Y!==0||Q!==0?Y+Q:Un(m.top,m.bottom))}await d({...e,availableWidth:O,availableHeight:I});const L=await l.getDimensions(c.floating);return w!==L.width||S!==L.height?{reset:{rects:!0}}:{}}}};function Vm(){return typeof window<"u"}function wc(t){return G$(t)?(t.nodeName||"").toLowerCase():"#document"}function Fn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Xa(t){var e;return(e=(G$(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function G$(t){return Vm()?t instanceof Node||t instanceof Fn(t).Node:!1}function Sa(t){return Vm()?t instanceof Element||t instanceof Fn(t).Element:!1}function Wa(t){return Vm()?t instanceof HTMLElement||t instanceof Fn(t).HTMLElement:!1}function IO(t){return!Vm()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Fn(t).ShadowRoot}const TZ=new Set(["inline","contents"]);function Dd(t){const{overflow:e,overflowX:r,overflowY:n,display:a}=xa(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!TZ.has(a)}const RZ=new Set(["table","td","th"]);function CZ(t){return RZ.has(wc(t))}const AZ=[":popover-open",":modal"];function Gm(t){return AZ.some(e=>{try{return t.matches(e)}catch{return!1}})}const NZ=["transform","translate","scale","rotate","perspective"],kZ=["transform","translate","scale","rotate","perspective","filter"],IZ=["paint","layout","strict","content"];function _R(t){const e=TR(),r=Sa(t)?xa(t):t;return NZ.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||kZ.some(n=>(r.willChange||"").includes(n))||IZ.some(n=>(r.contain||"").includes(n))}function OZ(t){let e=Ri(t);for(;Wa(e)&&!ac(e);){if(_R(e))return e;if(Gm(e))return null;e=Ri(e)}return null}function TR(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const DZ=new Set(["html","body","#document"]);function ac(t){return DZ.has(wc(t))}function xa(t){return Fn(t).getComputedStyle(t)}function Wm(t){return Sa(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ri(t){if(wc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||IO(t)&&t.host||Xa(t);return IO(e)?e.host:e}function W$(t){const e=Ri(t);return ac(e)?t.ownerDocument?t.ownerDocument.body:t.body:Wa(e)&&Dd(e)?e:W$(e)}function sd(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const a=W$(t),s=a===((n=t.ownerDocument)==null?void 0:n.body),l=Fn(a);if(s){const c=J_(l);return e.concat(l,l.visualViewport||[],Dd(a)?a:[],c&&r?sd(c):[])}return e.concat(a,sd(a,[],r))}function J_(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Y$(t){const e=xa(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const a=Wa(t),s=a?t.offsetWidth:r,l=a?t.offsetHeight:n,c=bm(r)!==s||bm(n)!==l;return c&&(r=s,n=l),{width:r,height:n,$:c}}function RR(t){return Sa(t)?t:t.contextElement}function Fl(t){const e=RR(t);if(!Wa(e))return Fa(1);const r=e.getBoundingClientRect(),{width:n,height:a,$:s}=Y$(e);let l=(s?bm(r.width):r.width)/n,c=(s?bm(r.height):r.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const LZ=Fa(0);function K$(t){const e=Fn(t);return!TR()||!e.visualViewport?LZ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function MZ(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Fn(t)?!1:e}function xs(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const a=t.getBoundingClientRect(),s=RR(t);let l=Fa(1);e&&(n?Sa(n)&&(l=Fl(n)):l=Fl(t));const c=MZ(s,r,n)?K$(s):Fa(0);let d=(a.left+c.x)/l.x,f=(a.top+c.y)/l.y,m=a.width/l.x,h=a.height/l.y;if(s){const v=Fn(s),y=n&&Sa(n)?Fn(n):n;let w=v,S=J_(w);for(;S&&n&&y!==w;){const R=Fl(S),x=S.getBoundingClientRect(),_=xa(S),C=x.left+(S.clientLeft+parseFloat(_.paddingLeft))*R.x,N=x.top+(S.clientTop+parseFloat(_.paddingTop))*R.y;d*=R.x,f*=R.y,m*=R.x,h*=R.y,d+=C,f+=N,w=Fn(S),S=J_(w)}}return Em({width:m,height:h,x:d,y:f})}function Ym(t,e){const r=Wm(t).scrollLeft;return e?e.left+r:xs(Xa(t)).left+r}function Z$(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Ym(t,r),a=r.top+e.scrollTop;return{x:n,y:a}}function PZ(t){let{elements:e,rect:r,offsetParent:n,strategy:a}=t;const s=a==="fixed",l=Xa(n),c=e?Gm(e.floating):!1;if(n===l||c&&s)return r;let d={scrollLeft:0,scrollTop:0},f=Fa(1);const m=Fa(0),h=Wa(n);if((h||!h&&!s)&&((wc(n)!=="body"||Dd(l))&&(d=Wm(n)),Wa(n))){const y=xs(n);f=Fl(n),m.x=y.x+n.clientLeft,m.y=y.y+n.clientTop}const v=l&&!h&&!s?Z$(l,d):Fa(0);return{width:r.width*f.x,height:r.height*f.y,x:r.x*f.x-d.scrollLeft*f.x+m.x+v.x,y:r.y*f.y-d.scrollTop*f.y+m.y+v.y}}function jZ(t){return Array.from(t.getClientRects())}function UZ(t){const e=Xa(t),r=Wm(t),n=t.ownerDocument.body,a=Un(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Un(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let l=-r.scrollLeft+Ym(t);const c=-r.scrollTop;return xa(n).direction==="rtl"&&(l+=Un(e.clientWidth,n.clientWidth)-a),{width:a,height:s,x:l,y:c}}const OO=25;function FZ(t,e){const r=Fn(t),n=Xa(t),a=r.visualViewport;let s=n.clientWidth,l=n.clientHeight,c=0,d=0;if(a){s=a.width,l=a.height;const m=TR();(!m||m&&e==="fixed")&&(c=a.offsetLeft,d=a.offsetTop)}const f=Ym(n);if(f<=0){const m=n.ownerDocument,h=m.body,v=getComputedStyle(h),y=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(n.clientWidth-h.clientWidth-y);w<=OO&&(s-=w)}else f<=OO&&(s+=f);return{width:s,height:l,x:c,y:d}}const zZ=new Set(["absolute","fixed"]);function $Z(t,e){const r=xs(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,s=Wa(t)?Fl(t):Fa(1),l=t.clientWidth*s.x,c=t.clientHeight*s.y,d=a*s.x,f=n*s.y;return{width:l,height:c,x:d,y:f}}function DO(t,e,r){let n;if(e==="viewport")n=FZ(t,r);else if(e==="document")n=UZ(Xa(t));else if(Sa(e))n=$Z(e,r);else{const a=K$(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return Em(n)}function X$(t,e){const r=Ri(t);return r===e||!Sa(r)||ac(r)?!1:xa(r).position==="fixed"||X$(r,e)}function BZ(t,e){const r=e.get(t);if(r)return r;let n=sd(t,[],!1).filter(c=>Sa(c)&&wc(c)!=="body"),a=null;const s=xa(t).position==="fixed";let l=s?Ri(t):t;for(;Sa(l)&&!ac(l);){const c=xa(l),d=_R(l);!d&&c.position==="fixed"&&(a=null),(s?!d&&!a:!d&&c.position==="static"&&!!a&&zZ.has(a.position)||Dd(l)&&!d&&X$(t,l))?n=n.filter(m=>m!==l):a=c,l=Ri(l)}return e.set(t,n),n}function qZ(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t;const l=[...r==="clippingAncestors"?Gm(e)?[]:BZ(e,this._c):[].concat(r),n],c=l[0],d=l.reduce((f,m)=>{const h=DO(e,m,a);return f.top=Un(h.top,f.top),f.right=Ti(h.right,f.right),f.bottom=Ti(h.bottom,f.bottom),f.left=Un(h.left,f.left),f},DO(e,c,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function HZ(t){const{width:e,height:r}=Y$(t);return{width:e,height:r}}function VZ(t,e,r){const n=Wa(e),a=Xa(e),s=r==="fixed",l=xs(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const d=Fa(0);function f(){d.x=Ym(a)}if(n||!n&&!s)if((wc(e)!=="body"||Dd(a))&&(c=Wm(e)),n){const y=xs(e,!0,s,e);d.x=y.x+e.clientLeft,d.y=y.y+e.clientTop}else a&&f();s&&!n&&a&&f();const m=a&&!n&&!s?Z$(a,c):Fa(0),h=l.left+c.scrollLeft-d.x-m.x,v=l.top+c.scrollTop-d.y-m.y;return{x:h,y:v,width:l.width,height:l.height}}function qb(t){return xa(t).position==="static"}function LO(t,e){if(!Wa(t)||xa(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Xa(t)===r&&(r=r.ownerDocument.body),r}function Q$(t,e){const r=Fn(t);if(Gm(t))return r;if(!Wa(t)){let a=Ri(t);for(;a&&!ac(a);){if(Sa(a)&&!qb(a))return a;a=Ri(a)}return r}let n=LO(t,e);for(;n&&CZ(n)&&qb(n);)n=LO(n,e);return n&&ac(n)&&qb(n)&&!_R(n)?r:n||OZ(t)||r}const GZ=async function(t){const e=this.getOffsetParent||Q$,r=this.getDimensions,n=await r(t.floating);return{reference:VZ(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function WZ(t){return xa(t).direction==="rtl"}const YZ={convertOffsetParentRelativeRectToViewportRelativeRect:PZ,getDocumentElement:Xa,getClippingRect:qZ,getOffsetParent:Q$,getElementRects:GZ,getClientRects:jZ,getDimensions:HZ,getScale:Fl,isElement:Sa,isRTL:WZ};function J$(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function KZ(t,e){let r=null,n;const a=Xa(t);function s(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();const f=t.getBoundingClientRect(),{left:m,top:h,width:v,height:y}=f;if(c||e(),!v||!y)return;const w=pp(h),S=pp(a.clientWidth-(m+v)),R=pp(a.clientHeight-(h+y)),x=pp(m),C={rootMargin:-w+"px "+-S+"px "+-R+"px "+-x+"px",threshold:Un(0,Ti(1,d))||1};let N=!0;function k(A){const I=A[0].intersectionRatio;if(I!==d){if(!N)return l();I?l(!1,I):n=setTimeout(()=>{l(!1,1e-7)},1e3)}I===1&&!J$(f,t.getBoundingClientRect())&&l(),N=!1}try{r=new IntersectionObserver(k,{...C,root:a.ownerDocument})}catch{r=new IntersectionObserver(k,C)}r.observe(t)}return l(!0),s}function ZZ(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,f=RR(t),m=a||s?[...f?sd(f):[],...sd(e)]:[];m.forEach(x=>{a&&x.addEventListener("scroll",r,{passive:!0}),s&&x.addEventListener("resize",r)});const h=f&&c?KZ(f,r):null;let v=-1,y=null;l&&(y=new ResizeObserver(x=>{let[_]=x;_&&_.target===f&&y&&(y.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(e)})),r()}),f&&!d&&y.observe(f),y.observe(e));let w,S=d?xs(t):null;d&&R();function R(){const x=xs(t);S&&!J$(S,x)&&r(),S=x,w=requestAnimationFrame(R)}return r(),()=>{var x;m.forEach(_=>{a&&_.removeEventListener("scroll",r),s&&_.removeEventListener("resize",r)}),h?.(),(x=y)==null||x.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const XZ=SZ,QZ=xZ,JZ=bZ,eX=_Z,tX=yZ,MO=vZ,rX=wZ,nX=(t,e,r)=>{const n=new Map,a={platform:YZ,...r},s={...a.platform,_c:n};return gZ(t,e,{...a,platform:s})};var aX=typeof document<"u",oX=function(){},Pp=aX?b.useLayoutEffect:oX;function Sm(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,a;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!Sm(t[n],e[n]))return!1;return!0}if(a=Object.keys(t),r=a.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,a[n]))return!1;for(n=r;n--!==0;){const s=a[n];if(!(s==="_owner"&&t.$$typeof)&&!Sm(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function eB(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function PO(t,e){const r=eB(t);return Math.round(e*r)/r}function Hb(t){const e=b.useRef(t);return Pp(()=>{e.current=t}),e}function iX(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=t,[m,h]=b.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[v,y]=b.useState(n);Sm(v,n)||y(n);const[w,S]=b.useState(null),[R,x]=b.useState(null),_=b.useCallback(H=>{H!==A.current&&(A.current=H,S(H))},[]),C=b.useCallback(H=>{H!==I.current&&(I.current=H,x(H))},[]),N=s||w,k=l||R,A=b.useRef(null),I=b.useRef(null),O=b.useRef(m),L=d!=null,M=Hb(d),P=Hb(a),Y=Hb(f),Q=b.useCallback(()=>{if(!A.current||!I.current)return;const H={placement:e,strategy:r,middleware:v};P.current&&(H.platform=P.current),nX(A.current,I.current,H).then(X=>{const ae={...X,isPositioned:Y.current!==!1};J.current&&!Sm(O.current,ae)&&(O.current=ae,bc.flushSync(()=>{h(ae)}))})},[v,e,r,P,Y]);Pp(()=>{f===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,h(H=>({...H,isPositioned:!1})))},[f]);const J=b.useRef(!1);Pp(()=>(J.current=!0,()=>{J.current=!1}),[]),Pp(()=>{if(N&&(A.current=N),k&&(I.current=k),N&&k){if(M.current)return M.current(N,k,Q);Q()}},[N,k,Q,M,L]);const ee=b.useMemo(()=>({reference:A,floating:I,setReference:_,setFloating:C}),[_,C]),U=b.useMemo(()=>({reference:N,floating:k}),[N,k]),G=b.useMemo(()=>{const H={position:r,left:0,top:0};if(!U.floating)return H;const X=PO(U.floating,m.x),ae=PO(U.floating,m.y);return c?{...H,transform:"translate("+X+"px, "+ae+"px)",...eB(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:X,top:ae}},[r,c,U.floating,m.x,m.y]);return b.useMemo(()=>({...m,update:Q,refs:ee,elements:U,floatingStyles:G}),[m,Q,ee,U,G])}const sX=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:a}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?MO({element:n.current,padding:a}).fn(r):{}:n?MO({element:n,padding:a}).fn(r):{}}}},lX=(t,e)=>({...XZ(t),options:[t,e]}),cX=(t,e)=>({...QZ(t),options:[t,e]}),uX=(t,e)=>({...rX(t),options:[t,e]}),dX=(t,e)=>({...JZ(t),options:[t,e]}),fX=(t,e)=>({...eX(t),options:[t,e]}),pX=(t,e)=>({...tX(t),options:[t,e]}),mX=(t,e)=>({...sX(t),options:[t,e]});var hX="Arrow",tB=b.forwardRef((t,e)=>{const{children:r,width:n=10,height:a=5,...s}=t;return g.jsx(bt.svg,{...s,ref:e,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});tB.displayName=hX;var gX=tB,CR="Popper",[rB,ki]=Za(CR),[vX,nB]=rB(CR),aB=t=>{const{__scopePopper:e,children:r}=t,[n,a]=b.useState(null);return g.jsx(vX,{scope:e,anchor:n,onAnchorChange:a,children:r})};aB.displayName=CR;var oB="PopperAnchor",iB=b.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...a}=t,s=nB(oB,r),l=b.useRef(null),c=Nt(e,l),d=b.useRef(null);return b.useEffect(()=>{const f=d.current;d.current=n?.current||l.current,f!==d.current&&s.onAnchorChange(d.current)}),n?null:g.jsx(bt.div,{...a,ref:c})});iB.displayName=oB;var AR="PopperContent",[bX,yX]=rB(AR),sB=b.forwardRef((t,e)=>{const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=t,R=nB(AR,r),[x,_]=b.useState(null),C=Nt(e,j=>_(j)),[N,k]=b.useState(null),A=D$(N),I=A?.width??0,O=A?.height??0,L=n+(s!=="center"?"-"+s:""),M=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},P=Array.isArray(f)?f:[f],Y=P.length>0,Q={padding:M,boundary:P.filter(SX),altBoundary:Y},{refs:J,floatingStyles:ee,placement:U,isPositioned:G,middlewareData:H}=iX({strategy:"fixed",placement:L,whileElementsMounted:(...j)=>ZZ(...j,{animationFrame:y==="always"}),elements:{reference:R.anchor},middleware:[lX({mainAxis:a+O,alignmentAxis:l}),d&&cX({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?uX():void 0,...Q}),d&&dX({...Q}),fX({...Q,apply:({elements:j,rects:Z,availableWidth:ne,availableHeight:V})=>{const{width:de,height:fe}=Z.reference,Re=j.floating.style;Re.setProperty("--radix-popper-available-width",`${ne}px`),Re.setProperty("--radix-popper-available-height",`${V}px`),Re.setProperty("--radix-popper-anchor-width",`${de}px`),Re.setProperty("--radix-popper-anchor-height",`${fe}px`)}}),N&&mX({element:N,padding:c}),xX({arrowWidth:I,arrowHeight:O}),v&&pX({strategy:"referenceHidden",...Q})]}),[X,ae]=uB(U),z=Ga(w);nn(()=>{G&&z?.()},[G,z]);const q=H.arrow?.x,$=H.arrow?.y,W=H.arrow?.centerOffset!==0,[te,F]=b.useState();return nn(()=>{x&&F(window.getComputedStyle(x).zIndex)},[x]),g.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:G?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(bX,{scope:r,placedSide:X,onArrowChange:k,arrowX:q,arrowY:$,shouldHideArrow:W,children:g.jsx(bt.div,{"data-side":X,"data-align":ae,...S,ref:C,style:{...S.style,animation:G?void 0:"none"}})})})});sB.displayName=AR;var lB="PopperArrow",EX={top:"bottom",right:"left",bottom:"top",left:"right"},cB=b.forwardRef(function(e,r){const{__scopePopper:n,...a}=e,s=yX(lB,n),l=EX[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(gX,{...a,ref:r,style:{...a.style,display:"block"}})})});cB.displayName=lB;function SX(t){return t!==null}var xX=t=>({name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:a}=e,l=a.arrow?.centerOffset!==0,c=l?0:t.arrowWidth,d=l?0:t.arrowHeight,[f,m]=uB(r),h={start:"0%",center:"50%",end:"100%"}[m],v=(a.arrow?.x??0)+c/2,y=(a.arrow?.y??0)+d/2;let w="",S="";return f==="bottom"?(w=l?h:`${v}px`,S=`${-d}px`):f==="top"?(w=l?h:`${v}px`,S=`${n.floating.height+d}px`):f==="right"?(w=`${-d}px`,S=l?h:`${y}px`):f==="left"&&(w=`${n.floating.width+d}px`,S=l?h:`${y}px`),{data:{x:w,y:S}}}});function uB(t){const[e,r="center"]=t.split("-");return[e,r]}var Km=aB,Ld=iB,Zm=sB,Xm=cB,wX="Portal",_c=b.forwardRef((t,e)=>{const{container:r,...n}=t,[a,s]=b.useState(!1);nn(()=>s(!0),[]);const l=r||a&&globalThis?.document?.body;return l?d$.createPortal(g.jsx(bt.div,{...n,ref:e}),l):null});_c.displayName=wX;function _X(t,e){return b.useReducer((r,n)=>e[r][n]??r,t)}var ca=t=>{const{present:e,children:r}=t,n=TX(e),a=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),s=Nt(n.ref,RX(a));return typeof r=="function"||n.isPresent?b.cloneElement(a,{ref:s}):null};ca.displayName="Presence";function TX(t){const[e,r]=b.useState(),n=b.useRef(null),a=b.useRef(t),s=b.useRef("none"),l=t?"mounted":"unmounted",[c,d]=_X(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const f=mp(n.current);s.current=c==="mounted"?f:"none"},[c]),nn(()=>{const f=n.current,m=a.current;if(m!==t){const v=s.current,y=mp(f);t?d("MOUNT"):y==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&v!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=t}},[t,d]),nn(()=>{if(e){let f;const m=e.ownerDocument.defaultView??window,h=y=>{const S=mp(n.current).includes(CSS.escape(y.animationName));if(y.target===e&&S&&(d("ANIMATION_END"),!a.current)){const R=e.style.animationFillMode;e.style.animationFillMode="forwards",f=m.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=R)})}},v=y=>{y.target===e&&(s.current=mp(n.current))};return e.addEventListener("animationstart",v),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{m.clearTimeout(f),e.removeEventListener("animationstart",v),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:b.useCallback(f=>{n.current=f?getComputedStyle(f):null,r(f)},[])}}function mp(t){return t?.animationName||"none"}function RX(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var dB=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"}),CX="VisuallyHidden",fB=b.forwardRef((t,e)=>g.jsx(bt.span,{...t,ref:e,style:{...dB,...t.style}}));fB.displayName=CX;var AX=fB,[Qm]=Za("Tooltip",[ki]),Jm=ki(),pB="TooltipProvider",NX=700,eT="tooltip.open",[kX,NR]=Qm(pB),mB=t=>{const{__scopeTooltip:e,delayDuration:r=NX,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:s}=t,l=b.useRef(!0),c=b.useRef(!1),d=b.useRef(0);return b.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),g.jsx(kX,{scope:e,isOpenDelayedRef:l,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:b.useCallback(f=>{c.current=f},[]),disableHoverableContent:a,children:s})};mB.displayName=pB;var ld="Tooltip",[IX,Md]=Qm(ld),hB=t=>{const{__scopeTooltip:e,children:r,open:n,defaultOpen:a,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,d=NR(ld,t.__scopeTooltip),f=Jm(e),[m,h]=b.useState(null),v=Xr(),y=b.useRef(0),w=l??d.disableHoverableContent,S=c??d.delayDuration,R=b.useRef(!1),[x,_]=_i({prop:n,defaultProp:a??!1,onChange:I=>{I?(d.onOpen(),document.dispatchEvent(new CustomEvent(eT))):d.onClose(),s?.(I)},caller:ld}),C=b.useMemo(()=>x?R.current?"delayed-open":"instant-open":"closed",[x]),N=b.useCallback(()=>{window.clearTimeout(y.current),y.current=0,R.current=!1,_(!0)},[_]),k=b.useCallback(()=>{window.clearTimeout(y.current),y.current=0,_(!1)},[_]),A=b.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{R.current=!0,_(!0),y.current=0},S)},[S,_]);return b.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),g.jsx(Km,{...f,children:g.jsx(IX,{scope:e,contentId:v,open:x,stateAttribute:C,trigger:m,onTriggerChange:h,onTriggerEnter:b.useCallback(()=>{d.isOpenDelayedRef.current?A():N()},[d.isOpenDelayedRef,A,N]),onTriggerLeave:b.useCallback(()=>{w?k():(window.clearTimeout(y.current),y.current=0)},[k,w]),onOpen:N,onClose:k,disableHoverableContent:w,children:r})})};hB.displayName=ld;var tT="TooltipTrigger",gB=b.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,a=Md(tT,r),s=NR(tT,r),l=Jm(r),c=b.useRef(null),d=Nt(e,c,a.onTriggerChange),f=b.useRef(!1),m=b.useRef(!1),h=b.useCallback(()=>f.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),g.jsx(Ld,{asChild:!0,...l,children:g.jsx(bt.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:d,onPointerMove:He(t.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:He(t.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:He(t.onPointerDown,()=>{a.open&&a.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:He(t.onFocus,()=>{f.current||a.onOpen()}),onBlur:He(t.onBlur,a.onClose),onClick:He(t.onClick,a.onClose)})})});gB.displayName=tT;var kR="TooltipPortal",[OX,DX]=Qm(kR,{forceMount:void 0}),vB=t=>{const{__scopeTooltip:e,forceMount:r,children:n,container:a}=t,s=Md(kR,e);return g.jsx(OX,{scope:e,forceMount:r,children:g.jsx(ca,{present:r||s.open,children:g.jsx(_c,{asChild:!0,container:a,children:n})})})};vB.displayName=kR;var oc="TooltipContent",bB=b.forwardRef((t,e)=>{const r=DX(oc,t.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...s}=t,l=Md(oc,t.__scopeTooltip);return g.jsx(ca,{present:n||l.open,children:l.disableHoverableContent?g.jsx(yB,{side:a,...s,ref:e}):g.jsx(LX,{side:a,...s,ref:e})})}),LX=b.forwardRef((t,e)=>{const r=Md(oc,t.__scopeTooltip),n=NR(oc,t.__scopeTooltip),a=b.useRef(null),s=Nt(e,a),[l,c]=b.useState(null),{trigger:d,onClose:f}=r,m=a.current,{onPointerInTransitChange:h}=n,v=b.useCallback(()=>{c(null),h(!1)},[h]),y=b.useCallback((w,S)=>{const R=w.currentTarget,x={x:w.clientX,y:w.clientY},_=UX(x,R.getBoundingClientRect()),C=FX(x,_),N=zX(S.getBoundingClientRect()),k=BX([...C,...N]);c(k),h(!0)},[h]);return b.useEffect(()=>()=>v(),[v]),b.useEffect(()=>{if(d&&m){const w=R=>y(R,m),S=R=>y(R,d);return d.addEventListener("pointerleave",w),m.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",w),m.removeEventListener("pointerleave",S)}}},[d,m,y,v]),b.useEffect(()=>{if(l){const w=S=>{const R=S.target,x={x:S.clientX,y:S.clientY},_=d?.contains(R)||m?.contains(R),C=!$X(x,l);_?v():C&&(v(),f())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,m,l,f,v]),g.jsx(yB,{...t,ref:s})}),[MX,PX]=Qm(ld,{isInside:!1}),jX=FK("TooltipContent"),yB=b.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=t,d=Md(oc,r),f=Jm(r),{onClose:m}=d;return b.useEffect(()=>(document.addEventListener(eT,m),()=>document.removeEventListener(eT,m)),[m]),b.useEffect(()=>{if(d.trigger){const h=v=>{v.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,m]),g.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:g.jsxs(Zm,{"data-state":d.stateAttribute,...f,...c,ref:e,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(jX,{children:n}),g.jsx(MX,{scope:r,isInside:!0,children:g.jsx(AX,{id:d.contentId,role:"tooltip",children:a||n})})]})})});bB.displayName=oc;var EB="TooltipArrow",SB=b.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,a=Jm(r);return PX(EB,r).isInside?null:g.jsx(Xm,{...a,...n,ref:e})});SB.displayName=EB;function UX(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),a=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(r,n,a,s)){case s:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function FX(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function zX(t){const{top:e,right:r,bottom:n,left:a}=t;return[{x:a,y:e},{x:r,y:e},{x:r,y:n},{x:a,y:n}]}function $X(t,e){const{x:r,y:n}=t;let a=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const c=e[s],d=e[l],f=c.x,m=c.y,h=d.x,v=d.y;m>n!=v>n&&r<(h-f)*(n-m)/(v-m)+f&&(a=!a)}return a}function BX(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),qX(e)}function qX(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const a=t[n];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(a.y-l.y)>=(s.y-l.y)*(a.x-l.x))e.pop();else break}e.push(a)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const a=t[n];for(;r.length>=2;){const s=r[r.length-1],l=r[r.length-2];if((s.x-l.x)*(a.y-l.y)>=(s.y-l.y)*(a.x-l.x))r.pop();else break}r.push(a)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var HX=mB,VX=hB,GX=gB,WX=vB,YX=bB,KX=SB;function xB({delayDuration:t=0,...e}){return g.jsx(HX,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function jr({...t}){return g.jsx(xB,{children:g.jsx(VX,{"data-slot":"tooltip",...t})})}function Ur({...t}){return g.jsx(GX,{"data-slot":"tooltip-trigger",...t})}function Fr({className:t,sideOffset:e=0,children:r,...n}){return g.jsx(WX,{children:g.jsxs(YX,{"data-slot":"tooltip-content",sideOffset:e,className:De("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",t),...n,children:[r,g.jsx(KX,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}class ZX{name="mcp_inspector_open";properties;constructor(e){this.properties={server_url:e.serverUrl,connection_count:e.connectionCount}}}class jO{name="mcp_tool_execution";properties;constructor(e){this.properties={tool_name:e.toolName,server_id:e.serverId,success:e.success,duration:e.duration,error:e.error}}}class UO{name="mcp_resource_read";properties;constructor(e){this.properties={resource_uri:e.resourceUri,server_id:e.serverId,success:e.success,error:e.error}}}class FO{name="mcp_prompt_call";properties;constructor(e){this.properties={prompt_name:e.promptName,server_id:e.serverId,success:e.success,error:e.error}}}class zO{name="mcp_chat_message";properties;constructor(e){this.properties={server_id:e.serverId,provider:e.provider,model:e.model,message_count:e.messageCount,tool_calls_count:e.toolCallsCount,success:e.success,execution_mode:e.executionMode,duration:e.duration,error:e.error}}}class XX{name="mcp_server_added";properties;constructor(e){this.properties={server_id:e.serverId,server_url:e.serverUrl,connection_type:e.connectionType,via_proxy:e.viaProxy}}}class QX{name="mcp_server_removed";properties;constructor(e){this.properties={server_id:e.serverId}}}class JX{name="mcp_command_palette_open";properties;constructor(e){this.properties={trigger:e.trigger}}}class eQ{name="mcp_tool_saved";properties;constructor(e){this.properties={tool_name:e.toolName,server_id:e.serverId}}}function Vb(){try{return"0.5.3-canary.5"}catch{return"0.0.0"}}var tQ={};function Gb(){try{return typeof window<"u"&&typeof document<"u"}catch{return!1}}class $O{endpoint;timeout;constructor(e,r=3e3){this.endpoint=e,this.timeout=r}async logEvent(e){try{const r=new AbortController,n=setTimeout(()=>r.abort(),this.timeout),a=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:r.signal});if(clearTimeout(n),!a.ok)throw new Error(`HTTP error! status: ${a.status}`)}catch{}}}function di(t){return`mcp_inspector_telemetry_${t}`}class zr{static instance=null;POSTHOG_PROXY_URL="/inspector/api/tel/posthog";SCARF_PROXY_URL="/inspector/api/tel/scarf";UNKNOWN_USER_ID="UNKNOWN_USER_ID";_currUserId=null;_posthogClient=null;_scarfClient=null;_source="inspector";constructor(){const e=Gb(),r=this.isTelemetryDisabled();if(this._source=this.getStoredSource()||"inspector",r)this._posthogClient=null,this._scarfClient=null;else if(!e)this._posthogClient=null,this._scarfClient=null;else{try{this._posthogClient=new $O(this.POSTHOG_PROXY_URL,3e3)}catch{this._posthogClient=null}try{this._scarfClient=new $O(this.SCARF_PROXY_URL,3e3)}catch{this._scarfClient=null}}}isTelemetryDisabled(){return typeof localStorage<"u"&&localStorage.getItem(di("disabled"))==="true"||typeof process<"u"&&tQ?.MCP_USE_ANONYMIZED_TELEMETRY==="false"}getStoredSource(){return typeof localStorage<"u"?localStorage.getItem(di("source")):null}static getInstance(){return zr.instance||(zr.instance=new zr),zr.instance}setSource(e){this._source=e,typeof localStorage<"u"&&localStorage.setItem(di("source"),e)}getSource(){return this._source}get userId(){if(this._currUserId)return this._currUserId;if(!Gb())return this._currUserId=this.UNKNOWN_USER_ID,this._currUserId;try{const e=localStorage.getItem(di("user_id"));if(e)this._currUserId=e;else{const r=this.generateUserId();localStorage.setItem(di("user_id"),r),this._currUserId=r}this.trackPackageDownload({triggered_by:"user_id_property"}).catch(()=>{})}catch{this._currUserId=this.UNKNOWN_USER_ID}return this._currUserId}generateUserId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}async capture(e){if(!(!this._posthogClient&&!this._scarfClient)){if(this._posthogClient)try{const r={event:e.name,user_id:this.userId,properties:{...e.properties,mcp_use_version:Vb(),language:"typescript",source:this._source,package:"inspector"}};await this._posthogClient.logEvent(r)}catch{}if(this._scarfClient)try{const r={};r.mcp_use_version=Vb(),r.user_id=this.userId,r.event=e.name,r.language="typescript",r.source=this._source,r.package="inspector",await this._scarfClient.logEvent(r)}catch{}}}async trackPackageDownload(e){if(this._scarfClient&&Gb())try{const r=Vb();let n=!1,a=!1;const s=localStorage.getItem(di("download_version"));if(s?r>s&&(n=!0,a=!1,localStorage.setItem(di("download_version"),r)):(n=!0,a=!0,localStorage.setItem(di("download_version"),r)),n){const l={...e||{}};l.mcp_use_version=r,l.user_id=this.userId,l.event="package_download",l.first_download=a,l.language="typescript",l.source=this._source,l.package="inspector",await this._scarfClient.logEvent(l)}}catch{}}async trackInspectorOpen(e){const r=new ZX(e);await this.capture(r)}}const wB=b.createContext(void 0);function rQ({url:t,name:e,proxyConfig:r,transportType:n,onUpdate:a,onRemove:s}){const l=typeof window<"u"?new URL("/inspector/oauth/callback",window.location.origin).toString():"/inspector/oauth/callback";let c=t,d={};if(r?.proxyAddress){const v=new URL(r.proxyAddress),y=new URL(t);c=`${v.origin}${v.pathname}${y.pathname}${y.search}`,d["X-Target-URL"]=t}r?.customHeaders&&(d={...d,...r.customHeaders});const f=fR({url:c,callbackUrl:l,customHeaders:Object.keys(d).length>0?d:void 0,transportType:n||"http"}),m=b.useRef(a),h=b.useRef(null);return b.useEffect(()=>{m.current=a},[a]),b.useEffect(()=>{if(typeof queueMicrotask<"u")queueMicrotask(()=>{f.state==="ready"&&f.serverInfo&&console.log("[McpContext] Server info available:",f.serverInfo);const v={id:t,url:t,name:f.serverInfo?.name||e,state:f.state,tools:f.tools,resources:f.resources,prompts:f.prompts,error:f.error??null,authUrl:f.authUrl??null,customHeaders:d,transportType:n,proxyConfig:r,serverInfo:f.serverInfo,capabilities:f.capabilities,callTool:f.callTool,readResource:f.readResource,listPrompts:f.listPrompts,getPrompt:f.getPrompt,authenticate:f.authenticate,retry:f.retry,clearStorage:f.clearStorage,client:f.client},y=h.current;(!y||y.state!==v.state||y.error!==v.error||y.authUrl!==v.authUrl||y.name!==v.name||y.tools.length!==v.tools.length||y.resources.length!==v.resources.length||y.prompts.length!==v.prompts.length||y.serverInfo!==v.serverInfo||y.capabilities!==v.capabilities||!y.client)&&(h.current=v,m.current(v))});else{const v={id:t,url:t,name:f.serverInfo?.name||e,state:f.state,tools:f.tools,resources:f.resources,prompts:f.prompts,error:f.error??null,authUrl:f.authUrl??null,customHeaders:d,transportType:n,proxyConfig:r,serverInfo:f.serverInfo,capabilities:f.capabilities,callTool:f.callTool,readResource:f.readResource,listPrompts:f.listPrompts,getPrompt:f.getPrompt,authenticate:f.authenticate,retry:f.retry,clearStorage:f.clearStorage,client:f.client},y=h.current;(!y||y.state!==v.state||y.error!==v.error||y.authUrl!==v.authUrl||y.name!==v.name||y.tools.length!==v.tools.length||y.resources.length!==v.resources.length||y.prompts.length!==v.prompts.length||y.serverInfo!==v.serverInfo||y.capabilities!==v.capabilities||!y.client)&&(h.current=v,m.current(v))}},[t,e,n,r,f.state,f.tools,f.resources,f.prompts,f.error,f.authUrl,f.serverInfo,f.capabilities,f.client]),null}function nQ({children:t}){const[e,r]=b.useState([]),[n,a]=b.useState(new Map),[s,l]=b.useState(0),[c,d]=b.useState(!0),[f,m]=b.useState(new Set);b.useEffect(()=>{const k=localStorage.getItem("mcp-inspector-connections");if(k)try{const I=JSON.parse(k),O=Array.isArray(I)?I.filter(M=>M&&typeof M=="object"&&typeof M.id=="string"&&typeof M.url=="string"&&typeof M.name=="string").map(M=>(M.transportType||(M.transportType="http"),M)):[];(O.length!==I.length||O.some(M=>M.transportType==="http"&&!I.find(P=>P.id===M.id&&P.transportType)))&&(console.warn("Updated connections in localStorage with transport type migration"),localStorage.setItem("mcp-inspector-connections",JSON.stringify(O))),r(O)}catch(I){console.error("Failed to parse saved connections:",I),localStorage.removeItem("mcp-inspector-connections")}const A=localStorage.getItem("mcp-inspector-auto-connect");A!==null&&d(A==="true")},[]);const h=b.useCallback(k=>{a(A=>new Map(A).set(k.id,k)),l(A=>A+1),k.serverInfo?.name&&k.state==="ready"&&r(A=>{const I=A.find(O=>O.id===k.id);if(I&&I.name!==k.serverInfo.name){const O=A.map(L=>L.id===k.id?{...L,name:k.serverInfo.name}:L);return localStorage.setItem("mcp-inspector-connections",JSON.stringify(O)),O}return A})},[]),v=b.useCallback((k,A,I,O)=>{const M={id:k,url:k,name:A||k,proxyConfig:I,transportType:O||"http"};r(P=>{if(P.some(Q=>Q.id===k))return P;const Y=[...P,M];return localStorage.setItem("mcp-inspector-connections",JSON.stringify(Y)),Y})},[]),y=b.useCallback(k=>{zr.getInstance().capture(new QX({serverId:k})).catch(()=>{}),r(I=>{const O=I.filter(L=>L.id!==k);return localStorage.setItem("mcp-inspector-connections",JSON.stringify(O)),O}),a(I=>{const O=new Map(I),L=O.get(k);if(L){try{L.clearStorage()}catch(M){console.error("Failed to clear storage:",M)}O.delete(k)}return O})},[]),w=b.useCallback(k=>{const A=n.get(k);if(A)return A;const I=e.find(O=>O.id===k);if(I)return{id:I.id,url:I.url,name:I.name,state:"disconnected",tools:[],resources:[],prompts:[],error:null,authUrl:null,transportType:I.transportType,proxyConfig:I.proxyConfig,listPrompts:async O=>{throw new Error("Not connected")},getPrompt:async()=>{throw new Error("Not connected")},callTool:async()=>{throw new Error("Not connected")},readResource:async()=>{throw new Error("Not connected")},authenticate:()=>{},retry:()=>{},clearStorage:()=>{},client:null}},[n,e]),S=b.useCallback(k=>{d(k),localStorage.setItem("mcp-inspector-auto-connect",String(k)),k||m(new Set)},[]),R=b.useCallback(k=>{m(A=>new Set(A).add(k))},[]),x=b.useCallback(k=>{m(A=>{const I=new Set(A);return I.delete(k),I}),a(A=>{const I=new Map(A),O=I.get(k);if(O){try{O.clearStorage()}catch(L){console.error("Failed to clear storage:",L)}I.delete(k)}return I})},[]),_=b.useCallback((k,A)=>{r(I=>{const O=I.map(L=>L.id===k?{...L,name:A.name||L.name,proxyConfig:A.proxyConfig,transportType:A.transportType||L.transportType}:L);return localStorage.setItem("mcp-inspector-connections",JSON.stringify(O)),O})},[]),C=b.useMemo(()=>e.map(A=>{const I=n.get(A.id);return I||{id:A.id,url:A.url,name:A.name,state:"disconnected",tools:[],resources:[],prompts:[],error:null,authUrl:null,transportType:A.transportType,proxyConfig:A.proxyConfig,callTool:async()=>{throw new Error("Not connected")},readResource:async()=>{throw new Error("Not connected")},listPrompts:async O=>{throw new Error("Not connected")},getPrompt:async()=>{throw new Error("Not connected")},authenticate:()=>{},retry:()=>{},clearStorage:()=>{},client:null}}),[n,e,s]),N=b.useMemo(()=>({connections:C,addConnection:v,removeConnection:y,getConnection:w,autoConnect:c,setAutoConnect:S,connectServer:R,disconnectServer:x,updateConnectionConfig:_}),[C,v,y,w,c,S,R,x,_]);return g.jsxs(wB,{value:N,children:[e.filter(k=>c||f.has(k.id)).map(k=>g.jsx(rQ,{url:k.url,name:k.name,proxyConfig:k.proxyConfig,transportType:k.transportType,onUpdate:h,onRemove:()=>y(k.id)},`${k.id}-${k.transportType||"http"}-${k.proxyConfig?.proxyAddress||""}`)),t]})}function IR(){const t=b.use(wB);if(!t)throw new Error("useMcpContext must be used within McpProvider");return t}const aQ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),oQ=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),BO=t=>{const e=oQ(t);return e.charAt(0).toUpperCase()+e.slice(1)},_B=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim(),iQ=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var sQ={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 lQ=b.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:s,iconNode:l,...c},d)=>b.createElement("svg",{ref:d,...sQ,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:_B("lucide",a),...!s&&!iQ(c)&&{"aria-hidden":"true"},...c},[...l.map(([f,m])=>b.createElement(f,m)),...Array.isArray(s)?s:[s]]));const lt=(t,e)=>{const r=b.forwardRef(({className:n,...a},s)=>b.createElement(lQ,{ref:s,iconNode:e,className:_B(`lucide-${aQ(BO(t))}`,`lucide-${t}`,n),...a}));return r.displayName=BO(t),r};const cQ=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],uQ=lt("arrow-up",cQ);const dQ=[["path",{d:"m11 10 3 3",key:"fzmg1i"}],["path",{d:"M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z",key:"p4q2r7"}],["path",{d:"M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031",key:"wy6l02"}]],fQ=lt("brush",dQ);const pQ=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Do=lt("check",pQ);const mQ=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],TB=lt("chevron-down",mQ);const hQ=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],gQ=lt("chevron-up",hQ);const vQ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],bQ=lt("circle-minus",vQ);const yQ=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ic=lt("clock",yQ);const EQ=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],SQ=lt("code",EQ);const xQ=[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]],wQ=lt("cog",xQ);const _Q=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],TQ=lt("command",_Q);const RQ=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],aa=lt("copy",RQ);const CQ=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],eh=lt("database",CQ);const AQ=[["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"}]],RB=lt("download",AQ);const NQ=[["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"}]],qO=lt("external-link",NQ);const kQ=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],IQ=lt("eye-off",kQ);const OQ=[["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"}]],HO=lt("eye",OQ);const DQ=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],LQ=lt("file-code",DQ);const MQ=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],PQ=lt("file-image",MQ);const jQ=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],OR=lt("file-text",jQ);const UQ=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],FQ=lt("file",UQ);const zQ=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],$Q=lt("folder-open",zQ);const BQ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],qQ=lt("globe",BQ);const HQ=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],VQ=lt("grip-vertical",HQ);const GQ=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],CB=lt("history",GQ);const WQ=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],AB=lt("key",WQ);const YQ=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],th=lt("loader-circle",YQ);const KQ=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],ZQ=lt("maximize",KQ);const XQ=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],QQ=lt("message-circle",XQ);const JQ=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],cd=lt("message-square",JQ);const eJ=[["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"}]],VO=lt("monitor",eJ);const tJ=[["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"}]],rJ=lt("moon",tJ);const nJ=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],NB=lt("play",nJ);const aJ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],kB=lt("plus",aJ);const oJ=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],iJ=lt("rotate-ccw",oJ);const sJ=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],DR=lt("save",sJ);const lJ=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],LR=lt("search",lJ);const cJ=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],uJ=lt("send",cJ);const dJ=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],xm=lt("settings",dJ);const fJ=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],pJ=lt("shield",fJ);const mJ=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M20 12h.01",key:"1ykeid"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M4 12h.01",key:"158zrr"}],["path",{d:"M17.657 6.343h.01",key:"31pqzk"}],["path",{d:"M17.657 17.657h.01",key:"jehnf4"}],["path",{d:"M6.343 17.657h.01",key:"gdk6ow"}],["path",{d:"M6.343 6.343h.01",key:"1uurf0"}]],hJ=lt("sun-dim",mJ);const gJ=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Wb=lt("terminal",gJ);const vJ=[["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"}]],rT=lt("trash-2",vJ);const bJ=[["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"}]],yJ=lt("trash",bJ);const EJ=[["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"}]],ws=lt("wrench",EJ);const SJ=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Pd=lt("x",SJ);const xJ=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ud=lt("zap",xJ);function wJ(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const _J=t=>{switch(t){case"success":return CJ;case"info":return NJ;case"warning":return AJ;case"error":return kJ;default:return null}},TJ=Array(12).fill(0),RJ=({visible:t,className:e})=>le.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},le.createElement("div",{className:"sonner-spinner"},TJ.map((r,n)=>le.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),CJ=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),AJ=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},le.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"})),NJ=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),kJ=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),IJ=le.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"},le.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),le.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),OJ=()=>{const[t,e]=le.useState(document.hidden);return le.useEffect(()=>{const r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let nT=1;class DJ{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const r=this.subscribers.indexOf(e);this.subscribers.splice(r,1)}),this.publish=e=>{this.subscribers.forEach(r=>r(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var r;const{message:n,...a}=e,s=typeof e?.id=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:nT++,l=this.toasts.find(d=>d.id===s),c=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...e,id:s,title:n}),{...d,...e,id:s,dismissible:c,title:n}):d):this.addToast({title:n,...a,dismissible:c,id:s}),s},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:e,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),e),this.message=(e,r)=>this.create({...r,message:e}),this.error=(e,r)=>this.create({...r,message:e,type:"error"}),this.success=(e,r)=>this.create({...r,type:"success",message:e}),this.info=(e,r)=>this.create({...r,type:"info",message:e}),this.warning=(e,r)=>this.create({...r,type:"warning",message:e}),this.loading=(e,r)=>this.create({...r,type:"loading",message:e}),this.promise=(e,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:e,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const a=Promise.resolve(e instanceof Function?e():e);let s=n!==void 0,l;const c=a.then(async f=>{if(l=["resolve",f],le.isValidElement(f))s=!1,this.create({id:n,type:"default",message:f});else if(MJ(f)&&!f.ok){s=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${f.status}`):r.error,v=typeof r.description=="function"?await r.description(`HTTP error! status: ${f.status}`):r.description,w=typeof h=="object"&&!le.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:v,...w})}else if(f instanceof Error){s=!1;const h=typeof r.error=="function"?await r.error(f):r.error,v=typeof r.description=="function"?await r.description(f):r.description,w=typeof h=="object"&&!le.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:v,...w})}else if(r.success!==void 0){s=!1;const h=typeof r.success=="function"?await r.success(f):r.success,v=typeof r.description=="function"?await r.description(f):r.description,w=typeof h=="object"&&!le.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:v,...w})}}).catch(async f=>{if(l=["reject",f],r.error!==void 0){s=!1;const m=typeof r.error=="function"?await r.error(f):r.error,h=typeof r.description=="function"?await r.description(f):r.description,y=typeof m=="object"&&!le.isValidElement(m)?m:{message:m};this.create({id:n,type:"error",description:h,...y})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),d=()=>new Promise((f,m)=>c.then(()=>l[0]==="reject"?m(l[1]):f(l[1])).catch(m));return typeof n!="string"&&typeof n!="number"?{unwrap:d}:Object.assign(n,{unwrap:d})},this.custom=(e,r)=>{const n=r?.id||nT++;return this.create({jsx:e(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Sn=new DJ,LJ=(t,e)=>{const r=e?.id||nT++;return Sn.addToast({title:t,...e,id:r}),r},MJ=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",PJ=LJ,jJ=()=>Sn.toasts,UJ=()=>Sn.getActiveToasts(),cr=Object.assign(PJ,{success:Sn.success,info:Sn.info,warning:Sn.warning,error:Sn.error,custom:Sn.custom,message:Sn.message,promise:Sn.promise,dismiss:Sn.dismiss,loading:Sn.loading},{getHistory:jJ,getToasts:UJ});wJ("[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 hp(t){return t.label!==void 0}const FJ=3,zJ="24px",$J="16px",GO=4e3,BJ=356,qJ=14,HJ=45,VJ=200;function ka(...t){return t.filter(Boolean).join(" ")}function GJ(t){const[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}const WJ=t=>{var e,r,n,a,s,l,c,d,f;const{invert:m,toast:h,unstyled:v,interacting:y,setHeights:w,visibleToasts:S,heights:R,index:x,toasts:_,expanded:C,removeToast:N,defaultRichColors:k,closeButton:A,style:I,cancelButtonStyle:O,actionButtonStyle:L,className:M="",descriptionClassName:P="",duration:Y,position:Q,gap:J,expandByDefault:ee,classNames:U,icons:G,closeButtonAriaLabel:H="Close toast"}=t,[X,ae]=le.useState(null),[z,q]=le.useState(null),[$,W]=le.useState(!1),[te,F]=le.useState(!1),[j,Z]=le.useState(!1),[ne,V]=le.useState(!1),[de,fe]=le.useState(!1),[Re,be]=le.useState(0),[xe,Ne]=le.useState(0),ze=le.useRef(h.duration||Y||GO),Me=le.useRef(null),$e=le.useRef(null),ct=x===0,ce=x+1<=S,Ce=h.type,Fe=h.dismissible!==!1,_e=h.className||"",Ie=h.descriptionClassName||"",Oe=le.useMemo(()=>R.findIndex(Qe=>Qe.toastId===h.id)||0,[R,h.id]),Je=le.useMemo(()=>{var Qe;return(Qe=h.closeButton)!=null?Qe:A},[h.closeButton,A]),at=le.useMemo(()=>h.duration||Y||GO,[h.duration,Y]),Rt=le.useRef(0),Ot=le.useRef(0),Cn=le.useRef(0),vr=le.useRef(null),[or,Mt]=Q.split("-"),Zt=le.useMemo(()=>R.reduce((Qe,jt,Qt)=>Qt>=Oe?Qe:Qe+jt.height,0),[R,Oe]),fr=OJ(),Sr=h.invert||m,zn=Ce==="loading";Ot.current=le.useMemo(()=>Oe*J+Zt,[Oe,Zt]),le.useEffect(()=>{ze.current=at},[at]),le.useEffect(()=>{W(!0)},[]),le.useEffect(()=>{const Qe=$e.current;if(Qe){const jt=Qe.getBoundingClientRect().height;return Ne(jt),w(Qt=>[{toastId:h.id,height:jt,position:h.position},...Qt]),()=>w(Qt=>Qt.filter(Lr=>Lr.toastId!==h.id))}},[w,h.id]),le.useLayoutEffect(()=>{if(!$)return;const Qe=$e.current,jt=Qe.style.height;Qe.style.height="auto";const Qt=Qe.getBoundingClientRect().height;Qe.style.height=jt,Ne(Qt),w(Lr=>Lr.find(Xt=>Xt.toastId===h.id)?Lr.map(Xt=>Xt.toastId===h.id?{...Xt,height:Qt}:Xt):[{toastId:h.id,height:Qt,position:h.position},...Lr])},[$,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ir=le.useCallback(()=>{F(!0),be(Ot.current),w(Qe=>Qe.filter(jt=>jt.toastId!==h.id)),setTimeout(()=>{N(h)},VJ)},[h,N,w,Ot]);le.useEffect(()=>{if(h.promise&&Ce==="loading"||h.duration===1/0||h.type==="loading")return;let Qe;return C||y||fr?(()=>{if(Cn.current<Rt.current){const Lr=new Date().getTime()-Rt.current;ze.current=ze.current-Lr}Cn.current=new Date().getTime()})():(()=>{ze.current!==1/0&&(Rt.current=new Date().getTime(),Qe=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ir()},ze.current))})(),()=>clearTimeout(Qe)},[C,y,h,Ce,fr,ir]),le.useEffect(()=>{h.delete&&(ir(),h.onDismiss==null||h.onDismiss.call(h,h))},[ir,h.delete]);function Gt(){var Qe;if(G?.loading){var jt;return le.createElement("div",{className:ka(U?.loader,h==null||(jt=h.classNames)==null?void 0:jt.loader,"sonner-loader"),"data-visible":Ce==="loading"},G.loading)}return le.createElement(RJ,{className:ka(U?.loader,h==null||(Qe=h.classNames)==null?void 0:Qe.loader),visible:Ce==="loading"})}const pn=h.icon||G?.[Ce]||_J(Ce);var ua,an;return le.createElement("li",{tabIndex:0,ref:$e,className:ka(M,_e,U?.toast,h==null||(e=h.classNames)==null?void 0:e.toast,U?.default,U?.[Ce],h==null||(r=h.classNames)==null?void 0:r[Ce]),"data-sonner-toast":"","data-rich-colors":(ua=h.richColors)!=null?ua:k,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":$,"data-promise":!!h.promise,"data-swiped":de,"data-removed":te,"data-visible":ce,"data-y-position":or,"data-x-position":Mt,"data-index":x,"data-front":ct,"data-swiping":j,"data-dismissible":Fe,"data-type":Ce,"data-invert":Sr,"data-swipe-out":ne,"data-swipe-direction":z,"data-expanded":!!(C||ee&&$),"data-testid":h.testId,style:{"--index":x,"--toasts-before":x,"--z-index":_.length-x,"--offset":`${te?Re:Ot.current}px`,"--initial-height":ee?"auto":`${xe}px`,...I,...h.style},onDragEnd:()=>{Z(!1),ae(null),vr.current=null},onPointerDown:Qe=>{Qe.button!==2&&(zn||!Fe||(Me.current=new Date,be(Ot.current),Qe.target.setPointerCapture(Qe.pointerId),Qe.target.tagName!=="BUTTON"&&(Z(!0),vr.current={x:Qe.clientX,y:Qe.clientY})))},onPointerUp:()=>{var Qe,jt,Qt;if(ne||!Fe)return;vr.current=null;const Lr=Number(((Qe=$e.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$n=Number(((jt=$e.current)==null?void 0:jt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Xt=new Date().getTime()-((Qt=Me.current)==null?void 0:Qt.getTime()),Jr=X==="x"?Lr:$n,_a=Math.abs(Jr)/Xt;if(Math.abs(Jr)>=HJ||_a>.11){be(Ot.current),h.onDismiss==null||h.onDismiss.call(h,h),q(X==="x"?Lr>0?"right":"left":$n>0?"down":"up"),ir(),V(!0);return}else{var en,Br;(en=$e.current)==null||en.style.setProperty("--swipe-amount-x","0px"),(Br=$e.current)==null||Br.style.setProperty("--swipe-amount-y","0px")}fe(!1),Z(!1),ae(null)},onPointerMove:Qe=>{var jt,Qt,Lr;if(!vr.current||!Fe||((jt=window.getSelection())==null?void 0:jt.toString().length)>0)return;const Xt=Qe.clientY-vr.current.y,Jr=Qe.clientX-vr.current.x;var _a;const en=(_a=t.swipeDirections)!=null?_a:GJ(Q);!X&&(Math.abs(Jr)>1||Math.abs(Xt)>1)&&ae(Math.abs(Jr)>Math.abs(Xt)?"x":"y");let Br={x:0,y:0};const oe=K=>1/(1.5+Math.abs(K)/20);if(X==="y"){if(en.includes("top")||en.includes("bottom"))if(en.includes("top")&&Xt<0||en.includes("bottom")&&Xt>0)Br.y=Xt;else{const K=Xt*oe(Xt);Br.y=Math.abs(K)<Math.abs(Xt)?K:Xt}}else if(X==="x"&&(en.includes("left")||en.includes("right")))if(en.includes("left")&&Jr<0||en.includes("right")&&Jr>0)Br.x=Jr;else{const K=Jr*oe(Jr);Br.x=Math.abs(K)<Math.abs(Jr)?K:Jr}(Math.abs(Br.x)>0||Math.abs(Br.y)>0)&&fe(!0),(Qt=$e.current)==null||Qt.style.setProperty("--swipe-amount-x",`${Br.x}px`),(Lr=$e.current)==null||Lr.style.setProperty("--swipe-amount-y",`${Br.y}px`)}},Je&&!h.jsx&&Ce!=="loading"?le.createElement("button",{"aria-label":H,"data-disabled":zn,"data-close-button":!0,onClick:zn||!Fe?()=>{}:()=>{ir(),h.onDismiss==null||h.onDismiss.call(h,h)},className:ka(U?.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(an=G?.close)!=null?an:IJ):null,(Ce||h.icon||h.promise)&&h.icon!==null&&(G?.[Ce]!==null||h.icon)?le.createElement("div",{"data-icon":"",className:ka(U?.icon,h==null||(a=h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Gt():null,h.type!=="loading"?pn:null):null,le.createElement("div",{"data-content":"",className:ka(U?.content,h==null||(s=h.classNames)==null?void 0:s.content)},le.createElement("div",{"data-title":"",className:ka(U?.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?le.createElement("div",{"data-description":"",className:ka(P,Ie,U?.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),le.isValidElement(h.cancel)?h.cancel:h.cancel&&hp(h.cancel)?le.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||O,onClick:Qe=>{hp(h.cancel)&&Fe&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Qe),ir())},className:ka(U?.cancelButton,h==null||(d=h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,le.isValidElement(h.action)?h.action:h.action&&hp(h.action)?le.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:Qe=>{hp(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Qe),!Qe.defaultPrevented&&ir())},className:ka(U?.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function WO(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function YJ(t,e){const r={};return[t,e].forEach((n,a)=>{const s=a===1,l=s?"--mobile-offset":"--offset",c=s?$J:zJ;function d(f){["top","right","bottom","left"].forEach(m=>{r[`${l}-${m}`]=typeof f=="number"?`${f}px`:f})}typeof n=="number"||typeof n=="string"?d(n):typeof n=="object"?["top","right","bottom","left"].forEach(f=>{n[f]===void 0?r[`${l}-${f}`]=c:r[`${l}-${f}`]=typeof n[f]=="number"?`${n[f]}px`:n[f]}):d(c)}),r}const KJ=le.forwardRef(function(e,r){const{id:n,invert:a,position:s="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:d,className:f,offset:m,mobileOffset:h,theme:v="light",richColors:y,duration:w,style:S,visibleToasts:R=FJ,toastOptions:x,dir:_=WO(),gap:C=qJ,icons:N,containerAriaLabel:k="Notifications"}=e,[A,I]=le.useState([]),O=le.useMemo(()=>n?A.filter($=>$.toasterId===n):A.filter($=>!$.toasterId),[A,n]),L=le.useMemo(()=>Array.from(new Set([s].concat(O.filter($=>$.position).map($=>$.position)))),[O,s]),[M,P]=le.useState([]),[Y,Q]=le.useState(!1),[J,ee]=le.useState(!1),[U,G]=le.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=le.useRef(null),X=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),ae=le.useRef(null),z=le.useRef(!1),q=le.useCallback($=>{I(W=>{var te;return(te=W.find(F=>F.id===$.id))!=null&&te.delete||Sn.dismiss($.id),W.filter(({id:F})=>F!==$.id)})},[]);return le.useEffect(()=>Sn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{I(W=>W.map(te=>te.id===$.id?{...te,delete:!0}:te))});return}setTimeout(()=>{d$.flushSync(()=>{I(W=>{const te=W.findIndex(F=>F.id===$.id);return te!==-1?[...W.slice(0,te),{...W[te],...$},...W.slice(te+1)]:[$,...W]})})})}),[A]),le.useEffect(()=>{if(v!=="system"){G(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?G("dark"):G("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:W})=>{G(W?"dark":"light")})}catch{$.addListener(({matches:te})=>{try{G(te?"dark":"light")}catch(F){console.error(F)}})}},[v]),le.useEffect(()=>{A.length<=1&&Q(!1)},[A]),le.useEffect(()=>{const $=W=>{var te;if(l.every(Z=>W[Z]||W.code===Z)){var j;Q(!0),(j=H.current)==null||j.focus()}W.code==="Escape"&&(document.activeElement===H.current||(te=H.current)!=null&&te.contains(document.activeElement))&&Q(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[l]),le.useEffect(()=>{if(H.current)return()=>{ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null,z.current=!1)}},[H.current]),le.createElement("section",{ref:r,"aria-label":`${k} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map(($,W)=>{var te;const[F,j]=$.split("-");return O.length?le.createElement("ol",{key:$,dir:_==="auto"?WO():_,tabIndex:-1,ref:H,className:f,"data-sonner-toaster":!0,"data-sonner-theme":U,"data-y-position":F,"data-x-position":j,style:{"--front-toast-height":`${((te=M[0])==null?void 0:te.height)||0}px`,"--width":`${BJ}px`,"--gap":`${C}px`,...S,...YJ(m,h)},onBlur:Z=>{z.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(z.current=!1,ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||z.current||(z.current=!0,ae.current=Z.relatedTarget)},onMouseEnter:()=>Q(!0),onMouseMove:()=>Q(!0),onMouseLeave:()=>{J||Q(!1)},onDragEnd:()=>Q(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||ee(!0)},onPointerUp:()=>ee(!1)},O.filter(Z=>!Z.position&&W===0||Z.position===$).map((Z,ne)=>{var V,de;return le.createElement(WJ,{key:Z.id,icons:N,index:ne,toast:Z,defaultRichColors:y,duration:(V=x?.duration)!=null?V:w,className:x?.className,descriptionClassName:x?.descriptionClassName,invert:a,visibleToasts:R,closeButton:(de=x?.closeButton)!=null?de:d,interacting:J,position:$,style:x?.style,unstyled:x?.unstyled,classNames:x?.classNames,cancelButtonStyle:x?.cancelButtonStyle,actionButtonStyle:x?.actionButtonStyle,closeButtonAriaLabel:x?.closeButtonAriaLabel,removeToast:q,toasts:O.filter(fe=>fe.position==Z.position),heights:M.filter(fe=>fe.position==Z.position),setHeights:P,expandByDefault:c,gap:C,expanded:Y,swipeDirections:e.swipeDirections})})):null}))});var Yb="focusScope.autoFocusOnMount",Kb="focusScope.autoFocusOnUnmount",YO={bubbles:!1,cancelable:!0},ZJ="FocusScope",jd=b.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=t,[c,d]=b.useState(null),f=Ga(a),m=Ga(s),h=b.useRef(null),v=Nt(e,S=>d(S)),y=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let S=function(C){if(y.paused||!c)return;const N=C.target;c.contains(N)?h.current=N:pi(h.current,{select:!0})},R=function(C){if(y.paused||!c)return;const N=C.relatedTarget;N!==null&&(c.contains(N)||pi(h.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const k of C)k.removedNodes.length>0&&pi(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",R);const _=new MutationObserver(x);return c&&_.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",R),_.disconnect()}}},[n,c,y.paused]),b.useEffect(()=>{if(c){ZO.add(y);const S=document.activeElement;if(!c.contains(S)){const x=new CustomEvent(Yb,YO);c.addEventListener(Yb,f),c.dispatchEvent(x),x.defaultPrevented||(XJ(ree(IB(c)),{select:!0}),document.activeElement===S&&pi(c))}return()=>{c.removeEventListener(Yb,f),setTimeout(()=>{const x=new CustomEvent(Kb,YO);c.addEventListener(Kb,m),c.dispatchEvent(x),x.defaultPrevented||pi(S??document.body,{select:!0}),c.removeEventListener(Kb,m),ZO.remove(y)},0)}}},[c,f,m,y]);const w=b.useCallback(S=>{if(!r&&!n||y.paused)return;const R=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,x=document.activeElement;if(R&&x){const _=S.currentTarget,[C,N]=QJ(_);C&&N?!S.shiftKey&&x===N?(S.preventDefault(),r&&pi(C,{select:!0})):S.shiftKey&&x===C&&(S.preventDefault(),r&&pi(N,{select:!0})):x===_&&S.preventDefault()}},[r,n,y.paused]);return g.jsx(bt.div,{tabIndex:-1,...l,ref:v,onKeyDown:w})});jd.displayName=ZJ;function XJ(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(pi(n,{select:e}),document.activeElement!==r)return}function QJ(t){const e=IB(t),r=KO(e,t),n=KO(e.reverse(),t);return[r,n]}function IB(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function KO(t,e){for(const r of t)if(!JJ(r,{upTo:e}))return r}function JJ(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function eee(t){return t instanceof HTMLInputElement&&"select"in t}function pi(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&eee(t)&&e&&t.select()}}var ZO=tee();function tee(){let t=[];return{add(e){const r=t[0];e!==r&&r?.pause(),t=XO(t,e),t.unshift(e)},remove(e){t=XO(t,e),t[0]?.resume()}}}function XO(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function ree(t){return t.filter(e=>e.tagName!=="A")}var Zb=0;function rh(){b.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??QO()),document.body.insertAdjacentElement("beforeend",t[1]??QO()),Zb++,()=>{Zb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Zb--}},[])}function QO(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var La=function(){return La=Object.assign||function(e){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},La.apply(this,arguments)};function OB(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(t);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r}function nee(t,e,r){if(r||arguments.length===2)for(var n=0,a=e.length,s;n<a;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}var jp="right-scroll-bar-position",Up="width-before-scroll-bar",aee="with-scroll-bars-hidden",oee="--removed-body-scroll-bar-size";function Xb(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function iee(t,e){var r=b.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=e,r.facade}var see=typeof window<"u"?b.useLayoutEffect:b.useEffect,JO=new WeakMap;function lee(t,e){var r=iee(null,function(n){return t.forEach(function(a){return Xb(a,n)})});return see(function(){var n=JO.get(r);if(n){var a=new Set(n),s=new Set(t),l=r.current;a.forEach(function(c){s.has(c)||Xb(c,null)}),s.forEach(function(c){a.has(c)||Xb(c,l)})}JO.set(r,t)},[t]),r}function cee(t){return t}function uee(t,e){e===void 0&&(e=cee);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(s){var l=e(s,n);return r.push(l),function(){r=r.filter(function(c){return c!==l})}},assignSyncMedium:function(s){for(n=!0;r.length;){var l=r;r=[],l.forEach(s)}r={push:function(c){return s(c)},filter:function(){return r}}},assignMedium:function(s){n=!0;var l=[];if(r.length){var c=r;r=[],c.forEach(s),l=r}var d=function(){var m=l;l=[],m.forEach(s)},f=function(){return Promise.resolve().then(d)};f(),r={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),r}}}};return a}function dee(t){t===void 0&&(t={});var e=uee(null);return e.options=La({async:!0,ssr:!1},t),e}var DB=function(t){var e=t.sideCar,r=OB(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,La({},r))};DB.isSideCarExport=!0;function fee(t,e){return t.useMedium(e),DB}var LB=dee(),Qb=function(){},nh=b.forwardRef(function(t,e){var r=b.useRef(null),n=b.useState({onScrollCapture:Qb,onWheelCapture:Qb,onTouchMoveCapture:Qb}),a=n[0],s=n[1],l=t.forwardProps,c=t.children,d=t.className,f=t.removeScrollBar,m=t.enabled,h=t.shards,v=t.sideCar,y=t.noRelative,w=t.noIsolation,S=t.inert,R=t.allowPinchZoom,x=t.as,_=x===void 0?"div":x,C=t.gapMode,N=OB(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=v,A=lee([r,e]),I=La(La({},N),a);return b.createElement(b.Fragment,null,m&&b.createElement(k,{sideCar:LB,removeScrollBar:f,shards:h,noRelative:y,noIsolation:w,inert:S,setCallbacks:s,allowPinchZoom:!!R,lockRef:r,gapMode:C}),l?b.cloneElement(b.Children.only(c),La(La({},I),{ref:A})):b.createElement(_,La({},I,{className:d,ref:A}),c))});nh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};nh.classNames={fullWidth:Up,zeroRight:jp};var pee=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mee(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=pee();return e&&t.setAttribute("nonce",e),t}function hee(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function gee(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var vee=function(){var t=0,e=null;return{add:function(r){t==0&&(e=mee())&&(hee(e,r),gee(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},bee=function(){var t=vee();return function(e,r){b.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},MB=function(){var t=bee(),e=function(r){var n=r.styles,a=r.dynamic;return t(n,a),null};return e},yee={left:0,top:0,right:0,gap:0},Jb=function(t){return parseInt(t||"",10)||0},Eee=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],a=e[t==="padding"?"paddingRight":"marginRight"];return[Jb(r),Jb(n),Jb(a)]},See=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return yee;var e=Eee(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},xee=MB(),zl="data-scroll-locked",wee=function(t,e,r,n){var a=t.left,s=t.top,l=t.right,c=t.gap;return r===void 0&&(r="margin"),`
|
|
25
|
+
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let v=Uo(),y;if(e){let _=typeof e=="string"?hc(e):e;dr(m==="/"||_.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${_.pathname}" was given in the \`location\` prop.`),y=_}else y=v;let w=y.pathname||"/",S=w;if(m!=="/"){let _=m.replace(/^\//,"").split("/");S="/"+w.replace(/^\//,"").split("/").slice(_.length).join("/")}let R=W2(t,{pathname:S});qa(h||R!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),qa(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=V7(R&&R.map(_=>Object.assign({},_,{params:Object.assign({},d,_.params),pathname:Co([m,s.encodeLocation?s.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?m:Co([m,s.encodeLocation?s.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),l,r,n,a);return e&&x?b.createElement(kd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...y},navigationType:"POP"}},x):x}function $7(){let t=Z7(),e=L7(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",t),l=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:s},"ErrorBoundary")," or"," ",b.createElement("code",{style:s},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),r?b.createElement("pre",{style:a},r):null,l)}var B7=b.createElement($7,null),q7=class extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.unstable_onError?this.props.unstable_onError(t,e):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?b.createElement(jo.Provider,{value:this.props.routeContext},b.createElement(pR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function H7({routeContext:t,match:e,children:r}){let n=b.useContext(gc);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),b.createElement(jo.Provider,{value:t},r)}function V7(t,e=[],r=null,n=null,a=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let s=t,l=r?.errors;if(l!=null){let f=s.findIndex(m=>m.route.id&&l?.[m.route.id]!==void 0);dr(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,f+1))}let c=!1,d=-1;if(r)for(let f=0;f<s.length;f++){let m=s[f];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=f),m.route.id){let{loaderData:h,errors:v}=r,y=m.route.loader&&!h.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||y){c=!0,d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((f,m,h)=>{let v,y=!1,w=null,S=null;r&&(v=l&&m.route.id?l[m.route.id]:void 0,w=m.route.errorElement||B7,c&&(d<0&&h===0?(n$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,S=null):d===h&&(y=!0,S=m.route.hydrateFallbackElement||null)));let R=e.concat(s.slice(0,h+1)),x=()=>{let _;return v?_=w:y?_=S:m.route.Component?_=b.createElement(m.route.Component,null):m.route.element?_=m.route.element:_=f,b.createElement(H7,{match:m,routeContext:{outlet:f,matches:R,isDataRoute:r!=null},children:_})};return r&&(m.route.ErrorBoundary||m.route.errorElement||h===0)?b.createElement(q7,{location:r.location,revalidation:r.revalidation,component:w,error:v,children:x(),routeContext:{outlet:null,matches:R,isDataRoute:!0},unstable_onError:n}):x()},null)}function mR(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function G7(t){let e=b.useContext(gc);return dr(e,mR(t)),e}function W7(t){let e=b.useContext(Bm);return dr(e,mR(t)),e}function Y7(t){let e=b.useContext(jo);return dr(e,mR(t)),e}function hR(t){let e=Y7(t),r=e.matches[e.matches.length-1];return dr(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function K7(){return hR("useRouteId")}function Z7(){let t=b.useContext(pR),e=W7("useRouteError"),r=hR("useRouteError");return t!==void 0?t:e.errors?.[r]}function X7(){let{router:t}=G7("useNavigate"),e=hR("useNavigate"),r=b.useRef(!1);return t$(()=>{r.current=!0}),b.useCallback(async(a,s={})=>{qa(r.current,e$),r.current&&(typeof a=="number"?t.navigate(a):await t.navigate(a,{fromRouteId:e,...s}))},[t,e])}var mO={};function n$(t,e,r){!e&&!mO[t]&&(mO[t]=!0,qa(!1,r))}b.memo(Q7);function Q7({routes:t,future:e,state:r,unstable_onError:n}){return r$(t,void 0,r,n,e)}function a$(t){dr(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function J7({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:a,static:s=!1}){dr(!Id(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:a,static:s,future:{}}),[l,a,s]);typeof r=="string"&&(r=hc(r));let{pathname:d="/",search:f="",hash:m="",state:h=null,key:v="default"}=r,y=b.useMemo(()=>{let w=ko(d,l);return w==null?null:{location:{pathname:w,search:f,hash:m,state:h,key:v},navigationType:n}},[l,d,f,m,h,v,n]);return qa(y!=null,`<Router basename="${l}"> is not able to match the URL "${d}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:b.createElement(Ka.Provider,{value:c},b.createElement(kd.Provider,{children:e,value:y}))}function eY({children:t,location:e}){return z7(Y_(t),e)}function Y_(t,e=[]){let r=[];return b.Children.forEach(t,(n,a)=>{if(!b.isValidElement(n))return;let s=[...e,a];if(n.type===b.Fragment){r.push.apply(r,Y_(n.props.children,s));return}dr(n.type===a$,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),dr(!n.props.index||!n.props.children,"An index route cannot have child routes.");let l={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=Y_(n.props.children,s)),r.push(l)}),r}var Lp="get",Mp="application/x-www-form-urlencoded";function qm(t){return t!=null&&typeof t.tagName=="string"}function tY(t){return qm(t)&&t.tagName.toLowerCase()==="button"}function rY(t){return qm(t)&&t.tagName.toLowerCase()==="form"}function nY(t){return qm(t)&&t.tagName.toLowerCase()==="input"}function aY(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function oY(t,e){return t.button===0&&(!e||e==="_self")&&!aY(t)}var up=null;function iY(){if(up===null)try{new FormData(document.createElement("form"),0),up=!1}catch{up=!0}return up}var sY=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zb(t){return t!=null&&!sY.has(t)?(qa(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Mp}"`),null):t}function lY(t,e){let r,n,a,s,l;if(rY(t)){let c=t.getAttribute("action");n=c?ko(c,e):null,r=t.getAttribute("method")||Lp,a=zb(t.getAttribute("enctype"))||Mp,s=new FormData(t)}else if(tY(t)||nY(t)&&(t.type==="submit"||t.type==="image")){let c=t.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=t.getAttribute("formaction")||c.getAttribute("action");if(n=d?ko(d,e):null,r=t.getAttribute("formmethod")||c.getAttribute("method")||Lp,a=zb(t.getAttribute("formenctype"))||zb(c.getAttribute("enctype"))||Mp,s=new FormData(c,t),!iY()){let{name:f,type:m,value:h}=t;if(m==="image"){let v=f?`${f}.`:"";s.append(`${v}x`,"0"),s.append(`${v}y`,"0")}else f&&s.append(f,h)}}else{if(qm(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Lp,n=null,a=Mp,l=t}return s&&a==="text/plain"&&(l=s,s=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gR(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function cY(t,e,r){let n=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n.pathname==="/"?n.pathname=`_root.${r}`:e&&ko(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function uY(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dY(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function fY(t,e,r){let n=await Promise.all(t.map(async a=>{let s=e.routes[a.route.id];if(s){let l=await uY(s,r);return l.links?l.links():[]}return[]}));return gY(n.flat(1).filter(dY).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function hO(t,e,r,n,a,s){let l=(d,f)=>r[f]?d.route.id!==r[f].route.id:!0,c=(d,f)=>r[f].pathname!==d.pathname||r[f].route.path?.endsWith("*")&&r[f].params["*"]!==d.params["*"];return s==="assets"?e.filter((d,f)=>l(d,f)||c(d,f)):s==="data"?e.filter((d,f)=>{let m=n.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,f)||c(d,f))return!0;if(d.route.shouldRevalidate){let h=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function pY(t,e,{includeHydrateFallback:r}={}){return mY(t.map(n=>{let a=e.routes[n.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function mY(t){return[...new Set(t)]}function hY(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function gY(t,e){let r=new Set;return new Set(e),t.reduce((n,a)=>{let s=JSON.stringify(hY(a));return r.has(s)||(r.add(s),n.push({key:s,link:a})),n},[])}function o$(){let t=b.useContext(gc);return gR(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function vY(){let t=b.useContext(Bm);return gR(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var vR=b.createContext(void 0);vR.displayName="FrameworkContext";function i$(){let t=b.useContext(vR);return gR(t,"You must render this element inside a <HydratedRouter> element"),t}function bY(t,e){let r=b.useContext(vR),[n,a]=b.useState(!1),[s,l]=b.useState(!1),{onFocus:c,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:h}=e,v=b.useRef(null);b.useEffect(()=>{if(t==="render"&&l(!0),t==="viewport"){let S=x=>{x.forEach(_=>{l(_.isIntersecting)})},R=new IntersectionObserver(S,{threshold:.5});return v.current&&R.observe(v.current),()=>{R.disconnect()}}},[t]),b.useEffect(()=>{if(n){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[n]);let y=()=>{a(!0)},w=()=>{a(!1),l(!1)};return r?t!=="intent"?[s,v,{}]:[s,v,{onFocus:bu(c,y),onBlur:bu(d,w),onMouseEnter:bu(f,y),onMouseLeave:bu(m,w),onTouchStart:bu(h,y)}]:[!1,v,{}]}function bu(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function yY({page:t,...e}){let{router:r}=o$(),n=b.useMemo(()=>W2(r.routes,t,r.basename),[r.routes,t,r.basename]);return n?b.createElement(SY,{page:t,matches:n,...e}):null}function EY(t){let{manifest:e,routeModules:r}=i$(),[n,a]=b.useState([]);return b.useEffect(()=>{let s=!1;return fY(t,e,r).then(l=>{s||a(l)}),()=>{s=!0}},[t,e,r]),n}function SY({page:t,matches:e,...r}){let n=Uo(),{manifest:a,routeModules:s}=i$(),{basename:l}=o$(),{loaderData:c,matches:d}=vY(),f=b.useMemo(()=>hO(t,e,d,a,n,"data"),[t,e,d,a,n]),m=b.useMemo(()=>hO(t,e,d,a,n,"assets"),[t,e,d,a,n]),h=b.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let w=new Set,S=!1;if(e.forEach(x=>{let _=a.routes[x.route.id];!_||!_.hasLoader||(!f.some(C=>C.route.id===x.route.id)&&x.route.id in c&&s[x.route.id]?.shouldRevalidate||_.hasClientLoader?S=!0:w.add(x.route.id))}),w.size===0)return[];let R=cY(t,l,"data");return S&&w.size>0&&R.searchParams.set("_routes",e.filter(x=>w.has(x.route.id)).map(x=>x.route.id).join(",")),[R.pathname+R.search]},[l,c,n,a,f,e,t,s]),v=b.useMemo(()=>pY(m,a),[m,a]),y=EY(m);return b.createElement(b.Fragment,null,h.map(w=>b.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),v.map(w=>b.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),y.map(({key:w,link:S})=>b.createElement("link",{key:w,nonce:r.nonce,...S})))}function xY(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var s$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{s$&&(window.__reactRouterVersion="7.9.5")}catch{}function wY({basename:t,children:e,window:r}){let n=b.useRef();n.current==null&&(n.current=d7({window:r,v5Compat:!0}));let a=n.current,[s,l]=b.useState({action:a.action,location:a.location}),c=b.useCallback(d=>{b.startTransition(()=>l(d))},[l]);return b.useLayoutEffect(()=>a.listen(c),[a,c]),b.createElement(J7,{basename:t,children:e,location:s.location,navigationType:s.action,navigator:a})}var l$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,c$=b.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:a,reloadDocument:s,replace:l,state:c,target:d,to:f,preventScrollReset:m,viewTransition:h,...v},y){let{basename:w}=b.useContext(Ka),S=typeof f=="string"&&l$.test(f),R,x=!1;if(typeof f=="string"&&S&&(R=f,s$))try{let L=new URL(window.location.href),M=f.startsWith("//")?new URL(L.protocol+f):new URL(f),P=ko(M.pathname,w);M.origin===L.origin&&P!=null?f=P+M.search+M.hash:x=!0}catch{qa(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let _=U7(f,{relative:a}),[C,N,k]=bY(n,v),A=CY(f,{replace:l,state:c,target:d,preventScrollReset:m,relative:a,viewTransition:h});function I(L){e&&e(L),L.defaultPrevented||A(L)}let O=b.createElement("a",{...v,...k,href:R||_,onClick:x||s?e:I,ref:xY(y,N),target:d,"data-discover":!S&&r==="render"?"true":void 0});return C&&!S?b.createElement(b.Fragment,null,O,b.createElement(yY,{page:_})):O});c$.displayName="Link";var _Y=b.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:a=!1,style:s,to:l,viewTransition:c,children:d,...f},m){let h=Od(l,{relative:f.relative}),v=Uo(),y=b.useContext(Bm),{navigator:w,basename:S}=b.useContext(Ka),R=y!=null&&OY(h)&&c===!0,x=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,_=v.pathname,C=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;r||(_=_.toLowerCase(),C=C?C.toLowerCase():null,x=x.toLowerCase()),C&&S&&(C=ko(C,S)||C);const N=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let k=_===x||!a&&_.startsWith(x)&&_.charAt(N)==="/",A=C!=null&&(C===x||!a&&C.startsWith(x)&&C.charAt(x.length)==="/"),I={isActive:k,isPending:A,isTransitioning:R},O=k?e:void 0,L;typeof n=="function"?L=n(I):L=[n,k?"active":null,A?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let M=typeof s=="function"?s(I):s;return b.createElement(c$,{...f,"aria-current":O,className:L,ref:m,style:M,to:l,viewTransition:c},typeof d=="function"?d(I):d)});_Y.displayName="NavLink";var TY=b.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:a,state:s,method:l=Lp,action:c,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:h,...v},y)=>{let w=kY(),S=IY(c,{relative:f}),R=l.toLowerCase()==="get"?"get":"post",x=typeof c=="string"&&l$.test(c),_=C=>{if(d&&d(C),C.defaultPrevented)return;C.preventDefault();let N=C.nativeEvent.submitter,k=N?.getAttribute("formmethod")||l;w(N||C.currentTarget,{fetcherKey:e,method:k,navigate:r,replace:a,state:s,relative:f,preventScrollReset:m,viewTransition:h})};return b.createElement("form",{ref:y,method:R,action:S,onSubmit:n?d:_,...v,"data-discover":!x&&t==="render"?"true":void 0})});TY.displayName="Form";function RY(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function u$(t){let e=b.useContext(gc);return dr(e,RY(t)),e}function CY(t,{target:e,replace:r,state:n,preventScrollReset:a,relative:s,viewTransition:l}={}){let c=vc(),d=Uo(),f=Od(t,{relative:s});return b.useCallback(m=>{if(oY(m,e)){m.preventDefault();let h=r!==void 0?r:od(d)===od(f);c(t,{replace:h,state:n,preventScrollReset:a,relative:s,viewTransition:l})}},[d,c,f,r,n,e,t,a,s,l])}var AY=0,NY=()=>`__${String(++AY)}__`;function kY(){let{router:t}=u$("useSubmit"),{basename:e}=b.useContext(Ka),r=K7();return b.useCallback(async(n,a={})=>{let{action:s,method:l,encType:c,formData:d,body:f}=lY(n,e);if(a.navigate===!1){let m=a.fetcherKey||NY();await t.fetch(m,r,a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||c,flushSync:a.flushSync})}else await t.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[t,e,r])}function IY(t,{relative:e}={}){let{basename:r}=b.useContext(Ka),n=b.useContext(jo);dr(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),s={...Od(t||".",{relative:e})},l=Uo();if(t==null){s.search=l.search;let c=new URLSearchParams(s.search),d=c.getAll("index");if(d.some(m=>m==="")){c.delete("index"),d.filter(h=>h).forEach(h=>c.append("index",h));let m=c.toString();s.search=m?`?${m}`:""}}return(!t||t===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Co([r,s.pathname])),od(s)}function OY(t,{relative:e}={}){let r=b.useContext(J2);dr(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=u$("useViewTransitionState"),a=Od(t,{relative:e});if(!r.isTransitioning)return!1;let s=ko(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=ko(r.nextLocation.pathname,n)||r.nextLocation.pathname;return hm(a.pathname,l)!=null||hm(a.pathname,s)!=null}var bc=G2();const d$=fc(bc);function gO(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ha(...t){return e=>{let r=!1;const n=t.map(a=>{const s=gO(a,e);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a<n.length;a++){const s=n[a];typeof s=="function"?s():gO(t[a],null)}}}}function Nt(...t){return b.useCallback(Ha(...t),t)}var DY=Symbol.for("react.lazy"),gm=$m[" use ".trim().toString()];function LY(t){return typeof t=="object"&&t!==null&&"then"in t}function f$(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===DY&&"_payload"in t&&LY(t._payload)}function p$(t){const e=MY(t),r=b.forwardRef((n,a)=>{let{children:s,...l}=n;f$(s)&&typeof gm=="function"&&(s=gm(s._payload));const c=b.Children.toArray(s),d=c.find(jY);if(d){const f=d.props.children,m=c.map(h=>h===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...l,ref:a,children:b.isValidElement(f)?b.cloneElement(f,void 0,m):null})}return g.jsx(e,{...l,ref:a,children:s})});return r.displayName=`${t}.Slot`,r}var m$=p$("Slot");function MY(t){const e=b.forwardRef((r,n)=>{let{children:a,...s}=r;if(f$(a)&&typeof gm=="function"&&(a=gm(a._payload)),b.isValidElement(a)){const l=FY(a),c=UY(s,a.props);return a.type!==b.Fragment&&(c.ref=n?Ha(n,l):l),b.cloneElement(a,c)}return b.Children.count(a)>1?b.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var PY=Symbol("radix.slottable");function jY(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===PY}function UY(t,e){const r={...e};for(const n in e){const a=t[n],s=e[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...c)=>{const d=s(...c);return a(...c),d}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...t,...r}}function FY(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function h$(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=h$(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function g$(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=h$(t))&&(n&&(n+=" "),n+=e);return n}const vO=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,bO=g$,v$=(t,e)=>r=>{var n;if(e?.variants==null)return bO(t,r?.class,r?.className);const{variants:a,defaultVariants:s}=e,l=Object.keys(a).map(f=>{const m=r?.[f],h=s?.[f];if(m===null)return null;const v=vO(m)||vO(h);return a[f][v]}),c=r&&Object.entries(r).reduce((f,m)=>{let[h,v]=m;return v===void 0||(f[h]=v),f},{}),d=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((f,m)=>{let{class:h,className:v,...y}=m;return Object.entries(y).every(w=>{let[S,R]=w;return Array.isArray(R)?R.includes({...s,...c}[S]):{...s,...c}[S]===R})?[...f,h,v]:f},[]);return bO(t,l,d,r?.class,r?.className)},zY=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},$Y=(t,e)=>({classGroupId:t,validator:e}),b$=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),vm="-",yO=[],BY="arbitrary..",qY=t=>{const e=VY(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return HY(l);const c=l.split(vm),d=c[0]===""&&c.length>1?1:0;return y$(c,d,e)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=n[l],f=r[l];return d?f?zY(f,d):d:f||yO}return r[l]||yO}}},y$=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const a=t[e],s=r.nextPart.get(a);if(s){const f=y$(t,e+1,s);if(f)return f}const l=r.validators;if(l===null)return;const c=e===0?t.join(vm):t.slice(e).join(vm),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(c))return m.classGroupId}},HY=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?BY+n:void 0})(),VY=t=>{const{theme:e,classGroups:r}=t;return GY(r,e)},GY=(t,e)=>{const r=b$();for(const n in t){const a=t[n];bR(a,r,n,e)}return r},bR=(t,e,r,n)=>{const a=t.length;for(let s=0;s<a;s++){const l=t[s];WY(l,e,r,n)}},WY=(t,e,r,n)=>{if(typeof t=="string"){YY(t,e,r);return}if(typeof t=="function"){KY(t,e,r,n);return}ZY(t,e,r,n)},YY=(t,e,r)=>{const n=t===""?e:E$(e,t);n.classGroupId=r},KY=(t,e,r,n)=>{if(XY(t)){bR(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push($Y(r,t))},ZY=(t,e,r,n)=>{const a=Object.entries(t),s=a.length;for(let l=0;l<s;l++){const[c,d]=a[l];bR(d,E$(e,c),r,n)}},E$=(t,e)=>{let r=t;const n=e.split(vm),a=n.length;for(let s=0;s<a;s++){const l=n[s];let c=r.nextPart.get(l);c||(c=b$(),r.nextPart.set(l,c)),r=c}return r},XY=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,QY=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const a=(s,l)=>{r[s]=l,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(s){let l=r[s];if(l!==void 0)return l;if((l=n[s])!==void 0)return a(s,l),l},set(s,l){s in r?r[s]=l:a(s,l)}}},K_="!",EO=":",JY=[],SO=(t,e,r,n,a)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),eK=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=a=>{const s=[];let l=0,c=0,d=0,f;const m=a.length;for(let S=0;S<m;S++){const R=a[S];if(l===0&&c===0){if(R===EO){s.push(a.slice(d,S)),d=S+1;continue}if(R==="/"){f=S;continue}}R==="["?l++:R==="]"?l--:R==="("?c++:R===")"&&c--}const h=s.length===0?a:a.slice(d);let v=h,y=!1;h.endsWith(K_)?(v=h.slice(0,-1),y=!0):h.startsWith(K_)&&(v=h.slice(1),y=!0);const w=f&&f>d?f-d:void 0;return SO(s,y,v,w)};if(e){const a=e+EO,s=n;n=l=>l.startsWith(a)?s(l.slice(a.length)):SO(JY,!1,l,void 0,!0)}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},tK=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let a=[];for(let s=0;s<r.length;s++){const l=r[s],c=l[0]==="[",d=e.has(l);c||d?(a.length>0&&(a.sort(),n.push(...a),a=[]),n.push(l)):a.push(l)}return a.length>0&&(a.sort(),n.push(...a)),n}},rK=t=>({cache:QY(t.cacheSize),parseClassName:eK(t),sortModifiers:tK(t),...qY(t)}),nK=/\s+/,aK=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=e,l=[],c=t.trim().split(nK);let d="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{isExternal:h,modifiers:v,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:S}=r(m);if(h){d=m+(d.length>0?" "+d:d);continue}let R=!!S,x=n(R?w.substring(0,S):w);if(!x){if(!R){d=m+(d.length>0?" "+d:d);continue}if(x=n(w),!x){d=m+(d.length>0?" "+d:d);continue}R=!1}const _=v.length===0?"":v.length===1?v[0]:s(v).join(":"),C=y?_+K_:_,N=C+x;if(l.indexOf(N)>-1)continue;l.push(N);const k=a(x,R);for(let A=0;A<k.length;++A){const I=k[A];l.push(C+I)}d=m+(d.length>0?" "+d:d)}return d},oK=(...t)=>{let e=0,r,n,a="";for(;e<t.length;)(r=t[e++])&&(n=S$(r))&&(a&&(a+=" "),a+=n);return a},S$=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=S$(t[n]))&&(r&&(r+=" "),r+=e);return r},iK=(t,...e)=>{let r,n,a,s;const l=d=>{const f=e.reduce((m,h)=>h(m),t());return r=rK(f),n=r.cache.get,a=r.cache.set,s=c,c(d)},c=d=>{const f=n(d);if(f)return f;const m=aK(d,r);return a(d,m),m};return s=l,(...d)=>s(oK(...d))},sK=[],Ir=t=>{const e=r=>r[t]||sK;return e.isThemeGetter=!0,e},x$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,w$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lK=/^\d+\/\d+$/,cK=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uK=/\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$/,dK=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fK=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pK=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fl=t=>lK.test(t),vt=t=>!!t&&!Number.isNaN(Number(t)),ui=t=>!!t&&Number.isInteger(Number(t)),$b=t=>t.endsWith("%")&&vt(t.slice(0,-1)),vo=t=>cK.test(t),mK=()=>!0,hK=t=>uK.test(t)&&!dK.test(t),_$=()=>!1,gK=t=>fK.test(t),vK=t=>pK.test(t),bK=t=>!Ge(t)&&!We(t),yK=t=>yc(t,C$,_$),Ge=t=>x$.test(t),ts=t=>yc(t,A$,hK),Bb=t=>yc(t,_K,vt),xO=t=>yc(t,T$,_$),EK=t=>yc(t,R$,vK),dp=t=>yc(t,N$,gK),We=t=>w$.test(t),yu=t=>Ec(t,A$),SK=t=>Ec(t,TK),wO=t=>Ec(t,T$),xK=t=>Ec(t,C$),wK=t=>Ec(t,R$),fp=t=>Ec(t,N$,!0),yc=(t,e,r)=>{const n=x$.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},Ec=(t,e,r=!1)=>{const n=w$.exec(t);return n?n[1]?e(n[1]):r:!1},T$=t=>t==="position"||t==="percentage",R$=t=>t==="image"||t==="url",C$=t=>t==="length"||t==="size"||t==="bg-size",A$=t=>t==="length",_K=t=>t==="number",TK=t=>t==="family-name",N$=t=>t==="shadow",RK=()=>{const t=Ir("color"),e=Ir("font"),r=Ir("text"),n=Ir("font-weight"),a=Ir("tracking"),s=Ir("leading"),l=Ir("breakpoint"),c=Ir("container"),d=Ir("spacing"),f=Ir("radius"),m=Ir("shadow"),h=Ir("inset-shadow"),v=Ir("text-shadow"),y=Ir("drop-shadow"),w=Ir("blur"),S=Ir("perspective"),R=Ir("aspect"),x=Ir("ease"),_=Ir("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...N(),We,Ge],A=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],O=()=>[We,Ge,d],L=()=>[fl,"full","auto",...O()],M=()=>[ui,"none","subgrid",We,Ge],P=()=>["auto",{span:["full",ui,We,Ge]},ui,We,Ge],Y=()=>[ui,"auto",We,Ge],Q=()=>["auto","min","max","fr",We,Ge],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...O()],G=()=>[fl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],H=()=>[t,We,Ge],X=()=>[...N(),wO,xO,{position:[We,Ge]}],ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",xK,yK,{size:[We,Ge]}],q=()=>[$b,yu,ts],$=()=>["","none","full",f,We,Ge],W=()=>["",vt,yu,ts],te=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>[vt,$b,wO,xO],Z=()=>["","none",w,We,Ge],ne=()=>["none",vt,We,Ge],V=()=>["none",vt,We,Ge],de=()=>[vt,We,Ge],fe=()=>[fl,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[vo],breakpoint:[vo],color:[mK],container:[vo],"drop-shadow":[vo],ease:["in","out","in-out"],font:[bK],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[vo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[vo],shadow:[vo],spacing:["px",vt],text:[vo],"text-shadow":[vo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fl,Ge,We,R]}],container:["container"],columns:[{columns:[vt,Ge,We,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],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:k()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[ui,"auto",We,Ge]}],basis:[{basis:[fl,"full","auto",c,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[vt,fl,"auto","initial","none",Ge]}],grow:[{grow:["",vt,We,Ge]}],shrink:[{shrink:["",vt,We,Ge]}],order:[{order:[ui,"first","last","none",We,Ge]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[c,"screen",...G()]}],"min-w":[{"min-w":[c,"screen","none",...G()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,yu,ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,We,Bb]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$b,Ge]}],"font-family":[{font:[SK,Ge,e]}],"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:[a,We,Ge]}],"line-clamp":[{"line-clamp":[vt,"none",We,Bb]}],leading:[{leading:[s,...O()]}],"list-image":[{"list-image":["none",We,Ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",We,Ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[vt,"from-font","auto",We,ts]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[vt,"auto",We,Ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",We,Ge]}],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",We,Ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ui,We,Ge],radial:["",We,Ge],conic:[ui,We,Ge]},wK,EK]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[vt,We,Ge]}],"outline-w":[{outline:["",vt,yu,ts]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",m,fp,dp]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",h,fp,dp]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[vt,ts]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",v,fp,dp]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[vt,We,Ge]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],"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":[vt]}],"mask-image-linear-from-pos":[{"mask-linear-from":j()}],"mask-image-linear-to-pos":[{"mask-linear-to":j()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":j()}],"mask-image-t-to-pos":[{"mask-t-to":j()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":j()}],"mask-image-r-to-pos":[{"mask-r-to":j()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":j()}],"mask-image-b-to-pos":[{"mask-b-to":j()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":j()}],"mask-image-l-to-pos":[{"mask-l-to":j()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":j()}],"mask-image-x-to-pos":[{"mask-x-to":j()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":j()}],"mask-image-y-to-pos":[{"mask-y-to":j()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[We,Ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":j()}],"mask-image-radial-to-pos":[{"mask-radial-to":j()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":N()}],"mask-image-conic-pos":[{"mask-conic":[vt]}],"mask-image-conic-from-pos":[{"mask-conic-from":j()}],"mask-image-conic-to-pos":[{"mask-conic-to":j()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",We,Ge]}],filter:[{filter:["","none",We,Ge]}],blur:[{blur:Z()}],brightness:[{brightness:[vt,We,Ge]}],contrast:[{contrast:[vt,We,Ge]}],"drop-shadow":[{"drop-shadow":["","none",y,fp,dp]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",vt,We,Ge]}],"hue-rotate":[{"hue-rotate":[vt,We,Ge]}],invert:[{invert:["",vt,We,Ge]}],saturate:[{saturate:[vt,We,Ge]}],sepia:[{sepia:["",vt,We,Ge]}],"backdrop-filter":[{"backdrop-filter":["","none",We,Ge]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[vt,We,Ge]}],"backdrop-contrast":[{"backdrop-contrast":[vt,We,Ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",vt,We,Ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[vt,We,Ge]}],"backdrop-invert":[{"backdrop-invert":["",vt,We,Ge]}],"backdrop-opacity":[{"backdrop-opacity":[vt,We,Ge]}],"backdrop-saturate":[{"backdrop-saturate":[vt,We,Ge]}],"backdrop-sepia":[{"backdrop-sepia":["",vt,We,Ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",We,Ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[vt,"initial",We,Ge]}],ease:[{ease:["linear","initial",x,We,Ge]}],delay:[{delay:[vt,We,Ge]}],animate:[{animate:["none",_,We,Ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,We,Ge]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:V()}],"scale-x":[{"scale-x":V()}],"scale-y":[{"scale-y":V()}],"scale-z":[{"scale-z":V()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[We,Ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",We,Ge]}],"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":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",We,Ge]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[vt,yu,ts,Bb]}],stroke:[{stroke:["none",...H()]}],"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"]}},CK=iK(RK);function De(...t){return CK(g$(t))}const AK=v$("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 Va({className:t,variant:e,asChild:r=!1,...n}){const a=r?m$:"span";return g.jsx(a,{"data-slot":"badge",className:De(AK({variant:e}),t),...n})}const NK=v$("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-full 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-full gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-full px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function tt({className:t,variant:e,size:r,asChild:n=!1,...a}){const s=n?m$:"button";return g.jsx(s,{"data-slot":"button",className:De(NK({variant:e,size:r,className:t})),...a})}var kK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fo=kK.reduce((t,e)=>{const r=p$(`Primitive.${e}`),n=b.forwardRef((a,s)=>{const{asChild:l,...c}=a,d=l?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...c,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),IK="Label",k$=b.forwardRef((t,e)=>g.jsx(Fo.label,{...t,ref:e,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));k$.displayName=IK;var OK=k$;function lr({className:t,...e}){return g.jsx(OK,{"data-slot":"label",className:De("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",t),...e})}function yR({message:t,className:e="",vertical:r,noBorder:n}){return g.jsx("div",{className:De(`mt-2 rounded-md p-6 ${e}`,!n&&"border"),children:g.jsxs("p",{className:De("text-sm text-muted-foreground flex items-center gap-4",r&&"flex-col"),children:[g.jsx("svg",{width:"40",height:"40",viewBox:"0 0 273 273",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",children:g.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:g.jsxs("g",{transform:"translate(5.320900, 5.320900)",fillRule:"nonzero",className:"stroke-black dark:stroke-white",strokeWidth:"4",children:[g.jsx("path",{d:"M49.953025,-2.10854389 C63.26892,-2.21867124 76.6185256,2.70621155 86.9019463,12.6653164 L86.9019463,12.6653164 L87.505627,13.2592944 C97.5154947,23.2654892 102.640454,36.3074513 102.880738,49.4222247 C103.08932,77.4533067 113.877287,105.391753 135.242867,126.757333 C156.613383,148.127849 184.559216,158.914875 212.568138,159.119313 L212.568138,159.119313 L213.212264,159.134159 C225.843948,159.517566 238.363557,164.434972 248.121998,173.886137 L248.121998,173.886137 L248.725621,174.480088 C258.982114,184.732164 264.11035,198.171134 264.11035,211.6101 C264.11035,225.04592 258.984514,238.481745 248.732867,248.732867 C238.592792,258.872942 225.336706,263.997882 212.046872,264.107794 C198.731075,264.21792 185.381569,259.293085 175.098248,249.334078 L175.098248,249.334078 L174.494602,248.740134 C163.75802,238.008189 158.640853,223.784027 159.143413,209.719372 C158.258245,182.640933 147.489786,155.83332 126.828333,135.171867 C106.351297,114.694831 79.8363505,103.934873 53.0237258,102.891841 L53.0237258,102.891841 L52.2811438,102.865674 C38.4791718,103.347421 24.5325234,98.4328111 13.8776628,88.1140866 L13.8776628,88.1140866 L13.2739843,87.5201168 C3.12895117,77.3789607 -1.9984796,64.1195994 -2.10841888,50.8264755 C-2.21854669,37.5105567 2.70635908,24.1609269 12.6655135,13.8774565 L12.6655135,13.8774565 L13.2594878,13.2737797 C23.4005926,3.12880025 36.659927,-1.99860507 49.953025,-2.10854389 Z"}),g.jsx("circle",{cx:"50",cy:"212.0001",r:"52.5"}),g.jsx("circle",{cx:"212.0001",cy:"50",r:"52.5"})]})})}),t]})})}function I$({className:t,color:e,children:r,grayscaled:n=!1}){const a=b.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[1]||"0")}return n?0:.2},[e,n]),s=b.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[0]||"0.5")}return n?.3:.4},[e,n]),l=b.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[2]||"0")}return Math.floor(Math.random()*360)},[e]),c=b.useMemo(()=>e||`oklch(${Math.min(s,1)} ${a} ${l})`,[l,a,s]),d=b.useMemo(()=>`oklch(${Math.min(s*2,1)} ${a} ${l})`,[l,a,s,e]),f=b.useMemo(()=>Math.floor(Math.random()*360),[l]),m=b.useMemo(()=>"1000%",[]);return g.jsx("section",{className:De("relative w-full h-full overflow-hidden",t),style:{background:`${d}`},children:g.jsxs("div",{className:"isolate relative w-full h-full",children:[g.jsx("div",{className:"noise w-full h-full",style:{background:`linear-gradient(${f}deg, ${c}, transparent), url(https://grainy-gradients.vercel.app/noise.svg)`,filter:`contrast(120%) brightness(${m})`}}),r&&g.jsx("div",{className:"relative z-10 w-full h-full",children:r})]})})}function He(t,e,{checkForDefaultPrevented:r=!0}={}){return function(a){if(t?.(a),r===!1||!a.defaultPrevented)return e?.(a)}}function DK(t,e){const r=b.createContext(e),n=s=>{const{children:l,...c}=s,d=b.useMemo(()=>c,Object.values(c));return g.jsx(r.Provider,{value:d,children:l})};n.displayName=t+"Provider";function a(s){const l=b.useContext(r);if(l)return l;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[n,a]}function Za(t,e=[]){let r=[];function n(s,l){const c=b.createContext(l),d=r.length;r=[...r,l];const f=h=>{const{scope:v,children:y,...w}=h,S=v?.[t]?.[d]||c,R=b.useMemo(()=>w,Object.values(w));return g.jsx(S.Provider,{value:R,children:y})};f.displayName=s+"Provider";function m(h,v){const y=v?.[t]?.[d]||c,w=b.useContext(y);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[f,m]}const a=()=>{const s=r.map(l=>b.createContext(l));return function(c){const d=c?.[t]||s;return b.useMemo(()=>({[`__scope${t}`]:{...c,[t]:d}}),[c,d])}};return a.scopeName=t,[n,LK(a,...e)]}function LK(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const l=n.reduce((c,{useScope:d,scopeName:f})=>{const h=d(s)[`__scope${f}`];return{...c,...h}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:l}),[l])}};return r.scopeName=e.scopeName,r}var nn=globalThis?.document?b.useLayoutEffect:()=>{},MK=$m[" useInsertionEffect ".trim().toString()]||nn;function _i({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[a,s,l]=PK({defaultProp:e,onChange:r}),c=t!==void 0,d=c?t:a;{const m=b.useRef(t!==void 0);b.useEffect(()=>{const h=m.current;h!==c&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${c?"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.`),m.current=c},[c,n])}const f=b.useCallback(m=>{if(c){const h=jK(m)?m(t):m;h!==t&&l.current?.(h)}else s(m)},[c,t,s,l]);return[d,f]}function PK({defaultProp:t,onChange:e}){const[r,n]=b.useState(t),a=b.useRef(r),s=b.useRef(e);return MK(()=>{s.current=e},[e]),b.useEffect(()=>{a.current!==r&&(s.current?.(r),a.current=r)},[r,a]),[r,n,s]}function jK(t){return typeof t=="function"}function O$(t){const e=b.useRef({value:t,previous:t});return b.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function D$(t){const[e,r]=b.useState(void 0);return nn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let l,c;if("borderBoxSize"in s){const d=s.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,c=f.blockSize}else l=t.offsetWidth,c=t.offsetHeight;r({width:l,height:c})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function Ss(t){const e=UK(t),r=b.forwardRef((n,a)=>{const{children:s,...l}=n,c=b.Children.toArray(s),d=c.find(zK);if(d){const f=d.props.children,m=c.map(h=>h===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...l,ref:a,children:b.isValidElement(f)?b.cloneElement(f,void 0,m):null})}return g.jsx(e,{...l,ref:a,children:s})});return r.displayName=`${t}.Slot`,r}function UK(t){const e=b.forwardRef((r,n)=>{const{children:a,...s}=r;if(b.isValidElement(a)){const l=BK(a),c=$K(s,a.props);return a.type!==b.Fragment&&(c.ref=n?Ha(n,l):l),b.cloneElement(a,c)}return b.Children.count(a)>1?b.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var L$=Symbol("radix.slottable");function FK(t){const e=({children:r})=>g.jsx(g.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=L$,e}function zK(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===L$}function $K(t,e){const r={...e};for(const n in e){const a=t[n],s=e[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...c)=>{const d=s(...c);return a(...c),d}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...t,...r}}function BK(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var qK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],bt=qK.reduce((t,e)=>{const r=Ss(`Primitive.${e}`),n=b.forwardRef((a,s)=>{const{asChild:l,...c}=a,d=l?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...c,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function M$(t,e){t&&bc.flushSync(()=>t.dispatchEvent(e))}var Hm="Switch",[HK]=Za(Hm),[VK,GK]=HK(Hm),P$=b.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:a,defaultChecked:s,required:l,disabled:c,value:d="on",onCheckedChange:f,form:m,...h}=t,[v,y]=b.useState(null),w=Nt(e,C=>y(C)),S=b.useRef(!1),R=v?m||!!v.closest("form"):!0,[x,_]=_i({prop:a,defaultProp:s??!1,onChange:f,caller:Hm});return g.jsxs(VK,{scope:r,checked:x,disabled:c,children:[g.jsx(bt.button,{type:"button",role:"switch","aria-checked":x,"aria-required":l,"data-state":z$(x),"data-disabled":c?"":void 0,disabled:c,value:d,...h,ref:w,onClick:He(t.onClick,C=>{_(N=>!N),R&&(S.current=C.isPropagationStopped(),S.current||C.stopPropagation())})}),R&&g.jsx(F$,{control:v,bubbles:!S.current,name:n,value:d,checked:x,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});P$.displayName=Hm;var j$="SwitchThumb",U$=b.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,a=GK(j$,r);return g.jsx(bt.span,{"data-state":z$(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:e})});U$.displayName=j$;var WK="SwitchBubbleInput",F$=b.forwardRef(({__scopeSwitch:t,control:e,checked:r,bubbles:n=!0,...a},s)=>{const l=b.useRef(null),c=Nt(l,s),d=O$(r),f=D$(e);return b.useEffect(()=>{const m=l.current;if(!m)return;const h=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(h,"checked").set;if(d!==r&&y){const w=new Event("click",{bubbles:n});y.call(m,r),m.dispatchEvent(w)}},[d,r,n]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:c,style:{...a.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});F$.displayName=WK;function z$(t){return t?"checked":"unchecked"}var $$=P$,YK=U$;function ER({ref:t,className:e,...r}){return g.jsx($$,{className:De("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...r,ref:t,children:g.jsx(YK,{className:De("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})}ER.displayName=$$.displayName;function Ga(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...r)=>e.current?.(...r),[])}function KK(t,e=globalThis?.document){const r=Ga(t);b.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var ZK="DismissableLayer",Z_="dismissableLayer.update",XK="dismissableLayer.pointerDownOutside",QK="dismissableLayer.focusOutside",_O,B$=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sc=b.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=t,f=b.useContext(B$),[m,h]=b.useState(null),v=m?.ownerDocument??globalThis?.document,[,y]=b.useState({}),w=Nt(e,I=>h(I)),S=Array.from(f.layers),[R]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=S.indexOf(R),_=m?S.indexOf(m):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,N=_>=x,k=tZ(I=>{const O=I.target,L=[...f.branches].some(M=>M.contains(O));!N||L||(a?.(I),l?.(I),I.defaultPrevented||c?.())},v),A=rZ(I=>{const O=I.target;[...f.branches].some(M=>M.contains(O))||(s?.(I),l?.(I),I.defaultPrevented||c?.())},v);return KK(I=>{_===f.layers.size-1&&(n?.(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},v),b.useEffect(()=>{if(m)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(_O=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),TO(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=_O)}},[m,v,r,f]),b.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),TO())},[m,f]),b.useEffect(()=>{const I=()=>y({});return document.addEventListener(Z_,I),()=>document.removeEventListener(Z_,I)},[]),g.jsx(bt.div,{...d,ref:w,style:{pointerEvents:C?N?"auto":"none":void 0,...t.style},onFocusCapture:He(t.onFocusCapture,A.onFocusCapture),onBlurCapture:He(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:He(t.onPointerDownCapture,k.onPointerDownCapture)})});Sc.displayName=ZK;var JK="DismissableLayerBranch",eZ=b.forwardRef((t,e)=>{const r=b.useContext(B$),n=b.useRef(null),a=Nt(e,n);return b.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),g.jsx(bt.div,{...t,ref:a})});eZ.displayName=JK;function tZ(t,e=globalThis?.document){const r=Ga(t),n=b.useRef(!1),a=b.useRef(()=>{});return b.useEffect(()=>{const s=c=>{if(c.target&&!n.current){let d=function(){q$(XK,r,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(e.removeEventListener("click",a.current),a.current=d,e.addEventListener("click",a.current,{once:!0})):d()}else e.removeEventListener("click",a.current);n.current=!1},l=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),e.removeEventListener("pointerdown",s),e.removeEventListener("click",a.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function rZ(t,e=globalThis?.document){const r=Ga(t),n=b.useRef(!1);return b.useEffect(()=>{const a=s=>{s.target&&!n.current&&q$(QK,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",a),()=>e.removeEventListener("focusin",a)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function TO(){const t=new CustomEvent(Z_);document.dispatchEvent(t)}function q$(t,e,r,{discrete:n}){const a=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&a.addEventListener(t,e,{once:!0}),n?M$(a,s):a.dispatchEvent(s)}var nZ=$m[" useId ".trim().toString()]||(()=>{}),aZ=0;function Xr(t){const[e,r]=b.useState(nZ());return nn(()=>{r(n=>n??String(aZ++))},[t]),t||(e?`radix-${e}`:"")}const oZ=["top","right","bottom","left"],Ti=Math.min,Un=Math.max,bm=Math.round,pp=Math.floor,Fa=t=>({x:t,y:t}),iZ={left:"right",right:"left",bottom:"top",top:"bottom"},sZ={start:"end",end:"start"};function X_(t,e,r){return Un(t,Ti(e,r))}function Io(t,e){return typeof t=="function"?t(e):t}function Oo(t){return t.split("-")[0]}function xc(t){return t.split("-")[1]}function SR(t){return t==="x"?"y":"x"}function xR(t){return t==="y"?"height":"width"}const lZ=new Set(["top","bottom"]);function Ma(t){return lZ.has(Oo(t))?"y":"x"}function wR(t){return SR(Ma(t))}function cZ(t,e,r){r===void 0&&(r=!1);const n=xc(t),a=wR(t),s=xR(a);let l=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(l=ym(l)),[l,ym(l)]}function uZ(t){const e=ym(t);return[Q_(t),e,Q_(e)]}function Q_(t){return t.replace(/start|end/g,e=>sZ[e])}const RO=["left","right"],CO=["right","left"],dZ=["top","bottom"],fZ=["bottom","top"];function pZ(t,e,r){switch(t){case"top":case"bottom":return r?e?CO:RO:e?RO:CO;case"left":case"right":return e?dZ:fZ;default:return[]}}function mZ(t,e,r,n){const a=xc(t);let s=pZ(Oo(t),r==="start",n);return a&&(s=s.map(l=>l+"-"+a),e&&(s=s.concat(s.map(Q_)))),s}function ym(t){return t.replace(/left|right|bottom|top/g,e=>iZ[e])}function hZ(t){return{top:0,right:0,bottom:0,left:0,...t}}function H$(t){return typeof t!="number"?hZ(t):{top:t,right:t,bottom:t,left:t}}function Em(t){const{x:e,y:r,width:n,height:a}=t;return{width:n,height:a,top:r,left:e,right:e+n,bottom:r+a,x:e,y:r}}function AO(t,e,r){let{reference:n,floating:a}=t;const s=Ma(e),l=wR(e),c=xR(l),d=Oo(e),f=s==="y",m=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2,v=n[c]/2-a[c]/2;let y;switch(d){case"top":y={x:m,y:n.y-a.height};break;case"bottom":y={x:m,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:h};break;case"left":y={x:n.x-a.width,y:h};break;default:y={x:n.x,y:n.y}}switch(xc(e)){case"start":y[l]-=v*(r&&f?-1:1);break;case"end":y[l]+=v*(r&&f?-1:1);break}return y}const gZ=async(t,e,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:s=[],platform:l}=r,c=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:a}),{x:m,y:h}=AO(f,n,d),v=n,y={},w=0;for(let S=0;S<c.length;S++){const{name:R,fn:x}=c[S],{x:_,y:C,data:N,reset:k}=await x({x:m,y:h,initialPlacement:n,placement:v,strategy:a,middlewareData:y,rects:f,platform:l,elements:{reference:t,floating:e}});m=_??m,h=C??h,y={...y,[R]:{...y[R],...N}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(v=k.placement),k.rects&&(f=k.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:a}):k.rects),{x:m,y:h}=AO(f,v,d)),S=-1)}return{x:m,y:h,placement:v,strategy:a,middlewareData:y}};async function id(t,e){var r;e===void 0&&(e={});const{x:n,y:a,platform:s,rects:l,elements:c,strategy:d}=t,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:v=!1,padding:y=0}=Io(e,t),w=H$(y),R=c[v?h==="floating"?"reference":"floating":h],x=Em(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(R)))==null||r?R:R.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:m,strategy:d})),_=h==="floating"?{x:n,y:a,width:l.floating.width,height:l.floating.height}:l.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),N=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},k=Em(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:C,strategy:d}):_);return{top:(x.top-k.top+w.top)/N.y,bottom:(k.bottom-x.bottom+w.bottom)/N.y,left:(x.left-k.left+w.left)/N.x,right:(k.right-x.right+w.right)/N.x}}const vZ=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:a,rects:s,platform:l,elements:c,middlewareData:d}=e,{element:f,padding:m=0}=Io(t,e)||{};if(f==null)return{};const h=H$(m),v={x:r,y:n},y=wR(a),w=xR(y),S=await l.getDimensions(f),R=y==="y",x=R?"top":"left",_=R?"bottom":"right",C=R?"clientHeight":"clientWidth",N=s.reference[w]+s.reference[y]-v[y]-s.floating[w],k=v[y]-s.reference[y],A=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let I=A?A[C]:0;(!I||!await(l.isElement==null?void 0:l.isElement(A)))&&(I=c.floating[C]||s.floating[w]);const O=N/2-k/2,L=I/2-S[w]/2-1,M=Ti(h[x],L),P=Ti(h[_],L),Y=M,Q=I-S[w]-P,J=I/2-S[w]/2+O,ee=X_(Y,J,Q),U=!d.arrow&&xc(a)!=null&&J!==ee&&s.reference[w]/2-(J<Y?M:P)-S[w]/2<0,G=U?J<Y?J-Y:J-Q:0;return{[y]:v[y]+G,data:{[y]:ee,centerOffset:J-ee-G,...U&&{alignmentOffset:G}},reset:U}}}),bZ=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:a,middlewareData:s,rects:l,initialPlacement:c,platform:d,elements:f}=e,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...R}=Io(t,e);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const x=Oo(a),_=Ma(c),C=Oo(c)===c,N=await(d.isRTL==null?void 0:d.isRTL(f.floating)),k=v||(C||!S?[ym(c)]:uZ(c)),A=w!=="none";!v&&A&&k.push(...mZ(c,S,w,N));const I=[c,...k],O=await id(e,R),L=[];let M=((n=s.flip)==null?void 0:n.overflows)||[];if(m&&L.push(O[x]),h){const J=cZ(a,l,N);L.push(O[J[0]],O[J[1]])}if(M=[...M,{placement:a,overflows:L}],!L.every(J=>J<=0)){var P,Y;const J=(((P=s.flip)==null?void 0:P.index)||0)+1,ee=I[J];if(ee&&(!(h==="alignment"?_!==Ma(ee):!1)||M.every(H=>Ma(H.placement)===_?H.overflows[0]>0:!0)))return{data:{index:J,overflows:M},reset:{placement:ee}};let U=(Y=M.filter(G=>G.overflows[0]<=0).sort((G,H)=>G.overflows[1]-H.overflows[1])[0])==null?void 0:Y.placement;if(!U)switch(y){case"bestFit":{var Q;const G=(Q=M.filter(H=>{if(A){const X=Ma(H.placement);return X===_||X==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(X=>X>0).reduce((X,ae)=>X+ae,0)]).sort((H,X)=>H[1]-X[1])[0])==null?void 0:Q[0];G&&(U=G);break}case"initialPlacement":U=c;break}if(a!==U)return{reset:{placement:U}}}return{}}}};function NO(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function kO(t){return oZ.some(e=>t[e]>=0)}const yZ=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...a}=Io(t,e);switch(n){case"referenceHidden":{const s=await id(e,{...a,elementContext:"reference"}),l=NO(s,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:kO(l)}}}case"escaped":{const s=await id(e,{...a,altBoundary:!0}),l=NO(s,r.floating);return{data:{escapedOffsets:l,escaped:kO(l)}}}default:return{}}}}},V$=new Set(["left","top"]);async function EZ(t,e){const{placement:r,platform:n,elements:a}=t,s=await(n.isRTL==null?void 0:n.isRTL(a.floating)),l=Oo(r),c=xc(r),d=Ma(r)==="y",f=V$.has(l)?-1:1,m=s&&d?-1:1,h=Io(e,t);let{mainAxis:v,crossAxis:y,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof w=="number"&&(y=c==="end"?w*-1:w),d?{x:y*m,y:v*f}:{x:v*f,y:y*m}}const SZ=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:a,y:s,placement:l,middlewareData:c}=e,d=await EZ(e,t);return l===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:a+d.x,y:s+d.y,data:{...d,placement:l}}}}},xZ=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:a}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:R=>{let{x,y:_}=R;return{x,y:_}}},...d}=Io(t,e),f={x:r,y:n},m=await id(e,d),h=Ma(Oo(a)),v=SR(h);let y=f[v],w=f[h];if(s){const R=v==="y"?"top":"left",x=v==="y"?"bottom":"right",_=y+m[R],C=y-m[x];y=X_(_,y,C)}if(l){const R=h==="y"?"top":"left",x=h==="y"?"bottom":"right",_=w+m[R],C=w-m[x];w=X_(_,w,C)}const S=c.fn({...e,[v]:y,[h]:w});return{...S,data:{x:S.x-r,y:S.y-n,enabled:{[v]:s,[h]:l}}}}}},wZ=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:a,rects:s,middlewareData:l}=e,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=Io(t,e),m={x:r,y:n},h=Ma(a),v=SR(h);let y=m[v],w=m[h];const S=Io(c,e),R=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const C=v==="y"?"height":"width",N=s.reference[v]-s.floating[C]+R.mainAxis,k=s.reference[v]+s.reference[C]-R.mainAxis;y<N?y=N:y>k&&(y=k)}if(f){var x,_;const C=v==="y"?"width":"height",N=V$.has(Oo(a)),k=s.reference[h]-s.floating[C]+(N&&((x=l.offset)==null?void 0:x[h])||0)+(N?0:R.crossAxis),A=s.reference[h]+s.reference[C]+(N?0:((_=l.offset)==null?void 0:_[h])||0)-(N?R.crossAxis:0);w<k?w=k:w>A&&(w=A)}return{[v]:y,[h]:w}}}},_Z=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:a,rects:s,platform:l,elements:c}=e,{apply:d=()=>{},...f}=Io(t,e),m=await id(e,f),h=Oo(a),v=xc(a),y=Ma(a)==="y",{width:w,height:S}=s.floating;let R,x;h==="top"||h==="bottom"?(R=h,x=v===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(x=h,R=v==="end"?"top":"bottom");const _=S-m.top-m.bottom,C=w-m.left-m.right,N=Ti(S-m[R],_),k=Ti(w-m[x],C),A=!e.middlewareData.shift;let I=N,O=k;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(O=C),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(I=_),A&&!v){const M=Un(m.left,0),P=Un(m.right,0),Y=Un(m.top,0),Q=Un(m.bottom,0);y?O=w-2*(M!==0||P!==0?M+P:Un(m.left,m.right)):I=S-2*(Y!==0||Q!==0?Y+Q:Un(m.top,m.bottom))}await d({...e,availableWidth:O,availableHeight:I});const L=await l.getDimensions(c.floating);return w!==L.width||S!==L.height?{reset:{rects:!0}}:{}}}};function Vm(){return typeof window<"u"}function wc(t){return G$(t)?(t.nodeName||"").toLowerCase():"#document"}function Fn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Xa(t){var e;return(e=(G$(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function G$(t){return Vm()?t instanceof Node||t instanceof Fn(t).Node:!1}function Sa(t){return Vm()?t instanceof Element||t instanceof Fn(t).Element:!1}function Wa(t){return Vm()?t instanceof HTMLElement||t instanceof Fn(t).HTMLElement:!1}function IO(t){return!Vm()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Fn(t).ShadowRoot}const TZ=new Set(["inline","contents"]);function Dd(t){const{overflow:e,overflowX:r,overflowY:n,display:a}=xa(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!TZ.has(a)}const RZ=new Set(["table","td","th"]);function CZ(t){return RZ.has(wc(t))}const AZ=[":popover-open",":modal"];function Gm(t){return AZ.some(e=>{try{return t.matches(e)}catch{return!1}})}const NZ=["transform","translate","scale","rotate","perspective"],kZ=["transform","translate","scale","rotate","perspective","filter"],IZ=["paint","layout","strict","content"];function _R(t){const e=TR(),r=Sa(t)?xa(t):t;return NZ.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||kZ.some(n=>(r.willChange||"").includes(n))||IZ.some(n=>(r.contain||"").includes(n))}function OZ(t){let e=Ri(t);for(;Wa(e)&&!ac(e);){if(_R(e))return e;if(Gm(e))return null;e=Ri(e)}return null}function TR(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const DZ=new Set(["html","body","#document"]);function ac(t){return DZ.has(wc(t))}function xa(t){return Fn(t).getComputedStyle(t)}function Wm(t){return Sa(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ri(t){if(wc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||IO(t)&&t.host||Xa(t);return IO(e)?e.host:e}function W$(t){const e=Ri(t);return ac(e)?t.ownerDocument?t.ownerDocument.body:t.body:Wa(e)&&Dd(e)?e:W$(e)}function sd(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const a=W$(t),s=a===((n=t.ownerDocument)==null?void 0:n.body),l=Fn(a);if(s){const c=J_(l);return e.concat(l,l.visualViewport||[],Dd(a)?a:[],c&&r?sd(c):[])}return e.concat(a,sd(a,[],r))}function J_(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Y$(t){const e=xa(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const a=Wa(t),s=a?t.offsetWidth:r,l=a?t.offsetHeight:n,c=bm(r)!==s||bm(n)!==l;return c&&(r=s,n=l),{width:r,height:n,$:c}}function RR(t){return Sa(t)?t:t.contextElement}function Fl(t){const e=RR(t);if(!Wa(e))return Fa(1);const r=e.getBoundingClientRect(),{width:n,height:a,$:s}=Y$(e);let l=(s?bm(r.width):r.width)/n,c=(s?bm(r.height):r.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const LZ=Fa(0);function K$(t){const e=Fn(t);return!TR()||!e.visualViewport?LZ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function MZ(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Fn(t)?!1:e}function xs(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const a=t.getBoundingClientRect(),s=RR(t);let l=Fa(1);e&&(n?Sa(n)&&(l=Fl(n)):l=Fl(t));const c=MZ(s,r,n)?K$(s):Fa(0);let d=(a.left+c.x)/l.x,f=(a.top+c.y)/l.y,m=a.width/l.x,h=a.height/l.y;if(s){const v=Fn(s),y=n&&Sa(n)?Fn(n):n;let w=v,S=J_(w);for(;S&&n&&y!==w;){const R=Fl(S),x=S.getBoundingClientRect(),_=xa(S),C=x.left+(S.clientLeft+parseFloat(_.paddingLeft))*R.x,N=x.top+(S.clientTop+parseFloat(_.paddingTop))*R.y;d*=R.x,f*=R.y,m*=R.x,h*=R.y,d+=C,f+=N,w=Fn(S),S=J_(w)}}return Em({width:m,height:h,x:d,y:f})}function Ym(t,e){const r=Wm(t).scrollLeft;return e?e.left+r:xs(Xa(t)).left+r}function Z$(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Ym(t,r),a=r.top+e.scrollTop;return{x:n,y:a}}function PZ(t){let{elements:e,rect:r,offsetParent:n,strategy:a}=t;const s=a==="fixed",l=Xa(n),c=e?Gm(e.floating):!1;if(n===l||c&&s)return r;let d={scrollLeft:0,scrollTop:0},f=Fa(1);const m=Fa(0),h=Wa(n);if((h||!h&&!s)&&((wc(n)!=="body"||Dd(l))&&(d=Wm(n)),Wa(n))){const y=xs(n);f=Fl(n),m.x=y.x+n.clientLeft,m.y=y.y+n.clientTop}const v=l&&!h&&!s?Z$(l,d):Fa(0);return{width:r.width*f.x,height:r.height*f.y,x:r.x*f.x-d.scrollLeft*f.x+m.x+v.x,y:r.y*f.y-d.scrollTop*f.y+m.y+v.y}}function jZ(t){return Array.from(t.getClientRects())}function UZ(t){const e=Xa(t),r=Wm(t),n=t.ownerDocument.body,a=Un(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Un(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let l=-r.scrollLeft+Ym(t);const c=-r.scrollTop;return xa(n).direction==="rtl"&&(l+=Un(e.clientWidth,n.clientWidth)-a),{width:a,height:s,x:l,y:c}}const OO=25;function FZ(t,e){const r=Fn(t),n=Xa(t),a=r.visualViewport;let s=n.clientWidth,l=n.clientHeight,c=0,d=0;if(a){s=a.width,l=a.height;const m=TR();(!m||m&&e==="fixed")&&(c=a.offsetLeft,d=a.offsetTop)}const f=Ym(n);if(f<=0){const m=n.ownerDocument,h=m.body,v=getComputedStyle(h),y=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(n.clientWidth-h.clientWidth-y);w<=OO&&(s-=w)}else f<=OO&&(s+=f);return{width:s,height:l,x:c,y:d}}const zZ=new Set(["absolute","fixed"]);function $Z(t,e){const r=xs(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,s=Wa(t)?Fl(t):Fa(1),l=t.clientWidth*s.x,c=t.clientHeight*s.y,d=a*s.x,f=n*s.y;return{width:l,height:c,x:d,y:f}}function DO(t,e,r){let n;if(e==="viewport")n=FZ(t,r);else if(e==="document")n=UZ(Xa(t));else if(Sa(e))n=$Z(e,r);else{const a=K$(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return Em(n)}function X$(t,e){const r=Ri(t);return r===e||!Sa(r)||ac(r)?!1:xa(r).position==="fixed"||X$(r,e)}function BZ(t,e){const r=e.get(t);if(r)return r;let n=sd(t,[],!1).filter(c=>Sa(c)&&wc(c)!=="body"),a=null;const s=xa(t).position==="fixed";let l=s?Ri(t):t;for(;Sa(l)&&!ac(l);){const c=xa(l),d=_R(l);!d&&c.position==="fixed"&&(a=null),(s?!d&&!a:!d&&c.position==="static"&&!!a&&zZ.has(a.position)||Dd(l)&&!d&&X$(t,l))?n=n.filter(m=>m!==l):a=c,l=Ri(l)}return e.set(t,n),n}function qZ(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t;const l=[...r==="clippingAncestors"?Gm(e)?[]:BZ(e,this._c):[].concat(r),n],c=l[0],d=l.reduce((f,m)=>{const h=DO(e,m,a);return f.top=Un(h.top,f.top),f.right=Ti(h.right,f.right),f.bottom=Ti(h.bottom,f.bottom),f.left=Un(h.left,f.left),f},DO(e,c,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function HZ(t){const{width:e,height:r}=Y$(t);return{width:e,height:r}}function VZ(t,e,r){const n=Wa(e),a=Xa(e),s=r==="fixed",l=xs(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const d=Fa(0);function f(){d.x=Ym(a)}if(n||!n&&!s)if((wc(e)!=="body"||Dd(a))&&(c=Wm(e)),n){const y=xs(e,!0,s,e);d.x=y.x+e.clientLeft,d.y=y.y+e.clientTop}else a&&f();s&&!n&&a&&f();const m=a&&!n&&!s?Z$(a,c):Fa(0),h=l.left+c.scrollLeft-d.x-m.x,v=l.top+c.scrollTop-d.y-m.y;return{x:h,y:v,width:l.width,height:l.height}}function qb(t){return xa(t).position==="static"}function LO(t,e){if(!Wa(t)||xa(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Xa(t)===r&&(r=r.ownerDocument.body),r}function Q$(t,e){const r=Fn(t);if(Gm(t))return r;if(!Wa(t)){let a=Ri(t);for(;a&&!ac(a);){if(Sa(a)&&!qb(a))return a;a=Ri(a)}return r}let n=LO(t,e);for(;n&&CZ(n)&&qb(n);)n=LO(n,e);return n&&ac(n)&&qb(n)&&!_R(n)?r:n||OZ(t)||r}const GZ=async function(t){const e=this.getOffsetParent||Q$,r=this.getDimensions,n=await r(t.floating);return{reference:VZ(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function WZ(t){return xa(t).direction==="rtl"}const YZ={convertOffsetParentRelativeRectToViewportRelativeRect:PZ,getDocumentElement:Xa,getClippingRect:qZ,getOffsetParent:Q$,getElementRects:GZ,getClientRects:jZ,getDimensions:HZ,getScale:Fl,isElement:Sa,isRTL:WZ};function J$(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function KZ(t,e){let r=null,n;const a=Xa(t);function s(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();const f=t.getBoundingClientRect(),{left:m,top:h,width:v,height:y}=f;if(c||e(),!v||!y)return;const w=pp(h),S=pp(a.clientWidth-(m+v)),R=pp(a.clientHeight-(h+y)),x=pp(m),C={rootMargin:-w+"px "+-S+"px "+-R+"px "+-x+"px",threshold:Un(0,Ti(1,d))||1};let N=!0;function k(A){const I=A[0].intersectionRatio;if(I!==d){if(!N)return l();I?l(!1,I):n=setTimeout(()=>{l(!1,1e-7)},1e3)}I===1&&!J$(f,t.getBoundingClientRect())&&l(),N=!1}try{r=new IntersectionObserver(k,{...C,root:a.ownerDocument})}catch{r=new IntersectionObserver(k,C)}r.observe(t)}return l(!0),s}function ZZ(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,f=RR(t),m=a||s?[...f?sd(f):[],...sd(e)]:[];m.forEach(x=>{a&&x.addEventListener("scroll",r,{passive:!0}),s&&x.addEventListener("resize",r)});const h=f&&c?KZ(f,r):null;let v=-1,y=null;l&&(y=new ResizeObserver(x=>{let[_]=x;_&&_.target===f&&y&&(y.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(e)})),r()}),f&&!d&&y.observe(f),y.observe(e));let w,S=d?xs(t):null;d&&R();function R(){const x=xs(t);S&&!J$(S,x)&&r(),S=x,w=requestAnimationFrame(R)}return r(),()=>{var x;m.forEach(_=>{a&&_.removeEventListener("scroll",r),s&&_.removeEventListener("resize",r)}),h?.(),(x=y)==null||x.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const XZ=SZ,QZ=xZ,JZ=bZ,eX=_Z,tX=yZ,MO=vZ,rX=wZ,nX=(t,e,r)=>{const n=new Map,a={platform:YZ,...r},s={...a.platform,_c:n};return gZ(t,e,{...a,platform:s})};var aX=typeof document<"u",oX=function(){},Pp=aX?b.useLayoutEffect:oX;function Sm(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,a;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!Sm(t[n],e[n]))return!1;return!0}if(a=Object.keys(t),r=a.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,a[n]))return!1;for(n=r;n--!==0;){const s=a[n];if(!(s==="_owner"&&t.$$typeof)&&!Sm(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function eB(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function PO(t,e){const r=eB(t);return Math.round(e*r)/r}function Hb(t){const e=b.useRef(t);return Pp(()=>{e.current=t}),e}function iX(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=t,[m,h]=b.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[v,y]=b.useState(n);Sm(v,n)||y(n);const[w,S]=b.useState(null),[R,x]=b.useState(null),_=b.useCallback(H=>{H!==A.current&&(A.current=H,S(H))},[]),C=b.useCallback(H=>{H!==I.current&&(I.current=H,x(H))},[]),N=s||w,k=l||R,A=b.useRef(null),I=b.useRef(null),O=b.useRef(m),L=d!=null,M=Hb(d),P=Hb(a),Y=Hb(f),Q=b.useCallback(()=>{if(!A.current||!I.current)return;const H={placement:e,strategy:r,middleware:v};P.current&&(H.platform=P.current),nX(A.current,I.current,H).then(X=>{const ae={...X,isPositioned:Y.current!==!1};J.current&&!Sm(O.current,ae)&&(O.current=ae,bc.flushSync(()=>{h(ae)}))})},[v,e,r,P,Y]);Pp(()=>{f===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,h(H=>({...H,isPositioned:!1})))},[f]);const J=b.useRef(!1);Pp(()=>(J.current=!0,()=>{J.current=!1}),[]),Pp(()=>{if(N&&(A.current=N),k&&(I.current=k),N&&k){if(M.current)return M.current(N,k,Q);Q()}},[N,k,Q,M,L]);const ee=b.useMemo(()=>({reference:A,floating:I,setReference:_,setFloating:C}),[_,C]),U=b.useMemo(()=>({reference:N,floating:k}),[N,k]),G=b.useMemo(()=>{const H={position:r,left:0,top:0};if(!U.floating)return H;const X=PO(U.floating,m.x),ae=PO(U.floating,m.y);return c?{...H,transform:"translate("+X+"px, "+ae+"px)",...eB(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:X,top:ae}},[r,c,U.floating,m.x,m.y]);return b.useMemo(()=>({...m,update:Q,refs:ee,elements:U,floatingStyles:G}),[m,Q,ee,U,G])}const sX=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:a}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?MO({element:n.current,padding:a}).fn(r):{}:n?MO({element:n,padding:a}).fn(r):{}}}},lX=(t,e)=>({...XZ(t),options:[t,e]}),cX=(t,e)=>({...QZ(t),options:[t,e]}),uX=(t,e)=>({...rX(t),options:[t,e]}),dX=(t,e)=>({...JZ(t),options:[t,e]}),fX=(t,e)=>({...eX(t),options:[t,e]}),pX=(t,e)=>({...tX(t),options:[t,e]}),mX=(t,e)=>({...sX(t),options:[t,e]});var hX="Arrow",tB=b.forwardRef((t,e)=>{const{children:r,width:n=10,height:a=5,...s}=t;return g.jsx(bt.svg,{...s,ref:e,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});tB.displayName=hX;var gX=tB,CR="Popper",[rB,ki]=Za(CR),[vX,nB]=rB(CR),aB=t=>{const{__scopePopper:e,children:r}=t,[n,a]=b.useState(null);return g.jsx(vX,{scope:e,anchor:n,onAnchorChange:a,children:r})};aB.displayName=CR;var oB="PopperAnchor",iB=b.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...a}=t,s=nB(oB,r),l=b.useRef(null),c=Nt(e,l),d=b.useRef(null);return b.useEffect(()=>{const f=d.current;d.current=n?.current||l.current,f!==d.current&&s.onAnchorChange(d.current)}),n?null:g.jsx(bt.div,{...a,ref:c})});iB.displayName=oB;var AR="PopperContent",[bX,yX]=rB(AR),sB=b.forwardRef((t,e)=>{const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=t,R=nB(AR,r),[x,_]=b.useState(null),C=Nt(e,j=>_(j)),[N,k]=b.useState(null),A=D$(N),I=A?.width??0,O=A?.height??0,L=n+(s!=="center"?"-"+s:""),M=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},P=Array.isArray(f)?f:[f],Y=P.length>0,Q={padding:M,boundary:P.filter(SX),altBoundary:Y},{refs:J,floatingStyles:ee,placement:U,isPositioned:G,middlewareData:H}=iX({strategy:"fixed",placement:L,whileElementsMounted:(...j)=>ZZ(...j,{animationFrame:y==="always"}),elements:{reference:R.anchor},middleware:[lX({mainAxis:a+O,alignmentAxis:l}),d&&cX({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?uX():void 0,...Q}),d&&dX({...Q}),fX({...Q,apply:({elements:j,rects:Z,availableWidth:ne,availableHeight:V})=>{const{width:de,height:fe}=Z.reference,Re=j.floating.style;Re.setProperty("--radix-popper-available-width",`${ne}px`),Re.setProperty("--radix-popper-available-height",`${V}px`),Re.setProperty("--radix-popper-anchor-width",`${de}px`),Re.setProperty("--radix-popper-anchor-height",`${fe}px`)}}),N&&mX({element:N,padding:c}),xX({arrowWidth:I,arrowHeight:O}),v&&pX({strategy:"referenceHidden",...Q})]}),[X,ae]=uB(U),z=Ga(w);nn(()=>{G&&z?.()},[G,z]);const q=H.arrow?.x,$=H.arrow?.y,W=H.arrow?.centerOffset!==0,[te,F]=b.useState();return nn(()=>{x&&F(window.getComputedStyle(x).zIndex)},[x]),g.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:G?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(bX,{scope:r,placedSide:X,onArrowChange:k,arrowX:q,arrowY:$,shouldHideArrow:W,children:g.jsx(bt.div,{"data-side":X,"data-align":ae,...S,ref:C,style:{...S.style,animation:G?void 0:"none"}})})})});sB.displayName=AR;var lB="PopperArrow",EX={top:"bottom",right:"left",bottom:"top",left:"right"},cB=b.forwardRef(function(e,r){const{__scopePopper:n,...a}=e,s=yX(lB,n),l=EX[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(gX,{...a,ref:r,style:{...a.style,display:"block"}})})});cB.displayName=lB;function SX(t){return t!==null}var xX=t=>({name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:a}=e,l=a.arrow?.centerOffset!==0,c=l?0:t.arrowWidth,d=l?0:t.arrowHeight,[f,m]=uB(r),h={start:"0%",center:"50%",end:"100%"}[m],v=(a.arrow?.x??0)+c/2,y=(a.arrow?.y??0)+d/2;let w="",S="";return f==="bottom"?(w=l?h:`${v}px`,S=`${-d}px`):f==="top"?(w=l?h:`${v}px`,S=`${n.floating.height+d}px`):f==="right"?(w=`${-d}px`,S=l?h:`${y}px`):f==="left"&&(w=`${n.floating.width+d}px`,S=l?h:`${y}px`),{data:{x:w,y:S}}}});function uB(t){const[e,r="center"]=t.split("-");return[e,r]}var Km=aB,Ld=iB,Zm=sB,Xm=cB,wX="Portal",_c=b.forwardRef((t,e)=>{const{container:r,...n}=t,[a,s]=b.useState(!1);nn(()=>s(!0),[]);const l=r||a&&globalThis?.document?.body;return l?d$.createPortal(g.jsx(bt.div,{...n,ref:e}),l):null});_c.displayName=wX;function _X(t,e){return b.useReducer((r,n)=>e[r][n]??r,t)}var ca=t=>{const{present:e,children:r}=t,n=TX(e),a=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),s=Nt(n.ref,RX(a));return typeof r=="function"||n.isPresent?b.cloneElement(a,{ref:s}):null};ca.displayName="Presence";function TX(t){const[e,r]=b.useState(),n=b.useRef(null),a=b.useRef(t),s=b.useRef("none"),l=t?"mounted":"unmounted",[c,d]=_X(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const f=mp(n.current);s.current=c==="mounted"?f:"none"},[c]),nn(()=>{const f=n.current,m=a.current;if(m!==t){const v=s.current,y=mp(f);t?d("MOUNT"):y==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&v!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=t}},[t,d]),nn(()=>{if(e){let f;const m=e.ownerDocument.defaultView??window,h=y=>{const S=mp(n.current).includes(CSS.escape(y.animationName));if(y.target===e&&S&&(d("ANIMATION_END"),!a.current)){const R=e.style.animationFillMode;e.style.animationFillMode="forwards",f=m.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=R)})}},v=y=>{y.target===e&&(s.current=mp(n.current))};return e.addEventListener("animationstart",v),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{m.clearTimeout(f),e.removeEventListener("animationstart",v),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:b.useCallback(f=>{n.current=f?getComputedStyle(f):null,r(f)},[])}}function mp(t){return t?.animationName||"none"}function RX(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var dB=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"}),CX="VisuallyHidden",fB=b.forwardRef((t,e)=>g.jsx(bt.span,{...t,ref:e,style:{...dB,...t.style}}));fB.displayName=CX;var AX=fB,[Qm]=Za("Tooltip",[ki]),Jm=ki(),pB="TooltipProvider",NX=700,eT="tooltip.open",[kX,NR]=Qm(pB),mB=t=>{const{__scopeTooltip:e,delayDuration:r=NX,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:s}=t,l=b.useRef(!0),c=b.useRef(!1),d=b.useRef(0);return b.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),g.jsx(kX,{scope:e,isOpenDelayedRef:l,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:b.useCallback(f=>{c.current=f},[]),disableHoverableContent:a,children:s})};mB.displayName=pB;var ld="Tooltip",[IX,Md]=Qm(ld),hB=t=>{const{__scopeTooltip:e,children:r,open:n,defaultOpen:a,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,d=NR(ld,t.__scopeTooltip),f=Jm(e),[m,h]=b.useState(null),v=Xr(),y=b.useRef(0),w=l??d.disableHoverableContent,S=c??d.delayDuration,R=b.useRef(!1),[x,_]=_i({prop:n,defaultProp:a??!1,onChange:I=>{I?(d.onOpen(),document.dispatchEvent(new CustomEvent(eT))):d.onClose(),s?.(I)},caller:ld}),C=b.useMemo(()=>x?R.current?"delayed-open":"instant-open":"closed",[x]),N=b.useCallback(()=>{window.clearTimeout(y.current),y.current=0,R.current=!1,_(!0)},[_]),k=b.useCallback(()=>{window.clearTimeout(y.current),y.current=0,_(!1)},[_]),A=b.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{R.current=!0,_(!0),y.current=0},S)},[S,_]);return b.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),g.jsx(Km,{...f,children:g.jsx(IX,{scope:e,contentId:v,open:x,stateAttribute:C,trigger:m,onTriggerChange:h,onTriggerEnter:b.useCallback(()=>{d.isOpenDelayedRef.current?A():N()},[d.isOpenDelayedRef,A,N]),onTriggerLeave:b.useCallback(()=>{w?k():(window.clearTimeout(y.current),y.current=0)},[k,w]),onOpen:N,onClose:k,disableHoverableContent:w,children:r})})};hB.displayName=ld;var tT="TooltipTrigger",gB=b.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,a=Md(tT,r),s=NR(tT,r),l=Jm(r),c=b.useRef(null),d=Nt(e,c,a.onTriggerChange),f=b.useRef(!1),m=b.useRef(!1),h=b.useCallback(()=>f.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),g.jsx(Ld,{asChild:!0,...l,children:g.jsx(bt.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:d,onPointerMove:He(t.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:He(t.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:He(t.onPointerDown,()=>{a.open&&a.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:He(t.onFocus,()=>{f.current||a.onOpen()}),onBlur:He(t.onBlur,a.onClose),onClick:He(t.onClick,a.onClose)})})});gB.displayName=tT;var kR="TooltipPortal",[OX,DX]=Qm(kR,{forceMount:void 0}),vB=t=>{const{__scopeTooltip:e,forceMount:r,children:n,container:a}=t,s=Md(kR,e);return g.jsx(OX,{scope:e,forceMount:r,children:g.jsx(ca,{present:r||s.open,children:g.jsx(_c,{asChild:!0,container:a,children:n})})})};vB.displayName=kR;var oc="TooltipContent",bB=b.forwardRef((t,e)=>{const r=DX(oc,t.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...s}=t,l=Md(oc,t.__scopeTooltip);return g.jsx(ca,{present:n||l.open,children:l.disableHoverableContent?g.jsx(yB,{side:a,...s,ref:e}):g.jsx(LX,{side:a,...s,ref:e})})}),LX=b.forwardRef((t,e)=>{const r=Md(oc,t.__scopeTooltip),n=NR(oc,t.__scopeTooltip),a=b.useRef(null),s=Nt(e,a),[l,c]=b.useState(null),{trigger:d,onClose:f}=r,m=a.current,{onPointerInTransitChange:h}=n,v=b.useCallback(()=>{c(null),h(!1)},[h]),y=b.useCallback((w,S)=>{const R=w.currentTarget,x={x:w.clientX,y:w.clientY},_=UX(x,R.getBoundingClientRect()),C=FX(x,_),N=zX(S.getBoundingClientRect()),k=BX([...C,...N]);c(k),h(!0)},[h]);return b.useEffect(()=>()=>v(),[v]),b.useEffect(()=>{if(d&&m){const w=R=>y(R,m),S=R=>y(R,d);return d.addEventListener("pointerleave",w),m.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",w),m.removeEventListener("pointerleave",S)}}},[d,m,y,v]),b.useEffect(()=>{if(l){const w=S=>{const R=S.target,x={x:S.clientX,y:S.clientY},_=d?.contains(R)||m?.contains(R),C=!$X(x,l);_?v():C&&(v(),f())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,m,l,f,v]),g.jsx(yB,{...t,ref:s})}),[MX,PX]=Qm(ld,{isInside:!1}),jX=FK("TooltipContent"),yB=b.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=t,d=Md(oc,r),f=Jm(r),{onClose:m}=d;return b.useEffect(()=>(document.addEventListener(eT,m),()=>document.removeEventListener(eT,m)),[m]),b.useEffect(()=>{if(d.trigger){const h=v=>{v.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,m]),g.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:g.jsxs(Zm,{"data-state":d.stateAttribute,...f,...c,ref:e,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(jX,{children:n}),g.jsx(MX,{scope:r,isInside:!0,children:g.jsx(AX,{id:d.contentId,role:"tooltip",children:a||n})})]})})});bB.displayName=oc;var EB="TooltipArrow",SB=b.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,a=Jm(r);return PX(EB,r).isInside?null:g.jsx(Xm,{...a,...n,ref:e})});SB.displayName=EB;function UX(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),a=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(r,n,a,s)){case s:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function FX(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function zX(t){const{top:e,right:r,bottom:n,left:a}=t;return[{x:a,y:e},{x:r,y:e},{x:r,y:n},{x:a,y:n}]}function $X(t,e){const{x:r,y:n}=t;let a=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const c=e[s],d=e[l],f=c.x,m=c.y,h=d.x,v=d.y;m>n!=v>n&&r<(h-f)*(n-m)/(v-m)+f&&(a=!a)}return a}function BX(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),qX(e)}function qX(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const a=t[n];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(a.y-l.y)>=(s.y-l.y)*(a.x-l.x))e.pop();else break}e.push(a)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const a=t[n];for(;r.length>=2;){const s=r[r.length-1],l=r[r.length-2];if((s.x-l.x)*(a.y-l.y)>=(s.y-l.y)*(a.x-l.x))r.pop();else break}r.push(a)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var HX=mB,VX=hB,GX=gB,WX=vB,YX=bB,KX=SB;function xB({delayDuration:t=0,...e}){return g.jsx(HX,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function jr({...t}){return g.jsx(xB,{children:g.jsx(VX,{"data-slot":"tooltip",...t})})}function Ur({...t}){return g.jsx(GX,{"data-slot":"tooltip-trigger",...t})}function Fr({className:t,sideOffset:e=0,children:r,...n}){return g.jsx(WX,{children:g.jsxs(YX,{"data-slot":"tooltip-content",sideOffset:e,className:De("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",t),...n,children:[r,g.jsx(KX,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}class ZX{name="mcp_inspector_open";properties;constructor(e){this.properties={server_url:e.serverUrl,connection_count:e.connectionCount}}}class jO{name="mcp_tool_execution";properties;constructor(e){this.properties={tool_name:e.toolName,server_id:e.serverId,success:e.success,duration:e.duration,error:e.error}}}class UO{name="mcp_resource_read";properties;constructor(e){this.properties={resource_uri:e.resourceUri,server_id:e.serverId,success:e.success,error:e.error}}}class FO{name="mcp_prompt_call";properties;constructor(e){this.properties={prompt_name:e.promptName,server_id:e.serverId,success:e.success,error:e.error}}}class zO{name="mcp_chat_message";properties;constructor(e){this.properties={server_id:e.serverId,provider:e.provider,model:e.model,message_count:e.messageCount,tool_calls_count:e.toolCallsCount,success:e.success,execution_mode:e.executionMode,duration:e.duration,error:e.error}}}class XX{name="mcp_server_added";properties;constructor(e){this.properties={server_id:e.serverId,server_url:e.serverUrl,connection_type:e.connectionType,via_proxy:e.viaProxy}}}class QX{name="mcp_server_removed";properties;constructor(e){this.properties={server_id:e.serverId}}}class JX{name="mcp_command_palette_open";properties;constructor(e){this.properties={trigger:e.trigger}}}class eQ{name="mcp_tool_saved";properties;constructor(e){this.properties={tool_name:e.toolName,server_id:e.serverId}}}function Vb(){try{return"0.5.3-canary.6"}catch{return"0.0.0"}}var tQ={};function Gb(){try{return typeof window<"u"&&typeof document<"u"}catch{return!1}}class $O{endpoint;timeout;constructor(e,r=3e3){this.endpoint=e,this.timeout=r}async logEvent(e){try{const r=new AbortController,n=setTimeout(()=>r.abort(),this.timeout),a=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:r.signal});if(clearTimeout(n),!a.ok)throw new Error(`HTTP error! status: ${a.status}`)}catch{}}}function di(t){return`mcp_inspector_telemetry_${t}`}class zr{static instance=null;POSTHOG_PROXY_URL="/inspector/api/tel/posthog";SCARF_PROXY_URL="/inspector/api/tel/scarf";UNKNOWN_USER_ID="UNKNOWN_USER_ID";_currUserId=null;_posthogClient=null;_scarfClient=null;_source="inspector";constructor(){const e=Gb(),r=this.isTelemetryDisabled();if(this._source=this.getStoredSource()||"inspector",r)this._posthogClient=null,this._scarfClient=null;else if(!e)this._posthogClient=null,this._scarfClient=null;else{try{this._posthogClient=new $O(this.POSTHOG_PROXY_URL,3e3)}catch{this._posthogClient=null}try{this._scarfClient=new $O(this.SCARF_PROXY_URL,3e3)}catch{this._scarfClient=null}}}isTelemetryDisabled(){return typeof localStorage<"u"&&localStorage.getItem(di("disabled"))==="true"||typeof process<"u"&&tQ?.MCP_USE_ANONYMIZED_TELEMETRY==="false"}getStoredSource(){return typeof localStorage<"u"?localStorage.getItem(di("source")):null}static getInstance(){return zr.instance||(zr.instance=new zr),zr.instance}setSource(e){this._source=e,typeof localStorage<"u"&&localStorage.setItem(di("source"),e)}getSource(){return this._source}get userId(){if(this._currUserId)return this._currUserId;if(!Gb())return this._currUserId=this.UNKNOWN_USER_ID,this._currUserId;try{const e=localStorage.getItem(di("user_id"));if(e)this._currUserId=e;else{const r=this.generateUserId();localStorage.setItem(di("user_id"),r),this._currUserId=r}this.trackPackageDownload({triggered_by:"user_id_property"}).catch(()=>{})}catch{this._currUserId=this.UNKNOWN_USER_ID}return this._currUserId}generateUserId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}async capture(e){if(!(!this._posthogClient&&!this._scarfClient)){if(this._posthogClient)try{const r={event:e.name,user_id:this.userId,properties:{...e.properties,mcp_use_version:Vb(),language:"typescript",source:this._source,package:"inspector"}};await this._posthogClient.logEvent(r)}catch{}if(this._scarfClient)try{const r={};r.mcp_use_version=Vb(),r.user_id=this.userId,r.event=e.name,r.language="typescript",r.source=this._source,r.package="inspector",await this._scarfClient.logEvent(r)}catch{}}}async trackPackageDownload(e){if(this._scarfClient&&Gb())try{const r=Vb();let n=!1,a=!1;const s=localStorage.getItem(di("download_version"));if(s?r>s&&(n=!0,a=!1,localStorage.setItem(di("download_version"),r)):(n=!0,a=!0,localStorage.setItem(di("download_version"),r)),n){const l={...e||{}};l.mcp_use_version=r,l.user_id=this.userId,l.event="package_download",l.first_download=a,l.language="typescript",l.source=this._source,l.package="inspector",await this._scarfClient.logEvent(l)}}catch{}}async trackInspectorOpen(e){const r=new ZX(e);await this.capture(r)}}const wB=b.createContext(void 0);function rQ({url:t,name:e,proxyConfig:r,transportType:n,onUpdate:a,onRemove:s}){const l=typeof window<"u"?new URL("/inspector/oauth/callback",window.location.origin).toString():"/inspector/oauth/callback";let c=t,d={};if(r?.proxyAddress){const v=new URL(r.proxyAddress),y=new URL(t);c=`${v.origin}${v.pathname}${y.pathname}${y.search}`,d["X-Target-URL"]=t}r?.customHeaders&&(d={...d,...r.customHeaders});const f=fR({url:c,callbackUrl:l,customHeaders:Object.keys(d).length>0?d:void 0,transportType:n||"http"}),m=b.useRef(a),h=b.useRef(null);return b.useEffect(()=>{m.current=a},[a]),b.useEffect(()=>{if(typeof queueMicrotask<"u")queueMicrotask(()=>{f.state==="ready"&&f.serverInfo&&console.log("[McpContext] Server info available:",f.serverInfo);const v={id:t,url:t,name:f.serverInfo?.name||e,state:f.state,tools:f.tools,resources:f.resources,prompts:f.prompts,error:f.error??null,authUrl:f.authUrl??null,customHeaders:d,transportType:n,proxyConfig:r,serverInfo:f.serverInfo,capabilities:f.capabilities,callTool:f.callTool,readResource:f.readResource,listPrompts:f.listPrompts,getPrompt:f.getPrompt,authenticate:f.authenticate,retry:f.retry,clearStorage:f.clearStorage,client:f.client},y=h.current;(!y||y.state!==v.state||y.error!==v.error||y.authUrl!==v.authUrl||y.name!==v.name||y.tools.length!==v.tools.length||y.resources.length!==v.resources.length||y.prompts.length!==v.prompts.length||y.serverInfo!==v.serverInfo||y.capabilities!==v.capabilities||!y.client)&&(h.current=v,m.current(v))});else{const v={id:t,url:t,name:f.serverInfo?.name||e,state:f.state,tools:f.tools,resources:f.resources,prompts:f.prompts,error:f.error??null,authUrl:f.authUrl??null,customHeaders:d,transportType:n,proxyConfig:r,serverInfo:f.serverInfo,capabilities:f.capabilities,callTool:f.callTool,readResource:f.readResource,listPrompts:f.listPrompts,getPrompt:f.getPrompt,authenticate:f.authenticate,retry:f.retry,clearStorage:f.clearStorage,client:f.client},y=h.current;(!y||y.state!==v.state||y.error!==v.error||y.authUrl!==v.authUrl||y.name!==v.name||y.tools.length!==v.tools.length||y.resources.length!==v.resources.length||y.prompts.length!==v.prompts.length||y.serverInfo!==v.serverInfo||y.capabilities!==v.capabilities||!y.client)&&(h.current=v,m.current(v))}},[t,e,n,r,f.state,f.tools,f.resources,f.prompts,f.error,f.authUrl,f.serverInfo,f.capabilities,f.client]),null}function nQ({children:t}){const[e,r]=b.useState([]),[n,a]=b.useState(new Map),[s,l]=b.useState(0),[c,d]=b.useState(!0),[f,m]=b.useState(new Set);b.useEffect(()=>{const k=localStorage.getItem("mcp-inspector-connections");if(k)try{const I=JSON.parse(k),O=Array.isArray(I)?I.filter(M=>M&&typeof M=="object"&&typeof M.id=="string"&&typeof M.url=="string"&&typeof M.name=="string").map(M=>(M.transportType||(M.transportType="http"),M)):[];(O.length!==I.length||O.some(M=>M.transportType==="http"&&!I.find(P=>P.id===M.id&&P.transportType)))&&(console.warn("Updated connections in localStorage with transport type migration"),localStorage.setItem("mcp-inspector-connections",JSON.stringify(O))),r(O)}catch(I){console.error("Failed to parse saved connections:",I),localStorage.removeItem("mcp-inspector-connections")}const A=localStorage.getItem("mcp-inspector-auto-connect");A!==null&&d(A==="true")},[]);const h=b.useCallback(k=>{a(A=>new Map(A).set(k.id,k)),l(A=>A+1),k.serverInfo?.name&&k.state==="ready"&&r(A=>{const I=A.find(O=>O.id===k.id);if(I&&I.name!==k.serverInfo.name){const O=A.map(L=>L.id===k.id?{...L,name:k.serverInfo.name}:L);return localStorage.setItem("mcp-inspector-connections",JSON.stringify(O)),O}return A})},[]),v=b.useCallback((k,A,I,O)=>{const M={id:k,url:k,name:A||k,proxyConfig:I,transportType:O||"http"};r(P=>{if(P.some(Q=>Q.id===k))return P;const Y=[...P,M];return localStorage.setItem("mcp-inspector-connections",JSON.stringify(Y)),Y})},[]),y=b.useCallback(k=>{zr.getInstance().capture(new QX({serverId:k})).catch(()=>{}),r(I=>{const O=I.filter(L=>L.id!==k);return localStorage.setItem("mcp-inspector-connections",JSON.stringify(O)),O}),a(I=>{const O=new Map(I),L=O.get(k);if(L){try{L.clearStorage()}catch(M){console.error("Failed to clear storage:",M)}O.delete(k)}return O})},[]),w=b.useCallback(k=>{const A=n.get(k);if(A)return A;const I=e.find(O=>O.id===k);if(I)return{id:I.id,url:I.url,name:I.name,state:"disconnected",tools:[],resources:[],prompts:[],error:null,authUrl:null,transportType:I.transportType,proxyConfig:I.proxyConfig,listPrompts:async O=>{throw new Error("Not connected")},getPrompt:async()=>{throw new Error("Not connected")},callTool:async()=>{throw new Error("Not connected")},readResource:async()=>{throw new Error("Not connected")},authenticate:()=>{},retry:()=>{},clearStorage:()=>{},client:null}},[n,e]),S=b.useCallback(k=>{d(k),localStorage.setItem("mcp-inspector-auto-connect",String(k)),k||m(new Set)},[]),R=b.useCallback(k=>{m(A=>new Set(A).add(k))},[]),x=b.useCallback(k=>{m(A=>{const I=new Set(A);return I.delete(k),I}),a(A=>{const I=new Map(A),O=I.get(k);if(O){try{O.clearStorage()}catch(L){console.error("Failed to clear storage:",L)}I.delete(k)}return I})},[]),_=b.useCallback((k,A)=>{r(I=>{const O=I.map(L=>L.id===k?{...L,name:A.name||L.name,proxyConfig:A.proxyConfig,transportType:A.transportType||L.transportType}:L);return localStorage.setItem("mcp-inspector-connections",JSON.stringify(O)),O})},[]),C=b.useMemo(()=>e.map(A=>{const I=n.get(A.id);return I||{id:A.id,url:A.url,name:A.name,state:"disconnected",tools:[],resources:[],prompts:[],error:null,authUrl:null,transportType:A.transportType,proxyConfig:A.proxyConfig,callTool:async()=>{throw new Error("Not connected")},readResource:async()=>{throw new Error("Not connected")},listPrompts:async O=>{throw new Error("Not connected")},getPrompt:async()=>{throw new Error("Not connected")},authenticate:()=>{},retry:()=>{},clearStorage:()=>{},client:null}}),[n,e,s]),N=b.useMemo(()=>({connections:C,addConnection:v,removeConnection:y,getConnection:w,autoConnect:c,setAutoConnect:S,connectServer:R,disconnectServer:x,updateConnectionConfig:_}),[C,v,y,w,c,S,R,x,_]);return g.jsxs(wB,{value:N,children:[e.filter(k=>c||f.has(k.id)).map(k=>g.jsx(rQ,{url:k.url,name:k.name,proxyConfig:k.proxyConfig,transportType:k.transportType,onUpdate:h,onRemove:()=>y(k.id)},`${k.id}-${k.transportType||"http"}-${k.proxyConfig?.proxyAddress||""}`)),t]})}function IR(){const t=b.use(wB);if(!t)throw new Error("useMcpContext must be used within McpProvider");return t}const aQ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),oQ=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),BO=t=>{const e=oQ(t);return e.charAt(0).toUpperCase()+e.slice(1)},_B=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim(),iQ=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var sQ={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 lQ=b.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:s,iconNode:l,...c},d)=>b.createElement("svg",{ref:d,...sQ,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:_B("lucide",a),...!s&&!iQ(c)&&{"aria-hidden":"true"},...c},[...l.map(([f,m])=>b.createElement(f,m)),...Array.isArray(s)?s:[s]]));const lt=(t,e)=>{const r=b.forwardRef(({className:n,...a},s)=>b.createElement(lQ,{ref:s,iconNode:e,className:_B(`lucide-${aQ(BO(t))}`,`lucide-${t}`,n),...a}));return r.displayName=BO(t),r};const cQ=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],uQ=lt("arrow-up",cQ);const dQ=[["path",{d:"m11 10 3 3",key:"fzmg1i"}],["path",{d:"M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z",key:"p4q2r7"}],["path",{d:"M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031",key:"wy6l02"}]],fQ=lt("brush",dQ);const pQ=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Do=lt("check",pQ);const mQ=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],TB=lt("chevron-down",mQ);const hQ=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],gQ=lt("chevron-up",hQ);const vQ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],bQ=lt("circle-minus",vQ);const yQ=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ic=lt("clock",yQ);const EQ=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],SQ=lt("code",EQ);const xQ=[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]],wQ=lt("cog",xQ);const _Q=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],TQ=lt("command",_Q);const RQ=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],aa=lt("copy",RQ);const CQ=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],eh=lt("database",CQ);const AQ=[["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"}]],RB=lt("download",AQ);const NQ=[["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"}]],qO=lt("external-link",NQ);const kQ=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],IQ=lt("eye-off",kQ);const OQ=[["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"}]],HO=lt("eye",OQ);const DQ=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],LQ=lt("file-code",DQ);const MQ=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],PQ=lt("file-image",MQ);const jQ=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],OR=lt("file-text",jQ);const UQ=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],FQ=lt("file",UQ);const zQ=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],$Q=lt("folder-open",zQ);const BQ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],qQ=lt("globe",BQ);const HQ=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],VQ=lt("grip-vertical",HQ);const GQ=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],CB=lt("history",GQ);const WQ=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],AB=lt("key",WQ);const YQ=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],th=lt("loader-circle",YQ);const KQ=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],ZQ=lt("maximize",KQ);const XQ=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],QQ=lt("message-circle",XQ);const JQ=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],cd=lt("message-square",JQ);const eJ=[["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"}]],VO=lt("monitor",eJ);const tJ=[["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"}]],rJ=lt("moon",tJ);const nJ=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],NB=lt("play",nJ);const aJ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],kB=lt("plus",aJ);const oJ=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],iJ=lt("rotate-ccw",oJ);const sJ=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],DR=lt("save",sJ);const lJ=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],LR=lt("search",lJ);const cJ=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],uJ=lt("send",cJ);const dJ=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],xm=lt("settings",dJ);const fJ=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],pJ=lt("shield",fJ);const mJ=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M20 12h.01",key:"1ykeid"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M4 12h.01",key:"158zrr"}],["path",{d:"M17.657 6.343h.01",key:"31pqzk"}],["path",{d:"M17.657 17.657h.01",key:"jehnf4"}],["path",{d:"M6.343 17.657h.01",key:"gdk6ow"}],["path",{d:"M6.343 6.343h.01",key:"1uurf0"}]],hJ=lt("sun-dim",mJ);const gJ=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Wb=lt("terminal",gJ);const vJ=[["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"}]],rT=lt("trash-2",vJ);const bJ=[["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"}]],yJ=lt("trash",bJ);const EJ=[["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"}]],ws=lt("wrench",EJ);const SJ=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Pd=lt("x",SJ);const xJ=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ud=lt("zap",xJ);function wJ(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const _J=t=>{switch(t){case"success":return CJ;case"info":return NJ;case"warning":return AJ;case"error":return kJ;default:return null}},TJ=Array(12).fill(0),RJ=({visible:t,className:e})=>le.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},le.createElement("div",{className:"sonner-spinner"},TJ.map((r,n)=>le.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),CJ=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),AJ=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},le.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"})),NJ=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),kJ=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),IJ=le.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"},le.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),le.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),OJ=()=>{const[t,e]=le.useState(document.hidden);return le.useEffect(()=>{const r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let nT=1;class DJ{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const r=this.subscribers.indexOf(e);this.subscribers.splice(r,1)}),this.publish=e=>{this.subscribers.forEach(r=>r(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var r;const{message:n,...a}=e,s=typeof e?.id=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:nT++,l=this.toasts.find(d=>d.id===s),c=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...e,id:s,title:n}),{...d,...e,id:s,dismissible:c,title:n}):d):this.addToast({title:n,...a,dismissible:c,id:s}),s},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:e,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),e),this.message=(e,r)=>this.create({...r,message:e}),this.error=(e,r)=>this.create({...r,message:e,type:"error"}),this.success=(e,r)=>this.create({...r,type:"success",message:e}),this.info=(e,r)=>this.create({...r,type:"info",message:e}),this.warning=(e,r)=>this.create({...r,type:"warning",message:e}),this.loading=(e,r)=>this.create({...r,type:"loading",message:e}),this.promise=(e,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:e,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const a=Promise.resolve(e instanceof Function?e():e);let s=n!==void 0,l;const c=a.then(async f=>{if(l=["resolve",f],le.isValidElement(f))s=!1,this.create({id:n,type:"default",message:f});else if(MJ(f)&&!f.ok){s=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${f.status}`):r.error,v=typeof r.description=="function"?await r.description(`HTTP error! status: ${f.status}`):r.description,w=typeof h=="object"&&!le.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:v,...w})}else if(f instanceof Error){s=!1;const h=typeof r.error=="function"?await r.error(f):r.error,v=typeof r.description=="function"?await r.description(f):r.description,w=typeof h=="object"&&!le.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:v,...w})}else if(r.success!==void 0){s=!1;const h=typeof r.success=="function"?await r.success(f):r.success,v=typeof r.description=="function"?await r.description(f):r.description,w=typeof h=="object"&&!le.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:v,...w})}}).catch(async f=>{if(l=["reject",f],r.error!==void 0){s=!1;const m=typeof r.error=="function"?await r.error(f):r.error,h=typeof r.description=="function"?await r.description(f):r.description,y=typeof m=="object"&&!le.isValidElement(m)?m:{message:m};this.create({id:n,type:"error",description:h,...y})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),d=()=>new Promise((f,m)=>c.then(()=>l[0]==="reject"?m(l[1]):f(l[1])).catch(m));return typeof n!="string"&&typeof n!="number"?{unwrap:d}:Object.assign(n,{unwrap:d})},this.custom=(e,r)=>{const n=r?.id||nT++;return this.create({jsx:e(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Sn=new DJ,LJ=(t,e)=>{const r=e?.id||nT++;return Sn.addToast({title:t,...e,id:r}),r},MJ=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",PJ=LJ,jJ=()=>Sn.toasts,UJ=()=>Sn.getActiveToasts(),cr=Object.assign(PJ,{success:Sn.success,info:Sn.info,warning:Sn.warning,error:Sn.error,custom:Sn.custom,message:Sn.message,promise:Sn.promise,dismiss:Sn.dismiss,loading:Sn.loading},{getHistory:jJ,getToasts:UJ});wJ("[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 hp(t){return t.label!==void 0}const FJ=3,zJ="24px",$J="16px",GO=4e3,BJ=356,qJ=14,HJ=45,VJ=200;function ka(...t){return t.filter(Boolean).join(" ")}function GJ(t){const[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}const WJ=t=>{var e,r,n,a,s,l,c,d,f;const{invert:m,toast:h,unstyled:v,interacting:y,setHeights:w,visibleToasts:S,heights:R,index:x,toasts:_,expanded:C,removeToast:N,defaultRichColors:k,closeButton:A,style:I,cancelButtonStyle:O,actionButtonStyle:L,className:M="",descriptionClassName:P="",duration:Y,position:Q,gap:J,expandByDefault:ee,classNames:U,icons:G,closeButtonAriaLabel:H="Close toast"}=t,[X,ae]=le.useState(null),[z,q]=le.useState(null),[$,W]=le.useState(!1),[te,F]=le.useState(!1),[j,Z]=le.useState(!1),[ne,V]=le.useState(!1),[de,fe]=le.useState(!1),[Re,be]=le.useState(0),[xe,Ne]=le.useState(0),ze=le.useRef(h.duration||Y||GO),Me=le.useRef(null),$e=le.useRef(null),ct=x===0,ce=x+1<=S,Ce=h.type,Fe=h.dismissible!==!1,_e=h.className||"",Ie=h.descriptionClassName||"",Oe=le.useMemo(()=>R.findIndex(Qe=>Qe.toastId===h.id)||0,[R,h.id]),Je=le.useMemo(()=>{var Qe;return(Qe=h.closeButton)!=null?Qe:A},[h.closeButton,A]),at=le.useMemo(()=>h.duration||Y||GO,[h.duration,Y]),Rt=le.useRef(0),Ot=le.useRef(0),Cn=le.useRef(0),vr=le.useRef(null),[or,Mt]=Q.split("-"),Zt=le.useMemo(()=>R.reduce((Qe,jt,Qt)=>Qt>=Oe?Qe:Qe+jt.height,0),[R,Oe]),fr=OJ(),Sr=h.invert||m,zn=Ce==="loading";Ot.current=le.useMemo(()=>Oe*J+Zt,[Oe,Zt]),le.useEffect(()=>{ze.current=at},[at]),le.useEffect(()=>{W(!0)},[]),le.useEffect(()=>{const Qe=$e.current;if(Qe){const jt=Qe.getBoundingClientRect().height;return Ne(jt),w(Qt=>[{toastId:h.id,height:jt,position:h.position},...Qt]),()=>w(Qt=>Qt.filter(Lr=>Lr.toastId!==h.id))}},[w,h.id]),le.useLayoutEffect(()=>{if(!$)return;const Qe=$e.current,jt=Qe.style.height;Qe.style.height="auto";const Qt=Qe.getBoundingClientRect().height;Qe.style.height=jt,Ne(Qt),w(Lr=>Lr.find(Xt=>Xt.toastId===h.id)?Lr.map(Xt=>Xt.toastId===h.id?{...Xt,height:Qt}:Xt):[{toastId:h.id,height:Qt,position:h.position},...Lr])},[$,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ir=le.useCallback(()=>{F(!0),be(Ot.current),w(Qe=>Qe.filter(jt=>jt.toastId!==h.id)),setTimeout(()=>{N(h)},VJ)},[h,N,w,Ot]);le.useEffect(()=>{if(h.promise&&Ce==="loading"||h.duration===1/0||h.type==="loading")return;let Qe;return C||y||fr?(()=>{if(Cn.current<Rt.current){const Lr=new Date().getTime()-Rt.current;ze.current=ze.current-Lr}Cn.current=new Date().getTime()})():(()=>{ze.current!==1/0&&(Rt.current=new Date().getTime(),Qe=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ir()},ze.current))})(),()=>clearTimeout(Qe)},[C,y,h,Ce,fr,ir]),le.useEffect(()=>{h.delete&&(ir(),h.onDismiss==null||h.onDismiss.call(h,h))},[ir,h.delete]);function Gt(){var Qe;if(G?.loading){var jt;return le.createElement("div",{className:ka(U?.loader,h==null||(jt=h.classNames)==null?void 0:jt.loader,"sonner-loader"),"data-visible":Ce==="loading"},G.loading)}return le.createElement(RJ,{className:ka(U?.loader,h==null||(Qe=h.classNames)==null?void 0:Qe.loader),visible:Ce==="loading"})}const pn=h.icon||G?.[Ce]||_J(Ce);var ua,an;return le.createElement("li",{tabIndex:0,ref:$e,className:ka(M,_e,U?.toast,h==null||(e=h.classNames)==null?void 0:e.toast,U?.default,U?.[Ce],h==null||(r=h.classNames)==null?void 0:r[Ce]),"data-sonner-toast":"","data-rich-colors":(ua=h.richColors)!=null?ua:k,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":$,"data-promise":!!h.promise,"data-swiped":de,"data-removed":te,"data-visible":ce,"data-y-position":or,"data-x-position":Mt,"data-index":x,"data-front":ct,"data-swiping":j,"data-dismissible":Fe,"data-type":Ce,"data-invert":Sr,"data-swipe-out":ne,"data-swipe-direction":z,"data-expanded":!!(C||ee&&$),"data-testid":h.testId,style:{"--index":x,"--toasts-before":x,"--z-index":_.length-x,"--offset":`${te?Re:Ot.current}px`,"--initial-height":ee?"auto":`${xe}px`,...I,...h.style},onDragEnd:()=>{Z(!1),ae(null),vr.current=null},onPointerDown:Qe=>{Qe.button!==2&&(zn||!Fe||(Me.current=new Date,be(Ot.current),Qe.target.setPointerCapture(Qe.pointerId),Qe.target.tagName!=="BUTTON"&&(Z(!0),vr.current={x:Qe.clientX,y:Qe.clientY})))},onPointerUp:()=>{var Qe,jt,Qt;if(ne||!Fe)return;vr.current=null;const Lr=Number(((Qe=$e.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$n=Number(((jt=$e.current)==null?void 0:jt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Xt=new Date().getTime()-((Qt=Me.current)==null?void 0:Qt.getTime()),Jr=X==="x"?Lr:$n,_a=Math.abs(Jr)/Xt;if(Math.abs(Jr)>=HJ||_a>.11){be(Ot.current),h.onDismiss==null||h.onDismiss.call(h,h),q(X==="x"?Lr>0?"right":"left":$n>0?"down":"up"),ir(),V(!0);return}else{var en,Br;(en=$e.current)==null||en.style.setProperty("--swipe-amount-x","0px"),(Br=$e.current)==null||Br.style.setProperty("--swipe-amount-y","0px")}fe(!1),Z(!1),ae(null)},onPointerMove:Qe=>{var jt,Qt,Lr;if(!vr.current||!Fe||((jt=window.getSelection())==null?void 0:jt.toString().length)>0)return;const Xt=Qe.clientY-vr.current.y,Jr=Qe.clientX-vr.current.x;var _a;const en=(_a=t.swipeDirections)!=null?_a:GJ(Q);!X&&(Math.abs(Jr)>1||Math.abs(Xt)>1)&&ae(Math.abs(Jr)>Math.abs(Xt)?"x":"y");let Br={x:0,y:0};const oe=K=>1/(1.5+Math.abs(K)/20);if(X==="y"){if(en.includes("top")||en.includes("bottom"))if(en.includes("top")&&Xt<0||en.includes("bottom")&&Xt>0)Br.y=Xt;else{const K=Xt*oe(Xt);Br.y=Math.abs(K)<Math.abs(Xt)?K:Xt}}else if(X==="x"&&(en.includes("left")||en.includes("right")))if(en.includes("left")&&Jr<0||en.includes("right")&&Jr>0)Br.x=Jr;else{const K=Jr*oe(Jr);Br.x=Math.abs(K)<Math.abs(Jr)?K:Jr}(Math.abs(Br.x)>0||Math.abs(Br.y)>0)&&fe(!0),(Qt=$e.current)==null||Qt.style.setProperty("--swipe-amount-x",`${Br.x}px`),(Lr=$e.current)==null||Lr.style.setProperty("--swipe-amount-y",`${Br.y}px`)}},Je&&!h.jsx&&Ce!=="loading"?le.createElement("button",{"aria-label":H,"data-disabled":zn,"data-close-button":!0,onClick:zn||!Fe?()=>{}:()=>{ir(),h.onDismiss==null||h.onDismiss.call(h,h)},className:ka(U?.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(an=G?.close)!=null?an:IJ):null,(Ce||h.icon||h.promise)&&h.icon!==null&&(G?.[Ce]!==null||h.icon)?le.createElement("div",{"data-icon":"",className:ka(U?.icon,h==null||(a=h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Gt():null,h.type!=="loading"?pn:null):null,le.createElement("div",{"data-content":"",className:ka(U?.content,h==null||(s=h.classNames)==null?void 0:s.content)},le.createElement("div",{"data-title":"",className:ka(U?.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?le.createElement("div",{"data-description":"",className:ka(P,Ie,U?.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),le.isValidElement(h.cancel)?h.cancel:h.cancel&&hp(h.cancel)?le.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||O,onClick:Qe=>{hp(h.cancel)&&Fe&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Qe),ir())},className:ka(U?.cancelButton,h==null||(d=h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,le.isValidElement(h.action)?h.action:h.action&&hp(h.action)?le.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:Qe=>{hp(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Qe),!Qe.defaultPrevented&&ir())},className:ka(U?.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function WO(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function YJ(t,e){const r={};return[t,e].forEach((n,a)=>{const s=a===1,l=s?"--mobile-offset":"--offset",c=s?$J:zJ;function d(f){["top","right","bottom","left"].forEach(m=>{r[`${l}-${m}`]=typeof f=="number"?`${f}px`:f})}typeof n=="number"||typeof n=="string"?d(n):typeof n=="object"?["top","right","bottom","left"].forEach(f=>{n[f]===void 0?r[`${l}-${f}`]=c:r[`${l}-${f}`]=typeof n[f]=="number"?`${n[f]}px`:n[f]}):d(c)}),r}const KJ=le.forwardRef(function(e,r){const{id:n,invert:a,position:s="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:d,className:f,offset:m,mobileOffset:h,theme:v="light",richColors:y,duration:w,style:S,visibleToasts:R=FJ,toastOptions:x,dir:_=WO(),gap:C=qJ,icons:N,containerAriaLabel:k="Notifications"}=e,[A,I]=le.useState([]),O=le.useMemo(()=>n?A.filter($=>$.toasterId===n):A.filter($=>!$.toasterId),[A,n]),L=le.useMemo(()=>Array.from(new Set([s].concat(O.filter($=>$.position).map($=>$.position)))),[O,s]),[M,P]=le.useState([]),[Y,Q]=le.useState(!1),[J,ee]=le.useState(!1),[U,G]=le.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=le.useRef(null),X=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),ae=le.useRef(null),z=le.useRef(!1),q=le.useCallback($=>{I(W=>{var te;return(te=W.find(F=>F.id===$.id))!=null&&te.delete||Sn.dismiss($.id),W.filter(({id:F})=>F!==$.id)})},[]);return le.useEffect(()=>Sn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{I(W=>W.map(te=>te.id===$.id?{...te,delete:!0}:te))});return}setTimeout(()=>{d$.flushSync(()=>{I(W=>{const te=W.findIndex(F=>F.id===$.id);return te!==-1?[...W.slice(0,te),{...W[te],...$},...W.slice(te+1)]:[$,...W]})})})}),[A]),le.useEffect(()=>{if(v!=="system"){G(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?G("dark"):G("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:W})=>{G(W?"dark":"light")})}catch{$.addListener(({matches:te})=>{try{G(te?"dark":"light")}catch(F){console.error(F)}})}},[v]),le.useEffect(()=>{A.length<=1&&Q(!1)},[A]),le.useEffect(()=>{const $=W=>{var te;if(l.every(Z=>W[Z]||W.code===Z)){var j;Q(!0),(j=H.current)==null||j.focus()}W.code==="Escape"&&(document.activeElement===H.current||(te=H.current)!=null&&te.contains(document.activeElement))&&Q(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[l]),le.useEffect(()=>{if(H.current)return()=>{ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null,z.current=!1)}},[H.current]),le.createElement("section",{ref:r,"aria-label":`${k} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map(($,W)=>{var te;const[F,j]=$.split("-");return O.length?le.createElement("ol",{key:$,dir:_==="auto"?WO():_,tabIndex:-1,ref:H,className:f,"data-sonner-toaster":!0,"data-sonner-theme":U,"data-y-position":F,"data-x-position":j,style:{"--front-toast-height":`${((te=M[0])==null?void 0:te.height)||0}px`,"--width":`${BJ}px`,"--gap":`${C}px`,...S,...YJ(m,h)},onBlur:Z=>{z.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(z.current=!1,ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||z.current||(z.current=!0,ae.current=Z.relatedTarget)},onMouseEnter:()=>Q(!0),onMouseMove:()=>Q(!0),onMouseLeave:()=>{J||Q(!1)},onDragEnd:()=>Q(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||ee(!0)},onPointerUp:()=>ee(!1)},O.filter(Z=>!Z.position&&W===0||Z.position===$).map((Z,ne)=>{var V,de;return le.createElement(WJ,{key:Z.id,icons:N,index:ne,toast:Z,defaultRichColors:y,duration:(V=x?.duration)!=null?V:w,className:x?.className,descriptionClassName:x?.descriptionClassName,invert:a,visibleToasts:R,closeButton:(de=x?.closeButton)!=null?de:d,interacting:J,position:$,style:x?.style,unstyled:x?.unstyled,classNames:x?.classNames,cancelButtonStyle:x?.cancelButtonStyle,actionButtonStyle:x?.actionButtonStyle,closeButtonAriaLabel:x?.closeButtonAriaLabel,removeToast:q,toasts:O.filter(fe=>fe.position==Z.position),heights:M.filter(fe=>fe.position==Z.position),setHeights:P,expandByDefault:c,gap:C,expanded:Y,swipeDirections:e.swipeDirections})})):null}))});var Yb="focusScope.autoFocusOnMount",Kb="focusScope.autoFocusOnUnmount",YO={bubbles:!1,cancelable:!0},ZJ="FocusScope",jd=b.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=t,[c,d]=b.useState(null),f=Ga(a),m=Ga(s),h=b.useRef(null),v=Nt(e,S=>d(S)),y=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let S=function(C){if(y.paused||!c)return;const N=C.target;c.contains(N)?h.current=N:pi(h.current,{select:!0})},R=function(C){if(y.paused||!c)return;const N=C.relatedTarget;N!==null&&(c.contains(N)||pi(h.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const k of C)k.removedNodes.length>0&&pi(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",R);const _=new MutationObserver(x);return c&&_.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",R),_.disconnect()}}},[n,c,y.paused]),b.useEffect(()=>{if(c){ZO.add(y);const S=document.activeElement;if(!c.contains(S)){const x=new CustomEvent(Yb,YO);c.addEventListener(Yb,f),c.dispatchEvent(x),x.defaultPrevented||(XJ(ree(IB(c)),{select:!0}),document.activeElement===S&&pi(c))}return()=>{c.removeEventListener(Yb,f),setTimeout(()=>{const x=new CustomEvent(Kb,YO);c.addEventListener(Kb,m),c.dispatchEvent(x),x.defaultPrevented||pi(S??document.body,{select:!0}),c.removeEventListener(Kb,m),ZO.remove(y)},0)}}},[c,f,m,y]);const w=b.useCallback(S=>{if(!r&&!n||y.paused)return;const R=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,x=document.activeElement;if(R&&x){const _=S.currentTarget,[C,N]=QJ(_);C&&N?!S.shiftKey&&x===N?(S.preventDefault(),r&&pi(C,{select:!0})):S.shiftKey&&x===C&&(S.preventDefault(),r&&pi(N,{select:!0})):x===_&&S.preventDefault()}},[r,n,y.paused]);return g.jsx(bt.div,{tabIndex:-1,...l,ref:v,onKeyDown:w})});jd.displayName=ZJ;function XJ(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(pi(n,{select:e}),document.activeElement!==r)return}function QJ(t){const e=IB(t),r=KO(e,t),n=KO(e.reverse(),t);return[r,n]}function IB(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function KO(t,e){for(const r of t)if(!JJ(r,{upTo:e}))return r}function JJ(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function eee(t){return t instanceof HTMLInputElement&&"select"in t}function pi(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&eee(t)&&e&&t.select()}}var ZO=tee();function tee(){let t=[];return{add(e){const r=t[0];e!==r&&r?.pause(),t=XO(t,e),t.unshift(e)},remove(e){t=XO(t,e),t[0]?.resume()}}}function XO(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function ree(t){return t.filter(e=>e.tagName!=="A")}var Zb=0;function rh(){b.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??QO()),document.body.insertAdjacentElement("beforeend",t[1]??QO()),Zb++,()=>{Zb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Zb--}},[])}function QO(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var La=function(){return La=Object.assign||function(e){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},La.apply(this,arguments)};function OB(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(t);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r}function nee(t,e,r){if(r||arguments.length===2)for(var n=0,a=e.length,s;n<a;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}var jp="right-scroll-bar-position",Up="width-before-scroll-bar",aee="with-scroll-bars-hidden",oee="--removed-body-scroll-bar-size";function Xb(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function iee(t,e){var r=b.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=e,r.facade}var see=typeof window<"u"?b.useLayoutEffect:b.useEffect,JO=new WeakMap;function lee(t,e){var r=iee(null,function(n){return t.forEach(function(a){return Xb(a,n)})});return see(function(){var n=JO.get(r);if(n){var a=new Set(n),s=new Set(t),l=r.current;a.forEach(function(c){s.has(c)||Xb(c,null)}),s.forEach(function(c){a.has(c)||Xb(c,l)})}JO.set(r,t)},[t]),r}function cee(t){return t}function uee(t,e){e===void 0&&(e=cee);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(s){var l=e(s,n);return r.push(l),function(){r=r.filter(function(c){return c!==l})}},assignSyncMedium:function(s){for(n=!0;r.length;){var l=r;r=[],l.forEach(s)}r={push:function(c){return s(c)},filter:function(){return r}}},assignMedium:function(s){n=!0;var l=[];if(r.length){var c=r;r=[],c.forEach(s),l=r}var d=function(){var m=l;l=[],m.forEach(s)},f=function(){return Promise.resolve().then(d)};f(),r={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),r}}}};return a}function dee(t){t===void 0&&(t={});var e=uee(null);return e.options=La({async:!0,ssr:!1},t),e}var DB=function(t){var e=t.sideCar,r=OB(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,La({},r))};DB.isSideCarExport=!0;function fee(t,e){return t.useMedium(e),DB}var LB=dee(),Qb=function(){},nh=b.forwardRef(function(t,e){var r=b.useRef(null),n=b.useState({onScrollCapture:Qb,onWheelCapture:Qb,onTouchMoveCapture:Qb}),a=n[0],s=n[1],l=t.forwardProps,c=t.children,d=t.className,f=t.removeScrollBar,m=t.enabled,h=t.shards,v=t.sideCar,y=t.noRelative,w=t.noIsolation,S=t.inert,R=t.allowPinchZoom,x=t.as,_=x===void 0?"div":x,C=t.gapMode,N=OB(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=v,A=lee([r,e]),I=La(La({},N),a);return b.createElement(b.Fragment,null,m&&b.createElement(k,{sideCar:LB,removeScrollBar:f,shards:h,noRelative:y,noIsolation:w,inert:S,setCallbacks:s,allowPinchZoom:!!R,lockRef:r,gapMode:C}),l?b.cloneElement(b.Children.only(c),La(La({},I),{ref:A})):b.createElement(_,La({},I,{className:d,ref:A}),c))});nh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};nh.classNames={fullWidth:Up,zeroRight:jp};var pee=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mee(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=pee();return e&&t.setAttribute("nonce",e),t}function hee(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function gee(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var vee=function(){var t=0,e=null;return{add:function(r){t==0&&(e=mee())&&(hee(e,r),gee(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},bee=function(){var t=vee();return function(e,r){b.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},MB=function(){var t=bee(),e=function(r){var n=r.styles,a=r.dynamic;return t(n,a),null};return e},yee={left:0,top:0,right:0,gap:0},Jb=function(t){return parseInt(t||"",10)||0},Eee=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],a=e[t==="padding"?"paddingRight":"marginRight"];return[Jb(r),Jb(n),Jb(a)]},See=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return yee;var e=Eee(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},xee=MB(),zl="data-scroll-locked",wee=function(t,e,r,n){var a=t.left,s=t.top,l=t.right,c=t.gap;return r===void 0&&(r="margin"),`
|
|
26
26
|
.`.concat(aee,` {
|
|
27
27
|
overflow: hidden `).concat(n,`;
|
|
28
28
|
padding-right: `).concat(c,"px ").concat(n,`;
|
|
@@ -66,7 +66,7 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
|
|
|
66
66
|
|
|
67
67
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
68
68
|
|
|
69
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return b.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},Kee="DialogDescriptionWarning",Zee=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${t4(Kee).contentName}}.`;return b.useEffect(()=>{const a=t.current?.getAttribute("aria-describedby");e&&a&&(document.getElementById(e)||console.warn(n))},[n,t,e]),null},UR=$B,r4=qB,FR=VB,zR=GB,$R=WB,n4=KB,a4=XB,o4=JB;function $u({...t}){return g.jsx(UR,{"data-slot":"dialog",...t})}function ty({...t}){return g.jsx(r4,{"data-slot":"dialog-trigger",...t})}function Xee({...t}){return g.jsx(FR,{"data-slot":"dialog-portal",...t})}function Qee({className:t,...e}){return g.jsx(zR,{"data-slot":"dialog-overlay",className:De("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",t),...e})}function Bu({className:t,children:e,showCloseButton:r=!0,...n}){return g.jsxs(Xee,{"data-slot":"dialog-portal",children:[g.jsx(Qee,{}),g.jsxs($R,{"data-slot":"dialog-content",className:De("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",t),...n,children:[e,r&&g.jsxs(o4,{"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:[g.jsx(Pd,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function qu({className:t,...e}){return g.jsx("div",{"data-slot":"dialog-header",className:De("flex flex-col gap-2 text-center sm:text-left",t),...e})}function Hu({className:t,...e}){return g.jsx(n4,{"data-slot":"dialog-title",className:De("text-lg leading-none font-semibold",t),...e})}function Jee({className:t,...e}){return g.jsx(a4,{"data-slot":"dialog-description",className:De("text-muted-foreground text-sm",t),...e})}function Or({className:t,type:e,...r}){return g.jsx("input",{type:e,"data-slot":"input",className:De("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",t),...r})}function aD(t,[e,r]){return Math.min(r,Math.max(e,t))}function BR(t){const e=t+"CollectionProvider",[r,n]=Za(e),[a,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:R,children:x}=S,_=le.useRef(null),C=le.useRef(new Map).current;return g.jsx(a,{scope:R,itemMap:C,collectionRef:_,children:x})};l.displayName=e;const c=t+"CollectionSlot",d=Ss(c),f=le.forwardRef((S,R)=>{const{scope:x,children:_}=S,C=s(c,x),N=Nt(R,C.collectionRef);return g.jsx(d,{ref:N,children:_})});f.displayName=c;const m=t+"CollectionItemSlot",h="data-radix-collection-item",v=Ss(m),y=le.forwardRef((S,R)=>{const{scope:x,children:_,...C}=S,N=le.useRef(null),k=Nt(R,N),A=s(m,x);return le.useEffect(()=>(A.itemMap.set(N,{ref:N,...C}),()=>void A.itemMap.delete(N))),g.jsx(v,{[h]:"",ref:k,children:_})});y.displayName=m;function w(S){const R=s(t+"CollectionConsumer",S);return le.useCallback(()=>{const _=R.collectionRef.current;if(!_)return[];const C=Array.from(_.querySelectorAll(`[${h}]`));return Array.from(R.itemMap.values()).sort((A,I)=>C.indexOf(A.ref.current)-C.indexOf(I.ref.current))},[R.collectionRef,R.itemMap])}return[{Provider:l,Slot:f,ItemSlot:y},w,n]}var ete=b.createContext(void 0);function qR(t){const e=b.useContext(ete);return t||e||"ltr"}var tte=[" ","Enter","ArrowUp","ArrowDown"],rte=[" ","Enter"],Ts="Select",[ih,sh,nte]=BR(Ts),[Tc]=Za(Ts,[nte,ki]),lh=ki(),[ate,Ii]=Tc(Ts),[ote,ite]=Tc(Ts),i4=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:a,onOpenChange:s,value:l,defaultValue:c,onValueChange:d,dir:f,name:m,autoComplete:h,disabled:v,required:y,form:w}=t,S=lh(e),[R,x]=b.useState(null),[_,C]=b.useState(null),[N,k]=b.useState(!1),A=qR(f),[I,O]=_i({prop:n,defaultProp:a??!1,onChange:s,caller:Ts}),[L,M]=_i({prop:l,defaultProp:c,onChange:d,caller:Ts}),P=b.useRef(null),Y=R?w||!!R.closest("form"):!0,[Q,J]=b.useState(new Set),ee=Array.from(Q).map(U=>U.props.value).join(";");return g.jsx(Km,{...S,children:g.jsxs(ate,{required:y,scope:e,trigger:R,onTriggerChange:x,valueNode:_,onValueNodeChange:C,valueNodeHasChildren:N,onValueNodeHasChildrenChange:k,contentId:Xr(),value:L,onValueChange:M,open:I,onOpenChange:O,dir:A,triggerPointerDownPosRef:P,disabled:v,children:[g.jsx(ih.Provider,{scope:e,children:g.jsx(ote,{scope:t.__scopeSelect,onNativeOptionAdd:b.useCallback(U=>{J(G=>new Set(G).add(U))},[]),onNativeOptionRemove:b.useCallback(U=>{J(G=>{const H=new Set(G);return H.delete(U),H})},[]),children:r})}),Y?g.jsxs(A4,{"aria-hidden":!0,required:y,tabIndex:-1,name:m,autoComplete:h,value:L,onChange:U=>M(U.target.value),disabled:v,form:w,children:[L===void 0?g.jsx("option",{value:""}):null,Array.from(Q)]},ee):null]})})};i4.displayName=Ts;var s4="SelectTrigger",l4=b.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...a}=t,s=lh(r),l=Ii(s4,r),c=l.disabled||n,d=Nt(e,l.onTriggerChange),f=sh(r),m=b.useRef("touch"),[h,v,y]=k4(S=>{const R=f().filter(C=>!C.disabled),x=R.find(C=>C.value===l.value),_=I4(R,S,x);_!==void 0&&l.onValueChange(_.value)}),w=S=>{c||(l.onOpenChange(!0),y()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return g.jsx(Ld,{asChild:!0,...s,children:g.jsx(bt.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":N4(l.value)?"":void 0,...a,ref:d,onClick:He(a.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&w(S)}),onPointerDown:He(a.onPointerDown,S=>{m.current=S.pointerType;const R=S.target;R.hasPointerCapture(S.pointerId)&&R.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(w(S),S.preventDefault())}),onKeyDown:He(a.onKeyDown,S=>{const R=h.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&v(S.key),!(R&&S.key===" ")&&tte.includes(S.key)&&(w(),S.preventDefault())})})})});l4.displayName=s4;var c4="SelectValue",u4=b.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:a,children:s,placeholder:l="",...c}=t,d=Ii(c4,r),{onValueNodeHasChildrenChange:f}=d,m=s!==void 0,h=Nt(e,d.onValueNodeChange);return nn(()=>{f(m)},[f,m]),g.jsx(bt.span,{...c,ref:h,style:{pointerEvents:"none"},children:N4(d.value)?g.jsx(g.Fragment,{children:l}):s})});u4.displayName=c4;var ste="SelectIcon",d4=b.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...a}=t;return g.jsx(bt.span,{"aria-hidden":!0,...a,ref:e,children:n||"▼"})});d4.displayName=ste;var lte="SelectPortal",f4=t=>g.jsx(_c,{asChild:!0,...t});f4.displayName=lte;var Rs="SelectContent",p4=b.forwardRef((t,e)=>{const r=Ii(Rs,t.__scopeSelect),[n,a]=b.useState();if(nn(()=>{a(new DocumentFragment)},[]),!r.open){const s=n;return s?bc.createPortal(g.jsx(m4,{scope:t.__scopeSelect,children:g.jsx(ih.Slot,{scope:t.__scopeSelect,children:g.jsx("div",{children:t.children})})}),s):null}return g.jsx(h4,{...t,ref:e})});p4.displayName=Rs;var va=10,[m4,Oi]=Tc(Rs),cte="SelectContentImpl",ute=Ss("SelectContent.RemoveScroll"),h4=b.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:d,align:f,alignOffset:m,arrowPadding:h,collisionBoundary:v,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:R,...x}=t,_=Ii(Rs,r),[C,N]=b.useState(null),[k,A]=b.useState(null),I=Nt(e,j=>N(j)),[O,L]=b.useState(null),[M,P]=b.useState(null),Y=sh(r),[Q,J]=b.useState(!1),ee=b.useRef(!1);b.useEffect(()=>{if(C)return ah(C)},[C]),rh();const U=b.useCallback(j=>{const[Z,...ne]=Y().map(fe=>fe.ref.current),[V]=ne.slice(-1),de=document.activeElement;for(const fe of j)if(fe===de||(fe?.scrollIntoView({block:"nearest"}),fe===Z&&k&&(k.scrollTop=0),fe===V&&k&&(k.scrollTop=k.scrollHeight),fe?.focus(),document.activeElement!==de))return},[Y,k]),G=b.useCallback(()=>U([O,C]),[U,O,C]);b.useEffect(()=>{Q&&G()},[Q,G]);const{onOpenChange:H,triggerPointerDownPosRef:X}=_;b.useEffect(()=>{if(C){let j={x:0,y:0};const Z=V=>{j={x:Math.abs(Math.round(V.pageX)-(X.current?.x??0)),y:Math.abs(Math.round(V.pageY)-(X.current?.y??0))}},ne=V=>{j.x<=10&&j.y<=10?V.preventDefault():C.contains(V.target)||H(!1),document.removeEventListener("pointermove",Z),X.current=null};return X.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",ne,{capture:!0})}}},[C,H,X]),b.useEffect(()=>{const j=()=>H(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[H]);const[ae,z]=k4(j=>{const Z=Y().filter(de=>!de.disabled),ne=Z.find(de=>de.ref.current===document.activeElement),V=I4(Z,j,ne);V&&setTimeout(()=>V.ref.current.focus())}),q=b.useCallback((j,Z,ne)=>{const V=!ee.current&&!ne;(_.value!==void 0&&_.value===Z||V)&&(L(j),V&&(ee.current=!0))},[_.value]),$=b.useCallback(()=>C?.focus(),[C]),W=b.useCallback((j,Z,ne)=>{const V=!ee.current&&!ne;(_.value!==void 0&&_.value===Z||V)&&P(j)},[_.value]),te=n==="popper"?oT:g4,F=te===oT?{side:c,sideOffset:d,align:f,alignOffset:m,arrowPadding:h,collisionBoundary:v,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:R}:{};return g.jsx(m4,{scope:r,content:C,viewport:k,onViewportChange:A,itemRefCallback:q,selectedItem:O,onItemLeave:$,itemTextRefCallback:W,focusSelectedItem:G,selectedItemText:M,position:n,isPositioned:Q,searchRef:ae,children:g.jsx(Ud,{as:ute,allowPinchZoom:!0,children:g.jsx(jd,{asChild:!0,trapped:_.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:He(a,j=>{_.trigger?.focus({preventScroll:!0}),j.preventDefault()}),children:g.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:g.jsx(te,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:j=>j.preventDefault(),...x,...F,onPlaced:()=>J(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:He(x.onKeyDown,j=>{const Z=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!Z&&j.key.length===1&&z(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let V=Y().filter(de=>!de.disabled).map(de=>de.ref.current);if(["ArrowUp","End"].includes(j.key)&&(V=V.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){const de=j.target,fe=V.indexOf(de);V=V.slice(fe+1)}setTimeout(()=>U(V)),j.preventDefault()}})})})})})})});h4.displayName=cte;var dte="SelectItemAlignedPosition",g4=b.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...a}=t,s=Ii(Rs,r),l=Oi(Rs,r),[c,d]=b.useState(null),[f,m]=b.useState(null),h=Nt(e,I=>m(I)),v=sh(r),y=b.useRef(!1),w=b.useRef(!0),{viewport:S,selectedItem:R,selectedItemText:x,focusSelectedItem:_}=l,C=b.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&f&&S&&R&&x){const I=s.trigger.getBoundingClientRect(),O=f.getBoundingClientRect(),L=s.valueNode.getBoundingClientRect(),M=x.getBoundingClientRect();if(s.dir!=="rtl"){const de=M.left-O.left,fe=L.left-de,Re=I.left-fe,be=I.width+Re,xe=Math.max(be,O.width),Ne=window.innerWidth-va,ze=aD(fe,[va,Math.max(va,Ne-xe)]);c.style.minWidth=be+"px",c.style.left=ze+"px"}else{const de=O.right-M.right,fe=window.innerWidth-L.right-de,Re=window.innerWidth-I.right-fe,be=I.width+Re,xe=Math.max(be,O.width),Ne=window.innerWidth-va,ze=aD(fe,[va,Math.max(va,Ne-xe)]);c.style.minWidth=be+"px",c.style.right=ze+"px"}const P=v(),Y=window.innerHeight-va*2,Q=S.scrollHeight,J=window.getComputedStyle(f),ee=parseInt(J.borderTopWidth,10),U=parseInt(J.paddingTop,10),G=parseInt(J.borderBottomWidth,10),H=parseInt(J.paddingBottom,10),X=ee+U+Q+H+G,ae=Math.min(R.offsetHeight*5,X),z=window.getComputedStyle(S),q=parseInt(z.paddingTop,10),$=parseInt(z.paddingBottom,10),W=I.top+I.height/2-va,te=Y-W,F=R.offsetHeight/2,j=R.offsetTop+F,Z=ee+U+j,ne=X-Z;if(Z<=W){const de=P.length>0&&R===P[P.length-1].ref.current;c.style.bottom="0px";const fe=f.clientHeight-S.offsetTop-S.offsetHeight,Re=Math.max(te,F+(de?$:0)+fe+G),be=Z+Re;c.style.height=be+"px"}else{const de=P.length>0&&R===P[0].ref.current;c.style.top="0px";const Re=Math.max(W,ee+S.offsetTop+(de?q:0)+F)+ne;c.style.height=Re+"px",S.scrollTop=Z-W+S.offsetTop}c.style.margin=`${va}px 0`,c.style.minHeight=ae+"px",c.style.maxHeight=Y+"px",n?.(),requestAnimationFrame(()=>y.current=!0)}},[v,s.trigger,s.valueNode,c,f,S,R,x,s.dir,n]);nn(()=>C(),[C]);const[N,k]=b.useState();nn(()=>{f&&k(window.getComputedStyle(f).zIndex)},[f]);const A=b.useCallback(I=>{I&&w.current===!0&&(C(),_?.(),w.current=!1)},[C,_]);return g.jsx(pte,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:A,children:g.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:g.jsx(bt.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});g4.displayName=dte;var fte="SelectPopperPosition",oT=b.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:a=va,...s}=t,l=lh(r);return g.jsx(Zm,{...l,...s,ref:e,align:n,collisionPadding:a,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});oT.displayName=fte;var[pte,HR]=Tc(Rs,{}),iT="SelectViewport",v4=b.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...a}=t,s=Oi(iT,r),l=HR(iT,r),c=Nt(e,s.onViewportChange),d=b.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),g.jsx(ih.Slot,{scope:r,children:g.jsx(bt.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:He(a.onScroll,f=>{const m=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:v}=l;if(v?.current&&h){const y=Math.abs(d.current-m.scrollTop);if(y>0){const w=window.innerHeight-va*2,S=parseFloat(h.style.minHeight),R=parseFloat(h.style.height),x=Math.max(S,R);if(x<w){const _=x+y,C=Math.min(w,_),N=_-C;h.style.height=C+"px",h.style.bottom==="0px"&&(m.scrollTop=N>0?N:0,h.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});v4.displayName=iT;var b4="SelectGroup",[mte,hte]=Tc(b4),gte=b.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=Xr();return g.jsx(mte,{scope:r,id:a,children:g.jsx(bt.div,{role:"group","aria-labelledby":a,...n,ref:e})})});gte.displayName=b4;var y4="SelectLabel",vte=b.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=hte(y4,r);return g.jsx(bt.div,{id:a.id,...n,ref:e})});vte.displayName=y4;var _m="SelectItem",[bte,E4]=Tc(_m),S4=b.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:a=!1,textValue:s,...l}=t,c=Ii(_m,r),d=Oi(_m,r),f=c.value===n,[m,h]=b.useState(s??""),[v,y]=b.useState(!1),w=Nt(e,_=>d.itemRefCallback?.(_,n,a)),S=Xr(),R=b.useRef("touch"),x=()=>{a||(c.onValueChange(n),c.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(bte,{scope:r,value:n,disabled:a,textId:S,isSelected:f,onItemTextChange:b.useCallback(_=>{h(C=>C||(_?.textContent??"").trim())},[]),children:g.jsx(ih.ItemSlot,{scope:r,value:n,disabled:a,textValue:m,children:g.jsx(bt.div,{role:"option","aria-labelledby":S,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:w,onFocus:He(l.onFocus,()=>y(!0)),onBlur:He(l.onBlur,()=>y(!1)),onClick:He(l.onClick,()=>{R.current!=="mouse"&&x()}),onPointerUp:He(l.onPointerUp,()=>{R.current==="mouse"&&x()}),onPointerDown:He(l.onPointerDown,_=>{R.current=_.pointerType}),onPointerMove:He(l.onPointerMove,_=>{R.current=_.pointerType,a?d.onItemLeave?.():R.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:He(l.onPointerLeave,_=>{_.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:He(l.onKeyDown,_=>{d.searchRef?.current!==""&&_.key===" "||(rte.includes(_.key)&&x(),_.key===" "&&_.preventDefault())})})})})});S4.displayName=_m;var ku="SelectItemText",x4=b.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:a,...s}=t,l=Ii(ku,r),c=Oi(ku,r),d=E4(ku,r),f=ite(ku,r),[m,h]=b.useState(null),v=Nt(e,x=>h(x),d.onItemTextChange,x=>c.itemTextRefCallback?.(x,d.value,d.disabled)),y=m?.textContent,w=b.useMemo(()=>g.jsx("option",{value:d.value,disabled:d.disabled,children:y},d.value),[d.disabled,d.value,y]),{onNativeOptionAdd:S,onNativeOptionRemove:R}=f;return nn(()=>(S(w),()=>R(w)),[S,R,w]),g.jsxs(g.Fragment,{children:[g.jsx(bt.span,{id:d.textId,...s,ref:v}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?bc.createPortal(s.children,l.valueNode):null]})});x4.displayName=ku;var w4="SelectItemIndicator",_4=b.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return E4(w4,r).isSelected?g.jsx(bt.span,{"aria-hidden":!0,...n,ref:e}):null});_4.displayName=w4;var sT="SelectScrollUpButton",T4=b.forwardRef((t,e)=>{const r=Oi(sT,t.__scopeSelect),n=HR(sT,t.__scopeSelect),[a,s]=b.useState(!1),l=Nt(e,n.onScrollButtonChange);return nn(()=>{if(r.viewport&&r.isPositioned){let c=function(){const f=d.scrollTop>0;s(f)};const d=r.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[r.viewport,r.isPositioned]),a?g.jsx(C4,{...t,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=r;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});T4.displayName=sT;var lT="SelectScrollDownButton",R4=b.forwardRef((t,e)=>{const r=Oi(lT,t.__scopeSelect),n=HR(lT,t.__scopeSelect),[a,s]=b.useState(!1),l=Nt(e,n.onScrollButtonChange);return nn(()=>{if(r.viewport&&r.isPositioned){let c=function(){const f=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<f;s(m)};const d=r.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[r.viewport,r.isPositioned]),a?g.jsx(C4,{...t,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=r;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});R4.displayName=lT;var C4=b.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...a}=t,s=Oi("SelectScrollButton",r),l=b.useRef(null),c=sh(r),d=b.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return b.useEffect(()=>()=>d(),[d]),nn(()=>{c().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),g.jsx(bt.div,{"aria-hidden":!0,...a,ref:e,style:{flexShrink:0,...a.style},onPointerDown:He(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(n,50))}),onPointerMove:He(a.onPointerMove,()=>{s.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(n,50))}),onPointerLeave:He(a.onPointerLeave,()=>{d()})})}),yte="SelectSeparator",Ete=b.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return g.jsx(bt.div,{"aria-hidden":!0,...n,ref:e})});Ete.displayName=yte;var cT="SelectArrow",Ste=b.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=lh(r),s=Ii(cT,r),l=Oi(cT,r);return s.open&&l.position==="popper"?g.jsx(Xm,{...a,...n,ref:e}):null});Ste.displayName=cT;var xte="SelectBubbleInput",A4=b.forwardRef(({__scopeSelect:t,value:e,...r},n)=>{const a=b.useRef(null),s=Nt(n,a),l=O$(e);return b.useEffect(()=>{const c=a.current;if(!c)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==e&&m){const h=new Event("change",{bubbles:!0});m.call(c,e),c.dispatchEvent(h)}},[l,e]),g.jsx(bt.select,{...r,style:{...dB,...r.style},ref:s,defaultValue:e})});A4.displayName=xte;function N4(t){return t===""||t===void 0}function k4(t){const e=Ga(t),r=b.useRef(""),n=b.useRef(0),a=b.useCallback(l=>{const c=r.current+l;e(c),(function d(f){r.current=f,window.clearTimeout(n.current),f!==""&&(n.current=window.setTimeout(()=>d(""),1e3))})(c)},[e]),s=b.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,a,s]}function I4(t,e,r){const a=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let l=wte(t,Math.max(s,0));a.length===1&&(l=l.filter(f=>f!==r));const d=l.find(f=>f.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==r?d:void 0}function wte(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var _te=i4,Tte=l4,Rte=u4,Cte=d4,Ate=f4,Nte=p4,kte=v4,Ite=S4,Ote=x4,Dte=_4,Lte=T4,Mte=R4;function Fp({...t}){return g.jsx(_te,{"data-slot":"select",...t})}function zp({...t}){return g.jsx(Rte,{"data-slot":"select-value",...t})}function $p({className:t,size:e="default",children:r,...n}){return g.jsxs(Tte,{"data-slot":"select-trigger","data-size":e,className:De("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",t),...n,children:[r,g.jsx(Cte,{asChild:!0,children:g.jsx(TB,{className:"size-4 opacity-50"})})]})}function Bp({className:t,children:e,position:r="popper",align:n="center",...a}){return g.jsx(Ate,{children:g.jsxs(Nte,{"data-slot":"select-content",className:De("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",r==="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",t),position:r,align:n,...a,children:[g.jsx(Pte,{}),g.jsx(kte,{className:De("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:e}),g.jsx(jte,{})]})})}function xo({className:t,children:e,...r}){return g.jsxs(Ite,{"data-slot":"select-item",className:De("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",t),...r,children:[g.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:g.jsx(Dte,{children:g.jsx(Do,{className:"size-4"})})}),g.jsx(Ote,{children:e})]})}function Pte({className:t,...e}){return g.jsx(Lte,{"data-slot":"select-scroll-up-button",className:De("flex cursor-default items-center justify-center py-1",t),...e,children:g.jsx(gQ,{className:"size-4"})})}function jte({className:t,...e}){return g.jsx(Mte,{"data-slot":"select-scroll-down-button",className:De("flex cursor-default items-center justify-center py-1",t),...e,children:g.jsx(TB,{className:"size-4"})})}function Ute({headers:t,onChange:e,onSave:r,className:n,title:a="Custom Headers",description:s="Headers with both name and value will be sent",maxHeaders:l=50}){const[c,d]=b.useState({}),f=()=>Math.random().toString(36).slice(2,11),m=()=>{if(t.length>=l)return;const w={id:f(),name:"",value:""};e([...t,w])},h=w=>{e(t.filter(S=>S.id!==w))},v=(w,S,R)=>{e(t.map(x=>x.id===w?{...x,[S]:R}:x))},y=w=>{d(S=>({...S,[w]:!S[w]}))};return g.jsxs("div",{className:De("space-y-3",n),children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:"text-base font-medium",children:a}),g.jsx("p",{className:"text-sm text-muted-foreground",children:s})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"grid grid-cols-[1fr_1fr] gap-4 text-sm font-medium text-muted-foreground",children:[g.jsx("div",{children:"Name"}),g.jsx("div",{children:"Value"})]}),t.length===0?g.jsxs("div",{className:"grid grid-cols-[1fr_1fr] gap-4 items-center",children:[g.jsx(Or,{placeholder:"Authorization",value:"",onChange:w=>{if(w.target.value.trim()){const S={id:f(),name:w.target.value,value:""};e([S])}},className:"text-sm",autoComplete:"off"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Or,{placeholder:"Bearer token...",value:"",onChange:()=>{},type:"password",className:"font-mono text-sm",autoComplete:"off",disabled:!0}),g.jsx(tt,{type:"button",variant:"ghost",size:"icon-sm",className:"h-8 w-8 p-0",disabled:!0,children:g.jsx(HO,{className:"h-4 w-4"})}),g.jsx(tt,{type:"button",variant:"ghost",size:"icon-sm",className:"h-8 w-8 p-0",disabled:!0,children:g.jsx(rT,{className:"h-4 w-4"})})]})]}):t.map(w=>g.jsxs("div",{className:"grid grid-cols-[1fr_1fr] gap-4 items-center",children:[g.jsx(Or,{placeholder:"Authorization",value:w.name,onChange:S=>v(w.id,"name",S.target.value),className:"text-sm",autoComplete:"off"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Or,{placeholder:"",value:w.value,onChange:S=>v(w.id,"value",S.target.value),type:c[w.id]?"text":"password",className:"font-mono text-sm",autoComplete:"off"}),g.jsx(tt,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>y(w.id),className:"h-8 w-8 p-0",children:c[w.id]?g.jsx(IQ,{className:"h-4 w-4"}):g.jsx(HO,{className:"h-4 w-4"})}),g.jsx(tt,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>h(w.id),className:"h-8 w-8 p-0",children:g.jsx(rT,{className:"h-4 w-4"})})]})]},w.id)),g.jsx("div",{className:"flex justify-start mt-4",children:g.jsxs(tt,{type:"button",variant:"outline",size:"sm",onClick:m,disabled:t.length>=l,className:"flex items-center gap-2",children:[g.jsx(kB,{className:"h-4 w-4"}),"Add"]})})]}),r&&g.jsx("div",{className:"flex justify-end",children:g.jsx(tt,{type:"button",onClick:r,className:"bg-black text-white hover:bg-gray-800",children:"Save"})})]})}function O4({transportType:t,setTransportType:e,url:r,setUrl:n,connectionType:a,setConnectionType:s,customHeaders:l,setCustomHeaders:c,requestTimeout:d,setRequestTimeout:f,resetTimeoutOnProgress:m,setResetTimeoutOnProgress:h,maxTotalTimeout:v,setMaxTotalTimeout:y,proxyAddress:w,setProxyAddress:S,clientId:R,setClientId:x,redirectUrl:_,setRedirectUrl:C,scope:N,setScope:k,autoSwitch:A,setAutoSwitch:I,onConnect:O,onSave:L,onCancel:M,variant:P="default",showConnectButton:Y=!1,showSaveButton:Q=!1,showExportButton:J=!1,isConnecting:ee=!1}){const[U,G]=b.useState(!1),[H,X]=b.useState(!1),[ae,z]=b.useState(!1),q=async()=>{if(!r.trim()){cr.error("Please enter a URL first");return}const V={url:r,transportType:t==="SSE"?"http":"sse",connectionType:a,proxyConfig:a==="Via Proxy"&&w.trim()?{proxyAddress:w.trim(),customHeaders:l.reduce((de,fe)=>(fe.name&&fe.value&&(de[fe.name]=fe.value),de),{})}:void 0,customHeaders:l.reduce((de,fe)=>(fe.name&&fe.value&&(de[fe.name]=fe.value),de),{}),requestTimeout:Number.parseInt(d,10),resetTimeoutOnProgress:m==="True",maxTotalTimeout:Number.parseInt(v,10),oauth:R||N?{clientId:R,redirectUrl:_,scope:N}:void 0};try{await navigator.clipboard.writeText(JSON.stringify(V,null,2)),cr.success("Configuration copied to clipboard")}catch{cr.error("Failed to copy configuration to clipboard")}},$=P==="styled",W=$?"bg-white/10 border-white/20 text-white placeholder:text-white/50":"",te=$?"text-white/90":"",F=$?"bg-white/10 border-white/20 text-white":"",j=$?"bg-white/10 border-white/20 text-white hover:bg-white/20":"",Z=async V=>{const de=V.clipboardData.getData("text");try{const fe=JSON.parse(de);if(fe.url&&typeof fe.url=="string"){if(V.preventDefault(),n(fe.url),fe.transportType&&e(fe.transportType==="sse"?"WebSocket":"SSE"),fe.connectionType&&s(fe.connectionType),fe.proxyConfig?.proxyAddress&&S(fe.proxyConfig.proxyAddress),fe.customHeaders){const Re=Object.entries(fe.customHeaders).map(([be,xe],Ne)=>({id:`header-${Ne}`,name:be,value:String(xe)}));c(Re)}fe.requestTimeout&&f(String(fe.requestTimeout)),fe.resetTimeoutOnProgress!==void 0&&h(fe.resetTimeoutOnProgress?"True":"False"),fe.maxTotalTimeout&&y(String(fe.maxTotalTimeout)),fe.oauth&&(x(fe.oauth.clientId||""),C(fe.oauth.redirectUrl||_),k(fe.oauth.scope||"")),cr.success("Configuration pasted and form populated")}}catch{}},ne=V=>{V.key==="Enter"&&!V.shiftKey&&!V.metaKey&&!V.ctrlKey&&V.target.tagName!=="TEXTAREA"&&(V.preventDefault(),O&&r.trim()&&O())};return g.jsxs("div",{className:"space-y-4 relative",onKeyDown:ne,children:[g.jsx("h3",{className:"text-xl font-semibold text-white mb-4",children:"Connect"}),J&&g.jsxs(tt,{variant:"ghost",onClick:q,className:De($?"absolute top-0 right-0 text-white hover:bg-white/20 z-10 dark:hover:bg-white/20":"w-full",!$&&"mb-2"),children:[g.jsx(aa,{className:"w-4 h-4 mr-2"}),"Copy Config"]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:te,children:"Transport Type"}),g.jsxs(Fp,{value:t,onValueChange:e,children:[g.jsx($p,{className:De("w-full",F),children:g.jsx(zp,{})}),g.jsxs(Bp,{children:[g.jsx(xo,{value:"SSE",children:"Streamable HTTP"}),g.jsx(xo,{value:"WebSocket",children:"Server-Sent Events (SSE)"})]})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:te,children:"URL"}),g.jsx(Or,{placeholder:"http://localhost:3001/sse",value:r,onChange:V=>n(V.target.value),onPaste:Z,className:W}),g.jsx("p",{className:De("text-xs text-muted-foreground",$?"text-white/60":""),children:"Tip: You can paste a copied connection config (JSON) to auto-populate the form"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx(lr,{className:te,children:"Connection Type"}),I&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(lr,{htmlFor:"auto-switch",className:De("text-xs cursor-pointer",$?"text-white/70":"text-muted-foreground"),children:"Auto-switch"}),g.jsx(ER,{id:"auto-switch",checked:A,onCheckedChange:V=>{I(V),localStorage.setItem("mcp-inspector-auto-switch",String(V))},className:"scale-75"})]})]}),g.jsxs(Fp,{value:a,onValueChange:s,children:[g.jsx($p,{className:De("w-full",F),children:g.jsx(zp,{})}),g.jsxs(Bp,{children:[g.jsx(xo,{value:"Direct",children:"Direct"}),g.jsx(xo,{value:"Via Proxy",children:"Via Proxy"})]})]})]}),g.jsxs("div",{className:"flex gap-3",children:[g.jsxs($u,{open:H,onOpenChange:X,children:[g.jsx(ty,{asChild:!0,children:g.jsx("div",{className:"relative flex-1",children:g.jsxs(tt,{variant:"outline",className:De((R||N)&&"border-2","w-full justify-center hover:text-white cursor-pointer",j),children:[g.jsx(pJ,{className:"w-4 h-4 mr-0"}),"Authentication"]})})}),g.jsxs(Bu,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[g.jsx(qu,{children:g.jsx(Hu,{children:"Authentication"})}),g.jsxs("div",{className:"space-y-4",children:[g.jsx("h4",{className:"text-sm font-medium",children:"OAuth 2.0 Flow"}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:"text-sm",children:"Client ID"}),g.jsx(Or,{placeholder:"Client ID",value:R,onChange:V=>x(V.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:"text-sm",children:"Redirect URL"}),g.jsx(Or,{value:_,onChange:V=>C(V.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:"text-sm",children:"Scope"}),g.jsx(Or,{placeholder:"Scope (space-separated)",value:N,onChange:V=>k(V.target.value)})]}),g.jsx("div",{className:"flex justify-end",children:g.jsx(tt,{onClick:()=>X(!1),children:"Save"})})]})]})]}),g.jsxs($u,{open:U,onOpenChange:G,children:[g.jsx(ty,{asChild:!0,children:g.jsx("div",{className:"relative flex-1",children:g.jsxs(tt,{variant:"outline",className:De("w-full justify-center hover:text-white cursor-pointer",j),children:[g.jsx(OR,{className:"w-4 h-4"}),"Custom Headers"]})})}),g.jsxs(Bu,{className:"w-full max-w-2xl max-h-[80vh] overflow-y-auto",children:[g.jsx(qu,{children:g.jsx(Hu,{children:"Custom Headers"})}),g.jsx(Ute,{headers:l,onChange:c,onSave:()=>G(!1)})]})]}),g.jsxs($u,{open:ae,onOpenChange:z,children:[g.jsx(ty,{asChild:!0,children:g.jsxs(tt,{variant:"outline",className:De("flex-1 justify-center hover:text-white cursor-pointer",j),children:[g.jsx(wQ,{className:"w-4 h-4"}),"Configuration"]})}),g.jsxs(Bu,{className:"w-full max-w-2xl max-h-[80vh] overflow-y-auto",children:[g.jsx(qu,{children:g.jsx(Hu,{children:"Configuration"})}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{className:"text-sm flex items-center gap-1",children:["Request Timeout",g.jsx("span",{className:"text-muted-foreground text-xs",children:"(?)"})]}),g.jsx(Or,{type:"number",value:d,onChange:V=>f(V.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{className:"text-sm flex items-center gap-1",children:["Reset Timeout on Progress",g.jsx("span",{className:"text-muted-foreground text-xs",children:"(?)"})]}),g.jsxs(Fp,{value:m,onValueChange:h,children:[g.jsx($p,{className:"w-full",children:g.jsx(zp,{})}),g.jsxs(Bp,{children:[g.jsx(xo,{value:"True",children:"True"}),g.jsx(xo,{value:"False",children:"False"})]})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{className:"text-sm flex items-center gap-1",children:["Maximum Total Timeout",g.jsx("span",{className:"text-muted-foreground text-xs",children:"(?)"})]}),g.jsx(Or,{type:"number",value:v,onChange:V=>y(V.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{className:"text-sm flex items-center gap-1",children:["Inspector Proxy Address",g.jsx("span",{className:"text-muted-foreground text-xs",children:"(?)"})]}),g.jsx(Or,{value:w,onChange:V=>S(V.target.value),placeholder:""})]}),g.jsx("div",{className:"flex justify-end",children:g.jsx(tt,{onClick:()=>z(!1),children:"Save"})})]})]})]})]}),Y&&g.jsx(tt,{onClick:O,disabled:!r.trim()||ee,className:De("w-full font-semibold",$?"bg-white text-black hover:bg-white/90":""),children:ee?g.jsxs(g.Fragment,{children:[g.jsx("svg",{className:"w-4 h-4 mr-2 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Connecting..."]}):g.jsxs(g.Fragment,{children:[g.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),"Connect"]})}),Q&&g.jsxs("div",{className:"flex justify-end gap-2",children:[M&&g.jsx(tt,{variant:"outline",onClick:M,children:"Cancel"}),g.jsx(tt,{onClick:L,children:"Save Connection Options"})]})]})}function D4({connection:t,open:e,onOpenChange:r,onConnect:n}){const[a,s]=b.useState("SSE"),[l,c]=b.useState(""),[d,f]=b.useState("Direct"),[m,h]=b.useState([]),[v,y]=b.useState("10000"),[w,S]=b.useState("True"),[R,x]=b.useState("60000"),[_,C]=b.useState(`${window.location.origin}/inspector/api/proxy`),[N,k]=b.useState(""),[A,I]=b.useState(typeof window<"u"?new URL("/inspector/oauth/callback",window.location.origin).toString():"/inspector/oauth/callback"),[O,L]=b.useState("");b.useEffect(()=>{if(t&&e){c(t.url),t.transportType==="sse"?s("WebSocket"):s("SSE"),t.proxyConfig?.proxyAddress?(f("Via Proxy"),C(t.proxyConfig.proxyAddress)):(f("Direct"),C(`${window.location.origin}/inspector/api/proxy`));const P=t.proxyConfig?.customHeaders||t.customHeaders||{},Y=Object.entries(P).map(([Q,J],ee)=>({id:`header-${ee}`,name:Q,value:String(J)}));h(Y)}},[t,e]);const M=()=>{if(!l.trim())return;const P=d==="Via Proxy"&&_.trim()?{proxyAddress:_.trim(),customHeaders:m.reduce((Q,J)=>(J.name&&J.value&&(Q[J.name]=J.value),Q),{})}:{customHeaders:m.reduce((Q,J)=>(J.name&&J.value&&(Q[J.name]=J.value),Q),{})},Y=a==="SSE"?"http":"sse";n({url:l,name:t?.name,transportType:Y,proxyConfig:P}),r(!1)};return g.jsx($u,{open:e,onOpenChange:r,children:g.jsxs(Bu,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[g.jsx(qu,{children:g.jsx(Hu,{children:"Edit Connection Settings"})}),g.jsx(O4,{transportType:a,setTransportType:s,url:l,setUrl:c,connectionType:d,setConnectionType:f,customHeaders:m,setCustomHeaders:h,requestTimeout:v,setRequestTimeout:y,resetTimeoutOnProgress:w,setResetTimeoutOnProgress:S,maxTotalTimeout:R,setMaxTotalTimeout:x,proxyAddress:_,setProxyAddress:C,clientId:N,setClientId:k,redirectUrl:A,setRedirectUrl:I,scope:O,setScope:L,onConnect:M,variant:"default",showConnectButton:!0,showExportButton:!1,isConnecting:!1})]})})}function Fte({config:t,onSuccess:e,onFailure:r}){const n=typeof window<"u"?new URL("/inspector/oauth/callback",window.location.origin).toString():"/inspector/oauth/callback";let a=t.url,s={};if(t.proxyConfig?.proxyAddress){const d=new URL(t.proxyConfig.proxyAddress),f=new URL(t.url);a=`${d.origin}${d.pathname}${f.pathname}${f.search}`,s["X-Target-URL"]=t.url}t.proxyConfig?.customHeaders&&(s={...s,...t.proxyConfig.customHeaders});const l=fR({url:a,callbackUrl:n,customHeaders:Object.keys(s).length>0?s:void 0,transportType:t.transportType||"http"}),c=b.useRef(!1);return b.useEffect(()=>{if(!c.current){if(l.state==="ready")c.current=!0,e();else if(!(l.state==="authenticating"||l.state==="pending_auth")){if(l.state==="failed"&&l.error){if(l.authUrl)return;c.current=!0;const d=l.error;l.clearStorage(),r(d)}}}},[l.state,l.error,l.authUrl,e,r,l]),null}function zte(){const t=IR(),{connections:e,addConnection:r,removeConnection:n,updateConnectionConfig:a,autoConnect:s,setAutoConnect:l,connectServer:c,disconnectServer:d}=t,f=vc(),m=Uo(),[h,v]=b.useState(new Set),[y,w]=b.useState(null),[S,R]=b.useState(null);console.warn("[InspectorDashboard] Render - connections:",e.map(ce=>({id:ce.id,state:ce.state}))),b.useEffect(()=>{zr.getInstance().trackInspectorOpen({connectionCount:e.length}).catch(()=>{})},[]);const[x,_]=b.useState("SSE"),[C,N]=b.useState(""),[k,A]=b.useState("Direct"),[I,O]=b.useState([]),[L,M]=b.useState("10000"),[P,Y]=b.useState("True"),[Q,J]=b.useState("60000"),[ee,U]=b.useState(`${window.location.origin}/inspector/api/proxy`),[G,H]=b.useState(""),[X,ae]=b.useState(typeof window<"u"?new URL("/inspector/oauth/callback",window.location.origin).toString():"/inspector/oauth/callback"),[z,q]=b.useState(""),[$,W]=b.useState(!1),[te,F]=b.useState(!0),j=b.useRef(!1),[Z,ne]=b.useState(!1),[V,de]=b.useState(null);b.useEffect(()=>{const ce=localStorage.getItem("mcp-inspector-auto-switch");ce!==null&&F(ce==="true")},[]);const fe=b.useCallback((ce=!1,Ce)=>{if(!C.trim())return;W(!0),j.current=!1,ce||ne(!1);const _e=(Ce||k)==="Via Proxy"&&ee.trim()?{proxyAddress:ee.trim(),customHeaders:I.reduce((Oe,Je)=>(Je.name&&Je.value&&(Oe[Je.name]=Je.value),Oe),{})}:{customHeaders:I.reduce((Oe,Je)=>(Je.name&&Je.value&&(Oe[Je.name]=Je.value),Oe),{})};de({url:C,name:C,proxyConfig:_e,transportType:x==="SSE"?"http":"sse"})},[C,k,ee,I,x]),Re=b.useCallback(()=>{if(!V)return;W(!1),r(V.url,V.name,V.proxyConfig,V.transportType),zr.getInstance().capture(new XX({serverId:V.url,serverUrl:V.url,connectionType:V.transportType,viaProxy:!!V.proxyConfig?.proxyAddress})).catch(()=>{}),de(null),cr.success("Connection established successfully"),N(""),O([]),H(""),q("")},[V,r]),be=b.useCallback(ce=>{const Ce=ce.includes("401")||ce.includes("Unauthorized")||ce.includes("Authentication required");te&&!Z&&!Ce?k==="Direct"?(cr.error("Direct connection failed, trying with proxy..."),ne(!0),de(null),A("Via Proxy"),setTimeout(()=>{W(!0),fe(!0,"Via Proxy")},1e3)):k==="Via Proxy"&&(cr.error("Proxy connection failed, trying direct..."),ne(!0),de(null),A("Direct"),setTimeout(()=>{W(!0),fe(!0,"Direct")},1e3)):(cr.error(ce),de(null),W(!1))},[te,Z,k,fe]),xe=()=>{e.forEach(ce=>{n(ce.id)})},Ne=async ce=>{try{await navigator.clipboard.writeText(ce),cr.success("Error message copied to clipboard")}catch{cr.error("Failed to copy error message")}},ze=async ce=>{try{const Ce={url:ce.url,name:ce.name,transportType:ce.transportType||"http",connectionType:ce.proxyConfig?"Via Proxy":"Direct",proxyConfig:ce.proxyConfig,customHeaders:ce.customHeaders||{},requestTimeout:ce.requestTimeout||1e4,resetTimeoutOnProgress:ce.resetTimeoutOnProgress!==!1,maxTotalTimeout:ce.maxTotalTimeout||6e4,oauth:ce.oauth};await navigator.clipboard.writeText(JSON.stringify(Ce,null,2)),cr.success("Connection configuration copied to clipboard")}catch{cr.error("Failed to copy connection configuration")}},Me=(ce,Ce)=>{ce.stopPropagation(),Ce()},$e=b.useCallback(ce=>{S&&(ce.url!==S?(n(S),r(ce.url,ce.name,ce.proxyConfig,ce.transportType)):a(S,{name:ce.name,proxyConfig:ce.proxyConfig,transportType:ce.transportType}),R(null),cr.success("Connection settings updated"))},[S,n,r,a]),ct=ce=>{if(ce.state==="disconnected"){console.warn("[InspectorDashboard] Connecting server and setting pending navigation:",ce.id),v(Ie=>new Set(Ie).add(ce.id)),w(ce.id),c(ce.id);return}if(ce.state!=="ready"){cr.error("Server is not connected and cannot be inspected");return}const Fe=new URLSearchParams(m.search).get("tunnelUrl"),_e=Fe?`/?server=${encodeURIComponent(ce.id)}&tunnelUrl=${encodeURIComponent(Fe)}`:`/?server=${encodeURIComponent(ce.id)}`;f(_e)};return b.useEffect(()=>{h.forEach(ce=>{const Ce=e.find(Fe=>Fe.id===ce);Ce&&(Ce.state==="ready"||Ce.state==="failed")&&v(Fe=>{const _e=new Set(Fe);return _e.delete(ce),_e})})},[e,h]),b.useEffect(()=>{if(!y)return;const ce=e.find(Fe=>Fe.id===y),Ce=(ce?.tools?.length||0)>0||(ce?.resources?.length||0)>0||(ce?.prompts?.length||0)>0;if(ce&&(ce.state==="ready"||Ce&&ce.state!=="connecting")){w(null);const _e=new URLSearchParams(m.search).get("tunnelUrl"),Ie=_e?`/?server=${encodeURIComponent(ce.id)}&tunnelUrl=${encodeURIComponent(_e)}`:`/?server=${encodeURIComponent(ce.id)}`;f(Ie)}else ce&&ce.state==="failed"&&!Ce&&ce.error&&(console.warn("[InspectorDashboard] Connection failed with no data, canceling navigation"),w(null))},[e,y,f]),g.jsxs("div",{className:"flex items-start justify-start gap-4 h-full relative",children:[g.jsxs("div",{className:"w-full px-6 pt-6 overflow-auto",children:[g.jsxs("div",{className:"flex items-center gap-3 relative z-10",children:[g.jsx("h2",{className:"text-2xl font-medium tracking-tight",children:"MCP Inspector"}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx("a",{href:"https://github.com/mcp-use/mcp-use",target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:g.jsxs(Va,{variant:"secondary",className:"text-xs cursor-pointer hover:bg-secondary/80 transition-colors",children:["v",typeof window<"u"&&window.__INSPECTOR_VERSION__||"1.0.0"]})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Visit GitHub"})})]})]}),g.jsx("p",{className:"text-muted-foreground relative z-10",children:"Inspect and debug MCP (Model Context Protocol) servers"}),g.jsxs("div",{className:"space-y-4 mt-8",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h3",{className:"text-base font-medium",children:"Connected Servers"}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(lr,{htmlFor:"auto-connect",className:"text-sm cursor-pointer",children:"Auto-connect"}),g.jsx(ER,{id:"auto-connect",checked:s,onCheckedChange:l})]}),e.length>0&&g.jsx(tt,{variant:"ghost",size:"sm",onClick:xe,children:"Clear All"})]})]}),e.length===0?g.jsx(yR,{message:"No servers connected yet. Add a server above to get started."}):g.jsx("div",{className:"grid gap-3",children:e.map(ce=>g.jsxs("div",{onClick:()=>ct(ce),className:"group rounded-lg bg-zinc-100 dark:bg-white/10 hover:bg-zinc-200 dark:hover:bg-white/15 p-4 transition-colors cursor-pointer",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex-1",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("h4",{className:"font-semibold text-sm",children:ce.name}),g.jsx("div",{className:"flex items-center gap-2",children:h.has(ce.id)?g.jsx(th,{className:"w-3 h-3 animate-spin text-blue-500"}):ce.error&&ce.state!=="ready"?g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx("button",{type:"button",onClick:Ce=>{Ce.stopPropagation(),Ne(ce.error)},className:"w-2 h-2 rounded-full bg-rose-500 animate-status-pulse-red hover:bg-rose-600 transition-colors",title:"Click to copy error message","aria-label":"Copy error message to clipboard"})}),g.jsx(Fr,{children:g.jsx("p",{className:"max-w-xs",children:ce.error})})]}):g.jsx("div",{className:`w-2 h-2 rounded-full ${ce.state==="disconnected"?"bg-gray-400 dark:bg-gray-600":ce.state==="ready"?"bg-emerald-600 animate-status-pulse":ce.state==="failed"?"bg-rose-600 animate-status-pulse-red":"bg-yellow-500 animate-status-pulse-yellow"}`})})]}),g.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[g.jsx("p",{className:"text-xs text-muted-foreground dark:text-zinc-400 font-mono",children:ce.url}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx("button",{type:"button",onClick:Ce=>{Ce.stopPropagation(),navigator.clipboard.writeText(ce.url),cr.success("URL copied to clipboard")},className:"opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-white/10 rounded",title:"Copy URL",children:g.jsx(aa,{className:"w-3 h-3 text-muted-foreground"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Copy URL"})})]})]})]}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"secondary",size:"sm",onClick:Ce=>Me(Ce,()=>ze(ce)),className:"h-8 w-8 p-0",children:g.jsx(aa,{className:"w-4 h-4"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Copy connection config"})})]}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"secondary",size:"sm",onClick:Ce=>Me(Ce,()=>R(ce.id)),className:"h-8 w-8 p-0",children:g.jsx(xm,{className:"w-4 h-4"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Edit connection settings"})})]}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"secondary",size:"sm",onClick:Ce=>Me(Ce,()=>n(ce.id)),className:"h-8 w-8 p-0",children:g.jsx(bQ,{className:"w-4 h-4"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Remove connection"})})]}),ce.state!=="disconnected"&&g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"secondary",size:"sm",onClick:Ce=>Me(Ce,ce.retry),className:"h-8 w-8 p-0",children:g.jsx(iJ,{className:"w-4 h-4"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Resync connection"})})]})]})]}),ce.state==="pending_auth"&&ce.authUrl&&g.jsxs("div",{className:"text-sm text-yellow-600 dark:text-yellow-400 mt-2",children:[g.jsx(tt,{size:"sm",variant:"outline",onClick:ce.authenticate,children:"Authenticate"})," ","or"," ",g.jsx("a",{href:ce.authUrl,target:"_blank",rel:"noopener noreferrer",className:"underline",children:"open auth page"})]})]},ce.id))})]})]}),g.jsxs("div",{className:"w-full relative overflow-hidden h-full p-10 items-center justify-center flex",children:[g.jsx("div",{className:"relative w-full max-w-xl mx-auto z-10 flex flex-col gap-3 rounded-3xl p-6 bg-black/70 dark:bg-black/90 shadow-2xl shadow-black/50 backdrop-blur-md",children:g.jsx(O4,{transportType:x,setTransportType:_,url:C,setUrl:N,connectionType:k,setConnectionType:A,customHeaders:I,setCustomHeaders:O,requestTimeout:L,setRequestTimeout:M,resetTimeoutOnProgress:P,setResetTimeoutOnProgress:Y,maxTotalTimeout:Q,setMaxTotalTimeout:J,proxyAddress:ee,setProxyAddress:U,clientId:G,setClientId:H,redirectUrl:X,setRedirectUrl:ae,scope:z,setScope:q,autoSwitch:te,setAutoSwitch:F,onConnect:fe,variant:"styled",showConnectButton:!0,showExportButton:!0,isConnecting:$})}),g.jsx(I$,{className:"absolute inset-0"})]}),V&&g.jsx(Fte,{config:V,onSuccess:Re,onFailure:be},`${V.url}-${V.transportType}-${k}`),g.jsx(D4,{connection:S&&e.find(ce=>ce.id===S)||null,open:S!==null,onOpenChange:ce=>{ce||R(null)},onConnect:$e})]})}function Lo({className:t,...e}){return g.jsx(th,{role:"status","aria-label":"Loading",className:De("size-4 animate-spin",t),...e})}const L4=b.createContext(void 0);function $te({children:t}){const[e,r]=b.useState({selectedServerId:null,activeTab:"tools",selectedToolName:null,selectedPromptName:null,selectedResourceUri:null,tunnelUrl:null}),n=b.useCallback(v=>{r(y=>({...y,selectedServerId:v}))},[]),a=b.useCallback(v=>{r(y=>({...y,activeTab:v}))},[]),s=b.useCallback(v=>{r(y=>({...y,selectedToolName:v}))},[]),l=b.useCallback(v=>{r(y=>({...y,selectedPromptName:v}))},[]),c=b.useCallback(v=>{r(y=>({...y,selectedResourceUri:v}))},[]),d=b.useCallback(v=>{r(y=>({...y,tunnelUrl:v}))},[]),f=b.useCallback((v,y,w)=>{console.warn("[InspectorContext] navigateToItem called:",{serverId:v,tab:y,itemIdentifier:w});const S={selectedServerId:v,activeTab:y,selectedToolName:y==="tools"&&w||null,selectedPromptName:y==="prompts"&&w||null,selectedResourceUri:y==="resources"&&w||null};console.warn("[InspectorContext] Setting new state:",S),r(S)},[]),m=b.useCallback(()=>{r(v=>({...v,selectedToolName:null,selectedPromptName:null,selectedResourceUri:null}))},[]),h={...e,setSelectedServerId:n,setActiveTab:a,setSelectedToolName:s,setSelectedPromptName:l,setSelectedResourceUri:c,setTunnelUrl:d,navigateToItem:f,clearSelection:m};return g.jsx(L4,{value:h,children:t})}function Fd(){const t=b.use(L4);if(!t)throw new Error("useInspector must be used within InspectorProvider");return t}function oD(t){try{const e=JSON.parse(t);if(e.url&&typeof e.url=="string")return{url:e.url,name:e.name||"Auto-connected Server",transportType:e.transportType==="sse"?"sse":"http",connectionType:e.connectionType==="Via Proxy"?"Via Proxy":"Direct",customHeaders:e.customHeaders||{},requestTimeout:e.requestTimeout,resetTimeoutOnProgress:e.resetTimeoutOnProgress,maxTotalTimeout:e.maxTotalTimeout}}catch{return{url:t,name:"Auto-connected Server",transportType:"http",connectionType:"Direct"}}return null}function Bte({connections:t,addConnection:e,removeConnection:r}){const n=vc(),[a,s]=b.useState(!1),[l,c]=b.useState(null),[d,f]=b.useState(!1),[m,h]=b.useState(!0),[v,y]=b.useState(!1),w=b.useRef(!1);b.useEffect(()=>{const R=localStorage.getItem("mcp-inspector-auto-switch");R!==null&&h(R==="true")},[]);const S=b.useCallback(R=>{const{url:x,name:_,transportType:C,connectionType:N,customHeaders:k}=R,A=N==="Via Proxy"?{proxyAddress:`${window.location.origin}/inspector/api/proxy/mcp`,customHeaders:k||{}}:k&&Object.keys(k).length>0?{proxyAddress:void 0,customHeaders:k}:void 0;console.warn(`[useAutoConnect] Attempting connection (${N}):`,{url:x,transportType:C,proxyConfig:A}),e(x,_,A,C)},[e]);return b.useEffect(()=>{if(v)return;const x=new URLSearchParams(window.location.search).get("autoConnect");if(x){const _=oD(x);_&&(t.find(N=>N.url===_.url)||(c(_),f(!1),s(!0),S(_))),y(!0);return}fetch("/inspector/config.json").then(_=>_.json()).then(_=>{if(y(!0),_.autoConnectUrl){const C=oD(_.autoConnectUrl);C&&(t.find(k=>k.url===C.url)||(c(C),f(!1),s(!0),S(C)))}}).catch(()=>y(!0))},[v,t,S]),b.useEffect(()=>{if(!l||!m||w.current)return;const R=t.find(x=>x.url===l.url);if(R?.state==="ready"){console.warn("[useAutoConnect] Connection succeeded, navigating to server");const _=new URLSearchParams(window.location.search).get("tunnelUrl"),C=_?`/?server=${encodeURIComponent(R.id)}&tunnelUrl=${encodeURIComponent(_)}`:`/?server=${encodeURIComponent(R.id)}`;n(C),setTimeout(()=>{c(null),f(!1),s(!1),w.current=!1},100);return}if(!d&&R?.state==="failed"&&R.error){console.warn("[useAutoConnect] Connection failed, trying alternate mode...");const x=l.connectionType==="Direct"?"Via Proxy":"Direct";l.connectionType==="Direct"?(cr.error("Direct connection failed, trying with proxy..."),f(!0),w.current=!0,queueMicrotask(()=>{r(R.id),setTimeout(()=>{console.warn("[useAutoConnect] Retrying with proxy");const _={...l,connectionType:x};c(_),s(!0),w.current=!1,S(_)},1e3)})):(cr.error("Proxy connection also failed"),f(!0),queueMicrotask(()=>{r(R.id),s(!1),c(null),w.current=!1}))}},[t,l,d,m,S,r,n]),b.useEffect(()=>{if(a&&t.length>0&&!l&&t.some(x=>x.state!=="connecting"&&x.state!=="loading")){const x=setTimeout(()=>s(!1),500);return()=>clearTimeout(x)}},[a,t,l]),{isAutoConnecting:a,autoConnectUrl:l?.url||null}}function M4(t){b.useEffect(()=>{const e=r=>{const n=r.target,a=n.tagName==="INPUT"||n.tagName==="TEXTAREA"||n.contentEditable==="true";if((r.metaKey||r.ctrlKey)&&r.key==="k"){r.preventDefault(),t.onCommandPalette?.();return}if((r.metaKey||r.ctrlKey)&&r.key==="o"&&t.onNewChat){r.preventDefault(),t.onNewChat();return}if(r.key==="Escape"){r.preventDefault(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),t.onBlurSearch?.();return}if(!a&&!(r.metaKey||r.ctrlKey||r.altKey||r.shiftKey))switch(r.key.toLowerCase()){case"t":r.preventDefault(),t.onToolsTab?.();break;case"p":r.preventDefault(),t.onPromptsTab?.();break;case"r":r.preventDefault(),t.onResourcesTab?.();break;case"c":r.preventDefault(),t.onChatTab?.();break;case"h":r.preventDefault(),t.onHome?.();break;case"f":r.preventDefault(),t.onFocusSearch?.();break}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t])}const iD="mcp-inspector-saved-requests";function qte(){const[t,e]=b.useState([]);return b.useEffect(()=>{try{const r=localStorage.getItem(iD);r&&e(JSON.parse(r))}catch(r){console.error("[useSavedRequests] Failed to load saved requests:",r)}},[]),b.useEffect(()=>{const r=n=>{if(n.key===iD&&n.newValue)try{e(JSON.parse(n.newValue))}catch(a){console.error("[useSavedRequests] Failed to parse saved requests:",a)}};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)},[]),t}var sD=1,Hte=.9,Vte=.8,Gte=.17,ry=.1,ny=.999,Wte=.9999,Yte=.99,Kte=/[\\\/_+.#"@\[\(\{&]/,Zte=/[\\\/_+.#"@\[\(\{&]/g,Xte=/[\s-]/,P4=/[\s-]/g;function uT(t,e,r,n,a,s,l){if(s===e.length)return a===t.length?sD:Yte;var c=`${a},${s}`;if(l[c]!==void 0)return l[c];for(var d=n.charAt(s),f=r.indexOf(d,a),m=0,h,v,y,w;f>=0;)h=uT(t,e,r,n,f+1,s+1,l),h>m&&(f===a?h*=sD:Kte.test(t.charAt(f-1))?(h*=Vte,y=t.slice(a,f-1).match(Zte),y&&a>0&&(h*=Math.pow(ny,y.length))):Xte.test(t.charAt(f-1))?(h*=Hte,w=t.slice(a,f-1).match(P4),w&&a>0&&(h*=Math.pow(ny,w.length))):(h*=Gte,a>0&&(h*=Math.pow(ny,f-a))),t.charAt(f)!==e.charAt(s)&&(h*=Wte)),(h<ry&&r.charAt(f-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(f-1)!==n.charAt(s))&&(v=uT(t,e,r,n,f+1,s+2,l),v*ry>h&&(h=v*ry)),h>m&&(m=h),f=r.indexOf(d,f+1);return l[c]=m,m}function lD(t){return t.toLowerCase().replace(P4," ")}function Qte(t,e,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,uT(t,e,lD(t),lD(e),0,0,{})}var Eu='[cmdk-group=""]',ay='[cmdk-group-items=""]',Jte='[cmdk-group-heading=""]',j4='[cmdk-item=""]',cD=`${j4}:not([aria-disabled="true"])`,dT="cmdk-item-select",xl="data-value",ere=(t,e,r)=>Qte(t,e,r),U4=b.createContext(void 0),zd=()=>b.useContext(U4),F4=b.createContext(void 0),VR=()=>b.useContext(F4),z4=b.createContext(void 0),$4=b.forwardRef((t,e)=>{let r=wl(()=>{var q,$;return{search:"",value:($=(q=t.value)!=null?q:t.defaultValue)!=null?$:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=wl(()=>new Set),a=wl(()=>new Map),s=wl(()=>new Map),l=wl(()=>new Set),c=B4(t),{label:d,children:f,value:m,onValueChange:h,filter:v,shouldFilter:y,loop:w,disablePointerSelection:S=!1,vimBindings:R=!0,...x}=t,_=Xr(),C=Xr(),N=Xr(),k=b.useRef(null),A=dre();Cs(()=>{if(m!==void 0){let q=m.trim();r.current.value=q,I.emit()}},[m]),Cs(()=>{A(6,Q)},[]);let I=b.useMemo(()=>({subscribe:q=>(l.current.add(q),()=>l.current.delete(q)),snapshot:()=>r.current,setState:(q,$,W)=>{var te,F,j,Z;if(!Object.is(r.current[q],$)){if(r.current[q]=$,q==="search")Y(),M(),A(1,P);else if(q==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ne=document.getElementById(N);ne?ne.focus():(te=document.getElementById(_))==null||te.focus()}if(A(7,()=>{var ne;r.current.selectedItemId=(ne=J())==null?void 0:ne.id,I.emit()}),W||A(5,Q),((F=c.current)==null?void 0:F.value)!==void 0){let ne=$??"";(Z=(j=c.current).onValueChange)==null||Z.call(j,ne);return}}I.emit()}},emit:()=>{l.current.forEach(q=>q())}}),[]),O=b.useMemo(()=>({value:(q,$,W)=>{var te;$!==((te=s.current.get(q))==null?void 0:te.value)&&(s.current.set(q,{value:$,keywords:W}),r.current.filtered.items.set(q,L($,W)),A(2,()=>{M(),I.emit()}))},item:(q,$)=>(n.current.add(q),$&&(a.current.has($)?a.current.get($).add(q):a.current.set($,new Set([q]))),A(3,()=>{Y(),M(),r.current.value||P(),I.emit()}),()=>{s.current.delete(q),n.current.delete(q),r.current.filtered.items.delete(q);let W=J();A(4,()=>{Y(),W?.getAttribute("id")===q&&P(),I.emit()})}),group:q=>(a.current.has(q)||a.current.set(q,new Set),()=>{s.current.delete(q),a.current.delete(q)}),filter:()=>c.current.shouldFilter,label:d||t["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:_,inputId:N,labelId:C,listInnerRef:k}),[]);function L(q,$){var W,te;let F=(te=(W=c.current)==null?void 0:W.filter)!=null?te:ere;return q?F(q,r.current.search,$):0}function M(){if(!r.current.search||c.current.shouldFilter===!1)return;let q=r.current.filtered.items,$=[];r.current.filtered.groups.forEach(te=>{let F=a.current.get(te),j=0;F.forEach(Z=>{let ne=q.get(Z);j=Math.max(ne,j)}),$.push([te,j])});let W=k.current;ee().sort((te,F)=>{var j,Z;let ne=te.getAttribute("id"),V=F.getAttribute("id");return((j=q.get(V))!=null?j:0)-((Z=q.get(ne))!=null?Z:0)}).forEach(te=>{let F=te.closest(ay);F?F.appendChild(te.parentElement===F?te:te.closest(`${ay} > *`)):W.appendChild(te.parentElement===W?te:te.closest(`${ay} > *`))}),$.sort((te,F)=>F[1]-te[1]).forEach(te=>{var F;let j=(F=k.current)==null?void 0:F.querySelector(`${Eu}[${xl}="${encodeURIComponent(te[0])}"]`);j?.parentElement.appendChild(j)})}function P(){let q=ee().find(W=>W.getAttribute("aria-disabled")!=="true"),$=q?.getAttribute(xl);I.setState("value",$||void 0)}function Y(){var q,$,W,te;if(!r.current.search||c.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let F=0;for(let j of n.current){let Z=($=(q=s.current.get(j))==null?void 0:q.value)!=null?$:"",ne=(te=(W=s.current.get(j))==null?void 0:W.keywords)!=null?te:[],V=L(Z,ne);r.current.filtered.items.set(j,V),V>0&&F++}for(let[j,Z]of a.current)for(let ne of Z)if(r.current.filtered.items.get(ne)>0){r.current.filtered.groups.add(j);break}r.current.filtered.count=F}function Q(){var q,$,W;let te=J();te&&(((q=te.parentElement)==null?void 0:q.firstChild)===te&&((W=($=te.closest(Eu))==null?void 0:$.querySelector(Jte))==null||W.scrollIntoView({block:"nearest"})),te.scrollIntoView({block:"nearest"}))}function J(){var q;return(q=k.current)==null?void 0:q.querySelector(`${j4}[aria-selected="true"]`)}function ee(){var q;return Array.from(((q=k.current)==null?void 0:q.querySelectorAll(cD))||[])}function U(q){let $=ee()[q];$&&I.setState("value",$.getAttribute(xl))}function G(q){var $;let W=J(),te=ee(),F=te.findIndex(Z=>Z===W),j=te[F+q];($=c.current)!=null&&$.loop&&(j=F+q<0?te[te.length-1]:F+q===te.length?te[0]:te[F+q]),j&&I.setState("value",j.getAttribute(xl))}function H(q){let $=J(),W=$?.closest(Eu),te;for(;W&&!te;)W=q>0?cre(W,Eu):ure(W,Eu),te=W?.querySelector(cD);te?I.setState("value",te.getAttribute(xl)):G(q)}let X=()=>U(ee().length-1),ae=q=>{q.preventDefault(),q.metaKey?X():q.altKey?H(1):G(1)},z=q=>{q.preventDefault(),q.metaKey?U(0):q.altKey?H(-1):G(-1)};return b.createElement(Fo.div,{ref:e,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:q=>{var $;($=x.onKeyDown)==null||$.call(x,q);let W=q.nativeEvent.isComposing||q.keyCode===229;if(!(q.defaultPrevented||W))switch(q.key){case"n":case"j":{R&&q.ctrlKey&&ae(q);break}case"ArrowDown":{ae(q);break}case"p":case"k":{R&&q.ctrlKey&&z(q);break}case"ArrowUp":{z(q);break}case"Home":{q.preventDefault(),U(0);break}case"End":{q.preventDefault(),X();break}case"Enter":{q.preventDefault();let te=J();if(te){let F=new Event(dT);te.dispatchEvent(F)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:O.inputId,id:O.labelId,style:pre},d),ch(t,q=>b.createElement(F4.Provider,{value:I},b.createElement(U4.Provider,{value:O},q))))}),tre=b.forwardRef((t,e)=>{var r,n;let a=Xr(),s=b.useRef(null),l=b.useContext(z4),c=zd(),d=B4(t),f=(n=(r=d.current)==null?void 0:r.forceMount)!=null?n:l?.forceMount;Cs(()=>{if(!f)return c.item(a,l?.id)},[f]);let m=q4(a,s,[t.value,t.children,s],t.keywords),h=VR(),v=Ci(A=>A.value&&A.value===m.current),y=Ci(A=>f||c.filter()===!1?!0:A.search?A.filtered.items.get(a)>0:!0);b.useEffect(()=>{let A=s.current;if(!(!A||t.disabled))return A.addEventListener(dT,w),()=>A.removeEventListener(dT,w)},[y,t.onSelect,t.disabled]);function w(){var A,I;S(),(I=(A=d.current).onSelect)==null||I.call(A,m.current)}function S(){h.setState("value",m.current,!0)}if(!y)return null;let{disabled:R,value:x,onSelect:_,forceMount:C,keywords:N,...k}=t;return b.createElement(Fo.div,{ref:Ha(s,e),...k,id:a,"cmdk-item":"",role:"option","aria-disabled":!!R,"aria-selected":!!v,"data-disabled":!!R,"data-selected":!!v,onPointerMove:R||c.getDisablePointerSelection()?void 0:S,onClick:R?void 0:w},t.children)}),rre=b.forwardRef((t,e)=>{let{heading:r,children:n,forceMount:a,...s}=t,l=Xr(),c=b.useRef(null),d=b.useRef(null),f=Xr(),m=zd(),h=Ci(y=>a||m.filter()===!1?!0:y.search?y.filtered.groups.has(l):!0);Cs(()=>m.group(l),[]),q4(l,c,[t.value,t.heading,d]);let v=b.useMemo(()=>({id:l,forceMount:a}),[a]);return b.createElement(Fo.div,{ref:Ha(c,e),...s,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&b.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},r),ch(t,y=>b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?f:void 0},b.createElement(z4.Provider,{value:v},y))))}),nre=b.forwardRef((t,e)=>{let{alwaysRender:r,...n}=t,a=b.useRef(null),s=Ci(l=>!l.search);return!r&&!s?null:b.createElement(Fo.div,{ref:Ha(a,e),...n,"cmdk-separator":"",role:"separator"})}),are=b.forwardRef((t,e)=>{let{onValueChange:r,...n}=t,a=t.value!=null,s=VR(),l=Ci(f=>f.search),c=Ci(f=>f.selectedItemId),d=zd();return b.useEffect(()=>{t.value!=null&&s.setState("search",t.value)},[t.value]),b.createElement(Fo.input,{ref:e,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":c,id:d.inputId,type:"text",value:a?t.value:l,onChange:f=>{a||s.setState("search",f.target.value),r?.(f.target.value)}})}),ore=b.forwardRef((t,e)=>{let{children:r,label:n="Suggestions",...a}=t,s=b.useRef(null),l=b.useRef(null),c=Ci(f=>f.selectedItemId),d=zd();return b.useEffect(()=>{if(l.current&&s.current){let f=l.current,m=s.current,h,v=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let y=f.offsetHeight;m.style.setProperty("--cmdk-list-height",y.toFixed(1)+"px")})});return v.observe(f),()=>{cancelAnimationFrame(h),v.unobserve(f)}}},[]),b.createElement(Fo.div,{ref:Ha(s,e),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":n,id:d.listId},ch(t,f=>b.createElement("div",{ref:Ha(l,d.listInnerRef),"cmdk-list-sizer":""},f)))}),ire=b.forwardRef((t,e)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:s,container:l,...c}=t;return b.createElement(UR,{open:r,onOpenChange:n},b.createElement(FR,{container:l},b.createElement(zR,{"cmdk-overlay":"",className:a}),b.createElement($R,{"aria-label":t.label,"cmdk-dialog":"",className:s},b.createElement($4,{ref:e,...c}))))}),sre=b.forwardRef((t,e)=>Ci(r=>r.filtered.count===0)?b.createElement(Fo.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),lre=b.forwardRef((t,e)=>{let{progress:r,children:n,label:a="Loading...",...s}=t;return b.createElement(Fo.div,{ref:e,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},ch(t,l=>b.createElement("div",{"aria-hidden":!0},l)))}),Su=Object.assign($4,{List:ore,Item:tre,Input:are,Group:rre,Separator:nre,Dialog:ire,Empty:sre,Loading:lre});function cre(t,e){let r=t.nextElementSibling;for(;r;){if(r.matches(e))return r;r=r.nextElementSibling}}function ure(t,e){let r=t.previousElementSibling;for(;r;){if(r.matches(e))return r;r=r.previousElementSibling}}function B4(t){let e=b.useRef(t);return Cs(()=>{e.current=t}),e}var Cs=typeof window>"u"?b.useEffect:b.useLayoutEffect;function wl(t){let e=b.useRef();return e.current===void 0&&(e.current=t()),e}function Ci(t){let e=VR(),r=()=>t(e.snapshot());return b.useSyncExternalStore(e.subscribe,r,r)}function q4(t,e,r,n=[]){let a=b.useRef(),s=zd();return Cs(()=>{var l;let c=(()=>{var f;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(f=m.current.textContent)==null?void 0:f.trim():a.current}})(),d=n.map(f=>f.trim());s.value(t,c,d),(l=e.current)==null||l.setAttribute(xl,c),a.current=c}),a}var dre=()=>{let[t,e]=b.useState(),r=wl(()=>new Map);return Cs(()=>{r.current.forEach(n=>n()),r.current=new Map},[t]),(n,a)=>{r.current.set(n,a),e({})}};function fre(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function ch({asChild:t,children:e},r){return t&&b.isValidElement(e)?b.cloneElement(fre(e),{ref:e.ref},r(e.props.children)):r(e)}var pre={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function mre({className:t,size:e="md"}){const r={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};return g.jsxs("svg",{viewBox:"0 0 303 303",className:De("text-current",r[e],t),fill:"currentColor",fillRule:"nonzero",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("path",{d:"m105.5 34.8.6.6c9.5 9.5 14.4 21.9 14.6 34.4a112.6 112.6 0 0 0 112.2 112.1h.6c12 .4 24 5.1 33.2 14.1l.6.6a50 50 0 0 1-70.1 71.3l-.6-.6A49.9 49.9 0 0 1 182 230 112.6 112.6 0 0 0 73.4 120.7h-.8a49.9 49.9 0 0 1-36.7-14l-.5-.6a50 50 0 0 1-.6-70.2l.6-.5a50 50 0 0 1 69.5-1.2l.6.6Z"}),g.jsx("circle",{cx:"70.3",cy:"232.3",r:"50"}),g.jsx("circle",{cx:"232.3",cy:"70.3",r:"50"})]})}const GR=b.createContext({});function WR(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const YR=typeof window<"u",H4=YR?b.useLayoutEffect:b.useEffect,uh=b.createContext(null);function KR(t,e){t.indexOf(e)===-1&&t.push(e)}function ZR(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}const Mo=(t,e,r)=>r>e?e:r<t?t:r;let XR=()=>{};const Po={},V4=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function G4(t){return typeof t=="object"&&t!==null}const W4=t=>/^0[^.\s]+$/u.test(t);function QR(t){let e;return()=>(e===void 0&&(e=t()),e)}const oa=t=>t,hre=(t,e)=>r=>e(t(r)),$d=(...t)=>t.reduce(hre),dd=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n};class JR{constructor(){this.subscriptions=[]}add(e){return KR(this.subscriptions,e),()=>ZR(this.subscriptions,e)}notify(e,r,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](e,r,n);else for(let s=0;s<a;s++){const l=this.subscriptions[s];l&&l(e,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const za=t=>t*1e3,ra=t=>t/1e3;function Y4(t,e){return e?t*(1e3/e):0}const K4=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,gre=1e-7,vre=12;function bre(t,e,r,n,a){let s,l,c=0;do l=e+(r-e)/2,s=K4(l,n,a)-t,s>0?r=l:e=l;while(Math.abs(s)>gre&&++c<vre);return l}function Bd(t,e,r,n){if(t===e&&r===n)return oa;const a=s=>bre(s,0,1,t,r);return s=>s===0||s===1?s:K4(a(s),e,n)}const Z4=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,X4=t=>e=>1-t(1-e),Q4=Bd(.33,1.53,.69,.99),eC=X4(Q4),J4=Z4(eC),e3=t=>(t*=2)<1?.5*eC(t):.5*(2-Math.pow(2,-10*(t-1))),tC=t=>1-Math.sin(Math.acos(t)),t3=X4(tC),r3=Z4(tC),yre=Bd(.42,0,1,1),Ere=Bd(0,0,.58,1),n3=Bd(.42,0,.58,1),Sre=t=>Array.isArray(t)&&typeof t[0]!="number",a3=t=>Array.isArray(t)&&typeof t[0]=="number",xre={linear:oa,easeIn:yre,easeInOut:n3,easeOut:Ere,circIn:tC,circInOut:r3,circOut:t3,backIn:eC,backInOut:J4,backOut:Q4,anticipate:e3},wre=t=>typeof t=="string",uD=t=>{if(a3(t)){XR(t.length===4);const[e,r,n,a]=t;return Bd(e,r,n,a)}else if(wre(t))return xre[t];return t},Ep=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function _re(t,e){let r=new Set,n=new Set,a=!1,s=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(f.schedule(m),t()),m(c)}const f={schedule:(m,h=!1,v=!1)=>{const w=v&&a?r:n;return h&&l.add(m),w.has(m)||w.add(m),m},cancel:m=>{n.delete(m),l.delete(m)},process:m=>{if(c=m,a){s=!0;return}a=!0,[r,n]=[n,r],r.forEach(d),r.clear(),a=!1,s&&(s=!1,f.process(m))}};return f}const Tre=40;function o3(t,e){let r=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},s=()=>r=!0,l=Ep.reduce((C,N)=>(C[N]=_re(s),C),{}),{setup:c,read:d,resolveKeyframes:f,preUpdate:m,update:h,preRender:v,render:y,postRender:w}=l,S=()=>{const C=Po.useManualTiming?a.timestamp:performance.now();r=!1,Po.useManualTiming||(a.delta=n?1e3/60:Math.max(Math.min(C-a.timestamp,Tre),1)),a.timestamp=C,a.isProcessing=!0,c.process(a),d.process(a),f.process(a),m.process(a),h.process(a),v.process(a),y.process(a),w.process(a),a.isProcessing=!1,r&&e&&(n=!1,t(S))},R=()=>{r=!0,n=!0,a.isProcessing||t(S)};return{schedule:Ep.reduce((C,N)=>{const k=l[N];return C[N]=(A,I=!1,O=!1)=>(r||R(),k.schedule(A,I,O)),C},{}),cancel:C=>{for(let N=0;N<Ep.length;N++)l[Ep[N]].cancel(C)},state:a,steps:l}}const{schedule:ar,cancel:Ai,state:Kr,steps:oy}=o3(typeof requestAnimationFrame<"u"?requestAnimationFrame:oa,!0);let qp;function Rre(){qp=void 0}const wn={now:()=>(qp===void 0&&wn.set(Kr.isProcessing||Po.useManualTiming?Kr.timestamp:performance.now()),qp),set:t=>{qp=t,queueMicrotask(Rre)}},i3=t=>e=>typeof e=="string"&&e.startsWith(t),rC=i3("--"),Cre=i3("var(--"),nC=t=>Cre(t)?Are.test(t.split("/*")[0].trim()):!1,Are=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Rc={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},fd={...Rc,transform:t=>Mo(0,1,t)},Sp={...Rc,default:1},Vu=t=>Math.round(t*1e5)/1e5,aC=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Nre(t){return t==null}const kre=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,oC=(t,e)=>r=>!!(typeof r=="string"&&kre.test(r)&&r.startsWith(t)||e&&!Nre(r)&&Object.prototype.hasOwnProperty.call(r,e)),s3=(t,e,r)=>n=>{if(typeof n!="string")return n;const[a,s,l,c]=n.match(aC);return{[t]:parseFloat(a),[e]:parseFloat(s),[r]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},Ire=t=>Mo(0,255,t),iy={...Rc,transform:t=>Math.round(Ire(t))},us={test:oC("rgb","red"),parse:s3("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+iy.transform(t)+", "+iy.transform(e)+", "+iy.transform(r)+", "+Vu(fd.transform(n))+")"};function Ore(t){let e="",r="",n="",a="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),a=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),a=t.substring(4,5),e+=e,r+=r,n+=n,a+=a),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const fT={test:oC("#"),parse:Ore,transform:us.transform},qd=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),mi=qd("deg"),$a=qd("%"),it=qd("px"),Dre=qd("vh"),Lre=qd("vw"),dD={...$a,parse:t=>$a.parse(t)/100,transform:t=>$a.transform(t*100)},kl={test:oC("hsl","hue"),parse:s3("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+$a.transform(Vu(e))+", "+$a.transform(Vu(r))+", "+Vu(fd.transform(n))+")"},Cr={test:t=>us.test(t)||fT.test(t)||kl.test(t),parse:t=>us.test(t)?us.parse(t):kl.test(t)?kl.parse(t):fT.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?us.transform(t):kl.transform(t),getAnimatableNone:t=>{const e=Cr.parse(t);return e.alpha=0,Cr.transform(e)}},Mre=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Pre(t){return isNaN(t)&&typeof t=="string"&&(t.match(aC)?.length||0)+(t.match(Mre)?.length||0)>0}const l3="number",c3="color",jre="var",Ure="var(",fD="${}",Fre=/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 pd(t){const e=t.toString(),r=[],n={color:[],number:[],var:[]},a=[];let s=0;const c=e.replace(Fre,d=>(Cr.test(d)?(n.color.push(s),a.push(c3),r.push(Cr.parse(d))):d.startsWith(Ure)?(n.var.push(s),a.push(jre),r.push(d)):(n.number.push(s),a.push(l3),r.push(parseFloat(d))),++s,fD)).split(fD);return{values:r,split:c,indexes:n,types:a}}function u3(t){return pd(t).values}function d3(t){const{split:e,types:r}=pd(t),n=e.length;return a=>{let s="";for(let l=0;l<n;l++)if(s+=e[l],a[l]!==void 0){const c=r[l];c===l3?s+=Vu(a[l]):c===c3?s+=Cr.transform(a[l]):s+=a[l]}return s}}const zre=t=>typeof t=="number"?0:Cr.test(t)?Cr.getAnimatableNone(t):t;function $re(t){const e=u3(t);return d3(t)(e.map(zre))}const Ni={test:Pre,parse:u3,createTransformer:d3,getAnimatableNone:$re};function sy(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Bre({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let a=0,s=0,l=0;if(!e)a=s=l=r;else{const c=r<.5?r*(1+e):r+e-r*e,d=2*r-c;a=sy(d,c,t+1/3),s=sy(d,c,t),l=sy(d,c,t-1/3)}return{red:Math.round(a*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:n}}function Tm(t,e){return r=>r>0?e:t}const ur=(t,e,r)=>t+(e-t)*r,ly=(t,e,r)=>{const n=t*t,a=r*(e*e-n)+n;return a<0?0:Math.sqrt(a)},qre=[fT,us,kl],Hre=t=>qre.find(e=>e.test(t));function pD(t){const e=Hre(t);if(!e)return!1;let r=e.parse(t);return e===kl&&(r=Bre(r)),r}const mD=(t,e)=>{const r=pD(t),n=pD(e);if(!r||!n)return Tm(t,e);const a={...r};return s=>(a.red=ly(r.red,n.red,s),a.green=ly(r.green,n.green,s),a.blue=ly(r.blue,n.blue,s),a.alpha=ur(r.alpha,n.alpha,s),us.transform(a))},pT=new Set(["none","hidden"]);function Vre(t,e){return pT.has(t)?r=>r<=0?t:e:r=>r>=1?e:t}function Gre(t,e){return r=>ur(t,e,r)}function iC(t){return typeof t=="number"?Gre:typeof t=="string"?nC(t)?Tm:Cr.test(t)?mD:Kre:Array.isArray(t)?f3:typeof t=="object"?Cr.test(t)?mD:Wre:Tm}function f3(t,e){const r=[...t],n=r.length,a=t.map((s,l)=>iC(s)(s,e[l]));return s=>{for(let l=0;l<n;l++)r[l]=a[l](s);return r}}function Wre(t,e){const r={...t,...e},n={};for(const a in r)t[a]!==void 0&&e[a]!==void 0&&(n[a]=iC(t[a])(t[a],e[a]));return a=>{for(const s in n)r[s]=n[s](a);return r}}function Yre(t,e){const r=[],n={color:0,var:0,number:0};for(let a=0;a<e.values.length;a++){const s=e.types[a],l=t.indexes[s][n[s]],c=t.values[l]??0;r[a]=c,n[s]++}return r}const Kre=(t,e)=>{const r=Ni.createTransformer(e),n=pd(t),a=pd(e);return n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length?pT.has(t)&&!a.values.length||pT.has(e)&&!n.values.length?Vre(t,e):$d(f3(Yre(n,a),a.values),r):Tm(t,e)};function p3(t,e,r){return typeof t=="number"&&typeof e=="number"&&typeof r=="number"?ur(t,e,r):iC(t)(t,e)}const Zre=t=>{const e=({timestamp:r})=>t(r);return{start:(r=!0)=>ar.update(e,r),stop:()=>Ai(e),now:()=>Kr.isProcessing?Kr.timestamp:wn.now()}},m3=(t,e,r=10)=>{let n="";const a=Math.max(Math.round(e/r),2);for(let s=0;s<a;s++)n+=Math.round(t(s/(a-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Rm=2e4;function sC(t){let e=0;const r=50;let n=t.next(e);for(;!n.done&&e<Rm;)e+=r,n=t.next(e);return e>=Rm?1/0:e}function Xre(t,e=100,r){const n=r({...t,keyframes:[0,e]}),a=Math.min(sC(n),Rm);return{type:"keyframes",ease:s=>n.next(a*s).value/e,duration:ra(a)}}const Qre=5;function h3(t,e,r){const n=Math.max(e-Qre,0);return Y4(r-t(n),e-n)}const hr={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},cy=.001;function Jre({duration:t=hr.duration,bounce:e=hr.bounce,velocity:r=hr.velocity,mass:n=hr.mass}){let a,s,l=1-e;l=Mo(hr.minDamping,hr.maxDamping,l),t=Mo(hr.minDuration,hr.maxDuration,ra(t)),l<1?(a=f=>{const m=f*l,h=m*t,v=m-r,y=mT(f,l),w=Math.exp(-h);return cy-v/y*w},s=f=>{const h=f*l*t,v=h*r+r,y=Math.pow(l,2)*Math.pow(f,2)*t,w=Math.exp(-h),S=mT(Math.pow(f,2),l);return(-a(f)+cy>0?-1:1)*((v-y)*w)/S}):(a=f=>{const m=Math.exp(-f*t),h=(f-r)*t+1;return-cy+m*h},s=f=>{const m=Math.exp(-f*t),h=(r-f)*(t*t);return m*h});const c=5/t,d=tne(a,s,c);if(t=za(t),isNaN(d))return{stiffness:hr.stiffness,damping:hr.damping,duration:t};{const f=Math.pow(d,2)*n;return{stiffness:f,damping:l*2*Math.sqrt(n*f),duration:t}}}const ene=12;function tne(t,e,r){let n=r;for(let a=1;a<ene;a++)n=n-t(n)/e(n);return n}function mT(t,e){return t*Math.sqrt(1-e*e)}const rne=["duration","bounce"],nne=["stiffness","damping","mass"];function hD(t,e){return e.some(r=>t[r]!==void 0)}function ane(t){let e={velocity:hr.velocity,stiffness:hr.stiffness,damping:hr.damping,mass:hr.mass,isResolvedFromDuration:!1,...t};if(!hD(t,nne)&&hD(t,rne))if(t.visualDuration){const r=t.visualDuration,n=2*Math.PI/(r*1.2),a=n*n,s=2*Mo(.05,1,1-(t.bounce||0))*Math.sqrt(a);e={...e,mass:hr.mass,stiffness:a,damping:s}}else{const r=Jre(t);e={...e,...r,mass:hr.mass},e.isResolvedFromDuration=!0}return e}function Cm(t=hr.visualDuration,e=hr.bounce){const r=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:n,restDelta:a}=r;const s=r.keyframes[0],l=r.keyframes[r.keyframes.length-1],c={done:!1,value:s},{stiffness:d,damping:f,mass:m,duration:h,velocity:v,isResolvedFromDuration:y}=ane({...r,velocity:-ra(r.velocity||0)}),w=v||0,S=f/(2*Math.sqrt(d*m)),R=l-s,x=ra(Math.sqrt(d/m)),_=Math.abs(R)<5;n||(n=_?hr.restSpeed.granular:hr.restSpeed.default),a||(a=_?hr.restDelta.granular:hr.restDelta.default);let C;if(S<1){const k=mT(x,S);C=A=>{const I=Math.exp(-S*x*A);return l-I*((w+S*x*R)/k*Math.sin(k*A)+R*Math.cos(k*A))}}else if(S===1)C=k=>l-Math.exp(-x*k)*(R+(w+x*R)*k);else{const k=x*Math.sqrt(S*S-1);C=A=>{const I=Math.exp(-S*x*A),O=Math.min(k*A,300);return l-I*((w+S*x*R)*Math.sinh(O)+k*R*Math.cosh(O))/k}}const N={calculatedDuration:y&&h||null,next:k=>{const A=C(k);if(y)c.done=k>=h;else{let I=k===0?w:0;S<1&&(I=k===0?za(w):h3(C,k,A));const O=Math.abs(I)<=n,L=Math.abs(l-A)<=a;c.done=O&&L}return c.value=c.done?l:A,c},toString:()=>{const k=Math.min(sC(N),Rm),A=m3(I=>N.next(k*I).value,k,30);return k+"ms "+A},toTransition:()=>{}};return N}Cm.applyToOptions=t=>{const e=Xre(t,100,Cm);return t.ease=e.ease,t.duration=za(e.duration),t.type="keyframes",t};function hT({keyframes:t,velocity:e=0,power:r=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:s=500,modifyTarget:l,min:c,max:d,restDelta:f=.5,restSpeed:m}){const h=t[0],v={done:!1,value:h},y=O=>c!==void 0&&O<c||d!==void 0&&O>d,w=O=>c===void 0?d:d===void 0||Math.abs(c-O)<Math.abs(d-O)?c:d;let S=r*e;const R=h+S,x=l===void 0?R:l(R);x!==R&&(S=x-h);const _=O=>-S*Math.exp(-O/n),C=O=>x+_(O),N=O=>{const L=_(O),M=C(O);v.done=Math.abs(L)<=f,v.value=v.done?x:M};let k,A;const I=O=>{y(v.value)&&(k=O,A=Cm({keyframes:[v.value,w(v.value)],velocity:h3(C,O,v.value),damping:a,stiffness:s,restDelta:f,restSpeed:m}))};return I(0),{calculatedDuration:null,next:O=>{let L=!1;return!A&&k===void 0&&(L=!0,N(O),I(O)),k!==void 0&&O>=k?A.next(O-k):(!L&&N(O),v)}}}function one(t,e,r){const n=[],a=r||Po.mix||p3,s=t.length-1;for(let l=0;l<s;l++){let c=a(t[l],t[l+1]);if(e){const d=Array.isArray(e)?e[l]||oa:e;c=$d(d,c)}n.push(c)}return n}function ine(t,e,{clamp:r=!0,ease:n,mixer:a}={}){const s=t.length;if(XR(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const l=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const c=one(e,n,a),d=c.length,f=m=>{if(l&&m<t[0])return e[0];let h=0;if(d>1)for(;h<t.length-2&&!(m<t[h+1]);h++);const v=dd(t[h],t[h+1],m);return c[h](v)};return r?m=>f(Mo(t[0],t[s-1],m)):f}function sne(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const a=dd(0,e,n);t.push(ur(r,1,a))}}function lne(t){const e=[0];return sne(e,t.length-1),e}function cne(t,e){return t.map(r=>r*e)}function une(t,e){return t.map(()=>e||n3).splice(0,t.length-1)}function Gu({duration:t=300,keyframes:e,times:r,ease:n="easeInOut"}){const a=Sre(n)?n.map(uD):uD(n),s={done:!1,value:e[0]},l=cne(r&&r.length===e.length?r:lne(e),t),c=ine(l,e,{ease:Array.isArray(a)?a:une(e,a)});return{calculatedDuration:t,next:d=>(s.value=c(d),s.done=d>=t,s)}}const dne=t=>t!==null;function lC(t,{repeat:e,repeatType:r="loop"},n,a=1){const s=t.filter(dne),c=a<0||e&&r!=="loop"&&e%2===1?0:s.length-1;return!c||n===void 0?s[c]:n}const fne={decay:hT,inertia:hT,tween:Gu,keyframes:Gu,spring:Cm};function g3(t){typeof t.type=="string"&&(t.type=fne[t.type])}class cC{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,r){return this.finished.then(e,r)}}const pne=t=>t/100;class uC extends cC{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==wn.now()&&this.tick(wn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;g3(e);const{type:r=Gu,repeat:n=0,repeatDelay:a=0,repeatType:s,velocity:l=0}=e;let{keyframes:c}=e;const d=r||Gu;d!==Gu&&typeof c[0]!="number"&&(this.mixKeyframes=$d(pne,p3(c[0],c[1])),c=[0,100]);const f=d({...e,keyframes:c});s==="mirror"&&(this.mirroredGenerator=d({...e,keyframes:[...c].reverse(),velocity:-l})),f.calculatedDuration===null&&(f.calculatedDuration=sC(f));const{calculatedDuration:m}=f;this.calculatedDuration=m,this.resolvedDuration=m+a,this.totalDuration=this.resolvedDuration*(n+1)-a,this.generator=f}updateTime(e){const r=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(e,r=!1){const{generator:n,totalDuration:a,mixKeyframes:s,mirroredGenerator:l,resolvedDuration:c,calculatedDuration:d}=this;if(this.startTime===null)return n.next(0);const{delay:f=0,keyframes:m,repeat:h,repeatType:v,repeatDelay:y,type:w,onUpdate:S,finalKeyframe:R}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-a/this.speed,this.startTime)),r?this.currentTime=e:this.updateTime(e);const x=this.currentTime-f*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?x<0:x>a;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let C=this.currentTime,N=n;if(h){const O=Math.min(this.currentTime,a)/c;let L=Math.floor(O),M=O%1;!M&&O>=1&&(M=1),M===1&&L--,L=Math.min(L,h+1),!!(L%2)&&(v==="reverse"?(M=1-M,y&&(M-=y/c)):v==="mirror"&&(N=l)),C=Mo(0,1,M)*c}const k=_?{done:!1,value:m[0]}:N.next(C);s&&(k.value=s(k.value));let{done:A}=k;!_&&d!==null&&(A=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return I&&w!==hT&&(k.value=lC(m,this.options,R,this.speed)),S&&S(k.value),I&&this.finish(),k}then(e,r){return this.finished.then(e,r)}get duration(){return ra(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ra(e)}get time(){return ra(this.currentTime)}set time(e){e=za(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(wn.now());const r=this.playbackSpeed!==e;this.playbackSpeed=e,r&&(this.time=ra(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Zre,startTime:r}=this.options;this.driver||(this.driver=e(a=>this.tick(a))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),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(wn.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(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function mne(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ds=t=>t*180/Math.PI,gT=t=>{const e=ds(Math.atan2(t[1],t[0]));return vT(e)},hne={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:gT,rotateZ:gT,skewX:t=>ds(Math.atan(t[1])),skewY:t=>ds(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},vT=t=>(t=t%360,t<0&&(t+=360),t),gD=gT,vD=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),bD=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),gne={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vD,scaleY:bD,scale:t=>(vD(t)+bD(t))/2,rotateX:t=>vT(ds(Math.atan2(t[6],t[5]))),rotateY:t=>vT(ds(Math.atan2(-t[2],t[0]))),rotateZ:gD,rotate:gD,skewX:t=>ds(Math.atan(t[4])),skewY:t=>ds(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function bT(t){return t.includes("scale")?1:0}function yT(t,e){if(!t||t==="none")return bT(e);const r=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,a;if(r)n=gne,a=r;else{const c=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=hne,a=c}if(!a)return bT(e);const s=n[e],l=a[1].split(",").map(bne);return typeof s=="function"?s(l):l[s]}const vne=(t,e)=>{const{transform:r="none"}=getComputedStyle(t);return yT(r,e)};function bne(t){return parseFloat(t.trim())}const Cc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ac=new Set(Cc),yD=t=>t===Rc||t===it,yne=new Set(["x","y","z"]),Ene=Cc.filter(t=>!yne.has(t));function Sne(t){const e=[];return Ene.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e}const ms={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>yT(e,"x"),y:(t,{transform:e})=>yT(e,"y")};ms.translateX=ms.x;ms.translateY=ms.y;const hs=new Set;let ET=!1,ST=!1,xT=!1;function v3(){if(ST){const t=Array.from(hs).filter(n=>n.needsMeasurement),e=new Set(t.map(n=>n.element)),r=new Map;e.forEach(n=>{const a=Sne(n);a.length&&(r.set(n,a),n.render())}),t.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();const a=r.get(n);a&&a.forEach(([s,l])=>{n.getValue(s)?.set(l)})}),t.forEach(n=>n.measureEndState()),t.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}ST=!1,ET=!1,hs.forEach(t=>t.complete(xT)),hs.clear()}function b3(){hs.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ST=!0)})}function xne(){xT=!0,b3(),v3(),xT=!1}class dC{constructor(e,r,n,a,s,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=r,this.name=n,this.motionValue=a,this.element=s,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(hs.add(this),ET||(ET=!0,ar.read(b3),ar.resolveKeyframes(v3))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:r,element:n,motionValue:a}=this;if(e[0]===null){const s=a?.get(),l=e[e.length-1];if(s!==void 0)e[0]=s;else if(n&&r){const c=n.readValue(r,l);c!=null&&(e[0]=c)}e[0]===void 0&&(e[0]=l),a&&s===void 0&&a.set(e[0])}mne(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),hs.delete(this)}cancel(){this.state==="scheduled"&&(hs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const wne=t=>t.startsWith("--");function _ne(t,e,r){wne(e)?t.style.setProperty(e,r):t.style[e]=r}const Tne=QR(()=>window.ScrollTimeline!==void 0),Rne={};function Cne(t,e){const r=QR(t);return()=>Rne[e]??r()}const y3=Cne(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Iu=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,ED={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Iu([0,.65,.55,1]),circOut:Iu([.55,0,1,.45]),backIn:Iu([.31,.01,.66,-.59]),backOut:Iu([.33,1.53,.69,.99])};function E3(t,e){if(t)return typeof t=="function"?y3()?m3(t,e):"ease-out":a3(t)?Iu(t):Array.isArray(t)?t.map(r=>E3(r,e)||ED.easeOut):ED[t]}function Ane(t,e,r,{delay:n=0,duration:a=300,repeat:s=0,repeatType:l="loop",ease:c="easeOut",times:d}={},f=void 0){const m={[e]:r};d&&(m.offset=d);const h=E3(c,a);Array.isArray(h)&&(m.easing=h);const v={delay:n,duration:a,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"};return f&&(v.pseudoElement=f),t.animate(m,v)}function S3(t){return typeof t=="function"&&"applyToOptions"in t}function Nne({type:t,...e}){return S3(t)&&y3()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class kne extends cC{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:r,name:n,keyframes:a,pseudoElement:s,allowFlatten:l=!1,finalKeyframe:c,onComplete:d}=e;this.isPseudoElement=!!s,this.allowFlatten=l,this.options=e,XR(typeof e.type!="string");const f=Nne(e);this.animation=Ane(r,n,a,f,s),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const m=lC(a,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(m):_ne(r,n,m),this.animation.cancel()}d?.(),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:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ra(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ra(e)}get time(){return ra(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=za(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Tne()?(this.animation.timeline=e,oa):r(this)}}const x3={anticipate:e3,backInOut:J4,circInOut:r3};function Ine(t){return t in x3}function One(t){typeof t.ease=="string"&&Ine(t.ease)&&(t.ease=x3[t.ease])}const SD=10;class Dne extends kne{constructor(e){One(e),g3(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:r,onUpdate:n,onComplete:a,element:s,...l}=this.options;if(!r)return;if(e!==void 0){r.set(e);return}const c=new uC({...l,autoplay:!1}),d=za(this.finishedTime??this.time);r.setWithVelocity(c.sample(d-SD).value,c.sample(d).value,SD),c.stop()}}const xD=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ni.test(t)||t==="0")&&!t.startsWith("url("));function Lne(t){const e=t[0];if(t.length===1)return!0;for(let r=0;r<t.length;r++)if(t[r]!==e)return!0}function Mne(t,e,r,n){const a=t[0];if(a===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],l=xD(a,e),c=xD(s,e);return!l||!c?!1:Lne(t)||(r==="spring"||S3(r))&&n}function wT(t){t.duration=0,t.type="keyframes"}const Pne=new Set(["opacity","clipPath","filter","transform"]),jne=QR(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Une(t){const{motionValue:e,name:r,repeatDelay:n,repeatType:a,damping:s,type:l}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:f}=e.owner.getProps();return jne()&&r&&Pne.has(r)&&(r!=="transform"||!f)&&!d&&!n&&a!=="mirror"&&s!==0&&l!=="inertia"}const Fne=40;class zne extends cC{constructor({autoplay:e=!0,delay:r=0,type:n="keyframes",repeat:a=0,repeatDelay:s=0,repeatType:l="loop",keyframes:c,name:d,motionValue:f,element:m,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=wn.now();const v={autoplay:e,delay:r,type:n,repeat:a,repeatDelay:s,repeatType:l,name:d,motionValue:f,element:m,...h},y=m?.KeyframeResolver||dC;this.keyframeResolver=new y(c,(w,S,R)=>this.onKeyframesResolved(w,S,v,!R),d,f,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,r,n,a){this.keyframeResolver=void 0;const{name:s,type:l,velocity:c,delay:d,isHandoff:f,onUpdate:m}=n;this.resolvedAt=wn.now(),Mne(e,s,l,c)||((Po.instantAnimations||!d)&&m?.(lC(e,n,r)),e[0]=e[e.length-1],wT(n),n.repeat=0);const v={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>Fne?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:e},y=!f&&Une(v)?new Dne({...v,element:v.motionValue.owner.current}):new uC(v);y.finished.then(()=>this.notifyFinished()).catch(oa),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(e,r){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),xne()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const $ne=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bne(t){const e=$ne.exec(t);if(!e)return[,];const[,r,n,a]=e;return[`--${r??n}`,a]}function w3(t,e,r=1){const[n,a]=Bne(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);if(s){const l=s.trim();return V4(l)?parseFloat(l):l}return nC(a)?w3(a,e,r+1):a}function fC(t,e){return t?.[e]??t?.default??t}const _3=new Set(["width","height","top","left","right","bottom",...Cc]),qne={test:t=>t==="auto",parse:t=>t},T3=t=>e=>e.test(t),R3=[Rc,it,$a,mi,Lre,Dre,qne],wD=t=>R3.find(T3(t));function Hne(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||W4(t):!0}const Vne=new Set(["brightness","contrast","saturate","opacity"]);function Gne(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(aC)||[];if(!n)return t;const a=r.replace(n,"");let s=Vne.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+a+")"}const Wne=/\b([a-z-]*)\(.*?\)/gu,_T={...Ni,getAnimatableNone:t=>{const e=t.match(Wne);return e?e.map(Gne).join(" "):t}},_D={...Rc,transform:Math.round},Yne={rotate:mi,rotateX:mi,rotateY:mi,rotateZ:mi,scale:Sp,scaleX:Sp,scaleY:Sp,scaleZ:Sp,skew:mi,skewX:mi,skewY:mi,distance:it,translateX:it,translateY:it,translateZ:it,x:it,y:it,z:it,perspective:it,transformPerspective:it,opacity:fd,originX:dD,originY:dD,originZ:it},pC={borderWidth:it,borderTopWidth:it,borderRightWidth:it,borderBottomWidth:it,borderLeftWidth:it,borderRadius:it,radius:it,borderTopLeftRadius:it,borderTopRightRadius:it,borderBottomRightRadius:it,borderBottomLeftRadius:it,width:it,maxWidth:it,height:it,maxHeight:it,top:it,right:it,bottom:it,left:it,padding:it,paddingTop:it,paddingRight:it,paddingBottom:it,paddingLeft:it,margin:it,marginTop:it,marginRight:it,marginBottom:it,marginLeft:it,backgroundPositionX:it,backgroundPositionY:it,...Yne,zIndex:_D,fillOpacity:fd,strokeOpacity:fd,numOctaves:_D},Kne={...pC,color:Cr,backgroundColor:Cr,outlineColor:Cr,fill:Cr,stroke:Cr,borderColor:Cr,borderTopColor:Cr,borderRightColor:Cr,borderBottomColor:Cr,borderLeftColor:Cr,filter:_T,WebkitFilter:_T},C3=t=>Kne[t];function A3(t,e){let r=C3(t);return r!==_T&&(r=Ni),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const Zne=new Set(["auto","none","0"]);function Xne(t,e,r){let n=0,a;for(;n<t.length&&!a;){const s=t[n];typeof s=="string"&&!Zne.has(s)&&pd(s).values.length&&(a=t[n]),n++}if(a&&r)for(const s of e)t[s]=A3(r,a)}class Qne extends dC{constructor(e,r,n,a,s){super(e,r,n,a,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let d=0;d<e.length;d++){let f=e[d];if(typeof f=="string"&&(f=f.trim(),nC(f))){const m=w3(f,r.current);m!==void 0&&(e[d]=m),d===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!_3.has(n)||e.length!==2)return;const[a,s]=e,l=wD(a),c=wD(s);if(l!==c)if(yD(l)&&yD(c))for(let d=0;d<e.length;d++){const f=e[d];typeof f=="string"&&(e[d]=parseFloat(f))}else ms[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:r}=this,n=[];for(let a=0;a<e.length;a++)(e[a]===null||Hne(e[a]))&&n.push(a);n.length&&Xne(e,n,r)}measureInitialState(){const{element:e,unresolvedKeyframes:r,name:n}=this;if(!e||!e.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ms[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r[0]=this.measuredOrigin;const a=r[r.length-1];a!==void 0&&e.getValue(n,a).jump(a,!1)}measureEndState(){const{element:e,name:r,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const a=e.getValue(r);a&&a.jump(this.measuredOrigin,!1);const s=n.length-1,l=n[s];n[s]=ms[r](e.measureViewportBox(),window.getComputedStyle(e.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,d])=>{e.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function N3(t,e,r){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const a=document.querySelectorAll(t);return a?Array.from(a):[]}return Array.from(t)}const k3=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function I3(t){return G4(t)&&"offsetHeight"in t}const TD=30,Jne=t=>!isNaN(parseFloat(t));class eae{constructor(e,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const a=wn.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=r.owner}setCurrent(e){this.current=e,this.updatedAt=wn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Jne(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new JR);const n=this.events[e].add(r);return e==="change"?()=>{n(),ar.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,r=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=wn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>TD)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,TD);return Y4(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r),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 sc(t,e){return new eae(t,e)}const{schedule:mC}=o3(queueMicrotask,!1),ba={x:!1,y:!1};function O3(){return ba.x||ba.y}function tae(t){return t==="x"||t==="y"?ba[t]?null:(ba[t]=!0,()=>{ba[t]=!1}):ba.x||ba.y?null:(ba.x=ba.y=!0,()=>{ba.x=ba.y=!1})}function D3(t,e){const r=N3(t),n=new AbortController,a={passive:!0,...e,signal:n.signal};return[r,a,()=>n.abort()]}function RD(t){return!(t.pointerType==="touch"||O3())}function rae(t,e,r={}){const[n,a,s]=D3(t,r),l=c=>{if(!RD(c))return;const{target:d}=c,f=e(d,c);if(typeof f!="function"||!d)return;const m=h=>{RD(h)&&(f(h),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,a)};return n.forEach(c=>{c.addEventListener("pointerenter",l,a)}),s}const L3=(t,e)=>e?t===e?!0:L3(t,e.parentElement):!1,hC=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,nae=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function aae(t){return nae.has(t.tagName)||t.tabIndex!==-1}const Hp=new WeakSet;function CD(t){return e=>{e.key==="Enter"&&t(e)}}function uy(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const oae=(t,e)=>{const r=t.currentTarget;if(!r)return;const n=CD(()=>{if(Hp.has(r))return;uy(r,"down");const a=CD(()=>{uy(r,"up")}),s=()=>uy(r,"cancel");r.addEventListener("keyup",a,e),r.addEventListener("blur",s,e)});r.addEventListener("keydown",n,e),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),e)};function AD(t){return hC(t)&&!O3()}function iae(t,e,r={}){const[n,a,s]=D3(t,r),l=c=>{const d=c.currentTarget;if(!AD(c))return;Hp.add(d);const f=e(d,c),m=(y,w)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",v),Hp.has(d)&&Hp.delete(d),AD(y)&&typeof f=="function"&&f(y,{success:w})},h=y=>{m(y,d===window||d===document||r.useGlobalTarget||L3(d,y.target))},v=y=>{m(y,!1)};window.addEventListener("pointerup",h,a),window.addEventListener("pointercancel",v,a)};return n.forEach(c=>{(r.useGlobalTarget?window:c).addEventListener("pointerdown",l,a),I3(c)&&(c.addEventListener("focus",f=>oae(f,a)),!aae(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),s}function M3(t){return G4(t)&&"ownerSVGElement"in t}function sae(t){return M3(t)&&t.tagName==="svg"}const rn=t=>!!(t&&t.getVelocity),lae=[...R3,Cr,Ni],cae=t=>lae.find(T3(t)),gC=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ND(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function uae(...t){return e=>{let r=!1;const n=t.map(a=>{const s=ND(a,e);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a<n.length;a++){const s=n[a];typeof s=="function"?s():ND(t[a],null)}}}}function dae(...t){return b.useCallback(uae(...t),t)}class fae extends b.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=r.offsetParent,a=I3(n)&&n.offsetWidth||0,s=this.props.sizeRef.current;s.height=r.offsetHeight||0,s.width=r.offsetWidth||0,s.top=r.offsetTop,s.left=r.offsetLeft,s.right=a-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function pae({children:t,isPresent:e,anchorX:r,root:n}){const a=b.useId(),s=b.useRef(null),l=b.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=b.useContext(gC),d=dae(s,t?.ref);return b.useInsertionEffect(()=>{const{width:f,height:m,top:h,left:v,right:y}=l.current;if(e||!s.current||!f||!m)return;const w=r==="left"?`left: ${v}`:`right: ${y}`;s.current.dataset.motionPopId=a;const S=document.createElement("style");c&&(S.nonce=c);const R=n??document.head;return R.appendChild(S),S.sheet&&S.sheet.insertRule(`
|
|
69
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return b.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},Kee="DialogDescriptionWarning",Zee=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${t4(Kee).contentName}}.`;return b.useEffect(()=>{const a=t.current?.getAttribute("aria-describedby");e&&a&&(document.getElementById(e)||console.warn(n))},[n,t,e]),null},UR=$B,r4=qB,FR=VB,zR=GB,$R=WB,n4=KB,a4=XB,o4=JB;function $u({...t}){return g.jsx(UR,{"data-slot":"dialog",...t})}function ty({...t}){return g.jsx(r4,{"data-slot":"dialog-trigger",...t})}function Xee({...t}){return g.jsx(FR,{"data-slot":"dialog-portal",...t})}function Qee({className:t,...e}){return g.jsx(zR,{"data-slot":"dialog-overlay",className:De("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",t),...e})}function Bu({className:t,children:e,showCloseButton:r=!0,...n}){return g.jsxs(Xee,{"data-slot":"dialog-portal",children:[g.jsx(Qee,{}),g.jsxs($R,{"data-slot":"dialog-content",className:De("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",t),...n,children:[e,r&&g.jsxs(o4,{"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:[g.jsx(Pd,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function qu({className:t,...e}){return g.jsx("div",{"data-slot":"dialog-header",className:De("flex flex-col gap-2 text-center sm:text-left",t),...e})}function Hu({className:t,...e}){return g.jsx(n4,{"data-slot":"dialog-title",className:De("text-lg leading-none font-semibold",t),...e})}function Jee({className:t,...e}){return g.jsx(a4,{"data-slot":"dialog-description",className:De("text-muted-foreground text-sm",t),...e})}function Or({className:t,type:e,...r}){return g.jsx("input",{type:e,"data-slot":"input",className:De("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",t),...r})}function aD(t,[e,r]){return Math.min(r,Math.max(e,t))}function BR(t){const e=t+"CollectionProvider",[r,n]=Za(e),[a,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:R,children:x}=S,_=le.useRef(null),C=le.useRef(new Map).current;return g.jsx(a,{scope:R,itemMap:C,collectionRef:_,children:x})};l.displayName=e;const c=t+"CollectionSlot",d=Ss(c),f=le.forwardRef((S,R)=>{const{scope:x,children:_}=S,C=s(c,x),N=Nt(R,C.collectionRef);return g.jsx(d,{ref:N,children:_})});f.displayName=c;const m=t+"CollectionItemSlot",h="data-radix-collection-item",v=Ss(m),y=le.forwardRef((S,R)=>{const{scope:x,children:_,...C}=S,N=le.useRef(null),k=Nt(R,N),A=s(m,x);return le.useEffect(()=>(A.itemMap.set(N,{ref:N,...C}),()=>void A.itemMap.delete(N))),g.jsx(v,{[h]:"",ref:k,children:_})});y.displayName=m;function w(S){const R=s(t+"CollectionConsumer",S);return le.useCallback(()=>{const _=R.collectionRef.current;if(!_)return[];const C=Array.from(_.querySelectorAll(`[${h}]`));return Array.from(R.itemMap.values()).sort((A,I)=>C.indexOf(A.ref.current)-C.indexOf(I.ref.current))},[R.collectionRef,R.itemMap])}return[{Provider:l,Slot:f,ItemSlot:y},w,n]}var ete=b.createContext(void 0);function qR(t){const e=b.useContext(ete);return t||e||"ltr"}var tte=[" ","Enter","ArrowUp","ArrowDown"],rte=[" ","Enter"],Ts="Select",[ih,sh,nte]=BR(Ts),[Tc]=Za(Ts,[nte,ki]),lh=ki(),[ate,Ii]=Tc(Ts),[ote,ite]=Tc(Ts),i4=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:a,onOpenChange:s,value:l,defaultValue:c,onValueChange:d,dir:f,name:m,autoComplete:h,disabled:v,required:y,form:w}=t,S=lh(e),[R,x]=b.useState(null),[_,C]=b.useState(null),[N,k]=b.useState(!1),A=qR(f),[I,O]=_i({prop:n,defaultProp:a??!1,onChange:s,caller:Ts}),[L,M]=_i({prop:l,defaultProp:c,onChange:d,caller:Ts}),P=b.useRef(null),Y=R?w||!!R.closest("form"):!0,[Q,J]=b.useState(new Set),ee=Array.from(Q).map(U=>U.props.value).join(";");return g.jsx(Km,{...S,children:g.jsxs(ate,{required:y,scope:e,trigger:R,onTriggerChange:x,valueNode:_,onValueNodeChange:C,valueNodeHasChildren:N,onValueNodeHasChildrenChange:k,contentId:Xr(),value:L,onValueChange:M,open:I,onOpenChange:O,dir:A,triggerPointerDownPosRef:P,disabled:v,children:[g.jsx(ih.Provider,{scope:e,children:g.jsx(ote,{scope:t.__scopeSelect,onNativeOptionAdd:b.useCallback(U=>{J(G=>new Set(G).add(U))},[]),onNativeOptionRemove:b.useCallback(U=>{J(G=>{const H=new Set(G);return H.delete(U),H})},[]),children:r})}),Y?g.jsxs(A4,{"aria-hidden":!0,required:y,tabIndex:-1,name:m,autoComplete:h,value:L,onChange:U=>M(U.target.value),disabled:v,form:w,children:[L===void 0?g.jsx("option",{value:""}):null,Array.from(Q)]},ee):null]})})};i4.displayName=Ts;var s4="SelectTrigger",l4=b.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...a}=t,s=lh(r),l=Ii(s4,r),c=l.disabled||n,d=Nt(e,l.onTriggerChange),f=sh(r),m=b.useRef("touch"),[h,v,y]=k4(S=>{const R=f().filter(C=>!C.disabled),x=R.find(C=>C.value===l.value),_=I4(R,S,x);_!==void 0&&l.onValueChange(_.value)}),w=S=>{c||(l.onOpenChange(!0),y()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return g.jsx(Ld,{asChild:!0,...s,children:g.jsx(bt.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":N4(l.value)?"":void 0,...a,ref:d,onClick:He(a.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&w(S)}),onPointerDown:He(a.onPointerDown,S=>{m.current=S.pointerType;const R=S.target;R.hasPointerCapture(S.pointerId)&&R.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(w(S),S.preventDefault())}),onKeyDown:He(a.onKeyDown,S=>{const R=h.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&v(S.key),!(R&&S.key===" ")&&tte.includes(S.key)&&(w(),S.preventDefault())})})})});l4.displayName=s4;var c4="SelectValue",u4=b.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:a,children:s,placeholder:l="",...c}=t,d=Ii(c4,r),{onValueNodeHasChildrenChange:f}=d,m=s!==void 0,h=Nt(e,d.onValueNodeChange);return nn(()=>{f(m)},[f,m]),g.jsx(bt.span,{...c,ref:h,style:{pointerEvents:"none"},children:N4(d.value)?g.jsx(g.Fragment,{children:l}):s})});u4.displayName=c4;var ste="SelectIcon",d4=b.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...a}=t;return g.jsx(bt.span,{"aria-hidden":!0,...a,ref:e,children:n||"▼"})});d4.displayName=ste;var lte="SelectPortal",f4=t=>g.jsx(_c,{asChild:!0,...t});f4.displayName=lte;var Rs="SelectContent",p4=b.forwardRef((t,e)=>{const r=Ii(Rs,t.__scopeSelect),[n,a]=b.useState();if(nn(()=>{a(new DocumentFragment)},[]),!r.open){const s=n;return s?bc.createPortal(g.jsx(m4,{scope:t.__scopeSelect,children:g.jsx(ih.Slot,{scope:t.__scopeSelect,children:g.jsx("div",{children:t.children})})}),s):null}return g.jsx(h4,{...t,ref:e})});p4.displayName=Rs;var va=10,[m4,Oi]=Tc(Rs),cte="SelectContentImpl",ute=Ss("SelectContent.RemoveScroll"),h4=b.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:d,align:f,alignOffset:m,arrowPadding:h,collisionBoundary:v,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:R,...x}=t,_=Ii(Rs,r),[C,N]=b.useState(null),[k,A]=b.useState(null),I=Nt(e,j=>N(j)),[O,L]=b.useState(null),[M,P]=b.useState(null),Y=sh(r),[Q,J]=b.useState(!1),ee=b.useRef(!1);b.useEffect(()=>{if(C)return ah(C)},[C]),rh();const U=b.useCallback(j=>{const[Z,...ne]=Y().map(fe=>fe.ref.current),[V]=ne.slice(-1),de=document.activeElement;for(const fe of j)if(fe===de||(fe?.scrollIntoView({block:"nearest"}),fe===Z&&k&&(k.scrollTop=0),fe===V&&k&&(k.scrollTop=k.scrollHeight),fe?.focus(),document.activeElement!==de))return},[Y,k]),G=b.useCallback(()=>U([O,C]),[U,O,C]);b.useEffect(()=>{Q&&G()},[Q,G]);const{onOpenChange:H,triggerPointerDownPosRef:X}=_;b.useEffect(()=>{if(C){let j={x:0,y:0};const Z=V=>{j={x:Math.abs(Math.round(V.pageX)-(X.current?.x??0)),y:Math.abs(Math.round(V.pageY)-(X.current?.y??0))}},ne=V=>{j.x<=10&&j.y<=10?V.preventDefault():C.contains(V.target)||H(!1),document.removeEventListener("pointermove",Z),X.current=null};return X.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",ne,{capture:!0})}}},[C,H,X]),b.useEffect(()=>{const j=()=>H(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[H]);const[ae,z]=k4(j=>{const Z=Y().filter(de=>!de.disabled),ne=Z.find(de=>de.ref.current===document.activeElement),V=I4(Z,j,ne);V&&setTimeout(()=>V.ref.current.focus())}),q=b.useCallback((j,Z,ne)=>{const V=!ee.current&&!ne;(_.value!==void 0&&_.value===Z||V)&&(L(j),V&&(ee.current=!0))},[_.value]),$=b.useCallback(()=>C?.focus(),[C]),W=b.useCallback((j,Z,ne)=>{const V=!ee.current&&!ne;(_.value!==void 0&&_.value===Z||V)&&P(j)},[_.value]),te=n==="popper"?oT:g4,F=te===oT?{side:c,sideOffset:d,align:f,alignOffset:m,arrowPadding:h,collisionBoundary:v,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:R}:{};return g.jsx(m4,{scope:r,content:C,viewport:k,onViewportChange:A,itemRefCallback:q,selectedItem:O,onItemLeave:$,itemTextRefCallback:W,focusSelectedItem:G,selectedItemText:M,position:n,isPositioned:Q,searchRef:ae,children:g.jsx(Ud,{as:ute,allowPinchZoom:!0,children:g.jsx(jd,{asChild:!0,trapped:_.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:He(a,j=>{_.trigger?.focus({preventScroll:!0}),j.preventDefault()}),children:g.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:g.jsx(te,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:j=>j.preventDefault(),...x,...F,onPlaced:()=>J(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:He(x.onKeyDown,j=>{const Z=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!Z&&j.key.length===1&&z(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let V=Y().filter(de=>!de.disabled).map(de=>de.ref.current);if(["ArrowUp","End"].includes(j.key)&&(V=V.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){const de=j.target,fe=V.indexOf(de);V=V.slice(fe+1)}setTimeout(()=>U(V)),j.preventDefault()}})})})})})})});h4.displayName=cte;var dte="SelectItemAlignedPosition",g4=b.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...a}=t,s=Ii(Rs,r),l=Oi(Rs,r),[c,d]=b.useState(null),[f,m]=b.useState(null),h=Nt(e,I=>m(I)),v=sh(r),y=b.useRef(!1),w=b.useRef(!0),{viewport:S,selectedItem:R,selectedItemText:x,focusSelectedItem:_}=l,C=b.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&f&&S&&R&&x){const I=s.trigger.getBoundingClientRect(),O=f.getBoundingClientRect(),L=s.valueNode.getBoundingClientRect(),M=x.getBoundingClientRect();if(s.dir!=="rtl"){const de=M.left-O.left,fe=L.left-de,Re=I.left-fe,be=I.width+Re,xe=Math.max(be,O.width),Ne=window.innerWidth-va,ze=aD(fe,[va,Math.max(va,Ne-xe)]);c.style.minWidth=be+"px",c.style.left=ze+"px"}else{const de=O.right-M.right,fe=window.innerWidth-L.right-de,Re=window.innerWidth-I.right-fe,be=I.width+Re,xe=Math.max(be,O.width),Ne=window.innerWidth-va,ze=aD(fe,[va,Math.max(va,Ne-xe)]);c.style.minWidth=be+"px",c.style.right=ze+"px"}const P=v(),Y=window.innerHeight-va*2,Q=S.scrollHeight,J=window.getComputedStyle(f),ee=parseInt(J.borderTopWidth,10),U=parseInt(J.paddingTop,10),G=parseInt(J.borderBottomWidth,10),H=parseInt(J.paddingBottom,10),X=ee+U+Q+H+G,ae=Math.min(R.offsetHeight*5,X),z=window.getComputedStyle(S),q=parseInt(z.paddingTop,10),$=parseInt(z.paddingBottom,10),W=I.top+I.height/2-va,te=Y-W,F=R.offsetHeight/2,j=R.offsetTop+F,Z=ee+U+j,ne=X-Z;if(Z<=W){const de=P.length>0&&R===P[P.length-1].ref.current;c.style.bottom="0px";const fe=f.clientHeight-S.offsetTop-S.offsetHeight,Re=Math.max(te,F+(de?$:0)+fe+G),be=Z+Re;c.style.height=be+"px"}else{const de=P.length>0&&R===P[0].ref.current;c.style.top="0px";const Re=Math.max(W,ee+S.offsetTop+(de?q:0)+F)+ne;c.style.height=Re+"px",S.scrollTop=Z-W+S.offsetTop}c.style.margin=`${va}px 0`,c.style.minHeight=ae+"px",c.style.maxHeight=Y+"px",n?.(),requestAnimationFrame(()=>y.current=!0)}},[v,s.trigger,s.valueNode,c,f,S,R,x,s.dir,n]);nn(()=>C(),[C]);const[N,k]=b.useState();nn(()=>{f&&k(window.getComputedStyle(f).zIndex)},[f]);const A=b.useCallback(I=>{I&&w.current===!0&&(C(),_?.(),w.current=!1)},[C,_]);return g.jsx(pte,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:A,children:g.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:g.jsx(bt.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});g4.displayName=dte;var fte="SelectPopperPosition",oT=b.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:a=va,...s}=t,l=lh(r);return g.jsx(Zm,{...l,...s,ref:e,align:n,collisionPadding:a,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});oT.displayName=fte;var[pte,HR]=Tc(Rs,{}),iT="SelectViewport",v4=b.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...a}=t,s=Oi(iT,r),l=HR(iT,r),c=Nt(e,s.onViewportChange),d=b.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),g.jsx(ih.Slot,{scope:r,children:g.jsx(bt.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:He(a.onScroll,f=>{const m=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:v}=l;if(v?.current&&h){const y=Math.abs(d.current-m.scrollTop);if(y>0){const w=window.innerHeight-va*2,S=parseFloat(h.style.minHeight),R=parseFloat(h.style.height),x=Math.max(S,R);if(x<w){const _=x+y,C=Math.min(w,_),N=_-C;h.style.height=C+"px",h.style.bottom==="0px"&&(m.scrollTop=N>0?N:0,h.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});v4.displayName=iT;var b4="SelectGroup",[mte,hte]=Tc(b4),gte=b.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=Xr();return g.jsx(mte,{scope:r,id:a,children:g.jsx(bt.div,{role:"group","aria-labelledby":a,...n,ref:e})})});gte.displayName=b4;var y4="SelectLabel",vte=b.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=hte(y4,r);return g.jsx(bt.div,{id:a.id,...n,ref:e})});vte.displayName=y4;var _m="SelectItem",[bte,E4]=Tc(_m),S4=b.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:a=!1,textValue:s,...l}=t,c=Ii(_m,r),d=Oi(_m,r),f=c.value===n,[m,h]=b.useState(s??""),[v,y]=b.useState(!1),w=Nt(e,_=>d.itemRefCallback?.(_,n,a)),S=Xr(),R=b.useRef("touch"),x=()=>{a||(c.onValueChange(n),c.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(bte,{scope:r,value:n,disabled:a,textId:S,isSelected:f,onItemTextChange:b.useCallback(_=>{h(C=>C||(_?.textContent??"").trim())},[]),children:g.jsx(ih.ItemSlot,{scope:r,value:n,disabled:a,textValue:m,children:g.jsx(bt.div,{role:"option","aria-labelledby":S,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:w,onFocus:He(l.onFocus,()=>y(!0)),onBlur:He(l.onBlur,()=>y(!1)),onClick:He(l.onClick,()=>{R.current!=="mouse"&&x()}),onPointerUp:He(l.onPointerUp,()=>{R.current==="mouse"&&x()}),onPointerDown:He(l.onPointerDown,_=>{R.current=_.pointerType}),onPointerMove:He(l.onPointerMove,_=>{R.current=_.pointerType,a?d.onItemLeave?.():R.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:He(l.onPointerLeave,_=>{_.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:He(l.onKeyDown,_=>{d.searchRef?.current!==""&&_.key===" "||(rte.includes(_.key)&&x(),_.key===" "&&_.preventDefault())})})})})});S4.displayName=_m;var ku="SelectItemText",x4=b.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:a,...s}=t,l=Ii(ku,r),c=Oi(ku,r),d=E4(ku,r),f=ite(ku,r),[m,h]=b.useState(null),v=Nt(e,x=>h(x),d.onItemTextChange,x=>c.itemTextRefCallback?.(x,d.value,d.disabled)),y=m?.textContent,w=b.useMemo(()=>g.jsx("option",{value:d.value,disabled:d.disabled,children:y},d.value),[d.disabled,d.value,y]),{onNativeOptionAdd:S,onNativeOptionRemove:R}=f;return nn(()=>(S(w),()=>R(w)),[S,R,w]),g.jsxs(g.Fragment,{children:[g.jsx(bt.span,{id:d.textId,...s,ref:v}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?bc.createPortal(s.children,l.valueNode):null]})});x4.displayName=ku;var w4="SelectItemIndicator",_4=b.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return E4(w4,r).isSelected?g.jsx(bt.span,{"aria-hidden":!0,...n,ref:e}):null});_4.displayName=w4;var sT="SelectScrollUpButton",T4=b.forwardRef((t,e)=>{const r=Oi(sT,t.__scopeSelect),n=HR(sT,t.__scopeSelect),[a,s]=b.useState(!1),l=Nt(e,n.onScrollButtonChange);return nn(()=>{if(r.viewport&&r.isPositioned){let c=function(){const f=d.scrollTop>0;s(f)};const d=r.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[r.viewport,r.isPositioned]),a?g.jsx(C4,{...t,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=r;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});T4.displayName=sT;var lT="SelectScrollDownButton",R4=b.forwardRef((t,e)=>{const r=Oi(lT,t.__scopeSelect),n=HR(lT,t.__scopeSelect),[a,s]=b.useState(!1),l=Nt(e,n.onScrollButtonChange);return nn(()=>{if(r.viewport&&r.isPositioned){let c=function(){const f=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<f;s(m)};const d=r.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[r.viewport,r.isPositioned]),a?g.jsx(C4,{...t,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=r;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});R4.displayName=lT;var C4=b.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...a}=t,s=Oi("SelectScrollButton",r),l=b.useRef(null),c=sh(r),d=b.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return b.useEffect(()=>()=>d(),[d]),nn(()=>{c().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),g.jsx(bt.div,{"aria-hidden":!0,...a,ref:e,style:{flexShrink:0,...a.style},onPointerDown:He(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(n,50))}),onPointerMove:He(a.onPointerMove,()=>{s.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(n,50))}),onPointerLeave:He(a.onPointerLeave,()=>{d()})})}),yte="SelectSeparator",Ete=b.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return g.jsx(bt.div,{"aria-hidden":!0,...n,ref:e})});Ete.displayName=yte;var cT="SelectArrow",Ste=b.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=lh(r),s=Ii(cT,r),l=Oi(cT,r);return s.open&&l.position==="popper"?g.jsx(Xm,{...a,...n,ref:e}):null});Ste.displayName=cT;var xte="SelectBubbleInput",A4=b.forwardRef(({__scopeSelect:t,value:e,...r},n)=>{const a=b.useRef(null),s=Nt(n,a),l=O$(e);return b.useEffect(()=>{const c=a.current;if(!c)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==e&&m){const h=new Event("change",{bubbles:!0});m.call(c,e),c.dispatchEvent(h)}},[l,e]),g.jsx(bt.select,{...r,style:{...dB,...r.style},ref:s,defaultValue:e})});A4.displayName=xte;function N4(t){return t===""||t===void 0}function k4(t){const e=Ga(t),r=b.useRef(""),n=b.useRef(0),a=b.useCallback(l=>{const c=r.current+l;e(c),(function d(f){r.current=f,window.clearTimeout(n.current),f!==""&&(n.current=window.setTimeout(()=>d(""),1e3))})(c)},[e]),s=b.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,a,s]}function I4(t,e,r){const a=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let l=wte(t,Math.max(s,0));a.length===1&&(l=l.filter(f=>f!==r));const d=l.find(f=>f.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==r?d:void 0}function wte(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var _te=i4,Tte=l4,Rte=u4,Cte=d4,Ate=f4,Nte=p4,kte=v4,Ite=S4,Ote=x4,Dte=_4,Lte=T4,Mte=R4;function Fp({...t}){return g.jsx(_te,{"data-slot":"select",...t})}function zp({...t}){return g.jsx(Rte,{"data-slot":"select-value",...t})}function $p({className:t,size:e="default",children:r,...n}){return g.jsxs(Tte,{"data-slot":"select-trigger","data-size":e,className:De("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",t),...n,children:[r,g.jsx(Cte,{asChild:!0,children:g.jsx(TB,{className:"size-4 opacity-50"})})]})}function Bp({className:t,children:e,position:r="popper",align:n="center",...a}){return g.jsx(Ate,{children:g.jsxs(Nte,{"data-slot":"select-content",className:De("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",r==="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",t),position:r,align:n,...a,children:[g.jsx(Pte,{}),g.jsx(kte,{className:De("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:e}),g.jsx(jte,{})]})})}function xo({className:t,children:e,...r}){return g.jsxs(Ite,{"data-slot":"select-item",className:De("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",t),...r,children:[g.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:g.jsx(Dte,{children:g.jsx(Do,{className:"size-4"})})}),g.jsx(Ote,{children:e})]})}function Pte({className:t,...e}){return g.jsx(Lte,{"data-slot":"select-scroll-up-button",className:De("flex cursor-default items-center justify-center py-1",t),...e,children:g.jsx(gQ,{className:"size-4"})})}function jte({className:t,...e}){return g.jsx(Mte,{"data-slot":"select-scroll-down-button",className:De("flex cursor-default items-center justify-center py-1",t),...e,children:g.jsx(TB,{className:"size-4"})})}function Ute({headers:t,onChange:e,onSave:r,className:n,title:a="Custom Headers",description:s="Headers with both name and value will be sent",maxHeaders:l=50}){const[c,d]=b.useState({}),f=()=>Math.random().toString(36).slice(2,11),m=()=>{if(t.length>=l)return;const w={id:f(),name:"",value:""};e([...t,w])},h=w=>{e(t.filter(S=>S.id!==w))},v=(w,S,R)=>{e(t.map(x=>x.id===w?{...x,[S]:R}:x))},y=w=>{d(S=>({...S,[w]:!S[w]}))};return g.jsxs("div",{className:De("space-y-3",n),children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:"text-base font-medium",children:a}),g.jsx("p",{className:"text-sm text-muted-foreground",children:s})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"grid grid-cols-[1fr_1fr] gap-4 text-sm font-medium text-muted-foreground",children:[g.jsx("div",{children:"Name"}),g.jsx("div",{children:"Value"})]}),t.length===0?g.jsxs("div",{className:"grid grid-cols-[1fr_1fr] gap-4 items-center",children:[g.jsx(Or,{placeholder:"Authorization",value:"",onChange:w=>{if(w.target.value.trim()){const S={id:f(),name:w.target.value,value:""};e([S])}},className:"text-sm",autoComplete:"off"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Or,{placeholder:"Bearer token...",value:"",onChange:()=>{},type:"password",className:"font-mono text-sm",autoComplete:"off",disabled:!0}),g.jsx(tt,{type:"button",variant:"ghost",size:"icon-sm",className:"h-8 w-8 p-0",disabled:!0,children:g.jsx(HO,{className:"h-4 w-4"})}),g.jsx(tt,{type:"button",variant:"ghost",size:"icon-sm",className:"h-8 w-8 p-0",disabled:!0,children:g.jsx(rT,{className:"h-4 w-4"})})]})]}):t.map(w=>g.jsxs("div",{className:"grid grid-cols-[1fr_1fr] gap-4 items-center",children:[g.jsx(Or,{placeholder:"Authorization",value:w.name,onChange:S=>v(w.id,"name",S.target.value),className:"text-sm",autoComplete:"off"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Or,{placeholder:"",value:w.value,onChange:S=>v(w.id,"value",S.target.value),type:c[w.id]?"text":"password",className:"font-mono text-sm",autoComplete:"off"}),g.jsx(tt,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>y(w.id),className:"h-8 w-8 p-0",children:c[w.id]?g.jsx(IQ,{className:"h-4 w-4"}):g.jsx(HO,{className:"h-4 w-4"})}),g.jsx(tt,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>h(w.id),className:"h-8 w-8 p-0",children:g.jsx(rT,{className:"h-4 w-4"})})]})]},w.id)),g.jsx("div",{className:"flex justify-start mt-4",children:g.jsxs(tt,{type:"button",variant:"outline",size:"sm",onClick:m,disabled:t.length>=l,className:"flex items-center gap-2",children:[g.jsx(kB,{className:"h-4 w-4"}),"Add"]})})]}),r&&g.jsx("div",{className:"flex justify-end",children:g.jsx(tt,{type:"button",onClick:r,className:"bg-black text-white hover:bg-gray-800",children:"Save"})})]})}function O4({transportType:t,setTransportType:e,url:r,setUrl:n,connectionType:a,setConnectionType:s,customHeaders:l,setCustomHeaders:c,requestTimeout:d,setRequestTimeout:f,resetTimeoutOnProgress:m,setResetTimeoutOnProgress:h,maxTotalTimeout:v,setMaxTotalTimeout:y,proxyAddress:w,setProxyAddress:S,clientId:R,setClientId:x,redirectUrl:_,setRedirectUrl:C,scope:N,setScope:k,autoSwitch:A,setAutoSwitch:I,onConnect:O,onSave:L,onCancel:M,variant:P="default",showConnectButton:Y=!1,showSaveButton:Q=!1,showExportButton:J=!1,isConnecting:ee=!1}){const[U,G]=b.useState(!1),[H,X]=b.useState(!1),[ae,z]=b.useState(!1),q=async()=>{if(!r.trim()){cr.error("Please enter a URL first");return}const V={url:r,transportType:t==="SSE"?"http":"sse",connectionType:a,proxyConfig:a==="Via Proxy"&&w.trim()?{proxyAddress:w.trim(),customHeaders:l.reduce((de,fe)=>(fe.name&&fe.value&&(de[fe.name]=fe.value),de),{})}:void 0,customHeaders:l.reduce((de,fe)=>(fe.name&&fe.value&&(de[fe.name]=fe.value),de),{}),requestTimeout:Number.parseInt(d,10),resetTimeoutOnProgress:m==="True",maxTotalTimeout:Number.parseInt(v,10),oauth:R||N?{clientId:R,redirectUrl:_,scope:N}:void 0};try{await navigator.clipboard.writeText(JSON.stringify(V,null,2)),cr.success("Configuration copied to clipboard")}catch{cr.error("Failed to copy configuration to clipboard")}},$=P==="styled",W=$?"bg-white/10 border-white/20 text-white placeholder:text-white/50":"",te=$?"text-white/90":"",F=$?"bg-white/10 border-white/20 text-white":"",j=$?"bg-white/10 border-white/20 text-white hover:bg-white/20":"",Z=async V=>{const de=V.clipboardData.getData("text");try{const fe=JSON.parse(de);if(fe.url&&typeof fe.url=="string"){if(V.preventDefault(),n(fe.url),fe.transportType&&e(fe.transportType==="sse"?"WebSocket":"SSE"),fe.connectionType&&s(fe.connectionType),fe.proxyConfig?.proxyAddress&&S(fe.proxyConfig.proxyAddress),fe.customHeaders){const Re=Object.entries(fe.customHeaders).map(([be,xe],Ne)=>({id:`header-${Ne}`,name:be,value:String(xe)}));c(Re)}fe.requestTimeout&&f(String(fe.requestTimeout)),fe.resetTimeoutOnProgress!==void 0&&h(fe.resetTimeoutOnProgress?"True":"False"),fe.maxTotalTimeout&&y(String(fe.maxTotalTimeout)),fe.oauth&&(x(fe.oauth.clientId||""),C(fe.oauth.redirectUrl||_),k(fe.oauth.scope||"")),cr.success("Configuration pasted and form populated")}}catch{}},ne=V=>{V.key==="Enter"&&!V.shiftKey&&!V.metaKey&&!V.ctrlKey&&V.target.tagName!=="TEXTAREA"&&(V.preventDefault(),O&&r.trim()&&O())};return g.jsxs("div",{className:"space-y-4 relative @container",onKeyDown:ne,children:[g.jsx("h3",{className:"text-xl font-semibold text-white mb-4",children:"Connect"}),J&&g.jsxs(tt,{variant:"ghost",onClick:q,className:De($?"absolute top-0 right-0 text-white hover:bg-white/20 z-10 dark:hover:bg-white/20":"w-full",!$&&"mb-2"),children:[g.jsx(aa,{className:"w-4 h-4 mr-2"}),"Copy Config"]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:te,children:"Transport Type"}),g.jsxs(Fp,{value:t,onValueChange:e,children:[g.jsx($p,{className:De("w-full",F),children:g.jsx(zp,{})}),g.jsxs(Bp,{children:[g.jsx(xo,{value:"SSE",children:"Streamable HTTP"}),g.jsx(xo,{value:"WebSocket",children:"Server-Sent Events (SSE)"})]})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:te,children:"URL"}),g.jsx(Or,{placeholder:"http://localhost:3001/sse",value:r,onChange:V=>n(V.target.value),onPaste:Z,className:W}),g.jsx("p",{className:De("text-xs text-muted-foreground",$?"text-white/60":""),children:"Tip: You can paste a copied connection config (JSON) to auto-populate the form"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx(lr,{className:te,children:"Connection Type"}),I&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(lr,{htmlFor:"auto-switch",className:De("text-xs cursor-pointer",$?"text-white/70":"text-muted-foreground"),children:"Auto-switch"}),g.jsx(ER,{id:"auto-switch",checked:A,onCheckedChange:V=>{I(V),localStorage.setItem("mcp-inspector-auto-switch",String(V))},className:"scale-75"})]})]}),g.jsxs(Fp,{value:a,onValueChange:s,children:[g.jsx($p,{className:De("w-full",F),children:g.jsx(zp,{})}),g.jsxs(Bp,{children:[g.jsx(xo,{value:"Direct",children:"Direct"}),g.jsx(xo,{value:"Via Proxy",children:"Via Proxy"})]})]})]}),g.jsxs("div",{className:"flex flex-row gap-3 @lg:flex-col",children:[g.jsxs($u,{open:H,onOpenChange:X,children:[g.jsx(ty,{asChild:!0,children:g.jsx("div",{className:"relative flex-1 ",children:g.jsxs(tt,{variant:"outline",className:De((R||N)&&"border-2","w-full justify-center hover:text-white cursor-pointer",j),children:[g.jsx(pJ,{className:"w-4 h-4 mr-0"}),"Authentication"]})})}),g.jsxs(Bu,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[g.jsx(qu,{children:g.jsx(Hu,{children:"Authentication"})}),g.jsxs("div",{className:"space-y-4",children:[g.jsx("h4",{className:"text-sm font-medium",children:"OAuth 2.0 Flow"}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:"text-sm",children:"Client ID"}),g.jsx(Or,{placeholder:"Client ID",value:R,onChange:V=>x(V.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:"text-sm",children:"Redirect URL"}),g.jsx(Or,{value:_,onChange:V=>C(V.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(lr,{className:"text-sm",children:"Scope"}),g.jsx(Or,{placeholder:"Scope (space-separated)",value:N,onChange:V=>k(V.target.value)})]}),g.jsx("div",{className:"flex justify-end",children:g.jsx(tt,{onClick:()=>X(!1),children:"Save"})})]})]})]}),g.jsxs($u,{open:U,onOpenChange:G,children:[g.jsx(ty,{asChild:!0,children:g.jsx("div",{className:"relative flex-1 ",children:g.jsxs(tt,{variant:"outline",className:De("w-full justify-center hover:text-white cursor-pointer",j),children:[g.jsx(OR,{className:"w-4 h-4"}),"Custom Headers"]})})}),g.jsxs(Bu,{className:"w-full max-w-2xl max-h-[80vh] overflow-y-auto",children:[g.jsx(qu,{children:g.jsx(Hu,{children:"Custom Headers"})}),g.jsx(Ute,{headers:l,onChange:c,onSave:()=>G(!1)})]})]}),g.jsxs($u,{open:ae,onOpenChange:z,children:[g.jsx(ty,{asChild:!0,children:g.jsxs(tt,{variant:"outline",className:De("flex-1 justify-center hover:text-white cursor-pointer",j),children:[g.jsx(wQ,{className:"w-4 h-4"}),"Configuration"]})}),g.jsxs(Bu,{className:"w-full max-w-2xl max-h-[80vh] overflow-y-auto",children:[g.jsx(qu,{children:g.jsx(Hu,{children:"Configuration"})}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{className:"text-sm flex items-center gap-1",children:["Request Timeout",g.jsx("span",{className:"text-muted-foreground text-xs",children:"(?)"})]}),g.jsx(Or,{type:"number",value:d,onChange:V=>f(V.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{className:"text-sm flex items-center gap-1",children:["Reset Timeout on Progress",g.jsx("span",{className:"text-muted-foreground text-xs",children:"(?)"})]}),g.jsxs(Fp,{value:m,onValueChange:h,children:[g.jsx($p,{className:"w-full",children:g.jsx(zp,{})}),g.jsxs(Bp,{children:[g.jsx(xo,{value:"True",children:"True"}),g.jsx(xo,{value:"False",children:"False"})]})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{className:"text-sm flex items-center gap-1",children:["Maximum Total Timeout",g.jsx("span",{className:"text-muted-foreground text-xs",children:"(?)"})]}),g.jsx(Or,{type:"number",value:v,onChange:V=>y(V.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{className:"text-sm flex items-center gap-1",children:["Inspector Proxy Address",g.jsx("span",{className:"text-muted-foreground text-xs",children:"(?)"})]}),g.jsx(Or,{value:w,onChange:V=>S(V.target.value),placeholder:""})]}),g.jsx("div",{className:"flex justify-end",children:g.jsx(tt,{onClick:()=>z(!1),children:"Save"})})]})]})]})]}),Y&&g.jsx(tt,{onClick:O,disabled:!r.trim()||ee,className:De("w-full font-semibold",$?"bg-white text-black hover:bg-white/90":""),children:ee?g.jsxs(g.Fragment,{children:[g.jsx("svg",{className:"w-4 h-4 mr-2 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Connecting..."]}):g.jsxs(g.Fragment,{children:[g.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),"Connect"]})}),Q&&g.jsxs("div",{className:"flex justify-end gap-2",children:[M&&g.jsx(tt,{variant:"outline",onClick:M,children:"Cancel"}),g.jsx(tt,{onClick:L,children:"Save Connection Options"})]})]})}function D4({connection:t,open:e,onOpenChange:r,onConnect:n}){const[a,s]=b.useState("SSE"),[l,c]=b.useState(""),[d,f]=b.useState("Direct"),[m,h]=b.useState([]),[v,y]=b.useState("10000"),[w,S]=b.useState("True"),[R,x]=b.useState("60000"),[_,C]=b.useState(`${window.location.origin}/inspector/api/proxy`),[N,k]=b.useState(""),[A,I]=b.useState(typeof window<"u"?new URL("/inspector/oauth/callback",window.location.origin).toString():"/inspector/oauth/callback"),[O,L]=b.useState("");b.useEffect(()=>{if(t&&e){c(t.url),t.transportType==="sse"?s("WebSocket"):s("SSE"),t.proxyConfig?.proxyAddress?(f("Via Proxy"),C(t.proxyConfig.proxyAddress)):(f("Direct"),C(`${window.location.origin}/inspector/api/proxy`));const P=t.proxyConfig?.customHeaders||t.customHeaders||{},Y=Object.entries(P).map(([Q,J],ee)=>({id:`header-${ee}`,name:Q,value:String(J)}));h(Y)}},[t,e]);const M=()=>{if(!l.trim())return;const P=d==="Via Proxy"&&_.trim()?{proxyAddress:_.trim(),customHeaders:m.reduce((Q,J)=>(J.name&&J.value&&(Q[J.name]=J.value),Q),{})}:{customHeaders:m.reduce((Q,J)=>(J.name&&J.value&&(Q[J.name]=J.value),Q),{})},Y=a==="SSE"?"http":"sse";n({url:l,name:t?.name,transportType:Y,proxyConfig:P}),r(!1)};return g.jsx($u,{open:e,onOpenChange:r,children:g.jsxs(Bu,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[g.jsx(qu,{children:g.jsx(Hu,{children:"Edit Connection Settings"})}),g.jsx(O4,{transportType:a,setTransportType:s,url:l,setUrl:c,connectionType:d,setConnectionType:f,customHeaders:m,setCustomHeaders:h,requestTimeout:v,setRequestTimeout:y,resetTimeoutOnProgress:w,setResetTimeoutOnProgress:S,maxTotalTimeout:R,setMaxTotalTimeout:x,proxyAddress:_,setProxyAddress:C,clientId:N,setClientId:k,redirectUrl:A,setRedirectUrl:I,scope:O,setScope:L,onConnect:M,variant:"default",showConnectButton:!0,showExportButton:!1,isConnecting:!1})]})})}function Fte({config:t,onSuccess:e,onFailure:r}){const n=typeof window<"u"?new URL("/inspector/oauth/callback",window.location.origin).toString():"/inspector/oauth/callback";let a=t.url,s={};if(t.proxyConfig?.proxyAddress){const d=new URL(t.proxyConfig.proxyAddress),f=new URL(t.url);a=`${d.origin}${d.pathname}${f.pathname}${f.search}`,s["X-Target-URL"]=t.url}t.proxyConfig?.customHeaders&&(s={...s,...t.proxyConfig.customHeaders});const l=fR({url:a,callbackUrl:n,customHeaders:Object.keys(s).length>0?s:void 0,transportType:t.transportType||"http"}),c=b.useRef(!1);return b.useEffect(()=>{if(!c.current){if(l.state==="ready")c.current=!0,e();else if(!(l.state==="authenticating"||l.state==="pending_auth")){if(l.state==="failed"&&l.error){if(l.authUrl)return;c.current=!0;const d=l.error;l.clearStorage(),r(d)}}}},[l.state,l.error,l.authUrl,e,r,l]),null}function zte(){const t=IR(),{connections:e,addConnection:r,removeConnection:n,updateConnectionConfig:a,autoConnect:s,setAutoConnect:l,connectServer:c,disconnectServer:d}=t,f=vc(),m=Uo(),[h,v]=b.useState(new Set),[y,w]=b.useState(null),[S,R]=b.useState(null);console.warn("[InspectorDashboard] Render - connections:",e.map(ce=>({id:ce.id,state:ce.state}))),b.useEffect(()=>{zr.getInstance().trackInspectorOpen({connectionCount:e.length}).catch(()=>{})},[]);const[x,_]=b.useState("SSE"),[C,N]=b.useState(""),[k,A]=b.useState("Direct"),[I,O]=b.useState([]),[L,M]=b.useState("10000"),[P,Y]=b.useState("True"),[Q,J]=b.useState("60000"),[ee,U]=b.useState(`${window.location.origin}/inspector/api/proxy`),[G,H]=b.useState(""),[X,ae]=b.useState(typeof window<"u"?new URL("/inspector/oauth/callback",window.location.origin).toString():"/inspector/oauth/callback"),[z,q]=b.useState(""),[$,W]=b.useState(!1),[te,F]=b.useState(!0),j=b.useRef(!1),[Z,ne]=b.useState(!1),[V,de]=b.useState(null);b.useEffect(()=>{const ce=localStorage.getItem("mcp-inspector-auto-switch");ce!==null&&F(ce==="true")},[]);const fe=b.useCallback((ce=!1,Ce)=>{if(!C.trim())return;W(!0),j.current=!1,ce||ne(!1);const _e=(Ce||k)==="Via Proxy"&&ee.trim()?{proxyAddress:ee.trim(),customHeaders:I.reduce((Oe,Je)=>(Je.name&&Je.value&&(Oe[Je.name]=Je.value),Oe),{})}:{customHeaders:I.reduce((Oe,Je)=>(Je.name&&Je.value&&(Oe[Je.name]=Je.value),Oe),{})};de({url:C,name:C,proxyConfig:_e,transportType:x==="SSE"?"http":"sse"})},[C,k,ee,I,x]),Re=b.useCallback(()=>{if(!V)return;W(!1),r(V.url,V.name,V.proxyConfig,V.transportType),zr.getInstance().capture(new XX({serverId:V.url,serverUrl:V.url,connectionType:V.transportType,viaProxy:!!V.proxyConfig?.proxyAddress})).catch(()=>{}),de(null),cr.success("Connection established successfully"),N(""),O([]),H(""),q("")},[V,r]),be=b.useCallback(ce=>{const Ce=ce.includes("401")||ce.includes("Unauthorized")||ce.includes("Authentication required");te&&!Z&&!Ce?k==="Direct"?(cr.error("Direct connection failed, trying with proxy..."),ne(!0),de(null),A("Via Proxy"),setTimeout(()=>{W(!0),fe(!0,"Via Proxy")},1e3)):k==="Via Proxy"&&(cr.error("Proxy connection failed, trying direct..."),ne(!0),de(null),A("Direct"),setTimeout(()=>{W(!0),fe(!0,"Direct")},1e3)):(cr.error(ce),de(null),W(!1))},[te,Z,k,fe]),xe=()=>{e.forEach(ce=>{n(ce.id)})},Ne=async ce=>{try{await navigator.clipboard.writeText(ce),cr.success("Error message copied to clipboard")}catch{cr.error("Failed to copy error message")}},ze=async ce=>{try{const Ce={url:ce.url,name:ce.name,transportType:ce.transportType||"http",connectionType:ce.proxyConfig?"Via Proxy":"Direct",proxyConfig:ce.proxyConfig,customHeaders:ce.customHeaders||{},requestTimeout:ce.requestTimeout||1e4,resetTimeoutOnProgress:ce.resetTimeoutOnProgress!==!1,maxTotalTimeout:ce.maxTotalTimeout||6e4,oauth:ce.oauth};await navigator.clipboard.writeText(JSON.stringify(Ce,null,2)),cr.success("Connection configuration copied to clipboard")}catch{cr.error("Failed to copy connection configuration")}},Me=(ce,Ce)=>{ce.stopPropagation(),Ce()},$e=b.useCallback(ce=>{S&&(ce.url!==S?(n(S),r(ce.url,ce.name,ce.proxyConfig,ce.transportType)):a(S,{name:ce.name,proxyConfig:ce.proxyConfig,transportType:ce.transportType}),R(null),cr.success("Connection settings updated"))},[S,n,r,a]),ct=ce=>{if(ce.state==="disconnected"){console.warn("[InspectorDashboard] Connecting server and setting pending navigation:",ce.id),v(Ie=>new Set(Ie).add(ce.id)),w(ce.id),c(ce.id);return}if(ce.state!=="ready"){cr.error("Server is not connected and cannot be inspected");return}const Fe=new URLSearchParams(m.search).get("tunnelUrl"),_e=Fe?`/?server=${encodeURIComponent(ce.id)}&tunnelUrl=${encodeURIComponent(Fe)}`:`/?server=${encodeURIComponent(ce.id)}`;f(_e)};return b.useEffect(()=>{h.forEach(ce=>{const Ce=e.find(Fe=>Fe.id===ce);Ce&&(Ce.state==="ready"||Ce.state==="failed")&&v(Fe=>{const _e=new Set(Fe);return _e.delete(ce),_e})})},[e,h]),b.useEffect(()=>{if(!y)return;const ce=e.find(Fe=>Fe.id===y),Ce=(ce?.tools?.length||0)>0||(ce?.resources?.length||0)>0||(ce?.prompts?.length||0)>0;if(ce&&(ce.state==="ready"||Ce&&ce.state!=="connecting")){w(null);const _e=new URLSearchParams(m.search).get("tunnelUrl"),Ie=_e?`/?server=${encodeURIComponent(ce.id)}&tunnelUrl=${encodeURIComponent(_e)}`:`/?server=${encodeURIComponent(ce.id)}`;f(Ie)}else ce&&ce.state==="failed"&&!Ce&&ce.error&&(console.warn("[InspectorDashboard] Connection failed with no data, canceling navigation"),w(null))},[e,y,f]),g.jsxs("div",{className:"flex items-start justify-start gap-4 h-full relative",children:[g.jsxs("div",{className:"w-full px-6 pt-6 overflow-auto",children:[g.jsxs("div",{className:"flex items-center gap-3 relative z-10",children:[g.jsx("h2",{className:"text-2xl font-medium tracking-tight",children:"MCP Inspector"}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx("a",{href:"https://github.com/mcp-use/mcp-use",target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:g.jsxs(Va,{variant:"secondary",className:"text-xs cursor-pointer hover:bg-secondary/80 transition-colors",children:["v",typeof window<"u"&&window.__INSPECTOR_VERSION__||"1.0.0"]})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Visit GitHub"})})]})]}),g.jsx("p",{className:"text-muted-foreground relative z-10",children:"Inspect and debug MCP (Model Context Protocol) servers"}),g.jsxs("div",{className:"space-y-4 mt-8",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h3",{className:"text-base font-medium",children:"Connected Servers"}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(lr,{htmlFor:"auto-connect",className:"text-sm cursor-pointer",children:"Auto-connect"}),g.jsx(ER,{id:"auto-connect",checked:s,onCheckedChange:l})]}),e.length>0&&g.jsx(tt,{variant:"ghost",size:"sm",onClick:xe,children:"Clear All"})]})]}),e.length===0?g.jsx(yR,{message:"No servers connected yet. Add a server above to get started."}):g.jsx("div",{className:"grid gap-3",children:e.map(ce=>g.jsxs("div",{onClick:()=>ct(ce),className:"group rounded-lg bg-zinc-100 dark:bg-white/10 hover:bg-zinc-200 dark:hover:bg-white/15 p-4 transition-colors cursor-pointer",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex-1",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("h4",{className:"font-semibold text-sm",children:ce.name}),g.jsx("div",{className:"flex items-center gap-2",children:h.has(ce.id)?g.jsx(th,{className:"w-3 h-3 animate-spin text-blue-500"}):ce.error&&ce.state!=="ready"?g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx("button",{type:"button",onClick:Ce=>{Ce.stopPropagation(),Ne(ce.error)},className:"w-2 h-2 rounded-full bg-rose-500 animate-status-pulse-red hover:bg-rose-600 transition-colors",title:"Click to copy error message","aria-label":"Copy error message to clipboard"})}),g.jsx(Fr,{children:g.jsx("p",{className:"max-w-xs",children:ce.error})})]}):g.jsx("div",{className:`w-2 h-2 rounded-full ${ce.state==="disconnected"?"bg-gray-400 dark:bg-gray-600":ce.state==="ready"?"bg-emerald-600 animate-status-pulse":ce.state==="failed"?"bg-rose-600 animate-status-pulse-red":"bg-yellow-500 animate-status-pulse-yellow"}`})})]}),g.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[g.jsx("p",{className:"text-xs text-muted-foreground dark:text-zinc-400 font-mono",children:ce.url}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx("button",{type:"button",onClick:Ce=>{Ce.stopPropagation(),navigator.clipboard.writeText(ce.url),cr.success("URL copied to clipboard")},className:"opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-white/10 rounded",title:"Copy URL",children:g.jsx(aa,{className:"w-3 h-3 text-muted-foreground"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Copy URL"})})]})]})]}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"secondary",size:"sm",onClick:Ce=>Me(Ce,()=>ze(ce)),className:"h-8 w-8 p-0",children:g.jsx(aa,{className:"w-4 h-4"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Copy connection config"})})]}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"secondary",size:"sm",onClick:Ce=>Me(Ce,()=>R(ce.id)),className:"h-8 w-8 p-0",children:g.jsx(xm,{className:"w-4 h-4"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Edit connection settings"})})]}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"secondary",size:"sm",onClick:Ce=>Me(Ce,()=>n(ce.id)),className:"h-8 w-8 p-0",children:g.jsx(bQ,{className:"w-4 h-4"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Remove connection"})})]}),ce.state!=="disconnected"&&g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"secondary",size:"sm",onClick:Ce=>Me(Ce,ce.retry),className:"h-8 w-8 p-0",children:g.jsx(iJ,{className:"w-4 h-4"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Resync connection"})})]})]})]}),ce.state==="pending_auth"&&ce.authUrl&&g.jsxs("div",{className:"text-sm text-yellow-600 dark:text-yellow-400 mt-2",children:[g.jsx(tt,{size:"sm",variant:"outline",onClick:ce.authenticate,children:"Authenticate"})," ","or"," ",g.jsx("a",{href:ce.authUrl,target:"_blank",rel:"noopener noreferrer",className:"underline",children:"open auth page"})]})]},ce.id))})]})]}),g.jsxs("div",{className:"w-full relative overflow-hidden h-full p-10 items-center justify-center flex",children:[g.jsx("div",{className:"relative w-full max-w-xl mx-auto z-10 flex flex-col gap-3 rounded-3xl p-6 bg-black/70 dark:bg-black/90 shadow-2xl shadow-black/50 backdrop-blur-md",children:g.jsx(O4,{transportType:x,setTransportType:_,url:C,setUrl:N,connectionType:k,setConnectionType:A,customHeaders:I,setCustomHeaders:O,requestTimeout:L,setRequestTimeout:M,resetTimeoutOnProgress:P,setResetTimeoutOnProgress:Y,maxTotalTimeout:Q,setMaxTotalTimeout:J,proxyAddress:ee,setProxyAddress:U,clientId:G,setClientId:H,redirectUrl:X,setRedirectUrl:ae,scope:z,setScope:q,autoSwitch:te,setAutoSwitch:F,onConnect:fe,variant:"styled",showConnectButton:!0,showExportButton:!0,isConnecting:$})}),g.jsx(I$,{className:"absolute inset-0"})]}),V&&g.jsx(Fte,{config:V,onSuccess:Re,onFailure:be},`${V.url}-${V.transportType}-${k}`),g.jsx(D4,{connection:S&&e.find(ce=>ce.id===S)||null,open:S!==null,onOpenChange:ce=>{ce||R(null)},onConnect:$e})]})}function Lo({className:t,...e}){return g.jsx(th,{role:"status","aria-label":"Loading",className:De("size-4 animate-spin",t),...e})}const L4=b.createContext(void 0);function $te({children:t}){const[e,r]=b.useState({selectedServerId:null,activeTab:"tools",selectedToolName:null,selectedPromptName:null,selectedResourceUri:null,tunnelUrl:null}),n=b.useCallback(v=>{r(y=>({...y,selectedServerId:v}))},[]),a=b.useCallback(v=>{r(y=>({...y,activeTab:v}))},[]),s=b.useCallback(v=>{r(y=>({...y,selectedToolName:v}))},[]),l=b.useCallback(v=>{r(y=>({...y,selectedPromptName:v}))},[]),c=b.useCallback(v=>{r(y=>({...y,selectedResourceUri:v}))},[]),d=b.useCallback(v=>{r(y=>({...y,tunnelUrl:v}))},[]),f=b.useCallback((v,y,w)=>{console.warn("[InspectorContext] navigateToItem called:",{serverId:v,tab:y,itemIdentifier:w});const S={selectedServerId:v,activeTab:y,selectedToolName:y==="tools"&&w||null,selectedPromptName:y==="prompts"&&w||null,selectedResourceUri:y==="resources"&&w||null};console.warn("[InspectorContext] Setting new state:",S),r(S)},[]),m=b.useCallback(()=>{r(v=>({...v,selectedToolName:null,selectedPromptName:null,selectedResourceUri:null}))},[]),h={...e,setSelectedServerId:n,setActiveTab:a,setSelectedToolName:s,setSelectedPromptName:l,setSelectedResourceUri:c,setTunnelUrl:d,navigateToItem:f,clearSelection:m};return g.jsx(L4,{value:h,children:t})}function Fd(){const t=b.use(L4);if(!t)throw new Error("useInspector must be used within InspectorProvider");return t}function oD(t){try{const e=JSON.parse(t);if(e.url&&typeof e.url=="string")return{url:e.url,name:e.name||"Auto-connected Server",transportType:e.transportType==="sse"?"sse":"http",connectionType:e.connectionType==="Via Proxy"?"Via Proxy":"Direct",customHeaders:e.customHeaders||{},requestTimeout:e.requestTimeout,resetTimeoutOnProgress:e.resetTimeoutOnProgress,maxTotalTimeout:e.maxTotalTimeout}}catch{return{url:t,name:"Auto-connected Server",transportType:"http",connectionType:"Direct"}}return null}function Bte({connections:t,addConnection:e,removeConnection:r}){const n=vc(),[a,s]=b.useState(!1),[l,c]=b.useState(null),[d,f]=b.useState(!1),[m,h]=b.useState(!0),[v,y]=b.useState(!1),w=b.useRef(!1);b.useEffect(()=>{const R=localStorage.getItem("mcp-inspector-auto-switch");R!==null&&h(R==="true")},[]);const S=b.useCallback(R=>{const{url:x,name:_,transportType:C,connectionType:N,customHeaders:k}=R,A=N==="Via Proxy"?{proxyAddress:`${window.location.origin}/inspector/api/proxy/mcp`,customHeaders:k||{}}:k&&Object.keys(k).length>0?{proxyAddress:void 0,customHeaders:k}:void 0;console.warn(`[useAutoConnect] Attempting connection (${N}):`,{url:x,transportType:C,proxyConfig:A}),e(x,_,A,C)},[e]);return b.useEffect(()=>{if(v)return;const x=new URLSearchParams(window.location.search).get("autoConnect");if(x){const _=oD(x);_&&(t.find(N=>N.url===_.url)||(c(_),f(!1),s(!0),S(_))),y(!0);return}fetch("/inspector/config.json").then(_=>_.json()).then(_=>{if(y(!0),_.autoConnectUrl){const C=oD(_.autoConnectUrl);C&&(t.find(k=>k.url===C.url)||(c(C),f(!1),s(!0),S(C)))}}).catch(()=>y(!0))},[v,t,S]),b.useEffect(()=>{if(!l||!m||w.current)return;const R=t.find(x=>x.url===l.url);if(R?.state==="ready"){console.warn("[useAutoConnect] Connection succeeded, navigating to server");const _=new URLSearchParams(window.location.search).get("tunnelUrl"),C=_?`/?server=${encodeURIComponent(R.id)}&tunnelUrl=${encodeURIComponent(_)}`:`/?server=${encodeURIComponent(R.id)}`;n(C),setTimeout(()=>{c(null),f(!1),s(!1),w.current=!1},100);return}if(!d&&R?.state==="failed"&&R.error){console.warn("[useAutoConnect] Connection failed, trying alternate mode...");const x=l.connectionType==="Direct"?"Via Proxy":"Direct";l.connectionType==="Direct"?(cr.error("Direct connection failed, trying with proxy..."),f(!0),w.current=!0,queueMicrotask(()=>{r(R.id),setTimeout(()=>{console.warn("[useAutoConnect] Retrying with proxy");const _={...l,connectionType:x};c(_),s(!0),w.current=!1,S(_)},1e3)})):(cr.error("Proxy connection also failed"),f(!0),queueMicrotask(()=>{r(R.id),s(!1),c(null),w.current=!1}))}},[t,l,d,m,S,r,n]),b.useEffect(()=>{if(a&&t.length>0&&!l&&t.some(x=>x.state!=="connecting"&&x.state!=="loading")){const x=setTimeout(()=>s(!1),500);return()=>clearTimeout(x)}},[a,t,l]),{isAutoConnecting:a,autoConnectUrl:l?.url||null}}function M4(t){b.useEffect(()=>{const e=r=>{const n=r.target,a=n.tagName==="INPUT"||n.tagName==="TEXTAREA"||n.contentEditable==="true";if((r.metaKey||r.ctrlKey)&&r.key==="k"){r.preventDefault(),t.onCommandPalette?.();return}if((r.metaKey||r.ctrlKey)&&r.key==="o"&&t.onNewChat){r.preventDefault(),t.onNewChat();return}if(r.key==="Escape"){r.preventDefault(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),t.onBlurSearch?.();return}if(!a&&!(r.metaKey||r.ctrlKey||r.altKey||r.shiftKey))switch(r.key.toLowerCase()){case"t":r.preventDefault(),t.onToolsTab?.();break;case"p":r.preventDefault(),t.onPromptsTab?.();break;case"r":r.preventDefault(),t.onResourcesTab?.();break;case"c":r.preventDefault(),t.onChatTab?.();break;case"h":r.preventDefault(),t.onHome?.();break;case"f":r.preventDefault(),t.onFocusSearch?.();break}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t])}const iD="mcp-inspector-saved-requests";function qte(){const[t,e]=b.useState([]);return b.useEffect(()=>{try{const r=localStorage.getItem(iD);r&&e(JSON.parse(r))}catch(r){console.error("[useSavedRequests] Failed to load saved requests:",r)}},[]),b.useEffect(()=>{const r=n=>{if(n.key===iD&&n.newValue)try{e(JSON.parse(n.newValue))}catch(a){console.error("[useSavedRequests] Failed to parse saved requests:",a)}};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)},[]),t}var sD=1,Hte=.9,Vte=.8,Gte=.17,ry=.1,ny=.999,Wte=.9999,Yte=.99,Kte=/[\\\/_+.#"@\[\(\{&]/,Zte=/[\\\/_+.#"@\[\(\{&]/g,Xte=/[\s-]/,P4=/[\s-]/g;function uT(t,e,r,n,a,s,l){if(s===e.length)return a===t.length?sD:Yte;var c=`${a},${s}`;if(l[c]!==void 0)return l[c];for(var d=n.charAt(s),f=r.indexOf(d,a),m=0,h,v,y,w;f>=0;)h=uT(t,e,r,n,f+1,s+1,l),h>m&&(f===a?h*=sD:Kte.test(t.charAt(f-1))?(h*=Vte,y=t.slice(a,f-1).match(Zte),y&&a>0&&(h*=Math.pow(ny,y.length))):Xte.test(t.charAt(f-1))?(h*=Hte,w=t.slice(a,f-1).match(P4),w&&a>0&&(h*=Math.pow(ny,w.length))):(h*=Gte,a>0&&(h*=Math.pow(ny,f-a))),t.charAt(f)!==e.charAt(s)&&(h*=Wte)),(h<ry&&r.charAt(f-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(f-1)!==n.charAt(s))&&(v=uT(t,e,r,n,f+1,s+2,l),v*ry>h&&(h=v*ry)),h>m&&(m=h),f=r.indexOf(d,f+1);return l[c]=m,m}function lD(t){return t.toLowerCase().replace(P4," ")}function Qte(t,e,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,uT(t,e,lD(t),lD(e),0,0,{})}var Eu='[cmdk-group=""]',ay='[cmdk-group-items=""]',Jte='[cmdk-group-heading=""]',j4='[cmdk-item=""]',cD=`${j4}:not([aria-disabled="true"])`,dT="cmdk-item-select",xl="data-value",ere=(t,e,r)=>Qte(t,e,r),U4=b.createContext(void 0),zd=()=>b.useContext(U4),F4=b.createContext(void 0),VR=()=>b.useContext(F4),z4=b.createContext(void 0),$4=b.forwardRef((t,e)=>{let r=wl(()=>{var q,$;return{search:"",value:($=(q=t.value)!=null?q:t.defaultValue)!=null?$:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=wl(()=>new Set),a=wl(()=>new Map),s=wl(()=>new Map),l=wl(()=>new Set),c=B4(t),{label:d,children:f,value:m,onValueChange:h,filter:v,shouldFilter:y,loop:w,disablePointerSelection:S=!1,vimBindings:R=!0,...x}=t,_=Xr(),C=Xr(),N=Xr(),k=b.useRef(null),A=dre();Cs(()=>{if(m!==void 0){let q=m.trim();r.current.value=q,I.emit()}},[m]),Cs(()=>{A(6,Q)},[]);let I=b.useMemo(()=>({subscribe:q=>(l.current.add(q),()=>l.current.delete(q)),snapshot:()=>r.current,setState:(q,$,W)=>{var te,F,j,Z;if(!Object.is(r.current[q],$)){if(r.current[q]=$,q==="search")Y(),M(),A(1,P);else if(q==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ne=document.getElementById(N);ne?ne.focus():(te=document.getElementById(_))==null||te.focus()}if(A(7,()=>{var ne;r.current.selectedItemId=(ne=J())==null?void 0:ne.id,I.emit()}),W||A(5,Q),((F=c.current)==null?void 0:F.value)!==void 0){let ne=$??"";(Z=(j=c.current).onValueChange)==null||Z.call(j,ne);return}}I.emit()}},emit:()=>{l.current.forEach(q=>q())}}),[]),O=b.useMemo(()=>({value:(q,$,W)=>{var te;$!==((te=s.current.get(q))==null?void 0:te.value)&&(s.current.set(q,{value:$,keywords:W}),r.current.filtered.items.set(q,L($,W)),A(2,()=>{M(),I.emit()}))},item:(q,$)=>(n.current.add(q),$&&(a.current.has($)?a.current.get($).add(q):a.current.set($,new Set([q]))),A(3,()=>{Y(),M(),r.current.value||P(),I.emit()}),()=>{s.current.delete(q),n.current.delete(q),r.current.filtered.items.delete(q);let W=J();A(4,()=>{Y(),W?.getAttribute("id")===q&&P(),I.emit()})}),group:q=>(a.current.has(q)||a.current.set(q,new Set),()=>{s.current.delete(q),a.current.delete(q)}),filter:()=>c.current.shouldFilter,label:d||t["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:_,inputId:N,labelId:C,listInnerRef:k}),[]);function L(q,$){var W,te;let F=(te=(W=c.current)==null?void 0:W.filter)!=null?te:ere;return q?F(q,r.current.search,$):0}function M(){if(!r.current.search||c.current.shouldFilter===!1)return;let q=r.current.filtered.items,$=[];r.current.filtered.groups.forEach(te=>{let F=a.current.get(te),j=0;F.forEach(Z=>{let ne=q.get(Z);j=Math.max(ne,j)}),$.push([te,j])});let W=k.current;ee().sort((te,F)=>{var j,Z;let ne=te.getAttribute("id"),V=F.getAttribute("id");return((j=q.get(V))!=null?j:0)-((Z=q.get(ne))!=null?Z:0)}).forEach(te=>{let F=te.closest(ay);F?F.appendChild(te.parentElement===F?te:te.closest(`${ay} > *`)):W.appendChild(te.parentElement===W?te:te.closest(`${ay} > *`))}),$.sort((te,F)=>F[1]-te[1]).forEach(te=>{var F;let j=(F=k.current)==null?void 0:F.querySelector(`${Eu}[${xl}="${encodeURIComponent(te[0])}"]`);j?.parentElement.appendChild(j)})}function P(){let q=ee().find(W=>W.getAttribute("aria-disabled")!=="true"),$=q?.getAttribute(xl);I.setState("value",$||void 0)}function Y(){var q,$,W,te;if(!r.current.search||c.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let F=0;for(let j of n.current){let Z=($=(q=s.current.get(j))==null?void 0:q.value)!=null?$:"",ne=(te=(W=s.current.get(j))==null?void 0:W.keywords)!=null?te:[],V=L(Z,ne);r.current.filtered.items.set(j,V),V>0&&F++}for(let[j,Z]of a.current)for(let ne of Z)if(r.current.filtered.items.get(ne)>0){r.current.filtered.groups.add(j);break}r.current.filtered.count=F}function Q(){var q,$,W;let te=J();te&&(((q=te.parentElement)==null?void 0:q.firstChild)===te&&((W=($=te.closest(Eu))==null?void 0:$.querySelector(Jte))==null||W.scrollIntoView({block:"nearest"})),te.scrollIntoView({block:"nearest"}))}function J(){var q;return(q=k.current)==null?void 0:q.querySelector(`${j4}[aria-selected="true"]`)}function ee(){var q;return Array.from(((q=k.current)==null?void 0:q.querySelectorAll(cD))||[])}function U(q){let $=ee()[q];$&&I.setState("value",$.getAttribute(xl))}function G(q){var $;let W=J(),te=ee(),F=te.findIndex(Z=>Z===W),j=te[F+q];($=c.current)!=null&&$.loop&&(j=F+q<0?te[te.length-1]:F+q===te.length?te[0]:te[F+q]),j&&I.setState("value",j.getAttribute(xl))}function H(q){let $=J(),W=$?.closest(Eu),te;for(;W&&!te;)W=q>0?cre(W,Eu):ure(W,Eu),te=W?.querySelector(cD);te?I.setState("value",te.getAttribute(xl)):G(q)}let X=()=>U(ee().length-1),ae=q=>{q.preventDefault(),q.metaKey?X():q.altKey?H(1):G(1)},z=q=>{q.preventDefault(),q.metaKey?U(0):q.altKey?H(-1):G(-1)};return b.createElement(Fo.div,{ref:e,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:q=>{var $;($=x.onKeyDown)==null||$.call(x,q);let W=q.nativeEvent.isComposing||q.keyCode===229;if(!(q.defaultPrevented||W))switch(q.key){case"n":case"j":{R&&q.ctrlKey&&ae(q);break}case"ArrowDown":{ae(q);break}case"p":case"k":{R&&q.ctrlKey&&z(q);break}case"ArrowUp":{z(q);break}case"Home":{q.preventDefault(),U(0);break}case"End":{q.preventDefault(),X();break}case"Enter":{q.preventDefault();let te=J();if(te){let F=new Event(dT);te.dispatchEvent(F)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:O.inputId,id:O.labelId,style:pre},d),ch(t,q=>b.createElement(F4.Provider,{value:I},b.createElement(U4.Provider,{value:O},q))))}),tre=b.forwardRef((t,e)=>{var r,n;let a=Xr(),s=b.useRef(null),l=b.useContext(z4),c=zd(),d=B4(t),f=(n=(r=d.current)==null?void 0:r.forceMount)!=null?n:l?.forceMount;Cs(()=>{if(!f)return c.item(a,l?.id)},[f]);let m=q4(a,s,[t.value,t.children,s],t.keywords),h=VR(),v=Ci(A=>A.value&&A.value===m.current),y=Ci(A=>f||c.filter()===!1?!0:A.search?A.filtered.items.get(a)>0:!0);b.useEffect(()=>{let A=s.current;if(!(!A||t.disabled))return A.addEventListener(dT,w),()=>A.removeEventListener(dT,w)},[y,t.onSelect,t.disabled]);function w(){var A,I;S(),(I=(A=d.current).onSelect)==null||I.call(A,m.current)}function S(){h.setState("value",m.current,!0)}if(!y)return null;let{disabled:R,value:x,onSelect:_,forceMount:C,keywords:N,...k}=t;return b.createElement(Fo.div,{ref:Ha(s,e),...k,id:a,"cmdk-item":"",role:"option","aria-disabled":!!R,"aria-selected":!!v,"data-disabled":!!R,"data-selected":!!v,onPointerMove:R||c.getDisablePointerSelection()?void 0:S,onClick:R?void 0:w},t.children)}),rre=b.forwardRef((t,e)=>{let{heading:r,children:n,forceMount:a,...s}=t,l=Xr(),c=b.useRef(null),d=b.useRef(null),f=Xr(),m=zd(),h=Ci(y=>a||m.filter()===!1?!0:y.search?y.filtered.groups.has(l):!0);Cs(()=>m.group(l),[]),q4(l,c,[t.value,t.heading,d]);let v=b.useMemo(()=>({id:l,forceMount:a}),[a]);return b.createElement(Fo.div,{ref:Ha(c,e),...s,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&b.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},r),ch(t,y=>b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?f:void 0},b.createElement(z4.Provider,{value:v},y))))}),nre=b.forwardRef((t,e)=>{let{alwaysRender:r,...n}=t,a=b.useRef(null),s=Ci(l=>!l.search);return!r&&!s?null:b.createElement(Fo.div,{ref:Ha(a,e),...n,"cmdk-separator":"",role:"separator"})}),are=b.forwardRef((t,e)=>{let{onValueChange:r,...n}=t,a=t.value!=null,s=VR(),l=Ci(f=>f.search),c=Ci(f=>f.selectedItemId),d=zd();return b.useEffect(()=>{t.value!=null&&s.setState("search",t.value)},[t.value]),b.createElement(Fo.input,{ref:e,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":c,id:d.inputId,type:"text",value:a?t.value:l,onChange:f=>{a||s.setState("search",f.target.value),r?.(f.target.value)}})}),ore=b.forwardRef((t,e)=>{let{children:r,label:n="Suggestions",...a}=t,s=b.useRef(null),l=b.useRef(null),c=Ci(f=>f.selectedItemId),d=zd();return b.useEffect(()=>{if(l.current&&s.current){let f=l.current,m=s.current,h,v=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let y=f.offsetHeight;m.style.setProperty("--cmdk-list-height",y.toFixed(1)+"px")})});return v.observe(f),()=>{cancelAnimationFrame(h),v.unobserve(f)}}},[]),b.createElement(Fo.div,{ref:Ha(s,e),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":n,id:d.listId},ch(t,f=>b.createElement("div",{ref:Ha(l,d.listInnerRef),"cmdk-list-sizer":""},f)))}),ire=b.forwardRef((t,e)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:s,container:l,...c}=t;return b.createElement(UR,{open:r,onOpenChange:n},b.createElement(FR,{container:l},b.createElement(zR,{"cmdk-overlay":"",className:a}),b.createElement($R,{"aria-label":t.label,"cmdk-dialog":"",className:s},b.createElement($4,{ref:e,...c}))))}),sre=b.forwardRef((t,e)=>Ci(r=>r.filtered.count===0)?b.createElement(Fo.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),lre=b.forwardRef((t,e)=>{let{progress:r,children:n,label:a="Loading...",...s}=t;return b.createElement(Fo.div,{ref:e,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},ch(t,l=>b.createElement("div",{"aria-hidden":!0},l)))}),Su=Object.assign($4,{List:ore,Item:tre,Input:are,Group:rre,Separator:nre,Dialog:ire,Empty:sre,Loading:lre});function cre(t,e){let r=t.nextElementSibling;for(;r;){if(r.matches(e))return r;r=r.nextElementSibling}}function ure(t,e){let r=t.previousElementSibling;for(;r;){if(r.matches(e))return r;r=r.previousElementSibling}}function B4(t){let e=b.useRef(t);return Cs(()=>{e.current=t}),e}var Cs=typeof window>"u"?b.useEffect:b.useLayoutEffect;function wl(t){let e=b.useRef();return e.current===void 0&&(e.current=t()),e}function Ci(t){let e=VR(),r=()=>t(e.snapshot());return b.useSyncExternalStore(e.subscribe,r,r)}function q4(t,e,r,n=[]){let a=b.useRef(),s=zd();return Cs(()=>{var l;let c=(()=>{var f;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(f=m.current.textContent)==null?void 0:f.trim():a.current}})(),d=n.map(f=>f.trim());s.value(t,c,d),(l=e.current)==null||l.setAttribute(xl,c),a.current=c}),a}var dre=()=>{let[t,e]=b.useState(),r=wl(()=>new Map);return Cs(()=>{r.current.forEach(n=>n()),r.current=new Map},[t]),(n,a)=>{r.current.set(n,a),e({})}};function fre(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function ch({asChild:t,children:e},r){return t&&b.isValidElement(e)?b.cloneElement(fre(e),{ref:e.ref},r(e.props.children)):r(e)}var pre={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function mre({className:t,size:e="md"}){const r={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};return g.jsxs("svg",{viewBox:"0 0 303 303",className:De("text-current",r[e],t),fill:"currentColor",fillRule:"nonzero",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("path",{d:"m105.5 34.8.6.6c9.5 9.5 14.4 21.9 14.6 34.4a112.6 112.6 0 0 0 112.2 112.1h.6c12 .4 24 5.1 33.2 14.1l.6.6a50 50 0 0 1-70.1 71.3l-.6-.6A49.9 49.9 0 0 1 182 230 112.6 112.6 0 0 0 73.4 120.7h-.8a49.9 49.9 0 0 1-36.7-14l-.5-.6a50 50 0 0 1-.6-70.2l.6-.5a50 50 0 0 1 69.5-1.2l.6.6Z"}),g.jsx("circle",{cx:"70.3",cy:"232.3",r:"50"}),g.jsx("circle",{cx:"232.3",cy:"70.3",r:"50"})]})}const GR=b.createContext({});function WR(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const YR=typeof window<"u",H4=YR?b.useLayoutEffect:b.useEffect,uh=b.createContext(null);function KR(t,e){t.indexOf(e)===-1&&t.push(e)}function ZR(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}const Mo=(t,e,r)=>r>e?e:r<t?t:r;let XR=()=>{};const Po={},V4=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function G4(t){return typeof t=="object"&&t!==null}const W4=t=>/^0[^.\s]+$/u.test(t);function QR(t){let e;return()=>(e===void 0&&(e=t()),e)}const oa=t=>t,hre=(t,e)=>r=>e(t(r)),$d=(...t)=>t.reduce(hre),dd=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n};class JR{constructor(){this.subscriptions=[]}add(e){return KR(this.subscriptions,e),()=>ZR(this.subscriptions,e)}notify(e,r,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](e,r,n);else for(let s=0;s<a;s++){const l=this.subscriptions[s];l&&l(e,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const za=t=>t*1e3,ra=t=>t/1e3;function Y4(t,e){return e?t*(1e3/e):0}const K4=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,gre=1e-7,vre=12;function bre(t,e,r,n,a){let s,l,c=0;do l=e+(r-e)/2,s=K4(l,n,a)-t,s>0?r=l:e=l;while(Math.abs(s)>gre&&++c<vre);return l}function Bd(t,e,r,n){if(t===e&&r===n)return oa;const a=s=>bre(s,0,1,t,r);return s=>s===0||s===1?s:K4(a(s),e,n)}const Z4=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,X4=t=>e=>1-t(1-e),Q4=Bd(.33,1.53,.69,.99),eC=X4(Q4),J4=Z4(eC),e3=t=>(t*=2)<1?.5*eC(t):.5*(2-Math.pow(2,-10*(t-1))),tC=t=>1-Math.sin(Math.acos(t)),t3=X4(tC),r3=Z4(tC),yre=Bd(.42,0,1,1),Ere=Bd(0,0,.58,1),n3=Bd(.42,0,.58,1),Sre=t=>Array.isArray(t)&&typeof t[0]!="number",a3=t=>Array.isArray(t)&&typeof t[0]=="number",xre={linear:oa,easeIn:yre,easeInOut:n3,easeOut:Ere,circIn:tC,circInOut:r3,circOut:t3,backIn:eC,backInOut:J4,backOut:Q4,anticipate:e3},wre=t=>typeof t=="string",uD=t=>{if(a3(t)){XR(t.length===4);const[e,r,n,a]=t;return Bd(e,r,n,a)}else if(wre(t))return xre[t];return t},Ep=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function _re(t,e){let r=new Set,n=new Set,a=!1,s=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(f.schedule(m),t()),m(c)}const f={schedule:(m,h=!1,v=!1)=>{const w=v&&a?r:n;return h&&l.add(m),w.has(m)||w.add(m),m},cancel:m=>{n.delete(m),l.delete(m)},process:m=>{if(c=m,a){s=!0;return}a=!0,[r,n]=[n,r],r.forEach(d),r.clear(),a=!1,s&&(s=!1,f.process(m))}};return f}const Tre=40;function o3(t,e){let r=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},s=()=>r=!0,l=Ep.reduce((C,N)=>(C[N]=_re(s),C),{}),{setup:c,read:d,resolveKeyframes:f,preUpdate:m,update:h,preRender:v,render:y,postRender:w}=l,S=()=>{const C=Po.useManualTiming?a.timestamp:performance.now();r=!1,Po.useManualTiming||(a.delta=n?1e3/60:Math.max(Math.min(C-a.timestamp,Tre),1)),a.timestamp=C,a.isProcessing=!0,c.process(a),d.process(a),f.process(a),m.process(a),h.process(a),v.process(a),y.process(a),w.process(a),a.isProcessing=!1,r&&e&&(n=!1,t(S))},R=()=>{r=!0,n=!0,a.isProcessing||t(S)};return{schedule:Ep.reduce((C,N)=>{const k=l[N];return C[N]=(A,I=!1,O=!1)=>(r||R(),k.schedule(A,I,O)),C},{}),cancel:C=>{for(let N=0;N<Ep.length;N++)l[Ep[N]].cancel(C)},state:a,steps:l}}const{schedule:ar,cancel:Ai,state:Kr,steps:oy}=o3(typeof requestAnimationFrame<"u"?requestAnimationFrame:oa,!0);let qp;function Rre(){qp=void 0}const wn={now:()=>(qp===void 0&&wn.set(Kr.isProcessing||Po.useManualTiming?Kr.timestamp:performance.now()),qp),set:t=>{qp=t,queueMicrotask(Rre)}},i3=t=>e=>typeof e=="string"&&e.startsWith(t),rC=i3("--"),Cre=i3("var(--"),nC=t=>Cre(t)?Are.test(t.split("/*")[0].trim()):!1,Are=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Rc={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},fd={...Rc,transform:t=>Mo(0,1,t)},Sp={...Rc,default:1},Vu=t=>Math.round(t*1e5)/1e5,aC=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Nre(t){return t==null}const kre=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,oC=(t,e)=>r=>!!(typeof r=="string"&&kre.test(r)&&r.startsWith(t)||e&&!Nre(r)&&Object.prototype.hasOwnProperty.call(r,e)),s3=(t,e,r)=>n=>{if(typeof n!="string")return n;const[a,s,l,c]=n.match(aC);return{[t]:parseFloat(a),[e]:parseFloat(s),[r]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},Ire=t=>Mo(0,255,t),iy={...Rc,transform:t=>Math.round(Ire(t))},us={test:oC("rgb","red"),parse:s3("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+iy.transform(t)+", "+iy.transform(e)+", "+iy.transform(r)+", "+Vu(fd.transform(n))+")"};function Ore(t){let e="",r="",n="",a="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),a=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),a=t.substring(4,5),e+=e,r+=r,n+=n,a+=a),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const fT={test:oC("#"),parse:Ore,transform:us.transform},qd=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),mi=qd("deg"),$a=qd("%"),it=qd("px"),Dre=qd("vh"),Lre=qd("vw"),dD={...$a,parse:t=>$a.parse(t)/100,transform:t=>$a.transform(t*100)},kl={test:oC("hsl","hue"),parse:s3("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+$a.transform(Vu(e))+", "+$a.transform(Vu(r))+", "+Vu(fd.transform(n))+")"},Cr={test:t=>us.test(t)||fT.test(t)||kl.test(t),parse:t=>us.test(t)?us.parse(t):kl.test(t)?kl.parse(t):fT.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?us.transform(t):kl.transform(t),getAnimatableNone:t=>{const e=Cr.parse(t);return e.alpha=0,Cr.transform(e)}},Mre=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Pre(t){return isNaN(t)&&typeof t=="string"&&(t.match(aC)?.length||0)+(t.match(Mre)?.length||0)>0}const l3="number",c3="color",jre="var",Ure="var(",fD="${}",Fre=/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 pd(t){const e=t.toString(),r=[],n={color:[],number:[],var:[]},a=[];let s=0;const c=e.replace(Fre,d=>(Cr.test(d)?(n.color.push(s),a.push(c3),r.push(Cr.parse(d))):d.startsWith(Ure)?(n.var.push(s),a.push(jre),r.push(d)):(n.number.push(s),a.push(l3),r.push(parseFloat(d))),++s,fD)).split(fD);return{values:r,split:c,indexes:n,types:a}}function u3(t){return pd(t).values}function d3(t){const{split:e,types:r}=pd(t),n=e.length;return a=>{let s="";for(let l=0;l<n;l++)if(s+=e[l],a[l]!==void 0){const c=r[l];c===l3?s+=Vu(a[l]):c===c3?s+=Cr.transform(a[l]):s+=a[l]}return s}}const zre=t=>typeof t=="number"?0:Cr.test(t)?Cr.getAnimatableNone(t):t;function $re(t){const e=u3(t);return d3(t)(e.map(zre))}const Ni={test:Pre,parse:u3,createTransformer:d3,getAnimatableNone:$re};function sy(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Bre({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let a=0,s=0,l=0;if(!e)a=s=l=r;else{const c=r<.5?r*(1+e):r+e-r*e,d=2*r-c;a=sy(d,c,t+1/3),s=sy(d,c,t),l=sy(d,c,t-1/3)}return{red:Math.round(a*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:n}}function Tm(t,e){return r=>r>0?e:t}const ur=(t,e,r)=>t+(e-t)*r,ly=(t,e,r)=>{const n=t*t,a=r*(e*e-n)+n;return a<0?0:Math.sqrt(a)},qre=[fT,us,kl],Hre=t=>qre.find(e=>e.test(t));function pD(t){const e=Hre(t);if(!e)return!1;let r=e.parse(t);return e===kl&&(r=Bre(r)),r}const mD=(t,e)=>{const r=pD(t),n=pD(e);if(!r||!n)return Tm(t,e);const a={...r};return s=>(a.red=ly(r.red,n.red,s),a.green=ly(r.green,n.green,s),a.blue=ly(r.blue,n.blue,s),a.alpha=ur(r.alpha,n.alpha,s),us.transform(a))},pT=new Set(["none","hidden"]);function Vre(t,e){return pT.has(t)?r=>r<=0?t:e:r=>r>=1?e:t}function Gre(t,e){return r=>ur(t,e,r)}function iC(t){return typeof t=="number"?Gre:typeof t=="string"?nC(t)?Tm:Cr.test(t)?mD:Kre:Array.isArray(t)?f3:typeof t=="object"?Cr.test(t)?mD:Wre:Tm}function f3(t,e){const r=[...t],n=r.length,a=t.map((s,l)=>iC(s)(s,e[l]));return s=>{for(let l=0;l<n;l++)r[l]=a[l](s);return r}}function Wre(t,e){const r={...t,...e},n={};for(const a in r)t[a]!==void 0&&e[a]!==void 0&&(n[a]=iC(t[a])(t[a],e[a]));return a=>{for(const s in n)r[s]=n[s](a);return r}}function Yre(t,e){const r=[],n={color:0,var:0,number:0};for(let a=0;a<e.values.length;a++){const s=e.types[a],l=t.indexes[s][n[s]],c=t.values[l]??0;r[a]=c,n[s]++}return r}const Kre=(t,e)=>{const r=Ni.createTransformer(e),n=pd(t),a=pd(e);return n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length?pT.has(t)&&!a.values.length||pT.has(e)&&!n.values.length?Vre(t,e):$d(f3(Yre(n,a),a.values),r):Tm(t,e)};function p3(t,e,r){return typeof t=="number"&&typeof e=="number"&&typeof r=="number"?ur(t,e,r):iC(t)(t,e)}const Zre=t=>{const e=({timestamp:r})=>t(r);return{start:(r=!0)=>ar.update(e,r),stop:()=>Ai(e),now:()=>Kr.isProcessing?Kr.timestamp:wn.now()}},m3=(t,e,r=10)=>{let n="";const a=Math.max(Math.round(e/r),2);for(let s=0;s<a;s++)n+=Math.round(t(s/(a-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Rm=2e4;function sC(t){let e=0;const r=50;let n=t.next(e);for(;!n.done&&e<Rm;)e+=r,n=t.next(e);return e>=Rm?1/0:e}function Xre(t,e=100,r){const n=r({...t,keyframes:[0,e]}),a=Math.min(sC(n),Rm);return{type:"keyframes",ease:s=>n.next(a*s).value/e,duration:ra(a)}}const Qre=5;function h3(t,e,r){const n=Math.max(e-Qre,0);return Y4(r-t(n),e-n)}const hr={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},cy=.001;function Jre({duration:t=hr.duration,bounce:e=hr.bounce,velocity:r=hr.velocity,mass:n=hr.mass}){let a,s,l=1-e;l=Mo(hr.minDamping,hr.maxDamping,l),t=Mo(hr.minDuration,hr.maxDuration,ra(t)),l<1?(a=f=>{const m=f*l,h=m*t,v=m-r,y=mT(f,l),w=Math.exp(-h);return cy-v/y*w},s=f=>{const h=f*l*t,v=h*r+r,y=Math.pow(l,2)*Math.pow(f,2)*t,w=Math.exp(-h),S=mT(Math.pow(f,2),l);return(-a(f)+cy>0?-1:1)*((v-y)*w)/S}):(a=f=>{const m=Math.exp(-f*t),h=(f-r)*t+1;return-cy+m*h},s=f=>{const m=Math.exp(-f*t),h=(r-f)*(t*t);return m*h});const c=5/t,d=tne(a,s,c);if(t=za(t),isNaN(d))return{stiffness:hr.stiffness,damping:hr.damping,duration:t};{const f=Math.pow(d,2)*n;return{stiffness:f,damping:l*2*Math.sqrt(n*f),duration:t}}}const ene=12;function tne(t,e,r){let n=r;for(let a=1;a<ene;a++)n=n-t(n)/e(n);return n}function mT(t,e){return t*Math.sqrt(1-e*e)}const rne=["duration","bounce"],nne=["stiffness","damping","mass"];function hD(t,e){return e.some(r=>t[r]!==void 0)}function ane(t){let e={velocity:hr.velocity,stiffness:hr.stiffness,damping:hr.damping,mass:hr.mass,isResolvedFromDuration:!1,...t};if(!hD(t,nne)&&hD(t,rne))if(t.visualDuration){const r=t.visualDuration,n=2*Math.PI/(r*1.2),a=n*n,s=2*Mo(.05,1,1-(t.bounce||0))*Math.sqrt(a);e={...e,mass:hr.mass,stiffness:a,damping:s}}else{const r=Jre(t);e={...e,...r,mass:hr.mass},e.isResolvedFromDuration=!0}return e}function Cm(t=hr.visualDuration,e=hr.bounce){const r=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:n,restDelta:a}=r;const s=r.keyframes[0],l=r.keyframes[r.keyframes.length-1],c={done:!1,value:s},{stiffness:d,damping:f,mass:m,duration:h,velocity:v,isResolvedFromDuration:y}=ane({...r,velocity:-ra(r.velocity||0)}),w=v||0,S=f/(2*Math.sqrt(d*m)),R=l-s,x=ra(Math.sqrt(d/m)),_=Math.abs(R)<5;n||(n=_?hr.restSpeed.granular:hr.restSpeed.default),a||(a=_?hr.restDelta.granular:hr.restDelta.default);let C;if(S<1){const k=mT(x,S);C=A=>{const I=Math.exp(-S*x*A);return l-I*((w+S*x*R)/k*Math.sin(k*A)+R*Math.cos(k*A))}}else if(S===1)C=k=>l-Math.exp(-x*k)*(R+(w+x*R)*k);else{const k=x*Math.sqrt(S*S-1);C=A=>{const I=Math.exp(-S*x*A),O=Math.min(k*A,300);return l-I*((w+S*x*R)*Math.sinh(O)+k*R*Math.cosh(O))/k}}const N={calculatedDuration:y&&h||null,next:k=>{const A=C(k);if(y)c.done=k>=h;else{let I=k===0?w:0;S<1&&(I=k===0?za(w):h3(C,k,A));const O=Math.abs(I)<=n,L=Math.abs(l-A)<=a;c.done=O&&L}return c.value=c.done?l:A,c},toString:()=>{const k=Math.min(sC(N),Rm),A=m3(I=>N.next(k*I).value,k,30);return k+"ms "+A},toTransition:()=>{}};return N}Cm.applyToOptions=t=>{const e=Xre(t,100,Cm);return t.ease=e.ease,t.duration=za(e.duration),t.type="keyframes",t};function hT({keyframes:t,velocity:e=0,power:r=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:s=500,modifyTarget:l,min:c,max:d,restDelta:f=.5,restSpeed:m}){const h=t[0],v={done:!1,value:h},y=O=>c!==void 0&&O<c||d!==void 0&&O>d,w=O=>c===void 0?d:d===void 0||Math.abs(c-O)<Math.abs(d-O)?c:d;let S=r*e;const R=h+S,x=l===void 0?R:l(R);x!==R&&(S=x-h);const _=O=>-S*Math.exp(-O/n),C=O=>x+_(O),N=O=>{const L=_(O),M=C(O);v.done=Math.abs(L)<=f,v.value=v.done?x:M};let k,A;const I=O=>{y(v.value)&&(k=O,A=Cm({keyframes:[v.value,w(v.value)],velocity:h3(C,O,v.value),damping:a,stiffness:s,restDelta:f,restSpeed:m}))};return I(0),{calculatedDuration:null,next:O=>{let L=!1;return!A&&k===void 0&&(L=!0,N(O),I(O)),k!==void 0&&O>=k?A.next(O-k):(!L&&N(O),v)}}}function one(t,e,r){const n=[],a=r||Po.mix||p3,s=t.length-1;for(let l=0;l<s;l++){let c=a(t[l],t[l+1]);if(e){const d=Array.isArray(e)?e[l]||oa:e;c=$d(d,c)}n.push(c)}return n}function ine(t,e,{clamp:r=!0,ease:n,mixer:a}={}){const s=t.length;if(XR(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const l=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const c=one(e,n,a),d=c.length,f=m=>{if(l&&m<t[0])return e[0];let h=0;if(d>1)for(;h<t.length-2&&!(m<t[h+1]);h++);const v=dd(t[h],t[h+1],m);return c[h](v)};return r?m=>f(Mo(t[0],t[s-1],m)):f}function sne(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const a=dd(0,e,n);t.push(ur(r,1,a))}}function lne(t){const e=[0];return sne(e,t.length-1),e}function cne(t,e){return t.map(r=>r*e)}function une(t,e){return t.map(()=>e||n3).splice(0,t.length-1)}function Gu({duration:t=300,keyframes:e,times:r,ease:n="easeInOut"}){const a=Sre(n)?n.map(uD):uD(n),s={done:!1,value:e[0]},l=cne(r&&r.length===e.length?r:lne(e),t),c=ine(l,e,{ease:Array.isArray(a)?a:une(e,a)});return{calculatedDuration:t,next:d=>(s.value=c(d),s.done=d>=t,s)}}const dne=t=>t!==null;function lC(t,{repeat:e,repeatType:r="loop"},n,a=1){const s=t.filter(dne),c=a<0||e&&r!=="loop"&&e%2===1?0:s.length-1;return!c||n===void 0?s[c]:n}const fne={decay:hT,inertia:hT,tween:Gu,keyframes:Gu,spring:Cm};function g3(t){typeof t.type=="string"&&(t.type=fne[t.type])}class cC{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,r){return this.finished.then(e,r)}}const pne=t=>t/100;class uC extends cC{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==wn.now()&&this.tick(wn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;g3(e);const{type:r=Gu,repeat:n=0,repeatDelay:a=0,repeatType:s,velocity:l=0}=e;let{keyframes:c}=e;const d=r||Gu;d!==Gu&&typeof c[0]!="number"&&(this.mixKeyframes=$d(pne,p3(c[0],c[1])),c=[0,100]);const f=d({...e,keyframes:c});s==="mirror"&&(this.mirroredGenerator=d({...e,keyframes:[...c].reverse(),velocity:-l})),f.calculatedDuration===null&&(f.calculatedDuration=sC(f));const{calculatedDuration:m}=f;this.calculatedDuration=m,this.resolvedDuration=m+a,this.totalDuration=this.resolvedDuration*(n+1)-a,this.generator=f}updateTime(e){const r=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(e,r=!1){const{generator:n,totalDuration:a,mixKeyframes:s,mirroredGenerator:l,resolvedDuration:c,calculatedDuration:d}=this;if(this.startTime===null)return n.next(0);const{delay:f=0,keyframes:m,repeat:h,repeatType:v,repeatDelay:y,type:w,onUpdate:S,finalKeyframe:R}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-a/this.speed,this.startTime)),r?this.currentTime=e:this.updateTime(e);const x=this.currentTime-f*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?x<0:x>a;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let C=this.currentTime,N=n;if(h){const O=Math.min(this.currentTime,a)/c;let L=Math.floor(O),M=O%1;!M&&O>=1&&(M=1),M===1&&L--,L=Math.min(L,h+1),!!(L%2)&&(v==="reverse"?(M=1-M,y&&(M-=y/c)):v==="mirror"&&(N=l)),C=Mo(0,1,M)*c}const k=_?{done:!1,value:m[0]}:N.next(C);s&&(k.value=s(k.value));let{done:A}=k;!_&&d!==null&&(A=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return I&&w!==hT&&(k.value=lC(m,this.options,R,this.speed)),S&&S(k.value),I&&this.finish(),k}then(e,r){return this.finished.then(e,r)}get duration(){return ra(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ra(e)}get time(){return ra(this.currentTime)}set time(e){e=za(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(wn.now());const r=this.playbackSpeed!==e;this.playbackSpeed=e,r&&(this.time=ra(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Zre,startTime:r}=this.options;this.driver||(this.driver=e(a=>this.tick(a))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),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(wn.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(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function mne(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ds=t=>t*180/Math.PI,gT=t=>{const e=ds(Math.atan2(t[1],t[0]));return vT(e)},hne={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:gT,rotateZ:gT,skewX:t=>ds(Math.atan(t[1])),skewY:t=>ds(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},vT=t=>(t=t%360,t<0&&(t+=360),t),gD=gT,vD=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),bD=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),gne={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vD,scaleY:bD,scale:t=>(vD(t)+bD(t))/2,rotateX:t=>vT(ds(Math.atan2(t[6],t[5]))),rotateY:t=>vT(ds(Math.atan2(-t[2],t[0]))),rotateZ:gD,rotate:gD,skewX:t=>ds(Math.atan(t[4])),skewY:t=>ds(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function bT(t){return t.includes("scale")?1:0}function yT(t,e){if(!t||t==="none")return bT(e);const r=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,a;if(r)n=gne,a=r;else{const c=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=hne,a=c}if(!a)return bT(e);const s=n[e],l=a[1].split(",").map(bne);return typeof s=="function"?s(l):l[s]}const vne=(t,e)=>{const{transform:r="none"}=getComputedStyle(t);return yT(r,e)};function bne(t){return parseFloat(t.trim())}const Cc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ac=new Set(Cc),yD=t=>t===Rc||t===it,yne=new Set(["x","y","z"]),Ene=Cc.filter(t=>!yne.has(t));function Sne(t){const e=[];return Ene.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e}const ms={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>yT(e,"x"),y:(t,{transform:e})=>yT(e,"y")};ms.translateX=ms.x;ms.translateY=ms.y;const hs=new Set;let ET=!1,ST=!1,xT=!1;function v3(){if(ST){const t=Array.from(hs).filter(n=>n.needsMeasurement),e=new Set(t.map(n=>n.element)),r=new Map;e.forEach(n=>{const a=Sne(n);a.length&&(r.set(n,a),n.render())}),t.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();const a=r.get(n);a&&a.forEach(([s,l])=>{n.getValue(s)?.set(l)})}),t.forEach(n=>n.measureEndState()),t.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}ST=!1,ET=!1,hs.forEach(t=>t.complete(xT)),hs.clear()}function b3(){hs.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ST=!0)})}function xne(){xT=!0,b3(),v3(),xT=!1}class dC{constructor(e,r,n,a,s,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=r,this.name=n,this.motionValue=a,this.element=s,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(hs.add(this),ET||(ET=!0,ar.read(b3),ar.resolveKeyframes(v3))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:r,element:n,motionValue:a}=this;if(e[0]===null){const s=a?.get(),l=e[e.length-1];if(s!==void 0)e[0]=s;else if(n&&r){const c=n.readValue(r,l);c!=null&&(e[0]=c)}e[0]===void 0&&(e[0]=l),a&&s===void 0&&a.set(e[0])}mne(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),hs.delete(this)}cancel(){this.state==="scheduled"&&(hs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const wne=t=>t.startsWith("--");function _ne(t,e,r){wne(e)?t.style.setProperty(e,r):t.style[e]=r}const Tne=QR(()=>window.ScrollTimeline!==void 0),Rne={};function Cne(t,e){const r=QR(t);return()=>Rne[e]??r()}const y3=Cne(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Iu=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,ED={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Iu([0,.65,.55,1]),circOut:Iu([.55,0,1,.45]),backIn:Iu([.31,.01,.66,-.59]),backOut:Iu([.33,1.53,.69,.99])};function E3(t,e){if(t)return typeof t=="function"?y3()?m3(t,e):"ease-out":a3(t)?Iu(t):Array.isArray(t)?t.map(r=>E3(r,e)||ED.easeOut):ED[t]}function Ane(t,e,r,{delay:n=0,duration:a=300,repeat:s=0,repeatType:l="loop",ease:c="easeOut",times:d}={},f=void 0){const m={[e]:r};d&&(m.offset=d);const h=E3(c,a);Array.isArray(h)&&(m.easing=h);const v={delay:n,duration:a,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"};return f&&(v.pseudoElement=f),t.animate(m,v)}function S3(t){return typeof t=="function"&&"applyToOptions"in t}function Nne({type:t,...e}){return S3(t)&&y3()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class kne extends cC{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:r,name:n,keyframes:a,pseudoElement:s,allowFlatten:l=!1,finalKeyframe:c,onComplete:d}=e;this.isPseudoElement=!!s,this.allowFlatten=l,this.options=e,XR(typeof e.type!="string");const f=Nne(e);this.animation=Ane(r,n,a,f,s),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const m=lC(a,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(m):_ne(r,n,m),this.animation.cancel()}d?.(),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:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ra(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ra(e)}get time(){return ra(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=za(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Tne()?(this.animation.timeline=e,oa):r(this)}}const x3={anticipate:e3,backInOut:J4,circInOut:r3};function Ine(t){return t in x3}function One(t){typeof t.ease=="string"&&Ine(t.ease)&&(t.ease=x3[t.ease])}const SD=10;class Dne extends kne{constructor(e){One(e),g3(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:r,onUpdate:n,onComplete:a,element:s,...l}=this.options;if(!r)return;if(e!==void 0){r.set(e);return}const c=new uC({...l,autoplay:!1}),d=za(this.finishedTime??this.time);r.setWithVelocity(c.sample(d-SD).value,c.sample(d).value,SD),c.stop()}}const xD=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ni.test(t)||t==="0")&&!t.startsWith("url("));function Lne(t){const e=t[0];if(t.length===1)return!0;for(let r=0;r<t.length;r++)if(t[r]!==e)return!0}function Mne(t,e,r,n){const a=t[0];if(a===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],l=xD(a,e),c=xD(s,e);return!l||!c?!1:Lne(t)||(r==="spring"||S3(r))&&n}function wT(t){t.duration=0,t.type="keyframes"}const Pne=new Set(["opacity","clipPath","filter","transform"]),jne=QR(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Une(t){const{motionValue:e,name:r,repeatDelay:n,repeatType:a,damping:s,type:l}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:f}=e.owner.getProps();return jne()&&r&&Pne.has(r)&&(r!=="transform"||!f)&&!d&&!n&&a!=="mirror"&&s!==0&&l!=="inertia"}const Fne=40;class zne extends cC{constructor({autoplay:e=!0,delay:r=0,type:n="keyframes",repeat:a=0,repeatDelay:s=0,repeatType:l="loop",keyframes:c,name:d,motionValue:f,element:m,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=wn.now();const v={autoplay:e,delay:r,type:n,repeat:a,repeatDelay:s,repeatType:l,name:d,motionValue:f,element:m,...h},y=m?.KeyframeResolver||dC;this.keyframeResolver=new y(c,(w,S,R)=>this.onKeyframesResolved(w,S,v,!R),d,f,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,r,n,a){this.keyframeResolver=void 0;const{name:s,type:l,velocity:c,delay:d,isHandoff:f,onUpdate:m}=n;this.resolvedAt=wn.now(),Mne(e,s,l,c)||((Po.instantAnimations||!d)&&m?.(lC(e,n,r)),e[0]=e[e.length-1],wT(n),n.repeat=0);const v={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>Fne?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:e},y=!f&&Une(v)?new Dne({...v,element:v.motionValue.owner.current}):new uC(v);y.finished.then(()=>this.notifyFinished()).catch(oa),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(e,r){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),xne()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const $ne=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bne(t){const e=$ne.exec(t);if(!e)return[,];const[,r,n,a]=e;return[`--${r??n}`,a]}function w3(t,e,r=1){const[n,a]=Bne(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);if(s){const l=s.trim();return V4(l)?parseFloat(l):l}return nC(a)?w3(a,e,r+1):a}function fC(t,e){return t?.[e]??t?.default??t}const _3=new Set(["width","height","top","left","right","bottom",...Cc]),qne={test:t=>t==="auto",parse:t=>t},T3=t=>e=>e.test(t),R3=[Rc,it,$a,mi,Lre,Dre,qne],wD=t=>R3.find(T3(t));function Hne(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||W4(t):!0}const Vne=new Set(["brightness","contrast","saturate","opacity"]);function Gne(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(aC)||[];if(!n)return t;const a=r.replace(n,"");let s=Vne.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+a+")"}const Wne=/\b([a-z-]*)\(.*?\)/gu,_T={...Ni,getAnimatableNone:t=>{const e=t.match(Wne);return e?e.map(Gne).join(" "):t}},_D={...Rc,transform:Math.round},Yne={rotate:mi,rotateX:mi,rotateY:mi,rotateZ:mi,scale:Sp,scaleX:Sp,scaleY:Sp,scaleZ:Sp,skew:mi,skewX:mi,skewY:mi,distance:it,translateX:it,translateY:it,translateZ:it,x:it,y:it,z:it,perspective:it,transformPerspective:it,opacity:fd,originX:dD,originY:dD,originZ:it},pC={borderWidth:it,borderTopWidth:it,borderRightWidth:it,borderBottomWidth:it,borderLeftWidth:it,borderRadius:it,radius:it,borderTopLeftRadius:it,borderTopRightRadius:it,borderBottomRightRadius:it,borderBottomLeftRadius:it,width:it,maxWidth:it,height:it,maxHeight:it,top:it,right:it,bottom:it,left:it,padding:it,paddingTop:it,paddingRight:it,paddingBottom:it,paddingLeft:it,margin:it,marginTop:it,marginRight:it,marginBottom:it,marginLeft:it,backgroundPositionX:it,backgroundPositionY:it,...Yne,zIndex:_D,fillOpacity:fd,strokeOpacity:fd,numOctaves:_D},Kne={...pC,color:Cr,backgroundColor:Cr,outlineColor:Cr,fill:Cr,stroke:Cr,borderColor:Cr,borderTopColor:Cr,borderRightColor:Cr,borderBottomColor:Cr,borderLeftColor:Cr,filter:_T,WebkitFilter:_T},C3=t=>Kne[t];function A3(t,e){let r=C3(t);return r!==_T&&(r=Ni),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const Zne=new Set(["auto","none","0"]);function Xne(t,e,r){let n=0,a;for(;n<t.length&&!a;){const s=t[n];typeof s=="string"&&!Zne.has(s)&&pd(s).values.length&&(a=t[n]),n++}if(a&&r)for(const s of e)t[s]=A3(r,a)}class Qne extends dC{constructor(e,r,n,a,s){super(e,r,n,a,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let d=0;d<e.length;d++){let f=e[d];if(typeof f=="string"&&(f=f.trim(),nC(f))){const m=w3(f,r.current);m!==void 0&&(e[d]=m),d===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!_3.has(n)||e.length!==2)return;const[a,s]=e,l=wD(a),c=wD(s);if(l!==c)if(yD(l)&&yD(c))for(let d=0;d<e.length;d++){const f=e[d];typeof f=="string"&&(e[d]=parseFloat(f))}else ms[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:r}=this,n=[];for(let a=0;a<e.length;a++)(e[a]===null||Hne(e[a]))&&n.push(a);n.length&&Xne(e,n,r)}measureInitialState(){const{element:e,unresolvedKeyframes:r,name:n}=this;if(!e||!e.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ms[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r[0]=this.measuredOrigin;const a=r[r.length-1];a!==void 0&&e.getValue(n,a).jump(a,!1)}measureEndState(){const{element:e,name:r,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const a=e.getValue(r);a&&a.jump(this.measuredOrigin,!1);const s=n.length-1,l=n[s];n[s]=ms[r](e.measureViewportBox(),window.getComputedStyle(e.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,d])=>{e.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function N3(t,e,r){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const a=document.querySelectorAll(t);return a?Array.from(a):[]}return Array.from(t)}const k3=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function I3(t){return G4(t)&&"offsetHeight"in t}const TD=30,Jne=t=>!isNaN(parseFloat(t));class eae{constructor(e,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const a=wn.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=r.owner}setCurrent(e){this.current=e,this.updatedAt=wn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Jne(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new JR);const n=this.events[e].add(r);return e==="change"?()=>{n(),ar.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,r=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=wn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>TD)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,TD);return Y4(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r),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 sc(t,e){return new eae(t,e)}const{schedule:mC}=o3(queueMicrotask,!1),ba={x:!1,y:!1};function O3(){return ba.x||ba.y}function tae(t){return t==="x"||t==="y"?ba[t]?null:(ba[t]=!0,()=>{ba[t]=!1}):ba.x||ba.y?null:(ba.x=ba.y=!0,()=>{ba.x=ba.y=!1})}function D3(t,e){const r=N3(t),n=new AbortController,a={passive:!0,...e,signal:n.signal};return[r,a,()=>n.abort()]}function RD(t){return!(t.pointerType==="touch"||O3())}function rae(t,e,r={}){const[n,a,s]=D3(t,r),l=c=>{if(!RD(c))return;const{target:d}=c,f=e(d,c);if(typeof f!="function"||!d)return;const m=h=>{RD(h)&&(f(h),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,a)};return n.forEach(c=>{c.addEventListener("pointerenter",l,a)}),s}const L3=(t,e)=>e?t===e?!0:L3(t,e.parentElement):!1,hC=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,nae=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function aae(t){return nae.has(t.tagName)||t.tabIndex!==-1}const Hp=new WeakSet;function CD(t){return e=>{e.key==="Enter"&&t(e)}}function uy(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const oae=(t,e)=>{const r=t.currentTarget;if(!r)return;const n=CD(()=>{if(Hp.has(r))return;uy(r,"down");const a=CD(()=>{uy(r,"up")}),s=()=>uy(r,"cancel");r.addEventListener("keyup",a,e),r.addEventListener("blur",s,e)});r.addEventListener("keydown",n,e),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),e)};function AD(t){return hC(t)&&!O3()}function iae(t,e,r={}){const[n,a,s]=D3(t,r),l=c=>{const d=c.currentTarget;if(!AD(c))return;Hp.add(d);const f=e(d,c),m=(y,w)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",v),Hp.has(d)&&Hp.delete(d),AD(y)&&typeof f=="function"&&f(y,{success:w})},h=y=>{m(y,d===window||d===document||r.useGlobalTarget||L3(d,y.target))},v=y=>{m(y,!1)};window.addEventListener("pointerup",h,a),window.addEventListener("pointercancel",v,a)};return n.forEach(c=>{(r.useGlobalTarget?window:c).addEventListener("pointerdown",l,a),I3(c)&&(c.addEventListener("focus",f=>oae(f,a)),!aae(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),s}function M3(t){return G4(t)&&"ownerSVGElement"in t}function sae(t){return M3(t)&&t.tagName==="svg"}const rn=t=>!!(t&&t.getVelocity),lae=[...R3,Cr,Ni],cae=t=>lae.find(T3(t)),gC=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ND(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function uae(...t){return e=>{let r=!1;const n=t.map(a=>{const s=ND(a,e);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a<n.length;a++){const s=n[a];typeof s=="function"?s():ND(t[a],null)}}}}function dae(...t){return b.useCallback(uae(...t),t)}class fae extends b.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=r.offsetParent,a=I3(n)&&n.offsetWidth||0,s=this.props.sizeRef.current;s.height=r.offsetHeight||0,s.width=r.offsetWidth||0,s.top=r.offsetTop,s.left=r.offsetLeft,s.right=a-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function pae({children:t,isPresent:e,anchorX:r,root:n}){const a=b.useId(),s=b.useRef(null),l=b.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=b.useContext(gC),d=dae(s,t?.ref);return b.useInsertionEffect(()=>{const{width:f,height:m,top:h,left:v,right:y}=l.current;if(e||!s.current||!f||!m)return;const w=r==="left"?`left: ${v}`:`right: ${y}`;s.current.dataset.motionPopId=a;const S=document.createElement("style");c&&(S.nonce=c);const R=n??document.head;return R.appendChild(S),S.sheet&&S.sheet.insertRule(`
|
|
70
70
|
[data-motion-pop-id="${a}"] {
|
|
71
71
|
position: absolute !important;
|
|
72
72
|
width: ${f}px !important;
|
|
@@ -1542,7 +1542,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1542
1542
|
<\/script>
|
|
1543
1543
|
</body>
|
|
1544
1544
|
</html>`,p5=1,Lz=2,m5=3,Mz=4,h5=5,Pz=Symbol.for("quilt.threads.serialize"),Bge=Symbol.for("quilt.threads.transferable");class qge extends AbortController{constructor(...e){super();const r=e.find(n=>n.aborted);if(r)this.abort(r.reason);else{const n=s=>this.abort(s.target.reason),a={signal:this.signal};for(const s of e)s.addEventListener("abort",n,a)}}}class jz extends Error{constructor(){super("You attempted to call a function on a closed thread.")}}let Hge="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";function g5(t=21){let e="",r=crypto.getRandomValues(new Uint8Array(t));for(let n=0;n<t;n++)e+=Hge[63&r[n]];return e}var Ou,Tl,Du,Zp,FT,v5;class Vge{constructor(){ya(this,FT),ya(this,Ou,new Map),ya(this,Tl,new Map),ya(this,Du,new Map),ya(this,Zp,new WeakMap)}get(e){return nr(this,Tl).get(e)}release(e){const r=nr(this,Tl).get(e);return r&&(nr(this,Tl).delete(e),nr(this,Ou).delete(r)),!!r}serialize(e){let r=nr(this,Ou).get(e);return r==null&&(r=g5(),nr(this,Ou).set(e,r),nr(this,Tl).set(r,e)),r}deserialize(e,r){var n,a;let s=(n=nr(this,Du).get(e))==null?void 0:n.deref();return s||(s=(...l)=>{if(!nr(this,Du).has(e))throw new Error("You attempted to call a function that was already revoked.");return r.call((c,d,f)=>{r.messages.send([m5,c,e,d],f)},l)},(a=Zr(this,FT,v5).call(this,r))==null||a.register(s,e),nr(this,Du).set(e,new WeakRef(s)),s)}}Ou=new WeakMap,Tl=new WeakMap,Du=new WeakMap,Zp=new WeakMap,FT=new WeakSet,v5=function(t){let e=nr(this,Zp).get(t);if(!(typeof FinalizationRegistry>"u"))return e||(e=new FinalizationRegistry(r=>{t.messages.send([h5,r])}),nr(this,Zp).set(t,e)),e};function Gge(t){return t!=null&&(Symbol.asyncIterator in t||Symbol.iterator in t)&&typeof t.next=="function"}function Uz(t){if(t==null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e==null||e===Object.prototype}const c_="_@f",Fz="_@i";var Qu,Ju,ta,Xp,hi;class Wge{constructor(e){ya(this,ta),ya(this,Qu),ya(this,Ju),jT(this,Qu,e?.serialize),jT(this,Ju,e?.deserialize)}serialize(e,r,n){return Zr(this,ta,Xp).call(this,e,r,n)}deserialize(e,r){return Zr(this,ta,hi).call(this,e,r)}}Qu=new WeakMap,Ju=new WeakMap,ta=new WeakSet,Xp=function(t,e,r,n=new Map,a=!1){if(t==null)return t;if(n.has(t))return n.get(t);if(n.set(t,void 0),typeof t=="object"){if(nr(this,Qu)&&!a){const c=nr(this,Qu).call(this,t,d=>Zr(this,ta,Xp).call(this,d,e,r,n,!0),e,r);if(c!==void 0)return n.set(t,c),c}if(t[Bge])return r?.push(t),n.set(t,t),t;const s=c=>Zr(this,ta,Xp).call(this,c,e,r,n);if(typeof t[Pz]=="function"){const c=t[Pz]({serialize:s});return n.set(t,c),c}if(Array.isArray(t)){const c=t.map(d=>s(d));return n.set(t,c),c}if(t instanceof Map){const c=[...t.entries()].map(([f,m])=>[s(f),s(m)]),d=new Map(c);return n.set(t,d),d}if(t instanceof Set){const c=[...t].map(f=>s(f)),d=new Set(c);return n.set(t,d),d}const l=Gge(t);if(Uz(t)||l){const c={};for(const d of Object.keys(t))c[d]=s(t[d]);return l&&(c.next??(c.next=s(t.next.bind(t))),c.return??(c.return=s(t.return.bind(t))),c.throw??(c.throw=s(t.throw.bind(t))),c[Fz]=!0),n.set(t,c),c}}if(typeof t=="function"){const s=e.functions.serialize(t,e,r),l={[c_]:s};return n.set(t,l),l}return n.set(t,t),t},hi=function(t,e,r=!1){if(t==null)return t;if(typeof t=="object"){if(nr(this,Ju)&&!r){const a=nr(this,Ju).call(this,t,s=>Zr(this,ta,hi).call(this,s,e,!0),e);if(a!==void 0)return a}if(t==null)return t;if(Array.isArray(t))return t.map(a=>Zr(this,ta,hi).call(this,a,e));if(t instanceof Map)return new Map([...t].map(([a,s])=>[Zr(this,ta,hi).call(this,a,e),Zr(this,ta,hi).call(this,s,e)]));if(t instanceof Set)return new Set([...t].map(a=>Zr(this,ta,hi).call(this,a,e)));if(c_ in t)return e.functions.deserialize(t[c_],e);if(!Uz(t))return t;const n={};for(const a of Object.keys(t))a===Fz?n[Symbol.asyncIterator]=()=>n:n[a]=Zr(this,ta,hi).call(this,t[a],e);return n}return t};var Rl,fs,gi,zT,b5,$T,y5;class Yge{constructor(e,{imports:r,exports:n,functions:a=new Vge,serialization:s=new Wge,signal:l}={}){ya(this,gi),ya(this,Rl),ya(this,fs,new Map);var c,d,f,m;this.messages=e,jT(this,Rl,l?new qge(l):new AbortController),this.exports=n??{},this.imports=Kge(Zr(this,gi,b5).bind(this),r),this.functions=a,this.serialization=s,(d=(c=this.functions).start)==null||d.call(c,this),(m=(f=this.serialization).start)==null||m.call(f,this),this.signal.addEventListener("abort",()=>{for(const h of nr(this,fs).keys())Zr(this,gi,$T).call(this,h,void 0,new jz);nr(this,fs).clear()},{once:!0}),e.listen(async h=>{if(!(Array.isArray(h)&&typeof h[0]=="number"))return;const v=h;switch(v[0]){case p5:{const[,y,w,S]=v,R=this.exports[w]??(()=>{throw new Error(`No '${w}' method is exported from this thread`)});await Zr(this,gi,zT).call(this,R,S,(x,_,C)=>{this.messages.send([Lz,y,x,_],C)});break}case m5:{const[,y,w,S]=v,R=this.functions.get(w,this)??Zge;await Zr(this,gi,zT).call(this,R,S,(x,_,C)=>{this.messages.send([Mz,y,x,_],C)});break}case Lz:case Mz:{Zr(this,gi,$T).call(this,...v.slice(1));break}case h5:{const y=v[1];this.functions.release(y,this);break}}},{signal:this.signal})}get signal(){return nr(this,Rl).signal}get closed(){return nr(this,Rl).signal.aborted}close(){nr(this,Rl).abort()}call(e,r){if(this.closed)return Promise.reject(new jz);const n=[],a=this.serialization.serialize(r,this,n),s=g5(),l=Zr(this,gi,y5).call(this,s);return e(s,a,n),l}}Rl=new WeakMap,fs=new WeakMap,gi=new WeakSet,zT=async function(t,e,r){try{const n=this.functions.call?await this.functions.call(t,e,this):await t(...this.serialization.deserialize(e,this)),a=[],s=this.serialization.serialize(n,this,a);r(s,void 0,a)}catch(n){r(void 0,this.serialization.serialize(n,this))}},b5=function(t){return(...e)=>{try{if(typeof t!="string"&&typeof t!="number")throw new Error(`Can’t call a symbol method on a thread: ${t.toString()}`);return this.call((r,n,a)=>{this.messages.send([p5,r,t,n],a)},e)}catch(r){return Promise.reject(r)}}},$T=function(...t){const e=t[0],r=nr(this,fs).get(e);r&&(r(...t),nr(this,fs).delete(e))},y5=function(t){const e=new Promise((r,n)=>{nr(this,fs).set(t,(a,s,l)=>{l==null?r(this.serialization.deserialize(s,this)):n(this.serialization.deserialize(l,this))})});return Object.defineProperty(e,Symbol.asyncIterator,{async*value(){const r=await e;Object.defineProperty(r,Symbol.asyncIterator,{value:()=>r}),yield*r}}),e};function Kge(t,e){let r;if(e==null){if(typeof Proxy!="function")throw new Error("You must pass an array of callable methods in environments without Proxies.");const n=new Map;r=new Proxy({},{get(a,s){if(n.has(s))return n.get(s);const l=t(s);return n.set(s,l),l}})}else{r={};for(const n of e)Object.defineProperty(r,n,{value:t(n),writable:!1,configurable:!0,enumerable:!0})}return r}function Zge(){throw new Error("You attempted to call a function that is not stored. It may have already been released.")}const Xge="quilt.threads.ping",zz="quilt.threads.pong";function Qge(t,{targetOrigin:e="*"}={}){let r=!1;const n=function(s,l){t.postMessage(s,e,l)},a=new Promise(s=>{const l=new AbortController;globalThis.window.addEventListener("message",c=>{c.source===t&&c.data===zz&&(r=!0,l.abort(),s())},{signal:l.signal}),l.signal.addEventListener("abort",()=>s(),{once:!0}),n(Xge)});return{send(s,l){return r?n(s,l):a.then(()=>{if(r)return n(s,l)})},listen(s,{signal:l}){self.addEventListener("message",c=>{c.source===t&&c.data!==zz&&s(c.data)},{signal:l})}}}class Jge extends Yge{constructor(e,{targetOrigin:r="*",...n}={}){super(Qge(e.contentWindow,{targetOrigin:r}),n),this.iframe=e}}const E5=le.forwardRef(({content:t,children:e,...r},n)=>g.jsx("span",{ref:n,...r,children:t||e}));E5.displayName="UIText";const S5=le.forwardRef(({label:t,onPress:e,onClick:r,children:n,...a},s)=>g.jsx("button",{ref:s,onClick:l=>{e&&e(),r&&r(l)},style:{padding:"8px 16px",backgroundColor:"#007bff",color:"white",border:"none",borderRadius:"4px",cursor:"pointer"},...a,children:t||n}));S5.displayName="UIButton";const x5=le.forwardRef(({direction:t="vertical",spacing:e="8",align:r="stretch",justify:n="flex-start",children:a,...s},l)=>g.jsx("div",{ref:l,style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",gap:`${e}px`,alignItems:r,justifyContent:n},...s,children:a}));x5.displayName="UIStack";const w5=le.forwardRef(({src:t,alt:e,width:r,height:n,children:a,...s},l)=>g.jsx("img",{ref:l,src:t,alt:e,width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},...s}));w5.displayName="UIImage";const HC={name:"basic",elements:[{tagName:"ui-text",component:E5,propMapping:{content:"content"},eventMapping:{}},{tagName:"ui-button",component:S5,propMapping:{label:"label"},eventMapping:{press:"onPress"}},{tagName:"ui-stack",component:x5,propMapping:{direction:"direction",spacing:"spacing",align:"align",justify:"justify"},eventMapping:{}},{tagName:"ui-image",component:w5,propMapping:{src:"src",alt:"alt",width:"width",height:"height"},eventMapping:{}}]},eve=({receiver:t})=>{const e=b.useRef(null);return b.useEffect(()=>{if(e.current)return t.connect(e.current),()=>{t.disconnect()}},[t]),g.jsx("div",{ref:e,"data-testid":"standard-dom-renderer-container"})},tve=({resource:t,library:e,remoteElements:r=[],onUIAction:n})=>{const a=b.useRef(null),s=b.useRef(null),[l,c]=b.useState(null),d=b.useMemo(()=>(t.mimeType||"").includes("framework=react")?"react":"webcomponents",[t.mimeType]),f=`${e?.name}-${d}`,{receiver:m,components:h}=b.useMemo(()=>{switch(d){case"react":{const y=new Oge,w=e||HC,S=new Map;return w&&w.elements.forEach(R=>{const x=Uge(R.component);S.set(R.tagName,x)}),{receiver:y,components:S}}case"webcomponents":default:return{receiver:new Dge,components:null}}},[t,e,r]);b.useEffect(()=>{function y(w){var S;if(a.current&&w.source===a.current.contentWindow){const R=w.data;if(!R)return;(S=n?.(R))==null||S.catch(x=>{console.error("Error handling UI action result in RemoteDOMResourceRenderer:",x)})}}return window.addEventListener("message",y),()=>window.removeEventListener("message",y)},[n]),b.useEffect(()=>{const y=s.current;return s.current=null,()=>{y?.close()}},[f]);const v=()=>{const y=a.current;if(!y||s.current)return;const w=new Jge(y);s.current=w;const{code:S,error:R}=wge(t);if(R){c(R);return}if(S&&m!=null&&m.connection){const x={code:S,remoteElements:r,useReactRenderer:d==="react",componentLibrary:e?.name};w.imports.render(x,m.connection).catch(_=>console.error("Error calling remote render:",_))}};return l?g.jsx("p",{className:"text-red-500",children:l}):g.jsxs(g.Fragment,{children:[g.jsx("iframe",{ref:a,srcDoc:$ge,sandbox:"allow-scripts",style:{display:"none"},title:"Remote DOM Sandbox",onLoad:v},f),d==="react"&&h?g.jsx(zge,{receiver:m,components:h}):g.jsx(eve,{receiver:m})]})};function rve(t){var e;if(t.contentType)return t.contentType;if(t.mimeType==="text/html")return"rawHtml";if(t.mimeType==="text/uri-list")return"externalUrl";if((e=t.mimeType)!=null&&e.startsWith("application/vnd.mcp-ui.remote-dom"))return"remoteDom"}const VC=t=>{const{resource:e,onUIAction:r,supportedContentTypes:n,htmlProps:a,remoteDomProps:s}=t,l=rve(e);if(n&&l&&!n.includes(l))return g.jsxs("p",{className:"text-red-500",children:["Unsupported content type: ",l,"."]});switch(l){case"rawHtml":case"externalUrl":return g.jsx(s5,{resource:e,onUIAction:r,...a});case"remoteDom":return g.jsx(tve,{resource:e,onUIAction:r,library:s?.library||HC,...s});default:return g.jsx("p",{className:"text-red-500",children:"Unsupported resource type."})}};VC.displayName="UIResourceRenderer";const nve={tagName:"ui-button",remoteAttributes:["label"],remoteEvents:["click","press"]},ave={tagName:"ui-text",remoteAttributes:["content"]},ove={tagName:"ui-stack",remoteAttributes:["direction","spacing","align","justify"]},ive={tagName:"ui-image",remoteAttributes:["src","alt","width","height"]},sve=b.memo(({resource:t})=>{const e=async r=>(r.type==="tool"||r.type==="prompt"||(r.type==="link"?r.payload.url&&window.open(r.payload.url,"_blank"):r.type==="intent"||r.type),{status:"Action received"});return t.uri?.startsWith("ui://")?g.jsx("div",{className:"my-4 p-0 border h-[350px] rounded-2xl border-zinc-200 overflow-hidden bg-card",children:g.jsx(VC,{resource:t,onUIAction:e,htmlProps:{style:{maxWidth:"100%",height:"100%",overflow:"auto"},autoResizeIframe:!0,sandboxPermissions:"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"}})}):null});function $z({toolName:t,toolArgs:e,result:r,serverId:n,readResource:a}){const[s,l]=b.useState(null),c=b.useMemo(()=>{if(typeof r=="string")try{return JSON.parse(r)}catch(h){return console.error("[ToolResultRenderer] Failed to parse result:",h),r}return r},[r]),d=b.useMemo(()=>!!(c?.content&&Array.isArray(c.content)&&c.content.some(h=>h.type==="resource"&&h.resource?.uri?.startsWith("ui://")&&h.resource?.mimeType==="text/html+skybridge")),[c]),f=b.useMemo(()=>d&&c.content.find(v=>v.type==="resource"&&v.resource?.uri?.startsWith("ui://")&&v.resource?.mimeType==="text/html+skybridge")?.resource||null,[d,c]);if(b.useEffect(()=>{(()=>{f&&l(f)})()},[f]),d&&s&&n&&a)return g.jsx(FC,{componentUrl:s.uri,toolName:t,toolArgs:e,toolResult:c,serverId:n,readResource:a,noWrapper:!0,className:"my-4"});if(d&&!s)return g.jsx("div",{className:"my-4 p-4 bg-blue-50/30 dark:bg-blue-950/20 border border-blue-200/50 dark:border-blue-800/50 rounded-lg",children:g.jsx("p",{className:"text-sm text-blue-600 dark:text-blue-400",children:"Loading component..."})});const m=[];if(c?.content&&Array.isArray(c.content))for(const h of c.content)h.type==="resource"&&h.resource?.uri?.startsWith("ui://")&&h.resource?.mimeType!=="text/html+skybridge"&&m.push(h.resource);return m.length>0?g.jsx(g.Fragment,{children:m.map(h=>g.jsx(sve,{resource:h},`${t}-mcp-ui-${h.uri}`))}):null}function lve({content:t,timestamp:e}){return!t||t.length===0?null:g.jsx("div",{className:"flex items-start gap-3 justify-end group/user-message",children:g.jsxs("div",{className:"flex-1 min-w-0 flex flex-col items-end",children:[g.jsx("div",{className:"bg-zinc-200 dark:bg-zinc-800 text-primary rounded-3xl px-4 py-2 max-w-[80%] break-words",children:g.jsx("p",{className:"text-base leading-7 font-sans text-start break-words",children:t})}),e&&g.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:new Date(e).toLocaleTimeString()})]})})}const cve=b.memo(({messages:t,isLoading:e,serverId:r,readResource:n})=>{const a=b.useRef(null);b.useEffect(()=>{t.length>0&&a.current&&a.current.scrollIntoView({behavior:e?"auto":"smooth",block:"start"})},[t.length,e]);const s=e&&(()=>{if(t.length===0)return!0;const c=t[t.length-1];if(c.role==="user")return!0;if(c.role==="assistant"){const d=typeof c.content=="string"?c.content:Array.isArray(c.content)?c.content.map(m=>typeof m=="string"?m:m.text||JSON.stringify(m)).join(""):JSON.stringify(c.content);return!(d&&d.trim().length>0)}return!1})(),l=c=>{if(!e)return!1;const d=t[t.length-1];return c.id===d.id&&d.role==="assistant"};return g.jsxs("div",{className:"space-y-6 max-w-3xl mx-auto px-2",children:[t.map(c=>{const d=typeof c.content=="string"?c.content:Array.isArray(c.content)?c.content.map(f=>typeof f=="string"?f:f.text||JSON.stringify(f)).join(""):JSON.stringify(c.content);return c.role==="user"?g.jsx(lve,{content:d,timestamp:c.timestamp},c.id):c.role==="assistant"?g.jsx("div",{className:"space-y-4",children:c.parts&&c.parts.length>0?c.parts.map((f,m)=>{const h=f.type==="text"?`${c.id}-text-${m}-${f.text?.slice(0,20)}`:`${c.id}-tool-${f.toolInvocation?.toolName}-${m}`;return f.type==="text"?g.jsx(Tz,{content:f.text||"",timestamp:m===c.parts.length-1?c.timestamp:void 0,_isStreaming:l(c)},h):f.type==="tool-invocation"&&f.toolInvocation?g.jsxs("div",{children:[g.jsx(Rz,{toolName:f.toolInvocation.toolName,args:f.toolInvocation.args,result:f.toolInvocation.result,state:f.toolInvocation.result?"result":"call"}),f.toolInvocation.result&&g.jsx($z,{toolName:f.toolInvocation.toolName,toolArgs:f.toolInvocation.args,result:f.toolInvocation.result,serverId:r,readResource:n})]},h):null}):g.jsxs(g.Fragment,{children:[g.jsx(Tz,{content:d,timestamp:c.timestamp,_isStreaming:l(c)}),c.toolCalls&&c.toolCalls.length>0&&g.jsx("div",{className:"space-y-2",children:c.toolCalls.map(f=>{const m=`${c.id}-${f.toolName}-${JSON.stringify(f.args).slice(0,50)}`;return g.jsxs("div",{children:[g.jsx(Rz,{toolName:f.toolName,args:f.args,result:f.result,state:f.result?"result":"call"}),f.result&&g.jsx($z,{toolName:f.toolName,toolArgs:f.args,result:f.result,serverId:r,readResource:n})]},m)})})]})},c.id):null}),s&&g.jsx("div",{className:"flex items-start gap-3",children:g.jsx("div",{className:"flex-1",children:g.jsx("div",{className:"rounded-lg p-4 max-w-fit",children:g.jsx("div",{className:"flex items-center gap-2",children:g.jsx("span",{className:"text-sm",children:g.jsx(cse,{duration:2,spread:1,children:"Thinking..."})})})})})}),g.jsx("div",{ref:a})]})});function _5(t){let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);e=(e<<5)-e+n,e=e&e}return Math.abs(e).toString(16)}function uve({mcpServerUrl:t,llmConfig:e,authConfig:r,isConnected:n}){const[a,s]=b.useState([]),[l,c]=b.useState(!1),d=b.useCallback(async m=>{if(!m.trim()||!e||!n)return;const h={id:`user-${Date.now()}`,role:"user",content:m.trim(),timestamp:Date.now()};s(v=>[...v,h]),c(!0);try{let v=r;if(r?.type==="oauth")try{const N="mcp:auth",k=_5(t),A=`${N}_${k}_tokens`,I=localStorage.getItem(A);if(I){const O=JSON.parse(I);v={...r,oauthTokens:O}}else console.warn("No OAuth tokens found in localStorage for key:",A)}catch(N){console.warn("Failed to retrieve OAuth tokens:",N)}const y=await fetch("/inspector/api/chat/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mcpServerUrl:t,llmConfig:e,authConfig:v,messages:[...a,h].map(N=>({role:N.role,content:N.content}))})});if(!y.ok)throw new Error(`HTTP error! status: ${y.status}`);const w=`assistant-${Date.now()}`;let S="";const R=[];s(N=>[...N,{id:w,role:"assistant",content:"",timestamp:Date.now(),parts:[]}]);const x=y.body?.getReader(),_=new TextDecoder;if(!x)throw new Error("No response body");let C="";for(;;){const{done:N,value:k}=await x.read();if(N)break;C+=_.decode(k,{stream:!0});const A=C.split(`
|
|
1545
|
-
`);C=A.pop()||"";for(const I of A)if(I.trim()&&I.startsWith("data: "))try{const O=JSON.parse(I.slice(6));if(console.log("[Client received event]",O.type,O.toolName||O.content?.slice?.(0,30)),O.type==="message")console.log("[Message started]",O.id);else if(O.type==="text"){S+=O.content;const L=R[R.length-1];L&&L.type==="text"?L.text=S:R.push({type:"text",text:S}),console.log("[Parts after text]",R.length,"parts, text length:",S.length),s(M=>M.map(P=>P.id===w?{...P,parts:[...R]}:P))}else if(O.type==="tool-call")S&&(S=""),R.push({type:"tool-invocation",toolInvocation:{toolName:O.toolName,args:O.args,state:"pending"}}),console.log("[Parts after tool-call]",R.length,"parts, tool:",O.toolName),s(L=>L.map(M=>M.id===w?{...M,parts:[...R]}:M));else if(O.type==="tool-result"){const L=R.find(M=>M.type==="tool-invocation"&&M.toolInvocation?.toolName===O.toolName&&!M.toolInvocation?.result);L&&L.toolInvocation?(L.toolInvocation.result=O.result,L.toolInvocation.state="result",console.log("[Parts after tool-result]",R.length,"parts, updated:",O.toolName),s(M=>M.map(P=>P.id===w?{...P,parts:[...R]}:P))):console.warn("[tool-result] Could not find matching tool part for",O.toolName)}else if(O.type==="done")console.log("[Done] Final parts:",R.length),s(L=>L.map(M=>M.id===w?{...M,parts:[...R],content:""}:M));else if(O.type==="error")throw new Error(O.message||"Streaming error")}catch(O){console.error("Failed to parse streaming event:",O,I)}}}catch(v){let y="Unknown error occurred";if(v instanceof Error){y=v.message;const S=v;S.status&&(y=`HTTP ${S.status}: ${y}`),(S.code===401||y.includes("401")||y.includes("Unauthorized"))&&(y="Authentication failed (401). Check your Authorization header in the connection settings.")}const w={id:`error-${Date.now()}`,role:"assistant",content:`Error: ${y}`,timestamp:Date.now()};s(S=>[...S,w])}finally{c(!1)}},[e,n,t,a,r]),f=b.useCallback(()=>{s([])},[]);return{messages:a,isLoading:l,sendMessage:d,clearMessages:f}}function dve({connection:t,llmConfig:e,isConnected:r,readResource:n}){const[a,s]=b.useState([]),[l,c]=b.useState(!1),d=b.useRef(null),f=b.useRef(null),m=b.useRef(null),h=b.useCallback(async y=>{if(!y.trim()||!e||!r)return;const w={id:`user-${Date.now()}`,role:"user",content:y.trim(),timestamp:Date.now()};s(x=>[...x,w]),c(!0),d.current=new AbortController;const S=Date.now();let R=0;try{const x=`assistant-${Date.now()}`;let _="";const C=[];if(s(N=>[...N,{id:x,role:"assistant",content:"",timestamp:Date.now(),parts:[]}]),!m.current||m.current.provider!==e.provider||m.current.model!==e.model||m.current.apiKey!==e.apiKey){let N;if(e.provider==="openai"){const{ChatOpenAI:k}=await cs(async()=>{const{ChatOpenAI:A}=await import("./index-BjPwEjLC.js");return{ChatOpenAI:A}},__vite__mapDeps([4,5,6,2,7]));N=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else if(e.provider==="anthropic"){const{ChatAnthropic:k}=await cs(async()=>{const{ChatAnthropic:A}=await import("./index-CIUfLMnd.js");return{ChatAnthropic:A}},__vite__mapDeps([8,5,6,2]));N=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else if(e.provider==="google"){const{ChatGoogleGenerativeAI:k}=await cs(async()=>{const{ChatGoogleGenerativeAI:A}=await import("./index-DXiA7HPi.js");return{ChatGoogleGenerativeAI:A}},__vite__mapDeps([9,5,6,2,7]));N=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else throw new Error(`Unsupported LLM provider: ${e.provider}`);m.current={instance:N,provider:e.provider,model:e.model,apiKey:e.apiKey}}if(!f.current||f.current.llm!==m.current.instance){const{MCPAgent:N}=await cs(async()=>{const{MCPAgent:k}=await import("./langfuse-C4HKZ3NL-DQkY3G-y.js").then(A=>A.c);return{MCPAgent:k}},__vite__mapDeps([10,6,2,1,3]));f.current=new N({llm:m.current.instance,client:t.client,memoryEnabled:!0,systemPrompt:"You are a helpful assistant with access to MCP tools, prompts, and resources. Help users interact with the MCP server."}),await f.current.initialize()}else console.log("[useChatMessagesClientSide] Reusing existing agent. History length:",f.current.conversationHistory?.length);for await(const N of f.current.streamEvents(y,10,!1,void 0)){if(d.current?.signal.aborted)break;if(N.event==="on_chat_model_stream"&&N.data?.chunk?.text){const k=N.data.chunk.text;if(typeof k=="string"&&k.length>0){_+=k;const A=C[C.length-1];A&&A.type==="text"?A.text=_:C.push({type:"text",text:_}),s(I=>I.map(O=>O.id===x?{...O,parts:[...C]}:O))}}else if(N.event==="on_tool_start"){_&&(_="");let k={};N.data?.input?k=N.data.input:N.data?.tool_input?k=N.data.tool_input:N.data&&(k=N.data),console.log("[useChatMessagesClientSide] on_tool_start:",{toolName:N.name,eventData:N.data,extractedArgs:k}),R++,C.push({type:"tool-invocation",toolInvocation:{toolName:N.name||"unknown",args:k,state:"pending"}}),s(A=>A.map(I=>I.id===x?{...I,parts:[...C]}:I))}else if(N.event==="on_tool_end"){const k=C.find(A=>A.type==="tool-invocation"&&A.toolInvocation?.toolName===N.name&&!A.toolInvocation?.result);if(console.log("[useChatMessagesClientSide] on_tool_end event:",{toolName:N.name,hasToolPart:!!k,output:N.data?.output}),k&&k.toolInvocation){let A=N.data?.output;if(A?.kwargs?.content&&typeof A.kwargs.content=="string")try{A=JSON.parse(A.kwargs.content)}catch(O){console.warn("[useChatMessagesClientSide] Failed to parse kwargs.content:",O),A=A.kwargs.content}else if(A?.content&&typeof A.content=="string")try{A=JSON.parse(A.content)}catch{A=A.content}k.toolInvocation.result=A,k.toolInvocation.state="result";const I=A?._meta?.["openai/outputTemplate"];if(console.log("[useChatMessagesClientSide] Tool result:",{toolName:N.name,hasMeta:!!A?._meta,hasStructuredContent:!!A?.structuredContent,appsSdkUri:I}),I&&typeof I=="string"&&n){console.log("[useChatMessagesClientSide] Detected Apps SDK component, fetching resource:",I);try{const O=await n(I);console.log("[useChatMessagesClientSide] Resource fetched:",O);const L=A?.structuredContent||null;if(O?.contents&&Array.isArray(O.contents)){const M=O.contents.map(Y=>({type:"resource",resource:Y}));console.log("[useChatMessagesClientSide] Created MCP resources:",M);const P={...A,content:[...A.content||[],...M],structuredContent:L};k.toolInvocation.result=P,console.log("[useChatMessagesClientSide] Updated result with resources")}else console.warn("[useChatMessagesClientSide] No contents in resourceData:",O)}catch(O){console.error("Failed to fetch Apps SDK resource:",O)}}s(O=>O.map(L=>L.id===x?{...L,parts:[...C]}:L))}}}s(N=>N.map(k=>k.id===x?{...k,parts:[...C],content:""}:k)),e&&zr.getInstance().capture(new zO({serverId:t.url,provider:e.provider,model:e.model,messageCount:a.length+1,toolCallsCount:R,success:!0,executionMode:"client-side",duration:Date.now()-S})).catch(()=>{})}catch(x){console.error("Client-side agent error:",x);let _="Unknown error occurred";if(x instanceof Error){_=x.message;const N=x;N.status&&(_=`HTTP ${N.status}: ${_}`),(N.code===401||_.includes("401")||_.includes("Unauthorized"))&&(_="Authentication failed (401). Check your Authorization header in the connection settings.")}e&&zr.getInstance().capture(new zO({serverId:t.url,provider:e.provider,model:e.model,messageCount:a.length+1,toolCallsCount:R,success:!1,executionMode:"client-side",duration:Date.now()-S,error:_})).catch(()=>{});const C={id:`error-${Date.now()}`,role:"assistant",content:`Error: ${_}`,timestamp:Date.now()};s(N=>[...N,C])}finally{c(!1),d.current=null}},[t,e,r,a,n]),v=b.useCallback(()=>{s([]),f.current&&f.current.clearConversationHistory()},[]);return{messages:a,isLoading:l,sendMessage:h,clearMessages:v}}const Bz={openai:"gpt-4o",anthropic:"claude-haiku-4-5-20251001",google:"gemini-2.5-flash"};function fve({mcpServerUrl:t}){const[e,r]=b.useState(null),[n,a]=b.useState(null),[s,l]=b.useState(!1),[c,d]=b.useState("openai"),[f,m]=b.useState(""),[h,v]=b.useState(Bz.openai),[y,w]=b.useState("none"),[S,R]=b.useState(""),[x,_]=b.useState(""),[C,N]=b.useState("");b.useEffect(()=>{const I=localStorage.getItem("mcp-inspector-llm-config");if(I)try{const O=JSON.parse(I);r(O),d(O.provider),m(O.apiKey),v(O.model)}catch(O){console.error("Failed to load LLM config:",O)}},[]),b.useEffect(()=>{const I=localStorage.getItem("mcp-inspector-auth-config");if(I)try{const O=JSON.parse(I);a(O),w(O.type),O.username&&R(O.username),O.password&&_(O.password),O.token&&N(O.token)}catch(O){console.error("Failed to load auth config:",O)}else try{const O="mcp:auth",L=_5(t),M=`${O}_${L}_tokens`;localStorage.getItem(M)&&(a({type:"oauth"}),w("oauth"))}catch(O){console.error("Failed to check for OAuth tokens:",O)}},[t]),b.useEffect(()=>{v(Bz[c])},[c]);const k=b.useCallback(()=>{if(!f.trim())return;const I={provider:c,apiKey:f,model:h},O={type:y,...y==="basic"&&{username:S.trim(),password:x.trim()},...y==="bearer"&&{token:C.trim()}};r(I),a(O),localStorage.setItem("mcp-inspector-llm-config",JSON.stringify(I)),localStorage.setItem("mcp-inspector-auth-config",JSON.stringify(O)),l(!1)},[c,f,h,y,S,x,C]),A=b.useCallback(()=>{r(null),a(null),m(""),R(""),_(""),N(""),w("none"),localStorage.removeItem("mcp-inspector-llm-config"),localStorage.removeItem("mcp-inspector-auth-config")},[]);return{llmConfig:e,authConfig:n,configDialogOpen:s,setConfigDialogOpen:l,tempProvider:c,setTempProvider:d,tempApiKey:f,setTempApiKey:m,tempModel:h,setTempModel:v,tempAuthType:y,saveLLMConfig:k,clearConfig:A}}function pve({connection:t,isConnected:e,useClientSide:r=!0,readResource:n}){const[a,s]=b.useState(""),l=b.useRef(null),{llmConfig:c,authConfig:d,configDialogOpen:f,setConfigDialogOpen:m,tempProvider:h,setTempProvider:v,tempApiKey:y,setTempApiKey:w,tempModel:S,setTempModel:R,saveLLMConfig:x,clearConfig:_}=fve({mcpServerUrl:t.url}),C={connection:t,llmConfig:c,isConnected:e,readResource:n},N=uve({mcpServerUrl:t.url,llmConfig:c,authConfig:d,isConnected:e}),k=dve(C),{messages:A,isLoading:I,sendMessage:O,clearMessages:L}=r?k:N;M4({onNewChat:L}),b.useEffect(()=>{c&&A.length===0&&l.current&&l.current.focus()},[c,A.length]),b.useEffect(()=>{!I&&A.length>0&&l.current&&l.current.focus()},[I,A.length]);const M=b.useCallback(()=>{a.trim()&&(O(a),s(""))},[a,O]),P=b.useCallback(Q=>{Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),M())},[M]),Y=b.useCallback(()=>{_(),L()},[_,L]);return c&&A.length===0?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"absolute top-4 right-4 z-10",children:g.jsx(Tq,{open:f,onOpenChange:m,tempProvider:h,tempModel:S,tempApiKey:y,onProviderChange:v,onModelChange:R,onApiKeyChange:w,onSave:x,onClear:Y,showClearButton:!0,buttonLabel:"Change API Key"})}),g.jsx(sse,{mcpServerUrl:t.url,inputValue:a,isConnected:e,isLoading:I,textareaRef:l,llmConfig:c,onInputChange:s,onKeyDown:P,onSubmit:Q=>{Q.preventDefault(),M()},onConfigDialogOpenChange:m})]}):g.jsxs("div",{className:"flex flex-col h-full relative",children:[g.jsx(ase,{llmConfig:c,hasMessages:A.length>0,configDialogOpen:f,onConfigDialogOpenChange:m,onClearChat:L,tempProvider:h,tempModel:S,tempApiKey:y,onProviderChange:v,onModelChange:R,onApiKeyChange:w,onSaveConfig:x,onClearConfig:Y}),g.jsx("div",{className:"flex-1 overflow-y-auto p-4 pt-[100px]",children:c?g.jsx(cve,{messages:A,isLoading:I,serverId:t.url,readResource:n}):g.jsx(lse,{onConfigureClick:()=>m(!0)})}),c&&g.jsx(ose,{inputValue:a,isConnected:e,isLoading:I,textareaRef:l,onInputChange:s,onKeyDown:P,onSendMessage:M})]})}const xh=b.createContext(null);xh.displayName="PanelGroupContext";const gr={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},GC=10,gs=b.useLayoutEffect,qz=$m.useId,mve=typeof qz=="function"?qz:()=>null;let hve=0;function WC(t=null){const e=mve(),r=b.useRef(t||e||null);return r.current===null&&(r.current=""+hve++),t??r.current}function T5({children:t,className:e="",collapsedSize:r,collapsible:n,defaultSize:a,forwardedRef:s,id:l,maxSize:c,minSize:d,onCollapse:f,onExpand:m,onResize:h,order:v,style:y,tagName:w="div",...S}){const R=b.useContext(xh);if(R===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:_,getPanelSize:C,getPanelStyle:N,groupId:k,isPanelCollapsed:A,reevaluatePanelConstraints:I,registerPanel:O,resizePanel:L,unregisterPanel:M}=R,P=WC(l),Y=b.useRef({callbacks:{onCollapse:f,onExpand:m,onResize:h},constraints:{collapsedSize:r,collapsible:n,defaultSize:a,maxSize:c,minSize:d},id:P,idIsFromProps:l!==void 0,order:v});b.useRef({didLogMissingDefaultSizeWarning:!1}),gs(()=>{const{callbacks:J,constraints:ee}=Y.current,U={...ee};Y.current.id=P,Y.current.idIsFromProps=l!==void 0,Y.current.order=v,J.onCollapse=f,J.onExpand=m,J.onResize=h,ee.collapsedSize=r,ee.collapsible=n,ee.defaultSize=a,ee.maxSize=c,ee.minSize=d,(U.collapsedSize!==ee.collapsedSize||U.collapsible!==ee.collapsible||U.maxSize!==ee.maxSize||U.minSize!==ee.minSize)&&I(Y.current,U)}),gs(()=>{const J=Y.current;return O(J),()=>{M(J)}},[v,P,O,M]),b.useImperativeHandle(s,()=>({collapse:()=>{x(Y.current)},expand:J=>{_(Y.current,J)},getId(){return P},getSize(){return C(Y.current)},isCollapsed(){return A(Y.current)},isExpanded(){return!A(Y.current)},resize:J=>{L(Y.current,J)}}),[x,_,C,A,P,L]);const Q=N(Y.current,a);return b.createElement(w,{...S,children:t,className:e,id:P,style:{...Q,...y},[gr.groupId]:k,[gr.panel]:"",[gr.panelCollapsible]:n||void 0,[gr.panelId]:P,[gr.panelSize]:parseFloat(""+Q.flexGrow).toFixed(1)})}const R5=b.forwardRef((t,e)=>b.createElement(T5,{...t,forwardedRef:e}));T5.displayName="Panel";R5.displayName="forwardRef(Panel)";let BT=null,Qp=-1,yi=null;function gve(t,e,r){const n=(e&I5)!==0,a=(e&O5)!==0,s=(e&D5)!==0,l=(e&L5)!==0;if(e){if(n)return s?"se-resize":l?"ne-resize":"e-resize";if(a)return s?"sw-resize":l?"nw-resize":"w-resize";if(s)return"s-resize";if(l)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function vve(){yi!==null&&(document.head.removeChild(yi),BT=null,yi=null,Qp=-1)}function u_(t,e,r){var n,a;const s=gve(t,e);if(BT!==s){if(BT=s,yi===null&&(yi=document.createElement("style"),document.head.appendChild(yi)),Qp>=0){var l;(l=yi.sheet)===null||l===void 0||l.removeRule(Qp)}Qp=(n=(a=yi.sheet)===null||a===void 0?void 0:a.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function C5(t){return t.type==="keydown"}function A5(t){return t.type.startsWith("pointer")}function N5(t){return t.type.startsWith("mouse")}function wh(t){if(A5(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(N5(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function bve(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function yve(t,e,r){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Eve(t,e){if(t===e)throw new Error("Cannot compare node with itself");const r={a:Gz(t),b:Gz(e)};let n;for(;r.a.at(-1)===r.b.at(-1);)t=r.a.pop(),e=r.b.pop(),n=t;gt(n,"Stacking order can only be calculated for elements with a common ancestor");const a={a:Vz(Hz(r.a)),b:Vz(Hz(r.b))};if(a.a===a.b){const s=n.childNodes,l={a:r.a.at(-1),b:r.b.at(-1)};let c=s.length;for(;c--;){const d=s[c];if(d===l.a)return 1;if(d===l.b)return-1}}return Math.sign(a.a-a.b)}const Sve=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function xve(t){var e;const r=getComputedStyle((e=k5(t))!==null&&e!==void 0?e:t).display;return r==="flex"||r==="inline-flex"}function wve(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||xve(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Sve.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Hz(t){let e=t.length;for(;e--;){const r=t[e];if(gt(r,"Missing node"),wve(r))return r}return null}function Vz(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Gz(t){const e=[];for(;t;)e.push(t),t=k5(t);return e}function k5(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const I5=1,O5=2,D5=4,L5=8,_ve=bve()==="coarse";let Ea=[],Bl=!1,Ei=new Map,_h=new Map;const yd=new Set;function Tve(t,e,r,n,a){var s;const{ownerDocument:l}=e,c={direction:r,element:e,hitAreaMargins:n,setResizeHandlerState:a},d=(s=Ei.get(l))!==null&&s!==void 0?s:0;return Ei.set(l,d+1),yd.add(c),Om(),function(){var m;_h.delete(t),yd.delete(c);const h=(m=Ei.get(l))!==null&&m!==void 0?m:1;if(Ei.set(l,h-1),Om(),h===1&&Ei.delete(l),Ea.includes(c)){const v=Ea.indexOf(c);v>=0&&Ea.splice(v,1),Th(),a("up",!0,null)}}}function Rve(t){const{target:e}=t,{x:r,y:n}=wh(t);Bl=!0,YC({target:e,x:r,y:n}),Om(),Ea.length>0&&(Dm("down",t),Th(),t.preventDefault(),M5(e)||t.stopImmediatePropagation())}function d_(t){const{x:e,y:r}=wh(t);if(Bl&&t.type!=="pointerleave"&&t.buttons===0&&(Bl=!1,Dm("up",t)),!Bl){const{target:n}=t;YC({target:n,x:e,y:r})}Dm("move",t),Th(),Ea.length>0&&t.preventDefault()}function f_(t){const{target:e}=t,{x:r,y:n}=wh(t);_h.clear(),Bl=!1,Ea.length>0&&(t.preventDefault(),M5(e)||t.stopImmediatePropagation()),Dm("up",t),YC({target:e,x:r,y:n}),Th(),Om()}function M5(t){let e=t;for(;e;){if(e.hasAttribute(gr.resizeHandle))return!0;e=e.parentElement}return!1}function YC({target:t,x:e,y:r}){Ea.splice(0);let n=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(n=t),yd.forEach(a=>{const{element:s,hitAreaMargins:l}=a,c=s.getBoundingClientRect(),{bottom:d,left:f,right:m,top:h}=c,v=_ve?l.coarse:l.fine;if(e>=f-v&&e<=m+v&&r>=h-v&&r<=d+v){if(n!==null&&document.contains(n)&&s!==n&&!s.contains(n)&&!n.contains(s)&&Eve(n,s)>0){let w=n,S=!1;for(;w&&!w.contains(s);){if(yve(w.getBoundingClientRect(),c)){S=!0;break}w=w.parentElement}if(S)return}Ea.push(a)}})}function p_(t,e){_h.set(t,e)}function Th(){let t=!1,e=!1;Ea.forEach(n=>{const{direction:a}=n;a==="horizontal"?t=!0:e=!0});let r=0;_h.forEach(n=>{r|=n}),t&&e?u_("intersection",r):t?u_("horizontal",r):e?u_("vertical",r):vve()}let m_;function Om(){var t;(t=m_)===null||t===void 0||t.abort(),m_=new AbortController;const e={capture:!0,signal:m_.signal};yd.size&&(Bl?(Ea.length>0&&Ei.forEach((r,n)=>{const{body:a}=n;r>0&&(a.addEventListener("contextmenu",f_,e),a.addEventListener("pointerleave",d_,e),a.addEventListener("pointermove",d_,e))}),Ei.forEach((r,n)=>{const{body:a}=n;a.addEventListener("pointerup",f_,e),a.addEventListener("pointercancel",f_,e)})):Ei.forEach((r,n)=>{const{body:a}=n;r>0&&(a.addEventListener("pointerdown",Rve,e),a.addEventListener("pointermove",d_,e))}))}function Dm(t,e){yd.forEach(r=>{const{setResizeHandlerState:n}=r,a=Ea.includes(r);n(t,a,e)})}function Cve(){const[t,e]=b.useState(0);return b.useCallback(()=>e(r=>r+1),[])}function gt(t,e){if(!t)throw console.error(e),Error(e)}function As(t,e,r=GC){return t.toFixed(r)===e.toFixed(r)?0:t>e?1:-1}function _o(t,e,r=GC){return As(t,e,r)===0}function jn(t,e,r){return As(t,e,r)===0}function Ave(t,e,r){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++){const a=t[n],s=e[n];if(!jn(a,s,r))return!1}return!0}function Pl({panelConstraints:t,panelIndex:e,size:r}){const n=t[e];gt(n!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:a=0,collapsible:s,maxSize:l=100,minSize:c=0}=n;if(As(r,c)<0)if(s){const d=(a+c)/2;As(r,d)<0?r=a:r=c}else r=c;return r=Math.min(l,r),r=parseFloat(r.toFixed(GC)),r}function Lu({delta:t,initialLayout:e,panelConstraints:r,pivotIndices:n,prevLayout:a,trigger:s}){if(jn(t,0))return e;const l=[...e],[c,d]=n;gt(c!=null,"Invalid first pivot index"),gt(d!=null,"Invalid second pivot index");let f=0;if(s==="keyboard"){{const h=t<0?d:c,v=r[h];gt(v,`Panel constraints not found for index ${h}`);const{collapsedSize:y=0,collapsible:w,minSize:S=0}=v;if(w){const R=e[h];if(gt(R!=null,`Previous layout not found for panel index ${h}`),jn(R,y)){const x=S-R;As(x,Math.abs(t))>0&&(t=t<0?0-x:x)}}}{const h=t<0?c:d,v=r[h];gt(v,`No panel constraints found for index ${h}`);const{collapsedSize:y=0,collapsible:w,minSize:S=0}=v;if(w){const R=e[h];if(gt(R!=null,`Previous layout not found for panel index ${h}`),jn(R,S)){const x=R-y;As(x,Math.abs(t))>0&&(t=t<0?0-x:x)}}}}{const h=t<0?1:-1;let v=t<0?d:c,y=0;for(;;){const S=e[v];gt(S!=null,`Previous layout not found for panel index ${v}`);const x=Pl({panelConstraints:r,panelIndex:v,size:100})-S;if(y+=x,v+=h,v<0||v>=r.length)break}const w=Math.min(Math.abs(t),Math.abs(y));t=t<0?0-w:w}{let v=t<0?c:d;for(;v>=0&&v<r.length;){const y=Math.abs(t)-Math.abs(f),w=e[v];gt(w!=null,`Previous layout not found for panel index ${v}`);const S=w-y,R=Pl({panelConstraints:r,panelIndex:v,size:S});if(!jn(w,R)&&(f+=w-R,l[v]=R,f.toFixed(3).localeCompare(Math.abs(t).toFixed(3),void 0,{numeric:!0})>=0))break;t<0?v--:v++}}if(Ave(a,l))return a;{const h=t<0?d:c,v=e[h];gt(v!=null,`Previous layout not found for panel index ${h}`);const y=v+f,w=Pl({panelConstraints:r,panelIndex:h,size:y});if(l[h]=w,!jn(w,y)){let S=y-w,x=t<0?d:c;for(;x>=0&&x<r.length;){const _=l[x];gt(_!=null,`Previous layout not found for panel index ${x}`);const C=_+S,N=Pl({panelConstraints:r,panelIndex:x,size:C});if(jn(_,N)||(S-=N-_,l[x]=N),jn(S,0))break;t>0?x--:x++}}}const m=l.reduce((h,v)=>v+h,0);return jn(m,100)?l:a}function Nve({layout:t,panelsArray:e,pivotIndices:r}){let n=0,a=100,s=0,l=0;const c=r[0];gt(c!=null,"No pivot index found"),e.forEach((h,v)=>{const{constraints:y}=h,{maxSize:w=100,minSize:S=0}=y;v===c?(n=S,a=w):(s+=S,l+=w)});const d=Math.min(a,100-s),f=Math.max(n,100-l),m=t[c];return{valueMax:d,valueMin:f,valueNow:m}}function Ed(t,e=document){return Array.from(e.querySelectorAll(`[${gr.resizeHandleId}][data-panel-group-id="${t}"]`))}function P5(t,e,r=document){const a=Ed(t,r).findIndex(s=>s.getAttribute(gr.resizeHandleId)===e);return a??null}function j5(t,e,r){const n=P5(t,e,r);return n!=null?[n,n+1]:[-1,-1]}function kve(t){return t instanceof HTMLElement?!0:typeof t=="object"&&t!==null&&"tagName"in t&&"getAttribute"in t}function U5(t,e=document){if(kve(e)&&e.dataset.panelGroupId==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Rh(t,e=document){const r=e.querySelector(`[${gr.resizeHandleId}="${t}"]`);return r||null}function Ive(t,e,r,n=document){var a,s,l,c;const d=Rh(e,n),f=Ed(t,n),m=d?f.indexOf(d):-1,h=(a=(s=r[m])===null||s===void 0?void 0:s.id)!==null&&a!==void 0?a:null,v=(l=(c=r[m+1])===null||c===void 0?void 0:c.id)!==null&&l!==void 0?l:null;return[h,v]}function Ove({committedValuesRef:t,eagerValuesRef:e,groupId:r,layout:n,panelDataArray:a,panelGroupElement:s,setLayout:l}){b.useRef({didWarnAboutMissingResizeHandle:!1}),gs(()=>{if(!s)return;const c=Ed(r,s);for(let d=0;d<a.length-1;d++){const{valueMax:f,valueMin:m,valueNow:h}=Nve({layout:n,panelsArray:a,pivotIndices:[d,d+1]}),v=c[d];if(v!=null){const y=a[d];gt(y,`No panel data found for index "${d}"`),v.setAttribute("aria-controls",y.id),v.setAttribute("aria-valuemax",""+Math.round(f)),v.setAttribute("aria-valuemin",""+Math.round(m)),v.setAttribute("aria-valuenow",h!=null?""+Math.round(h):"")}}return()=>{c.forEach((d,f)=>{d.removeAttribute("aria-controls"),d.removeAttribute("aria-valuemax"),d.removeAttribute("aria-valuemin"),d.removeAttribute("aria-valuenow")})}},[r,n,a,s]),b.useEffect(()=>{if(!s)return;const c=e.current;gt(c,"Eager values not found");const{panelDataArray:d}=c,f=U5(r,s);gt(f!=null,`No group found for id "${r}"`);const m=Ed(r,s);gt(m,`No resize handles found for group id "${r}"`);const h=m.map(v=>{const y=v.getAttribute(gr.resizeHandleId);gt(y,"Resize handle element has no handle id attribute");const[w,S]=Ive(r,y,d,s);if(w==null||S==null)return()=>{};const R=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const _=d.findIndex(C=>C.id===w);if(_>=0){const C=d[_];gt(C,`No panel data found for index ${_}`);const N=n[_],{collapsedSize:k=0,collapsible:A,minSize:I=0}=C.constraints;if(N!=null&&A){const O=Lu({delta:jn(N,k)?I-k:k-N,initialLayout:n,panelConstraints:d.map(L=>L.constraints),pivotIndices:j5(r,y,s),prevLayout:n,trigger:"keyboard"});n!==O&&l(O)}}break}}};return v.addEventListener("keydown",R),()=>{v.removeEventListener("keydown",R)}});return()=>{h.forEach(v=>v())}},[s,t,e,r,n,a,l])}function Wz(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function F5(t,e){const r=t==="horizontal",{x:n,y:a}=wh(e);return r?n:a}function Dve(t,e,r,n,a){const s=r==="horizontal",l=Rh(e,a);gt(l,`No resize handle element found for id "${e}"`);const c=l.getAttribute(gr.groupId);gt(c,"Resize handle element has no group id attribute");let{initialCursorPosition:d}=n;const f=F5(r,t),m=U5(c,a);gt(m,`No group element found for id "${c}"`);const h=m.getBoundingClientRect(),v=s?h.width:h.height;return(f-d)/v*100}function Lve(t,e,r,n,a,s){if(C5(t)){const l=r==="horizontal";let c=0;t.shiftKey?c=100:a!=null?c=a:c=10;let d=0;switch(t.key){case"ArrowDown":d=l?0:c;break;case"ArrowLeft":d=l?-c:0;break;case"ArrowRight":d=l?c:0;break;case"ArrowUp":d=l?0:-c;break;case"End":d=100;break;case"Home":d=-100;break}return d}else return n==null?0:Dve(t,e,r,n,s)}function Mve({panelDataArray:t}){const e=Array(t.length),r=t.map(s=>s.constraints);let n=0,a=100;for(let s=0;s<t.length;s++){const l=r[s];gt(l,`Panel constraints not found for index ${s}`);const{defaultSize:c}=l;c!=null&&(n++,e[s]=c,a-=c)}for(let s=0;s<t.length;s++){const l=r[s];gt(l,`Panel constraints not found for index ${s}`);const{defaultSize:c}=l;if(c!=null)continue;const d=t.length-n,f=a/d;n++,e[s]=f,a-=f}return e}function gl(t,e,r){e.forEach((n,a)=>{const s=t[a];gt(s,`Panel data not found for index ${a}`);const{callbacks:l,constraints:c,id:d}=s,{collapsedSize:f=0,collapsible:m}=c,h=r[d];if(h==null||n!==h){r[d]=n;const{onCollapse:v,onExpand:y,onResize:w}=l;w&&w(n,h),m&&(v||y)&&(y&&(h==null||_o(h,f))&&!_o(n,f)&&y(),v&&(h==null||!_o(h,f))&&_o(n,f)&&v())}})}function Np(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!=e[r])return!1;return!0}function Pve({defaultSize:t,dragState:e,layout:r,panelData:n,panelIndex:a,precision:s=3}){const l=r[a];let c;return l==null?c=t!=null?t.toFixed(s):"1":n.length===1?c="1":c=l.toFixed(s),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function jve(t,e=10){let r=null;return(...a)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...a)},e)}}function Yz(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,r)=>{localStorage.setItem(e,r)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function z5(t){return`react-resizable-panels:${t}`}function $5(t){return t.map(e=>{const{constraints:r,id:n,idIsFromProps:a,order:s}=e;return a?n:s?`${s}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((e,r)=>e.localeCompare(r)).join(",")}function B5(t,e){try{const r=z5(t),n=e.getItem(r);if(n){const a=JSON.parse(n);if(typeof a=="object"&&a!=null)return a}}catch{}return null}function Uve(t,e,r){var n,a;const s=(n=B5(t,r))!==null&&n!==void 0?n:{},l=$5(e);return(a=s[l])!==null&&a!==void 0?a:null}function Fve(t,e,r,n,a){var s;const l=z5(t),c=$5(e),d=(s=B5(t,a))!==null&&s!==void 0?s:{};d[c]={expandToSizes:Object.fromEntries(r.entries()),layout:n};try{a.setItem(l,JSON.stringify(d))}catch(f){console.error(f)}}function Kz({layout:t,panelConstraints:e}){const r=[...t],n=r.reduce((s,l)=>s+l,0);if(r.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${r.map(s=>`${s}%`).join(", ")}`);if(!jn(n,100)&&r.length>0)for(let s=0;s<e.length;s++){const l=r[s];gt(l!=null,`No layout data found for index ${s}`);const c=100/n*l;r[s]=c}let a=0;for(let s=0;s<e.length;s++){const l=r[s];gt(l!=null,`No layout data found for index ${s}`);const c=Pl({panelConstraints:e,panelIndex:s,size:l});l!=c&&(a+=l-c,r[s]=c)}if(!jn(a,0))for(let s=0;s<e.length;s++){const l=r[s];gt(l!=null,`No layout data found for index ${s}`);const c=l+a,d=Pl({panelConstraints:e,panelIndex:s,size:c});if(l!==d&&(a-=d-l,r[s]=d,jn(a,0)))break}return r}const zve=100,Mu={getItem:t=>(Yz(Mu),Mu.getItem(t)),setItem:(t,e)=>{Yz(Mu),Mu.setItem(t,e)}},Zz={};function q5({autoSaveId:t=null,children:e,className:r="",direction:n,forwardedRef:a,id:s=null,onLayout:l=null,keyboardResizeBy:c=null,storage:d=Mu,style:f,tagName:m="div",...h}){const v=WC(s),y=b.useRef(null),[w,S]=b.useState(null),[R,x]=b.useState([]),_=Cve(),C=b.useRef({}),N=b.useRef(new Map),k=b.useRef(0),A=b.useRef({autoSaveId:t,direction:n,dragState:w,id:v,keyboardResizeBy:c,onLayout:l,storage:d}),I=b.useRef({layout:R,panelDataArray:[],panelDataArrayChanged:!1});b.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),b.useImperativeHandle(a,()=>({getId:()=>A.current.id,getLayout:()=>{const{layout:$}=I.current;return $},setLayout:$=>{const{onLayout:W}=A.current,{layout:te,panelDataArray:F}=I.current,j=Kz({layout:$,panelConstraints:F.map(Z=>Z.constraints)});Wz(te,j)||(x(j),I.current.layout=j,W&&W(j),gl(F,j,C.current))}}),[]),gs(()=>{A.current.autoSaveId=t,A.current.direction=n,A.current.dragState=w,A.current.id=v,A.current.onLayout=l,A.current.storage=d}),Ove({committedValuesRef:A,eagerValuesRef:I,groupId:v,layout:R,panelDataArray:I.current.panelDataArray,setLayout:x,panelGroupElement:y.current}),b.useEffect(()=>{const{panelDataArray:$}=I.current;if(t){if(R.length===0||R.length!==$.length)return;let W=Zz[t];W==null&&(W=jve(Fve,zve),Zz[t]=W);const te=[...$],F=new Map(N.current);W(t,te,F,R,d)}},[t,R,d]),b.useEffect(()=>{});const O=b.useCallback($=>{const{onLayout:W}=A.current,{layout:te,panelDataArray:F}=I.current;if($.constraints.collapsible){const j=F.map(de=>de.constraints),{collapsedSize:Z=0,panelSize:ne,pivotIndices:V}=os(F,$,te);if(gt(ne!=null,`Panel size not found for panel "${$.id}"`),!_o(ne,Z)){N.current.set($.id,ne);const fe=Cl(F,$)===F.length-1?ne-Z:Z-ne,Re=Lu({delta:fe,initialLayout:te,panelConstraints:j,pivotIndices:V,prevLayout:te,trigger:"imperative-api"});Np(te,Re)||(x(Re),I.current.layout=Re,W&&W(Re),gl(F,Re,C.current))}}},[]),L=b.useCallback(($,W)=>{const{onLayout:te}=A.current,{layout:F,panelDataArray:j}=I.current;if($.constraints.collapsible){const Z=j.map(be=>be.constraints),{collapsedSize:ne=0,panelSize:V=0,minSize:de=0,pivotIndices:fe}=os(j,$,F),Re=W??de;if(_o(V,ne)){const be=N.current.get($.id),xe=be!=null&&be>=Re?be:Re,ze=Cl(j,$)===j.length-1?V-xe:xe-V,Me=Lu({delta:ze,initialLayout:F,panelConstraints:Z,pivotIndices:fe,prevLayout:F,trigger:"imperative-api"});Np(F,Me)||(x(Me),I.current.layout=Me,te&&te(Me),gl(j,Me,C.current))}}},[]),M=b.useCallback($=>{const{layout:W,panelDataArray:te}=I.current,{panelSize:F}=os(te,$,W);return gt(F!=null,`Panel size not found for panel "${$.id}"`),F},[]),P=b.useCallback(($,W)=>{const{panelDataArray:te}=I.current,F=Cl(te,$);return Pve({defaultSize:W,dragState:w,layout:R,panelData:te,panelIndex:F})},[w,R]),Y=b.useCallback($=>{const{layout:W,panelDataArray:te}=I.current,{collapsedSize:F=0,collapsible:j,panelSize:Z}=os(te,$,W);return gt(Z!=null,`Panel size not found for panel "${$.id}"`),j===!0&&_o(Z,F)},[]),Q=b.useCallback($=>{const{layout:W,panelDataArray:te}=I.current,{collapsedSize:F=0,collapsible:j,panelSize:Z}=os(te,$,W);return gt(Z!=null,`Panel size not found for panel "${$.id}"`),!j||As(Z,F)>0},[]),J=b.useCallback($=>{const{panelDataArray:W}=I.current;W.push($),W.sort((te,F)=>{const j=te.order,Z=F.order;return j==null&&Z==null?0:j==null?-1:Z==null?1:j-Z}),I.current.panelDataArrayChanged=!0,_()},[_]);gs(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:$,onLayout:W,storage:te}=A.current,{layout:F,panelDataArray:j}=I.current;let Z=null;if($){const V=Uve($,j,te);V&&(N.current=new Map(Object.entries(V.expandToSizes)),Z=V.layout)}Z==null&&(Z=Mve({panelDataArray:j}));const ne=Kz({layout:Z,panelConstraints:j.map(V=>V.constraints)});Wz(F,ne)||(x(ne),I.current.layout=ne,W&&W(ne),gl(j,ne,C.current))}}),gs(()=>{const $=I.current;return()=>{$.layout=[]}},[]);const ee=b.useCallback($=>{let W=!1;const te=y.current;return te&&window.getComputedStyle(te,null).getPropertyValue("direction")==="rtl"&&(W=!0),function(j){j.preventDefault();const Z=y.current;if(!Z)return()=>null;const{direction:ne,dragState:V,id:de,keyboardResizeBy:fe,onLayout:Re}=A.current,{layout:be,panelDataArray:xe}=I.current,{initialLayout:Ne}=V??{},ze=j5(de,$,Z);let Me=Lve(j,$,ne,V,fe,Z);const $e=ne==="horizontal";$e&&W&&(Me=-Me);const ct=xe.map(Fe=>Fe.constraints),ce=Lu({delta:Me,initialLayout:Ne??be,panelConstraints:ct,pivotIndices:ze,prevLayout:be,trigger:C5(j)?"keyboard":"mouse-or-touch"}),Ce=!Np(be,ce);(A5(j)||N5(j))&&k.current!=Me&&(k.current=Me,!Ce&&Me!==0?$e?p_($,Me<0?I5:O5):p_($,Me<0?D5:L5):p_($,0)),Ce&&(x(ce),I.current.layout=ce,Re&&Re(ce),gl(xe,ce,C.current))}},[]),U=b.useCallback(($,W)=>{const{onLayout:te}=A.current,{layout:F,panelDataArray:j}=I.current,Z=j.map(be=>be.constraints),{panelSize:ne,pivotIndices:V}=os(j,$,F);gt(ne!=null,`Panel size not found for panel "${$.id}"`);const fe=Cl(j,$)===j.length-1?ne-W:W-ne,Re=Lu({delta:fe,initialLayout:F,panelConstraints:Z,pivotIndices:V,prevLayout:F,trigger:"imperative-api"});Np(F,Re)||(x(Re),I.current.layout=Re,te&&te(Re),gl(j,Re,C.current))},[]),G=b.useCallback(($,W)=>{const{layout:te,panelDataArray:F}=I.current,{collapsedSize:j=0,collapsible:Z}=W,{collapsedSize:ne=0,collapsible:V,maxSize:de=100,minSize:fe=0}=$.constraints,{panelSize:Re}=os(F,$,te);Re!=null&&(Z&&V&&_o(Re,j)?_o(j,ne)||U($,ne):Re<fe?U($,fe):Re>de&&U($,de))},[U]),H=b.useCallback(($,W)=>{const{direction:te}=A.current,{layout:F}=I.current;if(!y.current)return;const j=Rh($,y.current);gt(j,`Drag handle element not found for id "${$}"`);const Z=F5(te,W);S({dragHandleId:$,dragHandleRect:j.getBoundingClientRect(),initialCursorPosition:Z,initialLayout:F})},[]),X=b.useCallback(()=>{S(null)},[]),ae=b.useCallback($=>{const{panelDataArray:W}=I.current,te=Cl(W,$);te>=0&&(W.splice(te,1),delete C.current[$.id],I.current.panelDataArrayChanged=!0,_())},[_]),z=b.useMemo(()=>({collapsePanel:O,direction:n,dragState:w,expandPanel:L,getPanelSize:M,getPanelStyle:P,groupId:v,isPanelCollapsed:Y,isPanelExpanded:Q,reevaluatePanelConstraints:G,registerPanel:J,registerResizeHandle:ee,resizePanel:U,startDragging:H,stopDragging:X,unregisterPanel:ae,panelGroupElement:y.current}),[O,w,n,L,M,P,v,Y,Q,G,J,ee,U,H,X,ae]),q={display:"flex",flexDirection:n==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return b.createElement(xh.Provider,{value:z},b.createElement(m,{...h,children:e,className:r,id:s,ref:y,style:{...q,...f},[gr.group]:"",[gr.groupDirection]:n,[gr.groupId]:v}))}const H5=b.forwardRef((t,e)=>b.createElement(q5,{...t,forwardedRef:e}));q5.displayName="PanelGroup";H5.displayName="forwardRef(PanelGroup)";function Cl(t,e){return t.findIndex(r=>r===e||r.id===e.id)}function os(t,e,r){const n=Cl(t,e),s=n===t.length-1?[n-1,n]:[n,n+1],l=r[n];return{...e.constraints,panelSize:l,pivotIndices:s}}function $ve({disabled:t,handleId:e,resizeHandler:r,panelGroupElement:n}){b.useEffect(()=>{if(t||r==null||n==null)return;const a=Rh(e,n);if(a==null)return;const s=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),r(l);break}case"F6":{l.preventDefault();const c=a.getAttribute(gr.groupId);gt(c,`No group element found for id "${c}"`);const d=Ed(c,n),f=P5(c,e,n);gt(f!==null,`No resize element found for id "${e}"`);const m=l.shiftKey?f>0?f-1:d.length-1:f+1<d.length?f+1:0;d[m].focus();break}}};return a.addEventListener("keydown",s),()=>{a.removeEventListener("keydown",s)}},[n,t,e,r])}function V5({children:t=null,className:e="",disabled:r=!1,hitAreaMargins:n,id:a,onBlur:s,onClick:l,onDragging:c,onFocus:d,onPointerDown:f,onPointerUp:m,style:h={},tabIndex:v=0,tagName:y="div",...w}){var S,R;const x=b.useRef(null),_=b.useRef({onClick:l,onDragging:c,onPointerDown:f,onPointerUp:m});b.useEffect(()=>{_.current.onClick=l,_.current.onDragging=c,_.current.onPointerDown=f,_.current.onPointerUp=m});const C=b.useContext(xh);if(C===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:k,registerResizeHandle:A,startDragging:I,stopDragging:O,panelGroupElement:L}=C,M=WC(a),[P,Y]=b.useState("inactive"),[Q,J]=b.useState(!1),[ee,U]=b.useState(null),G=b.useRef({state:P});gs(()=>{G.current.state=P}),b.useEffect(()=>{if(r)U(null);else{const z=A(M);U(()=>z)}},[r,M,A]);const H=(S=n?.coarse)!==null&&S!==void 0?S:15,X=(R=n?.fine)!==null&&R!==void 0?R:5;b.useEffect(()=>{if(r||ee==null)return;const z=x.current;gt(z,"Element ref not attached");let q=!1;return Tve(M,z,N,{coarse:H,fine:X},(W,te,F)=>{if(!te){Y("inactive");return}switch(W){case"down":{Y("drag"),q=!1,gt(F,'Expected event to be defined for "down" action'),I(M,F);const{onDragging:j,onPointerDown:Z}=_.current;j?.(!0),Z?.();break}case"move":{const{state:j}=G.current;q=!0,j!=="drag"&&Y("hover"),gt(F,'Expected event to be defined for "move" action'),ee(F);break}case"up":{Y("hover"),O();const{onClick:j,onDragging:Z,onPointerUp:ne}=_.current;Z?.(!1),ne?.(),q||j?.();break}}})},[H,N,r,X,A,M,ee,I,O]),$ve({disabled:r,handleId:M,resizeHandler:ee,panelGroupElement:L});const ae={touchAction:"none",userSelect:"none"};return b.createElement(y,{...w,children:t,className:e,id:a,onBlur:()=>{J(!1),s?.()},onFocus:()=>{J(!0),d?.()},ref:x,role:"separator",style:{...ae,...h},tabIndex:v,[gr.groupDirection]:N,[gr.groupId]:k,[gr.resizeHandle]:"",[gr.resizeHandleActive]:P==="drag"?"pointer":Q?"keyboard":void 0,[gr.resizeHandleEnabled]:!r,[gr.resizeHandleId]:M,[gr.resizeHandleState]:P})}V5.displayName="PanelResizeHandle";function Sd({className:t,...e}){return g.jsx(H5,{"data-slot":"resizable-panel-group",className:De("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e})}function ja({...t}){return g.jsx(R5,{"data-slot":"resizable-panel",...t})}function xd({withHandle:t,className:e,...r}){return g.jsx(V5,{"data-slot":"resizable-handle",className:De("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",e),...r,children:t&&g.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:g.jsx(VQ,{className:"size-2.5"})})})}function Gd({id:t,isSelected:e,isFocused:r,icon:n,title:a,description:s,metadata:l,onClick:c,className:d}){return g.jsx("button",{id:t,type:"button",onClick:c,className:De("w-full text-left cursor-pointer p-4 border-b dark:border-zinc-700 hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors group",e&&"bg-zinc-50 dark:bg-zinc-800 border-l-4 border-l-zinc-500",r&&"ring-2 ring-zinc-500 dark:ring-zinc-400 ring-inset",d),children:g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx("div",{className:"flex-shrink-0 mt-1",children:g.jsx("div",{className:De("p-2.5 rounded-full transition-colors",e?"bg-zinc-500 dark:bg-zinc-100/80 text-zinc-100 dark:text-zinc-900":"bg-gray-100 dark:bg-zinc-700 text-gray-600 dark:text-gray-400 group-hover:bg-gray-200 dark:group-hover:bg-zinc-600"),children:n})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"flex items-center gap-2 mb-1",children:g.jsx("h3",{className:De("font-medium truncate font-mono text-sm"),children:a})}),s&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 line-clamp-2",children:s})]})]})})}function G5({className:t,...e}){return g.jsx("kbd",{"data-slot":"kbd",className:De("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",t),...e})}function W5({activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabTitle:n,secondaryTabTitle:a,primaryCount:s,secondaryCount:l,secondaryIcon:c,primaryIcon:d,searchPlaceholder:f="Search...",onSearchExpand:m,onSearchChange:h,onSearchBlur:v,onTabSwitch:y,searchInputRef:w,primaryTabName:S}){const R=t===S;return g.jsxs("div",{className:"flex items-center justify-between p-4 py-3 border-r dark:border-zinc-700",children:[g.jsx("div",{className:"flex items-center gap-2 flex-1",children:e?g.jsx(Or,{ref:w,placeholder:f,value:r,onChange:x=>h(x.target.value),onBlur:v,className:"h-8 border-gray-300 dark:border-zinc-600"}):g.jsxs(g.Fragment,{children:[g.jsx("h2",{className:"text-lg font-medium text-gray-900 dark:text-gray-100",children:R?n:a}),R&&g.jsxs(g.Fragment,{children:[g.jsx(Va,{className:"bg-zinc-500/20 text-zinc-600 dark:text-zinc-400 border-transparent",variant:"outline",children:s}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"ghost",size:"sm",onClick:m,className:"h-8 w-8 p-0",children:g.jsx(LR,{className:"h-4 w-4"})})}),g.jsxs(Fr,{side:"bottom",className:"flex gap-2",children:["Search",g.jsx(G5,{children:"F"})]})]})]})]})}),g.jsxs(tt,{variant:"ghost",size:"sm",onClick:y,className:"gap-2",children:[R?g.jsx(c,{}):g.jsx(d,{}),g.jsx("span",{children:R?a:n}),R&&l>0&&g.jsx(Va,{className:"bg-purple-500/20 text-purple-600 dark:text-purple-400 border-transparent",variant:"outline",children:l})]})]})}function Bve({prompts:t,selectedPrompt:e,onPromptSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(cd,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No prompts available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>g.jsx(Gd,{id:`prompt-${a.name}`,isSelected:e?.name===a.name,isFocused:n===s,icon:g.jsx(cd,{className:"h-4 w-4"}),title:a.name,description:a.description,metadata:a.arguments&&a.arguments.length>0&&g.jsxs(Va,{variant:"outline",className:"text-xs border-gray-300 dark:border-zinc-600 text-gray-600 dark:text-gray-400",children:[a.arguments.length," args"]}),onClick:()=>r(a)},a.name))})}function qve({activeTab:t,isSearchExpanded:e,searchQuery:r,filteredPromptsCount:n,savedPromptsCount:a,onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f}){return g.jsx(W5,{activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabName:"prompts",secondaryTabName:"saved",primaryTabTitle:"Prompts",secondaryTabTitle:"History",primaryCount:n,secondaryCount:a,primaryIcon:cd,secondaryIcon:ic,searchPlaceholder:"Search prompts...",onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f})}function Hve({savedPrompts:t,selectedPrompt:e,onLoadPrompt:r,onDeletePrompt:n,focusedIndex:a}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(ic,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No history"}),g.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500 mt-1",children:"Prompts you execute will appear here"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((s,l)=>g.jsx(Gd,{id:`saved-prompt-${s.id}`,isSelected:e?.id===s.id,isFocused:a===l,icon:g.jsx(ic,{className:"h-4 w-4"}),title:s.name,description:`${s.promptName} - ${new Date(s.savedAt).toLocaleString()}`,onClick:()=>r(s)},s.id))})}function Vve({selectedPrompt:t,promptArgs:e,onArgChange:r}){const n=t?.arguments||[];if(!(n.length>0))return g.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",children:"No arguments required"});const s=l=>{const c=l.name,d=e[c],f=typeof d=="string"?d:JSON.stringify(d);return l.type==="boolean"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("input",{id:c,type:"checkbox",checked:!!d,onChange:m=>r(c,m.target.checked),className:"rounded","aria-label":`Toggle ${c}`}),g.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:l.description})]})]},c):l.type==="number"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:c,type:"number",value:Number(d)||0,onChange:m=>r(c,Number(m.target.value)),placeholder:l.description||`Enter ${c}`}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c):l.type==="array"||l.type==="object"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(mh,{id:c,value:f,onChange:m=>{try{const h=JSON.parse(m.target.value);r(c,h)}catch{r(c,m.target.value)}},placeholder:l.description||`Enter ${c} as JSON`,className:"font-mono text-sm min-h-[100px]"}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c):g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:c,value:f,onChange:m=>r(c,m.target.value),placeholder:l.description||`Enter ${c}`}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c)};return g.jsx("div",{className:"space-y-4",children:n.map(l=>s(l))})}function Gve({selectedPrompt:t,promptArgs:e,isExecuting:r,isConnected:n,onArgChange:a,onExecute:s,onSave:l}){return t?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"flex-shrink-0 p-6 pt-3 pb-4 pr-3",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-0",children:[g.jsx("h3",{className:"text-lg font-semibold mb-2",children:t.name}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(tt,{onClick:s,disabled:r||!n,children:r?g.jsxs(g.Fragment,{children:[g.jsx(Lo,{className:"mr-2"}),"Executing..."]}):g.jsxs(g.Fragment,{children:[g.jsx(NB,{className:"h-4 w-4 mr-2"}),"Execute"]})}),g.jsxs(tt,{variant:"outline",onClick:l,disabled:r,className:"gap-2",children:[g.jsx(DR,{className:"h-4 w-4"}),"Save"]})]})]}),t.description&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 leading-relaxed",children:t.description})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 pb-4 pr-3",children:g.jsx(Vve,{selectedPrompt:t,promptArgs:e,onArgChange:a})})]}):g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a prompt to get started"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a prompt from the list to view its details and execute it"})]})}function Wve({results:t,copiedResult:e,onCopy:r}){return g.jsx("div",{className:"flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",children:g.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.length>0?g.jsx("div",{className:"space-y-4 flex-1 h-full",children:t.map((n,a)=>g.jsxs("div",{className:"space-y-0 flex-1 h-full flex flex-col",children:[g.jsxs("div",{className:"flex items-center gap-2 px-4 pt-2 border-b border-gray-200 dark:border-zinc-600 pb-2",children:[g.jsx("h3",{className:"text-sm font-medium",children:"Response"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ic,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(n.timestamp).toLocaleTimeString()})]}),n.duration!==void 0&&g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ud,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[n.duration,"ms"]})]}),g.jsx("div",{className:"flex gap-2 ml-auto",children:g.jsx(tt,{variant:"ghost",size:"sm",onClick:()=>r(a,n.result),className:"h-6 px-2",children:e===a?g.jsx(Do,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})})})]}),n.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:n.error})]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:n.result,filename:`prompt-result-${n.promptName}-${Date.now()}.json`})})]},a))}):g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"text-center",children:g.jsx(yR,{vertical:!0,noBorder:!0,message:"No Results yet"})})})})})}const Xz="mcp-inspector-saved-prompts";function Y5({ref:t,prompts:e,callPrompt:r,serverId:n,isConnected:a}){const[s,l]=b.useState(null),[c,d]=b.useState(null),{selectedPromptName:f,setSelectedPromptName:m}=Fd(),[h,v]=b.useState({}),[y,w]=b.useState([]),[S,R]=b.useState(!1),[x,_]=b.useState(null),[C,N]=b.useState(""),[k,A]=b.useState("prompts"),[I,O]=b.useState([]),[L,M]=b.useState(!1),[P,Y]=b.useState(""),[Q,J]=b.useState(!1),[ee,U]=b.useState(-1),G=b.useRef(null);b.useImperativeHandle(t,()=>({focusSearch:()=>{J(!0),setTimeout(()=>{G.current&&G.current.focus()},0)},blurSearch:()=>{N(""),J(!1),G.current&&G.current.blur()}})),b.useEffect(()=>{try{const Z=localStorage.getItem(Xz);if(Z){const ne=JSON.parse(Z);O(ne)}}catch(Z){console.error("[PromptsTab] Failed to load saved prompts:",Z)}},[]);const H=b.useCallback(Z=>{try{localStorage.setItem(Xz,JSON.stringify(Z))}catch(ne){console.error("[PromptsTab] Failed to save prompts:",ne)}},[]);b.useEffect(()=>{Q&&G.current&&G.current.focus()},[Q]);const X=b.useCallback(()=>{C.trim()||J(!1)},[C]),ae=b.useMemo(()=>{if(!C.trim())return e;const Z=C.toLowerCase();return e.filter(ne=>ne.name.toLowerCase().includes(Z)||ne.description?.toLowerCase().includes(Z))},[e,C]),z=b.useCallback(Z=>{l(Z);const ne={};Z.arguments&&Z.arguments.forEach(V=>{V.default!==void 0?ne[V.name]=V.default:V.type==="string"?ne[V.name]="":V.type==="number"?ne[V.name]=0:V.type==="boolean"?ne[V.name]=!1:V.type==="array"?ne[V.name]=[]:V.type==="object"&&(ne[V.name]={})}),v(ne)},[]),q=b.useCallback(Z=>{const ne=e.find(V=>V.name===Z.promptName);ne&&(l(ne),v(Z.args),d(Z))},[e]);b.useEffect(()=>{U(-1)},[C,k]),b.useEffect(()=>{const Z=ne=>{const V=ne.target;if(V.tagName==="INPUT"||V.tagName==="TEXTAREA"||V.contentEditable==="true"||ne.metaKey||ne.ctrlKey||ne.altKey)return;const fe=k==="prompts"?ae:I;if(ne.key==="ArrowDown")ne.preventDefault(),U(Re=>{const be=Re+1;return be>=fe.length?0:be});else if(ne.key==="ArrowUp")ne.preventDefault(),U(Re=>{const be=Re-1;return be<0?fe.length-1:be});else if(ne.key==="Enter"&&ee>=0)if(ne.preventDefault(),k==="prompts"){const Re=ae[ee];Re&&z(Re)}else{const Re=I[ee];Re&&q(Re)}};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[ee,ae,I,k,z,q]),b.useEffect(()=>{if(ee>=0){const Z=k==="prompts"?`prompt-${ae[ee]?.name}`:`saved-prompt-${I[ee]?.id}`,ne=document.getElementById(Z);ne&&ne.scrollIntoView({behavior:"smooth",block:"nearest"})}},[ee,ae,I,k]),b.useEffect(()=>{if(console.warn("[PromptsTab] Auto-selection effect triggered:",{selectedPromptName:f,promptsCount:e.length,currentSelectedPrompt:s?.name}),f&&e.length>0){const Z=e.find(ne=>ne.name===f);if(console.warn("[PromptsTab] Prompt lookup result:",{selectedPromptName:f,promptFound:!!Z,promptName:Z?.name,shouldSelect:Z&&s?.name!==Z.name}),Z&&s?.name!==Z.name){console.warn("[PromptsTab] Selecting prompt:",Z.name),m(null);const ne=setTimeout(()=>{z(Z);const V=document.getElementById(`prompt-${Z.name}`);V&&(console.warn("[PromptsTab] Scrolling to prompt element"),V.scrollIntoView({behavior:"smooth",block:"nearest"}))},100);return()=>clearTimeout(ne)}}},[f,e,s,z,m]);const $=b.useCallback((Z,ne)=>{v(V=>({...V,[Z]:ne}))},[]),W=b.useCallback(async()=>{if(!s||S)return;R(!0);const Z=Date.now();try{const ne=await r(s.name,h),V=Date.now()-Z;zr.getInstance().capture(new FO({promptName:s.name,serverId:n,success:!0})).catch(()=>{}),w(fe=>[{promptName:s.name,args:h,result:ne,timestamp:Z,duration:V},...fe])}catch(ne){zr.getInstance().capture(new FO({promptName:s.name,serverId:n,success:!1,error:ne instanceof Error?ne.message:"Unknown error"})).catch(()=>{});const de={promptName:s.name,args:h,result:null,error:ne instanceof Error?ne.message:String(ne),timestamp:Z,duration:Date.now()-Z};w(fe=>[de,...fe])}finally{R(!1)}},[s,h,S,r,n]),te=b.useCallback(async(Z,ne)=>{try{await navigator.clipboard.writeText(JSON.stringify(ne,null,2)),_(Z),setTimeout(()=>_(null),2e3)}catch(V){console.error("[PromptsTab] Failed to copy result:",V)}},[]),F=b.useCallback(()=>{s&&(Y(""),M(!0))},[s]),j=b.useCallback(Z=>{H(I.filter(ne=>ne.id!==Z)),c?.id===Z&&d(null)},[I,H,c]);return g.jsxs(Sd,{direction:"horizontal",className:"h-full",children:[g.jsxs(ja,{defaultSize:33,className:"flex flex-col h-full relative",children:[g.jsx(qve,{activeTab:k,isSearchExpanded:Q,searchQuery:C,filteredPromptsCount:ae.length,savedPromptsCount:I.length,onSearchExpand:()=>J(!0),onSearchChange:N,onSearchBlur:X,onTabSwitch:()=>A(k==="prompts"?"saved":"prompts"),searchInputRef:G}),k==="prompts"?g.jsx(Bve,{prompts:ae,selectedPrompt:s,onPromptSelect:z,focusedIndex:ee}):g.jsx(Hve,{savedPrompts:I,selectedPrompt:c,onLoadPrompt:q,onDeletePrompt:j,focusedIndex:ee})]}),g.jsx(xd,{withHandle:!0}),g.jsx(ja,{defaultSize:67,children:g.jsxs(Sd,{direction:"vertical",children:[g.jsx(ja,{defaultSize:40,children:g.jsx(Gve,{selectedPrompt:s,promptArgs:h,isExecuting:S,isConnected:a,onArgChange:$,onExecute:W,onSave:F})}),g.jsx(xd,{withHandle:!0}),g.jsx(ja,{defaultSize:60,children:g.jsx("div",{className:"flex flex-col h-full",children:g.jsx(Wve,{results:y,copiedResult:x,onCopy:te})})})]})})]})}Y5.displayName="PromptsTab";function ql(t){if(!t?.mimeType)return!1;const e=t.mimeType.toLowerCase();return e==="text/html"||e==="text/html+skybridge"||e==="text/uri-list"||e.startsWith("application/vnd.mcp-ui.remote-dom")}function Yve(t){return{uri:t.uri,mimeType:t.mimeType,text:t.text,blob:t.blob}}function K5({resource:t,onUIAction:e,className:r}){const n=async s=>e?.(s),a=Yve(t);return g.jsx("div",{className:r,children:g.jsx(VC,{resource:a,onUIAction:n,htmlProps:{autoResizeIframe:{width:!0,height:!0},style:{width:"100%",minHeight:"200px"},sandboxPermissions:"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"},remoteDomProps:{remoteElements:[ave,nve,ove,ive],library:HC}})})}function Kve({result:t,isLoading:e,previewMode:r,serverId:n,readResource:a,onTogglePreview:s,onCopy:l,onDownload:c,onFullscreen:d,isCopied:f=!1}){let m=[],h;if(t?.resourceAnnotations&&(m=Object.keys(t.resourceAnnotations).filter(S=>S.startsWith("openai/")),h=t.resourceAnnotations["openai/outputTemplate"]),t?.result?.contents?.[0]?._meta){const S=t.result.contents[0]._meta,R=Object.keys(S).filter(x=>x.startsWith("openai/"));R.length>0&&(m=[...m,...R]),!h&&S["openai/outputTemplate"]&&(h=S["openai/outputTemplate"]),!h&&t.uri&&t.uri.startsWith("ui://widget/")&&(h=t.uri)}const v=!!(m.length>0&&h&&typeof h=="string"&&n&&a);if(e)return g.jsx("div",{className:"flex absolute left-0 top-0 items-center justify-center w-full h-full",children:g.jsx(Lo,{className:"size-5"})});if(!t)return g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a resource to view its contents"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a resource from the list to see its data"})]});if(t.error)return g.jsx("div",{className:"p-4",children:g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:t.error})]})});const y=t?.result?.contents&&Array.isArray(t.result.contents)&&t.result.contents.some(S=>S.mimeType&&ql(S)),w=y?t.result.contents.filter(S=>S.mimeType&&ql(S)):[];return g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"flex-shrink-0 px-4 py-3 border-b border-gray-200 dark:border-zinc-700 flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ic,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(t.timestamp).toLocaleTimeString()})]}),(()=>{const S=t?.duration??t.result?.duration??t.result?.metrics?.durationMs;return S!==void 0?g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ud,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[S,"ms"]})]}):null})(),y&&g.jsx(Va,{variant:"outline",className:"text-xs bg-purple-50 dark:bg-purple-900/20 border-none border-purple-200 dark:border-purple-800/50 text-purple-600 dark:text-purple-400",children:"MCP UI"}),v&&g.jsx(Va,{variant:"outline",className:"text-xs bg-blue-50 dark:bg-blue-900/20 border-none border-blue-200 dark:border-blue-800/50 text-blue-600 dark:text-blue-400",children:"OpenAI Widget"})]}),g.jsxs("div",{className:"flex items-center gap-1",children:[(y||v)&&g.jsxs(tt,{variant:"ghost",size:"sm",onClick:s,className:r?"":"text-purple-600 dark:text-purple-400",children:[r?g.jsx(SQ,{className:"h-4 w-4 mr-1"}):g.jsx(fQ,{className:"h-4 w-4 mr-1"}),r?"JSON":v?"Component":"Preview"]}),g.jsx(tt,{variant:"ghost",size:"sm",onClick:l,children:f?g.jsx(Do,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})}),g.jsx(tt,{variant:"ghost",size:"sm",onClick:c,children:g.jsx(RB,{className:"h-4 w-4"})}),g.jsx(tt,{variant:"ghost",size:"sm",onClick:d,children:g.jsx(ZQ,{className:"h-4 w-4"})})]})]}),g.jsx("div",{className:"flex-1 overflow-y-auto",children:v&&n&&a&&h?r?g.jsx("div",{className:"flex-1 h-full",children:g.jsx(FC,{componentUrl:h,toolName:t.uri,toolArgs:{},toolResult:t.result,serverId:n,readResource:a,className:"w-full h-full relative flex p-4"})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-${Date.now()}.json`})}):y?r?g.jsxs("div",{className:"space-y-0 h-full",children:[w.map((S,R)=>g.jsx("div",{className:"mx-0 size-full",children:g.jsx("div",{className:"w-full h-full",children:g.jsx(K5,{resource:S,className:"w-full h-full"})})},`mcp-ui-${S.uri||`resource-${Date.now()}-${Math.random()}`}`)),(()=>{if(t.result.contents&&Array.isArray(t.result.contents)){const S=t.result.contents.filter(R=>!(R.mimeType&&ql(R)));if(S.length>0)return g.jsx("div",{className:"px-4",children:g.jsx(Pa,{data:S,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-non-ui-${Date.now()}.json`})})}return null})()]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-mcp-ui-${Date.now()}.json`})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-${Date.now()}.json`})})})]})}function Zve(t,e){if(!t&&!e)return g.jsx(FQ,{className:"h-5 w-5"});const r=(t||e||"").toLowerCase();return r.includes("image")?g.jsx(PQ,{className:"h-5 w-5"}):r.includes("json")||r.includes("javascript")||r.includes("typescript")?g.jsx(LQ,{className:"h-5 w-5"}):r.includes("html")||r.includes("xml")?g.jsx(qQ,{className:"h-5 w-5"}):r.includes("database")||r.includes("sql")?g.jsx(eh,{className:"h-5 w-5"}):g.jsx(OR,{className:"h-5 w-5"})}function Xve({resources:t,selectedResource:e,onResourceSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(eh,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No resources available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>{const l=Zve(a.mimeType,a.uri),c=[a.description,a.mimeType&&g.jsx("span",{className:"font-mono",children:a.mimeType},"mime")].filter(Boolean);return g.jsx(Gd,{id:`resource-${a.uri}`,isSelected:e?.uri===a.uri,isFocused:n===s,icon:l,title:a.name,description:c.length>0?g.jsxs("span",{className:"flex flex-col gap-1",children:[a.description&&g.jsx("span",{children:a.description}),a.mimeType&&g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-500 font-mono",children:a.mimeType})]}):void 0,onClick:()=>r(a)},a.uri)})})}function Qve({isSearchExpanded:t,searchQuery:e,filteredResourcesCount:r,onSearchExpand:n,onSearchChange:a,onSearchBlur:s,searchInputRef:l}){return g.jsx("div",{className:"flex items-center justify-between p-4 py-3 border-r dark:border-zinc-700",children:g.jsx("div",{className:"flex items-center gap-2 flex-1",children:t?g.jsx(Or,{ref:l,placeholder:"Search resources...",value:e,onChange:c=>a(c.target.value),onBlur:s,className:"h-8 border-gray-300 dark:border-zinc-600"}):g.jsxs(g.Fragment,{children:[g.jsx("h2",{className:"text-lg font-medium text-gray-900 dark:text-gray-100",children:"Resources"}),g.jsx(Va,{className:"bg-zinc-500/20 text-zinc-600 dark:text-zinc-400 border-transparent",variant:"outline",children:r}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"ghost",size:"sm",onClick:n,className:"h-8 w-8 p-0",children:g.jsx(LR,{className:"h-4 w-4"})})}),g.jsxs(Fr,{side:"bottom",className:"flex gap-2",children:["Search",g.jsx(G5,{children:"F"})]})]})]})})})}function Z5({ref:t,resources:e,readResource:r,serverId:n,isConnected:a}){const[s,l]=b.useState(null),{selectedResourceUri:c,setSelectedResourceUri:d}=Fd(),[f,m]=b.useState(null),[h,v]=b.useState(!1),[y,w]=b.useState(""),[S]=b.useState("resources"),[R,x]=b.useState(!0),[_,C]=b.useState(!1),[N,k]=b.useState(-1),[A,I]=b.useState(!1),O=b.useRef(null),L=b.useRef(null);b.useImperativeHandle(t,()=>({focusSearch:()=>{C(!0),setTimeout(()=>{O.current&&O.current.focus()},0)},blurSearch:()=>{w(""),C(!1),O.current&&O.current.blur()}})),b.useEffect(()=>{_&&O.current&&O.current.focus()},[_]);const M=b.useCallback(()=>{y.trim()||C(!1)},[y]),P=b.useMemo(()=>{if(!y)return e;const U=y.toLowerCase();return e.filter(G=>G.name.toLowerCase().includes(U)||G.description?.toLowerCase().includes(U)||G.uri.toLowerCase().includes(U))},[e,y]),Y=b.useCallback(async U=>{if(l(U),a){v(!0);const G=Date.now();try{const H=await r(U.uri);zr.getInstance().capture(new UO({resourceUri:U.uri,serverId:n,success:!0})).catch(()=>{}),m({uri:U.uri,result:H,timestamp:G,resourceAnnotations:U.annotations})}catch(H){zr.getInstance().capture(new UO({resourceUri:U.uri,serverId:n,success:!1,error:H instanceof Error?H.message:"Unknown error"})).catch(()=>{}),m({uri:U.uri,result:null,error:H instanceof Error?H.message:"Unknown error",timestamp:G,resourceAnnotations:U.annotations})}finally{v(!1)}}},[r,n,a]);b.useEffect(()=>{k(-1)},[y,S]),b.useEffect(()=>{const U=G=>{const H=G.target;if(H.tagName==="INPUT"||H.tagName==="TEXTAREA"||H.contentEditable==="true"||G.metaKey||G.ctrlKey||G.altKey)return;const ae=P;if(G.key==="ArrowDown")G.preventDefault(),k(z=>{const q=z+1;return q>=ae.length?0:q});else if(G.key==="ArrowUp")G.preventDefault(),k(z=>{const q=z-1;return q<0?ae.length-1:q});else if(G.key==="Enter"&&N>=0){G.preventDefault();const z=P[N];z&&Y(z)}};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[N,P,Y]),b.useEffect(()=>{if(N>=0){const U=`resource-${P[N]?.uri}`,G=document.getElementById(U);G&&G.scrollIntoView({behavior:"smooth",block:"nearest"})}},[N,P]),b.useEffect(()=>{if(c&&e.length>0){const U=e.find(G=>G.uri===c);U&&s?.uri!==U.uri&&(d(null),setTimeout(()=>{Y(U);const G=document.getElementById(`resource-${U.uri}`);G&&G.scrollIntoView({behavior:"smooth",block:"nearest"})},100))}},[c,e,s,Y,d]);const Q=b.useCallback(async()=>{if(f)try{await navigator.clipboard.writeText(JSON.stringify(f.result,null,2)),I(!0),setTimeout(()=>I(!1),2e3)}catch(U){console.error("[ResourcesTab] Failed to copy result:",U)}},[f]),J=b.useCallback(()=>{if(f)try{const U=new globalThis.Blob([JSON.stringify(f.result,null,2)],{type:"application/json"}),G=URL.createObjectURL(U),H=document.createElement("a");H.href=G,H.download=`resource-${Date.now()}.json`,document.body.appendChild(H),H.click(),document.body.removeChild(H),URL.revokeObjectURL(G)}catch(U){console.error("[ResourcesTab] Failed to download result:",U)}},[f]),ee=b.useCallback(async()=>{if(L.current)try{document.fullscreenElement?await document.exitFullscreen():await L.current.requestFullscreen()}catch(U){console.error("[ResourcesTab] Failed to toggle fullscreen:",U)}},[]);return g.jsxs(Sd,{direction:"horizontal",className:"h-full",children:[g.jsxs(ja,{defaultSize:25,children:[g.jsx(Qve,{activeTab:S,isSearchExpanded:_,searchQuery:y,filteredResourcesCount:P.length,onSearchExpand:()=>C(!0),onSearchChange:w,onSearchBlur:M,onTabSwitch:()=>{},searchInputRef:O}),g.jsx("div",{className:"flex flex-col h-full",children:g.jsx(Xve,{resources:P,selectedResource:s,onResourceSelect:Y,focusedIndex:N})})]}),g.jsx(xd,{}),g.jsx(ja,{defaultSize:50,children:g.jsx("div",{ref:L,className:"h-full bg-white dark:bg-zinc-900",children:g.jsx(Kve,{result:f,isLoading:h,previewMode:R,serverId:n,readResource:r,onTogglePreview:()=>x(!R),onCopy:Q,onDownload:J,onFullscreen:ee,isCopied:A})})})]})}Z5.displayName="ResourcesTab";function Jve({savedRequests:t,selectedRequest:e,onLoadRequest:r,onDeleteRequest:n,focusedIndex:a}){if(t.length===0)return g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(eh,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"No saved requests yet"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Execute a tool and click Save to store requests"})]});const s=(l,c)=>{l.stopPropagation(),c()};return g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((l,c)=>g.jsxs("div",{className:"relative group",children:[g.jsx(Gd,{id:`saved-${l.id}`,isSelected:e?.id===l.id,isFocused:a===c,icon:g.jsx(CB,{className:"h-4 w-4"}),title:l.name,description:l.toolName,metadata:g.jsx("div",{className:"flex flex-col gap-1",children:g.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:new Date(l.savedAt).toLocaleString()})}),onClick:()=>r(l)}),g.jsx("div",{className:"absolute top-1/2 right-2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-10",children:g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"secondary",size:"sm",onClick:d=>s(d,()=>n(l.id)),className:"h-8 w-8 p-0",children:g.jsx(rT,{className:"h-4 w-4"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Delete saved request"})})]})})]},l.id))})}function ebe({isOpen:t,requestName:e,defaultPlaceholder:r,onRequestNameChange:n,onSave:a,onCancel:s}){return t?g.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:s,children:g.jsxs("div",{className:"bg-white dark:bg-zinc-800 rounded-lg p-6 w-[400px] shadow-xl border border-gray-200 dark:border-zinc-700",onClick:l=>l.stopPropagation(),children:[g.jsx("h3",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-gray-100",children:"Save Request"}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx(lr,{htmlFor:"request-name",children:"Request Name (optional)"}),g.jsx(Or,{id:"request-name",value:e,onChange:l=>n(l.target.value),placeholder:r,className:"mt-2",onKeyDown:l=>{l.key==="Enter"&&a()},autoFocus:!0})]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(tt,{variant:"outline",onClick:s,children:"Cancel"}),g.jsxs(tt,{onClick:a,children:[g.jsx(DR,{className:"h-4 w-4 mr-2"}),"Save"]})]})]})]})}):null}function tbe({selectedTool:t,toolArgs:e,onArgChange:r}){const n=t?.inputSchema?.properties||{},a=t?.inputSchema?.required||[];return Object.keys(n).length>0?g.jsx("div",{className:"space-y-4",children:Object.entries(n).map(([l,c])=>{const d=c;d.required=a.includes(l);const f=e[l];let m="";return f!=null&&(typeof f=="string"?m=f:m=JSON.stringify(f,null)),d.type==="object"||d.type==="array"||typeof f=="object"&&f!==null?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:l,className:"text-sm font-medium",children:[l,d?.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(mh,{id:l,value:m,onChange:h=>r(l,h.target.value),placeholder:d?.description||`Enter ${l}`,className:"min-h-[100px]"}),d?.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:d.description})]},l):g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:l,className:"text-sm font-medium",children:[l,d?.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:l,value:m,onChange:h=>r(l,h.target.value),placeholder:d?.description||`Enter ${l}`}),d?.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:d.description})]},l)})}):g.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",children:"No parameters required"})}function rbe({selectedTool:t,toolArgs:e,isExecuting:r,isConnected:n,onArgChange:a,onExecute:s,onSave:l}){return t?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"flex-shrink-0 p-6 pt-3 pb-4 pr-3",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-0",children:[g.jsx("h3",{className:"text-lg font-semibold mb-2",children:t.name}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(tt,{onClick:s,disabled:r||!n,children:r?g.jsxs(g.Fragment,{children:[g.jsx(Lo,{className:"mr-2"}),"Executing..."]}):g.jsxs(g.Fragment,{children:[g.jsx(NB,{className:"h-4 w-4 mr-2"}),"Execute"]})}),g.jsxs(tt,{variant:"outline",onClick:l,disabled:r,className:"gap-2",children:[g.jsx(DR,{className:"h-4 w-4"}),"Save"]})]})]}),t.description&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 leading-relaxed",children:t.description})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 pb-4 pr-3",children:g.jsx(tbe,{selectedTool:t,toolArgs:e,onArgChange:a})})]}):g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a tool to get started"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a tool from the list to view its details and execute it"})]})}function nbe({results:t,copiedResult:e,previewMode:r,serverId:n,readResource:a,onCopy:s,onTogglePreview:l}){return g.jsx("div",{className:"flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",children:g.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.length>0?g.jsx("div",{className:"space-y-4 flex-1 h-full",children:t.map((c,d)=>{const f=c.toolMeta?.["openai/outputTemplate"],m=!!(f&&typeof f=="string"&&c.appsSdkResource),h=f,v=c.result?.content||[],y=v.filter(S=>S.type==="resource"&&ql(S.resource)),w=y.length>0;return g.jsxs("div",{className:"space-y-0 flex-1 h-full flex flex-col",children:[g.jsxs("div",{className:`flex items-center gap-2 px-4 pt-2 ${w||m?"border-b border-gray-200 dark:border-zinc-600 pb-2":""}`,children:[g.jsx("h3",{className:"text-sm font-medium",children:"Response"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ic,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(c.timestamp).toLocaleTimeString()})]}),c.duration!==void 0&&g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ud,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[c.duration,"ms"]})]}),m&&g.jsxs("div",{className:"flex items-center gap-4 ml-4",children:[g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["URI: ",h||"No URI"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-black dark:text-white":"text-zinc-500 dark:text-zinc-400"}`,children:"Component"}),g.jsx("span",{className:"text-xs text-zinc-400",children:"|"}),g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-zinc-500 dark:text-zinc-400":"text-black dark:text-white"}`,children:"Raw JSON"})]})]}),w&&!m&&g.jsxs("div",{className:"flex items-center gap-4 ml-4",children:[g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["URI: ",y[0]?.resource?.uri||"No URI"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-black dark:text-white":"text-zinc-500 dark:text-zinc-400"}`,children:"Preview"}),g.jsx("span",{className:"text-xs text-zinc-400",children:"|"}),g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-zinc-500 dark:text-zinc-400":"text-black dark:text-white"}`,children:"JSON"})]})]}),g.jsx(tt,{variant:"ghost",size:"sm",onClick:()=>s(d,c.result),className:"ml-auto",children:e===d?g.jsx(Do,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})})]}),c.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:c.error})]}):(()=>{if(m){const S=c.appsSdkResource;return S.isLoading?g.jsx(g.Fragment,{}):S.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Resource Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:S.error})]}):r?g.jsx("div",{className:"flex-1",children:g.jsx(FC,{componentUrl:h,toolName:c.toolName,toolArgs:c.args,toolResult:c.result,resource:S.resourceData,serverId:n,readResource:a,className:"w-full h-full relative p-4"})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-${Date.now()}.json`})})}return w?r?g.jsxs("div",{className:"space-y-0 h-full",children:[y.map((S,R)=>g.jsx("div",{className:"mx-0 size-full",children:g.jsx(K5,{resource:S.resource,onUIAction:x=>{},className:"w-full h-full relative"})},R)),v.filter(S=>!(S.type==="resource"&&ql(S.resource))).length>0&&g.jsx("div",{className:"px-4",children:g.jsx(Pa,{data:v.filter(S=>!(S.type==="resource"&&ql(S.resource))),filename:`tool-result-${c.toolName}-non-ui-${Date.now()}.json`})})]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-mcp-ui-${Date.now()}.json`})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-${Date.now()}.json`})})})()]},d)})}):g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"text-center",children:g.jsx(yR,{vertical:!0,noBorder:!0,message:"No Results yet"})})})})})}function abe({tools:t,selectedTool:e,onToolSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(ws,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No tools available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>g.jsx(Gd,{id:`tool-${a.name}`,isSelected:e?.name===a.name,isFocused:n===s,icon:g.jsx(ws,{className:"h-4 w-4"}),title:a.name,description:a.description,metadata:a.inputSchema?.properties&&g.jsxs(Va,{variant:"outline",className:"text-xs border-gray-300 dark:border-zinc-600 text-gray-600 dark:text-gray-400",children:[Object.keys(a.inputSchema.properties).length," params"]}),onClick:()=>r(a)},a.name))})}function obe({activeTab:t,isSearchExpanded:e,searchQuery:r,filteredToolsCount:n,savedRequestsCount:a,onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f}){return g.jsx(W5,{activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabName:"tools",secondaryTabName:"saved",primaryTabTitle:"Tools",secondaryTabTitle:"Saved",primaryCount:n,secondaryCount:a,primaryIcon:ws,secondaryIcon:eh,searchPlaceholder:"Search tools...",onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f})}const Qz="mcp-inspector-saved-requests";function X5({ref:t,tools:e,callTool:r,readResource:n,serverId:a,isConnected:s}){const[l,c]=b.useState(null),[d,f]=b.useState(null),{selectedToolName:m,setSelectedToolName:h}=Fd(),[v,y]=b.useState({}),[w,S]=b.useState([]),[R,x]=b.useState(!1),[_,C]=b.useState(null),[N,k]=b.useState(""),[A,I]=b.useState("tools"),[O,L]=b.useState([]),[M,P]=b.useState(!1),[Y,Q]=b.useState(""),[J,ee]=b.useState(!0),[U,G]=b.useState(!1),[H,X]=b.useState(-1),ae=b.useRef(null);b.useImperativeHandle(t,()=>({focusSearch:()=>{G(!0),setTimeout(()=>{ae.current&&ae.current.focus()},0)},blurSearch:()=>{k(""),G(!1),ae.current&&ae.current.blur()}})),b.useEffect(()=>{try{const be=localStorage.getItem(Qz);be&&L(JSON.parse(be))}catch(be){console.error("[ToolsTab] Failed to load saved requests:",be)}},[]);const z=b.useCallback(be=>{try{localStorage.setItem(Qz,JSON.stringify(be)),L(be)}catch(xe){console.error("[ToolsTab] Failed to save requests:",xe)}},[]),q=b.useMemo(()=>{if(!N.trim())return e;const be=N.toLowerCase();return e.filter(xe=>xe.name.toLowerCase().includes(be)||xe.description?.toLowerCase().includes(be))},[e,N]),$=b.useCallback(be=>{c(be);const xe={};be.inputSchema?.properties&&Object.entries(be.inputSchema.properties).forEach(([Ne,ze])=>{const Me=ze;Me.default!==void 0?xe[Ne]=Me.default:Me.type==="string"?xe[Ne]="":Me.type==="number"?xe[Ne]=0:Me.type==="boolean"?xe[Ne]=!1:Me.type==="array"?xe[Ne]=[]:Me.type==="object"&&(xe[Ne]={})}),y(xe)},[]),W=b.useCallback(be=>{const xe=e.find(Ne=>Ne.name===be.toolName);xe&&(c(xe),y(be.args),f(be))},[e]);b.useEffect(()=>{U&&ae.current&&ae.current.focus()},[U]);const te=b.useCallback(()=>{N.trim()||G(!1)},[N]);b.useEffect(()=>{A!=="tools"&&G(!1)},[A]),b.useEffect(()=>{X(-1)},[N,A]),b.useEffect(()=>{const be=xe=>{const Ne=xe.target;if(Ne.tagName==="INPUT"||Ne.tagName==="TEXTAREA"||Ne.contentEditable==="true"||xe.metaKey||xe.ctrlKey||xe.altKey)return;const Me=A==="tools"?q:O;if(xe.key==="ArrowDown")xe.preventDefault(),X($e=>{const ct=$e+1;return ct>=Me.length?0:ct});else if(xe.key==="ArrowUp")xe.preventDefault(),X($e=>{const ct=$e-1;return ct<0?Me.length-1:ct});else if(xe.key==="Enter"&&H>=0)if(xe.preventDefault(),A==="tools"){const $e=q[H];$e&&$($e)}else{const $e=O[H];$e&&W($e)}};return document.addEventListener("keydown",be),()=>document.removeEventListener("keydown",be)},[H,q,O,A,$,W]),b.useEffect(()=>{if(H>=0){const be=A==="tools"?`tool-${q[H]?.name}`:`saved-${O[H]?.id}`,xe=document.getElementById(be);xe&&xe.scrollIntoView({behavior:"smooth",block:"nearest"})}},[H,q,O,A]),b.useEffect(()=>{if(m&&e.length>0){const be=e.find(xe=>xe.name===m);if(be&&l?.name!==be.name){h(null);const xe=setTimeout(()=>{$(be);const Ne=document.getElementById(`tool-${be.name}`);Ne&&Ne.scrollIntoView({behavior:"smooth",block:"nearest"})},100);return()=>clearTimeout(xe)}}},[m,e,l,$,h]);const F=b.useCallback((be,xe)=>{y(Ne=>{const ze={...Ne};if(l?.inputSchema?.properties?.[be])if(l.inputSchema.properties[be].type==="string")ze[be]=xe;else try{ze[be]=JSON.parse(xe)}catch{ze[be]=xe}else try{ze[be]=JSON.parse(xe)}catch{ze[be]=xe}return ze})},[l]),j=b.useCallback(async()=>{if(!l||R)return;x(!0);const be=Date.now();try{const xe=await r(l.name,v),Ne=Date.now()-be;zr.getInstance().capture(new jO({toolName:l.name,serverId:a,success:!0,duration:Ne})).catch(()=>{});const Me=l?._meta||l?.metadata,$e=Me?.["openai/outputTemplate"];let ct;if($e&&typeof $e=="string"){const ce={toolName:l.name,args:v,result:xe,timestamp:be,duration:Ne,toolMeta:Me,appsSdkResource:{uri:$e,resourceData:null,isLoading:!0}};S([ce]);try{const Ce=await n($e);let Fe=null;if(xe?.structuredContent)Fe=xe.structuredContent;else if(Array.isArray(xe)&&xe[0]){const _e=xe[0];_e.output?.value?.structuredContent?Fe=_e.output.value.structuredContent:_e.structuredContent?Fe=_e.structuredContent:_e.output?.value&&(Fe=_e.output.value)}Fe||(Fe=xe),ct={uri:$e,resourceData:{...Ce,structuredContent:Fe},isLoading:!1}}catch(Ce){ct={uri:$e,resourceData:null,isLoading:!1,error:Ce instanceof Error?Ce.message:String(Ce)}}S(Ce=>Ce.map((Fe,_e)=>_e===0?{...Fe,appsSdkResource:ct}:Fe))}else S(ce=>[{toolName:l.name,args:v,result:xe,timestamp:be,duration:Ne,toolMeta:Me},...ce])}catch(xe){const Ne=Date.now()-be;zr.getInstance().capture(new jO({toolName:l.name,serverId:a,success:!1,duration:Ne,error:xe instanceof Error?xe.message:String(xe)})).catch(()=>{});const Me=l?._meta||l?.metadata,$e={toolName:l.name,args:v,result:null,error:xe instanceof Error?xe.message:String(xe),timestamp:be,duration:Ne,toolMeta:Me},ct=Me?.["openai/outputTemplate"];S(ct?[$e]:ce=>[$e,...ce])}finally{x(!1)}},[l,v,R,r,n,a]),Z=b.useCallback(async(be,xe)=>{try{await navigator.clipboard.writeText(JSON.stringify(xe,null,2)),C(be),setTimeout(()=>C(null),2e3)}catch(Ne){console.error("[ToolsTab] Failed to copy result:",Ne)}},[]),ne=b.useCallback(be=>{S(xe=>xe.filter((Ne,ze)=>ze!==be))},[]),V=b.useCallback(be=>{const xe=w[be];if(xe){const Ne=window.open("","_blank","width=800,height=600");Ne&&(Ne.document.write(`
|
|
1545
|
+
`);C=A.pop()||"";for(const I of A)if(I.trim()&&I.startsWith("data: "))try{const O=JSON.parse(I.slice(6));if(console.log("[Client received event]",O.type,O.toolName||O.content?.slice?.(0,30)),O.type==="message")console.log("[Message started]",O.id);else if(O.type==="text"){S+=O.content;const L=R[R.length-1];L&&L.type==="text"?L.text=S:R.push({type:"text",text:S}),console.log("[Parts after text]",R.length,"parts, text length:",S.length),s(M=>M.map(P=>P.id===w?{...P,parts:[...R]}:P))}else if(O.type==="tool-call")S&&(S=""),R.push({type:"tool-invocation",toolInvocation:{toolName:O.toolName,args:O.args,state:"pending"}}),console.log("[Parts after tool-call]",R.length,"parts, tool:",O.toolName),s(L=>L.map(M=>M.id===w?{...M,parts:[...R]}:M));else if(O.type==="tool-result"){const L=R.find(M=>M.type==="tool-invocation"&&M.toolInvocation?.toolName===O.toolName&&!M.toolInvocation?.result);L&&L.toolInvocation?(L.toolInvocation.result=O.result,L.toolInvocation.state="result",console.log("[Parts after tool-result]",R.length,"parts, updated:",O.toolName),s(M=>M.map(P=>P.id===w?{...P,parts:[...R]}:P))):console.warn("[tool-result] Could not find matching tool part for",O.toolName)}else if(O.type==="done")console.log("[Done] Final parts:",R.length),s(L=>L.map(M=>M.id===w?{...M,parts:[...R],content:""}:M));else if(O.type==="error")throw new Error(O.message||"Streaming error")}catch(O){console.error("Failed to parse streaming event:",O,I)}}}catch(v){let y="Unknown error occurred";if(v instanceof Error){y=v.message;const S=v;S.status&&(y=`HTTP ${S.status}: ${y}`),(S.code===401||y.includes("401")||y.includes("Unauthorized"))&&(y="Authentication failed (401). Check your Authorization header in the connection settings.")}const w={id:`error-${Date.now()}`,role:"assistant",content:`Error: ${y}`,timestamp:Date.now()};s(S=>[...S,w])}finally{c(!1)}},[e,n,t,a,r]),f=b.useCallback(()=>{s([])},[]);return{messages:a,isLoading:l,sendMessage:d,clearMessages:f}}function dve({connection:t,llmConfig:e,isConnected:r,readResource:n}){const[a,s]=b.useState([]),[l,c]=b.useState(!1),d=b.useRef(null),f=b.useRef(null),m=b.useRef(null),h=b.useCallback(async y=>{if(!y.trim()||!e||!r)return;const w={id:`user-${Date.now()}`,role:"user",content:y.trim(),timestamp:Date.now()};s(x=>[...x,w]),c(!0),d.current=new AbortController;const S=Date.now();let R=0;try{const x=`assistant-${Date.now()}`;let _="";const C=[];if(s(N=>[...N,{id:x,role:"assistant",content:"",timestamp:Date.now(),parts:[]}]),!m.current||m.current.provider!==e.provider||m.current.model!==e.model||m.current.apiKey!==e.apiKey){let N;if(e.provider==="openai"){const{ChatOpenAI:k}=await cs(async()=>{const{ChatOpenAI:A}=await import("./index-CCjf56iV.js");return{ChatOpenAI:A}},__vite__mapDeps([4,5,6,2,7]));N=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else if(e.provider==="anthropic"){const{ChatAnthropic:k}=await cs(async()=>{const{ChatAnthropic:A}=await import("./index-DdIIPMyF.js");return{ChatAnthropic:A}},__vite__mapDeps([8,5,6,2]));N=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else if(e.provider==="google"){const{ChatGoogleGenerativeAI:k}=await cs(async()=>{const{ChatGoogleGenerativeAI:A}=await import("./index-BYtBsAG_.js");return{ChatGoogleGenerativeAI:A}},__vite__mapDeps([9,5,6,2,7]));N=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else throw new Error(`Unsupported LLM provider: ${e.provider}`);m.current={instance:N,provider:e.provider,model:e.model,apiKey:e.apiKey}}if(!f.current||f.current.llm!==m.current.instance){const{MCPAgent:N}=await cs(async()=>{const{MCPAgent:k}=await import("./langfuse-C4HKZ3NL-W8CMIBGE.js").then(A=>A.c);return{MCPAgent:k}},__vite__mapDeps([10,6,2,1,3]));f.current=new N({llm:m.current.instance,client:t.client,memoryEnabled:!0,systemPrompt:"You are a helpful assistant with access to MCP tools, prompts, and resources. Help users interact with the MCP server."}),await f.current.initialize()}else console.log("[useChatMessagesClientSide] Reusing existing agent. History length:",f.current.conversationHistory?.length);for await(const N of f.current.streamEvents(y,10,!1,void 0)){if(d.current?.signal.aborted)break;if(N.event==="on_chat_model_stream"&&N.data?.chunk?.text){const k=N.data.chunk.text;if(typeof k=="string"&&k.length>0){_+=k;const A=C[C.length-1];A&&A.type==="text"?A.text=_:C.push({type:"text",text:_}),s(I=>I.map(O=>O.id===x?{...O,parts:[...C]}:O))}}else if(N.event==="on_tool_start"){_&&(_="");let k={};N.data?.input?k=N.data.input:N.data?.tool_input?k=N.data.tool_input:N.data&&(k=N.data),console.log("[useChatMessagesClientSide] on_tool_start:",{toolName:N.name,eventData:N.data,extractedArgs:k}),R++,C.push({type:"tool-invocation",toolInvocation:{toolName:N.name||"unknown",args:k,state:"pending"}}),s(A=>A.map(I=>I.id===x?{...I,parts:[...C]}:I))}else if(N.event==="on_tool_end"){const k=C.find(A=>A.type==="tool-invocation"&&A.toolInvocation?.toolName===N.name&&!A.toolInvocation?.result);if(console.log("[useChatMessagesClientSide] on_tool_end event:",{toolName:N.name,hasToolPart:!!k,output:N.data?.output}),k&&k.toolInvocation){let A=N.data?.output;if(A?.kwargs?.content&&typeof A.kwargs.content=="string")try{A=JSON.parse(A.kwargs.content)}catch(O){console.warn("[useChatMessagesClientSide] Failed to parse kwargs.content:",O),A=A.kwargs.content}else if(A?.content&&typeof A.content=="string")try{A=JSON.parse(A.content)}catch{A=A.content}k.toolInvocation.result=A,k.toolInvocation.state="result";const I=A?._meta?.["openai/outputTemplate"];if(console.log("[useChatMessagesClientSide] Tool result:",{toolName:N.name,hasMeta:!!A?._meta,hasStructuredContent:!!A?.structuredContent,appsSdkUri:I}),I&&typeof I=="string"&&n){console.log("[useChatMessagesClientSide] Detected Apps SDK component, fetching resource:",I);try{const O=await n(I);console.log("[useChatMessagesClientSide] Resource fetched:",O);const L=A?.structuredContent||null;if(O?.contents&&Array.isArray(O.contents)){const M=O.contents.map(Y=>({type:"resource",resource:Y}));console.log("[useChatMessagesClientSide] Created MCP resources:",M);const P={...A,content:[...A.content||[],...M],structuredContent:L};k.toolInvocation.result=P,console.log("[useChatMessagesClientSide] Updated result with resources")}else console.warn("[useChatMessagesClientSide] No contents in resourceData:",O)}catch(O){console.error("Failed to fetch Apps SDK resource:",O)}}s(O=>O.map(L=>L.id===x?{...L,parts:[...C]}:L))}}}s(N=>N.map(k=>k.id===x?{...k,parts:[...C],content:""}:k)),e&&zr.getInstance().capture(new zO({serverId:t.url,provider:e.provider,model:e.model,messageCount:a.length+1,toolCallsCount:R,success:!0,executionMode:"client-side",duration:Date.now()-S})).catch(()=>{})}catch(x){console.error("Client-side agent error:",x);let _="Unknown error occurred";if(x instanceof Error){_=x.message;const N=x;N.status&&(_=`HTTP ${N.status}: ${_}`),(N.code===401||_.includes("401")||_.includes("Unauthorized"))&&(_="Authentication failed (401). Check your Authorization header in the connection settings.")}e&&zr.getInstance().capture(new zO({serverId:t.url,provider:e.provider,model:e.model,messageCount:a.length+1,toolCallsCount:R,success:!1,executionMode:"client-side",duration:Date.now()-S,error:_})).catch(()=>{});const C={id:`error-${Date.now()}`,role:"assistant",content:`Error: ${_}`,timestamp:Date.now()};s(N=>[...N,C])}finally{c(!1),d.current=null}},[t,e,r,a,n]),v=b.useCallback(()=>{s([]),f.current&&f.current.clearConversationHistory()},[]);return{messages:a,isLoading:l,sendMessage:h,clearMessages:v}}const Bz={openai:"gpt-4o",anthropic:"claude-haiku-4-5-20251001",google:"gemini-2.5-flash"};function fve({mcpServerUrl:t}){const[e,r]=b.useState(null),[n,a]=b.useState(null),[s,l]=b.useState(!1),[c,d]=b.useState("openai"),[f,m]=b.useState(""),[h,v]=b.useState(Bz.openai),[y,w]=b.useState("none"),[S,R]=b.useState(""),[x,_]=b.useState(""),[C,N]=b.useState("");b.useEffect(()=>{const I=localStorage.getItem("mcp-inspector-llm-config");if(I)try{const O=JSON.parse(I);r(O),d(O.provider),m(O.apiKey),v(O.model)}catch(O){console.error("Failed to load LLM config:",O)}},[]),b.useEffect(()=>{const I=localStorage.getItem("mcp-inspector-auth-config");if(I)try{const O=JSON.parse(I);a(O),w(O.type),O.username&&R(O.username),O.password&&_(O.password),O.token&&N(O.token)}catch(O){console.error("Failed to load auth config:",O)}else try{const O="mcp:auth",L=_5(t),M=`${O}_${L}_tokens`;localStorage.getItem(M)&&(a({type:"oauth"}),w("oauth"))}catch(O){console.error("Failed to check for OAuth tokens:",O)}},[t]),b.useEffect(()=>{v(Bz[c])},[c]);const k=b.useCallback(()=>{if(!f.trim())return;const I={provider:c,apiKey:f,model:h},O={type:y,...y==="basic"&&{username:S.trim(),password:x.trim()},...y==="bearer"&&{token:C.trim()}};r(I),a(O),localStorage.setItem("mcp-inspector-llm-config",JSON.stringify(I)),localStorage.setItem("mcp-inspector-auth-config",JSON.stringify(O)),l(!1)},[c,f,h,y,S,x,C]),A=b.useCallback(()=>{r(null),a(null),m(""),R(""),_(""),N(""),w("none"),localStorage.removeItem("mcp-inspector-llm-config"),localStorage.removeItem("mcp-inspector-auth-config")},[]);return{llmConfig:e,authConfig:n,configDialogOpen:s,setConfigDialogOpen:l,tempProvider:c,setTempProvider:d,tempApiKey:f,setTempApiKey:m,tempModel:h,setTempModel:v,tempAuthType:y,saveLLMConfig:k,clearConfig:A}}function pve({connection:t,isConnected:e,useClientSide:r=!0,readResource:n}){const[a,s]=b.useState(""),l=b.useRef(null),{llmConfig:c,authConfig:d,configDialogOpen:f,setConfigDialogOpen:m,tempProvider:h,setTempProvider:v,tempApiKey:y,setTempApiKey:w,tempModel:S,setTempModel:R,saveLLMConfig:x,clearConfig:_}=fve({mcpServerUrl:t.url}),C={connection:t,llmConfig:c,isConnected:e,readResource:n},N=uve({mcpServerUrl:t.url,llmConfig:c,authConfig:d,isConnected:e}),k=dve(C),{messages:A,isLoading:I,sendMessage:O,clearMessages:L}=r?k:N;M4({onNewChat:L}),b.useEffect(()=>{c&&A.length===0&&l.current&&l.current.focus()},[c,A.length]),b.useEffect(()=>{!I&&A.length>0&&l.current&&l.current.focus()},[I,A.length]);const M=b.useCallback(()=>{a.trim()&&(O(a),s(""))},[a,O]),P=b.useCallback(Q=>{Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),M())},[M]),Y=b.useCallback(()=>{_(),L()},[_,L]);return c&&A.length===0?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"absolute top-4 right-4 z-10",children:g.jsx(Tq,{open:f,onOpenChange:m,tempProvider:h,tempModel:S,tempApiKey:y,onProviderChange:v,onModelChange:R,onApiKeyChange:w,onSave:x,onClear:Y,showClearButton:!0,buttonLabel:"Change API Key"})}),g.jsx(sse,{mcpServerUrl:t.url,inputValue:a,isConnected:e,isLoading:I,textareaRef:l,llmConfig:c,onInputChange:s,onKeyDown:P,onSubmit:Q=>{Q.preventDefault(),M()},onConfigDialogOpenChange:m})]}):g.jsxs("div",{className:"flex flex-col h-full relative",children:[g.jsx(ase,{llmConfig:c,hasMessages:A.length>0,configDialogOpen:f,onConfigDialogOpenChange:m,onClearChat:L,tempProvider:h,tempModel:S,tempApiKey:y,onProviderChange:v,onModelChange:R,onApiKeyChange:w,onSaveConfig:x,onClearConfig:Y}),g.jsx("div",{className:"flex-1 overflow-y-auto p-4 pt-[100px]",children:c?g.jsx(cve,{messages:A,isLoading:I,serverId:t.url,readResource:n}):g.jsx(lse,{onConfigureClick:()=>m(!0)})}),c&&g.jsx(ose,{inputValue:a,isConnected:e,isLoading:I,textareaRef:l,onInputChange:s,onKeyDown:P,onSendMessage:M})]})}const xh=b.createContext(null);xh.displayName="PanelGroupContext";const gr={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},GC=10,gs=b.useLayoutEffect,qz=$m.useId,mve=typeof qz=="function"?qz:()=>null;let hve=0;function WC(t=null){const e=mve(),r=b.useRef(t||e||null);return r.current===null&&(r.current=""+hve++),t??r.current}function T5({children:t,className:e="",collapsedSize:r,collapsible:n,defaultSize:a,forwardedRef:s,id:l,maxSize:c,minSize:d,onCollapse:f,onExpand:m,onResize:h,order:v,style:y,tagName:w="div",...S}){const R=b.useContext(xh);if(R===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:_,getPanelSize:C,getPanelStyle:N,groupId:k,isPanelCollapsed:A,reevaluatePanelConstraints:I,registerPanel:O,resizePanel:L,unregisterPanel:M}=R,P=WC(l),Y=b.useRef({callbacks:{onCollapse:f,onExpand:m,onResize:h},constraints:{collapsedSize:r,collapsible:n,defaultSize:a,maxSize:c,minSize:d},id:P,idIsFromProps:l!==void 0,order:v});b.useRef({didLogMissingDefaultSizeWarning:!1}),gs(()=>{const{callbacks:J,constraints:ee}=Y.current,U={...ee};Y.current.id=P,Y.current.idIsFromProps=l!==void 0,Y.current.order=v,J.onCollapse=f,J.onExpand=m,J.onResize=h,ee.collapsedSize=r,ee.collapsible=n,ee.defaultSize=a,ee.maxSize=c,ee.minSize=d,(U.collapsedSize!==ee.collapsedSize||U.collapsible!==ee.collapsible||U.maxSize!==ee.maxSize||U.minSize!==ee.minSize)&&I(Y.current,U)}),gs(()=>{const J=Y.current;return O(J),()=>{M(J)}},[v,P,O,M]),b.useImperativeHandle(s,()=>({collapse:()=>{x(Y.current)},expand:J=>{_(Y.current,J)},getId(){return P},getSize(){return C(Y.current)},isCollapsed(){return A(Y.current)},isExpanded(){return!A(Y.current)},resize:J=>{L(Y.current,J)}}),[x,_,C,A,P,L]);const Q=N(Y.current,a);return b.createElement(w,{...S,children:t,className:e,id:P,style:{...Q,...y},[gr.groupId]:k,[gr.panel]:"",[gr.panelCollapsible]:n||void 0,[gr.panelId]:P,[gr.panelSize]:parseFloat(""+Q.flexGrow).toFixed(1)})}const R5=b.forwardRef((t,e)=>b.createElement(T5,{...t,forwardedRef:e}));T5.displayName="Panel";R5.displayName="forwardRef(Panel)";let BT=null,Qp=-1,yi=null;function gve(t,e,r){const n=(e&I5)!==0,a=(e&O5)!==0,s=(e&D5)!==0,l=(e&L5)!==0;if(e){if(n)return s?"se-resize":l?"ne-resize":"e-resize";if(a)return s?"sw-resize":l?"nw-resize":"w-resize";if(s)return"s-resize";if(l)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function vve(){yi!==null&&(document.head.removeChild(yi),BT=null,yi=null,Qp=-1)}function u_(t,e,r){var n,a;const s=gve(t,e);if(BT!==s){if(BT=s,yi===null&&(yi=document.createElement("style"),document.head.appendChild(yi)),Qp>=0){var l;(l=yi.sheet)===null||l===void 0||l.removeRule(Qp)}Qp=(n=(a=yi.sheet)===null||a===void 0?void 0:a.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function C5(t){return t.type==="keydown"}function A5(t){return t.type.startsWith("pointer")}function N5(t){return t.type.startsWith("mouse")}function wh(t){if(A5(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(N5(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function bve(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function yve(t,e,r){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Eve(t,e){if(t===e)throw new Error("Cannot compare node with itself");const r={a:Gz(t),b:Gz(e)};let n;for(;r.a.at(-1)===r.b.at(-1);)t=r.a.pop(),e=r.b.pop(),n=t;gt(n,"Stacking order can only be calculated for elements with a common ancestor");const a={a:Vz(Hz(r.a)),b:Vz(Hz(r.b))};if(a.a===a.b){const s=n.childNodes,l={a:r.a.at(-1),b:r.b.at(-1)};let c=s.length;for(;c--;){const d=s[c];if(d===l.a)return 1;if(d===l.b)return-1}}return Math.sign(a.a-a.b)}const Sve=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function xve(t){var e;const r=getComputedStyle((e=k5(t))!==null&&e!==void 0?e:t).display;return r==="flex"||r==="inline-flex"}function wve(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||xve(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Sve.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Hz(t){let e=t.length;for(;e--;){const r=t[e];if(gt(r,"Missing node"),wve(r))return r}return null}function Vz(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Gz(t){const e=[];for(;t;)e.push(t),t=k5(t);return e}function k5(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const I5=1,O5=2,D5=4,L5=8,_ve=bve()==="coarse";let Ea=[],Bl=!1,Ei=new Map,_h=new Map;const yd=new Set;function Tve(t,e,r,n,a){var s;const{ownerDocument:l}=e,c={direction:r,element:e,hitAreaMargins:n,setResizeHandlerState:a},d=(s=Ei.get(l))!==null&&s!==void 0?s:0;return Ei.set(l,d+1),yd.add(c),Om(),function(){var m;_h.delete(t),yd.delete(c);const h=(m=Ei.get(l))!==null&&m!==void 0?m:1;if(Ei.set(l,h-1),Om(),h===1&&Ei.delete(l),Ea.includes(c)){const v=Ea.indexOf(c);v>=0&&Ea.splice(v,1),Th(),a("up",!0,null)}}}function Rve(t){const{target:e}=t,{x:r,y:n}=wh(t);Bl=!0,YC({target:e,x:r,y:n}),Om(),Ea.length>0&&(Dm("down",t),Th(),t.preventDefault(),M5(e)||t.stopImmediatePropagation())}function d_(t){const{x:e,y:r}=wh(t);if(Bl&&t.type!=="pointerleave"&&t.buttons===0&&(Bl=!1,Dm("up",t)),!Bl){const{target:n}=t;YC({target:n,x:e,y:r})}Dm("move",t),Th(),Ea.length>0&&t.preventDefault()}function f_(t){const{target:e}=t,{x:r,y:n}=wh(t);_h.clear(),Bl=!1,Ea.length>0&&(t.preventDefault(),M5(e)||t.stopImmediatePropagation()),Dm("up",t),YC({target:e,x:r,y:n}),Th(),Om()}function M5(t){let e=t;for(;e;){if(e.hasAttribute(gr.resizeHandle))return!0;e=e.parentElement}return!1}function YC({target:t,x:e,y:r}){Ea.splice(0);let n=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(n=t),yd.forEach(a=>{const{element:s,hitAreaMargins:l}=a,c=s.getBoundingClientRect(),{bottom:d,left:f,right:m,top:h}=c,v=_ve?l.coarse:l.fine;if(e>=f-v&&e<=m+v&&r>=h-v&&r<=d+v){if(n!==null&&document.contains(n)&&s!==n&&!s.contains(n)&&!n.contains(s)&&Eve(n,s)>0){let w=n,S=!1;for(;w&&!w.contains(s);){if(yve(w.getBoundingClientRect(),c)){S=!0;break}w=w.parentElement}if(S)return}Ea.push(a)}})}function p_(t,e){_h.set(t,e)}function Th(){let t=!1,e=!1;Ea.forEach(n=>{const{direction:a}=n;a==="horizontal"?t=!0:e=!0});let r=0;_h.forEach(n=>{r|=n}),t&&e?u_("intersection",r):t?u_("horizontal",r):e?u_("vertical",r):vve()}let m_;function Om(){var t;(t=m_)===null||t===void 0||t.abort(),m_=new AbortController;const e={capture:!0,signal:m_.signal};yd.size&&(Bl?(Ea.length>0&&Ei.forEach((r,n)=>{const{body:a}=n;r>0&&(a.addEventListener("contextmenu",f_,e),a.addEventListener("pointerleave",d_,e),a.addEventListener("pointermove",d_,e))}),Ei.forEach((r,n)=>{const{body:a}=n;a.addEventListener("pointerup",f_,e),a.addEventListener("pointercancel",f_,e)})):Ei.forEach((r,n)=>{const{body:a}=n;r>0&&(a.addEventListener("pointerdown",Rve,e),a.addEventListener("pointermove",d_,e))}))}function Dm(t,e){yd.forEach(r=>{const{setResizeHandlerState:n}=r,a=Ea.includes(r);n(t,a,e)})}function Cve(){const[t,e]=b.useState(0);return b.useCallback(()=>e(r=>r+1),[])}function gt(t,e){if(!t)throw console.error(e),Error(e)}function As(t,e,r=GC){return t.toFixed(r)===e.toFixed(r)?0:t>e?1:-1}function _o(t,e,r=GC){return As(t,e,r)===0}function jn(t,e,r){return As(t,e,r)===0}function Ave(t,e,r){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++){const a=t[n],s=e[n];if(!jn(a,s,r))return!1}return!0}function Pl({panelConstraints:t,panelIndex:e,size:r}){const n=t[e];gt(n!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:a=0,collapsible:s,maxSize:l=100,minSize:c=0}=n;if(As(r,c)<0)if(s){const d=(a+c)/2;As(r,d)<0?r=a:r=c}else r=c;return r=Math.min(l,r),r=parseFloat(r.toFixed(GC)),r}function Lu({delta:t,initialLayout:e,panelConstraints:r,pivotIndices:n,prevLayout:a,trigger:s}){if(jn(t,0))return e;const l=[...e],[c,d]=n;gt(c!=null,"Invalid first pivot index"),gt(d!=null,"Invalid second pivot index");let f=0;if(s==="keyboard"){{const h=t<0?d:c,v=r[h];gt(v,`Panel constraints not found for index ${h}`);const{collapsedSize:y=0,collapsible:w,minSize:S=0}=v;if(w){const R=e[h];if(gt(R!=null,`Previous layout not found for panel index ${h}`),jn(R,y)){const x=S-R;As(x,Math.abs(t))>0&&(t=t<0?0-x:x)}}}{const h=t<0?c:d,v=r[h];gt(v,`No panel constraints found for index ${h}`);const{collapsedSize:y=0,collapsible:w,minSize:S=0}=v;if(w){const R=e[h];if(gt(R!=null,`Previous layout not found for panel index ${h}`),jn(R,S)){const x=R-y;As(x,Math.abs(t))>0&&(t=t<0?0-x:x)}}}}{const h=t<0?1:-1;let v=t<0?d:c,y=0;for(;;){const S=e[v];gt(S!=null,`Previous layout not found for panel index ${v}`);const x=Pl({panelConstraints:r,panelIndex:v,size:100})-S;if(y+=x,v+=h,v<0||v>=r.length)break}const w=Math.min(Math.abs(t),Math.abs(y));t=t<0?0-w:w}{let v=t<0?c:d;for(;v>=0&&v<r.length;){const y=Math.abs(t)-Math.abs(f),w=e[v];gt(w!=null,`Previous layout not found for panel index ${v}`);const S=w-y,R=Pl({panelConstraints:r,panelIndex:v,size:S});if(!jn(w,R)&&(f+=w-R,l[v]=R,f.toFixed(3).localeCompare(Math.abs(t).toFixed(3),void 0,{numeric:!0})>=0))break;t<0?v--:v++}}if(Ave(a,l))return a;{const h=t<0?d:c,v=e[h];gt(v!=null,`Previous layout not found for panel index ${h}`);const y=v+f,w=Pl({panelConstraints:r,panelIndex:h,size:y});if(l[h]=w,!jn(w,y)){let S=y-w,x=t<0?d:c;for(;x>=0&&x<r.length;){const _=l[x];gt(_!=null,`Previous layout not found for panel index ${x}`);const C=_+S,N=Pl({panelConstraints:r,panelIndex:x,size:C});if(jn(_,N)||(S-=N-_,l[x]=N),jn(S,0))break;t>0?x--:x++}}}const m=l.reduce((h,v)=>v+h,0);return jn(m,100)?l:a}function Nve({layout:t,panelsArray:e,pivotIndices:r}){let n=0,a=100,s=0,l=0;const c=r[0];gt(c!=null,"No pivot index found"),e.forEach((h,v)=>{const{constraints:y}=h,{maxSize:w=100,minSize:S=0}=y;v===c?(n=S,a=w):(s+=S,l+=w)});const d=Math.min(a,100-s),f=Math.max(n,100-l),m=t[c];return{valueMax:d,valueMin:f,valueNow:m}}function Ed(t,e=document){return Array.from(e.querySelectorAll(`[${gr.resizeHandleId}][data-panel-group-id="${t}"]`))}function P5(t,e,r=document){const a=Ed(t,r).findIndex(s=>s.getAttribute(gr.resizeHandleId)===e);return a??null}function j5(t,e,r){const n=P5(t,e,r);return n!=null?[n,n+1]:[-1,-1]}function kve(t){return t instanceof HTMLElement?!0:typeof t=="object"&&t!==null&&"tagName"in t&&"getAttribute"in t}function U5(t,e=document){if(kve(e)&&e.dataset.panelGroupId==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Rh(t,e=document){const r=e.querySelector(`[${gr.resizeHandleId}="${t}"]`);return r||null}function Ive(t,e,r,n=document){var a,s,l,c;const d=Rh(e,n),f=Ed(t,n),m=d?f.indexOf(d):-1,h=(a=(s=r[m])===null||s===void 0?void 0:s.id)!==null&&a!==void 0?a:null,v=(l=(c=r[m+1])===null||c===void 0?void 0:c.id)!==null&&l!==void 0?l:null;return[h,v]}function Ove({committedValuesRef:t,eagerValuesRef:e,groupId:r,layout:n,panelDataArray:a,panelGroupElement:s,setLayout:l}){b.useRef({didWarnAboutMissingResizeHandle:!1}),gs(()=>{if(!s)return;const c=Ed(r,s);for(let d=0;d<a.length-1;d++){const{valueMax:f,valueMin:m,valueNow:h}=Nve({layout:n,panelsArray:a,pivotIndices:[d,d+1]}),v=c[d];if(v!=null){const y=a[d];gt(y,`No panel data found for index "${d}"`),v.setAttribute("aria-controls",y.id),v.setAttribute("aria-valuemax",""+Math.round(f)),v.setAttribute("aria-valuemin",""+Math.round(m)),v.setAttribute("aria-valuenow",h!=null?""+Math.round(h):"")}}return()=>{c.forEach((d,f)=>{d.removeAttribute("aria-controls"),d.removeAttribute("aria-valuemax"),d.removeAttribute("aria-valuemin"),d.removeAttribute("aria-valuenow")})}},[r,n,a,s]),b.useEffect(()=>{if(!s)return;const c=e.current;gt(c,"Eager values not found");const{panelDataArray:d}=c,f=U5(r,s);gt(f!=null,`No group found for id "${r}"`);const m=Ed(r,s);gt(m,`No resize handles found for group id "${r}"`);const h=m.map(v=>{const y=v.getAttribute(gr.resizeHandleId);gt(y,"Resize handle element has no handle id attribute");const[w,S]=Ive(r,y,d,s);if(w==null||S==null)return()=>{};const R=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const _=d.findIndex(C=>C.id===w);if(_>=0){const C=d[_];gt(C,`No panel data found for index ${_}`);const N=n[_],{collapsedSize:k=0,collapsible:A,minSize:I=0}=C.constraints;if(N!=null&&A){const O=Lu({delta:jn(N,k)?I-k:k-N,initialLayout:n,panelConstraints:d.map(L=>L.constraints),pivotIndices:j5(r,y,s),prevLayout:n,trigger:"keyboard"});n!==O&&l(O)}}break}}};return v.addEventListener("keydown",R),()=>{v.removeEventListener("keydown",R)}});return()=>{h.forEach(v=>v())}},[s,t,e,r,n,a,l])}function Wz(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function F5(t,e){const r=t==="horizontal",{x:n,y:a}=wh(e);return r?n:a}function Dve(t,e,r,n,a){const s=r==="horizontal",l=Rh(e,a);gt(l,`No resize handle element found for id "${e}"`);const c=l.getAttribute(gr.groupId);gt(c,"Resize handle element has no group id attribute");let{initialCursorPosition:d}=n;const f=F5(r,t),m=U5(c,a);gt(m,`No group element found for id "${c}"`);const h=m.getBoundingClientRect(),v=s?h.width:h.height;return(f-d)/v*100}function Lve(t,e,r,n,a,s){if(C5(t)){const l=r==="horizontal";let c=0;t.shiftKey?c=100:a!=null?c=a:c=10;let d=0;switch(t.key){case"ArrowDown":d=l?0:c;break;case"ArrowLeft":d=l?-c:0;break;case"ArrowRight":d=l?c:0;break;case"ArrowUp":d=l?0:-c;break;case"End":d=100;break;case"Home":d=-100;break}return d}else return n==null?0:Dve(t,e,r,n,s)}function Mve({panelDataArray:t}){const e=Array(t.length),r=t.map(s=>s.constraints);let n=0,a=100;for(let s=0;s<t.length;s++){const l=r[s];gt(l,`Panel constraints not found for index ${s}`);const{defaultSize:c}=l;c!=null&&(n++,e[s]=c,a-=c)}for(let s=0;s<t.length;s++){const l=r[s];gt(l,`Panel constraints not found for index ${s}`);const{defaultSize:c}=l;if(c!=null)continue;const d=t.length-n,f=a/d;n++,e[s]=f,a-=f}return e}function gl(t,e,r){e.forEach((n,a)=>{const s=t[a];gt(s,`Panel data not found for index ${a}`);const{callbacks:l,constraints:c,id:d}=s,{collapsedSize:f=0,collapsible:m}=c,h=r[d];if(h==null||n!==h){r[d]=n;const{onCollapse:v,onExpand:y,onResize:w}=l;w&&w(n,h),m&&(v||y)&&(y&&(h==null||_o(h,f))&&!_o(n,f)&&y(),v&&(h==null||!_o(h,f))&&_o(n,f)&&v())}})}function Np(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!=e[r])return!1;return!0}function Pve({defaultSize:t,dragState:e,layout:r,panelData:n,panelIndex:a,precision:s=3}){const l=r[a];let c;return l==null?c=t!=null?t.toFixed(s):"1":n.length===1?c="1":c=l.toFixed(s),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function jve(t,e=10){let r=null;return(...a)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...a)},e)}}function Yz(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,r)=>{localStorage.setItem(e,r)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function z5(t){return`react-resizable-panels:${t}`}function $5(t){return t.map(e=>{const{constraints:r,id:n,idIsFromProps:a,order:s}=e;return a?n:s?`${s}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((e,r)=>e.localeCompare(r)).join(",")}function B5(t,e){try{const r=z5(t),n=e.getItem(r);if(n){const a=JSON.parse(n);if(typeof a=="object"&&a!=null)return a}}catch{}return null}function Uve(t,e,r){var n,a;const s=(n=B5(t,r))!==null&&n!==void 0?n:{},l=$5(e);return(a=s[l])!==null&&a!==void 0?a:null}function Fve(t,e,r,n,a){var s;const l=z5(t),c=$5(e),d=(s=B5(t,a))!==null&&s!==void 0?s:{};d[c]={expandToSizes:Object.fromEntries(r.entries()),layout:n};try{a.setItem(l,JSON.stringify(d))}catch(f){console.error(f)}}function Kz({layout:t,panelConstraints:e}){const r=[...t],n=r.reduce((s,l)=>s+l,0);if(r.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${r.map(s=>`${s}%`).join(", ")}`);if(!jn(n,100)&&r.length>0)for(let s=0;s<e.length;s++){const l=r[s];gt(l!=null,`No layout data found for index ${s}`);const c=100/n*l;r[s]=c}let a=0;for(let s=0;s<e.length;s++){const l=r[s];gt(l!=null,`No layout data found for index ${s}`);const c=Pl({panelConstraints:e,panelIndex:s,size:l});l!=c&&(a+=l-c,r[s]=c)}if(!jn(a,0))for(let s=0;s<e.length;s++){const l=r[s];gt(l!=null,`No layout data found for index ${s}`);const c=l+a,d=Pl({panelConstraints:e,panelIndex:s,size:c});if(l!==d&&(a-=d-l,r[s]=d,jn(a,0)))break}return r}const zve=100,Mu={getItem:t=>(Yz(Mu),Mu.getItem(t)),setItem:(t,e)=>{Yz(Mu),Mu.setItem(t,e)}},Zz={};function q5({autoSaveId:t=null,children:e,className:r="",direction:n,forwardedRef:a,id:s=null,onLayout:l=null,keyboardResizeBy:c=null,storage:d=Mu,style:f,tagName:m="div",...h}){const v=WC(s),y=b.useRef(null),[w,S]=b.useState(null),[R,x]=b.useState([]),_=Cve(),C=b.useRef({}),N=b.useRef(new Map),k=b.useRef(0),A=b.useRef({autoSaveId:t,direction:n,dragState:w,id:v,keyboardResizeBy:c,onLayout:l,storage:d}),I=b.useRef({layout:R,panelDataArray:[],panelDataArrayChanged:!1});b.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),b.useImperativeHandle(a,()=>({getId:()=>A.current.id,getLayout:()=>{const{layout:$}=I.current;return $},setLayout:$=>{const{onLayout:W}=A.current,{layout:te,panelDataArray:F}=I.current,j=Kz({layout:$,panelConstraints:F.map(Z=>Z.constraints)});Wz(te,j)||(x(j),I.current.layout=j,W&&W(j),gl(F,j,C.current))}}),[]),gs(()=>{A.current.autoSaveId=t,A.current.direction=n,A.current.dragState=w,A.current.id=v,A.current.onLayout=l,A.current.storage=d}),Ove({committedValuesRef:A,eagerValuesRef:I,groupId:v,layout:R,panelDataArray:I.current.panelDataArray,setLayout:x,panelGroupElement:y.current}),b.useEffect(()=>{const{panelDataArray:$}=I.current;if(t){if(R.length===0||R.length!==$.length)return;let W=Zz[t];W==null&&(W=jve(Fve,zve),Zz[t]=W);const te=[...$],F=new Map(N.current);W(t,te,F,R,d)}},[t,R,d]),b.useEffect(()=>{});const O=b.useCallback($=>{const{onLayout:W}=A.current,{layout:te,panelDataArray:F}=I.current;if($.constraints.collapsible){const j=F.map(de=>de.constraints),{collapsedSize:Z=0,panelSize:ne,pivotIndices:V}=os(F,$,te);if(gt(ne!=null,`Panel size not found for panel "${$.id}"`),!_o(ne,Z)){N.current.set($.id,ne);const fe=Cl(F,$)===F.length-1?ne-Z:Z-ne,Re=Lu({delta:fe,initialLayout:te,panelConstraints:j,pivotIndices:V,prevLayout:te,trigger:"imperative-api"});Np(te,Re)||(x(Re),I.current.layout=Re,W&&W(Re),gl(F,Re,C.current))}}},[]),L=b.useCallback(($,W)=>{const{onLayout:te}=A.current,{layout:F,panelDataArray:j}=I.current;if($.constraints.collapsible){const Z=j.map(be=>be.constraints),{collapsedSize:ne=0,panelSize:V=0,minSize:de=0,pivotIndices:fe}=os(j,$,F),Re=W??de;if(_o(V,ne)){const be=N.current.get($.id),xe=be!=null&&be>=Re?be:Re,ze=Cl(j,$)===j.length-1?V-xe:xe-V,Me=Lu({delta:ze,initialLayout:F,panelConstraints:Z,pivotIndices:fe,prevLayout:F,trigger:"imperative-api"});Np(F,Me)||(x(Me),I.current.layout=Me,te&&te(Me),gl(j,Me,C.current))}}},[]),M=b.useCallback($=>{const{layout:W,panelDataArray:te}=I.current,{panelSize:F}=os(te,$,W);return gt(F!=null,`Panel size not found for panel "${$.id}"`),F},[]),P=b.useCallback(($,W)=>{const{panelDataArray:te}=I.current,F=Cl(te,$);return Pve({defaultSize:W,dragState:w,layout:R,panelData:te,panelIndex:F})},[w,R]),Y=b.useCallback($=>{const{layout:W,panelDataArray:te}=I.current,{collapsedSize:F=0,collapsible:j,panelSize:Z}=os(te,$,W);return gt(Z!=null,`Panel size not found for panel "${$.id}"`),j===!0&&_o(Z,F)},[]),Q=b.useCallback($=>{const{layout:W,panelDataArray:te}=I.current,{collapsedSize:F=0,collapsible:j,panelSize:Z}=os(te,$,W);return gt(Z!=null,`Panel size not found for panel "${$.id}"`),!j||As(Z,F)>0},[]),J=b.useCallback($=>{const{panelDataArray:W}=I.current;W.push($),W.sort((te,F)=>{const j=te.order,Z=F.order;return j==null&&Z==null?0:j==null?-1:Z==null?1:j-Z}),I.current.panelDataArrayChanged=!0,_()},[_]);gs(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:$,onLayout:W,storage:te}=A.current,{layout:F,panelDataArray:j}=I.current;let Z=null;if($){const V=Uve($,j,te);V&&(N.current=new Map(Object.entries(V.expandToSizes)),Z=V.layout)}Z==null&&(Z=Mve({panelDataArray:j}));const ne=Kz({layout:Z,panelConstraints:j.map(V=>V.constraints)});Wz(F,ne)||(x(ne),I.current.layout=ne,W&&W(ne),gl(j,ne,C.current))}}),gs(()=>{const $=I.current;return()=>{$.layout=[]}},[]);const ee=b.useCallback($=>{let W=!1;const te=y.current;return te&&window.getComputedStyle(te,null).getPropertyValue("direction")==="rtl"&&(W=!0),function(j){j.preventDefault();const Z=y.current;if(!Z)return()=>null;const{direction:ne,dragState:V,id:de,keyboardResizeBy:fe,onLayout:Re}=A.current,{layout:be,panelDataArray:xe}=I.current,{initialLayout:Ne}=V??{},ze=j5(de,$,Z);let Me=Lve(j,$,ne,V,fe,Z);const $e=ne==="horizontal";$e&&W&&(Me=-Me);const ct=xe.map(Fe=>Fe.constraints),ce=Lu({delta:Me,initialLayout:Ne??be,panelConstraints:ct,pivotIndices:ze,prevLayout:be,trigger:C5(j)?"keyboard":"mouse-or-touch"}),Ce=!Np(be,ce);(A5(j)||N5(j))&&k.current!=Me&&(k.current=Me,!Ce&&Me!==0?$e?p_($,Me<0?I5:O5):p_($,Me<0?D5:L5):p_($,0)),Ce&&(x(ce),I.current.layout=ce,Re&&Re(ce),gl(xe,ce,C.current))}},[]),U=b.useCallback(($,W)=>{const{onLayout:te}=A.current,{layout:F,panelDataArray:j}=I.current,Z=j.map(be=>be.constraints),{panelSize:ne,pivotIndices:V}=os(j,$,F);gt(ne!=null,`Panel size not found for panel "${$.id}"`);const fe=Cl(j,$)===j.length-1?ne-W:W-ne,Re=Lu({delta:fe,initialLayout:F,panelConstraints:Z,pivotIndices:V,prevLayout:F,trigger:"imperative-api"});Np(F,Re)||(x(Re),I.current.layout=Re,te&&te(Re),gl(j,Re,C.current))},[]),G=b.useCallback(($,W)=>{const{layout:te,panelDataArray:F}=I.current,{collapsedSize:j=0,collapsible:Z}=W,{collapsedSize:ne=0,collapsible:V,maxSize:de=100,minSize:fe=0}=$.constraints,{panelSize:Re}=os(F,$,te);Re!=null&&(Z&&V&&_o(Re,j)?_o(j,ne)||U($,ne):Re<fe?U($,fe):Re>de&&U($,de))},[U]),H=b.useCallback(($,W)=>{const{direction:te}=A.current,{layout:F}=I.current;if(!y.current)return;const j=Rh($,y.current);gt(j,`Drag handle element not found for id "${$}"`);const Z=F5(te,W);S({dragHandleId:$,dragHandleRect:j.getBoundingClientRect(),initialCursorPosition:Z,initialLayout:F})},[]),X=b.useCallback(()=>{S(null)},[]),ae=b.useCallback($=>{const{panelDataArray:W}=I.current,te=Cl(W,$);te>=0&&(W.splice(te,1),delete C.current[$.id],I.current.panelDataArrayChanged=!0,_())},[_]),z=b.useMemo(()=>({collapsePanel:O,direction:n,dragState:w,expandPanel:L,getPanelSize:M,getPanelStyle:P,groupId:v,isPanelCollapsed:Y,isPanelExpanded:Q,reevaluatePanelConstraints:G,registerPanel:J,registerResizeHandle:ee,resizePanel:U,startDragging:H,stopDragging:X,unregisterPanel:ae,panelGroupElement:y.current}),[O,w,n,L,M,P,v,Y,Q,G,J,ee,U,H,X,ae]),q={display:"flex",flexDirection:n==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return b.createElement(xh.Provider,{value:z},b.createElement(m,{...h,children:e,className:r,id:s,ref:y,style:{...q,...f},[gr.group]:"",[gr.groupDirection]:n,[gr.groupId]:v}))}const H5=b.forwardRef((t,e)=>b.createElement(q5,{...t,forwardedRef:e}));q5.displayName="PanelGroup";H5.displayName="forwardRef(PanelGroup)";function Cl(t,e){return t.findIndex(r=>r===e||r.id===e.id)}function os(t,e,r){const n=Cl(t,e),s=n===t.length-1?[n-1,n]:[n,n+1],l=r[n];return{...e.constraints,panelSize:l,pivotIndices:s}}function $ve({disabled:t,handleId:e,resizeHandler:r,panelGroupElement:n}){b.useEffect(()=>{if(t||r==null||n==null)return;const a=Rh(e,n);if(a==null)return;const s=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),r(l);break}case"F6":{l.preventDefault();const c=a.getAttribute(gr.groupId);gt(c,`No group element found for id "${c}"`);const d=Ed(c,n),f=P5(c,e,n);gt(f!==null,`No resize element found for id "${e}"`);const m=l.shiftKey?f>0?f-1:d.length-1:f+1<d.length?f+1:0;d[m].focus();break}}};return a.addEventListener("keydown",s),()=>{a.removeEventListener("keydown",s)}},[n,t,e,r])}function V5({children:t=null,className:e="",disabled:r=!1,hitAreaMargins:n,id:a,onBlur:s,onClick:l,onDragging:c,onFocus:d,onPointerDown:f,onPointerUp:m,style:h={},tabIndex:v=0,tagName:y="div",...w}){var S,R;const x=b.useRef(null),_=b.useRef({onClick:l,onDragging:c,onPointerDown:f,onPointerUp:m});b.useEffect(()=>{_.current.onClick=l,_.current.onDragging=c,_.current.onPointerDown=f,_.current.onPointerUp=m});const C=b.useContext(xh);if(C===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:k,registerResizeHandle:A,startDragging:I,stopDragging:O,panelGroupElement:L}=C,M=WC(a),[P,Y]=b.useState("inactive"),[Q,J]=b.useState(!1),[ee,U]=b.useState(null),G=b.useRef({state:P});gs(()=>{G.current.state=P}),b.useEffect(()=>{if(r)U(null);else{const z=A(M);U(()=>z)}},[r,M,A]);const H=(S=n?.coarse)!==null&&S!==void 0?S:15,X=(R=n?.fine)!==null&&R!==void 0?R:5;b.useEffect(()=>{if(r||ee==null)return;const z=x.current;gt(z,"Element ref not attached");let q=!1;return Tve(M,z,N,{coarse:H,fine:X},(W,te,F)=>{if(!te){Y("inactive");return}switch(W){case"down":{Y("drag"),q=!1,gt(F,'Expected event to be defined for "down" action'),I(M,F);const{onDragging:j,onPointerDown:Z}=_.current;j?.(!0),Z?.();break}case"move":{const{state:j}=G.current;q=!0,j!=="drag"&&Y("hover"),gt(F,'Expected event to be defined for "move" action'),ee(F);break}case"up":{Y("hover"),O();const{onClick:j,onDragging:Z,onPointerUp:ne}=_.current;Z?.(!1),ne?.(),q||j?.();break}}})},[H,N,r,X,A,M,ee,I,O]),$ve({disabled:r,handleId:M,resizeHandler:ee,panelGroupElement:L});const ae={touchAction:"none",userSelect:"none"};return b.createElement(y,{...w,children:t,className:e,id:a,onBlur:()=>{J(!1),s?.()},onFocus:()=>{J(!0),d?.()},ref:x,role:"separator",style:{...ae,...h},tabIndex:v,[gr.groupDirection]:N,[gr.groupId]:k,[gr.resizeHandle]:"",[gr.resizeHandleActive]:P==="drag"?"pointer":Q?"keyboard":void 0,[gr.resizeHandleEnabled]:!r,[gr.resizeHandleId]:M,[gr.resizeHandleState]:P})}V5.displayName="PanelResizeHandle";function Sd({className:t,...e}){return g.jsx(H5,{"data-slot":"resizable-panel-group",className:De("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e})}function ja({...t}){return g.jsx(R5,{"data-slot":"resizable-panel",...t})}function xd({withHandle:t,className:e,...r}){return g.jsx(V5,{"data-slot":"resizable-handle",className:De("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",e),...r,children:t&&g.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:g.jsx(VQ,{className:"size-2.5"})})})}function Gd({id:t,isSelected:e,isFocused:r,icon:n,title:a,description:s,metadata:l,onClick:c,className:d}){return g.jsx("button",{id:t,type:"button",onClick:c,className:De("w-full text-left cursor-pointer p-4 border-b dark:border-zinc-700 hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors group",e&&"bg-zinc-50 dark:bg-zinc-800 border-l-4 border-l-zinc-500",r&&"ring-2 ring-zinc-500 dark:ring-zinc-400 ring-inset",d),children:g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx("div",{className:"flex-shrink-0 mt-1",children:g.jsx("div",{className:De("p-2.5 rounded-full transition-colors",e?"bg-zinc-500 dark:bg-zinc-100/80 text-zinc-100 dark:text-zinc-900":"bg-gray-100 dark:bg-zinc-700 text-gray-600 dark:text-gray-400 group-hover:bg-gray-200 dark:group-hover:bg-zinc-600"),children:n})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"flex items-center gap-2 mb-1",children:g.jsx("h3",{className:De("font-medium truncate font-mono text-sm"),children:a})}),s&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 line-clamp-2",children:s})]})]})})}function G5({className:t,...e}){return g.jsx("kbd",{"data-slot":"kbd",className:De("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",t),...e})}function W5({activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabTitle:n,secondaryTabTitle:a,primaryCount:s,secondaryCount:l,secondaryIcon:c,primaryIcon:d,searchPlaceholder:f="Search...",onSearchExpand:m,onSearchChange:h,onSearchBlur:v,onTabSwitch:y,searchInputRef:w,primaryTabName:S}){const R=t===S;return g.jsxs("div",{className:"flex items-center justify-between p-4 py-3 border-r dark:border-zinc-700",children:[g.jsx("div",{className:"flex items-center gap-2 flex-1",children:e?g.jsx(Or,{ref:w,placeholder:f,value:r,onChange:x=>h(x.target.value),onBlur:v,className:"h-8 border-gray-300 dark:border-zinc-600"}):g.jsxs(g.Fragment,{children:[g.jsx("h2",{className:"text-lg font-medium text-gray-900 dark:text-gray-100",children:R?n:a}),R&&g.jsxs(g.Fragment,{children:[g.jsx(Va,{className:"bg-zinc-500/20 text-zinc-600 dark:text-zinc-400 border-transparent",variant:"outline",children:s}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"ghost",size:"sm",onClick:m,className:"h-8 w-8 p-0",children:g.jsx(LR,{className:"h-4 w-4"})})}),g.jsxs(Fr,{side:"bottom",className:"flex gap-2",children:["Search",g.jsx(G5,{children:"F"})]})]})]})]})}),g.jsxs(tt,{variant:"ghost",size:"sm",onClick:y,className:"gap-2",children:[R?g.jsx(c,{}):g.jsx(d,{}),g.jsx("span",{children:R?a:n}),R&&l>0&&g.jsx(Va,{className:"bg-purple-500/20 text-purple-600 dark:text-purple-400 border-transparent",variant:"outline",children:l})]})]})}function Bve({prompts:t,selectedPrompt:e,onPromptSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(cd,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No prompts available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>g.jsx(Gd,{id:`prompt-${a.name}`,isSelected:e?.name===a.name,isFocused:n===s,icon:g.jsx(cd,{className:"h-4 w-4"}),title:a.name,description:a.description,metadata:a.arguments&&a.arguments.length>0&&g.jsxs(Va,{variant:"outline",className:"text-xs border-gray-300 dark:border-zinc-600 text-gray-600 dark:text-gray-400",children:[a.arguments.length," args"]}),onClick:()=>r(a)},a.name))})}function qve({activeTab:t,isSearchExpanded:e,searchQuery:r,filteredPromptsCount:n,savedPromptsCount:a,onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f}){return g.jsx(W5,{activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabName:"prompts",secondaryTabName:"saved",primaryTabTitle:"Prompts",secondaryTabTitle:"History",primaryCount:n,secondaryCount:a,primaryIcon:cd,secondaryIcon:ic,searchPlaceholder:"Search prompts...",onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f})}function Hve({savedPrompts:t,selectedPrompt:e,onLoadPrompt:r,onDeletePrompt:n,focusedIndex:a}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(ic,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No history"}),g.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500 mt-1",children:"Prompts you execute will appear here"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((s,l)=>g.jsx(Gd,{id:`saved-prompt-${s.id}`,isSelected:e?.id===s.id,isFocused:a===l,icon:g.jsx(ic,{className:"h-4 w-4"}),title:s.name,description:`${s.promptName} - ${new Date(s.savedAt).toLocaleString()}`,onClick:()=>r(s)},s.id))})}function Vve({selectedPrompt:t,promptArgs:e,onArgChange:r}){const n=t?.arguments||[];if(!(n.length>0))return g.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",children:"No arguments required"});const s=l=>{const c=l.name,d=e[c],f=typeof d=="string"?d:JSON.stringify(d);return l.type==="boolean"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("input",{id:c,type:"checkbox",checked:!!d,onChange:m=>r(c,m.target.checked),className:"rounded","aria-label":`Toggle ${c}`}),g.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:l.description})]})]},c):l.type==="number"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:c,type:"number",value:Number(d)||0,onChange:m=>r(c,Number(m.target.value)),placeholder:l.description||`Enter ${c}`}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c):l.type==="array"||l.type==="object"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(mh,{id:c,value:f,onChange:m=>{try{const h=JSON.parse(m.target.value);r(c,h)}catch{r(c,m.target.value)}},placeholder:l.description||`Enter ${c} as JSON`,className:"font-mono text-sm min-h-[100px]"}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c):g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:c,value:f,onChange:m=>r(c,m.target.value),placeholder:l.description||`Enter ${c}`}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c)};return g.jsx("div",{className:"space-y-4",children:n.map(l=>s(l))})}function Gve({selectedPrompt:t,promptArgs:e,isExecuting:r,isConnected:n,onArgChange:a,onExecute:s,onSave:l}){return t?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"flex-shrink-0 p-6 pt-3 pb-4 pr-3",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-0",children:[g.jsx("h3",{className:"text-lg font-semibold mb-2",children:t.name}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(tt,{onClick:s,disabled:r||!n,children:r?g.jsxs(g.Fragment,{children:[g.jsx(Lo,{className:"mr-2"}),"Executing..."]}):g.jsxs(g.Fragment,{children:[g.jsx(NB,{className:"h-4 w-4 mr-2"}),"Execute"]})}),g.jsxs(tt,{variant:"outline",onClick:l,disabled:r,className:"gap-2",children:[g.jsx(DR,{className:"h-4 w-4"}),"Save"]})]})]}),t.description&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 leading-relaxed",children:t.description})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 pb-4 pr-3",children:g.jsx(Vve,{selectedPrompt:t,promptArgs:e,onArgChange:a})})]}):g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a prompt to get started"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a prompt from the list to view its details and execute it"})]})}function Wve({results:t,copiedResult:e,onCopy:r}){return g.jsx("div",{className:"flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",children:g.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.length>0?g.jsx("div",{className:"space-y-4 flex-1 h-full",children:t.map((n,a)=>g.jsxs("div",{className:"space-y-0 flex-1 h-full flex flex-col",children:[g.jsxs("div",{className:"flex items-center gap-2 px-4 pt-2 border-b border-gray-200 dark:border-zinc-600 pb-2",children:[g.jsx("h3",{className:"text-sm font-medium",children:"Response"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ic,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(n.timestamp).toLocaleTimeString()})]}),n.duration!==void 0&&g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ud,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[n.duration,"ms"]})]}),g.jsx("div",{className:"flex gap-2 ml-auto",children:g.jsx(tt,{variant:"ghost",size:"sm",onClick:()=>r(a,n.result),className:"h-6 px-2",children:e===a?g.jsx(Do,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})})})]}),n.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:n.error})]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:n.result,filename:`prompt-result-${n.promptName}-${Date.now()}.json`})})]},a))}):g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"text-center",children:g.jsx(yR,{vertical:!0,noBorder:!0,message:"No Results yet"})})})})})}const Xz="mcp-inspector-saved-prompts";function Y5({ref:t,prompts:e,callPrompt:r,serverId:n,isConnected:a}){const[s,l]=b.useState(null),[c,d]=b.useState(null),{selectedPromptName:f,setSelectedPromptName:m}=Fd(),[h,v]=b.useState({}),[y,w]=b.useState([]),[S,R]=b.useState(!1),[x,_]=b.useState(null),[C,N]=b.useState(""),[k,A]=b.useState("prompts"),[I,O]=b.useState([]),[L,M]=b.useState(!1),[P,Y]=b.useState(""),[Q,J]=b.useState(!1),[ee,U]=b.useState(-1),G=b.useRef(null);b.useImperativeHandle(t,()=>({focusSearch:()=>{J(!0),setTimeout(()=>{G.current&&G.current.focus()},0)},blurSearch:()=>{N(""),J(!1),G.current&&G.current.blur()}})),b.useEffect(()=>{try{const Z=localStorage.getItem(Xz);if(Z){const ne=JSON.parse(Z);O(ne)}}catch(Z){console.error("[PromptsTab] Failed to load saved prompts:",Z)}},[]);const H=b.useCallback(Z=>{try{localStorage.setItem(Xz,JSON.stringify(Z))}catch(ne){console.error("[PromptsTab] Failed to save prompts:",ne)}},[]);b.useEffect(()=>{Q&&G.current&&G.current.focus()},[Q]);const X=b.useCallback(()=>{C.trim()||J(!1)},[C]),ae=b.useMemo(()=>{if(!C.trim())return e;const Z=C.toLowerCase();return e.filter(ne=>ne.name.toLowerCase().includes(Z)||ne.description?.toLowerCase().includes(Z))},[e,C]),z=b.useCallback(Z=>{l(Z);const ne={};Z.arguments&&Z.arguments.forEach(V=>{V.default!==void 0?ne[V.name]=V.default:V.type==="string"?ne[V.name]="":V.type==="number"?ne[V.name]=0:V.type==="boolean"?ne[V.name]=!1:V.type==="array"?ne[V.name]=[]:V.type==="object"&&(ne[V.name]={})}),v(ne)},[]),q=b.useCallback(Z=>{const ne=e.find(V=>V.name===Z.promptName);ne&&(l(ne),v(Z.args),d(Z))},[e]);b.useEffect(()=>{U(-1)},[C,k]),b.useEffect(()=>{const Z=ne=>{const V=ne.target;if(V.tagName==="INPUT"||V.tagName==="TEXTAREA"||V.contentEditable==="true"||ne.metaKey||ne.ctrlKey||ne.altKey)return;const fe=k==="prompts"?ae:I;if(ne.key==="ArrowDown")ne.preventDefault(),U(Re=>{const be=Re+1;return be>=fe.length?0:be});else if(ne.key==="ArrowUp")ne.preventDefault(),U(Re=>{const be=Re-1;return be<0?fe.length-1:be});else if(ne.key==="Enter"&&ee>=0)if(ne.preventDefault(),k==="prompts"){const Re=ae[ee];Re&&z(Re)}else{const Re=I[ee];Re&&q(Re)}};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[ee,ae,I,k,z,q]),b.useEffect(()=>{if(ee>=0){const Z=k==="prompts"?`prompt-${ae[ee]?.name}`:`saved-prompt-${I[ee]?.id}`,ne=document.getElementById(Z);ne&&ne.scrollIntoView({behavior:"smooth",block:"nearest"})}},[ee,ae,I,k]),b.useEffect(()=>{if(console.warn("[PromptsTab] Auto-selection effect triggered:",{selectedPromptName:f,promptsCount:e.length,currentSelectedPrompt:s?.name}),f&&e.length>0){const Z=e.find(ne=>ne.name===f);if(console.warn("[PromptsTab] Prompt lookup result:",{selectedPromptName:f,promptFound:!!Z,promptName:Z?.name,shouldSelect:Z&&s?.name!==Z.name}),Z&&s?.name!==Z.name){console.warn("[PromptsTab] Selecting prompt:",Z.name),m(null);const ne=setTimeout(()=>{z(Z);const V=document.getElementById(`prompt-${Z.name}`);V&&(console.warn("[PromptsTab] Scrolling to prompt element"),V.scrollIntoView({behavior:"smooth",block:"nearest"}))},100);return()=>clearTimeout(ne)}}},[f,e,s,z,m]);const $=b.useCallback((Z,ne)=>{v(V=>({...V,[Z]:ne}))},[]),W=b.useCallback(async()=>{if(!s||S)return;R(!0);const Z=Date.now();try{const ne=await r(s.name,h),V=Date.now()-Z;zr.getInstance().capture(new FO({promptName:s.name,serverId:n,success:!0})).catch(()=>{}),w(fe=>[{promptName:s.name,args:h,result:ne,timestamp:Z,duration:V},...fe])}catch(ne){zr.getInstance().capture(new FO({promptName:s.name,serverId:n,success:!1,error:ne instanceof Error?ne.message:"Unknown error"})).catch(()=>{});const de={promptName:s.name,args:h,result:null,error:ne instanceof Error?ne.message:String(ne),timestamp:Z,duration:Date.now()-Z};w(fe=>[de,...fe])}finally{R(!1)}},[s,h,S,r,n]),te=b.useCallback(async(Z,ne)=>{try{await navigator.clipboard.writeText(JSON.stringify(ne,null,2)),_(Z),setTimeout(()=>_(null),2e3)}catch(V){console.error("[PromptsTab] Failed to copy result:",V)}},[]),F=b.useCallback(()=>{s&&(Y(""),M(!0))},[s]),j=b.useCallback(Z=>{H(I.filter(ne=>ne.id!==Z)),c?.id===Z&&d(null)},[I,H,c]);return g.jsxs(Sd,{direction:"horizontal",className:"h-full",children:[g.jsxs(ja,{defaultSize:33,className:"flex flex-col h-full relative",children:[g.jsx(qve,{activeTab:k,isSearchExpanded:Q,searchQuery:C,filteredPromptsCount:ae.length,savedPromptsCount:I.length,onSearchExpand:()=>J(!0),onSearchChange:N,onSearchBlur:X,onTabSwitch:()=>A(k==="prompts"?"saved":"prompts"),searchInputRef:G}),k==="prompts"?g.jsx(Bve,{prompts:ae,selectedPrompt:s,onPromptSelect:z,focusedIndex:ee}):g.jsx(Hve,{savedPrompts:I,selectedPrompt:c,onLoadPrompt:q,onDeletePrompt:j,focusedIndex:ee})]}),g.jsx(xd,{withHandle:!0}),g.jsx(ja,{defaultSize:67,children:g.jsxs(Sd,{direction:"vertical",children:[g.jsx(ja,{defaultSize:40,children:g.jsx(Gve,{selectedPrompt:s,promptArgs:h,isExecuting:S,isConnected:a,onArgChange:$,onExecute:W,onSave:F})}),g.jsx(xd,{withHandle:!0}),g.jsx(ja,{defaultSize:60,children:g.jsx("div",{className:"flex flex-col h-full",children:g.jsx(Wve,{results:y,copiedResult:x,onCopy:te})})})]})})]})}Y5.displayName="PromptsTab";function ql(t){if(!t?.mimeType)return!1;const e=t.mimeType.toLowerCase();return e==="text/html"||e==="text/html+skybridge"||e==="text/uri-list"||e.startsWith("application/vnd.mcp-ui.remote-dom")}function Yve(t){return{uri:t.uri,mimeType:t.mimeType,text:t.text,blob:t.blob}}function K5({resource:t,onUIAction:e,className:r}){const n=async s=>e?.(s),a=Yve(t);return g.jsx("div",{className:r,children:g.jsx(VC,{resource:a,onUIAction:n,htmlProps:{autoResizeIframe:{width:!0,height:!0},style:{width:"100%",minHeight:"200px"},sandboxPermissions:"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"},remoteDomProps:{remoteElements:[ave,nve,ove,ive],library:HC}})})}function Kve({result:t,isLoading:e,previewMode:r,serverId:n,readResource:a,onTogglePreview:s,onCopy:l,onDownload:c,onFullscreen:d,isCopied:f=!1}){let m=[],h;if(t?.resourceAnnotations&&(m=Object.keys(t.resourceAnnotations).filter(S=>S.startsWith("openai/")),h=t.resourceAnnotations["openai/outputTemplate"]),t?.result?.contents?.[0]?._meta){const S=t.result.contents[0]._meta,R=Object.keys(S).filter(x=>x.startsWith("openai/"));R.length>0&&(m=[...m,...R]),!h&&S["openai/outputTemplate"]&&(h=S["openai/outputTemplate"]),!h&&t.uri&&t.uri.startsWith("ui://widget/")&&(h=t.uri)}const v=!!(m.length>0&&h&&typeof h=="string"&&n&&a);if(e)return g.jsx("div",{className:"flex absolute left-0 top-0 items-center justify-center w-full h-full",children:g.jsx(Lo,{className:"size-5"})});if(!t)return g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a resource to view its contents"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a resource from the list to see its data"})]});if(t.error)return g.jsx("div",{className:"p-4",children:g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:t.error})]})});const y=t?.result?.contents&&Array.isArray(t.result.contents)&&t.result.contents.some(S=>S.mimeType&&ql(S)),w=y?t.result.contents.filter(S=>S.mimeType&&ql(S)):[];return g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"flex-shrink-0 px-4 py-3 border-b border-gray-200 dark:border-zinc-700 flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ic,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(t.timestamp).toLocaleTimeString()})]}),(()=>{const S=t?.duration??t.result?.duration??t.result?.metrics?.durationMs;return S!==void 0?g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ud,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[S,"ms"]})]}):null})(),y&&g.jsx(Va,{variant:"outline",className:"text-xs bg-purple-50 dark:bg-purple-900/20 border-none border-purple-200 dark:border-purple-800/50 text-purple-600 dark:text-purple-400",children:"MCP UI"}),v&&g.jsx(Va,{variant:"outline",className:"text-xs bg-blue-50 dark:bg-blue-900/20 border-none border-blue-200 dark:border-blue-800/50 text-blue-600 dark:text-blue-400",children:"OpenAI Widget"})]}),g.jsxs("div",{className:"flex items-center gap-1",children:[(y||v)&&g.jsxs(tt,{variant:"ghost",size:"sm",onClick:s,className:r?"":"text-purple-600 dark:text-purple-400",children:[r?g.jsx(SQ,{className:"h-4 w-4 mr-1"}):g.jsx(fQ,{className:"h-4 w-4 mr-1"}),r?"JSON":v?"Component":"Preview"]}),g.jsx(tt,{variant:"ghost",size:"sm",onClick:l,children:f?g.jsx(Do,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})}),g.jsx(tt,{variant:"ghost",size:"sm",onClick:c,children:g.jsx(RB,{className:"h-4 w-4"})}),g.jsx(tt,{variant:"ghost",size:"sm",onClick:d,children:g.jsx(ZQ,{className:"h-4 w-4"})})]})]}),g.jsx("div",{className:"flex-1 overflow-y-auto",children:v&&n&&a&&h?r?g.jsx("div",{className:"flex-1 h-full",children:g.jsx(FC,{componentUrl:h,toolName:t.uri,toolArgs:{},toolResult:t.result,serverId:n,readResource:a,className:"w-full h-full relative flex p-4"})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-${Date.now()}.json`})}):y?r?g.jsxs("div",{className:"space-y-0 h-full",children:[w.map((S,R)=>g.jsx("div",{className:"mx-0 size-full",children:g.jsx("div",{className:"w-full h-full",children:g.jsx(K5,{resource:S,className:"w-full h-full"})})},`mcp-ui-${S.uri||`resource-${Date.now()}-${Math.random()}`}`)),(()=>{if(t.result.contents&&Array.isArray(t.result.contents)){const S=t.result.contents.filter(R=>!(R.mimeType&&ql(R)));if(S.length>0)return g.jsx("div",{className:"px-4",children:g.jsx(Pa,{data:S,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-non-ui-${Date.now()}.json`})})}return null})()]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-mcp-ui-${Date.now()}.json`})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-${Date.now()}.json`})})})]})}function Zve(t,e){if(!t&&!e)return g.jsx(FQ,{className:"h-5 w-5"});const r=(t||e||"").toLowerCase();return r.includes("image")?g.jsx(PQ,{className:"h-5 w-5"}):r.includes("json")||r.includes("javascript")||r.includes("typescript")?g.jsx(LQ,{className:"h-5 w-5"}):r.includes("html")||r.includes("xml")?g.jsx(qQ,{className:"h-5 w-5"}):r.includes("database")||r.includes("sql")?g.jsx(eh,{className:"h-5 w-5"}):g.jsx(OR,{className:"h-5 w-5"})}function Xve({resources:t,selectedResource:e,onResourceSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(eh,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No resources available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>{const l=Zve(a.mimeType,a.uri),c=[a.description,a.mimeType&&g.jsx("span",{className:"font-mono",children:a.mimeType},"mime")].filter(Boolean);return g.jsx(Gd,{id:`resource-${a.uri}`,isSelected:e?.uri===a.uri,isFocused:n===s,icon:l,title:a.name,description:c.length>0?g.jsxs("span",{className:"flex flex-col gap-1",children:[a.description&&g.jsx("span",{children:a.description}),a.mimeType&&g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-500 font-mono",children:a.mimeType})]}):void 0,onClick:()=>r(a)},a.uri)})})}function Qve({isSearchExpanded:t,searchQuery:e,filteredResourcesCount:r,onSearchExpand:n,onSearchChange:a,onSearchBlur:s,searchInputRef:l}){return g.jsx("div",{className:"flex items-center justify-between p-4 py-3 border-r dark:border-zinc-700",children:g.jsx("div",{className:"flex items-center gap-2 flex-1",children:t?g.jsx(Or,{ref:l,placeholder:"Search resources...",value:e,onChange:c=>a(c.target.value),onBlur:s,className:"h-8 border-gray-300 dark:border-zinc-600"}):g.jsxs(g.Fragment,{children:[g.jsx("h2",{className:"text-lg font-medium text-gray-900 dark:text-gray-100",children:"Resources"}),g.jsx(Va,{className:"bg-zinc-500/20 text-zinc-600 dark:text-zinc-400 border-transparent",variant:"outline",children:r}),g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"ghost",size:"sm",onClick:n,className:"h-8 w-8 p-0",children:g.jsx(LR,{className:"h-4 w-4"})})}),g.jsxs(Fr,{side:"bottom",className:"flex gap-2",children:["Search",g.jsx(G5,{children:"F"})]})]})]})})})}function Z5({ref:t,resources:e,readResource:r,serverId:n,isConnected:a}){const[s,l]=b.useState(null),{selectedResourceUri:c,setSelectedResourceUri:d}=Fd(),[f,m]=b.useState(null),[h,v]=b.useState(!1),[y,w]=b.useState(""),[S]=b.useState("resources"),[R,x]=b.useState(!0),[_,C]=b.useState(!1),[N,k]=b.useState(-1),[A,I]=b.useState(!1),O=b.useRef(null),L=b.useRef(null);b.useImperativeHandle(t,()=>({focusSearch:()=>{C(!0),setTimeout(()=>{O.current&&O.current.focus()},0)},blurSearch:()=>{w(""),C(!1),O.current&&O.current.blur()}})),b.useEffect(()=>{_&&O.current&&O.current.focus()},[_]);const M=b.useCallback(()=>{y.trim()||C(!1)},[y]),P=b.useMemo(()=>{if(!y)return e;const U=y.toLowerCase();return e.filter(G=>G.name.toLowerCase().includes(U)||G.description?.toLowerCase().includes(U)||G.uri.toLowerCase().includes(U))},[e,y]),Y=b.useCallback(async U=>{if(l(U),a){v(!0);const G=Date.now();try{const H=await r(U.uri);zr.getInstance().capture(new UO({resourceUri:U.uri,serverId:n,success:!0})).catch(()=>{}),m({uri:U.uri,result:H,timestamp:G,resourceAnnotations:U.annotations})}catch(H){zr.getInstance().capture(new UO({resourceUri:U.uri,serverId:n,success:!1,error:H instanceof Error?H.message:"Unknown error"})).catch(()=>{}),m({uri:U.uri,result:null,error:H instanceof Error?H.message:"Unknown error",timestamp:G,resourceAnnotations:U.annotations})}finally{v(!1)}}},[r,n,a]);b.useEffect(()=>{k(-1)},[y,S]),b.useEffect(()=>{const U=G=>{const H=G.target;if(H.tagName==="INPUT"||H.tagName==="TEXTAREA"||H.contentEditable==="true"||G.metaKey||G.ctrlKey||G.altKey)return;const ae=P;if(G.key==="ArrowDown")G.preventDefault(),k(z=>{const q=z+1;return q>=ae.length?0:q});else if(G.key==="ArrowUp")G.preventDefault(),k(z=>{const q=z-1;return q<0?ae.length-1:q});else if(G.key==="Enter"&&N>=0){G.preventDefault();const z=P[N];z&&Y(z)}};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[N,P,Y]),b.useEffect(()=>{if(N>=0){const U=`resource-${P[N]?.uri}`,G=document.getElementById(U);G&&G.scrollIntoView({behavior:"smooth",block:"nearest"})}},[N,P]),b.useEffect(()=>{if(c&&e.length>0){const U=e.find(G=>G.uri===c);U&&s?.uri!==U.uri&&(d(null),setTimeout(()=>{Y(U);const G=document.getElementById(`resource-${U.uri}`);G&&G.scrollIntoView({behavior:"smooth",block:"nearest"})},100))}},[c,e,s,Y,d]);const Q=b.useCallback(async()=>{if(f)try{await navigator.clipboard.writeText(JSON.stringify(f.result,null,2)),I(!0),setTimeout(()=>I(!1),2e3)}catch(U){console.error("[ResourcesTab] Failed to copy result:",U)}},[f]),J=b.useCallback(()=>{if(f)try{const U=new globalThis.Blob([JSON.stringify(f.result,null,2)],{type:"application/json"}),G=URL.createObjectURL(U),H=document.createElement("a");H.href=G,H.download=`resource-${Date.now()}.json`,document.body.appendChild(H),H.click(),document.body.removeChild(H),URL.revokeObjectURL(G)}catch(U){console.error("[ResourcesTab] Failed to download result:",U)}},[f]),ee=b.useCallback(async()=>{if(L.current)try{document.fullscreenElement?await document.exitFullscreen():await L.current.requestFullscreen()}catch(U){console.error("[ResourcesTab] Failed to toggle fullscreen:",U)}},[]);return g.jsxs(Sd,{direction:"horizontal",className:"h-full",children:[g.jsxs(ja,{defaultSize:25,children:[g.jsx(Qve,{activeTab:S,isSearchExpanded:_,searchQuery:y,filteredResourcesCount:P.length,onSearchExpand:()=>C(!0),onSearchChange:w,onSearchBlur:M,onTabSwitch:()=>{},searchInputRef:O}),g.jsx("div",{className:"flex flex-col h-full",children:g.jsx(Xve,{resources:P,selectedResource:s,onResourceSelect:Y,focusedIndex:N})})]}),g.jsx(xd,{}),g.jsx(ja,{defaultSize:50,children:g.jsx("div",{ref:L,className:"h-full bg-white dark:bg-zinc-900",children:g.jsx(Kve,{result:f,isLoading:h,previewMode:R,serverId:n,readResource:r,onTogglePreview:()=>x(!R),onCopy:Q,onDownload:J,onFullscreen:ee,isCopied:A})})})]})}Z5.displayName="ResourcesTab";function Jve({savedRequests:t,selectedRequest:e,onLoadRequest:r,onDeleteRequest:n,focusedIndex:a}){if(t.length===0)return g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(eh,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"No saved requests yet"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Execute a tool and click Save to store requests"})]});const s=(l,c)=>{l.stopPropagation(),c()};return g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((l,c)=>g.jsxs("div",{className:"relative group",children:[g.jsx(Gd,{id:`saved-${l.id}`,isSelected:e?.id===l.id,isFocused:a===c,icon:g.jsx(CB,{className:"h-4 w-4"}),title:l.name,description:l.toolName,metadata:g.jsx("div",{className:"flex flex-col gap-1",children:g.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:new Date(l.savedAt).toLocaleString()})}),onClick:()=>r(l)}),g.jsx("div",{className:"absolute top-1/2 right-2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-10",children:g.jsxs(jr,{children:[g.jsx(Ur,{asChild:!0,children:g.jsx(tt,{variant:"secondary",size:"sm",onClick:d=>s(d,()=>n(l.id)),className:"h-8 w-8 p-0",children:g.jsx(rT,{className:"h-4 w-4"})})}),g.jsx(Fr,{children:g.jsx("p",{children:"Delete saved request"})})]})})]},l.id))})}function ebe({isOpen:t,requestName:e,defaultPlaceholder:r,onRequestNameChange:n,onSave:a,onCancel:s}){return t?g.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:s,children:g.jsxs("div",{className:"bg-white dark:bg-zinc-800 rounded-lg p-6 w-[400px] shadow-xl border border-gray-200 dark:border-zinc-700",onClick:l=>l.stopPropagation(),children:[g.jsx("h3",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-gray-100",children:"Save Request"}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx(lr,{htmlFor:"request-name",children:"Request Name (optional)"}),g.jsx(Or,{id:"request-name",value:e,onChange:l=>n(l.target.value),placeholder:r,className:"mt-2",onKeyDown:l=>{l.key==="Enter"&&a()},autoFocus:!0})]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(tt,{variant:"outline",onClick:s,children:"Cancel"}),g.jsxs(tt,{onClick:a,children:[g.jsx(DR,{className:"h-4 w-4 mr-2"}),"Save"]})]})]})]})}):null}function tbe({selectedTool:t,toolArgs:e,onArgChange:r}){const n=t?.inputSchema?.properties||{},a=t?.inputSchema?.required||[];return Object.keys(n).length>0?g.jsx("div",{className:"space-y-4",children:Object.entries(n).map(([l,c])=>{const d=c;d.required=a.includes(l);const f=e[l];let m="";return f!=null&&(typeof f=="string"?m=f:m=JSON.stringify(f,null)),d.type==="object"||d.type==="array"||typeof f=="object"&&f!==null?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:l,className:"text-sm font-medium",children:[l,d?.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(mh,{id:l,value:m,onChange:h=>r(l,h.target.value),placeholder:d?.description||`Enter ${l}`,className:"min-h-[100px]"}),d?.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:d.description})]},l):g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:l,className:"text-sm font-medium",children:[l,d?.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:l,value:m,onChange:h=>r(l,h.target.value),placeholder:d?.description||`Enter ${l}`}),d?.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:d.description})]},l)})}):g.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",children:"No parameters required"})}function rbe({selectedTool:t,toolArgs:e,isExecuting:r,isConnected:n,onArgChange:a,onExecute:s,onSave:l}){return t?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"flex-shrink-0 p-6 pt-3 pb-4 pr-3",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-0",children:[g.jsx("h3",{className:"text-lg font-semibold mb-2",children:t.name}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(tt,{onClick:s,disabled:r||!n,children:r?g.jsxs(g.Fragment,{children:[g.jsx(Lo,{className:"mr-2"}),"Executing..."]}):g.jsxs(g.Fragment,{children:[g.jsx(NB,{className:"h-4 w-4 mr-2"}),"Execute"]})}),g.jsxs(tt,{variant:"outline",onClick:l,disabled:r,className:"gap-2",children:[g.jsx(DR,{className:"h-4 w-4"}),"Save"]})]})]}),t.description&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 leading-relaxed",children:t.description})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 pb-4 pr-3",children:g.jsx(tbe,{selectedTool:t,toolArgs:e,onArgChange:a})})]}):g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a tool to get started"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a tool from the list to view its details and execute it"})]})}function nbe({results:t,copiedResult:e,previewMode:r,serverId:n,readResource:a,onCopy:s,onTogglePreview:l}){return g.jsx("div",{className:"flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",children:g.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.length>0?g.jsx("div",{className:"space-y-4 flex-1 h-full",children:t.map((c,d)=>{const f=c.toolMeta?.["openai/outputTemplate"],m=!!(f&&typeof f=="string"&&c.appsSdkResource),h=f,v=c.result?.content||[],y=v.filter(S=>S.type==="resource"&&ql(S.resource)),w=y.length>0;return g.jsxs("div",{className:"space-y-0 flex-1 h-full flex flex-col",children:[g.jsxs("div",{className:`flex items-center gap-2 px-4 pt-2 ${w||m?"border-b border-gray-200 dark:border-zinc-600 pb-2":""}`,children:[g.jsx("h3",{className:"text-sm font-medium",children:"Response"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ic,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(c.timestamp).toLocaleTimeString()})]}),c.duration!==void 0&&g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ud,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[c.duration,"ms"]})]}),m&&g.jsxs("div",{className:"flex items-center gap-4 ml-4",children:[g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["URI: ",h||"No URI"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-black dark:text-white":"text-zinc-500 dark:text-zinc-400"}`,children:"Component"}),g.jsx("span",{className:"text-xs text-zinc-400",children:"|"}),g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-zinc-500 dark:text-zinc-400":"text-black dark:text-white"}`,children:"Raw JSON"})]})]}),w&&!m&&g.jsxs("div",{className:"flex items-center gap-4 ml-4",children:[g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["URI: ",y[0]?.resource?.uri||"No URI"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-black dark:text-white":"text-zinc-500 dark:text-zinc-400"}`,children:"Preview"}),g.jsx("span",{className:"text-xs text-zinc-400",children:"|"}),g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-zinc-500 dark:text-zinc-400":"text-black dark:text-white"}`,children:"JSON"})]})]}),g.jsx(tt,{variant:"ghost",size:"sm",onClick:()=>s(d,c.result),className:"ml-auto",children:e===d?g.jsx(Do,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})})]}),c.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:c.error})]}):(()=>{if(m){const S=c.appsSdkResource;return S.isLoading?g.jsx(g.Fragment,{}):S.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Resource Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:S.error})]}):r?g.jsx("div",{className:"flex-1",children:g.jsx(FC,{componentUrl:h,toolName:c.toolName,toolArgs:c.args,toolResult:c.result,resource:S.resourceData,serverId:n,readResource:a,className:"w-full h-full relative p-4"})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-${Date.now()}.json`})})}return w?r?g.jsxs("div",{className:"space-y-0 h-full",children:[y.map((S,R)=>g.jsx("div",{className:"mx-0 size-full",children:g.jsx(K5,{resource:S.resource,onUIAction:x=>{},className:"w-full h-full relative"})},R)),v.filter(S=>!(S.type==="resource"&&ql(S.resource))).length>0&&g.jsx("div",{className:"px-4",children:g.jsx(Pa,{data:v.filter(S=>!(S.type==="resource"&&ql(S.resource))),filename:`tool-result-${c.toolName}-non-ui-${Date.now()}.json`})})]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-mcp-ui-${Date.now()}.json`})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-${Date.now()}.json`})})})()]},d)})}):g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"text-center",children:g.jsx(yR,{vertical:!0,noBorder:!0,message:"No Results yet"})})})})})}function abe({tools:t,selectedTool:e,onToolSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(ws,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No tools available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>g.jsx(Gd,{id:`tool-${a.name}`,isSelected:e?.name===a.name,isFocused:n===s,icon:g.jsx(ws,{className:"h-4 w-4"}),title:a.name,description:a.description,metadata:a.inputSchema?.properties&&g.jsxs(Va,{variant:"outline",className:"text-xs border-gray-300 dark:border-zinc-600 text-gray-600 dark:text-gray-400",children:[Object.keys(a.inputSchema.properties).length," params"]}),onClick:()=>r(a)},a.name))})}function obe({activeTab:t,isSearchExpanded:e,searchQuery:r,filteredToolsCount:n,savedRequestsCount:a,onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f}){return g.jsx(W5,{activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabName:"tools",secondaryTabName:"saved",primaryTabTitle:"Tools",secondaryTabTitle:"Saved",primaryCount:n,secondaryCount:a,primaryIcon:ws,secondaryIcon:eh,searchPlaceholder:"Search tools...",onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f})}const Qz="mcp-inspector-saved-requests";function X5({ref:t,tools:e,callTool:r,readResource:n,serverId:a,isConnected:s}){const[l,c]=b.useState(null),[d,f]=b.useState(null),{selectedToolName:m,setSelectedToolName:h}=Fd(),[v,y]=b.useState({}),[w,S]=b.useState([]),[R,x]=b.useState(!1),[_,C]=b.useState(null),[N,k]=b.useState(""),[A,I]=b.useState("tools"),[O,L]=b.useState([]),[M,P]=b.useState(!1),[Y,Q]=b.useState(""),[J,ee]=b.useState(!0),[U,G]=b.useState(!1),[H,X]=b.useState(-1),ae=b.useRef(null);b.useImperativeHandle(t,()=>({focusSearch:()=>{G(!0),setTimeout(()=>{ae.current&&ae.current.focus()},0)},blurSearch:()=>{k(""),G(!1),ae.current&&ae.current.blur()}})),b.useEffect(()=>{try{const be=localStorage.getItem(Qz);be&&L(JSON.parse(be))}catch(be){console.error("[ToolsTab] Failed to load saved requests:",be)}},[]);const z=b.useCallback(be=>{try{localStorage.setItem(Qz,JSON.stringify(be)),L(be)}catch(xe){console.error("[ToolsTab] Failed to save requests:",xe)}},[]),q=b.useMemo(()=>{if(!N.trim())return e;const be=N.toLowerCase();return e.filter(xe=>xe.name.toLowerCase().includes(be)||xe.description?.toLowerCase().includes(be))},[e,N]),$=b.useCallback(be=>{c(be);const xe={};be.inputSchema?.properties&&Object.entries(be.inputSchema.properties).forEach(([Ne,ze])=>{const Me=ze;Me.default!==void 0?xe[Ne]=Me.default:Me.type==="string"?xe[Ne]="":Me.type==="number"?xe[Ne]=0:Me.type==="boolean"?xe[Ne]=!1:Me.type==="array"?xe[Ne]=[]:Me.type==="object"&&(xe[Ne]={})}),y(xe)},[]),W=b.useCallback(be=>{const xe=e.find(Ne=>Ne.name===be.toolName);xe&&(c(xe),y(be.args),f(be))},[e]);b.useEffect(()=>{U&&ae.current&&ae.current.focus()},[U]);const te=b.useCallback(()=>{N.trim()||G(!1)},[N]);b.useEffect(()=>{A!=="tools"&&G(!1)},[A]),b.useEffect(()=>{X(-1)},[N,A]),b.useEffect(()=>{const be=xe=>{const Ne=xe.target;if(Ne.tagName==="INPUT"||Ne.tagName==="TEXTAREA"||Ne.contentEditable==="true"||xe.metaKey||xe.ctrlKey||xe.altKey)return;const Me=A==="tools"?q:O;if(xe.key==="ArrowDown")xe.preventDefault(),X($e=>{const ct=$e+1;return ct>=Me.length?0:ct});else if(xe.key==="ArrowUp")xe.preventDefault(),X($e=>{const ct=$e-1;return ct<0?Me.length-1:ct});else if(xe.key==="Enter"&&H>=0)if(xe.preventDefault(),A==="tools"){const $e=q[H];$e&&$($e)}else{const $e=O[H];$e&&W($e)}};return document.addEventListener("keydown",be),()=>document.removeEventListener("keydown",be)},[H,q,O,A,$,W]),b.useEffect(()=>{if(H>=0){const be=A==="tools"?`tool-${q[H]?.name}`:`saved-${O[H]?.id}`,xe=document.getElementById(be);xe&&xe.scrollIntoView({behavior:"smooth",block:"nearest"})}},[H,q,O,A]),b.useEffect(()=>{if(m&&e.length>0){const be=e.find(xe=>xe.name===m);if(be&&l?.name!==be.name){h(null);const xe=setTimeout(()=>{$(be);const Ne=document.getElementById(`tool-${be.name}`);Ne&&Ne.scrollIntoView({behavior:"smooth",block:"nearest"})},100);return()=>clearTimeout(xe)}}},[m,e,l,$,h]);const F=b.useCallback((be,xe)=>{y(Ne=>{const ze={...Ne};if(l?.inputSchema?.properties?.[be])if(l.inputSchema.properties[be].type==="string")ze[be]=xe;else try{ze[be]=JSON.parse(xe)}catch{ze[be]=xe}else try{ze[be]=JSON.parse(xe)}catch{ze[be]=xe}return ze})},[l]),j=b.useCallback(async()=>{if(!l||R)return;x(!0);const be=Date.now();try{const xe=await r(l.name,v),Ne=Date.now()-be;zr.getInstance().capture(new jO({toolName:l.name,serverId:a,success:!0,duration:Ne})).catch(()=>{});const Me=l?._meta||l?.metadata,$e=Me?.["openai/outputTemplate"];let ct;if($e&&typeof $e=="string"){const ce={toolName:l.name,args:v,result:xe,timestamp:be,duration:Ne,toolMeta:Me,appsSdkResource:{uri:$e,resourceData:null,isLoading:!0}};S([ce]);try{const Ce=await n($e);let Fe=null;if(xe?.structuredContent)Fe=xe.structuredContent;else if(Array.isArray(xe)&&xe[0]){const _e=xe[0];_e.output?.value?.structuredContent?Fe=_e.output.value.structuredContent:_e.structuredContent?Fe=_e.structuredContent:_e.output?.value&&(Fe=_e.output.value)}Fe||(Fe=xe),ct={uri:$e,resourceData:{...Ce,structuredContent:Fe},isLoading:!1}}catch(Ce){ct={uri:$e,resourceData:null,isLoading:!1,error:Ce instanceof Error?Ce.message:String(Ce)}}S(Ce=>Ce.map((Fe,_e)=>_e===0?{...Fe,appsSdkResource:ct}:Fe))}else S(ce=>[{toolName:l.name,args:v,result:xe,timestamp:be,duration:Ne,toolMeta:Me},...ce])}catch(xe){const Ne=Date.now()-be;zr.getInstance().capture(new jO({toolName:l.name,serverId:a,success:!1,duration:Ne,error:xe instanceof Error?xe.message:String(xe)})).catch(()=>{});const Me=l?._meta||l?.metadata,$e={toolName:l.name,args:v,result:null,error:xe instanceof Error?xe.message:String(xe),timestamp:be,duration:Ne,toolMeta:Me},ct=Me?.["openai/outputTemplate"];S(ct?[$e]:ce=>[$e,...ce])}finally{x(!1)}},[l,v,R,r,n,a]),Z=b.useCallback(async(be,xe)=>{try{await navigator.clipboard.writeText(JSON.stringify(xe,null,2)),C(be),setTimeout(()=>C(null),2e3)}catch(Ne){console.error("[ToolsTab] Failed to copy result:",Ne)}},[]),ne=b.useCallback(be=>{S(xe=>xe.filter((Ne,ze)=>ze!==be))},[]),V=b.useCallback(be=>{const xe=w[be];if(xe){const Ne=window.open("","_blank","width=800,height=600");Ne&&(Ne.document.write(`
|
|
1546
1546
|
<html>
|
|
1547
1547
|
<head>
|
|
1548
1548
|
<title>${xe.toolName} Result</title>
|