harperdb 4.7.6 → 4.7.8
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/README.md +1 -1
- package/bin/harperdb.js +44 -44
- package/bin/lite.js +41 -41
- package/launchServiceScripts/launchNatsIngestService.js +41 -41
- package/launchServiceScripts/launchNatsReplyService.js +41 -41
- package/launchServiceScripts/launchUpdateNodes4-0-0.js +41 -41
- package/npm-shrinkwrap.json +51 -47
- package/package.json +1 -1
- package/resources/Resource.d.ts +1 -1
- package/resources/Table.d.ts +3 -3
- package/resources/analytics/read.d.ts +2 -1
- package/server/jobs/jobProcess.js +41 -41
- package/server/serverHelpers/Headers.d.ts +1 -1
- package/server/threads/threadServer.js +41 -41
- package/studio/web/assets/index-4tz9iZO6.js +192 -0
- package/studio/web/assets/{index-D1uPa1Br.js → index-DzmdGhay.js} +1 -1
- package/studio/web/assets/index-i4Sn5akN.css +1 -0
- package/studio/web/assets/{index-DgL-lCXW.js → index-n1A9yxoS.js} +7 -30
- package/studio/web/assets/{index.lazy-C2OrP2F_.js → index.lazy-DhQph7si.js} +9 -31
- package/studio/web/assets/profiler-xCOLgFE8.js +1 -0
- package/studio/web/assets/react-redux-C8VgMI21.js +5 -0
- package/studio/web/assets/startRecording-CapM7c3R.js +2 -0
- package/studio/web/index.html +2 -2
- package/utility/scripts/restartHdb.js +41 -41
- package/studio/web/assets/index-CAHya1gn.js +0 -601
- package/studio/web/assets/index-DV97RPv8.css +0 -4
- package/studio/web/assets/profiler-Nd-IJd-3.js +0 -1
- package/studio/web/assets/react-redux-wSW3CjjP.js +0 -13
- package/studio/web/assets/startRecording-CTxWO2nY.js +0 -2
|
@@ -1,601 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.lazy-C2OrP2F_.js","assets/react-redux-wSW3CjjP.js","assets/index-YHth6Ryl.css","assets/index-DgL-lCXW.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
function oG(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var pTe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jw={exports:{}},Hf={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-jsx-runtime.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var ZN;function aG(){if(ZN)return Hf;ZN=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var s=null;if(o!==void 0&&(s=""+o),i.key!==void 0&&(s=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:s,ref:i!==void 0?i:null,props:o}}return Hf.Fragment=t,Hf.jsx=n,Hf.jsxs=n,Hf}var YN;function sG(){return YN||(YN=1,jw.exports=aG()),jw.exports}var u=sG();const Fu=!0,lG="/",td=9925,p_="HDB_ADMIN",Js="/",t1="../";function La(e,t,n){return e===1||e==="1"?`${e} ${t}`:`${e} ${n}`}function cG(e){return e.replicated?.some(t=>TP(t))??!1}function uG(e){return e.status!=="failed"}function TP(e){return e.status==="failed"}function dG(e){if(cG(e.data)){const t=e.data.replicated.filter(uG),n=e.data.replicated.filter(TP),r=t.length?`The operation partially succeeded, but ${La(n.length,"node","nodes")} failed:`:n.length===1?"The operation failed on the single node:":`The operation failed on all ${n.length} nodes:`,i=n.map(o=>`${o.node}: ${o.reason}`).join(`
|
|
11
|
-
`);return Promise.reject(r+`
|
|
12
|
-
`+i)}return e}function NP(e,t){return function(){return e.apply(t,arguments)}}const{toString:fG}=Object.prototype,{getPrototypeOf:n1}=Object,{iterator:Iy,toStringTag:AP}=Symbol,Ty=(e=>t=>{const n=fG.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Po=e=>(e=e.toLowerCase(),t=>Ty(t)===e),Ny=e=>t=>typeof t===e,{isArray:_d}=Array,nd=Ny("undefined");function lp(e){return e!==null&&!nd(e)&&e.constructor!==null&&!nd(e.constructor)&&ui(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const OP=Po("ArrayBuffer");function mG(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&OP(e.buffer),t}const pG=Ny("string"),ui=Ny("function"),$P=Ny("number"),cp=e=>e!==null&&typeof e=="object",hG=e=>e===!0||e===!1,iv=e=>{if(Ty(e)!=="object")return!1;const t=n1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(AP in e)&&!(Iy in e)},gG=e=>{if(!cp(e)||lp(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},vG=Po("Date"),yG=Po("File"),bG=Po("Blob"),xG=Po("FileList"),wG=e=>cp(e)&&ui(e.pipe),SG=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ui(e.append)&&((t=Ty(e))==="formdata"||t==="object"&&ui(e.toString)&&e.toString()==="[object FormData]"))},_G=Po("URLSearchParams"),[CG,EG,kG,RG]=["ReadableStream","Request","Response","Headers"].map(Po),jG=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function up(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),_d(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(lp(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let c;for(r=0;r<s;r++)c=o[r],t.call(null,e[c],c,e)}}function DP(e,t){if(lp(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const $l=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,PP=e=>!nd(e)&&e!==$l;function h_(){const{caseless:e,skipUndefined:t}=PP(this)&&this||{},n={},r=(i,o)=>{const s=e&&DP(n,o)||o;iv(n[s])&&iv(i)?n[s]=h_(n[s],i):iv(i)?n[s]=h_({},i):_d(i)?n[s]=i.slice():(!t||!nd(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&up(arguments[i],r);return n}const IG=(e,t,n,{allOwnKeys:r}={})=>(up(t,(i,o)=>{n&&ui(i)?e[o]=NP(i,n):e[o]=i},{allOwnKeys:r}),e),TG=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),NG=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},AG=(e,t,n,r)=>{let i,o,s;const c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=n!==!1&&n1(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},OG=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},$G=e=>{if(!e)return null;if(_d(e))return e;let t=e.length;if(!$P(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},DG=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&n1(Uint8Array)),PG=(e,t)=>{const r=(e&&e[Iy]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},MG=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},zG=Po("HTMLFormElement"),LG=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),WN=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),UG=Po("RegExp"),MP=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};up(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},FG=e=>{MP(e,(t,n)=>{if(ui(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ui(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},VG=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return _d(e)?r(e):r(String(e).split(t)),n},BG=()=>{},HG=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function qG(e){return!!(e&&ui(e.append)&&e[AP]==="FormData"&&e[Iy])}const GG=e=>{const t=new Array(10),n=(r,i)=>{if(cp(r)){if(t.indexOf(r)>=0)return;if(lp(r))return r;if(!("toJSON"in r)){t[i]=r;const o=_d(r)?[]:{};return up(r,(s,c)=>{const d=n(s,i+1);!nd(d)&&(o[c]=d)}),t[i]=void 0,o}}return r};return n(e,0)},KG=Po("AsyncFunction"),ZG=e=>e&&(cp(e)||ui(e))&&ui(e.then)&&ui(e.catch),zP=((e,t)=>e?setImmediate:t?((n,r)=>($l.addEventListener("message",({source:i,data:o})=>{i===$l&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),$l.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ui($l.postMessage)),YG=typeof queueMicrotask<"u"?queueMicrotask.bind($l):typeof process<"u"&&process.nextTick||zP,WG=e=>e!=null&&ui(e[Iy]),fe={isArray:_d,isArrayBuffer:OP,isBuffer:lp,isFormData:SG,isArrayBufferView:mG,isString:pG,isNumber:$P,isBoolean:hG,isObject:cp,isPlainObject:iv,isEmptyObject:gG,isReadableStream:CG,isRequest:EG,isResponse:kG,isHeaders:RG,isUndefined:nd,isDate:vG,isFile:yG,isBlob:bG,isRegExp:UG,isFunction:ui,isStream:wG,isURLSearchParams:_G,isTypedArray:DG,isFileList:xG,forEach:up,merge:h_,extend:IG,trim:jG,stripBOM:TG,inherits:NG,toFlatObject:AG,kindOf:Ty,kindOfTest:Po,endsWith:OG,toArray:$G,forEachEntry:PG,matchAll:MG,isHTMLForm:zG,hasOwnProperty:WN,hasOwnProp:WN,reduceDescriptors:MP,freezeMethods:FG,toObjectSet:VG,toCamelCase:LG,noop:BG,toFiniteNumber:HG,findKey:DP,global:$l,isContextDefined:PP,isSpecCompliantForm:qG,toJSONObject:GG,isAsyncFn:KG,isThenable:ZG,setImmediate:zP,asap:YG,isIterable:WG};function dt(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}fe.inherits(dt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:fe.toJSONObject(this.config),code:this.code,status:this.status}}});const LP=dt.prototype,UP={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{UP[e]={value:e}});Object.defineProperties(dt,UP);Object.defineProperty(LP,"isAxiosError",{value:!0});dt.from=(e,t,n,r,i,o)=>{const s=Object.create(LP);fe.toFlatObject(e,s,function(p){return p!==Error.prototype},f=>f!=="isAxiosError");const c=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return dt.call(s,c,d,n,r,i),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",o&&Object.assign(s,o),s};const XG=null;function g_(e){return fe.isPlainObject(e)||fe.isArray(e)}function FP(e){return fe.endsWith(e,"[]")?e.slice(0,-2):e}function XN(e,t,n){return e?e.concat(t).map(function(i,o){return i=FP(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function QG(e){return fe.isArray(e)&&!e.some(g_)}const JG=fe.toFlatObject(fe,{},null,function(t){return/^is[A-Z]/.test(t)});function Ay(e,t,n){if(!fe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=fe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,C){return!fe.isUndefined(C[S])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,s=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&fe.isSpecCompliantForm(t);if(!fe.isFunction(i))throw new TypeError("visitor must be a function");function f(b){if(b===null)return"";if(fe.isDate(b))return b.toISOString();if(fe.isBoolean(b))return b.toString();if(!d&&fe.isBlob(b))throw new dt("Blob is not supported. Use a Buffer instead.");return fe.isArrayBuffer(b)||fe.isTypedArray(b)?d&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function p(b,S,C){let E=b;if(b&&!C&&typeof b=="object"){if(fe.endsWith(S,"{}"))S=r?S:S.slice(0,-2),b=JSON.stringify(b);else if(fe.isArray(b)&&QG(b)||(fe.isFileList(b)||fe.endsWith(S,"[]"))&&(E=fe.toArray(b)))return S=FP(S),E.forEach(function(R,I){!(fe.isUndefined(R)||R===null)&&t.append(s===!0?XN([S],I,o):s===null?S:S+"[]",f(R))}),!1}return g_(b)?!0:(t.append(XN(C,S,o),f(b)),!1)}const h=[],v=Object.assign(JG,{defaultVisitor:p,convertValue:f,isVisitable:g_});function y(b,S){if(!fe.isUndefined(b)){if(h.indexOf(b)!==-1)throw Error("Circular reference detected in "+S.join("."));h.push(b),fe.forEach(b,function(E,k){(!(fe.isUndefined(E)||E===null)&&i.call(t,E,fe.isString(k)?k.trim():k,S,v))===!0&&y(E,S?S.concat(k):[k])}),h.pop()}}if(!fe.isObject(e))throw new TypeError("data must be an object");return y(e),t}function QN(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function r1(e,t){this._pairs=[],e&&Ay(e,this,t)}const VP=r1.prototype;VP.append=function(t,n){this._pairs.push([t,n])};VP.toString=function(t){const n=t?function(r){return t.call(this,r,QN)}:QN;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function e7(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function BP(e,t,n){if(!t)return e;const r=n&&n.encode||e7;fe.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=fe.isURLSearchParams(t)?t.toString():new r1(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class JN{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){fe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const HP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},t7=typeof URLSearchParams<"u"?URLSearchParams:r1,n7=typeof FormData<"u"?FormData:null,r7=typeof Blob<"u"?Blob:null,i7={isBrowser:!0,classes:{URLSearchParams:t7,FormData:n7,Blob:r7},protocols:["http","https","file","blob","url","data"]},i1=typeof window<"u"&&typeof document<"u",v_=typeof navigator=="object"&&navigator||void 0,o7=i1&&(!v_||["ReactNative","NativeScript","NS"].indexOf(v_.product)<0),a7=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",s7=i1&&window.location.href||"http://localhost",l7=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:i1,hasStandardBrowserEnv:o7,hasStandardBrowserWebWorkerEnv:a7,navigator:v_,origin:s7},Symbol.toStringTag,{value:"Module"})),wr={...l7,...i7};function c7(e,t){return Ay(e,new wr.classes.URLSearchParams,{visitor:function(n,r,i,o){return wr.isNode&&fe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function u7(e){return fe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function d7(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function qP(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const c=Number.isFinite(+s),d=o>=n.length;return s=!s&&fe.isArray(i)?i.length:s,d?(fe.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!c):((!i[s]||!fe.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&fe.isArray(i[s])&&(i[s]=d7(i[s])),!c)}if(fe.isFormData(e)&&fe.isFunction(e.entries)){const n={};return fe.forEachEntry(e,(r,i)=>{t(u7(r),i,n,0)}),n}return null}function f7(e,t,n){if(fe.isString(e))try{return(t||JSON.parse)(e),fe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const dp={transitional:HP,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=fe.isObject(t);if(o&&fe.isHTMLForm(t)&&(t=new FormData(t)),fe.isFormData(t))return i?JSON.stringify(qP(t)):t;if(fe.isArrayBuffer(t)||fe.isBuffer(t)||fe.isStream(t)||fe.isFile(t)||fe.isBlob(t)||fe.isReadableStream(t))return t;if(fe.isArrayBufferView(t))return t.buffer;if(fe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return c7(t,this.formSerializer).toString();if((c=fe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Ay(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),f7(t)):t}],transformResponse:[function(t){const n=this.transitional||dp.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(fe.isResponse(t)||fe.isReadableStream(t))return t;if(t&&fe.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(c){if(s)throw c.name==="SyntaxError"?dt.from(c,dt.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wr.classes.FormData,Blob:wr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fe.forEach(["delete","get","head","post","put","patch"],e=>{dp.headers[e]={}});const m7=fe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),p7=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
13
|
-
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&m7[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},eA=Symbol("internals");function qf(e){return e&&String(e).trim().toLowerCase()}function ov(e){return e===!1||e==null?e:fe.isArray(e)?e.map(ov):String(e)}function h7(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const g7=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Iw(e,t,n,r,i){if(fe.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!fe.isString(t)){if(fe.isString(r))return t.indexOf(r)!==-1;if(fe.isRegExp(r))return r.test(t)}}function v7(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function y7(e,t){const n=fe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let di=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(c,d,f){const p=qf(d);if(!p)throw new Error("header name must be a non-empty string");const h=fe.findKey(i,p);(!h||i[h]===void 0||f===!0||f===void 0&&i[h]!==!1)&&(i[h||d]=ov(c))}const s=(c,d)=>fe.forEach(c,(f,p)=>o(f,p,d));if(fe.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(fe.isString(t)&&(t=t.trim())&&!g7(t))s(p7(t),n);else if(fe.isObject(t)&&fe.isIterable(t)){let c={},d,f;for(const p of t){if(!fe.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?fe.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}s(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=qf(t),t){const r=fe.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return h7(i);if(fe.isFunction(n))return n.call(this,i,r);if(fe.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=qf(t),t){const r=fe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Iw(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=qf(s),s){const c=fe.findKey(r,s);c&&(!n||Iw(r,r[c],c,n))&&(delete r[c],i=!0)}}return fe.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Iw(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return fe.forEach(this,(i,o)=>{const s=fe.findKey(r,o);if(s){n[s]=ov(i),delete n[o];return}const c=t?v7(o):String(o).trim();c!==o&&delete n[o],n[c]=ov(i),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return fe.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&fe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
14
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[eA]=this[eA]={accessors:{}}).accessors,i=this.prototype;function o(s){const c=qf(s);r[c]||(y7(i,s),r[c]=!0)}return fe.isArray(t)?t.forEach(o):o(t),this}};di.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);fe.reduceDescriptors(di.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});fe.freezeMethods(di);function Tw(e,t){const n=this||dp,r=t||n,i=di.from(r.headers);let o=r.data;return fe.forEach(e,function(c){o=c.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function GP(e){return!!(e&&e.__CANCEL__)}function Cd(e,t,n){dt.call(this,e??"canceled",dt.ERR_CANCELED,t,n),this.name="CanceledError"}fe.inherits(Cd,dt,{__CANCEL__:!0});function KP(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new dt("Request failed with status code "+n.status,[dt.ERR_BAD_REQUEST,dt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function b7(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function x7(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[o];s||(s=f),n[i]=d,r[i]=f;let h=o,v=0;for(;h!==i;)v+=n[h++],h=h%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-s<t)return;const y=p&&f-p;return y?Math.round(v*1e3/y):void 0}}function w7(e,t){let n=0,r=1e3/t,i,o;const s=(f,p=Date.now())=>{n=p,i=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const p=Date.now(),h=p-n;h>=r?s(f,p):(i=f,o||(o=setTimeout(()=>{o=null,s(i)},r-h)))},()=>i&&s(i)]}const Cv=(e,t,n=3)=>{let r=0;const i=x7(50,250);return w7(o=>{const s=o.loaded,c=o.lengthComputable?o.total:void 0,d=s-r,f=i(d),p=s<=c;r=s;const h={loaded:s,total:c,progress:c?s/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&p?(c-s)/f:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},tA=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},nA=e=>(...t)=>fe.asap(()=>e(...t)),S7=wr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,wr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(wr.origin),wr.navigator&&/(msie|trident)/i.test(wr.navigator.userAgent)):()=>!0,_7=wr.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];fe.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),fe.isString(r)&&s.push("path="+r),fe.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function C7(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function E7(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ZP(e,t,n){let r=!C7(t);return e&&(r||n==!1)?E7(e,t):t}const rA=e=>e instanceof di?{...e}:e;function Yl(e,t){t=t||{};const n={};function r(f,p,h,v){return fe.isPlainObject(f)&&fe.isPlainObject(p)?fe.merge.call({caseless:v},f,p):fe.isPlainObject(p)?fe.merge({},p):fe.isArray(p)?p.slice():p}function i(f,p,h,v){if(fe.isUndefined(p)){if(!fe.isUndefined(f))return r(void 0,f,h,v)}else return r(f,p,h,v)}function o(f,p){if(!fe.isUndefined(p))return r(void 0,p)}function s(f,p){if(fe.isUndefined(p)){if(!fe.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,h){if(h in t)return r(f,p);if(h in e)return r(void 0,f)}const d={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(f,p,h)=>i(rA(f),rA(p),h,!0)};return fe.forEach(Object.keys({...e,...t}),function(p){const h=d[p]||i,v=h(e[p],t[p],p);fe.isUndefined(v)&&h!==c||(n[p]=v)}),n}const YP=e=>{const t=Yl({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:c}=t;if(t.headers=s=di.from(s),t.url=BP(ZP(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),fe.isFormData(n)){if(wr.hasStandardBrowserEnv||wr.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(fe.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([p,h])=>{f.includes(p.toLowerCase())&&s.set(p,h)})}}if(wr.hasStandardBrowserEnv&&(r&&fe.isFunction(r)&&(r=r(t)),r||r!==!1&&S7(t.url))){const d=i&&o&&_7.read(o);d&&s.set(i,d)}return t},k7=typeof XMLHttpRequest<"u",R7=k7&&function(e){return new Promise(function(n,r){const i=YP(e);let o=i.data;const s=di.from(i.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=i,p,h,v,y,b;function S(){y&&y(),b&&b(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let C=new XMLHttpRequest;C.open(i.method.toUpperCase(),i.url,!0),C.timeout=i.timeout;function E(){if(!C)return;const R=di.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),A={data:!c||c==="text"||c==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:R,config:e,request:C};KP(function(N){n(N),S()},function(N){r(N),S()},A),C=null}"onloadend"in C?C.onloadend=E:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(E)},C.onabort=function(){C&&(r(new dt("Request aborted",dt.ECONNABORTED,e,C)),C=null)},C.onerror=function(I){const A=I&&I.message?I.message:"Network Error",T=new dt(A,dt.ERR_NETWORK,e,C);T.event=I||null,r(T),C=null},C.ontimeout=function(){let I=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const A=i.transitional||HP;i.timeoutErrorMessage&&(I=i.timeoutErrorMessage),r(new dt(I,A.clarifyTimeoutError?dt.ETIMEDOUT:dt.ECONNABORTED,e,C)),C=null},o===void 0&&s.setContentType(null),"setRequestHeader"in C&&fe.forEach(s.toJSON(),function(I,A){C.setRequestHeader(A,I)}),fe.isUndefined(i.withCredentials)||(C.withCredentials=!!i.withCredentials),c&&c!=="json"&&(C.responseType=i.responseType),f&&([v,b]=Cv(f,!0),C.addEventListener("progress",v)),d&&C.upload&&([h,y]=Cv(d),C.upload.addEventListener("progress",h),C.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(p=R=>{C&&(r(!R||R.type?new Cd(null,e,C):R),C.abort(),C=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const k=b7(i.url);if(k&&wr.protocols.indexOf(k)===-1){r(new dt("Unsupported protocol "+k+":",dt.ERR_BAD_REQUEST,e));return}C.send(o||null)})},j7=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(f){if(!i){i=!0,c();const p=f instanceof Error?f:this.reason;r.abort(p instanceof dt?p:new Cd(p instanceof Error?p.message:p))}};let s=t&&setTimeout(()=>{s=null,o(new dt(`timeout ${t} of ms exceeded`,dt.ETIMEDOUT))},t);const c=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:d}=r;return d.unsubscribe=()=>fe.asap(c),d}},I7=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},T7=async function*(e,t){for await(const n of N7(e))yield*I7(n,t)},N7=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},iA=(e,t,n,r)=>{const i=T7(e,t);let o=0,s,c=d=>{s||(s=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:p}=await i.next();if(f){c(),d.close();return}let h=p.byteLength;if(n){let v=o+=h;n(v)}d.enqueue(new Uint8Array(p))}catch(f){throw c(f),f}},cancel(d){return c(d),i.return()}},{highWaterMark:2})},oA=64*1024,{isFunction:pg}=fe,A7=(({Request:e,Response:t})=>({Request:e,Response:t}))(fe.global),{ReadableStream:aA,TextEncoder:sA}=fe.global,lA=(e,...t)=>{try{return!!e(...t)}catch{return!1}},O7=e=>{e=fe.merge.call({skipUndefined:!0},A7,e);const{fetch:t,Request:n,Response:r}=e,i=t?pg(t):typeof fetch=="function",o=pg(n),s=pg(r);if(!i)return!1;const c=i&&pg(aA),d=i&&(typeof sA=="function"?(b=>S=>b.encode(S))(new sA):async b=>new Uint8Array(await new n(b).arrayBuffer())),f=o&&c&&lA(()=>{let b=!1;const S=new n(wr.origin,{body:new aA,method:"POST",get duplex(){return b=!0,"half"}}).headers.has("Content-Type");return b&&!S}),p=s&&c&&lA(()=>fe.isReadableStream(new r("").body)),h={stream:p&&(b=>b.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!h[b]&&(h[b]=(S,C)=>{let E=S&&S[b];if(E)return E.call(S);throw new dt(`Response type '${b}' is not supported`,dt.ERR_NOT_SUPPORT,C)})});const v=async b=>{if(b==null)return 0;if(fe.isBlob(b))return b.size;if(fe.isSpecCompliantForm(b))return(await new n(wr.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(fe.isArrayBufferView(b)||fe.isArrayBuffer(b))return b.byteLength;if(fe.isURLSearchParams(b)&&(b=b+""),fe.isString(b))return(await d(b)).byteLength},y=async(b,S)=>{const C=fe.toFiniteNumber(b.getContentLength());return C??v(S)};return async b=>{let{url:S,method:C,data:E,signal:k,cancelToken:R,timeout:I,onDownloadProgress:A,onUploadProgress:T,responseType:N,headers:z,withCredentials:L="same-origin",fetchOptions:K}=YP(b),ee=t||fetch;N=N?(N+"").toLowerCase():"text";let Z=j7([k,R&&R.toAbortSignal()],I),Y=null;const B=Z&&Z.unsubscribe&&(()=>{Z.unsubscribe()});let W;try{if(T&&f&&C!=="get"&&C!=="head"&&(W=await y(z,E))!==0){let M=new n(S,{method:"POST",body:E,duplex:"half"}),F;if(fe.isFormData(E)&&(F=M.headers.get("content-type"))&&z.setContentType(F),M.body){const[O,J]=tA(W,Cv(nA(T)));E=iA(M.body,oA,O,J)}}fe.isString(L)||(L=L?"include":"omit");const P=o&&"credentials"in n.prototype,G={...K,signal:Z,method:C.toUpperCase(),headers:z.normalize().toJSON(),body:E,duplex:"half",credentials:P?L:void 0};Y=o&&new n(S,G);let U=await(o?ee(Y,K):ee(S,G));const te=p&&(N==="stream"||N==="response");if(p&&(A||te&&B)){const M={};["status","statusText","headers"].forEach(de=>{M[de]=U[de]});const F=fe.toFiniteNumber(U.headers.get("content-length")),[O,J]=A&&tA(F,Cv(nA(A),!0))||[];U=new r(iA(U.body,oA,O,()=>{J&&J(),B&&B()}),M)}N=N||"text";let $=await h[fe.findKey(h,N)||"text"](U,b);return!te&&B&&B(),await new Promise((M,F)=>{KP(M,F,{data:$,headers:di.from(U.headers),status:U.status,statusText:U.statusText,config:b,request:Y})})}catch(P){throw B&&B(),P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)?Object.assign(new dt("Network Error",dt.ERR_NETWORK,b,Y),{cause:P.cause||P}):dt.from(P,P&&P.code,b,Y)}}},$7=new Map,WP=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,c=s,d,f,p=$7;for(;c--;)d=o[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:O7(t)),p=f;return f};WP();const y_={http:XG,xhr:R7,fetch:{get:WP}};fe.forEach(y_,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const cA=e=>`- ${e}`,D7=e=>fe.isFunction(e)||e===null||e===!1,XP={getAdapter:(e,t)=>{e=fe.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s<n;s++){r=e[s];let c;if(i=r,!D7(r)&&(i=y_[(c=String(r)).toLowerCase()],i===void 0))throw new dt(`Unknown adapter '${c}'`);if(i&&(fe.isFunction(i)||(i=i.get(t))))break;o[c||"#"+s]=i}if(!i){const s=Object.entries(o).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?s.length>1?`since :
|
|
15
|
-
`+s.map(cA).join(`
|
|
16
|
-
`):" "+cA(s[0]):"as no adapter specified";throw new dt("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return i},adapters:y_};function Nw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Cd(null,e)}function uA(e){return Nw(e),e.headers=di.from(e.headers),e.data=Tw.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),XP.getAdapter(e.adapter||dp.adapter,e)(e).then(function(r){return Nw(e),r.data=Tw.call(e,e.transformResponse,r),r.headers=di.from(r.headers),r},function(r){return GP(r)||(Nw(e),r&&r.response&&(r.response.data=Tw.call(e,e.transformResponse,r.response),r.response.headers=di.from(r.response.headers))),Promise.reject(r)})}const QP="1.12.2",Oy={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Oy[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const dA={};Oy.transitional=function(t,n,r){function i(o,s){return"[Axios v"+QP+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,c)=>{if(t===!1)throw new dt(i(s," has been removed"+(n?" in "+n:"")),dt.ERR_DEPRECATED);return n&&!dA[s]&&(dA[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,c):!0}};Oy.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function P7(e,t,n){if(typeof e!="object")throw new dt("options must be an object",dt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const c=e[o],d=c===void 0||s(c,o,e);if(d!==!0)throw new dt("option "+o+" must be "+d,dt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new dt("Unknown option "+o,dt.ERR_BAD_OPTION)}}const av={assertOptions:P7,validators:Oy},Ho=av.validators;let Fl=class{constructor(t){this.defaults=t||{},this.interceptors={request:new JN,response:new JN}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
17
|
-
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Yl(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&av.assertOptions(r,{silentJSONParsing:Ho.transitional(Ho.boolean),forcedJSONParsing:Ho.transitional(Ho.boolean),clarifyTimeoutError:Ho.transitional(Ho.boolean)},!1),i!=null&&(fe.isFunction(i)?n.paramsSerializer={serialize:i}:av.assertOptions(i,{encode:Ho.function,serialize:Ho.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),av.assertOptions(n,{baseUrl:Ho.spelling("baseURL"),withXsrfToken:Ho.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&fe.merge(o.common,o[n.method]);o&&fe.forEach(["delete","get","head","post","put","patch","common"],b=>{delete o[b]}),n.headers=di.concat(s,o);const c=[];let d=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(d=d&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let p,h=0,v;if(!d){const b=[uA.bind(this),void 0];for(b.unshift(...c),b.push(...f),v=b.length,p=Promise.resolve(n);h<v;)p=p.then(b[h++],b[h++]);return p}v=c.length;let y=n;for(;h<v;){const b=c[h++],S=c[h++];try{y=b(y)}catch(C){S.call(this,C);break}}try{p=uA.call(this,y)}catch(b){return Promise.reject(b)}for(h=0,v=f.length;h<v;)p=p.then(f[h++],f[h++]);return p}getUri(t){t=Yl(this.defaults,t);const n=ZP(t.baseURL,t.url,t.allowAbsoluteUrls);return BP(n,t.params,t.paramsSerializer)}};fe.forEach(["delete","get","head","options"],function(t){Fl.prototype[t]=function(n,r){return this.request(Yl(r||{},{method:t,url:n,data:(r||{}).data}))}});fe.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,c){return this.request(Yl(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Fl.prototype[t]=n(),Fl.prototype[t+"Form"]=n(!0)});let M7=class JP{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(c=>{r.subscribe(c),o=c}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,c){r.reason||(r.reason=new Cd(o,s,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new JP(function(i){t=i}),cancel:t}}};function z7(e){return function(n){return e.apply(null,n)}}function L7(e){return fe.isObject(e)&&e.isAxiosError===!0}const b_={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(b_).forEach(([e,t])=>{b_[t]=e});function eM(e){const t=new Fl(e),n=NP(Fl.prototype.request,t);return fe.extend(n,Fl.prototype,t,{allOwnKeys:!0}),fe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return eM(Yl(e,i))},n}const Rn=eM(dp);Rn.Axios=Fl;Rn.CanceledError=Cd;Rn.CancelToken=M7;Rn.isCancel=GP;Rn.VERSION=QP;Rn.toFormData=Ay;Rn.AxiosError=dt;Rn.Cancel=Rn.CanceledError;Rn.all=function(t){return Promise.all(t)};Rn.spread=z7;Rn.isAxiosError=L7;Rn.mergeConfig=Yl;Rn.AxiosHeaders=di;Rn.formToJSON=e=>qP(fe.isHTMLForm(e)?new FormData(e):e);Rn.getAdapter=XP.getAdapter;Rn.HttpStatusCode=b_;Rn.default=Rn;const{Axios:vTe,AxiosError:yTe,CanceledError:bTe,isCancel:xTe,CancelToken:wTe,VERSION:STe,all:_Te,Cancel:CTe,isAxiosError:ETe,spread:kTe,toFormData:RTe,AxiosHeaders:jTe,HttpStatusCode:ITe,formToJSON:TTe,getAdapter:NTe,mergeConfig:ATe}=Rn;function Vl({id:e=Bn,operationsUrl:t,port:n,secure:r}={}){let i=t||lr.getOperationsUrl(e);if(i&&(n||r!==void 0)){const s=new URL(i);n&&(s.port=String(n)),r!==void 0&&(s.protocol=r?"https:":"http:"),i=s.toString()}const o=Rn.create({withCredentials:!0,timeout:15e3,headers:{"Content-Type":"application/json"},baseURL:i});return o.interceptors.response.use(dG),o}const Vt=Rn.create({withCredentials:!0,baseURL:"/",timeout:15e3,headers:{"Content-Type":"application/json"}});var Ed=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},U7={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},F7=class{#e=U7;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Dl=new F7;function V7(e){setTimeout(e,0)}var Wl=typeof window>"u"||"Deno"in globalThis;function Pr(){}function B7(e,t){return typeof e=="function"?e(t):e}function x_(e){return typeof e=="number"&&e>=0&&e!==1/0}function tM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zs(e,t){return typeof e=="function"?e(t):e}function Qi(e,t){return typeof e=="function"?e(t):e}function fA(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:c}=e;if(s){if(r){if(t.queryHash!==o1(s,t.options))return!1}else if(!zm(t.queryKey,s))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||o&&!o(t))}function mA(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Xl(t.options.mutationKey)!==Xl(o))return!1}else if(!zm(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function o1(e,t){return(t?.queryKeyHashFn||Xl)(e)}function Xl(e){return JSON.stringify(e,(t,n)=>w_(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function zm(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>zm(e[n],t[n])):!1}var H7=Object.prototype.hasOwnProperty;function nM(e,t){if(e===t)return e;const n=pA(e)&&pA(t);if(!n&&!(w_(e)&&w_(t)))return t;const i=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),s=o.length,c=n?new Array(s):{};let d=0;for(let f=0;f<s;f++){const p=n?f:o[f],h=e[p],v=t[p];if(h===v){c[p]=h,(n?f<i:H7.call(e,p))&&d++;continue}if(h===null||v===null||typeof h!="object"||typeof v!="object"){c[p]=v;continue}const y=nM(h,v);c[p]=y,y===h&&d++}return i===s&&d===i?e:c}function Ev(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function pA(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function w_(e){if(!hA(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!hA(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hA(e){return Object.prototype.toString.call(e)==="[object Object]"}function q7(e){return new Promise(t=>{Dl.setTimeout(t,e)})}function S_(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?nM(e,t):t}function G7(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function K7(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var a1=Symbol();function rM(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===a1?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function iM(e,t){return typeof e=="function"?e(...t):!!e}var Z7=class extends Ed{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Wl&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},s1=new Z7;function __(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var Y7=V7;function W7(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=Y7;const o=c=>{t?e.push(c):i(()=>{n(c)})},s=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||s()}return d},batchCalls:c=>(...d)=>{o(()=>{c(...d)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var Qn=W7(),X7=class extends Ed{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Wl&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},kv=new X7;function Q7(e){return Math.min(1e3*2**e,3e4)}function oM(e){return(e??"online")==="online"?kv.isOnline():!0}var C_=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function aM(e){let t=!1,n=0,r;const i=__(),o=()=>i.status!=="pending",s=S=>{if(!o()){const C=new C_(S);v(C),e.onCancel?.(C)}},c=()=>{t=!0},d=()=>{t=!1},f=()=>s1.isFocused()&&(e.networkMode==="always"||kv.isOnline())&&e.canRun(),p=()=>oM(e.networkMode)&&e.canRun(),h=S=>{o()||(r?.(),i.resolve(S))},v=S=>{o()||(r?.(),i.reject(S))},y=()=>new Promise(S=>{r=C=>{(o()||f())&&S(C)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),b=()=>{if(o())return;let S;const C=n===0?e.initialPromise:void 0;try{S=C??e.fn()}catch(E){S=Promise.reject(E)}Promise.resolve(S).then(h).catch(E=>{if(o())return;const k=e.retry??(Wl?0:3),R=e.retryDelay??Q7,I=typeof R=="function"?R(n,E):R,A=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,E);if(t||!A){v(E);return}n++,e.onFail?.(n,E),q7(I).then(()=>f()?void 0:y()).then(()=>{t?v(E):b()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?b():y().then(b),i)}}var sM=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),x_(this.gcTime)&&(this.#e=Dl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Wl?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Dl.clearTimeout(this.#e),this.#e=void 0)}},J7=class extends sM{#e;#t;#n;#i;#r;#a;#s;constructor(e){super(),this.#s=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=vA(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=vA(this.options);t.data!==void 0&&(this.setState(gA(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=S_(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Pr).catch(Pr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Qi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===a1||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>zs(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!tM(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{const c=rM(this.options,t),f=(()=>{const p={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(p),p})();return this.#s=!1,this.options.persister?this.options.persister(c,f,this):c(f)},s=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(c),c})();this.options.behavior?.onFetch(s,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#o({type:"fetch",meta:s.fetchOptions?.meta}),this.#r=aM({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:c=>{c instanceof C_&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{this.#o({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const c=await this.#r.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof C_){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#o({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...lM(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...gA(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Qn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function lM(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:oM(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function gA(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function vA(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var cM=class extends Ed{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#s=__(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#a;#s;#o;#h;#f;#m;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),yA(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return E_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return E_(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qi(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Ev(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&bA(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||Qi(this.options.enabled,this.#t)!==Qi(t.enabled,this.#t)||zs(this.options.staleTime,this.#t)!==zs(t.staleTime,this.#t))&&this.#g();const i=this.#v();r&&(this.#t!==n||Qi(this.options.enabled,this.#t)!==Qi(t.enabled,this.#t)||i!==this.#l)&&this.#y(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return tK(this,n)&&(this.#i=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Pr)),t}#g(){this.#x();const e=zs(this.options.staleTime,this.#t);if(Wl||this.#i.isStale||!x_(e))return;const n=tM(this.#i.dataUpdatedAt,e)+1;this.#c=Dl.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#l=e,!(Wl||Qi(this.options.enabled,this.#t)===!1||!x_(this.#l)||this.#l===0)&&(this.#u=Dl.setInterval(()=>{(this.options.refetchIntervalInBackground||s1.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#v())}#x(){this.#c&&(Dl.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Dl.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#i,o=this.#r,s=this.#a,d=e!==n?e.state:this.#n,{state:f}=e;let p={...f},h=!1,v;if(t._optimisticResults){const z=this.hasListeners(),L=!z&&yA(e,t),K=z&&bA(e,n,t,r);(L||K)&&(p={...p,...lM(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:S}=p;v=p.data;let C=!1;if(t.placeholderData!==void 0&&v===void 0&&S==="pending"){let z;i?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(z=i.data,C=!0):z=typeof t.placeholderData=="function"?t.placeholderData(this.#m?.state.data,this.#m):t.placeholderData,z!==void 0&&(S="success",v=S_(i?.data,z,t),h=!0)}if(t.select&&v!==void 0&&!C)if(i&&v===o?.data&&t.select===this.#h)v=this.#f;else try{this.#h=t.select,v=t.select(v),v=S_(i?.data,v,t),this.#f=v,this.#o=null}catch(z){this.#o=z}this.#o&&(y=this.#o,v=this.#f,b=Date.now(),S="error");const E=p.fetchStatus==="fetching",k=S==="pending",R=S==="error",I=k&&E,A=v!==void 0,N={status:S,fetchStatus:p.fetchStatus,isPending:k,isSuccess:S==="success",isError:R,isInitialLoading:I,isLoading:I,data:v,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:E,isRefetching:E&&!k,isLoadingError:R&&!A,isPaused:p.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:R&&A,isStale:l1(e,t),refetch:this.refetch,promise:this.#s,isEnabled:Qi(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const z=ee=>{N.status==="error"?ee.reject(N.error):N.data!==void 0&&ee.resolve(N.data)},L=()=>{const ee=this.#s=N.promise=__();z(ee)},K=this.#s;switch(K.status){case"pending":e.queryHash===n.queryHash&&z(K);break;case"fulfilled":(N.status==="error"||N.data!==K.value)&&L();break;case"rejected":(N.status!=="error"||N.error!==K.reason)&&L();break}}return N}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#m=this.#t),Ev(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#p.size)return!0;const o=new Set(i??this.#p);return this.options.throwOnError&&o.add("error"),Object.keys(this.#i).some(s=>{const c=s;return this.#i[c]!==e[c]&&o.has(c)})};this.#_({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#_(e){Qn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function eK(e,t){return Qi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function yA(e,t){return eK(e,t)||e.state.data!==void 0&&E_(e,t,t.refetchOnMount)}function E_(e,t,n){if(Qi(t.enabled,e)!==!1&&zs(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&l1(e,t)}return!1}function bA(e,t,n,r){return(e!==t||Qi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&l1(e,n)}function l1(e,t){return Qi(t.enabled,e)!==!1&&e.isStaleByTime(zs(t.staleTime,e))}function tK(e,t){return!Ev(e.getCurrentResult(),t)}function xA(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],s=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let p=!1;const h=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},v=rM(t.options,t.fetchOptions),y=async(b,S,C)=>{if(p)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const k=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};return h(T),T})(),R=await v(k),{maxPages:I}=t.options,A=C?K7:G7;return{pages:A(b.pages,R,I),pageParams:A(b.pageParams,S,I)}};if(i&&o.length){const b=i==="backward",S=b?nK:wA,C={pages:o,pageParams:s},E=S(r,C);c=await y(C,E,b)}else{const b=e??o.length;do{const S=d===0?s[0]??r.initialPageParam:wA(r,c);if(d>0&&S==null)break;c=await y(c,S),d++}while(d<b)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function wA(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function nK(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var rK=class extends sM{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||uM(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=aM({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,s)=>{this.#r({type:"failed",failureCount:o,error:s})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#i.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);const s=await this.options.onMutate?.(e,n);s!==this.state.context&&this.#r({type:"pending",context:s,variables:e,isPaused:i})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#r({type:"success",data:o}),o}catch(o){try{throw await this.#n.config.onError?.(o,e,this.state.context,this,n),await this.options.onError?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,o,e,this.state.context,n),o}finally{this.#r({type:"error",error:o})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Qn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function uM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var dM=class extends Ed{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new rK({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=hg(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=hg(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=hg(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=hg(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Qn.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>mA(t,n))}findAll(e={}){return this.getAll().filter(t=>mA(e,t))}notify(e){Qn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Qn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Pr))))}};function hg(e){return e.options.scope?.id}var iK=class extends Ed{#e;#t=void 0;#n;#i;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Ev(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Xl(n.mutationKey)!==Xl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(t,n){return this.#i=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??uM();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){Qn.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#i.onSuccess?.(t.data,n,r,i),this.#i.onSettled?.(t.data,null,n,r,i)):t?.type==="error"&&(this.#i.onError?.(t.error,n,r,i),this.#i.onSettled?.(void 0,t.error,n,r,i))}this.listeners.forEach(n=>{n(this.#t)})})}},fM=class extends Ed{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??o1(r,t);let o=this.get(i);return o||(o=new J7({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Qn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>fA(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>fA(e,n)):t}notify(e){Qn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Qn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Qn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},oK=class{#e;#t;#n;#i;#r;#a;#s;#o;constructor(e={}){this.#e=e.queryCache||new fM,this.#t=e.mutationCache||new dM,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#s=s1.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=kv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(zs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,s=B7(t,o);if(s!==void 0)return this.#e.build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Qn.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Qn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Qn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qn.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Pr).catch(Pr)}invalidateQueries(e,t={}){return Qn.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Qn.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Pr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Pr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(zs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Pr).catch(Pr)}fetchInfiniteQuery(e){return e.behavior=xA(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Pr).catch(Pr)}ensureInfiniteQueryData(e){return e.behavior=xA(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return kv.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(Xl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{zm(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Xl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{zm(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=o1(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===a1&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Aw={exports:{}},at={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* react.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var SA;function aK(){if(SA)return at;SA=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),v=Symbol.iterator;function y(M){return M===null||typeof M!="object"?null:(M=v&&M[v]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function E(M,F,O){this.props=M,this.context=F,this.refs=C,this.updater=O||b}E.prototype.isReactComponent={},E.prototype.setState=function(M,F){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,F,"setState")},E.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function k(){}k.prototype=E.prototype;function R(M,F,O){this.props=M,this.context=F,this.refs=C,this.updater=O||b}var I=R.prototype=new k;I.constructor=R,S(I,E.prototype),I.isPureReactComponent=!0;var A=Array.isArray;function T(){}var N={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function L(M,F,O){var J=O.ref;return{$$typeof:e,type:M,key:F,ref:J!==void 0?J:null,props:O}}function K(M,F){return L(M.type,F,M.props)}function ee(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function Z(M){var F={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(O){return F[O]})}var Y=/\/+/g;function B(M,F){return typeof M=="object"&&M!==null&&M.key!=null?Z(""+M.key):F.toString(36)}function W(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(T,T):(M.status="pending",M.then(function(F){M.status==="pending"&&(M.status="fulfilled",M.value=F)},function(F){M.status==="pending"&&(M.status="rejected",M.reason=F)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function P(M,F,O,J,de){var pe=typeof M;(pe==="undefined"||pe==="boolean")&&(M=null);var V=!1;if(M===null)V=!0;else switch(pe){case"bigint":case"string":case"number":V=!0;break;case"object":switch(M.$$typeof){case e:case t:V=!0;break;case p:return V=M._init,P(V(M._payload),F,O,J,de)}}if(V)return de=de(M),V=J===""?"."+B(M,0):J,A(de)?(O="",V!=null&&(O=V.replace(Y,"$&/")+"/"),P(de,F,O,"",function(Ie){return Ie})):de!=null&&(ee(de)&&(de=K(de,O+(de.key==null||M&&M.key===de.key?"":(""+de.key).replace(Y,"$&/")+"/")+V)),F.push(de)),1;V=0;var ie=J===""?".":J+":";if(A(M))for(var _e=0;_e<M.length;_e++)J=M[_e],pe=ie+B(J,_e),V+=P(J,F,O,pe,de);else if(_e=y(M),typeof _e=="function")for(M=_e.call(M),_e=0;!(J=M.next()).done;)J=J.value,pe=ie+B(J,_e++),V+=P(J,F,O,pe,de);else if(pe==="object"){if(typeof M.then=="function")return P(W(M),F,O,J,de);throw F=String(M),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return V}function G(M,F,O){if(M==null)return M;var J=[],de=0;return P(M,J,"","",function(pe){return F.call(O,pe,de++)}),J}function U(M){if(M._status===-1){var F=M._result;F=F(),F.then(function(O){(M._status===0||M._status===-1)&&(M._status=1,M._result=O)},function(O){(M._status===0||M._status===-1)&&(M._status=2,M._result=O)}),M._status===-1&&(M._status=0,M._result=F)}if(M._status===1)return M._result.default;throw M._result}var te=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},$={map:G,forEach:function(M,F,O){G(M,function(){F.apply(this,arguments)},O)},count:function(M){var F=0;return G(M,function(){F++}),F},toArray:function(M){return G(M,function(F){return F})||[]},only:function(M){if(!ee(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return at.Activity=h,at.Children=$,at.Component=E,at.Fragment=n,at.Profiler=i,at.PureComponent=R,at.StrictMode=r,at.Suspense=d,at.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,at.__COMPILER_RUNTIME={__proto__:null,c:function(M){return N.H.useMemoCache(M)}},at.cache=function(M){return function(){return M.apply(null,arguments)}},at.cacheSignal=function(){return null},at.cloneElement=function(M,F,O){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var J=S({},M.props),de=M.key;if(F!=null)for(pe in F.key!==void 0&&(de=""+F.key),F)!z.call(F,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&F.ref===void 0||(J[pe]=F[pe]);var pe=arguments.length-2;if(pe===1)J.children=O;else if(1<pe){for(var V=Array(pe),ie=0;ie<pe;ie++)V[ie]=arguments[ie+2];J.children=V}return L(M.type,de,J)},at.createContext=function(M){return M={$$typeof:s,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:o,_context:M},M},at.createElement=function(M,F,O){var J,de={},pe=null;if(F!=null)for(J in F.key!==void 0&&(pe=""+F.key),F)z.call(F,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(de[J]=F[J]);var V=arguments.length-2;if(V===1)de.children=O;else if(1<V){for(var ie=Array(V),_e=0;_e<V;_e++)ie[_e]=arguments[_e+2];de.children=ie}if(M&&M.defaultProps)for(J in V=M.defaultProps,V)de[J]===void 0&&(de[J]=V[J]);return L(M,pe,de)},at.createRef=function(){return{current:null}},at.forwardRef=function(M){return{$$typeof:c,render:M}},at.isValidElement=ee,at.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:U}},at.memo=function(M,F){return{$$typeof:f,type:M,compare:F===void 0?null:F}},at.startTransition=function(M){var F=N.T,O={};N.T=O;try{var J=M(),de=N.S;de!==null&&de(O,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(T,te)}catch(pe){te(pe)}finally{F!==null&&O.types!==null&&(F.types=O.types),N.T=F}},at.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},at.use=function(M){return N.H.use(M)},at.useActionState=function(M,F,O){return N.H.useActionState(M,F,O)},at.useCallback=function(M,F){return N.H.useCallback(M,F)},at.useContext=function(M){return N.H.useContext(M)},at.useDebugValue=function(){},at.useDeferredValue=function(M,F){return N.H.useDeferredValue(M,F)},at.useEffect=function(M,F){return N.H.useEffect(M,F)},at.useEffectEvent=function(M){return N.H.useEffectEvent(M)},at.useId=function(){return N.H.useId()},at.useImperativeHandle=function(M,F,O){return N.H.useImperativeHandle(M,F,O)},at.useInsertionEffect=function(M,F){return N.H.useInsertionEffect(M,F)},at.useLayoutEffect=function(M,F){return N.H.useLayoutEffect(M,F)},at.useMemo=function(M,F){return N.H.useMemo(M,F)},at.useOptimistic=function(M,F){return N.H.useOptimistic(M,F)},at.useReducer=function(M,F,O){return N.H.useReducer(M,F,O)},at.useRef=function(M){return N.H.useRef(M)},at.useState=function(M){return N.H.useState(M)},at.useSyncExternalStore=function(M,F,O){return N.H.useSyncExternalStore(M,F,O)},at.useTransition=function(){return N.H.useTransition()},at.version="19.2.0",at}var _A;function fp(){return _A||(_A=1,Aw.exports=aK()),Aw.exports}var x=fp();const X=sp(x),mM=oG({__proto__:null,default:X},[x]);var pM=x.createContext(void 0),kr=e=>{const t=x.useContext(pM);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sK=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(pM.Provider,{value:e,children:t})),hM=x.createContext(!1),lK=()=>x.useContext(hM);hM.Provider;function cK(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var uK=x.createContext(cK()),dK=()=>x.useContext(uK),fK=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},mK=e=>{x.useEffect(()=>{e.clearReset()},[e])},pK=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||iM(n,[e.error,r])),hK=(e,t)=>t.state.data===void 0,gK=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},vK=(e,t)=>e.isLoading&&e.isFetching&&!t,yK=(e,t)=>e?.suspense&&t.isPending,CA=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function gM(e,t,n){const r=lK(),i=dK(),o=kr(),s=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(s),s._optimisticResults=r?"isRestoring":"optimistic",gK(s),fK(s,i),mK(i);const c=!o.getQueryCache().get(s.queryHash),[d]=x.useState(()=>new t(o,s)),f=d.getOptimisticResult(s),p=!r&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(h=>{const v=p?d.subscribe(Qn.batchCalls(h)):Pr;return d.updateResult(),v},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),x.useEffect(()=>{d.setOptions(s)},[s,d]),yK(s,f))throw CA(s,d,i);if(pK({result:f,errorResetBoundary:i,throwOnError:s.throwOnError,query:o.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw f.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(s,f),s.experimental_prefetchInRender&&!Wl&&vK(f,r)&&(c?CA(s,d,i):o.getQueryCache().get(s.queryHash)?.promise)?.catch(Pr).finally(()=>{d.updateResult()}),s.notifyOnChangeProps?f:d.trackResult(f)}function Ut(e,t){return gM(e,cM)}function fo(e,t){return gM({...e,enabled:!0,suspense:!0,throwOnError:hK,placeholderData:void 0},cM)}function $Te(e){return e}function vt(e,t){const n=kr(),[r]=x.useState(()=>new iK(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);const i=x.useSyncExternalStore(x.useCallback(s=>r.subscribe(Qn.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=x.useCallback((s,c)=>{r.mutate(s,c).catch(Pr)},[r]);if(i.error&&iM(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}async function bK(){const{data:e}=await Vt.get("/User/current");return e}const $y=["current-user"];function xK(){return{queryKey:$y,queryFn:bK,retry:!1}}async function mp({instanceClient:e}){const{data:t}=await e.post("/",{operation:"logout"});if(t)return t;throw new Error("Something went wrong")}async function rd({instanceClient:e,...t}){const{data:n}=await e.post("/",{...t,operation:"user_info"});return n}function pp(e=1e3){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}function c1(e){let t=e?.fqdn;if(!t)return null;t.match(/^https?:\/\//i)||(t=`https://${t}`);const n=new URL(t);return t.match(/:\d+/)||(n.port=String(td)),t.includes("://")||(n.protocol="https:"),n.toString()}function u1(e){let t=e.instanceFqdn;t.match(/^https?:\/\//i)||(t=`https://${t}`);const n=new URL(t);return e.operationsApiPort&&(n.port=String(e.operationsApiPort)),e.operationsApiSecure!==void 0&&(n.protocol=e.operationsApiSecure?"https:":"http:"),n.toString()}const Bn="OverallAppSignIn";class wK{broadListeners=[];specificListeners={};localStorageKey="Studio:PotentiallyAuthenticated";potentiallyAuthenticated;checkedAuthentication={};allConnections={};constructor(){this.potentiallyAuthenticated=JSON.parse(localStorage.getItem(this.localStorageKey)||"{}")}getAllConnections(){return this.potentiallyAuthenticated.OverallAppSignIn||(this.allConnections[Bn]={user:null,isLoading:!1}),this.allConnections}getConnectionById(t){return this.allConnections[t]||(this.allConnections[t]={user:null,isLoading:!!this.potentiallyAuthenticated[t]}),this.allConnections[t]}listenToAllEntities(t){this.broadListeners.includes(t)||this.broadListeners.push(t);for(const n in this.potentiallyAuthenticated)this.ensureUserIsLoaded(n);return()=>{const n=this.broadListeners.indexOf(t);n>=0&&this.broadListeners.splice(n,1)}}listenToEntity(t,n){if(t)return this.specificListeners[t]||(this.specificListeners[t]=[]),this.specificListeners[t].includes(n)||this.specificListeners[t].push(n),this.ensureUserIsLoaded(t),()=>{const r=this.specificListeners[t].indexOf(n);r>=0&&this.specificListeners[t].splice(r,1)}}setUserForEntity(t,n){const r=this.calculateIdFromEntity(t),i=this.calculateKeyFromEntity(t);!r||!i||(n?this.flagKeyAsSignedIn(r,i):this.flagKeyAsSignedOut(r),this.updateConnectionIfChanged(r,!1,n))}updateUserForEntity(t,n){const r=this.calculateIdFromEntity(t),i=this.calculateKeyFromEntity(t);if(!r||!i)return;const o=this.getConnectionById(r);o.user&&this.updateConnectionIfChanged(r,!1,{...o.user,...n})}calculateIdFromEntity(t){return Bn}async signOutFromPotentiallyAuthenticatedInstances(){for(const t in this.potentiallyAuthenticated)if(this.allConnections[t].user=null,this.allConnections[t].isLoading=!1,this.flagKeyAsSignedOut(t),t!==Bn)try{const n=Vl({id:t});await mp({instanceClient:n})}catch(n){console.error(`Failed to log out from ${t}, carrying on`,n)}}calculateKeyFromEntity(t){return Bn}updateConnectionIfChanged(t,n,r){this.checkedAuthentication[t]=!0;const i=this.getConnectionById(t);let o=!1;i.isLoading!==n&&(i.isLoading=n,o=!0),i.user!==r&&(i.user=r,o=!0),o&&this.updateListeners(t)}flagKeyAsSignedIn(t,n){this.potentiallyAuthenticated[t]!==n&&(this.potentiallyAuthenticated[t]=n,localStorage.setItem(this.localStorageKey,JSON.stringify(this.potentiallyAuthenticated)))}flagKeyAsSignedOut(t){this.potentiallyAuthenticated[t]&&(delete this.potentiallyAuthenticated[t],localStorage.setItem(this.localStorageKey,JSON.stringify(this.potentiallyAuthenticated)))}async updateListeners(t){if(await pp(1),this.broadListeners)for(const n of this.broadListeners)this.updateListener(t,n);if(this.specificListeners[t])for(const n of this.specificListeners[t])this.updateListener(t,n)}updateListener(t,n){n(this.getConnectionById(t),t)}async ensureUserIsLoaded(t){if(!this.checkedAuthentication[t])return this.reloadUser(t)}getOperationsUrl(t){return lG}async reloadUser(t){if(!this.potentiallyAuthenticated[t]){this.updateConnectionIfChanged(t,!1,null);return}const n=this.potentiallyAuthenticated[t];this.updateConnectionIfChanged(t,!0,null);let r=null;try{t===Bn?Fu&&(r=await rd({instanceClient:Vl()})):t&&(r=await rd({instanceClient:Vl({id:t})}))}catch(i){console.error(i),r=null}r?this.flagKeyAsSignedIn(t,n):this.flagKeyAsSignedOut(t),this.updateConnectionIfChanged(t,!1,r)}}const lr=new wK,Vu=new WeakMap,sv=new WeakMap,Rv={current:[]};let Ow=!1,_m=0;const vm=new Set,gg=new Map;function vM(e){const t=Array.from(e).sort((n,r)=>n instanceof Bu&&n.options.deps.includes(r)?1:r instanceof Bu&&r.options.deps.includes(n)?-1:0);for(const n of t){if(Rv.current.includes(n))continue;Rv.current.push(n),n.recompute();const r=sv.get(n);if(r)for(const i of r){const o=Vu.get(i);o&&vM(o)}}}function SK(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function _K(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function yM(e){if(_m>0&&!gg.has(e)&&gg.set(e,e.prevState),vm.add(e),!(_m>0)&&!Ow)try{for(Ow=!0;vm.size>0;){const t=Array.from(vm);vm.clear();for(const n of t){const r=gg.get(n)??n.prevState;n.prevState=r,SK(n)}for(const n of t){const r=Vu.get(n);r&&(Rv.current.push(n),vM(r))}for(const n of t){const r=Vu.get(n);if(r)for(const i of r)_K(i)}}}finally{Ow=!1,Rv.current=[],gg.clear()}}function Cm(e){_m++;try{e()}finally{if(_m--,_m===0){const t=vm.values().next().value;t&&yM(t)}}}function CK(e){return typeof e=="function"}class k_{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var i,o;this.listeners.add(r);const s=(o=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:o.call(i,r,this);return()=>{this.listeners.delete(r),s?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):CK(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),yM(this)}}class Bu{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,r=new Array(n),i=new Array(n);for(let o=0;o<n;o++){const s=this.options.deps[o];r[o]=s.prevState,i[o]=s.state}return this.lastSeenDepValues=i,{prevDepVals:r,currDepVals:i,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,r;this.prevState=this.state;const i=this.getDepVals();this.state=this.options.fn(i),(r=(n=this.options).onUpdate)==null||r.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const o of this.options.deps)o instanceof Bu&&o.checkIfRecalculationNeededDeeply();let n=!1;const r=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let o=0;o<i.length;o++)if(i[o]!==r[o]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var r,i;this.listeners.add(n);const o=(i=(r=this.options).onSubscribe)==null?void 0:i.call(r,n,this);return()=>{this.listeners.delete(n),o?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof Bu)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof k_){let r=Vu.get(n);r||(r=new Set,Vu.set(n,r)),r.add(this);let i=sv.get(this);i||(i=new Set,sv.set(this,i)),i.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof Bu)this.unregisterFromGraph(n.options.deps);else if(n instanceof k_){const r=Vu.get(n);r&&r.delete(this);const i=sv.get(this);i&&i.delete(n)}}}const Ls="__TSR_index",EA="popstate",kA="beforeunload";function EK(e){let t=e.getLocation();const n=new Set,r=s=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:s}))},i=s=>{e.notifyOnIndexChange??!0?r(s):t=e.getLocation()},o=async({task:s,navigateOpts:c,...d})=>{if(c?.ignoreBlocker??!1){s();return}const p=e.getBlockers?.()??[],h=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&p.length&&h)for(const v of p){const y=Lm(d.path,d.state);if(await v.blockerFn({currentLocation:t,nextLocation:y,action:d.type})){e.onBlocked?.();return}}s()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:s=>(n.add(s),()=>{n.delete(s)}),push:(s,c,d)=>{const f=t.state[Ls];c=RA(f+1,c),o({task:()=>{e.pushState(s,c),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:s,state:c})},replace:(s,c,d)=>{const f=t.state[Ls];c=RA(f,c),o({task:()=>{e.replaceState(s,c),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:s,state:c})},go:(s,c)=>{o({task:()=>{e.go(s),i({type:"GO",index:s})},navigateOpts:c,type:"GO"})},back:s=>{o({task:()=>{e.back(s?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:s,type:"BACK"})},forward:s=>{o({task:()=>{e.forward(s?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:s,type:"FORWARD"})},canGoBack:()=>t.state[Ls]!==0,createHref:s=>e.createHref(s),block:s=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,s]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==s))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function RA(e,t){t||(t={});const n=d1();return{...t,key:n,__TSR_key:n,[Ls]:e}}function bM(e){const t=e?.window??(typeof document<"u"?window:void 0),n=t.history.pushState,r=t.history.replaceState;let i=[];const o=()=>i,s=z=>i=z,c=e?.createHref??(z=>z),d=e?.parseLocation??(()=>Lm(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const z=d1();t.history.replaceState({[Ls]:0,key:z,__TSR_key:z},"")}let f=d(),p,h=!1,v=!1,y=!1,b=!1;const S=()=>f;let C,E;const k=()=>{C&&(N._ignoreSubscribers=!0,(C.isPush?t.history.pushState:t.history.replaceState)(C.state,"",C.href),N._ignoreSubscribers=!1,C=void 0,E=void 0,p=void 0)},R=(z,L,K)=>{const ee=c(L);E||(p=f),f=Lm(L,K),C={href:ee,state:K,isPush:C?.isPush||z==="push"},E||(E=Promise.resolve().then(()=>k()))},I=z=>{f=d(),N.notify({type:z})},A=async()=>{if(v){v=!1;return}const z=d(),L=z.state[Ls]-f.state[Ls],K=L===1,ee=L===-1,Z=!K&&!ee||h;h=!1;const Y=Z?"GO":ee?"BACK":"FORWARD",B=Z?{type:"GO",index:L}:{type:ee?"BACK":"FORWARD"};if(y)y=!1;else{const W=o();if(typeof document<"u"&&W.length){for(const P of W)if(await P.blockerFn({currentLocation:f,nextLocation:z,action:Y})){v=!0,t.history.go(1),N.notify(B);return}}}f=d(),N.notify(B)},T=z=>{if(b){b=!1;return}let L=!1;const K=o();if(typeof document<"u"&&K.length)for(const ee of K){const Z=ee.enableBeforeUnload??!0;if(Z===!0){L=!0;break}if(typeof Z=="function"&&Z()===!0){L=!0;break}}if(L)return z.preventDefault(),z.returnValue=""},N=EK({getLocation:S,getLength:()=>t.history.length,pushState:(z,L)=>R("push",z,L),replaceState:(z,L)=>R("replace",z,L),back:z=>(z&&(y=!0),b=!0,t.history.back()),forward:z=>{z&&(y=!0),b=!0,t.history.forward()},go:z=>{h=!0,t.history.go(z)},createHref:z=>c(z),flush:k,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(kA,T,{capture:!0}),t.removeEventListener(EA,A)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:s,notifyOnIndexChange:!1});return t.addEventListener(kA,T,{capture:!0}),t.addEventListener(EA,A),t.history.pushState=function(...z){const L=n.apply(t.history,z);return N._ignoreSubscribers||I("PUSH"),L},t.history.replaceState=function(...z){const L=r.apply(t.history,z);return N._ignoreSubscribers||I("REPLACE"),L},N}function kK(e){const t=typeof document<"u"?window:void 0;return bM({window:t,parseLocation:()=>{const n=t.location.hash.split("#").slice(1),r=n[0]??"/",i=t.location.search,o=n.slice(1),s=o.length===0?"":`#${o.join("#")}`,c=`${r}${i}${s}`;return Lm(c,t.history.state)},createHref:n=>`${t.location.pathname}${t.location.search}#${n}`})}function Lm(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),i=d1();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[Ls]:0,key:i,__TSR_key:i}}}function d1(){return(Math.random()+1).toString(36).substring(7)}function R_(e){return e[e.length-1]}function RK(e){return typeof e=="function"}function Bl(e,t){return RK(e)?e(t):e}const jK=Object.prototype.hasOwnProperty;function Wi(e,t){if(e===t)return e;const n=t,r=TA(e)&&TA(n);if(!r&&!(jv(e)&&jv(n)))return n;const i=r?e:jA(e);if(!i)return n;const o=r?n:jA(n);if(!o)return n;const s=i.length,c=o.length,d=r?new Array(c):{};let f=0;for(let p=0;p<c;p++){const h=r?p:o[p],v=e[h],y=n[h];if(v===y){d[h]=v,(r?p<s:jK.call(e,h))&&f++;continue}if(v===null||y===null||typeof v!="object"||typeof y!="object"){d[h]=y;continue}const b=Wi(v,y);d[h]=b,b===v&&f++}return s===c&&f===s?e:d}function jA(e){const t=[],n=Object.getOwnPropertyNames(e);for(const i of n){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}const r=Object.getOwnPropertySymbols(e);for(const i of r){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}return t}function jv(e){if(!IA(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!IA(n)||!n.hasOwnProperty("isPrototypeOf"))}function IA(e){return Object.prototype.toString.call(e)==="[object Object]"}function TA(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Hl(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!Hl(e[r],t[r],n))return!1;return!0}if(jv(e)&&jv(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const s in t)if((!r||t[s]!==void 0)&&!Hl(e[s],t[s],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const s in e)e[s]!==void 0&&i++;let o=0;for(const s in t)if((!r||t[s]!==void 0)&&(o++,o>i||!Hl(e[s],t[s],n)))return!1;return i===o}return!1}function id(e){let t,n;const r=new Promise((i,o)=>{t=i,n=o});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e?.(i)},r.reject=i=>{r.status="rejected",n(i)},r}function IK(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Us(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}var TK="Invariant failed";function Va(e,t){if(!e)throw new Error(TK)}const li="__root__",Qo=0,Ql=1,od=2,ad=3;function Ua(e){return f1(e.filter(t=>t!==void 0).join("/"))}function f1(e){return e.replace(/\/{2,}/g,"/")}function m1(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Fs(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function lv(e){return Fs(m1(e))}function Iv(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function NK(e,t,n){return Iv(e,n)===Iv(t,n)}function AK(e){const{type:t,value:n}=e;if(t===Qo)return n;const{prefixSegment:r,suffixSegment:i}=e;if(t===Ql){const o=n.substring(1);if(r&&i)return`${r}{$${o}}${i}`;if(r)return`${r}{$${o}}`;if(i)return`{$${o}}${i}`}if(t===ad){const o=n.substring(1);return r&&i?`${r}{-$${o}}${i}`:r?`${r}{-$${o}}`:i?`{-$${o}}${i}`:`{-$${o}}`}if(t===od){if(r&&i)return`${r}{$}${i}`;if(r)return`${r}{$}`;if(i)return`{$}${i}`}return n}function OK({base:e,to:t,trailingSlash:n="never",parseCache:r}){let i=xM(e,r).slice();const o=Dy(t,r);i.length>1&&R_(i)?.value==="/"&&i.pop();for(let d=0,f=o.length;d<f;d++){const p=o[d],h=p.value;h==="/"?d?d===f-1&&i.push(p):i=[p]:h===".."?i.pop():h==="."||i.push(p)}i.length>1&&(R_(i).value==="/"?n==="never"&&i.pop():n==="always"&&i.push({type:Qo,value:"/"}));const s=i.map(AK);return Ua(s)}const xM=(e,t)=>wM(e,t,!0),Dy=(e,t)=>wM(e,t,!1),wM=(e,t,n)=>{if(!e)return[];const r=t?.get(e);if(r)return r;const i=LK(e,n);return t?.set(e,i),i},$K=/^\$.{1,}$/,DK=/^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,PK=/^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,MK=/^\$$/,zK=/^(.*?)\{\$\}(.*)$/;function LK(e,t){e=f1(e);const n=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),n.push({type:Qo,value:"/"})),!e)return n;const r=e.split("/").filter(Boolean);return n.push(...r.map(i=>{const o=!t&&i!==li&&i.slice(-1)==="_"?i.slice(0,-1):i,s=o.match(zK);if(s){const f=s[1],p=s[2];return{type:od,value:"$",prefixSegment:f||void 0,suffixSegment:p||void 0}}const c=o.match(PK);if(c){const f=c[1],p=c[2],h=c[3];return{type:ad,value:p,prefixSegment:f||void 0,suffixSegment:h||void 0}}const d=o.match(DK);if(d){const f=d[1],p=d[2],h=d[3];return{type:Ql,value:""+p,prefixSegment:f||void 0,suffixSegment:h||void 0}}if($K.test(o)){const f=o.substring(1);return{type:Ql,value:"$"+f,prefixSegment:void 0,suffixSegment:void 0}}return MK.test(o)?{type:od,value:"$",prefixSegment:void 0,suffixSegment:void 0}:{type:Qo,value:o.includes("%25")?o.split("%25").map(f=>decodeURI(f)).join("%25"):decodeURI(o)}})),e.slice(-1)==="/"&&(e=e.substring(1),n.push({type:Qo,value:"/"})),n}function vg({path:e,params:t,leaveWildcards:n,leaveParams:r,decodeCharMap:i,parseCache:o}){const s=Dy(e,o);function c(h){const v=t[h],y=typeof v=="string";return h==="*"||h==="_splat"?y?encodeURI(v):v:y?UK(v,i):v}let d=!1;const f={},p=Ua(s.map(h=>{if(h.type===Qo)return h.value;if(h.type===od){f._splat=t._splat,f["*"]=t._splat;const v=h.prefixSegment||"",y=h.suffixSegment||"";if(!t._splat)return d=!0,n?`${v}${h.value}${y}`:v||y?`${v}${y}`:void 0;const b=c("_splat");return n?`${v}${h.value}${b??""}${y}`:`${v}${b}${y}`}if(h.type===Ql){const v=h.value.substring(1);!d&&!(v in t)&&(d=!0),f[v]=t[v];const y=h.prefixSegment||"",b=h.suffixSegment||"";if(r){const S=c(h.value);return`${y}${h.value}${S??""}${b}`}return`${y}${c(v)??"undefined"}${b}`}if(h.type===ad){const v=h.value.substring(1),y=h.prefixSegment||"",b=h.suffixSegment||"";if(!(v in t)||t[v]==null)return n?`${y}${v}${b}`:y||b?`${y}${b}`:void 0;if(f[v]=t[v],r){const S=c(h.value);return`${y}${h.value}${S??""}${b}`}return n?`${y}${v}${c(v)??""}${b}`:`${y}${c(v)??""}${b}`}return h.value}));return{usedParams:f,interpolatedPath:p,isMissingParams:d}}function UK(e,t){let n=encodeURIComponent(e);if(t)for(const[r,i]of t)n=n.replaceAll(r,i);return n}function j_(e,t,n){const r=FK(e,t,n);if(!(t.to&&!r))return r??{}}function FK(e,{to:t,fuzzy:n,caseSensitive:r},i){const o=t,s=xM(e.startsWith("/")?e:`/${e}`,i),c=Dy(o.startsWith("/")?o:`/${o}`,i),d={};return VK(s,c,d,n,r)?d:void 0}function VK(e,t,n,r,i){let o=0,s=0;for(;o<e.length||s<t.length;){const c=e[o],d=t[s];if(d){if(d.type===od){const f=e.slice(o);let p;if(d.prefixSegment||d.suffixSegment){if(!c)return!1;const h=d.prefixSegment||"",v=d.suffixSegment||"",y=c.value;if("prefixSegment"in d&&!y.startsWith(h)||"suffixSegment"in d&&!e[e.length-1]?.value.endsWith(v))return!1;let b=decodeURI(Ua(f.map(S=>S.value)));h&&b.startsWith(h)&&(b=b.slice(h.length)),v&&b.endsWith(v)&&(b=b.slice(0,b.length-v.length)),p=b}else p=decodeURI(Ua(f.map(h=>h.value)));return n["*"]=p,n._splat=p,!0}if(d.type===Qo){if(d.value==="/"&&!c?.value){s++;continue}if(c){if(i){if(d.value!==c.value)return!1}else if(d.value.toLowerCase()!==c.value.toLowerCase())return!1;o++,s++;continue}else return!1}if(d.type===Ql){if(!c||c.value==="/")return!1;let f="",p=!1;if(d.prefixSegment||d.suffixSegment){const h=d.prefixSegment||"",v=d.suffixSegment||"",y=c.value;if(h&&!y.startsWith(h)||v&&!y.endsWith(v))return!1;let b=y;h&&b.startsWith(h)&&(b=b.slice(h.length)),v&&b.endsWith(v)&&(b=b.slice(0,b.length-v.length)),f=decodeURIComponent(b),p=!0}else f=decodeURIComponent(c.value),p=!0;p&&(n[d.value.substring(1)]=f,o++),s++;continue}if(d.type===ad){if(!c){s++;continue}if(c.value==="/"){s++;continue}let f="",p=!1;if(d.prefixSegment||d.suffixSegment){const h=d.prefixSegment||"",v=d.suffixSegment||"",y=c.value;if((!h||y.startsWith(h))&&(!v||y.endsWith(v))){let b=y;h&&b.startsWith(h)&&(b=b.slice(h.length)),v&&b.endsWith(v)&&(b=b.slice(0,b.length-v.length)),f=decodeURIComponent(b),p=!0}}else{let h=!0;for(let v=s+1;v<t.length;v++){const y=t[v];if(y?.type===Qo&&y.value===c.value){h=!1;break}if(y?.type===Ql||y?.type===od){e.length<t.length&&(h=!1);break}}h&&(f=decodeURIComponent(c.value),p=!0)}p&&(n[d.value.substring(1)]=f,o++),s++;continue}}if(o<e.length&&s>=t.length)return n["**"]=Ua(e.slice(o).map(f=>f.value)),!!r&&t[t.length-1]?.value!=="/";if(s<t.length&&o>=e.length){for(let f=s;f<t.length;f++)if(t[f]?.type!==ad)return!1;break}break}return!0}const BK=.75,HK=1,qK=.5,GK=.4,KK=.25,ZK=.2,YK=.05,WK=.02,XK=.01,NA=2e-4,AA=1e-4;function OA(e,t){return e.prefixSegment&&e.suffixSegment?t+YK+NA*e.prefixSegment.length+AA*e.suffixSegment.length:e.prefixSegment?t+WK+NA*e.prefixSegment.length:e.suffixSegment?t+XK+AA*e.suffixSegment.length:t}function QK(e){const t=[];return e.forEach((r,i)=>{if(r.isRoot||!r.path)return;const o=m1(r.fullPath);let s=Dy(o),c=0;for(;s.length>c+1&&s[c]?.value==="/";)c++;c>0&&(s=s.slice(c));let d=0,f=!1;const p=s.map((h,v)=>{if(h.value==="/")return BK;if(h.type===Qo)return HK;let y;h.type===Ql?y=qK:h.type===ad?(y=GK,d++):y=KK;for(let b=v+1;b<s.length;b++){const S=s[b];if(S.type===Qo&&S.value!=="/")return f=!0,OA(h,y+ZK)}return OA(h,y)});t.push({child:r,trimmed:o,parsed:s,index:i,scores:p,optionalParamCount:d,hasStaticAfter:f})}),t.sort((r,i)=>{const o=Math.min(r.scores.length,i.scores.length);for(let s=0;s<o;s++)if(r.scores[s]!==i.scores[s])return i.scores[s]-r.scores[s];if(r.scores.length!==i.scores.length){if(r.optionalParamCount!==i.optionalParamCount){if(r.hasStaticAfter===i.hasStaticAfter)return r.optionalParamCount-i.optionalParamCount;if(r.hasStaticAfter&&!i.hasStaticAfter)return-1;if(!r.hasStaticAfter&&i.hasStaticAfter)return 1}return i.scores.length-r.scores.length}for(let s=0;s<o;s++)if(r.parsed[s].value!==i.parsed[s].value)return r.parsed[s].value>i.parsed[s].value?1:-1;return r.index-i.index}).map((r,i)=>(r.child.rank=i,r.child))}function JK({routeTree:e,initRoute:t}){const n={},r={},i=s=>{s.forEach((c,d)=>{t?.(c,d);const f=n[c.id];if(Va(!f,`Duplicate routes found with id: ${String(c.id)}`),n[c.id]=c,!c.isRoot&&c.path){const h=Fs(c.fullPath);(!r[h]||c.fullPath.endsWith("/"))&&(r[h]=c)}const p=c.children;p?.length&&i(p)})};i([e]);const o=QK(Object.values(n));return{routesById:n,routesByPath:r,flatRoutes:o}}function Io(e){return!!e?.isNotFound}function eZ(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Tv="tsr-scroll-restoration-v1_3",tZ=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function nZ(){const e=eZ();if(!e)return null;const t=e.getItem(Tv);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Bl(r,n)||n,e.setItem(Tv,JSON.stringify(n)))}}const yg=nZ(),I_=e=>e.state.__TSR_key||e.href;function rZ(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Nv=!1;function SM({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:o}){let s;try{s=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const c=t||window.history.state?.__TSR_key,d=s[c];Nv=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const h in d){const v=d[h];if(h==="window")window.scrollTo({top:v.scrollY,left:v.scrollX,behavior:n});else if(h){const y=document.querySelector(h);y&&(y.scrollLeft=v.scrollX,y.scrollTop=v.scrollY)}}break e}const f=(o??window.location).hash.split("#",2)[1];if(f){const h=window.history.state?.__hashScrollIntoViewOptions??!0;if(h){const v=document.getElementById(f);v&&v.scrollIntoView(h)}break e}const p={top:0,left:0,behavior:n};if(window.scrollTo(p),i)for(const h of i){if(h==="window")continue;const v=typeof h=="function"?h():document.querySelector(h);v&&v.scrollTo(p)}}Nv=!1}function iZ(e,t){if(!yg&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!yg))return;e.isScrollRestorationSetup=!0,Nv=!1;const r=e.options.getScrollRestorationKey||I_;window.history.scrollRestoration="manual";const i=o=>{if(Nv||!e.isScrollRestoring)return;let s="";if(o.target===document||o.target===window)s="window";else{const d=o.target.getAttribute("data-scroll-restoration-id");d?s=`[data-scroll-restoration-id="${d}"]`:s=rZ(o.target)}const c=r(e.state.location);yg.set(d=>{const f=d[c]||={},p=f[s]||={};if(s==="window")p.scrollX=window.scrollX||0,p.scrollY=window.scrollY||0;else if(s){const h=document.querySelector(s);h&&(p.scrollX=h.scrollLeft||0,p.scrollY=h.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",tZ(i,100),!0),e.subscribe("onRendered",o=>{const s=r(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(SM({storageKey:Tv,key:s,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&yg.set(c=>(c[s]||={},c)))})}function oZ(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function aZ(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function $w(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function sZ(e){const t=new URLSearchParams(e),n={};for(const[r,i]of t.entries()){const o=n[r];o==null?n[r]=$w(i):Array.isArray(o)?o.push($w(i)):n[r]=[o,$w(i)]}return n}const lZ=uZ(JSON.parse),cZ=dZ(JSON.stringify,JSON.parse);function uZ(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=sZ(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function dZ(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const o=aZ(i,r);return o?`?${o}`:""}}function kd(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Yo(e){return e instanceof Response&&!!e.options}function fZ(e){const t=new Map;let n,r;const i=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const s=t.get(o);if(s)return i(s),s.value},set(o,s){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const c=t.get(o);if(c)c.value=s,i(c);else{const d={key:o,value:s,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(o,d)}}}}const cv=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Py=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),_M=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Va(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);Va(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,_M(e,t))},Ds=(e,t,n)=>{if(!(!Yo(n)&&!Io(n))){if(Yo(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=Yo(n)?"redirected":"notFound";e.updateMatch(t.id,i=>({...i,status:r,isFetching:!1,error:n})),Io(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Yo(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(_M(e,n),n)}},CM=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Gf=(e,t,n,r)=>{const{id:i,routeId:o}=e.matches[t],s=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Ds(e,e.router.getMatch(i),n);try{s.options.onError?.(n)}catch(c){n=c,Ds(e,e.router.getMatch(i),n)}e.updateMatch(i,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},mZ=(e,t,n,r)=>{const i=e.router.getMatch(t),o=e.matches[n-1]?.id,s=o?e.router.getMatch(o):void 0;if(e.router.isShell()){i.ssr=t===li;return}if(s?.ssr===!1){i.ssr=!1;return}const c=y=>y===!0&&s?.ssr==="data-only"?"data-only":y,d=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){i.ssr=c(d);return}if(typeof r.options.ssr!="function"){i.ssr=c(r.options.ssr);return}const{search:f,params:p}=i,h={search:bg(f,i.searchError),params:bg(p,i.paramsError),location:e.location,matches:e.matches.map(y=>({index:y.index,pathname:y.pathname,fullPath:y.fullPath,staticData:y.staticData,id:y.id,routeId:y.routeId,search:bg(y.search,y.searchError),params:bg(y.params,y.paramsError),ssr:y.ssr}))},v=r.options.ssr(h);if(Us(v))return v.then(y=>{i.ssr=c(y??d)});i.ssr=c(v??d)},EM=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Py(e,t)&&(n.options.loader||n.options.beforeLoad||jM(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const s=setTimeout(()=>{cv(e)},i);r._nonReactive.pendingTimeout=s}},pZ=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;EM(e,t,n,r);const i=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Ds(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},hZ=(e,t,n,r)=>{const i=e.router.getMatch(t),o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=id(()=>{o?.resolve()});const{paramsError:s,searchError:c}=i;s&&Gf(e,n,s,"PARSE_PARAMS"),c&&Gf(e,n,c,"VALIDATE_SEARCH"),EM(e,t,r,i);const d=new AbortController,f=e.matches[n-1]?.id,v={...(f?e.router.getMatch(f):void 0)?.context??e.router.options.context??void 0,...i.__routeContext};let y=!1;const b=()=>{y||(y=!0,e.updateMatch(t,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:d,context:v})))},S=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,N=>({...N,isFetching:!1}))};if(!r.options.beforeLoad){Cm(()=>{b(),S()});return}i._nonReactive.beforeLoadPromise=id();const{search:C,params:E,cause:k}=i,R=Py(e,t),I={search:C,abortController:d,params:E,preload:R,context:v,location:e.location,navigate:N=>e.router.navigate({...N,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:R?"preload":k,matches:e.matches,...e.router.options.additionalContext},A=N=>{if(N===void 0){Cm(()=>{b(),S()});return}(Yo(N)||Io(N))&&(b(),Gf(e,n,N,"BEFORE_LOAD")),Cm(()=>{b(),e.updateMatch(t,z=>({...z,__beforeLoadContext:N,context:{...z.context,...N}})),S()})};let T;try{if(T=r.options.beforeLoad(I),Us(T))return b(),T.catch(N=>{Gf(e,n,N,"BEFORE_LOAD")}).then(A)}catch(N){b(),Gf(e,n,N,"BEFORE_LOAD")}A(T)},gZ=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],o=()=>{if(e.router.isServer){const d=mZ(e,n,t,i);if(Us(d))return d.then(c)}return c()},s=()=>hZ(e,n,t,i),c=()=>{if(CM(e,n))return;const d=pZ(e,n,i);return Us(d)?d.then(s):s()};return o()},Em=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([o,s,c])=>{const d=o?.meta,f=o?.links,p=o?.scripts,h=o?.styles;return{meta:d,links:f,headScripts:p,headers:c,scripts:s,styles:h}})},kM=(e,t,n,r)=>{const i=e.matchPromises[n-1],{params:o,loaderDeps:s,abortController:c,context:d,cause:f}=e.router.getMatch(t),p=Py(e,t);return{params:o,deps:s,preload:!!p,parentMatchPromise:i,abortController:c,context:d,location:e.location,navigate:h=>e.router.navigate({...h,_fromLocation:e.location}),cause:p?"preload":f,route:r,...e.router.options.additionalContext}},$A=async(e,t,n,r)=>{try{const i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&RM(r);const o=r.options.loader?.(kM(e,t,n,r)),s=r.options.loader&&Us(o);if(!!(s||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),r.options.loader){const h=s?await o:o;Ds(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,v=>({...v,loaderData:h}))}r._lazyPromise&&await r._lazyPromise;const d=Em(e,t,r),f=d?await d:void 0,p=i._nonReactive.minPendingPromise;p&&await p,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(o){let s=o;const c=i._nonReactive.minPendingPromise;c&&await c,Io(o)&&await r.options.notFoundComponent?.preload?.(),Ds(e,e.router.getMatch(t),o);try{r.options.onError?.(o)}catch(p){s=p,Ds(e,e.router.getMatch(t),p)}const d=Em(e,t,r),f=d?await d:void 0;e.updateMatch(t,p=>({...p,error:s,status:"error",isFetching:!1,...f}))}}catch(i){const o=e.router.getMatch(t);if(o){const s=Em(e,t,r);if(s){const c=await s;e.updateMatch(t,d=>({...d,...c}))}o._nonReactive.loaderPromise=void 0}Ds(e,o,i)}},vZ=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let i=!1,o=!1;const s=e.router.looseRoutesById[r];if(CM(e,n)){if(e.router.isServer){const f=Em(e,n,s);if(f){const p=await f;e.updateMatch(n,h=>({...h,...p}))}return e.router.getMatch(n)}}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const p=e.router.getMatch(n);p.error&&Ds(e,p,p.error)}else{const p=Date.now()-f.updatedAt,h=Py(e,n),v=h?s.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:s.options.staleTime??e.router.options.defaultStaleTime??0,y=s.options.shouldReload,b=typeof y=="function"?y(kM(e,n,t,s)):y,S=!!h&&!e.router.state.matches.some(R=>R.id===n),C=e.router.getMatch(n);C._nonReactive.loaderPromise=id(),S!==C.preload&&e.updateMatch(n,R=>({...R,preload:S}));const{status:E,invalid:k}=C;if(i=E==="success"&&(k||(b??p>v)),!(h&&s.options.preload===!1))if(i&&!e.sync)o=!0,(async()=>{try{await $A(e,n,t,s);const R=e.router.getMatch(n);R._nonReactive.loaderPromise?.resolve(),R._nonReactive.loadPromise?.resolve(),R._nonReactive.loaderPromise=void 0}catch(R){Yo(R)&&await e.router.navigate(R.options)}})();else if(E!=="success"||i&&e.sync)await $A(e,n,t,s);else{const R=Em(e,n,s);if(R){const I=await R;e.updateMatch(n,A=>({...A,...I}))}}}}const c=e.router.getMatch(n);o||(c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loadPromise?.resolve()),clearTimeout(c._nonReactive.pendingTimeout),c._nonReactive.pendingTimeout=void 0,o||(c._nonReactive.loaderPromise=void 0),c._nonReactive.dehydrated=void 0;const d=o?c.isFetching:!1;return d!==c.isFetching||c.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:d,invalid:!1})),e.router.getMatch(n)):c};async function DA(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&cv(t);try{for(let i=0;i<t.matches.length;i++){const o=gZ(t,i);Us(o)&&await o}const n=t.firstBadMatchIndex??t.matches.length;for(let i=0;i<n;i++)t.matchPromises.push(vZ(t,i));await Promise.all(t.matchPromises);const r=cv(t);Us(r)&&await r}catch(n){if(Io(n)&&!t.preload){const r=cv(t);throw Us(r)&&await r,n}if(Yo(n))throw n}return t.matches}async function RM(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of IM){const i=e.options[r]?.preload;i&&n.push(i())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function bg(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function jM(e){for(const t of IM)if(e.options[t]?.preload)return!0;return!1}const IM=["component","errorComponent","pendingComponent","notFoundComponent"];function yZ(e){return{input:({url:t})=>{for(const n of e)t=TM(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=NM(e[n],t);return t}}}function bZ(e){const t=lv(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),o=e.caseSensitive?r:r.toLowerCase();return{input:({url:s})=>{const c=e.caseSensitive?s.pathname:s.pathname.toLowerCase();return c===i?s.pathname="/":c.startsWith(o)&&(s.pathname=s.pathname.slice(n.length)),s},output:({url:s})=>(s.pathname=Ua(["/",t,s.pathname]),s)}}function TM(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function NM(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function ql(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,i=t?.href!==n.href,o=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:i,hashChanged:o}}class xZ{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,i=this.basepath??r?.basepath??"/",o=this.basepath===void 0,s=r?.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(v=>[encodeURIComponent(v),v])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=bM())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new k_(SZ(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(v=>!["redirected"].includes(v.status))}}}),iZ(this));let c=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(o||i!==d||s!==f){this.basepath=d;const v=[];lv(d)!==""&&v.push(bZ({basepath:d})),f&&v.push(f),this.rewrite=v.length===0?void 0:v.length===1?v[0]:yZ(v),this.history&&this.updateLatestLocation(),c=!0}c&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,flatRoutes:i}=JK({routeTree:this.routeTree,initRoute:(s,c)=>{s.init({originalIndex:c})}});this.routesById=n,this.routesByPath=r,this.flatRoutes=i;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({href:d,state:f})=>{const p=new URL(d,this.origin),h=TM(this.rewrite,p),v=this.options.parseSearch(h.search),y=this.options.stringifySearch(v);h.search=y;const b=h.href.replace(h.origin,""),{pathname:S,hash:C}=h;return{href:b,publicHref:d,url:h.href,pathname:S,searchStr:y,search:Wi(r?.search,v),hash:C.split("#").reverse()[0]??"",state:Wi(r?.state,f)}},o=i(n),{__tempLocation:s,__tempKey:c}=o.state;if(s&&(!c||c===this.tempLocationKey)){const d=i(s);return d.state.key=o.state.key,d.state.__TSR_key=o.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>OK({base:n,to:f1(r),trailingSlash:this.options.trailingSlash,parseCache:this.parsePathnameCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.parsePathnameCache=fZ(1e3),this.getMatchedRoutes=(n,r)=>_Z({pathname:n,routePathname:r,caseSensitive:this.options.caseSensitive,routesByPath:this.routesByPath,routesById:this.routesById,flatRoutes:this.flatRoutes,parseCache:this.parsePathnameCache}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.state.pendingMatches?.forEach(n=>{this.cancelMatch(n.id)})},this.buildLocation=n=>{const r=(o={})=>{const s=o._fromLocation||this.latestLocation,c=this.matchRoutes(s,{_buildLocation:!0}),d=R_(c);o.from;const f=o.unsafeRelative==="path"?s.pathname:o.from??d.fullPath,p=this.resolvePathWithBase(f,"."),h=d.search,v={...d.params},y=o.to?this.resolvePathWithBase(p,`${o.to}`):this.resolvePathWithBase(p,"."),b=o.params===!1||o.params===null?{}:(o.params??!0)===!0?v:Object.assign(v,Bl(o.params,v)),S=vg({path:y,params:b,parseCache:this.parsePathnameCache}).interpolatedPath,C=this.matchRoutes(S,void 0,{_buildLocation:!0}).map(K=>this.looseRoutesById[K.routeId]);if(Object.keys(b).length>0)for(const K of C){const ee=K.options.params?.stringify??K.options.stringifyParams;ee&&Object.assign(b,ee(b))}const E=vg({path:y,params:b,leaveWildcards:!1,leaveParams:n.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath;let k=h;if(n._includeValidateSearch&&this.options.search?.strict){const K={};C.forEach(ee=>{if(ee.options.validateSearch)try{Object.assign(K,T_(ee.options.validateSearch,{...K,...k}))}catch{}}),k=K}k=CZ({search:k,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),k=Wi(h,k);const R=this.options.stringifySearch(k),I=o.hash===!0?s.hash:o.hash?Bl(o.hash,s.hash):void 0,A=I?`#${I}`:"";let T=o.state===!0?s.state:o.state?Bl(o.state,s.state):{};T=Wi(s.state,T);const N=`${E}${R}${A}`,z=new URL(N,this.origin),L=NM(this.rewrite,z);return{publicHref:L.pathname+L.search+L.hash,href:N,url:L.href,pathname:E,search:k,searchStr:R,state:T,hash:I??"",unmaskOnReload:o.unmaskOnReload}},i=(o={},s)=>{const c=r(o);let d=s?r(s):void 0;if(!d){let f={};const p=this.options.routeMasks?.find(h=>{const v=j_(c.pathname,{to:h.from,caseSensitive:!1,fuzzy:!1},this.parsePathnameCache);return v?(f=v,!0):!1});if(p){const{from:h,...v}=p;s={from:n.from,...v,params:f},d=r(s)}}return d&&(c.maskedLocation=d),c};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...i})=>{const o=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(p=>{i.state[p]=this.latestLocation.state[p]});const f=Hl(i.state,this.latestLocation.state);return d.forEach(p=>{delete i.state[p]}),f},s=Fs(this.latestLocation.href)===Fs(i.href),c=this.commitLocationPromise;if(this.commitLocationPromise=id(()=>{c?.resolve()}),s&&o())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...p}=i;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:o,ignoreBlocker:s,href:c,...d}={})=>{if(c){const p=this.history.location.state.__TSR_index,h=Lm(c,{__TSR_index:n?p:p+1});d.to=h.pathname,d.search=this.options.parseSearch(h.search),d.hash=h.hash.slice(1)}const f=this.buildLocation({...d,_includeValidateSearch:!0});return this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:s})},this.navigate=({to:n,reloadDocument:r,href:i,...o})=>{if(!r&&i)try{new URL(`${i}`),r=!0}catch{}return r?(i||(i=this.buildLocation({to:n,...o}).url),o.replace?window.location.replace(i):window.location.href=i,Promise.resolve()):this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),i=o=>{try{return encodeURI(decodeURI(o))}catch{return o}};if(lv(i(this.latestLocation.href))!==lv(i(r.href))){let o=r.url;throw this.origin&&o.startsWith(this.origin)&&(o=o.replace(this.origin,"")||"/"),kd({href:o})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(i=>!n.some(o=>o.id===i.id))}))},this.load=async n=>{let r,i,o;for(o=new Promise(c=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ql({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...ql({resolvedLocation:f,location:d})}),await DA({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startViewTransition(async()=>{let p,h,v;Cm(()=>{this.__store.setState(y=>{const b=y.matches,S=y.pendingMatches||y.matches;return p=b.filter(C=>!S.some(E=>E.id===C.id)),h=S.filter(C=>!b.some(E=>E.id===C.id)),v=b.filter(C=>S.some(E=>E.id===C.id)),{...y,isLoading:!1,loadedAt:Date.now(),matches:S,pendingMatches:void 0,cachedMatches:[...y.cachedMatches,...p.filter(C=>C.status!=="error")]}}),this.clearExpiredCache()}),[[p,"onLeave"],[h,"onEnter"],[v,"onStay"]].forEach(([y,b])=>{y.forEach(S=>{this.looseRoutesById[S.routeId].options[b]?.(S)})})})}})}catch(d){Yo(d)?(r=d,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Io(d)&&(i=d),this.__store.setState(f=>({...f,statusCode:r?r.status:i?404:f.matches.some(p=>p.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let s;this.hasNotFoundMatch()?s=404:this.__store.state.matches.some(c=>c.status==="error")&&(s=500),s!==void 0&&this.__store.setState(c=>({...c,statusCode:s}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,s=this.state.resolvedLocation,c=typeof r.types=="function"?r.types(ql({resolvedLocation:s,location:o})):r.types;if(c===!1){n();return}i={update:n,types:c}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{const i=this.state.pendingMatches?.some(o=>o.id===n)?"pendingMatches":this.state.matches.some(o=>o.id===n)?"matches":this.state.cachedMatches.some(o=>o.id===n)?"cachedMatches":"";i&&this.__store.setState(o=>({...o,[i]:o[i]?.map(s=>s.id===n?r(s):s)}))},this.getMatch=n=>{const r=i=>i.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:i.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let i=r.url;this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",i)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(o=>!r(o))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const o=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=o};this.clearCache({filter:n})},this.loadRouteChunk=RM,this.preloadRoute=async n=>{const r=this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),s=new Set([...o,...this.state.cachedMatches.map(c=>c.id)]);Cm(()=>{i.forEach(c=>{s.has(c.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,c]}))})});try{return i=await DA({router:this,matches:i,location:r,preload:!0,updateMatch:(c,d)=>{o.has(c)?i=i.map(f=>f.id===c?d(f):f):this.updateMatch(c,d)}}),i}catch(c){if(Yo(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});Io(c)||console.error(c);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(i);if(r?.pending&&this.state.status!=="pending")return!1;const c=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=j_(c.pathname,{...r,to:o.pathname},this.parsePathnameCache);return!d||n.params&&!Hl(d,n.params,{partial:!0})?!1:d&&(r?.includeSearch??!0)?Hl(c.search,o.search,{partial:!0})?d:!1:d},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??cZ,parseSearch:t.parseSearch??lZ}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const{foundRoute:r,matchedRoutes:i,routeParams:o}=this.getMatchedRoutes(t.pathname,n?.dest?.to);let s=!1;(r?r.path!=="/"&&o["**"]:Fs(t.pathname))&&(this.options.notFoundRoute?i.push(this.options.notFoundRoute):s=!0);const c=(()=>{if(s){if(this.options.notFoundMode!=="root")for(let p=i.length-1;p>=0;p--){const h=i[p];if(h.children)return h.id}return li}})(),d=[],f=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return i.forEach((p,h)=>{const v=d[h-1],[y,b,S]=(()=>{const Z=v?.search??t.search,Y=v?._strictSearch??void 0;try{const B=T_(p.options.validateSearch,{...Z})??void 0;return[{...Z,...B},{...Y,...B},void 0]}catch(B){let W=B;if(B instanceof Av||(W=new Av(B.message,{cause:B})),n?.throwOnError)throw W;return[Z,{},W]}})(),C=p.options.loaderDeps?.({search:y})??"",E=C?JSON.stringify(C):"",{interpolatedPath:k,usedParams:R}=vg({path:p.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),I=vg({path:p.id,params:o,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath+E,A=this.getMatch(I),T=this.state.matches.find(Z=>Z.routeId===p.id),N=A?._strictParams??R;let z;if(!A){const Z=p.options.params?.parse??p.options.parseParams;if(Z)try{Object.assign(N,Z(N))}catch(Y){if(z=new wZ(Y.message,{cause:Y}),n?.throwOnError)throw z}}Object.assign(o,N);const L=T?"stay":"enter";let K;if(A)K={...A,cause:L,params:T?Wi(T.params,o):o,_strictParams:N,search:Wi(T?T.search:A.search,y),_strictSearch:b};else{const Z=p.options.loader||p.options.beforeLoad||p.lazyFn||jM(p)?"pending":"success";K={id:I,index:h,routeId:p.id,params:T?Wi(T.params,o):o,_strictParams:N,pathname:k,updatedAt:Date.now(),search:T?Wi(T.search,y):y,_strictSearch:b,searchError:void 0,status:Z,isFetching:!1,error:void 0,paramsError:z,__routeContext:void 0,_nonReactive:{loadPromise:id()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:T?Wi(T.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(K.globalNotFound=c===p.id),K.searchError=S;const ee=f(v);K.context={...ee,...K.__routeContext,...K.__beforeLoadContext},d.push(K)}),d.forEach((p,h)=>{const v=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const b=d[h-1],S=f(b);if(v.options.context){const C={deps:p.loaderDeps,params:p.params,context:S??{},location:t,navigate:E=>this.navigate({...E,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:d};p.__routeContext=v.options.context(C)??void 0}p.context={...S,...p.__routeContext,...p.__beforeLoadContext}}}),d}}class Av extends Error{}class wZ extends Error{}function SZ(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function T_(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Av("Async validation not supported");if(n.issues)throw new Av(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function _Z({pathname:e,routePathname:t,caseSensitive:n,routesByPath:r,routesById:i,flatRoutes:o,parseCache:s}){let c={};const d=Fs(e),f=y=>j_(d,{to:y.fullPath,caseSensitive:y.options?.caseSensitive??n,fuzzy:!0},s);let p=t!==void 0?r[t]:void 0;if(p)c=f(p);else{let y;for(const b of o){const S=f(b);if(S)if(b.path!=="/"&&S["**"])y||(y={foundRoute:b,routeParams:S});else{p=b,c=S;break}}!p&&y&&(p=y.foundRoute,c=y.routeParams)}let h=p||i[li];const v=[h];for(;h.parentRoute;)h=h.parentRoute,v.push(h);return v.reverse(),{matchedRoutes:v,routeParams:c,foundRoute:p}}function CZ({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const i=n.reduce((c,d)=>{const f=[];if("search"in d.options)d.options.search?.middlewares&&f.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const p=({search:h,next:v})=>{let y=h;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(y=d.options.preSearchFilters.reduce((S,C)=>C(S),h));const b=v(y);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((S,C)=>C(S),b):b};f.push(p)}if(r&&d.options.validateSearch){const p=({search:h,next:v})=>{const y=v(h);try{return{...y,...T_(d.options.validateSearch,y)??void 0}}catch{return y}};f.push(p)}return c.concat(f)},[])??[],o=({search:c})=>t.search?t.search===!0?c:Bl(t.search,c):{};i.push(o);const s=(c,d)=>{if(c>=i.length)return d;const f=i[c];return f({search:d,next:h=>s(c+1,h)})};return s(0,e)}const EZ="Error preloading route! ☝️";class AM{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=li:this.parentRoute||Va(!1);let o=i?li:r?.path;o&&o!=="/"&&(o=m1(o));const s=r?.id||o;let c=i?li:Ua([this.parentRoute.id===li?"":this.parentRoute.id,s]);o===li&&(o="/"),c!==li&&(c=Ua(["/",c]));const d=c===li?"/":Ua([this.parentRoute.fullPath,o]);this._path=o,this._id=c,this._fullPath=d,this._to=d},this.clone=n=>{this._path=n._path,this._id=n._id,this._fullPath=n._fullPath,this._to=n._to,this.options.getParentRoute=n.options.getParentRoute,this.children=n.children},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class kZ extends AM{constructor(t){super(t)}}function p1(e){const t=e.errorComponent??My;return u.jsx(RZ,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?x.createElement(t,{error:n,reset:r}):e.children})}class RZ extends x.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function My({error:e}){const[t,n]=x.useState(!1);return u.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[u.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),u.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),u.jsx("div",{style:{height:".25rem"}}),t?u.jsx("div",{children:u.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?u.jsx("code",{children:e.message}):null})}):null]})}function jZ({children:e,fallback:t=null}){return IZ()?u.jsx(X.Fragment,{children:e}):u.jsx(X.Fragment,{children:t})}function IZ(){return X.useSyncExternalStore(TZ,()=>!0,()=>!1)}function TZ(){return()=>{}}var Dw={exports:{}},Pw={},Mw={exports:{}},zw={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* use-sync-external-store-shim.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var PA;function NZ(){if(PA)return zw;PA=1;var e=fp();function t(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function c(h,v){var y=v(),b=r({inst:{value:y,getSnapshot:v}}),S=b[0].inst,C=b[1];return o(function(){S.value=y,S.getSnapshot=v,d(S)&&C({inst:S})},[h,y,v]),i(function(){return d(S)&&C({inst:S}),h(function(){d(S)&&C({inst:S})})},[h]),s(y),y}function d(h){var v=h.getSnapshot;h=h.value;try{var y=v();return!n(h,y)}catch{return!0}}function f(h,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return zw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,zw}var MA;function AZ(){return MA||(MA=1,Mw.exports=NZ()),Mw.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var zA;function OZ(){if(zA)return Pw;zA=1;var e=fp(),t=AZ();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,c=e.useMemo,d=e.useDebugValue;return Pw.useSyncExternalStoreWithSelector=function(f,p,h,v,y){var b=o(null);if(b.current===null){var S={hasValue:!1,value:null};b.current=S}else S=b.current;b=c(function(){function E(T){if(!k){if(k=!0,R=T,T=v(T),y!==void 0&&S.hasValue){var N=S.value;if(y(N,T))return I=N}return I=T}if(N=I,r(R,T))return N;var z=v(T);return y!==void 0&&y(N,z)?(R=T,N):(R=T,I=z)}var k=!1,R,I,A=h===void 0?null:h;return[function(){return E(p())},A===null?void 0:function(){return E(A())}]},[p,h,v,y]);var C=i(f,b[0],b[1]);return s(function(){S.hasValue=!0,S.value=C},[C]),d(C),C},Pw}var LA;function $Z(){return LA||(LA=1,Dw.exports=OZ()),Dw.exports}var DZ=$Z();function PZ(e,t=n=>n){return DZ.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,MZ)}function MZ(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=UA(e);if(n.length!==UA(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function UA(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Lw=x.createContext(null);function OM(){return typeof document>"u"?Lw:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Lw,Lw)}function mn(e){const t=x.useContext(OM());return e?.warn,t}function Lr(e){const t=mn({warn:e?.router===void 0}),n=e?.router||t,r=x.useRef(void 0);return PZ(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=Wi(r.current,e.select(i));return r.current=o,o}return e.select(i)}return i})}const zy=x.createContext(void 0),zZ=x.createContext(void 0);function To(e){const t=x.useContext(e.from?zZ:zy);return Lr({select:r=>{const i=r.matches.find(o=>e.from?e.from===o.routeId:o.id===t);if(Va(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function Ly(e){return To({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function h1(e){const{select:t,...n}=e;return To({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function tt(e){return To({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Er(e){return To({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function bn(e){const t=mn();return x.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Gl(e){const t=mn(),n=bn(),r=x.useRef(null);return x.useEffect(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var Uw={exports:{}},br={};/**
|
|
42
|
-
* @license React
|
|
43
|
-
* react-dom.production.js
|
|
44
|
-
*
|
|
45
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
46
|
-
*
|
|
47
|
-
* This source code is licensed under the MIT license found in the
|
|
48
|
-
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/var FA;function LZ(){if(FA)return br;FA=1;var e=fp();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(d,f,p){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:h==null?null:""+h,children:d,containerInfo:f,implementation:p}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return br.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,br.createPortal=function(d,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(d,f,null,p)},br.flushSync=function(d){var f=s.T,p=r.p;try{if(s.T=null,r.p=2,d)return d()}finally{s.T=f,r.p=p,r.d.f()}},br.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},br.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},br.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,h=c(p,f.crossOrigin),v=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:v,fetchPriority:y}):p==="script"&&r.d.X(d,{crossOrigin:h,integrity:v,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},br.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},br.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,h=c(p,f.crossOrigin);r.d.L(d,p,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},br.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},br.requestFormReset=function(d){r.d.r(d)},br.unstable_batchedUpdates=function(d,f){return d(f)},br.useFormState=function(d,f,p){return s.H.useFormState(d,f,p)},br.useFormStatus=function(){return s.H.useHostTransitionStatus()},br.version="19.2.0",br}var VA;function $M(){if(VA)return Uw.exports;VA=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Uw.exports=LZ(),Uw.exports}var Rd=$M();const g1=sp(Rd),xg=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Fw(e){const t=x.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function UZ(e,t,n={},r={}){x.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([o])=>{t(o)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function FZ(e){const t=x.useRef(null);return x.useImperativeHandle(e,()=>t.current,[]),t}function VZ(e,t){const n=mn(),[r,i]=x.useState(!1),o=x.useRef(!1),s=FZ(t),{activeProps:c,inactiveProps:d,activeOptions:f,to:p,preload:h,preloadDelay:v,hashScrollIntoView:y,replace:b,startTransition:S,resetScroll:C,viewTransition:E,children:k,target:R,disabled:I,style:A,className:T,onClick:N,onFocus:z,onMouseEnter:L,onMouseLeave:K,onTouchStart:ee,ignoreBlocker:Z,params:Y,search:B,hash:W,state:P,mask:G,reloadDocument:U,unsafeRelative:te,from:$,_fromLocation:M,...F}=e,O=Lr({select:xe=>xe.location.search,structuralSharing:!0}),J=e.from,de=x.useMemo(()=>({...e,from:J}),[n,O,J,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),pe=x.useMemo(()=>n.buildLocation({...de}),[n,de]),V=x.useMemo(()=>{if(I)return;let xe=pe.maskedLocation?pe.maskedLocation.url:pe.url,ve=!1;return n.origin&&(xe.startsWith(n.origin)?xe=n.history.createHref(xe.replace(n.origin,""))||"/":ve=!0),{href:xe,external:ve}},[I,pe.maskedLocation,pe.url,n.origin,n.history]),ie=x.useMemo(()=>{if(V?.external)return V.href;try{return new URL(p),p}catch{}},[p,V]),_e=e.reloadDocument||ie?!1:h??n.options.defaultPreload,Ie=v??n.options.defaultPreloadDelay??0,He=Lr({select:xe=>{if(ie)return!1;if(f?.exact){if(!NK(xe.location.pathname,pe.pathname,n.basepath))return!1}else{const ve=Iv(xe.location.pathname,n.basepath),Se=Iv(pe.pathname,n.basepath);if(!(ve.startsWith(Se)&&(ve.length===Se.length||ve[Se.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Hl(xe.location.search,pe.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?xe.location.hash===pe.hash:!0}}),Ae=x.useCallback(()=>{n.preloadRoute({...de}).catch(xe=>{console.warn(xe),console.warn(EZ)})},[n,de]),Ye=x.useCallback(xe=>{xe?.isIntersecting&&Ae()},[Ae]);UZ(s,Ye,KZ,{disabled:!!I||_e!=="viewport"}),x.useEffect(()=>{o.current||!I&&_e==="render"&&(Ae(),o.current=!0)},[I,Ae,_e]);const jt=xe=>{const ve=xe.currentTarget.target,Se=R!==void 0?R:ve;if(!I&&!ZZ(xe)&&!xe.defaultPrevented&&(!Se||Se==="_self")&&xe.button===0){xe.preventDefault(),Rd.flushSync(()=>{i(!0)});const ne=n.subscribe("onResolved",()=>{ne(),i(!1)});n.navigate({...de,replace:b,resetScroll:C,hashScrollIntoView:y,startTransition:S,viewTransition:E,ignoreBlocker:Z})}};if(ie)return{...F,ref:s,href:ie,...k&&{children:k},...R&&{target:R},...I&&{disabled:I},...A&&{style:A},...T&&{className:T},...N&&{onClick:N},...z&&{onFocus:z},...L&&{onMouseEnter:L},...K&&{onMouseLeave:K},...ee&&{onTouchStart:ee}};const ln=xe=>{I||_e&&Ae()},Dn=ln,Pn=xe=>{if(!(I||!_e))if(!Ie)Ae();else{const ve=xe.target;if(Kf.has(ve))return;const Se=setTimeout(()=>{Kf.delete(ve),Ae()},Ie);Kf.set(ve,Se)}},Gr=xe=>{if(I||!_e||!Ie)return;const ve=xe.target,Se=Kf.get(ve);Se&&(clearTimeout(Se),Kf.delete(ve))},Wt=He?Bl(c,{})??BZ:Vw,q=He?Vw:Bl(d,{})??Vw,ae=[T,Wt.className,q.className].filter(Boolean).join(" "),ue=(A||Wt.style||q.style)&&{...A,...Wt.style,...q.style};return{...F,...Wt,...q,href:V?.href,ref:s,onClick:Zf([N,jt]),onFocus:Zf([z,ln]),onMouseEnter:Zf([L,Pn]),onMouseLeave:Zf([K,Gr]),onTouchStart:Zf([ee,Dn]),disabled:!!I,target:R,...ue&&{style:ue},...ae&&{className:ae},...I&&HZ,...He&&qZ,...r&&GZ}}const Vw={},BZ={className:"active"},HZ={role:"link","aria-disabled":!0},qZ={"data-status":"active","aria-current":"page"},GZ={"data-transitioning":"transitioning"},Kf=new WeakMap,KZ={rootMargin:"100px"},Zf=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},We=x.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,ref:o,...s}=VZ(r,t),c=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;return n===void 0&&delete s.disabled,x.createElement(n||"a",{...s,ref:o},c)});function ZZ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class YZ extends AM{constructor(t){super(t),this.useMatch=n=>To({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>To({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Er({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>tt({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>h1({...n,from:this.id}),this.useLoaderData=n=>Ly({...n,from:this.id}),this.useNavigate=()=>bn({from:this.fullPath}),this.Link=X.forwardRef((n,r)=>u.jsx(We,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function it(e){return new YZ(e)}function WZ(){return e=>QZ(e)}class XZ extends kZ{constructor(t){super(t),this.useMatch=n=>To({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>To({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Er({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>tt({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>h1({...n,from:this.id}),this.useLoaderData=n=>Ly({...n,from:this.id}),this.useNavigate=()=>bn({from:this.fullPath}),this.Link=X.forwardRef((n,r)=>u.jsx(We,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function QZ(e){return new XZ(e)}function BA(e){return typeof e=="object"?new HA(e,{silent:!0}).createRoute(e):new HA(e,{silent:!0}).createRoute}class HA{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=it(r);return i.isRoot=!1,i},this.silent=n?.silent}}class N_{constructor(t){this.useMatch=n=>To({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>To({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Er({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>tt({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>h1({...n,from:this.options.id}),this.useLoaderData=n=>Ly({...n,from:this.options.id}),this.useNavigate=()=>{const n=mn();return bn({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function DTe(e){return t=>new N_({id:e,...t})}function qA(e){return typeof e=="object"?new N_(e):t=>new N_({id:e,...t})}function DM(e,t){let n,r,i,o;const s=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(i=d,IK(i)&&i instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),o=!0)}})),n),c=function(f){if(o)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)throw s();return x.createElement(r,f)};return c.preload=s,c}function JZ(){const e=mn(),t=x.useRef({router:e,mounted:!1}),[n,r]=x.useState(!1),{hasPendingMatches:i,isLoading:o}=Lr({select:h=>({isLoading:h.isLoading,hasPendingMatches:h.matches.some(v=>v.status==="pending")}),structuralSharing:!0}),s=Fw(o),c=o||n||i,d=Fw(c),f=o||i,p=Fw(f);return e.startTransition=h=>{r(!0),x.startTransition(()=>{h(),r(!1)})},x.useEffect(()=>{const h=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Fs(e.latestLocation.href)!==Fs(v.href)&&e.commitLocation({...v,replace:!0}),()=>{h()}},[e,e.history]),xg(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(v){console.error(v)}})()},[e]),xg(()=>{s&&!o&&e.emit({type:"onLoad",...ql(e.state)})},[s,e,o]),xg(()=>{p&&!f&&e.emit({type:"onBeforeRouteMount",...ql(e.state)})},[f,p,e]),xg(()=>{d&&!c&&(e.emit({type:"onResolved",...ql(e.state)}),e.__store.setState(h=>({...h,status:"idle",resolvedLocation:h.location})),oZ(e))},[c,d,e]),null}function eY(e){const t=Lr({select:n=>`not-found-${n.location.pathname}-${n.status}`});return u.jsx(p1,{getResetKey:()=>t,onCatch:(n,r)=>{if(Io(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Io(n))return e.fallback?.(n);throw n},children:e.children})}function tY(){return u.jsx("p",{children:"Not Found"})}function Nu(e){return u.jsx(u.Fragment,{children:e.children})}function PM(e,t,n){return t.options.notFoundComponent?u.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?u.jsx(e.options.defaultNotFoundComponent,{data:n}):u.jsx(tY,{})}function nY({children:e}){const t=mn();return t.isServer?u.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:[e].filter(Boolean).join(`
|
|
50
|
-
`)+";$_TSR.c()"}}):null}function rY(){const e=mn();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||I_)(e.latestLocation),r=n!==I_(e.latestLocation)?n:void 0,i={storageKey:Tv,shouldScrollRestoration:!0};return r&&(i.key=r),u.jsx(nY,{children:`(${SM.toString()})(${JSON.stringify(i)})`})}const MM=x.memo(function({matchId:t}){const n=mn(),r=Lr({select:E=>{const k=E.matches.find(R=>R.id===t);return Va(k),{routeId:k.routeId,ssr:k.ssr,_displayPending:k._displayPending}},structuralSharing:!0}),i=n.routesById[r.routeId],o=i.options.pendingComponent??n.options.defaultPendingComponent,s=o?u.jsx(o,{}):null,c=i.options.errorComponent??n.options.defaultErrorComponent,d=i.options.onCatch??n.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,p=r.ssr===!1||r.ssr==="data-only",h=(!i.isRoot||i.options.wrapInSuspense||p)&&(i.options.wrapInSuspense??o??(i.options.errorComponent?.preload||p))?x.Suspense:Nu,v=c?p1:Nu,y=f?eY:Nu,b=Lr({select:E=>E.loadedAt}),S=Lr({select:E=>{const k=E.matches.findIndex(R=>R.id===t);return E.matches[k-1]?.routeId}}),C=i.isRoot?i.options.shellComponent??Nu:Nu;return u.jsxs(C,{children:[u.jsx(zy.Provider,{value:t,children:u.jsx(h,{fallback:s,children:u.jsx(v,{getResetKey:()=>b,errorComponent:c||My,onCatch:(E,k)=>{if(Io(E))throw E;d?.(E,k)},children:u.jsx(y,{fallback:E=>{if(!f||E.routeId&&E.routeId!==r.routeId||!E.routeId&&!i.isRoot)throw E;return x.createElement(f,E)},children:p||r._displayPending?u.jsx(jZ,{fallback:s,children:u.jsx(GA,{matchId:t})}):u.jsx(GA,{matchId:t})})})})}),S===li&&n.options.scrollRestoration?u.jsxs(u.Fragment,{children:[u.jsx(iY,{}),u.jsx(rY,{})]}):null]})});function iY(){const e=mn(),t=x.useRef(void 0);return u.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...ql(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const GA=x.memo(function({matchId:t}){const n=mn(),{match:r,key:i,routeId:o}=Lr({select:d=>{const f=d.matches.find(b=>b.id===t),p=f.routeId,v=(n.routesById[p].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:p,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return{key:v?JSON.stringify(v):void 0,routeId:p,match:{id:f.id,status:f.status,error:f.error,_forcePending:f._forcePending,_displayPending:f._displayPending}}},structuralSharing:!0}),s=n.routesById[o],c=x.useMemo(()=>{const d=s.options.component??n.options.defaultComponent;return d?u.jsx(d,{},i):u.jsx(el,{})},[i,s.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=s.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const p=id();f._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),f._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Va(Io(r.error)),PM(n,s,r.error);if(r.status==="redirected")throw Va(Yo(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(s.options.errorComponent??n.options.defaultErrorComponent)||My;return u.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return c}),el=x.memo(function(){const t=mn(),n=x.useContext(zy),r=Lr({select:f=>f.matches.find(p=>p.id===n)?.routeId}),i=t.routesById[r],o=Lr({select:f=>{const h=f.matches.find(v=>v.id===n);return Va(h),h.globalNotFound}}),s=Lr({select:f=>{const p=f.matches,h=p.findIndex(v=>v.id===n);return p[h+1]?.id}}),c=t.options.defaultPendingComponent?u.jsx(t.options.defaultPendingComponent,{}):null;if(o)return PM(t,i,void 0);if(!s)return null;const d=u.jsx(MM,{matchId:s});return n===li?u.jsx(x.Suspense,{fallback:c,children:d}):d});function oY(){const e=mn(),n=e.routesById[li].options.pendingComponent??e.options.defaultPendingComponent,r=n?u.jsx(n,{}):null,i=e.isServer||typeof document<"u"&&e.ssr?Nu:x.Suspense,o=u.jsxs(i,{fallback:r,children:[!e.isServer&&u.jsx(JZ,{}),u.jsx(aY,{})]});return e.options.InnerWrap?u.jsx(e.options.InnerWrap,{children:o}):o}function aY(){const e=mn(),t=Lr({select:i=>i.matches[0]?.id}),n=Lr({select:i=>i.loadedAt}),r=t?u.jsx(MM,{matchId:t}):null;return u.jsx(zy.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:u.jsx(p1,{getResetKey:()=>n,errorComponent:My,onCatch:i=>{i.message||i.toString()},children:r})})}const sY=e=>new lY(e);class lY extends xZ{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=BA,globalThis.createLazyFileRoute=qA):typeof window<"u"&&(window.createFileRoute=BA,window.createLazyFileRoute=qA);function cY({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=OM(),i=u.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?u.jsx(e.options.Wrap,{children:i}):i}function uY({router:e,...t}){return u.jsx(cY,{router:e,...t,children:u.jsx(oY,{})})}function Uy(e){return To({...e,select:t=>e.select?e.select(t.context):t.context})}function dY(e){return Lr({select:t=>t.location})}function fY(){const[e,t]=x.useState(lr.getAllConnections());return x.useEffect(()=>lr.listenToAllEntities((n,r)=>{t({...e,[r]:n})}),[e]),e}function fc(){const e=lr.calculateIdFromEntity(Bn),[t,n]=x.useState(lr.getConnectionById(Bn));return x.useEffect(()=>lr.listenToEntity(e,n),[e]),t}function mc(){return fc()}function Xa(e){const t=Bn,{clusterId:n,instanceId:r}=tt({strict:!1}),[i,o]=x.useState(lr.getConnectionById(t));return x.useEffect(()=>lr.listenToEntity(t,o),[t]),i}function zM(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=zM(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function LM(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=zM(e))&&(r&&(r+=" "),r+=t);return r}const KA=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ba=LM,Fy=(e,t)=>n=>{var r;if(t?.variants==null)return Ba(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(f=>{const p=n?.[f],h=o?.[f];if(p===null)return null;const v=KA(p)||KA(h);return i[f][v]}),c=n&&Object.entries(n).reduce((f,p)=>{let[h,v]=p;return v===void 0||(f[h]=v),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:h,className:v,...y}=p;return Object.entries(y).every(b=>{let[S,C]=b;return Array.isArray(C)?C.includes({...o,...c}[S]):{...o,...c}[S]===C})?[...f,h,v]:f},[]);return Ba(e,s,d,n?.class,n?.className)},Yf="hover:-translate-y-1 transition duration-200",Wf="border bg-transparent border-2 text-white shadow-xs hover:bg-grey-700/40",mY=Fy(`inline-flex
|
|
51
|
-
items-center
|
|
52
|
-
justify-center
|
|
53
|
-
gap-2
|
|
54
|
-
whitespace-nowrap
|
|
55
|
-
rounded-lg
|
|
56
|
-
text-sm
|
|
57
|
-
transition-[color,box-shadow]
|
|
58
|
-
disabled:pointer-events-none
|
|
59
|
-
disabled:opacity-50
|
|
60
|
-
[&_svg]:pointer-events-none
|
|
61
|
-
[&_svg:not([class*='size-'])]:size-4
|
|
62
|
-
[&_svg]:shrink-0
|
|
63
|
-
ring-ring/10
|
|
64
|
-
dark:ring-ring/20
|
|
65
|
-
dark:outline-ring/40
|
|
66
|
-
outline-ring/50
|
|
67
|
-
focus-visible:ring-1
|
|
68
|
-
focus-visible:outline-1
|
|
69
|
-
focus-visible:ring-purple-200
|
|
70
|
-
aria-invalid:focus-visible:ring-0`,{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",submit:"bg-gradient-to-r from-blue-100 from-0% to-blue to-100% hover:bg-gradient-to-r hover:from-blue text-primary-foreground shadow-sm",destructive:"bg-destructive shadow-xs hover:bg-destructive/90",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-muted-foreground",destructiveGhost:"hover:bg-accent hover:text-red",link:"text-primary underline-offset-4 hover:underline",positive:"bg-green text-white shadow-xs hover:bg-green/90",warning:"bg-yellow text-white shadow-xs hover:bg-yellow/90",outline:`${Wf} ${Yf}`,ghostOutline:`${Wf} ${Yf} border-none`,positiveOutline:`${Wf} ${Yf} border-green`,destructiveOutline:`${Wf} ${Yf} border-destructive`,defaultOutline:`${Wf} ${Yf} border-primary`},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4 text-md",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),v1="-",pY=e=>{const t=gY(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const c=s.split(v1);return c[0]===""&&c.length!==1&&c.shift(),UM(c,t)||hY(s)},getConflictingClassGroupIds:(s,c)=>{const d=n[s]||[];return c&&r[s]?[...d,...r[s]]:d}}},UM=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?UM(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(v1);return t.validators.find(({validator:s})=>s(o))?.classGroupId},ZA=/^\[(.+)\]$/,hY=e=>{if(ZA.test(e)){const t=ZA.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},gY=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)A_(n[i],r,i,t);return r},A_=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:YA(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(vY(i)){A_(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,s])=>{A_(s,YA(t,o),n,r)})})},YA=(e,t)=>{let n=e;return t.split(v1).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},vY=e=>e.isThemeGetter,yY=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,s)=>{n.set(o,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let s=n.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){n.has(o)?n.set(o,s):i(o,s)}}},O_="!",$_=":",bY=$_.length,xY=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let s=0,c=0,d=0,f;for(let b=0;b<i.length;b++){let S=i[b];if(s===0&&c===0){if(S===$_){o.push(i.slice(d,b)),d=b+bY;continue}if(S==="/"){f=b;continue}}S==="["?s++:S==="]"?s--:S==="("?c++:S===")"&&c--}const p=o.length===0?i:i.substring(d),h=wY(p),v=h!==p,y=f&&f>d?f-d:void 0;return{modifiers:o,hasImportantModifier:v,baseClassName:h,maybePostfixModifierPosition:y}};if(t){const i=t+$_,o=r;r=s=>s.startsWith(i)?o(s.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},wY=e=>e.endsWith(O_)?e.substring(0,e.length-1):e.startsWith(O_)?e.substring(1):e,SY=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let o=[];return r.forEach(s=>{s[0]==="["||t[s]?(i.push(...o.sort(),s),o=[]):o.push(s)}),i.push(...o.sort()),i}},_Y=e=>({cache:yY(e.cacheSize),parseClassName:xY(e),sortModifiers:SY(e),...pY(e)}),CY=/\s+/,EY=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,s=[],c=e.trim().split(CY);let d="";for(let f=c.length-1;f>=0;f-=1){const p=c[f],{isExternal:h,modifiers:v,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:S}=n(p);if(h){d=p+(d.length>0?" "+d:d);continue}let C=!!S,E=r(C?b.substring(0,S):b);if(!E){if(!C){d=p+(d.length>0?" "+d:d);continue}if(E=r(b),!E){d=p+(d.length>0?" "+d:d);continue}C=!1}const k=o(v).join(":"),R=y?k+O_:k,I=R+E;if(s.includes(I))continue;s.push(I);const A=i(E,C);for(let T=0;T<A.length;++T){const N=A[T];s.push(R+N)}d=p+(d.length>0?" "+d:d)}return d};function kY(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=FM(t))&&(r&&(r+=" "),r+=n);return r}const FM=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=FM(e[r]))&&(n&&(n+=" "),n+=t);return n};function RY(e,...t){let n,r,i,o=s;function s(d){const f=t.reduce((p,h)=>h(p),e());return n=_Y(f),r=n.cache.get,i=n.cache.set,o=c,c(d)}function c(d){const f=r(d);if(f)return f;const p=EY(d,n);return i(d,p),p}return function(){return o(kY.apply(null,arguments))}}const Wn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},VM=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,BM=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jY=/^\d+\/\d+$/,IY=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,TY=/\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$/,NY=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,AY=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OY=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bu=e=>jY.test(e),xt=e=>!!e&&!Number.isNaN(Number(e)),Rs=e=>!!e&&Number.isInteger(Number(e)),Bw=e=>e.endsWith("%")&&xt(e.slice(0,-1)),Ta=e=>IY.test(e),$Y=()=>!0,DY=e=>TY.test(e)&&!NY.test(e),HM=()=>!1,PY=e=>AY.test(e),MY=e=>OY.test(e),zY=e=>!Ue(e)&&!Fe(e),LY=e=>jd(e,KM,HM),Ue=e=>VM.test(e),kl=e=>jd(e,ZM,DY),Hw=e=>jd(e,HY,xt),WA=e=>jd(e,qM,HM),UY=e=>jd(e,GM,MY),wg=e=>jd(e,YM,PY),Fe=e=>BM.test(e),Xf=e=>Id(e,ZM),FY=e=>Id(e,qY),XA=e=>Id(e,qM),VY=e=>Id(e,KM),BY=e=>Id(e,GM),Sg=e=>Id(e,YM,!0),jd=(e,t,n)=>{const r=VM.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Id=(e,t,n=!1)=>{const r=BM.exec(e);return r?r[1]?t(r[1]):n:!1},qM=e=>e==="position"||e==="percentage",GM=e=>e==="image"||e==="url",KM=e=>e==="length"||e==="size"||e==="bg-size",ZM=e=>e==="length",HY=e=>e==="number",qY=e=>e==="family-name",YM=e=>e==="shadow",GY=()=>{const e=Wn("color"),t=Wn("font"),n=Wn("text"),r=Wn("font-weight"),i=Wn("tracking"),o=Wn("leading"),s=Wn("breakpoint"),c=Wn("container"),d=Wn("spacing"),f=Wn("radius"),p=Wn("shadow"),h=Wn("inset-shadow"),v=Wn("text-shadow"),y=Wn("drop-shadow"),b=Wn("blur"),S=Wn("perspective"),C=Wn("aspect"),E=Wn("ease"),k=Wn("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...I(),Fe,Ue],T=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],z=()=>[Fe,Ue,d],L=()=>[bu,"full","auto",...z()],K=()=>[Rs,"none","subgrid",Fe,Ue],ee=()=>["auto",{span:["full",Rs,Fe,Ue]},Rs,Fe,Ue],Z=()=>[Rs,"auto",Fe,Ue],Y=()=>["auto","min","max","fr",Fe,Ue],B=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...z()],G=()=>[bu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],U=()=>[e,Fe,Ue],te=()=>[...I(),XA,WA,{position:[Fe,Ue]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",VY,LY,{size:[Fe,Ue]}],F=()=>[Bw,Xf,kl],O=()=>["","none","full",f,Fe,Ue],J=()=>["",xt,Xf,kl],de=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>[xt,Bw,XA,WA],ie=()=>["","none",b,Fe,Ue],_e=()=>["none",xt,Fe,Ue],Ie=()=>["none",xt,Fe,Ue],He=()=>[xt,Fe,Ue],Ae=()=>[bu,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ta],breakpoint:[Ta],color:[$Y],container:[Ta],"drop-shadow":[Ta],ease:["in","out","in-out"],font:[zY],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ta],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ta],shadow:[Ta],spacing:["px",xt],text:[Ta],"text-shadow":[Ta],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bu,Ue,Fe,C]}],container:["container"],columns:[{columns:[xt,Ue,Fe,c]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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:A()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],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:[Rs,"auto",Fe,Ue]}],basis:[{basis:[bu,"full","auto",c,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xt,bu,"auto","initial","none",Ue]}],grow:[{grow:["",xt,Fe,Ue]}],shrink:[{shrink:["",xt,Fe,Ue]}],order:[{order:[Rs,"first","last","none",Fe,Ue]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"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:[s]},...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",n,Xf,kl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Fe,Hw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bw,Ue]}],"font-family":[{font:[FY,Ue,t]}],"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:[i,Fe,Ue]}],"line-clamp":[{"line-clamp":[xt,"none",Fe,Hw]}],leading:[{leading:[o,...z()]}],"list-image":[{"list-image":["none",Fe,Ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Fe,Ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[xt,"from-font","auto",Fe,kl]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[xt,"auto",Fe,Ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Fe,Ue]}],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",Fe,Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Rs,Fe,Ue],radial:["",Fe,Ue],conic:[Rs,Fe,Ue]},BY,UY]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xt,Fe,Ue]}],"outline-w":[{outline:["",xt,Xf,kl]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",p,Sg,wg]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",h,Sg,wg]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[xt,kl]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",v,Sg,wg]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[xt,Fe,Ue]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"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":[xt]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[Fe,Ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"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":I()}],"mask-image-conic-pos":[{"mask-conic":[xt]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Fe,Ue]}],filter:[{filter:["","none",Fe,Ue]}],blur:[{blur:ie()}],brightness:[{brightness:[xt,Fe,Ue]}],contrast:[{contrast:[xt,Fe,Ue]}],"drop-shadow":[{"drop-shadow":["","none",y,Sg,wg]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",xt,Fe,Ue]}],"hue-rotate":[{"hue-rotate":[xt,Fe,Ue]}],invert:[{invert:["",xt,Fe,Ue]}],saturate:[{saturate:[xt,Fe,Ue]}],sepia:[{sepia:["",xt,Fe,Ue]}],"backdrop-filter":[{"backdrop-filter":["","none",Fe,Ue]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[xt,Fe,Ue]}],"backdrop-contrast":[{"backdrop-contrast":[xt,Fe,Ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xt,Fe,Ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xt,Fe,Ue]}],"backdrop-invert":[{"backdrop-invert":["",xt,Fe,Ue]}],"backdrop-opacity":[{"backdrop-opacity":[xt,Fe,Ue]}],"backdrop-saturate":[{"backdrop-saturate":[xt,Fe,Ue]}],"backdrop-sepia":[{"backdrop-sepia":["",xt,Fe,Ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Fe,Ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xt,"initial",Fe,Ue]}],ease:[{ease:["linear","initial",E,Fe,Ue]}],delay:[{delay:[xt,Fe,Ue]}],animate:[{animate:["none",k,Fe,Ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Fe,Ue]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:Ie()}],"scale-x":[{"scale-x":Ie()}],"scale-y":[{"scale-y":Ie()}],"scale-z":[{"scale-z":Ie()}],"scale-3d":["scale-3d"],skew:[{skew:He()}],"skew-x":[{"skew-x":He()}],"skew-y":[{"skew-y":He()}],transform:[{transform:[Fe,Ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ae()}],"translate-x":[{"translate-x":Ae()}],"translate-y":[{"translate-y":Ae()}],"translate-z":[{"translate-z":Ae()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"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",Fe,Ue]}],"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":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"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",Fe,Ue]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[xt,Xf,kl,Hw]}],stroke:[{stroke:["none",...U()]}],"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"]}},KY=RY(GY);function Le(...e){return KY(LM(e))}function QA(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function hp(...e){return t=>{let n=!1;const r=e.map(i=>{const o=QA(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():QA(e[i],null)}}}}function ct(...e){return x.useCallback(hp(...e),e)}function Jl(e){const t=ZY(e),n=x.forwardRef((r,i)=>{const{children:o,...s}=r,c=x.Children.toArray(o),d=c.find(WY);if(d){const f=d.props.children,p=c.map(h=>h===d?x.Children.count(f)>1?x.Children.only(null):x.isValidElement(f)?f.props.children:null:h);return u.jsx(t,{...s,ref:i,children:x.isValidElement(f)?x.cloneElement(f,void 0,p):null})}return u.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var y1=Jl("Slot");function ZY(e){const t=x.forwardRef((n,r)=>{const{children:i,...o}=n;if(x.isValidElement(i)){const s=QY(i),c=XY(o,i.props);return i.type!==x.Fragment&&(c.ref=r?hp(r,s):s),x.cloneElement(i,c)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WM=Symbol("radix.slottable");function YY(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=WM,t}function WY(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WM}function XY(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const d=o(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function QY(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ce({className:e,variant:t,size:n,asChild:r=!1,...i}){const o=r?y1:"button";return u.jsx(o,{"data-slot":"button",className:Le(mY({variant:t,size:n,className:e})),...i})}function ec({className:e,...t}){return u.jsx("div",{"data-slot":"card",className:Le("bg-card text-card-foreground flex flex-col gap-6 rounded-xl py-4 shadow-deep",e),...t})}function tl({className:e,...t}){return u.jsx("div",{"data-slot":"card-header",className:Le("flex flex-col gap-1.5 px-6",e),...t})}function nl({className:e,...t}){return u.jsx("div",{"data-slot":"card-title",className:Le("leading-none text-lg",e),...t})}function pc({className:e,...t}){return u.jsx("div",{"data-slot":"card-description",className:Le("text-muted-foreground text-xs",e),...t})}function Qa({className:e,...t}){return u.jsx("div",{"data-slot":"card-content",className:Le("px-6",e),...t})}function JY(e){return e!==null&&!!e.username}function Td(e){if(e&&!JY(e)){const t=Object.keys(e.roles);if(t.length===1)return`/${t[0]}`}return"/"}/**
|
|
71
|
-
* @license lucide-react v0.544.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const eW=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tW=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),JA=e=>{const t=tW(e);return t.charAt(0).toUpperCase()+t.slice(1)},XM=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),nW=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
76
|
-
* @license lucide-react v0.544.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/var rW={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"};/**
|
|
81
|
-
* @license lucide-react v0.544.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the ISC license.
|
|
84
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const iW=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...c},d)=>x.createElement("svg",{ref:d,...rW,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:XM("lucide",i),...!o&&!nW(c)&&{"aria-hidden":"true"},...c},[...s.map(([f,p])=>x.createElement(f,p)),...Array.isArray(o)?o:[o]]));/**
|
|
86
|
-
* @license lucide-react v0.544.0 - ISC
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the ISC license.
|
|
89
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const Ve=(e,t)=>{const n=x.forwardRef(({className:r,...i},o)=>x.createElement(iW,{ref:o,iconNode:t,className:XM(`lucide-${eW(JA(e))}`,`lucide-${e}`,r),...i}));return n.displayName=JA(e),n};/**
|
|
91
|
-
* @license lucide-react v0.544.0 - ISC
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the ISC license.
|
|
94
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const oW=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],aW=Ve("activity",oW);/**
|
|
96
|
-
* @license lucide-react v0.544.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const sW=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],QM=Ve("arrow-down",sW);/**
|
|
101
|
-
* @license lucide-react v0.544.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const lW=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],tc=Ve("arrow-left",lW);/**
|
|
106
|
-
* @license lucide-react v0.544.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const cW=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Co=Ve("arrow-right",cW);/**
|
|
111
|
-
* @license lucide-react v0.544.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const uW=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],dW=Ve("arrow-up-down",uW);/**
|
|
116
|
-
* @license lucide-react v0.544.0 - ISC
|
|
117
|
-
*
|
|
118
|
-
* This source code is licensed under the ISC license.
|
|
119
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const fW=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],mW=Ve("arrow-up",fW);/**
|
|
121
|
-
* @license lucide-react v0.544.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const pW=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Vy=Ve("ban",pW);/**
|
|
126
|
-
* @license lucide-react v0.544.0 - ISC
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the ISC license.
|
|
129
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const hW=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]],JM=Ve("book-open-text",hW);/**
|
|
131
|
-
* @license lucide-react v0.544.0 - ISC
|
|
132
|
-
*
|
|
133
|
-
* This source code is licensed under the ISC license.
|
|
134
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const gW=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],vW=Ve("boxes",gW);/**
|
|
136
|
-
* @license lucide-react v0.544.0 - ISC
|
|
137
|
-
*
|
|
138
|
-
* This source code is licensed under the ISC license.
|
|
139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const yW=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],e2=Ve("chart-pie",yW);/**
|
|
141
|
-
* @license lucide-react v0.544.0 - ISC
|
|
142
|
-
*
|
|
143
|
-
* This source code is licensed under the ISC license.
|
|
144
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const bW=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b1=Ve("check",bW);/**
|
|
146
|
-
* @license lucide-react v0.544.0 - ISC
|
|
147
|
-
*
|
|
148
|
-
* This source code is licensed under the ISC license.
|
|
149
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const xW=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],t2=Ve("chevron-down",xW);/**
|
|
151
|
-
* @license lucide-react v0.544.0 - ISC
|
|
152
|
-
*
|
|
153
|
-
* This source code is licensed under the ISC license.
|
|
154
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const wW=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],SW=Ve("chevron-up",wW);/**
|
|
156
|
-
* @license lucide-react v0.544.0 - ISC
|
|
157
|
-
*
|
|
158
|
-
* This source code is licensed under the ISC license.
|
|
159
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/const _W=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],CW=Ve("circle-check-big",_W);/**
|
|
161
|
-
* @license lucide-react v0.544.0 - ISC
|
|
162
|
-
*
|
|
163
|
-
* This source code is licensed under the ISC license.
|
|
164
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
-
*/const EW=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],n2=Ve("circle",EW);/**
|
|
166
|
-
* @license lucide-react v0.544.0 - ISC
|
|
167
|
-
*
|
|
168
|
-
* This source code is licensed under the ISC license.
|
|
169
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/const kW=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]],RW=Ve("clipboard-check",kW);/**
|
|
171
|
-
* @license lucide-react v0.544.0 - ISC
|
|
172
|
-
*
|
|
173
|
-
* This source code is licensed under the ISC license.
|
|
174
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
-
*/const jW=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],IW=Ve("cloud-upload",jW);/**
|
|
176
|
-
* @license lucide-react v0.544.0 - ISC
|
|
177
|
-
*
|
|
178
|
-
* This source code is licensed under the ISC license.
|
|
179
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
-
*/const TW=[["path",{d:"M10.5 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5.5",key:"1g2yzs"}],["path",{d:"m14.3 19.6 1-.4",key:"11sv9r"}],["path",{d:"M15 3v7.5",key:"7lm50a"}],["path",{d:"m15.2 16.9-.9-.3",key:"1t7mvx"}],["path",{d:"m16.6 21.7.3-.9",key:"1j67ps"}],["path",{d:"m16.8 15.3-.4-1",key:"1ei7r6"}],["path",{d:"m19.1 15.2.3-.9",key:"18r7jp"}],["path",{d:"m19.6 21.7-.4-1",key:"z2vh2"}],["path",{d:"m20.7 16.8 1-.4",key:"19m87a"}],["path",{d:"m21.7 19.4-.9-.3",key:"1qgwi9"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}]],NW=Ve("columns-3-cog",TW);/**
|
|
181
|
-
* @license lucide-react v0.544.0 - ISC
|
|
182
|
-
*
|
|
183
|
-
* This source code is licensed under the ISC license.
|
|
184
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
-
*/const AW=[["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"}]],r2=Ve("copy",AW);/**
|
|
186
|
-
* @license lucide-react v0.544.0 - ISC
|
|
187
|
-
*
|
|
188
|
-
* This source code is licensed under the ISC license.
|
|
189
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
-
*/const OW=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],i2=Ve("credit-card",OW);/**
|
|
191
|
-
* @license lucide-react v0.544.0 - ISC
|
|
192
|
-
*
|
|
193
|
-
* This source code is licensed under the ISC license.
|
|
194
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const $W=[["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"}]],DW=Ve("database",$W);/**
|
|
196
|
-
* @license lucide-react v0.544.0 - ISC
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the ISC license.
|
|
199
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/const PW=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],x1=Ve("ellipsis",PW);/**
|
|
201
|
-
* @license lucide-react v0.544.0 - ISC
|
|
202
|
-
*
|
|
203
|
-
* This source code is licensed under the ISC license.
|
|
204
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
-
*/const MW=[["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"}]],zW=Ve("external-link",MW);/**
|
|
206
|
-
* @license lucide-react v0.544.0 - ISC
|
|
207
|
-
*
|
|
208
|
-
* This source code is licensed under the ISC license.
|
|
209
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
-
*/const LW=[["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"}]],UW=Ve("file",LW);/**
|
|
211
|
-
* @license lucide-react v0.544.0 - ISC
|
|
212
|
-
*
|
|
213
|
-
* This source code is licensed under the ISC license.
|
|
214
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
-
*/const FW=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],VW=Ve("folder",FW);/**
|
|
216
|
-
* @license lucide-react v0.544.0 - ISC
|
|
217
|
-
*
|
|
218
|
-
* This source code is licensed under the ISC license.
|
|
219
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
-
*/const BW=[["path",{d:"M13.354 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l1.218-1.348",key:"8mvsmf"}],["path",{d:"M16 6h6",key:"1dogtp"}],["path",{d:"M19 3v6",key:"1ytpjt"}]],HW=Ve("funnel-plus",BW);/**
|
|
221
|
-
* @license lucide-react v0.544.0 - ISC
|
|
222
|
-
*
|
|
223
|
-
* This source code is licensed under the ISC license.
|
|
224
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/const qW=[["path",{d:"M12.531 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l.427-.473",key:"ol2ft2"}],["path",{d:"m16.5 3.5 5 5",key:"15e6fa"}],["path",{d:"m21.5 3.5-5 5",key:"m0lwru"}]],eO=Ve("funnel-x",qW);/**
|
|
226
|
-
* @license lucide-react v0.544.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/const GW=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],KW=Ve("funnel",GW);/**
|
|
231
|
-
* @license lucide-react v0.544.0 - ISC
|
|
232
|
-
*
|
|
233
|
-
* This source code is licensed under the ISC license.
|
|
234
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
-
*/const ZW=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],YW=Ve("gauge",ZW);/**
|
|
236
|
-
* @license lucide-react v0.544.0 - ISC
|
|
237
|
-
*
|
|
238
|
-
* This source code is licensed under the ISC license.
|
|
239
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
-
*/const WW=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],XW=Ve("git-branch",WW);/**
|
|
241
|
-
* @license lucide-react v0.544.0 - ISC
|
|
242
|
-
*
|
|
243
|
-
* This source code is licensed under the ISC license.
|
|
244
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
-
*/const QW=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],o2=Ve("github",QW);/**
|
|
246
|
-
* @license lucide-react v0.544.0 - ISC
|
|
247
|
-
*
|
|
248
|
-
* This source code is licensed under the ISC license.
|
|
249
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
-
*/const JW=[["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"}]],eX=Ve("grip-vertical",JW);/**
|
|
251
|
-
* @license lucide-react v0.544.0 - ISC
|
|
252
|
-
*
|
|
253
|
-
* This source code is licensed under the ISC license.
|
|
254
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/const tX=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],a2=Ve("handshake",tX);/**
|
|
256
|
-
* @license lucide-react v0.544.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/const nX=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],rX=Ve("house",nX);/**
|
|
261
|
-
* @license lucide-react v0.544.0 - ISC
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the ISC license.
|
|
264
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/const iX=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m8 11 4 4 4-4",key:"1dohi6"}],["path",{d:"M8 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-4",key:"1ywtjm"}]],oX=Ve("import",iX);/**
|
|
266
|
-
* @license lucide-react v0.544.0 - ISC
|
|
267
|
-
*
|
|
268
|
-
* This source code is licensed under the ISC license.
|
|
269
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
-
*/const aX=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],sX=Ve("link",aX);/**
|
|
271
|
-
* @license lucide-react v0.544.0 - ISC
|
|
272
|
-
*
|
|
273
|
-
* This source code is licensed under the ISC license.
|
|
274
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
-
*/const lX=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],s2=Ve("loader-circle",lX);/**
|
|
276
|
-
* @license lucide-react v0.544.0 - ISC
|
|
277
|
-
*
|
|
278
|
-
* This source code is licensed under the ISC license.
|
|
279
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
-
*/const cX=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],uX=Ve("log-in",cX);/**
|
|
281
|
-
* @license lucide-react v0.544.0 - ISC
|
|
282
|
-
*
|
|
283
|
-
* This source code is licensed under the ISC license.
|
|
284
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
-
*/const dX=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],fX=Ve("log-out",dX);/**
|
|
286
|
-
* @license lucide-react v0.544.0 - ISC
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the ISC license.
|
|
289
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/const mX=[["path",{d:"M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5",key:"e61zoh"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M20 14v4",key:"1hm744"}],["path",{d:"M20 22v.01",key:"12bgn6"}]],pX=Ve("mail-warning",mX);/**
|
|
291
|
-
* @license lucide-react v0.544.0 - ISC
|
|
292
|
-
*
|
|
293
|
-
* This source code is licensed under the ISC license.
|
|
294
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/const hX=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],l2=Ve("menu",hX);/**
|
|
296
|
-
* @license lucide-react v0.544.0 - ISC
|
|
297
|
-
*
|
|
298
|
-
* This source code is licensed under the ISC license.
|
|
299
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
-
*/const gX=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"16",height:"18",x:"4",y:"4",rx:"2",key:"1u9h20"}],["path",{d:"M8 10h6",key:"3oa6kw"}],["path",{d:"M8 14h8",key:"1fgep2"}],["path",{d:"M8 18h5",key:"17enja"}]],vX=Ve("notepad-text",gX);/**
|
|
301
|
-
* @license lucide-react v0.544.0 - ISC
|
|
302
|
-
*
|
|
303
|
-
* This source code is licensed under the ISC license.
|
|
304
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
-
*/const yX=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],w1=Ve("package",yX);/**
|
|
306
|
-
* @license lucide-react v0.544.0 - ISC
|
|
307
|
-
*
|
|
308
|
-
* This source code is licensed under the ISC license.
|
|
309
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
-
*/const bX=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],xX=Ve("panel-right-close",bX);/**
|
|
311
|
-
* @license lucide-react v0.544.0 - ISC
|
|
312
|
-
*
|
|
313
|
-
* This source code is licensed under the ISC license.
|
|
314
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
-
*/const wX=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],SX=Ve("panel-right-open",wX);/**
|
|
316
|
-
* @license lucide-react v0.544.0 - ISC
|
|
317
|
-
*
|
|
318
|
-
* This source code is licensed under the ISC license.
|
|
319
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
-
*/const _X=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],c2=Ve("pencil",_X);/**
|
|
321
|
-
* @license lucide-react v0.544.0 - ISC
|
|
322
|
-
*
|
|
323
|
-
* This source code is licensed under the ISC license.
|
|
324
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
-
*/const CX=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Mo=Ve("plus",CX);/**
|
|
326
|
-
* @license lucide-react v0.544.0 - ISC
|
|
327
|
-
*
|
|
328
|
-
* This source code is licensed under the ISC license.
|
|
329
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
-
*/const EX=[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M13 16H8",key:"wsln4y"}]],u2=Ve("receipt-text",EX);/**
|
|
331
|
-
* @license lucide-react v0.544.0 - ISC
|
|
332
|
-
*
|
|
333
|
-
* This source code is licensed under the ISC license.
|
|
334
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
-
*/const kX=[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]],RX=Ve("receipt",kX);/**
|
|
336
|
-
* @license lucide-react v0.544.0 - ISC
|
|
337
|
-
*
|
|
338
|
-
* This source code is licensed under the ISC license.
|
|
339
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/const jX=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Ha=Ve("refresh-cw",jX);/**
|
|
341
|
-
* @license lucide-react v0.544.0 - ISC
|
|
342
|
-
*
|
|
343
|
-
* This source code is licensed under the ISC license.
|
|
344
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
-
*/const IX=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],d2=Ve("rocket",IX);/**
|
|
346
|
-
* @license lucide-react v0.544.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/const TX=[["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"}]],NX=Ve("rotate-ccw",TX);/**
|
|
351
|
-
* @license lucide-react v0.544.0 - ISC
|
|
352
|
-
*
|
|
353
|
-
* This source code is licensed under the ISC license.
|
|
354
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
-
*/const AX=[["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"}]],aa=Ve("save",AX);/**
|
|
356
|
-
* @license lucide-react v0.544.0 - ISC
|
|
357
|
-
*
|
|
358
|
-
* This source code is licensed under the ISC license.
|
|
359
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
-
*/const OX=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],$X=Ve("server",OX);/**
|
|
361
|
-
* @license lucide-react v0.544.0 - ISC
|
|
362
|
-
*
|
|
363
|
-
* This source code is licensed under the ISC license.
|
|
364
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
-
*/const DX=[["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"}]],PX=Ve("settings",DX);/**
|
|
366
|
-
* @license lucide-react v0.544.0 - ISC
|
|
367
|
-
*
|
|
368
|
-
* This source code is licensed under the ISC license.
|
|
369
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
-
*/const MX=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],zX=Ve("table",MX);/**
|
|
371
|
-
* @license lucide-react v0.544.0 - ISC
|
|
372
|
-
*
|
|
373
|
-
* This source code is licensed under the ISC license.
|
|
374
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
-
*/const LX=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],f2=Ve("terminal",LX);/**
|
|
376
|
-
* @license lucide-react v0.544.0 - ISC
|
|
377
|
-
*
|
|
378
|
-
* This source code is licensed under the ISC license.
|
|
379
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
-
*/const UX=[["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"}]],FX=Ve("trash-2",UX);/**
|
|
381
|
-
* @license lucide-react v0.544.0 - ISC
|
|
382
|
-
*
|
|
383
|
-
* This source code is licensed under the ISC license.
|
|
384
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
-
*/const VX=[["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"}]],Ja=Ve("trash",VX);/**
|
|
386
|
-
* @license lucide-react v0.544.0 - ISC
|
|
387
|
-
*
|
|
388
|
-
* This source code is licensed under the ISC license.
|
|
389
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
-
*/const BX=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],HX=Ve("triangle-alert",BX);/**
|
|
391
|
-
* @license lucide-react v0.544.0 - ISC
|
|
392
|
-
*
|
|
393
|
-
* This source code is licensed under the ISC license.
|
|
394
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
-
*/const qX=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],GX=Ve("undo-2",qX);/**
|
|
396
|
-
* @license lucide-react v0.544.0 - ISC
|
|
397
|
-
*
|
|
398
|
-
* This source code is licensed under the ISC license.
|
|
399
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
-
*/const KX=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],m2=Ve("users",KX);/**
|
|
401
|
-
* @license lucide-react v0.544.0 - ISC
|
|
402
|
-
*
|
|
403
|
-
* This source code is licensed under the ISC license.
|
|
404
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
-
*/const ZX=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],p2=Ve("x",ZX);function Ov({className:e,error:t,title:n,showReturnToHome:r,children:i}){const{user:o,isLoading:s}=fc();return Td(o),u.jsxs(ec,{className:Le("text-red p-5 border border-red rounded-md m-12 mt-36",e),children:[u.jsxs(tl,{children:[u.jsx(nl,{className:"text-2xl",children:u.jsx("h2",{children:n??"Component Error"})}),u.jsx(pc,{children:t.message})]}),u.jsxs(Qa,{children:[i,r!==!1&&(o&&!s?u.jsx(We,{to:Js,children:u.jsxs(Ce,{children:[" ",u.jsx(tc,{})," Return to Home"]})}):u.jsx(We,{to:"/sign-in",children:u.jsxs(Ce,{children:[" ",u.jsx(tc,{})," Go to Sign In Page"]})}))]})]})}function YX(){const{user:e,isLoading:t}=fc();return Td(e),u.jsx("div",{className:"flex items-center justify-center h-screen px-3",children:u.jsxs(ec,{className:"text-red p-5 border border-red rounded-md w-full max-w-md",children:[u.jsx(tl,{children:u.jsx(nl,{className:"text-2xl",children:u.jsx("h2",{children:"Sorry, Page Not Found"})})}),u.jsx(Qa,{children:e&&!t?u.jsx(We,{to:Js,children:u.jsxs(Ce,{children:[" ",u.jsx(tc,{})," Return to Home"]})}):u.jsx(We,{to:"/sign-in",children:u.jsxs(Ce,{children:[" ",u.jsx(tc,{})," Go Sign In Page"]})})})]})})}function WX(){return"ontouchstart"in window||navigator.maxTouchPoints>0}function XX(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const QX=e=>{switch(e){case"success":return tQ;case"info":return rQ;case"warning":return nQ;case"error":return iQ;default:return null}},JX=Array(12).fill(0),eQ=({visible:e,className:t})=>X.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},X.createElement("div",{className:"sonner-spinner"},JX.map((n,r)=>X.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),tQ=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.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"})),nQ=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},X.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"})),rQ=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.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"})),iQ=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.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"})),oQ=X.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"},X.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),X.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),aQ=()=>{const[e,t]=X.useState(document.hidden);return X.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let D_=1;class sQ{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,o=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:D_++,s=this.toasts.find(d=>d.id===o),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(d=>d.id===o?(this.publish({...d,...t,id:o,title:r}),{...d,...t,id:o,dismissible:c,title:r}):d):this.addToast({title:r,...i,dismissible:c,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,s;const c=i.then(async f=>{if(s=["resolve",f],X.isValidElement(f))o=!1,this.create({id:r,type:"default",message:f});else if(cQ(f)&&!f.ok){o=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,v=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,b=typeof h=="object"&&!X.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:v,...b})}else if(f instanceof Error){o=!1;const h=typeof n.error=="function"?await n.error(f):n.error,v=typeof n.description=="function"?await n.description(f):n.description,b=typeof h=="object"&&!X.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:v,...b})}else if(n.success!==void 0){o=!1;const h=typeof n.success=="function"?await n.success(f):n.success,v=typeof n.description=="function"?await n.description(f):n.description,b=typeof h=="object"&&!X.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:v,...b})}}).catch(async f=>{if(s=["reject",f],n.error!==void 0){o=!1;const p=typeof n.error=="function"?await n.error(f):n.error,h=typeof n.description=="function"?await n.description(f):n.description,y=typeof p=="object"&&!X.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:h,...y})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,p)=>c.then(()=>s[0]==="reject"?p(s[1]):f(s[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=n?.id||D_++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ai=new sQ,lQ=(e,t)=>{const n=t?.id||D_++;return ai.addToast({title:e,...t,id:n}),n},cQ=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",uQ=lQ,dQ=()=>ai.toasts,fQ=()=>ai.getActiveToasts(),Ee=Object.assign(uQ,{success:ai.success,info:ai.info,warning:ai.warning,error:ai.error,custom:ai.custom,message:ai.message,promise:ai.promise,dismiss:ai.dismiss,loading:ai.loading},{getHistory:dQ,getToasts:fQ});XX("[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 _g(e){return e.label!==void 0}const mQ=3,pQ="24px",hQ="16px",tO=4e3,gQ=356,vQ=14,yQ=45,bQ=200;function qo(...e){return e.filter(Boolean).join(" ")}function xQ(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const wQ=e=>{var t,n,r,i,o,s,c,d,f;const{invert:p,toast:h,unstyled:v,interacting:y,setHeights:b,visibleToasts:S,heights:C,index:E,toasts:k,expanded:R,removeToast:I,defaultRichColors:A,closeButton:T,style:N,cancelButtonStyle:z,actionButtonStyle:L,className:K="",descriptionClassName:ee="",duration:Z,position:Y,gap:B,expandByDefault:W,classNames:P,icons:G,closeButtonAriaLabel:U="Close toast"}=e,[te,$]=X.useState(null),[M,F]=X.useState(null),[O,J]=X.useState(!1),[de,pe]=X.useState(!1),[V,ie]=X.useState(!1),[_e,Ie]=X.useState(!1),[He,Ae]=X.useState(!1),[Ye,jt]=X.useState(0),[ln,Dn]=X.useState(0),Pn=X.useRef(h.duration||Z||tO),Gr=X.useRef(null),Wt=X.useRef(null),q=E===0,ae=E+1<=S,ue=h.type,xe=h.dismissible!==!1,ve=h.className||"",Se=h.descriptionClassName||"",ne=X.useMemo(()=>C.findIndex(rt=>rt.toastId===h.id)||0,[C,h.id]),ye=X.useMemo(()=>{var rt;return(rt=h.closeButton)!=null?rt:T},[h.closeButton,T]),Ne=X.useMemo(()=>h.duration||Z||tO,[h.duration,Z]),Ke=X.useRef(0),ot=X.useRef(0),Kt=X.useRef(0),Mn=X.useRef(null),[cn,Bt]=Y.split("-"),In=X.useMemo(()=>C.reduce((rt,un,nr)=>nr>=ne?rt:rt+un.height,0),[C,ne]),It=aQ(),Kr=h.invert||p,bt=ue==="loading";ot.current=X.useMemo(()=>ne*B+In,[ne,In]),X.useEffect(()=>{Pn.current=Ne},[Ne]),X.useEffect(()=>{J(!0)},[]),X.useEffect(()=>{const rt=Wt.current;if(rt){const un=rt.getBoundingClientRect().height;return Dn(un),b(nr=>[{toastId:h.id,height:un,position:h.position},...nr]),()=>b(nr=>nr.filter(yr=>yr.toastId!==h.id))}},[b,h.id]),X.useLayoutEffect(()=>{if(!O)return;const rt=Wt.current,un=rt.style.height;rt.style.height="auto";const nr=rt.getBoundingClientRect().height;rt.style.height=un,Dn(nr),b(yr=>yr.find(gn=>gn.toastId===h.id)?yr.map(gn=>gn.toastId===h.id?{...gn,height:nr}:gn):[{toastId:h.id,height:nr,position:h.position},...yr])},[O,h.title,h.description,b,h.id,h.jsx,h.action,h.cancel]);const dr=X.useCallback(()=>{pe(!0),jt(ot.current),b(rt=>rt.filter(un=>un.toastId!==h.id)),setTimeout(()=>{I(h)},bQ)},[h,I,b,ot]);X.useEffect(()=>{if(h.promise&&ue==="loading"||h.duration===1/0||h.type==="loading")return;let rt;return R||y||It?(()=>{if(Kt.current<Ke.current){const yr=new Date().getTime()-Ke.current;Pn.current=Pn.current-yr}Kt.current=new Date().getTime()})():(()=>{Pn.current!==1/0&&(Ke.current=new Date().getTime(),rt=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),dr()},Pn.current))})(),()=>clearTimeout(rt)},[R,y,h,ue,It,dr]),X.useEffect(()=>{h.delete&&(dr(),h.onDismiss==null||h.onDismiss.call(h,h))},[dr,h.delete]);function ts(){var rt;if(G?.loading){var un;return X.createElement("div",{className:qo(P?.loader,h==null||(un=h.classNames)==null?void 0:un.loader,"sonner-loader"),"data-visible":ue==="loading"},G.loading)}return X.createElement(eQ,{className:qo(P?.loader,h==null||(rt=h.classNames)==null?void 0:rt.loader),visible:ue==="loading"})}const Oc=h.icon||G?.[ue]||QX(ue);var sl,Lo;return X.createElement("li",{tabIndex:0,ref:Wt,className:qo(K,ve,P?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,P?.default,P?.[ue],h==null||(n=h.classNames)==null?void 0:n[ue]),"data-sonner-toast":"","data-rich-colors":(sl=h.richColors)!=null?sl:A,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":O,"data-promise":!!h.promise,"data-swiped":He,"data-removed":de,"data-visible":ae,"data-y-position":cn,"data-x-position":Bt,"data-index":E,"data-front":q,"data-swiping":V,"data-dismissible":xe,"data-type":ue,"data-invert":Kr,"data-swipe-out":_e,"data-swipe-direction":M,"data-expanded":!!(R||W&&O),"data-testid":h.testId,style:{"--index":E,"--toasts-before":E,"--z-index":k.length-E,"--offset":`${de?Ye:ot.current}px`,"--initial-height":W?"auto":`${ln}px`,...N,...h.style},onDragEnd:()=>{ie(!1),$(null),Mn.current=null},onPointerDown:rt=>{rt.button!==2&&(bt||!xe||(Gr.current=new Date,jt(ot.current),rt.target.setPointerCapture(rt.pointerId),rt.target.tagName!=="BUTTON"&&(ie(!0),Mn.current={x:rt.clientX,y:rt.clientY})))},onPointerUp:()=>{var rt,un,nr;if(_e||!xe)return;Mn.current=null;const yr=Number(((rt=Wt.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ns=Number(((un=Wt.current)==null?void 0:un.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),gn=new Date().getTime()-((nr=Gr.current)==null?void 0:nr.getTime()),Zr=te==="x"?yr:ns,ll=Math.abs(Zr)/gn;if(Math.abs(Zr)>=yQ||ll>.11){jt(ot.current),h.onDismiss==null||h.onDismiss.call(h,h),F(te==="x"?yr>0?"right":"left":ns>0?"down":"up"),dr(),Ie(!0);return}else{var Yr,Wr;(Yr=Wt.current)==null||Yr.style.setProperty("--swipe-amount-x","0px"),(Wr=Wt.current)==null||Wr.style.setProperty("--swipe-amount-y","0px")}Ae(!1),ie(!1),$(null)},onPointerMove:rt=>{var un,nr,yr;if(!Mn.current||!xe||((un=window.getSelection())==null?void 0:un.toString().length)>0)return;const gn=rt.clientY-Mn.current.y,Zr=rt.clientX-Mn.current.x;var ll;const Yr=(ll=e.swipeDirections)!=null?ll:xQ(Y);!te&&(Math.abs(Zr)>1||Math.abs(gn)>1)&&$(Math.abs(Zr)>Math.abs(gn)?"x":"y");let Wr={x:0,y:0};const $c=yo=>1/(1.5+Math.abs(yo)/20);if(te==="y"){if(Yr.includes("top")||Yr.includes("bottom"))if(Yr.includes("top")&&gn<0||Yr.includes("bottom")&&gn>0)Wr.y=gn;else{const yo=gn*$c(gn);Wr.y=Math.abs(yo)<Math.abs(gn)?yo:gn}}else if(te==="x"&&(Yr.includes("left")||Yr.includes("right")))if(Yr.includes("left")&&Zr<0||Yr.includes("right")&&Zr>0)Wr.x=Zr;else{const yo=Zr*$c(Zr);Wr.x=Math.abs(yo)<Math.abs(Zr)?yo:Zr}(Math.abs(Wr.x)>0||Math.abs(Wr.y)>0)&&Ae(!0),(nr=Wt.current)==null||nr.style.setProperty("--swipe-amount-x",`${Wr.x}px`),(yr=Wt.current)==null||yr.style.setProperty("--swipe-amount-y",`${Wr.y}px`)}},ye&&!h.jsx&&ue!=="loading"?X.createElement("button",{"aria-label":U,"data-disabled":bt,"data-close-button":!0,onClick:bt||!xe?()=>{}:()=>{dr(),h.onDismiss==null||h.onDismiss.call(h,h)},className:qo(P?.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(Lo=G?.close)!=null?Lo:oQ):null,(ue||h.icon||h.promise)&&h.icon!==null&&(G?.[ue]!==null||h.icon)?X.createElement("div",{"data-icon":"",className:qo(P?.icon,h==null||(i=h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||ts():null,h.type!=="loading"?Oc:null):null,X.createElement("div",{"data-content":"",className:qo(P?.content,h==null||(o=h.classNames)==null?void 0:o.content)},X.createElement("div",{"data-title":"",className:qo(P?.title,h==null||(s=h.classNames)==null?void 0:s.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?X.createElement("div",{"data-description":"",className:qo(ee,Se,P?.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),X.isValidElement(h.cancel)?h.cancel:h.cancel&&_g(h.cancel)?X.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||z,onClick:rt=>{_g(h.cancel)&&xe&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,rt),dr())},className:qo(P?.cancelButton,h==null||(d=h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,X.isValidElement(h.action)?h.action:h.action&&_g(h.action)?X.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:rt=>{_g(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,rt),!rt.defaultPrevented&&dr())},className:qo(P?.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function nO(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function SQ(e,t){const n={};return[e,t].forEach((r,i)=>{const o=i===1,s=o?"--mobile-offset":"--offset",c=o?hQ:pQ;function d(f){["top","right","bottom","left"].forEach(p=>{n[`${s}-${p}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${s}-${f}`]=c:n[`${s}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(c)}),n}const _Q=X.forwardRef(function(t,n){const{id:r,invert:i,position:o="bottom-right",hotkey:s=["altKey","KeyT"],expand:c,closeButton:d,className:f,offset:p,mobileOffset:h,theme:v="light",richColors:y,duration:b,style:S,visibleToasts:C=mQ,toastOptions:E,dir:k=nO(),gap:R=vQ,icons:I,containerAriaLabel:A="Notifications"}=t,[T,N]=X.useState([]),z=X.useMemo(()=>r?T.filter(O=>O.toasterId===r):T.filter(O=>!O.toasterId),[T,r]),L=X.useMemo(()=>Array.from(new Set([o].concat(z.filter(O=>O.position).map(O=>O.position)))),[z,o]),[K,ee]=X.useState([]),[Z,Y]=X.useState(!1),[B,W]=X.useState(!1),[P,G]=X.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=X.useRef(null),te=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=X.useRef(null),M=X.useRef(!1),F=X.useCallback(O=>{N(J=>{var de;return(de=J.find(pe=>pe.id===O.id))!=null&&de.delete||ai.dismiss(O.id),J.filter(({id:pe})=>pe!==O.id)})},[]);return X.useEffect(()=>ai.subscribe(O=>{if(O.dismiss){requestAnimationFrame(()=>{N(J=>J.map(de=>de.id===O.id?{...de,delete:!0}:de))});return}setTimeout(()=>{g1.flushSync(()=>{N(J=>{const de=J.findIndex(pe=>pe.id===O.id);return de!==-1?[...J.slice(0,de),{...J[de],...O},...J.slice(de+1)]:[O,...J]})})})}),[T]),X.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 O=window.matchMedia("(prefers-color-scheme: dark)");try{O.addEventListener("change",({matches:J})=>{G(J?"dark":"light")})}catch{O.addListener(({matches:de})=>{try{G(de?"dark":"light")}catch(pe){console.error(pe)}})}},[v]),X.useEffect(()=>{T.length<=1&&Y(!1)},[T]),X.useEffect(()=>{const O=J=>{var de;if(s.every(ie=>J[ie]||J.code===ie)){var V;Y(!0),(V=U.current)==null||V.focus()}J.code==="Escape"&&(document.activeElement===U.current||(de=U.current)!=null&&de.contains(document.activeElement))&&Y(!1)};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[s]),X.useEffect(()=>{if(U.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,M.current=!1)}},[U.current]),X.createElement("section",{ref:n,"aria-label":`${A} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((O,J)=>{var de;const[pe,V]=O.split("-");return z.length?X.createElement("ol",{key:O,dir:k==="auto"?nO():k,tabIndex:-1,ref:U,className:f,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":pe,"data-x-position":V,style:{"--front-toast-height":`${((de=K[0])==null?void 0:de.height)||0}px`,"--width":`${gQ}px`,"--gap":`${R}px`,...S,...SQ(p,h)},onBlur:ie=>{M.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(M.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||M.current||(M.current=!0,$.current=ie.relatedTarget)},onMouseEnter:()=>Y(!0),onMouseMove:()=>Y(!0),onMouseLeave:()=>{B||Y(!1)},onDragEnd:()=>Y(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},z.filter(ie=>!ie.position&&J===0||ie.position===O).map((ie,_e)=>{var Ie,He;return X.createElement(wQ,{key:ie.id,icons:I,index:_e,toast:ie,defaultRichColors:y,duration:(Ie=E?.duration)!=null?Ie:b,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:i,visibleToasts:C,closeButton:(He=E?.closeButton)!=null?He:d,interacting:B,position:O,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:F,toasts:z.filter(Ae=>Ae.position==ie.position),heights:K.filter(Ae=>Ae.position==ie.position),setHeights:ee,expandByDefault:c,gap:R,expanded:Z,swipeDirections:t.swipeDirections})})):null}))});function rO(e){let t="Error",n="We had some trouble!";console.error(e);const r=e,i=e;if(typeof e=="string"?n=e:r?.response?.data?typeof r.response.data=="string"?n=r.response.data:r.response.data.error?n=r.response.data.error:r.response.data.message&&(n=r.response.data.message):i?.message&&(n=i.message),n.includes(":")){const o=n.split(":");t=o.shift(),n=o.join(":")}Ee.error(t,{description:n,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}})}const $v=new oK({queryCache:new fM({onError:rO}),mutationCache:new dM({onError:rO})});function CQ(e,t){const n=x.createContext(t),r=o=>{const{children:s,...c}=o,d=x.useMemo(()=>c,Object.values(c));return u.jsx(n.Provider,{value:d,children:s})};r.displayName=e+"Provider";function i(o){const s=x.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Di(e,t=[]){let n=[];function r(o,s){const c=x.createContext(s),d=n.length;n=[...n,s];const f=h=>{const{scope:v,children:y,...b}=h,S=v?.[e]?.[d]||c,C=x.useMemo(()=>b,Object.values(b));return u.jsx(S.Provider,{value:C,children:y})};f.displayName=o+"Provider";function p(h,v){const y=v?.[e]?.[d]||c,b=x.useContext(y);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[f,p]}const i=()=>{const o=n.map(s=>x.createContext(s));return function(c){const d=c?.[e]||o;return x.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return i.scopeName=e,[r,EQ(i,...t)]}function EQ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((c,{useScope:d,scopeName:f})=>{const h=d(o)[`__scope${f}`];return{...c,...h}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Re(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}var kQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Be=kQ.reduce((e,t)=>{const n=Jl(`Primitive.${t}`),r=x.forwardRef((i,o)=>{const{asChild:s,...c}=i,d=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(d,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Dv(e,t){e&&Rd.flushSync(()=>e.dispatchEvent(t))}var qn=globalThis?.document?x.useLayoutEffect:()=>{},RQ=mM[" useInsertionEffect ".trim().toString()]||qn;function No({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=jQ({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:i;{const p=x.useRef(e!==void 0);x.useEffect(()=>{const h=p.current;h!==c&&console.warn(`${r} 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.`),p.current=c},[c,r])}const f=x.useCallback(p=>{if(c){const h=IQ(p)?p(e):p;h!==e&&s.current?.(h)}else o(p)},[c,e,o,s]);return[d,f]}function jQ({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),o=x.useRef(t);return RQ(()=>{o.current=t},[t]),x.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function IQ(e){return typeof e=="function"}var TQ=x.createContext(void 0);function hc(e){const t=x.useContext(TQ);return e||t||"ltr"}function NQ(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Gn=e=>{const{present:t,children:n}=e,r=AQ(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=ct(r.ref,OQ(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};Gn.displayName="Presence";function AQ(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),s=e?"mounted":"unmounted",[c,d]=NQ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const f=Cg(r.current);o.current=c==="mounted"?f:"none"},[c]),qn(()=>{const f=r.current,p=i.current;if(p!==e){const v=o.current,y=Cg(f);e?d("MOUNT"):y==="none"||f?.display==="none"?d("UNMOUNT"):d(p&&v!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),qn(()=>{if(t){let f;const p=t.ownerDocument.defaultView??window,h=y=>{const S=Cg(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&S&&(d("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},v=y=>{y.target===t&&(o.current=Cg(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:x.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Cg(e){return e?.animationName||"none"}function OQ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $Q=mM[" useId ".trim().toString()]||(()=>{}),DQ=0;function Ii(e){const[t,n]=x.useState($Q());return qn(()=>{n(r=>r??String(DQ++))},[e]),t?`radix-${t}`:""}function gp(e){const t=e+"CollectionProvider",[n,r]=Di(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=S=>{const{scope:C,children:E}=S,k=X.useRef(null),R=X.useRef(new Map).current;return u.jsx(i,{scope:C,itemMap:R,collectionRef:k,children:E})};s.displayName=t;const c=e+"CollectionSlot",d=Jl(c),f=X.forwardRef((S,C)=>{const{scope:E,children:k}=S,R=o(c,E),I=ct(C,R.collectionRef);return u.jsx(d,{ref:I,children:k})});f.displayName=c;const p=e+"CollectionItemSlot",h="data-radix-collection-item",v=Jl(p),y=X.forwardRef((S,C)=>{const{scope:E,children:k,...R}=S,I=X.useRef(null),A=ct(C,I),T=o(p,E);return X.useEffect(()=>(T.itemMap.set(I,{ref:I,...R}),()=>void T.itemMap.delete(I))),u.jsx(v,{[h]:"",ref:A,children:k})});y.displayName=p;function b(S){const C=o(e+"CollectionConsumer",S);return X.useCallback(()=>{const k=C.collectionRef.current;if(!k)return[];const R=Array.from(k.querySelectorAll(`[${h}]`));return Array.from(C.itemMap.values()).sort((T,N)=>R.indexOf(T.ref.current)-R.indexOf(N.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:s,Slot:f,ItemSlot:y},b,r]}function fn(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>t.current?.(...n),[])}function PQ(e,t=globalThis?.document){const n=fn(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var MQ="DismissableLayer",P_="dismissableLayer.update",zQ="dismissableLayer.pointerDownOutside",LQ="dismissableLayer.focusOutside",iO,h2=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nd=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...d}=e,f=x.useContext(h2),[p,h]=x.useState(null),v=p?.ownerDocument??globalThis?.document,[,y]=x.useState({}),b=ct(t,N=>h(N)),S=Array.from(f.layers),[C]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(C),k=p?S.indexOf(p):-1,R=f.layersWithOutsidePointerEventsDisabled.size>0,I=k>=E,A=VQ(N=>{const z=N.target,L=[...f.branches].some(K=>K.contains(z));!I||L||(i?.(N),s?.(N),N.defaultPrevented||c?.())},v),T=BQ(N=>{const z=N.target;[...f.branches].some(K=>K.contains(z))||(o?.(N),s?.(N),N.defaultPrevented||c?.())},v);return PQ(N=>{k===f.layers.size-1&&(r?.(N),!N.defaultPrevented&&c&&(N.preventDefault(),c()))},v),x.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(iO=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),oO(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=iO)}},[p,v,n,f]),x.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),oO())},[p,f]),x.useEffect(()=>{const N=()=>y({});return document.addEventListener(P_,N),()=>document.removeEventListener(P_,N)},[]),u.jsx(Be.div,{...d,ref:b,style:{pointerEvents:R?I?"auto":"none":void 0,...e.style},onFocusCapture:Re(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Re(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Re(e.onPointerDownCapture,A.onPointerDownCapture)})});Nd.displayName=MQ;var UQ="DismissableLayerBranch",FQ=x.forwardRef((e,t)=>{const n=x.useContext(h2),r=x.useRef(null),i=ct(t,r);return x.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(Be.div,{...e,ref:i})});FQ.displayName=UQ;function VQ(e,t=globalThis?.document){const n=fn(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const o=c=>{if(c.target&&!r.current){let d=function(){g2(zQ,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function BQ(e,t=globalThis?.document){const n=fn(e),r=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!r.current&&g2(LQ,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function oO(){const e=new CustomEvent(P_);document.dispatchEvent(e)}function g2(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Dv(i,o):i.dispatchEvent(o)}function S1(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var v2=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"}),HQ="VisuallyHidden",y2=x.forwardRef((e,t)=>u.jsx(Be.span,{...e,ref:t,style:{...v2,...e.style}}));y2.displayName=HQ;var b2=y2,gc="NavigationMenu",[_1,x2,qQ]=gp(gc),[M_,GQ,KQ]=gp(gc),[C1]=Di(gc,[qQ,KQ]),[ZQ,mo]=C1(gc),[YQ,WQ]=C1(gc),w2=x.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:o,delayDuration:s=200,skipDelayDuration:c=300,orientation:d="horizontal",dir:f,...p}=e,[h,v]=x.useState(null),y=ct(t,L=>v(L)),b=hc(f),S=x.useRef(0),C=x.useRef(0),E=x.useRef(0),[k,R]=x.useState(!0),[I,A]=No({prop:r,onChange:L=>{const K=L!=="",ee=c>0;K?(window.clearTimeout(E.current),ee&&R(!1)):(window.clearTimeout(E.current),E.current=window.setTimeout(()=>R(!0),c)),i?.(L)},defaultProp:o??"",caller:gc}),T=x.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>A(""),150)},[A]),N=x.useCallback(L=>{window.clearTimeout(C.current),A(L)},[A]),z=x.useCallback(L=>{I===L?window.clearTimeout(C.current):S.current=window.setTimeout(()=>{window.clearTimeout(C.current),A(L)},s)},[I,A,s]);return x.useEffect(()=>()=>{window.clearTimeout(S.current),window.clearTimeout(C.current),window.clearTimeout(E.current)},[]),u.jsx(S2,{scope:n,isRootMenu:!0,value:I,dir:b,orientation:d,rootNavigationMenu:h,onTriggerEnter:L=>{window.clearTimeout(S.current),k?z(L):N(L)},onTriggerLeave:()=>{window.clearTimeout(S.current),T()},onContentEnter:()=>window.clearTimeout(C.current),onContentLeave:T,onItemSelect:L=>{A(K=>K===L?"":L)},onItemDismiss:()=>A(""),children:u.jsx(Be.nav,{"aria-label":"Main","data-orientation":d,dir:b,...p,ref:y})})});w2.displayName=gc;var z_="NavigationMenuSub",XQ=x.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",...c}=e,d=mo(z_,n),[f,p]=No({prop:r,onChange:i,defaultProp:o??"",caller:z_});return u.jsx(S2,{scope:n,isRootMenu:!1,value:f,dir:d.dir,orientation:s,rootNavigationMenu:d.rootNavigationMenu,onTriggerEnter:h=>p(h),onItemSelect:h=>p(h),onItemDismiss:()=>p(""),children:u.jsx(Be.div,{"data-orientation":s,...c,ref:t})})});XQ.displayName=z_;var S2=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:i,orientation:o,children:s,value:c,onItemSelect:d,onItemDismiss:f,onTriggerEnter:p,onTriggerLeave:h,onContentEnter:v,onContentLeave:y}=e,[b,S]=x.useState(null),[C,E]=x.useState(new Map),[k,R]=x.useState(null);return u.jsx(ZQ,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:c,previousValue:S1(c),baseId:Ii(),dir:i,orientation:o,viewport:b,onViewportChange:S,indicatorTrack:k,onIndicatorTrackChange:R,onTriggerEnter:fn(p),onTriggerLeave:fn(h),onContentEnter:fn(v),onContentLeave:fn(y),onItemSelect:fn(d),onItemDismiss:fn(f),onViewportContentChange:x.useCallback((I,A)=>{E(T=>(T.set(I,A),new Map(T)))},[]),onViewportContentRemove:x.useCallback(I=>{E(A=>A.has(I)?(A.delete(I),new Map(A)):A)},[]),children:u.jsx(_1.Provider,{scope:t,children:u.jsx(YQ,{scope:t,items:C,children:s})})})},_2="NavigationMenuList",C2=x.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,i=mo(_2,n),o=u.jsx(Be.ul,{"data-orientation":i.orientation,...r,ref:t});return u.jsx(Be.div,{style:{position:"relative"},ref:i.onIndicatorTrackChange,children:u.jsx(_1.Slot,{scope:n,children:i.isRootMenu?u.jsx(N2,{asChild:!0,children:o}):o})})});C2.displayName=_2;var E2="NavigationMenuItem",[QQ,k2]=C1(E2),R2=x.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...i}=e,o=Ii(),s=r||o||"LEGACY_REACT_AUTO_VALUE",c=x.useRef(null),d=x.useRef(null),f=x.useRef(null),p=x.useRef(()=>{}),h=x.useRef(!1),v=x.useCallback((b="start")=>{if(c.current){p.current();const S=U_(c.current);S.length&&R1(b==="start"?S:S.reverse())}},[]),y=x.useCallback(()=>{if(c.current){const b=U_(c.current);b.length&&(p.current=lJ(b))}},[]);return u.jsx(QQ,{scope:n,value:s,triggerRef:d,contentRef:c,focusProxyRef:f,wasEscapeCloseRef:h,onEntryKeyDown:v,onFocusProxyEnter:v,onRootContentClose:y,onContentFocusOutside:y,children:u.jsx(Be.li,{...i,ref:t})})});R2.displayName=E2;var L_="NavigationMenuTrigger",JQ=x.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...i}=e,o=mo(L_,e.__scopeNavigationMenu),s=k2(L_,e.__scopeNavigationMenu),c=x.useRef(null),d=ct(c,s.triggerRef,t),f=O2(o.baseId,s.value),p=$2(o.baseId,s.value),h=x.useRef(!1),v=x.useRef(!1),y=s.value===o.value;return u.jsxs(u.Fragment,{children:[u.jsx(_1.ItemSlot,{scope:n,value:s.value,children:u.jsx(A2,{asChild:!0,children:u.jsx(Be.button,{id:f,disabled:r,"data-disabled":r?"":void 0,"data-state":j1(y),"aria-expanded":y,"aria-controls":p,...i,ref:d,onPointerEnter:Re(e.onPointerEnter,()=>{v.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:Re(e.onPointerMove,Pv(()=>{r||v.current||s.wasEscapeCloseRef.current||h.current||(o.onTriggerEnter(s.value),h.current=!0)})),onPointerLeave:Re(e.onPointerLeave,Pv(()=>{r||(o.onTriggerLeave(),h.current=!1)})),onClick:Re(e.onClick,()=>{o.onItemSelect(s.value),v.current=y}),onKeyDown:Re(e.onKeyDown,b=>{const C={horizontal:"ArrowDown",vertical:o.dir==="rtl"?"ArrowLeft":"ArrowRight"}[o.orientation];y&&b.key===C&&(s.onEntryKeyDown(),b.preventDefault())})})})}),y&&u.jsxs(u.Fragment,{children:[u.jsx(b2,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:b=>{const S=s.contentRef.current,C=b.relatedTarget,E=C===c.current,k=S?.contains(C);(E||!k)&&s.onFocusProxyEnter(E?"start":"end")}}),o.viewport&&u.jsx("span",{"aria-owns":p})]})]})});JQ.displayName=L_;var eJ="NavigationMenuLink",aO="navigationMenu.linkSelect",j2=x.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:i,...o}=e;return u.jsx(A2,{asChild:!0,children:u.jsx(Be.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...o,ref:t,onClick:Re(e.onClick,s=>{const c=s.target,d=new CustomEvent(aO,{bubbles:!0,cancelable:!0});if(c.addEventListener(aO,f=>i?.(f),{once:!0}),Dv(c,d),!d.defaultPrevented&&!s.metaKey){const f=new CustomEvent(uv,{bubbles:!0,cancelable:!0});Dv(c,f)}},{checkForDefaultPrevented:!1})})})});j2.displayName=eJ;var E1="NavigationMenuIndicator",tJ=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=mo(E1,e.__scopeNavigationMenu),o=!!i.value;return i.indicatorTrack?g1.createPortal(u.jsx(Gn,{present:n||o,children:u.jsx(nJ,{...r,ref:t})}),i.indicatorTrack):null});tJ.displayName=E1;var nJ=x.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,i=mo(E1,n),o=x2(n),[s,c]=x.useState(null),[d,f]=x.useState(null),p=i.orientation==="horizontal",h=!!i.value;x.useEffect(()=>{const b=o().find(S=>S.value===i.value)?.ref.current;b&&c(b)},[o,i.value]);const v=()=>{s&&f({size:p?s.offsetWidth:s.offsetHeight,offset:p?s.offsetLeft:s.offsetTop})};return F_(s,v),F_(i.indicatorTrack,v),d?u.jsx(Be.div,{"aria-hidden":!0,"data-state":h?"visible":"hidden","data-orientation":i.orientation,...r,ref:t,style:{position:"absolute",...p?{left:0,width:d.size+"px",transform:`translateX(${d.offset}px)`}:{top:0,height:d.size+"px",transform:`translateY(${d.offset}px)`},...r.style}}):null}),sd="NavigationMenuContent",rJ=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=mo(sd,e.__scopeNavigationMenu),o=k2(sd,e.__scopeNavigationMenu),s=ct(o.contentRef,t),c=o.value===i.value,d={value:o.value,triggerRef:o.triggerRef,focusProxyRef:o.focusProxyRef,wasEscapeCloseRef:o.wasEscapeCloseRef,onContentFocusOutside:o.onContentFocusOutside,onRootContentClose:o.onRootContentClose,...r};return i.viewport?u.jsx(iJ,{forceMount:n,...d,ref:s}):u.jsx(Gn,{present:n||c,children:u.jsx(I2,{"data-state":j1(c),...d,ref:s,onPointerEnter:Re(e.onPointerEnter,i.onContentEnter),onPointerLeave:Re(e.onPointerLeave,Pv(i.onContentLeave)),style:{pointerEvents:!c&&i.isRootMenu?"none":void 0,...d.style}})})});rJ.displayName=sd;var iJ=x.forwardRef((e,t)=>{const n=mo(sd,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:i}=n;return qn(()=>{r(e.value,{ref:t,...e})},[e,t,r]),qn(()=>()=>i(e.value),[e.value,i]),null}),uv="navigationMenu.rootContentDismiss",I2=x.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:o,wasEscapeCloseRef:s,onRootContentClose:c,onContentFocusOutside:d,...f}=e,p=mo(sd,n),h=x.useRef(null),v=ct(h,t),y=O2(p.baseId,r),b=$2(p.baseId,r),S=x2(n),C=x.useRef(null),{onItemDismiss:E}=p;x.useEffect(()=>{const R=h.current;if(p.isRootMenu&&R){const I=()=>{E(),c(),R.contains(document.activeElement)&&i.current?.focus()};return R.addEventListener(uv,I),()=>R.removeEventListener(uv,I)}},[p.isRootMenu,e.value,i,E,c]);const k=x.useMemo(()=>{const I=S().map(K=>K.value);p.dir==="rtl"&&I.reverse();const A=I.indexOf(p.value),T=I.indexOf(p.previousValue),N=r===p.value,z=T===I.indexOf(r);if(!N&&!z)return C.current;const L=(()=>{if(A!==T){if(N&&T!==-1)return A>T?"from-end":"from-start";if(z&&A!==-1)return A>T?"to-start":"to-end"}return null})();return C.current=L,L},[p.previousValue,p.value,p.dir,S,r]);return u.jsx(N2,{asChild:!0,children:u.jsx(Nd,{id:b,"aria-labelledby":y,"data-motion":k,"data-orientation":p.orientation,...f,ref:v,disableOutsidePointerEvents:!1,onDismiss:()=>{const R=new Event(uv,{bubbles:!0,cancelable:!0});h.current?.dispatchEvent(R)},onFocusOutside:Re(e.onFocusOutside,R=>{d();const I=R.target;p.rootNavigationMenu?.contains(I)&&R.preventDefault()}),onPointerDownOutside:Re(e.onPointerDownOutside,R=>{const I=R.target,A=S().some(N=>N.ref.current?.contains(I)),T=p.isRootMenu&&p.viewport?.contains(I);(A||T||!p.isRootMenu)&&R.preventDefault()}),onKeyDown:Re(e.onKeyDown,R=>{const I=R.altKey||R.ctrlKey||R.metaKey;if(R.key==="Tab"&&!I){const T=U_(R.currentTarget),N=document.activeElement,z=T.findIndex(ee=>ee===N),K=R.shiftKey?T.slice(0,z).reverse():T.slice(z+1,T.length);R1(K)?R.preventDefault():o.current?.focus()}}),onEscapeKeyDown:Re(e.onEscapeKeyDown,R=>{s.current=!0})})})}),k1="NavigationMenuViewport",T2=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=!!mo(k1,e.__scopeNavigationMenu).value;return u.jsx(Gn,{present:n||o,children:u.jsx(oJ,{...r,ref:t})})});T2.displayName=k1;var oJ=x.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...i}=e,o=mo(k1,n),s=ct(t,o.onViewportChange),c=WQ(sd,e.__scopeNavigationMenu),[d,f]=x.useState(null),[p,h]=x.useState(null),v=d?d?.width+"px":void 0,y=d?d?.height+"px":void 0,b=!!o.value,S=b?o.value:o.previousValue;return F_(p,()=>{p&&f({width:p.offsetWidth,height:p.offsetHeight})}),u.jsx(Be.div,{"data-state":j1(b),"data-orientation":o.orientation,...i,ref:s,style:{pointerEvents:!b&&o.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":v,"--radix-navigation-menu-viewport-height":y,...i.style},onPointerEnter:Re(e.onPointerEnter,o.onContentEnter),onPointerLeave:Re(e.onPointerLeave,Pv(o.onContentLeave)),children:Array.from(c.items).map(([E,{ref:k,forceMount:R,...I}])=>{const A=S===E;return u.jsx(Gn,{present:R||A,children:u.jsx(I2,{...I,ref:hp(k,T=>{A&&T&&h(T)})})},E)})})}),aJ="FocusGroup",N2=x.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,i=mo(aJ,n);return u.jsx(M_.Provider,{scope:n,children:u.jsx(M_.Slot,{scope:n,children:u.jsx(Be.div,{dir:i.dir,...r,ref:t})})})}),sO=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],sJ="FocusGroupItem",A2=x.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,i=GQ(n),o=mo(sJ,n);return u.jsx(M_.ItemSlot,{scope:n,children:u.jsx(Be.button,{...r,ref:t,onKeyDown:Re(e.onKeyDown,s=>{if(["Home","End",...sO].includes(s.key)){let d=i().map(h=>h.ref.current);if([o.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&d.reverse(),sO.includes(s.key)){const h=d.indexOf(s.currentTarget);d=d.slice(h+1)}setTimeout(()=>R1(d)),s.preventDefault()}})})})});function U_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function R1(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function lJ(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function F_(e,t){const n=fn(t);qn(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}function j1(e){return e?"open":"closed"}function O2(e,t){return`${e}-trigger-${t}`}function $2(e,t){return`${e}-content-${t}`}function Pv(e){return t=>t.pointerType==="mouse"?e(t):void 0}var cJ=w2,uJ=C2,dJ=R2,fJ=j2,mJ=T2;function pJ({className:e,...t}){return u.jsx("div",{className:Le("absolute top-full left-0 isolate z-50 flex justify-center"),children:u.jsx(mJ,{"data-slot":"navigation-menu-viewport",className:Le("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",e),...t})})}function D2({className:e,children:t,viewport:n=!0,...r}){return u.jsxs(cJ,{"data-slot":"navigation-menu","data-viewport":n,className:Le("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,n&&u.jsx(pJ,{})]})}function V_({className:e,...t}){return u.jsx(dJ,{"data-slot":"navigation-menu-item",className:Le("relative",e),...t})}function B_({className:e,...t}){return u.jsx(fJ,{"data-slot":"navigation-menu-link",className:Le("hover:text-white ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 flex flex-col gap-1 rounded-sm p-2 text-sm transition-[color,box-shadow] focus-visible:ring-4 focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",e),...t})}function P2({className:e,...t}){return u.jsx(uJ,{"data-slot":"navigation-menu-list",className:Le("group flex flex-1 list-none items-center justify-center gap-1",e),...t})}const M2=Fy("inline-flex items-center justify-center rounded-md 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-auto",{variants:{variant:{default:"border-primary bg-primary/40 text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-secondary bg-secondary/40 text-secondary-foreground [a&]:hover:bg-secondary/90",warning:"border-yellow bg-yellow/40 text-white [a&]:hover:bg-yellow/90",success:"border-green bg-green/40 text-white [a&]:hover:bg-green/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"text-white [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function I1(){return u.jsx(u.Fragment,{children:u.jsxs("span",{className:Le(M2({variant:"default"}),"text-xs inline-block ml-2 align-text-top"),children:["v4.7.6"," BETA"]})})}function By(e,t,n){const{instanceId:r,clusterId:i}=tt({strict:!1});return Vl({id:Bn,operationsUrl:e,port:t,secure:n})}function Hy(e,t,n){const{instanceId:r,clusterId:i}=tt({strict:!1});return{instanceClient:Vl({id:Bn,operationsUrl:e,port:t,secure:n}),entityType:"instance"}}function xn(e,t,n){const r=tt({strict:!1});return z2({...r,operationsUrl:e,port:t,secure:n})}function z2({instanceId:e,clusterId:t,operationsUrl:n,port:r,secure:i}){const o=Bn;return{instanceClient:Vl({id:o,operationsUrl:n,port:r,secure:i}),entityId:o,entityType:"instance"}}function hJ(){localStorage.clear()}function gJ(){sessionStorage.clear()}async function vJ(){lr.setUserForEntity(Bn,null),$v.getQueryCache().clear(),hJ(),gJ(),await $v.invalidateQueries({refetchType:"none"})}async function yJ(e){await lr.signOutFromPotentiallyAuthenticatedInstances(),await mp(e)}function bJ(){const e=By();return vt({mutationFn:()=>yJ({instanceClient:e}),onSuccess:vJ})}function qy(e){const{user:t}=mc(),{organizationId:n}=tt({strict:!1}),r=t?.roles?.[e??n];return!r?.permission&&!r?.organization?{update:!1,remove:!1}:r.permission?.super_user?{update:!0,remove:!0}:{update:r.organization.update,remove:r.organization.delete}}function Ad(e){const{user:t}=mc(),{organizationId:n}=tt({strict:!1}),r=t?.roles?.[e??n];if(!r?.permission&&!r?.organization?.roles)return{create:!1,remove:!1,update:!1,view:!1};if(r.permission?.super_user)return{create:!0,remove:!0,update:!0,view:!0};const i=r.organization.roles;return{create:i.create,remove:i.delete,update:i.update,view:i.view}}function Gy(e,t){const{user:n}=mc(),{organizationId:r,clusterId:i}=tt({strict:!1}),o=t??i,s=n?.roles?.[e??r];if(!s?.permission&&!s?.organization?.clusters)return{create:!1,remove:!1,update:!1,view:!1};if(s.permission?.super_user)return{create:!0,remove:!0,update:!0,view:!0};const c=s.organization.clusters.resources?.find(f=>f.id===o),d=s.organization.clusters;return{create:d.create,remove:c?c.delete:d.delete,update:c?c.update:d.update,view:c?c.view:d.view}}function xJ(e){const{clusterId:t,instanceId:n}=tt({strict:!1}),{user:r}=Xa(),i=r?.role?.permission;return i?i.super_user===!0:!1}function Od(e){const{clusterId:t,instanceId:n}=tt({strict:!1}),{user:r}=Xa(),i=r?.role?.permission;return i?i.super_user===!0||i.structure_user===!0:!1}function qw(e,t,n,r){const{clusterId:i,instanceId:o}=tt({strict:!1}),{user:s}=Xa(),c=s?.role?.permission;return c?c.super_user===!0||c.structure_user===!0?!0:c[t]?.tables?.[n][r]===!0:!1}function sa(e){return!!e}const T1={className:"text-white"};function L2(){const{mutate:e}=bJ(),t=bn(),{user:n}=fc(),r=mn(),{organizationId:i}=tt({strict:!1}),{update:o}=qy(i),{view:s}=Ad(i),c=o,d=x.useCallback(()=>{e(void 0,{onSuccess:async()=>{Ee.success("Success",{description:"You have been signed out successfully.",action:{label:"Dismiss",onClick:()=>Ee.dismiss()}}),t({to:"/sign-in"}),r.invalidate()}})},[e,r,t]),f=x.useMemo(()=>[!Fu,!Fu,!Fu,{to:"https://docs.harperdb.io/docs",target:"_blank",icon:u.jsx(JM,{}),text:"Docs",textBreakpoint:"md"},{onClick:d,icon:u.jsx(fX,{}),text:"Sign Out",textBreakpoint:"md"}].filter(sa),[i,c,s,d]);return n?u.jsxs(u.Fragment,{children:[u.jsx(_J,{menuItems:f}),u.jsx(SJ,{menuItems:f})]}):u.jsx(wJ,{})}function U2(e){return e.items!==void 0}function wJ(){return u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("div",{className:"inline-block",children:u.jsxs(We,{to:"/sign-in",children:[u.jsx(N1,{}),u.jsx(I1,{})]})}),u.jsx(D2,{children:u.jsxs(P2,{className:"text-grey-400",children:[u.jsx(V_,{children:u.jsx(B_,{asChild:!0,children:u.jsxs(We,{to:"https://docs.harperdb.io/docs",target:"_blank",rel:"noreferrer noopener",className:"flex-row items-center",children:[u.jsx(JM,{})," ",u.jsx("span",{className:"hidden md:inline-block",children:"Docs"})]})})}),u.jsx(V_,{children:u.jsx(B_,{asChild:!0,children:u.jsxs(We,{to:"/sign-in",className:"flex-row items-center",activeProps:T1,children:[u.jsx(uX,{})," Sign In"]})})})]})})]})}function SJ({menuItems:e}){const{user:t}=fc();return Td(t),u.jsx("div",{className:"hidden md:block",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("div",{className:"inline-block",children:u.jsxs(We,{to:Js,children:[u.jsx(N1,{}),u.jsx(I1,{})]})}),u.jsx(D2,{children:u.jsx(P2,{className:"text-grey-400",children:e.map(n=>U2(n)?!!n.items.length&&u.jsx("div",{className:"bg-black rounded-2xl flex",children:n.items.map(r=>u.jsx(lO,{menuItem:r},r.text))},n.text):u.jsx(lO,{menuItem:n},n.text))})})]})})}function lO({menuItem:e}){return u.jsx(V_,{className:"text-gray-400 hover:text-white",children:u.jsx(B_,{asChild:!0,children:u.jsxs(We,{to:e.to,onClick:e.onClick,className:"flex-row items-center",activeProps:e.to?T1:void 0,children:[e.icon,u.jsx("span",{className:`hidden ${e.textBreakpoint}:inline-block`,children:e.text}),u.jsx("span",{className:`${e.textBreakpoint}:hidden`,children:" "})]})})})}function _J({menuItems:e}){const{user:t}=fc();Td(t);const[n,r]=x.useState(!1),i=x.useCallback(()=>r(s=>!s),[]),o=x.useCallback(()=>r(!1),[]);return u.jsxs("div",{className:"md:hidden",id:"mobile-menu",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs(We,{to:Js,children:[u.jsx(N1,{}),u.jsx(I1,{})]}),u.jsxs("button",{type:"button",className:"shadow-xs text-grey-400 hover:text-white hover:bg-black-dark",onClick:i,children:[u.jsx("span",{className:"sr-only",children:n?"Close menu":"Open menu"}),n?u.jsx(p2,{}):u.jsx(l2,{})]})]}),u.jsx("div",{className:`${n?"fixed":"hidden"} top-40 bottom-0 left-0 right-0 bg-black-dark opacity-70`,onClick:o}),u.jsx("div",{className:`${n?"block":"hidden"} md:hidden z-50 space-y-1 pb-3 bg-black-dark absolute left-0 top-full w-full rounded-b-md`,children:e.map(s=>U2(s)?!!s.items.length&&u.jsx("div",{className:"bg-black pl-10 pr-2 py-2",children:s.items.map(c=>u.jsx(cO,{menuItem:c,onClick:o},c.text))},s.text):u.jsx(cO,{menuItem:s,onClick:o},s.text))})]})}function cO({menuItem:e,onClick:t}){const n=x.useCallback(()=>{e.onClick?.(),t()},[e,t]);return u.jsxs(We,{to:e.to,onClick:n,className:"flex flex-row px-3 py-2 text-base font-medium rounded-md text-gray-400 hover:text-white",activeProps:e.to?T1:void 0,children:[e.icon,u.jsx("span",{className:"ml-4",children:e.text})]})}function N1(){return u.jsxs(u.Fragment,{children:[u.jsx("img",{src:"/harper-studio_white.png",alt:"Harper Studio",className:"w-64 hidden md:inline-block"}),u.jsx("img",{src:"/HDBDogOnly.svg",width:"50px",height:"44px",alt:"Harper",className:"inline-block md:hidden"})]})}function Qf({title:e,children:t}){return u.jsxs("li",{className:"list-image-(--checkmark-icon) mt-4",children:[u.jsx("h3",{className:"text-xl font-bold",children:e}),t]})}function CJ(){return u.jsxs(u.Fragment,{children:[u.jsx("header",{className:"fixed top-0 z-40 w-full h-20 p-4 bg-black-dark dark:bg-black-dark dark:border-b dark:border-black md:px-12",children:u.jsx(L2,{})}),u.jsxs("div",{className:"pt-20 grid h-screen grid-cols-1 md:grid-cols-2",children:[u.jsx("section",{className:"items-center justify-center hidden text-white md:flex bg-linear-(--blue-pink-gradient) px-6",children:u.jsxs("div",{children:[u.jsx("h1",{className:"text-4xl font-bold",children:"Harper Fabric"}),u.jsxs("ul",{className:"ps-5",children:[u.jsx(Qf,{title:"Free Tier",children:u.jsx("span",{children:"Try us out, no credit card required!"})}),u.jsx(Qf,{title:"Global Deployments Managed as One",children:u.jsx("span",{children:"Coordinate global environments as if they were a single node."})}),u.jsx(Qf,{title:"Database, App, Cache, & Messaging",children:u.jsx("span",{children:"Bring your stack together for reliable, ultra-fast performance."})}),u.jsx(Qf,{title:"NoSQL, Vector, & Blob",children:u.jsx("span",{children:"Store and serve modern data types with low latency, semantic search ability, and global reach."})}),u.jsx(Qf,{title:"Simplified Operations",children:u.jsx("span",{children:"Focus on what differentiates your app; leave infrastructure to us."})})]}),u.jsx("span",{className:"opacity-5",children:"Bravo!"})]})}),u.jsx("section",{className:"flex items-center justify-center px-6 bg-linear-(--purple-gradient) dark:bg-linear-(--black-dark-gradient)",children:u.jsx(el,{})})]})]})}const Jf=new Map;function Ma(e){if(!e)return"";if(Jf.has(e))return Jf.get(e);const t=e.replace(/[-_]+/g," ").replace(/\s+/g," ").trim();if(!t)return Jf.set(e,""),"";const n=t.match(/([A-Z]+(?=[A-Z][a-z])|[A-Z]?[a-z]+|[A-Z]+|[0-9]+)/g);if(!n)return Jf.set(e,""),"";const r=[];for(let s=0;s<n.length;s++){const c=n[s],d=s+1<n.length?n[s+1]:void 0;/^[A-Z]{2,}$/.test(c)&&d&&/[A-Z]*s$/.test(d)||/^[A-Z]$/.test(c)&&d!==void 0&&/^[A-Z]s$/.test(d)?(r.push(c+d),s++):r.push(c)}const o=r.map(EJ).join(" ");return Jf.set(e,o),o}function EJ(e){return/^[A-Z]{2,3}s?$/.test(e)||/^[0-9]+$/.test(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function Ky(){const e=dY(),{organization:t,instance:n,cluster:r}=Uy({strict:!1}),i=x.useMemo(()=>{const o=e.pathname.split("/").filter(c=>c&&c.length>0),s=[u.jsxs(We,{to:"/",children:[u.jsx(rX,{"aria-hidden":"true",className:"size-5 shrink-0"}),u.jsx("span",{className:"sr-only",children:"Home"})]})];for(let c=0;c<o.length;c++){const d=o[c];if(d==="instance")continue;let f=`/${o.slice(0,c+1).join("/")}`,p=Ma(d),h;d==="databases"&&o.length===c+3?(p=o[c+2],c+=2):p.startsWith("Org ")?p=t?.name||"Org":p.startsWith("Clu ")?(p=r?.name||"Cluster",o[c+1]==="instance"&&(f+="/instances")):p.startsWith("Ins ")?p=n?.name?.split(".")?.shift()||"Instance":p==="Apis"&&(p="APIs"),s.push(u.jsx("svg",{fill:"currentColor",viewBox:"0 0 20 20","aria-hidden":"true",className:"size-5 shrink-0 text-grey",children:u.jsx("path",{d:"M5.555 17.776l8-16 .894.448-8 16-.894-.448z"})}),u.jsxs(We,{to:f,className:"text-xs md:text-sm font-medium hover:text-grey truncate max-w-48",children:[p,h]}))}return s},[e.pathname,r?.name,n?.name,t?.name]);return u.jsxs("div",{role:"list",className:"flex items-center space-x-0 lg:space-x-2 xl:space-x-4 sm:max-w-9/10 max-w-[calc(100%-56px)]",children:[...i]})}var vp=e=>e.type==="checkbox",Pl=e=>e instanceof Date,si=e=>e==null;const F2=e=>typeof e=="object";var Hn=e=>!si(e)&&!Array.isArray(e)&&F2(e)&&!Pl(e),V2=e=>Hn(e)&&e.target?vp(e.target)?e.target.checked:e.target.value:e,kJ=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,B2=(e,t)=>e.has(kJ(t)),RJ=e=>{const t=e.constructor&&e.constructor.prototype;return Hn(t)&&t.hasOwnProperty("isPrototypeOf")},A1=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function on(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(A1&&(e instanceof Blob||r))&&(n||Hn(e)))if(t=n?[]:Object.create(Object.getPrototypeOf(e)),!n&&!RJ(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=on(e[i]));else return e;return t}var Zy=e=>/^\w*$/.test(e),Qt=e=>e===void 0,Yy=e=>Array.isArray(e)?e.filter(Boolean):[],O1=e=>Yy(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Te=(e,t,n)=>{if(!t||!Hn(e))return n;const r=(Zy(t)?[t]:O1(t)).reduce((i,o)=>si(i)?i:i[o],e);return Qt(r)||r===e?Qt(e[t])?n:e[t]:r},_i=e=>typeof e=="boolean",Pt=(e,t,n)=>{let r=-1;const i=Zy(t)?[t]:O1(t),o=i.length,s=o-1;for(;++r<o;){const c=i[r];let d=n;if(r!==s){const f=e[c];d=Hn(f)||Array.isArray(f)?f:isNaN(+i[r+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=d,e=e[c]}};const Mv={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},to={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Na={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},$1=X.createContext(null);$1.displayName="HookFormContext";const yp=()=>X.useContext($1),jJ=e=>{const{children:t,...n}=e;return X.createElement($1.Provider,{value:n},t)};var H2=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==to.all&&(t._proxyFormState[s]=!r||to.all),n&&(n[s]=!0),e[s]}});return i};const Wy=typeof window<"u"?X.useLayoutEffect:X.useEffect;function D1(e){const t=yp(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[s,c]=X.useState(n._formState),d=X.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Wy(()=>n._subscribe({name:i,formState:d.current,exact:o,callback:f=>{!r&&c({...n._formState,...f})}}),[i,r,o]),X.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),X.useMemo(()=>H2(s,n,d.current,!1),[s,n])}var ki=e=>typeof e=="string",q2=(e,t,n,r,i)=>ki(e)?(r&&t.watch.add(e),Te(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Te(n,o))):(r&&(t.watchAll=!0),n),H_=e=>si(e)||!F2(e);function $a(e,t,n=new WeakSet){if(H_(e)||H_(t))return e===t;if(Pl(e)&&Pl(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const o of r){const s=e[o];if(!i.includes(o))return!1;if(o!=="ref"){const c=t[o];if(Pl(s)&&Pl(c)||Hn(s)&&Hn(c)||Array.isArray(s)&&Array.isArray(c)?!$a(s,c,n):s!==c)return!1}}return!0}function IJ(e){const t=yp(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:s,compute:c}=e||{},d=X.useRef(i),f=X.useRef(c),p=X.useRef(void 0);f.current=c;const h=X.useMemo(()=>n._getWatch(r,d.current),[n,r]),[v,y]=X.useState(f.current?f.current(h):h);return Wy(()=>n._subscribe({name:r,formState:{values:!0},exact:s,callback:b=>{if(!o){const S=q2(r,n._names,b.values||n._formValues,!1,d.current);if(f.current){const C=f.current(S);$a(C,p.current)||(y(C),p.current=C)}else y(S)}}}),[n,o,r,s]),X.useEffect(()=>n._removeUnmounted()),v}function TJ(e){const t=yp(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o,defaultValue:s}=e,c=B2(i._names.array,n),d=X.useMemo(()=>Te(i._formValues,n,Te(i._defaultValues,n,s)),[i,n,s]),f=IJ({control:i,name:n,defaultValue:d,exact:!0}),p=D1({control:i,name:n,exact:!0}),h=X.useRef(e),v=X.useRef(void 0),y=X.useRef(i.register(n,{...e.rules,value:f,..._i(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const b=X.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Te(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Te(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Te(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Te(p.validatingFields,n)},error:{enumerable:!0,get:()=>Te(p.errors,n)}}),[p,n]),S=X.useCallback(R=>y.current.onChange({target:{value:V2(R),name:n},type:Mv.CHANGE}),[n]),C=X.useCallback(()=>y.current.onBlur({target:{value:Te(i._formValues,n),name:n},type:Mv.BLUR}),[n,i._formValues]),E=X.useCallback(R=>{const I=Te(i._fields,n);I&&R&&(I._f.ref={focus:()=>R.focus&&R.focus(),select:()=>R.select&&R.select(),setCustomValidity:A=>R.setCustomValidity(A),reportValidity:()=>R.reportValidity()})},[i._fields,n]),k=X.useMemo(()=>({name:n,value:f,..._i(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:S,onBlur:C,ref:E}),[n,r,p.disabled,S,C,E,f]);return X.useEffect(()=>{const R=i._options.shouldUnregister||o,I=v.current;I&&I!==n&&!c&&i.unregister(I),i.register(n,{...h.current.rules,..._i(h.current.disabled)?{disabled:h.current.disabled}:{}});const A=(T,N)=>{const z=Te(i._fields,T);z&&z._f&&(z._f.mount=N)};if(A(n,!0),R){const T=on(Te(i._options.defaultValues,n,h.current.defaultValue));Pt(i._defaultValues,n,T),Qt(Te(i._formValues,n))&&Pt(i._formValues,n,T)}return!c&&i.register(n),v.current=n,()=>{(c?R&&!i._state.action:R)?i.unregister(n):A(n,!1)}},[n,i,c,o]),X.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),X.useMemo(()=>({field:k,formState:p,fieldState:b}),[k,p,b])}const NJ=e=>e.render(TJ(e));var P1=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},ci=e=>Array.isArray(e)?e:[e],uO=()=>{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}};function G2(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],o=t[r];if(i&&Hn(i)&&o){const s=G2(i,o);Hn(s)&&(n[r]=s)}else e[r]&&(n[r]=o)}return n}var $r=e=>Hn(e)&&!Object.keys(e).length,M1=e=>e.type==="file",_o=e=>typeof e=="function",zv=e=>{if(!A1)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},K2=e=>e.type==="select-multiple",z1=e=>e.type==="radio",AJ=e=>z1(e)||vp(e),Gw=e=>zv(e)&&e.isConnected;function OJ(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Qt(e)?r++:e[t[r++]];return e}function $J(e){for(const t in e)if(e.hasOwnProperty(t)&&!Qt(e[t]))return!1;return!0}function On(e,t){const n=Array.isArray(t)?t:Zy(t)?[t]:O1(t),r=n.length===1?e:OJ(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(Hn(r)&&$r(r)||Array.isArray(r)&&$J(r))&&On(e,n.slice(0,-1)),e}var DJ=e=>{for(const t in e)if(_o(e[t]))return!0;return!1};function Z2(e){return Array.isArray(e)||Hn(e)&&!DJ(e)}function q_(e,t={}){for(const n in e)Z2(e[n])?(t[n]=Array.isArray(e[n])?[]:{},q_(e[n],t[n])):Qt(e[n])||(t[n]=!0);return t}function Au(e,t,n){n||(n=q_(t));for(const r in e)Z2(e[r])?Qt(t)||H_(n[r])?n[r]=q_(e[r],Array.isArray(e[r])?[]:{}):Au(e[r],si(t)?{}:t[r],n[r]):n[r]=!$a(e[r],t[r]);return n}const dO={value:!1,isValid:!1},fO={value:!0,isValid:!0};var Y2=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Qt(e[0].attributes.value)?Qt(e[0].value)||e[0].value===""?fO:{value:e[0].value,isValid:!0}:fO:dO}return dO},W2=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Qt(e)?e:t?e===""?NaN:e&&+e:n&&ki(e)?new Date(e):r?r(e):e;const mO={isValid:!1,value:null};var X2=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,mO):mO;function pO(e){const t=e.ref;return M1(t)?t.files:z1(t)?X2(e.refs).value:K2(t)?[...t.selectedOptions].map(({value:n})=>n):vp(t)?Y2(e.refs).value:W2(Qt(t.value)?e.ref.value:t.value,e)}var PJ=(e,t,n,r)=>{const i={};for(const o of e){const s=Te(t,o);s&&Pt(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Lv=e=>e instanceof RegExp,em=e=>Qt(e)?e:Lv(e)?e.source:Hn(e)?Lv(e.value)?e.value.source:e.value:e,Du=e=>({isOnSubmit:!e||e===to.onSubmit,isOnBlur:e===to.onBlur,isOnChange:e===to.onChange,isOnAll:e===to.all,isOnTouch:e===to.onTouched});const hO="AsyncFunction";var MJ=e=>!!e&&!!e.validate&&!!(_o(e.validate)&&e.validate.constructor.name===hO||Hn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===hO)),zJ=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),G_=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Hu=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Te(e,i);if(o){const{_f:s,...c}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)return!0;if(s.ref&&t(s.ref,s.name)&&!r)return!0;if(Hu(c,t))break}else if(Hn(c)&&Hu(c,t))break}}};function gO(e,t,n){const r=Te(e,n);if(r||Zy(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=Te(t,o),c=Te(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(c&&c.type)return{name:o,error:c};if(c&&c.root&&c.root.type)return{name:`${o}.root`,error:c.root};i.pop()}return{name:n}}var LJ=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return $r(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||to.all))},UJ=(e,t,n)=>!e||!t||e===t||ci(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),FJ=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,VJ=(e,t)=>!Yy(Te(e,t)).length&&On(e,t),Q2=(e,t,n)=>{const r=ci(Te(e,n));return Pt(r,"root",t[n]),Pt(e,n,r),e};function vO(e,t,n="validate"){if(ki(e)||Array.isArray(e)&&e.every(ki)||_i(e)&&!e)return{type:n,message:ki(e)?e:"",ref:t}}var xu=e=>Hn(e)&&!Lv(e)?e:{value:e,message:""},K_=async(e,t,n,r,i,o)=>{const{ref:s,refs:c,required:d,maxLength:f,minLength:p,min:h,max:v,pattern:y,validate:b,name:S,valueAsNumber:C,mount:E}=e._f,k=Te(n,S);if(!E||t.has(S))return{};const R=c?c[0]:s,I=Z=>{i&&R.reportValidity&&(R.setCustomValidity(_i(Z)?"":Z||""),R.reportValidity())},A={},T=z1(s),N=vp(s),z=T||N,L=(C||M1(s))&&Qt(s.value)&&Qt(k)||zv(s)&&s.value===""||k===""||Array.isArray(k)&&!k.length,K=P1.bind(null,S,r,A),ee=(Z,Y,B,W=Na.maxLength,P=Na.minLength)=>{const G=Z?Y:B;A[S]={type:Z?W:P,message:G,ref:s,...K(Z?W:P,G)}};if(o?!Array.isArray(k)||!k.length:d&&(!z&&(L||si(k))||_i(k)&&!k||N&&!Y2(c).isValid||T&&!X2(c).isValid)){const{value:Z,message:Y}=ki(d)?{value:!!d,message:d}:xu(d);if(Z&&(A[S]={type:Na.required,message:Y,ref:R,...K(Na.required,Y)},!r))return I(Y),A}if(!L&&(!si(h)||!si(v))){let Z,Y;const B=xu(v),W=xu(h);if(!si(k)&&!isNaN(k)){const P=s.valueAsNumber||k&&+k;si(B.value)||(Z=P>B.value),si(W.value)||(Y=P<W.value)}else{const P=s.valueAsDate||new Date(k),G=$=>new Date(new Date().toDateString()+" "+$),U=s.type=="time",te=s.type=="week";ki(B.value)&&k&&(Z=U?G(k)>G(B.value):te?k>B.value:P>new Date(B.value)),ki(W.value)&&k&&(Y=U?G(k)<G(W.value):te?k<W.value:P<new Date(W.value))}if((Z||Y)&&(ee(!!Z,B.message,W.message,Na.max,Na.min),!r))return I(A[S].message),A}if((f||p)&&!L&&(ki(k)||o&&Array.isArray(k))){const Z=xu(f),Y=xu(p),B=!si(Z.value)&&k.length>+Z.value,W=!si(Y.value)&&k.length<+Y.value;if((B||W)&&(ee(B,Z.message,Y.message),!r))return I(A[S].message),A}if(y&&!L&&ki(k)){const{value:Z,message:Y}=xu(y);if(Lv(Z)&&!k.match(Z)&&(A[S]={type:Na.pattern,message:Y,ref:s,...K(Na.pattern,Y)},!r))return I(Y),A}if(b){if(_o(b)){const Z=await b(k,n),Y=vO(Z,R);if(Y&&(A[S]={...Y,...K(Na.validate,Y.message)},!r))return I(Y.message),A}else if(Hn(b)){let Z={};for(const Y in b){if(!$r(Z)&&!r)break;const B=vO(await b[Y](k,n),R,Y);B&&(Z={...B,...K(Y,B.message)},I(B.message),r&&(A[S]=Z))}if(!$r(Z)&&(A[S]={ref:R,...Z},!r))return A}}return I(!0),A};const BJ={mode:to.onSubmit,reValidateMode:to.onChange,shouldFocusError:!0};function HJ(e={}){let t={...BJ,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:_o(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Hn(t.defaultValues)||Hn(t.values)?on(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:on(i),s={action:!1,mount:!1,watch:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...p};const v={array:uO(),state:uO()},y=t.criteriaMode===to.all,b=q=>ae=>{clearTimeout(f),f=setTimeout(q,ae)},S=async q=>{if(!t.disabled&&(p.isValid||h.isValid||q)){const ae=t.resolver?$r((await N()).errors):await L(r,!0);ae!==n.isValid&&v.state.next({isValid:ae})}},C=(q,ae)=>{!t.disabled&&(p.isValidating||p.validatingFields||h.isValidating||h.validatingFields)&&((q||Array.from(c.mount)).forEach(ue=>{ue&&(ae?Pt(n.validatingFields,ue,ae):On(n.validatingFields,ue))}),v.state.next({validatingFields:n.validatingFields,isValidating:!$r(n.validatingFields)}))},E=(q,ae=[],ue,xe,ve=!0,Se=!0)=>{if(xe&&ue&&!t.disabled){if(s.action=!0,Se&&Array.isArray(Te(r,q))){const ne=ue(Te(r,q),xe.argA,xe.argB);ve&&Pt(r,q,ne)}if(Se&&Array.isArray(Te(n.errors,q))){const ne=ue(Te(n.errors,q),xe.argA,xe.argB);ve&&Pt(n.errors,q,ne),VJ(n.errors,q)}if((p.touchedFields||h.touchedFields)&&Se&&Array.isArray(Te(n.touchedFields,q))){const ne=ue(Te(n.touchedFields,q),xe.argA,xe.argB);ve&&Pt(n.touchedFields,q,ne)}(p.dirtyFields||h.dirtyFields)&&(n.dirtyFields=Au(i,o)),v.state.next({name:q,isDirty:ee(q,ae),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Pt(o,q,ae)},k=(q,ae)=>{Pt(n.errors,q,ae),v.state.next({errors:n.errors})},R=q=>{n.errors=q,v.state.next({errors:n.errors,isValid:!1})},I=(q,ae,ue,xe)=>{const ve=Te(r,q);if(ve){const Se=Te(o,q,Qt(ue)?Te(i,q):ue);Qt(Se)||xe&&xe.defaultChecked||ae?Pt(o,q,ae?Se:pO(ve._f)):B(q,Se),s.mount&&S()}},A=(q,ae,ue,xe,ve)=>{let Se=!1,ne=!1;const ye={name:q};if(!t.disabled){if(!ue||xe){(p.isDirty||h.isDirty)&&(ne=n.isDirty,n.isDirty=ye.isDirty=ee(),Se=ne!==ye.isDirty);const Ne=$a(Te(i,q),ae);ne=!!Te(n.dirtyFields,q),Ne?On(n.dirtyFields,q):Pt(n.dirtyFields,q,!0),ye.dirtyFields=n.dirtyFields,Se=Se||(p.dirtyFields||h.dirtyFields)&&ne!==!Ne}if(ue){const Ne=Te(n.touchedFields,q);Ne||(Pt(n.touchedFields,q,ue),ye.touchedFields=n.touchedFields,Se=Se||(p.touchedFields||h.touchedFields)&&Ne!==ue)}Se&&ve&&v.state.next(ye)}return Se?ye:{}},T=(q,ae,ue,xe)=>{const ve=Te(n.errors,q),Se=(p.isValid||h.isValid)&&_i(ae)&&n.isValid!==ae;if(t.delayError&&ue?(d=b(()=>k(q,ue)),d(t.delayError)):(clearTimeout(f),d=null,ue?Pt(n.errors,q,ue):On(n.errors,q)),(ue?!$a(ve,ue):ve)||!$r(xe)||Se){const ne={...xe,...Se&&_i(ae)?{isValid:ae}:{},errors:n.errors,name:q};n={...n,...ne},v.state.next(ne)}},N=async q=>{C(q,!0);const ae=await t.resolver(o,t.context,PJ(q||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return C(q),ae},z=async q=>{const{errors:ae}=await N(q);if(q)for(const ue of q){const xe=Te(ae,ue);xe?Pt(n.errors,ue,xe):On(n.errors,ue)}else n.errors=ae;return ae},L=async(q,ae,ue={valid:!0})=>{for(const xe in q){const ve=q[xe];if(ve){const{_f:Se,...ne}=ve;if(Se){const ye=c.array.has(Se.name),Ne=ve._f&&MJ(ve._f);Ne&&p.validatingFields&&C([Se.name],!0);const Ke=await K_(ve,c.disabled,o,y,t.shouldUseNativeValidation&&!ae,ye);if(Ne&&p.validatingFields&&C([Se.name]),Ke[Se.name]&&(ue.valid=!1,ae))break;!ae&&(Te(Ke,Se.name)?ye?Q2(n.errors,Ke,Se.name):Pt(n.errors,Se.name,Ke[Se.name]):On(n.errors,Se.name))}!$r(ne)&&await L(ne,ae,ue)}}return ue.valid},K=()=>{for(const q of c.unMount){const ae=Te(r,q);ae&&(ae._f.refs?ae._f.refs.every(ue=>!Gw(ue)):!Gw(ae._f.ref))&&V(q)}c.unMount=new Set},ee=(q,ae)=>!t.disabled&&(q&&ae&&Pt(o,q,ae),!$a($(),i)),Z=(q,ae,ue)=>q2(q,c,{...s.mount?o:Qt(ae)?i:ki(q)?{[q]:ae}:ae},ue,ae),Y=q=>Yy(Te(s.mount?o:i,q,t.shouldUnregister?Te(i,q,[]):[])),B=(q,ae,ue={})=>{const xe=Te(r,q);let ve=ae;if(xe){const Se=xe._f;Se&&(!Se.disabled&&Pt(o,q,W2(ae,Se)),ve=zv(Se.ref)&&si(ae)?"":ae,K2(Se.ref)?[...Se.ref.options].forEach(ne=>ne.selected=ve.includes(ne.value)):Se.refs?vp(Se.ref)?Se.refs.forEach(ne=>{(!ne.defaultChecked||!ne.disabled)&&(Array.isArray(ve)?ne.checked=!!ve.find(ye=>ye===ne.value):ne.checked=ve===ne.value||!!ve)}):Se.refs.forEach(ne=>ne.checked=ne.value===ve):M1(Se.ref)?Se.ref.value="":(Se.ref.value=ve,Se.ref.type||v.state.next({name:q,values:on(o)})))}(ue.shouldDirty||ue.shouldTouch)&&A(q,ve,ue.shouldTouch,ue.shouldDirty,!0),ue.shouldValidate&&te(q)},W=(q,ae,ue)=>{for(const xe in ae){if(!ae.hasOwnProperty(xe))return;const ve=ae[xe],Se=q+"."+xe,ne=Te(r,Se);(c.array.has(q)||Hn(ve)||ne&&!ne._f)&&!Pl(ve)?W(Se,ve,ue):B(Se,ve,ue)}},P=(q,ae,ue={})=>{const xe=Te(r,q),ve=c.array.has(q),Se=on(ae);Pt(o,q,Se),ve?(v.array.next({name:q,values:on(o)}),(p.isDirty||p.dirtyFields||h.isDirty||h.dirtyFields)&&ue.shouldDirty&&v.state.next({name:q,dirtyFields:Au(i,o),isDirty:ee(q,Se)})):xe&&!xe._f&&!si(Se)?W(q,Se,ue):B(q,Se,ue),G_(q,c)&&v.state.next({...n,name:q}),v.state.next({name:s.mount?q:void 0,values:on(o)})},G=async q=>{s.mount=!0;const ae=q.target;let ue=ae.name,xe=!0;const ve=Te(r,ue),Se=Ne=>{xe=Number.isNaN(Ne)||Pl(Ne)&&isNaN(Ne.getTime())||$a(Ne,Te(o,ue,Ne))},ne=Du(t.mode),ye=Du(t.reValidateMode);if(ve){let Ne,Ke;const ot=ae.type?pO(ve._f):V2(q),Kt=q.type===Mv.BLUR||q.type===Mv.FOCUS_OUT,Mn=!zJ(ve._f)&&!t.resolver&&!Te(n.errors,ue)&&!ve._f.deps||FJ(Kt,Te(n.touchedFields,ue),n.isSubmitted,ye,ne),cn=G_(ue,c,Kt);Pt(o,ue,ot),Kt?(!ae||!ae.readOnly)&&(ve._f.onBlur&&ve._f.onBlur(q),d&&d(0)):ve._f.onChange&&ve._f.onChange(q);const Bt=A(ue,ot,Kt),In=!$r(Bt)||cn;if(!Kt&&v.state.next({name:ue,type:q.type,values:on(o)}),Mn)return(p.isValid||h.isValid)&&(t.mode==="onBlur"?Kt&&S():Kt||S()),In&&v.state.next({name:ue,...cn?{}:Bt});if(!Kt&&cn&&v.state.next({...n}),t.resolver){const{errors:It}=await N([ue]);if(Se(ot),xe){const Kr=gO(n.errors,r,ue),bt=gO(It,r,Kr.name||ue);Ne=bt.error,ue=bt.name,Ke=$r(It)}}else C([ue],!0),Ne=(await K_(ve,c.disabled,o,y,t.shouldUseNativeValidation))[ue],C([ue]),Se(ot),xe&&(Ne?Ke=!1:(p.isValid||h.isValid)&&(Ke=await L(r,!0)));xe&&(ve._f.deps&&(!Array.isArray(ve._f.deps)||ve._f.deps.length>0)&&te(ve._f.deps),T(ue,Ke,Ne,Bt))}},U=(q,ae)=>{if(Te(n.errors,ae)&&q.focus)return q.focus(),1},te=async(q,ae={})=>{let ue,xe;const ve=ci(q);if(t.resolver){const Se=await z(Qt(q)?q:ve);ue=$r(Se),xe=q?!ve.some(ne=>Te(Se,ne)):ue}else q?(xe=(await Promise.all(ve.map(async Se=>{const ne=Te(r,Se);return await L(ne&&ne._f?{[Se]:ne}:ne)}))).every(Boolean),!(!xe&&!n.isValid)&&S()):xe=ue=await L(r);return v.state.next({...!ki(q)||(p.isValid||h.isValid)&&ue!==n.isValid?{}:{name:q},...t.resolver||!q?{isValid:ue}:{},errors:n.errors}),ae.shouldFocus&&!xe&&Hu(r,U,q?ve:c.mount),xe},$=(q,ae)=>{let ue={...s.mount?o:i};return ae&&(ue=G2(ae.dirtyFields?n.dirtyFields:n.touchedFields,ue)),Qt(q)?ue:ki(q)?Te(ue,q):q.map(xe=>Te(ue,xe))},M=(q,ae)=>({invalid:!!Te((ae||n).errors,q),isDirty:!!Te((ae||n).dirtyFields,q),error:Te((ae||n).errors,q),isValidating:!!Te(n.validatingFields,q),isTouched:!!Te((ae||n).touchedFields,q)}),F=q=>{q&&ci(q).forEach(ae=>On(n.errors,ae)),v.state.next({errors:q?n.errors:{}})},O=(q,ae,ue)=>{const xe=(Te(r,q,{_f:{}})._f||{}).ref,ve=Te(n.errors,q)||{},{ref:Se,message:ne,type:ye,...Ne}=ve;Pt(n.errors,q,{...Ne,...ae,ref:xe}),v.state.next({name:q,errors:n.errors,isValid:!1}),ue&&ue.shouldFocus&&xe&&xe.focus&&xe.focus()},J=(q,ae)=>_o(q)?v.state.subscribe({next:ue=>"values"in ue&&q(Z(void 0,ae),ue)}):Z(q,ae,!0),de=q=>v.state.subscribe({next:ae=>{UJ(q.name,ae.name,q.exact)&&LJ(ae,q.formState||p,Pn,q.reRenderRoot)&&q.callback({values:{...o},...n,...ae,defaultValues:i})}}).unsubscribe,pe=q=>(s.mount=!0,h={...h,...q.formState},de({...q,formState:h})),V=(q,ae={})=>{for(const ue of q?ci(q):c.mount)c.mount.delete(ue),c.array.delete(ue),ae.keepValue||(On(r,ue),On(o,ue)),!ae.keepError&&On(n.errors,ue),!ae.keepDirty&&On(n.dirtyFields,ue),!ae.keepTouched&&On(n.touchedFields,ue),!ae.keepIsValidating&&On(n.validatingFields,ue),!t.shouldUnregister&&!ae.keepDefaultValue&&On(i,ue);v.state.next({values:on(o)}),v.state.next({...n,...ae.keepDirty?{isDirty:ee()}:{}}),!ae.keepIsValid&&S()},ie=({disabled:q,name:ae})=>{(_i(q)&&s.mount||q||c.disabled.has(ae))&&(q?c.disabled.add(ae):c.disabled.delete(ae))},_e=(q,ae={})=>{let ue=Te(r,q);const xe=_i(ae.disabled)||_i(t.disabled);return Pt(r,q,{...ue||{},_f:{...ue&&ue._f?ue._f:{ref:{name:q}},name:q,mount:!0,...ae}}),c.mount.add(q),ue?ie({disabled:_i(ae.disabled)?ae.disabled:t.disabled,name:q}):I(q,!0,ae.value),{...xe?{disabled:ae.disabled||t.disabled}:{},...t.progressive?{required:!!ae.required,min:em(ae.min),max:em(ae.max),minLength:em(ae.minLength),maxLength:em(ae.maxLength),pattern:em(ae.pattern)}:{},name:q,onChange:G,onBlur:G,ref:ve=>{if(ve){_e(q,ae),ue=Te(r,q);const Se=Qt(ve.value)&&ve.querySelectorAll&&ve.querySelectorAll("input,select,textarea")[0]||ve,ne=AJ(Se),ye=ue._f.refs||[];if(ne?ye.find(Ne=>Ne===Se):Se===ue._f.ref)return;Pt(r,q,{_f:{...ue._f,...ne?{refs:[...ye.filter(Gw),Se,...Array.isArray(Te(i,q))?[{}]:[]],ref:{type:Se.type,name:q}}:{ref:Se}}}),I(q,!1,void 0,Se)}else ue=Te(r,q,{}),ue._f&&(ue._f.mount=!1),(t.shouldUnregister||ae.shouldUnregister)&&!(B2(c.array,q)&&s.action)&&c.unMount.add(q)}}},Ie=()=>t.shouldFocusError&&Hu(r,U,c.mount),He=q=>{_i(q)&&(v.state.next({disabled:q}),Hu(r,(ae,ue)=>{const xe=Te(r,ue);xe&&(ae.disabled=xe._f.disabled||q,Array.isArray(xe._f.refs)&&xe._f.refs.forEach(ve=>{ve.disabled=xe._f.disabled||q}))},0,!1))},Ae=(q,ae)=>async ue=>{let xe;ue&&(ue.preventDefault&&ue.preventDefault(),ue.persist&&ue.persist());let ve=on(o);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:Se,values:ne}=await N();n.errors=Se,ve=on(ne)}else await L(r);if(c.disabled.size)for(const Se of c.disabled)On(ve,Se);if(On(n.errors,"root"),$r(n.errors)){v.state.next({errors:{}});try{await q(ve,ue)}catch(Se){xe=Se}}else ae&&await ae({...n.errors},ue),Ie(),setTimeout(Ie);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$r(n.errors)&&!xe,submitCount:n.submitCount+1,errors:n.errors}),xe)throw xe},Ye=(q,ae={})=>{Te(r,q)&&(Qt(ae.defaultValue)?P(q,on(Te(i,q))):(P(q,ae.defaultValue),Pt(i,q,on(ae.defaultValue))),ae.keepTouched||On(n.touchedFields,q),ae.keepDirty||(On(n.dirtyFields,q),n.isDirty=ae.defaultValue?ee(q,on(Te(i,q))):ee()),ae.keepError||(On(n.errors,q),p.isValid&&S()),v.state.next({...n}))},jt=(q,ae={})=>{const ue=q?on(q):i,xe=on(ue),ve=$r(q),Se=ve?i:xe;if(ae.keepDefaultValues||(i=ue),!ae.keepValues){if(ae.keepDirtyValues){const ne=new Set([...c.mount,...Object.keys(Au(i,o))]);for(const ye of Array.from(ne))Te(n.dirtyFields,ye)?Pt(Se,ye,Te(o,ye)):P(ye,Te(Se,ye))}else{if(A1&&Qt(q))for(const ne of c.mount){const ye=Te(r,ne);if(ye&&ye._f){const Ne=Array.isArray(ye._f.refs)?ye._f.refs[0]:ye._f.ref;if(zv(Ne)){const Ke=Ne.closest("form");if(Ke){Ke.reset();break}}}}if(ae.keepFieldsRef)for(const ne of c.mount)P(ne,Te(Se,ne));else r={}}o=t.shouldUnregister?ae.keepDefaultValues?on(i):{}:on(Se),v.array.next({values:{...Se}}),v.state.next({values:{...Se}})}c={mount:ae.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!p.isValid||!!ae.keepIsValid||!!ae.keepDirtyValues,s.watch=!!t.shouldUnregister,v.state.next({submitCount:ae.keepSubmitCount?n.submitCount:0,isDirty:ve?!1:ae.keepDirty?n.isDirty:!!(ae.keepDefaultValues&&!$a(q,i)),isSubmitted:ae.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ve?{}:ae.keepDirtyValues?ae.keepDefaultValues&&o?Au(i,o):n.dirtyFields:ae.keepDefaultValues&&q?Au(i,q):ae.keepDirty?n.dirtyFields:{},touchedFields:ae.keepTouched?n.touchedFields:{},errors:ae.keepErrors?n.errors:{},isSubmitSuccessful:ae.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},ln=(q,ae)=>jt(_o(q)?q(o):q,ae),Dn=(q,ae={})=>{const ue=Te(r,q),xe=ue&&ue._f;if(xe){const ve=xe.refs?xe.refs[0]:xe.ref;ve.focus&&(ve.focus(),ae.shouldSelect&&_o(ve.select)&&ve.select())}},Pn=q=>{n={...n,...q}},Wt={control:{register:_e,unregister:V,getFieldState:M,handleSubmit:Ae,setError:O,_subscribe:de,_runSchema:N,_focusError:Ie,_getWatch:Z,_getDirty:ee,_setValid:S,_setFieldArray:E,_setDisabledField:ie,_setErrors:R,_getFieldArray:Y,_reset:jt,_resetDefaultValues:()=>_o(t.defaultValues)&&t.defaultValues().then(q=>{ln(q,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:K,_disableForm:He,_subjects:v,_proxyFormState:p,get _fields(){return r},get _formValues(){return o},get _state(){return s},set _state(q){s=q},get _defaultValues(){return i},get _names(){return c},set _names(q){c=q},get _formState(){return n},get _options(){return t},set _options(q){t={...t,...q}}},subscribe:pe,trigger:te,register:_e,handleSubmit:Ae,watch:J,setValue:P,getValues:$,reset:ln,resetField:Ye,clearErrors:F,unregister:V,setError:O,setFocus:Dn,getFieldState:M};return{...Wt,formControl:Wt}}var js=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},Kw=(e,t,n={})=>n.shouldFocus||Qt(n.shouldFocus)?n.focusName||`${e}.${Qt(n.focusIndex)?t:n.focusIndex}.`:"",Zw=(e,t)=>[...e,...ci(t)],Yw=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Ww(e,t,n){return[...e.slice(0,t),...ci(n),...e.slice(t)]}var Xw=(e,t,n)=>Array.isArray(e)?(Qt(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],Qw=(e,t)=>[...ci(t),...ci(e)];function qJ(e,t){let n=0;const r=[...e];for(const i of t)r.splice(i-n,1),n++;return Yy(r).length?r:[]}var Jw=(e,t)=>Qt(t)?[]:qJ(e,ci(t).sort((n,r)=>n-r)),eS=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},yO=(e,t,n)=>(e[t]=n,e);function J2(e){const t=yp(),{control:n=t.control,name:r,keyName:i="id",shouldUnregister:o,rules:s}=e,[c,d]=X.useState(n._getFieldArray(r)),f=X.useRef(n._getFieldArray(r).map(js)),p=X.useRef(!1);n._names.array.add(r),X.useMemo(()=>s&&c.length>=0&&n.register(r,s),[n,r,c.length,s]),Wy(()=>n._subjects.array.subscribe({next:({values:I,name:A})=>{if(A===r||!A){const T=Te(I,r);Array.isArray(T)&&(d(T),f.current=T.map(js))}}}).unsubscribe,[n,r]);const h=X.useCallback(I=>{p.current=!0,n._setFieldArray(r,I)},[n,r]),v=(I,A)=>{const T=ci(on(I)),N=Zw(n._getFieldArray(r),T);n._names.focus=Kw(r,N.length-1,A),f.current=Zw(f.current,T.map(js)),h(N),d(N),n._setFieldArray(r,N,Zw,{argA:Yw(I)})},y=(I,A)=>{const T=ci(on(I)),N=Qw(n._getFieldArray(r),T);n._names.focus=Kw(r,0,A),f.current=Qw(f.current,T.map(js)),h(N),d(N),n._setFieldArray(r,N,Qw,{argA:Yw(I)})},b=I=>{const A=Jw(n._getFieldArray(r),I);f.current=Jw(f.current,I),h(A),d(A),!Array.isArray(Te(n._fields,r))&&Pt(n._fields,r,void 0),n._setFieldArray(r,A,Jw,{argA:I})},S=(I,A,T)=>{const N=ci(on(A)),z=Ww(n._getFieldArray(r),I,N);n._names.focus=Kw(r,I,T),f.current=Ww(f.current,I,N.map(js)),h(z),d(z),n._setFieldArray(r,z,Ww,{argA:I,argB:Yw(A)})},C=(I,A)=>{const T=n._getFieldArray(r);eS(T,I,A),eS(f.current,I,A),h(T),d(T),n._setFieldArray(r,T,eS,{argA:I,argB:A},!1)},E=(I,A)=>{const T=n._getFieldArray(r);Xw(T,I,A),Xw(f.current,I,A),h(T),d(T),n._setFieldArray(r,T,Xw,{argA:I,argB:A},!1)},k=(I,A)=>{const T=on(A),N=yO(n._getFieldArray(r),I,T);f.current=[...N].map((z,L)=>!z||L===I?js():f.current[L]),h(N),d([...N]),n._setFieldArray(r,N,yO,{argA:I,argB:T},!0,!1)},R=I=>{const A=ci(on(I));f.current=A.map(js),h([...A]),d([...A]),n._setFieldArray(r,[...A],T=>T,{},!0,!1)};return X.useEffect(()=>{if(n._state.action=!1,G_(r,n._names)&&n._subjects.state.next({...n._formState}),p.current&&(!Du(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!Du(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([r]).then(I=>{const A=Te(I.errors,r),T=Te(n._formState.errors,r);(T?!A&&T.type||A&&(T.type!==A.type||T.message!==A.message):A&&A.type)&&(A?Pt(n._formState.errors,r,A):On(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const I=Te(n._fields,r);I&&I._f&&!(Du(n._options.reValidateMode).isOnSubmit&&Du(n._options.mode).isOnSubmit)&&K_(I,n._names.disabled,n._formValues,n._options.criteriaMode===to.all,n._options.shouldUseNativeValidation,!0).then(A=>!$r(A)&&n._subjects.state.next({errors:Q2(n._formState.errors,A,r)}))}n._subjects.state.next({name:r,values:on(n._formValues)}),n._names.focus&&Hu(n._fields,(I,A)=>{if(n._names.focus&&A.startsWith(n._names.focus)&&I.focus)return I.focus(),1}),n._names.focus="",n._setValid(),p.current=!1},[c,r,n]),X.useEffect(()=>(!Te(n._formValues,r)&&n._setFieldArray(r),()=>{const I=(A,T)=>{const N=Te(n._fields,A);N&&N._f&&(N._f.mount=T)};n._options.shouldUnregister||o?n.unregister(r):I(r,!1)}),[r,n,i,o]),{swap:X.useCallback(C,[h,r,n]),move:X.useCallback(E,[h,r,n]),prepend:X.useCallback(y,[h,r,n]),append:X.useCallback(v,[h,r,n]),remove:X.useCallback(b,[h,r,n]),insert:X.useCallback(S,[h,r,n]),update:X.useCallback(k,[h,r,n]),replace:X.useCallback(R,[h,r,n]),fields:X.useMemo(()=>c.map((I,A)=>({...I,[i]:f.current[A]||js()})),[c,i])}}function pn(e={}){const t=X.useRef(void 0),n=X.useRef(void 0),[r,i]=X.useState({isDirty:!1,isValidating:!1,isLoading:_o(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:_o(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!_o(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...c}=HJ(e);t.current={...c,formState:r}}const o=t.current.control;return o._options=e,Wy(()=>{const s=o._subscribe({formState:o._proxyFormState,callback:()=>i({...o._formState}),reRenderRoot:!0});return i(c=>({...c,isReady:!0})),o._formState.isReady=!0,s},[o]),X.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),X.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),X.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),X.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),X.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),X.useEffect(()=>{e.values&&!$a(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),n.current=e.values,i(s=>({...s}))):o._resetDefaultValues()},[o,e.values]),X.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=H2(r,o),t.current}const hn=jJ,ez=x.createContext({}),tz=x.createContext({});function L1(){const e=x.useContext(ez),t=x.useContext(tz),{getFieldState:n}=yp(),r=D1({name:e.name}),i=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...i}}function Me({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=L1();return u.jsx(y1,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})}function Pe({...e}){return u.jsx(ez,{value:{name:e.name},children:u.jsx(NJ,{...e})})}function Oe({className:e,...t}){const n=x.useId();return u.jsx(tz,{value:{id:n},children:u.jsx("div",{"data-slot":"form-item",className:Le("grid gap-2",e),...t})})}var GJ="Label",nz=x.forwardRef((e,t)=>u.jsx(Be.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));nz.displayName=GJ;var KJ=nz;function Xy({className:e,...t}){return u.jsx(KJ,{"data-slot":"label",className:Le("text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function $e({className:e,...t}){const{error:n,formItemId:r}=L1();return u.jsx(Xy,{"data-slot":"form-label","data-error":!!n,className:Le("data-[error=true]:text-destructive",e),htmlFor:r,...t})}function De({className:e,...t}){const{error:n,formMessageId:r}=L1(),i=n?String(n?.message):t.children;return i?u.jsx("p",{"data-slot":"form-message",id:r,className:Le("text-destructive text-sm",e),...t,children:i}):null}function Ge({className:e,type:t,...n}){return u.jsx("input",{type:t,"data-slot":"input",className:Le(`border-input file:text-foreground placeholder:text-muted-foreground selection:bg-purple
|
|
406
|
-
selection:text-primary-foreground
|
|
407
|
-
dark:aria-invalid:outline-destructive dark:aria-invalid:ring-destructive/50 ring-ring/10
|
|
408
|
-
dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 aria-invalid:outline-destructive/60
|
|
409
|
-
aria-invalid:ring-destructive/20 aria-invalid:border-destructive/60 dark:aria-invalid:border-destructive
|
|
410
|
-
flex h-9 w-full min-w-0 rounded-md border bg-grey-700 px-3 py-1 text-base text-white
|
|
411
|
-
file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium
|
|
412
|
-
focus-visible:ring-1 focus-visible:outline-none focus-visible:ring-purple disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50
|
|
413
|
-
aria-invalid:focus-visible:ring-[1px] aria-invalid:focus-visible:outline-none md:text-sm dark:aria-invalid:focus-visible:ring-1`,e),...n})}const Qy=["RUNNING"],ZJ=["TERMINATING","TERMINATED","REMOVED"];function YJ(){return"https://fabric.harper.fast/#/?createCluster="+encodeURIComponent(JSON.stringify({deploymentDescription:"Self-Hosted",performanceDescription:"Self Supported and Managed",instances:[{secure:String(location.protocol==="https:"),fqdn:location.hostname,port:parseInt(location.port,10)}]}))}async function U1(e){const{data:t}=await Vt.get(`/Cluster/${e}`);return t}function vc(e,t){return{queryKey:[e],queryFn:()=>U1(e),retry:!1,enabled:!!e,refetchInterval:t?t===!0?1e4:t:void 0}}async function Z_({username:e,password:t,instanceClient:n}){const{data:r}=await n.post("/",{operation:"login",username:e,password:t});if(r)return r;throw new Error("Something went wrong")}function WJ(){return vt({mutationFn:Z_})}function XJ({entityId:e,instanceClient:t}){return{queryKey:[e,"health"],queryFn:async()=>{try{return await t.get("/health"),!0}catch{return!1}},retry:2,refetchInterval:5e3}}const rz=Object.freeze({status:"aborted"});function oe(e,t,n){function r(c,d){var f;Object.defineProperty(c,"_zod",{value:c._zod??{},enumerable:!1}),(f=c._zod).traits??(f.traits=new Set),c._zod.traits.add(e),t(c,d);for(const p in s.prototype)p in c||Object.defineProperty(c,p,{value:s.prototype[p].bind(c)});c._zod.constr=s,c._zod.def=d}const i=n?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function s(c){var d;const f=n?.Parent?new o:this;r(f,c),(d=f._zod).deferred??(d.deferred=[]);for(const p of f._zod.deferred)p();return f}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}const iz=Symbol("zod_brand");class Kl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Jy extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Uv={};function Fr(e){return e&&Object.assign(Uv,e),Uv}function QJ(e){return e}function JJ(e){return e}function eee(e){}function tee(e){throw new Error}function nee(e){}function F1(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function je(e,t="|"){return e.map(n=>nt(n)).join(t)}function Fv(e,t){return typeof t=="bigint"?t.toString():t}function bp(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function yc(e){return e==null}function eb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function oz(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(i=Number.parseInt(d[1]))}const o=n>i?n:i,s=Number.parseInt(e.toFixed(o).replace(".","")),c=Number.parseInt(t.toFixed(o).replace(".",""));return s%c/10**o}const bO=Symbol("evaluating");function Ct(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==bO)return r===void 0&&(r=bO,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function ree(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function rl(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function es(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function iee(e){return es(e._zod.def)}function oee(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function aee(e){const t=Object.keys(e),n=t.map(r=>e[r]);return Promise.all(n).then(r=>{const i={};for(let o=0;o<t.length;o++)i[t[o]]=r[o];return i})}function see(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function Y_(e){return JSON.stringify(e)}const V1="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ld(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const az=bp(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function nc(e){if(ld(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(ld(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function tb(e){return nc(e)?{...e}:Array.isArray(e)?[...e]:e}function lee(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}const cee=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Vv=new Set(["string","number","symbol"]),sz=new Set(["string","number","bigint","boolean","symbol","undefined"]);function qs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function po(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function we(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function uee(e){let t;return new Proxy({},{get(n,r,i){return t??(t=e()),Reflect.get(t,r,i)},set(n,r,i,o){return t??(t=e()),Reflect.set(t,r,i,o)},has(n,r){return t??(t=e()),Reflect.has(t,r)},deleteProperty(n,r){return t??(t=e()),Reflect.deleteProperty(t,r)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??(t=e()),Reflect.defineProperty(t,r,i)}})}function nt(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function lz(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const cz={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},uz={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function dz(e,t){const n=e._zod.def,r=es(e._zod.def,{get shape(){const i={};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(i[o]=n.shape[o])}return rl(this,"shape",i),i},checks:[]});return po(e,r)}function fz(e,t){const n=e._zod.def,r=es(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete i[o]}return rl(this,"shape",i),i},checks:[]});return po(e,r)}function mz(e,t){if(!nc(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const i=es(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return rl(this,"shape",o),o},checks:[]});return po(e,i)}function pz(e,t){if(!nc(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return rl(this,"shape",r),r},checks:e._zod.def.checks};return po(e,n)}function hz(e,t){const n=es(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return rl(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return po(e,n)}function gz(e,t,n){const r=es(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=e?new e({type:"optional",innerType:i[s]}):i[s])}else for(const s in i)o[s]=e?new e({type:"optional",innerType:i[s]}):i[s];return rl(this,"shape",o),o},checks:[]});return po(t,r)}function vz(e,t,n){const r=es(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const s in n){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=new e({type:"nonoptional",innerType:i[s]}))}else for(const s in i)o[s]=new e({type:"nonoptional",innerType:i[s]});return rl(this,"shape",o),o},checks:[]});return po(t,r)}function Ml(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Eo(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ym(e){return typeof e=="string"?e:e?.message}function Ao(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=ym(e.inst?._zod.def?.error?.(e))??ym(t?.error?.(e))??ym(n.customError?.(e))??ym(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function nb(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function rb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function cd(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function dee(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function yz(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function bz(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function fee(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return yz(t+n)}function mee(e){return bz(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function pee(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r/2]=Number.parseInt(t.slice(r,r+2),16);return n}function hee(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class gee{constructor(...t){}}const xz=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:uz,Class:gee,NUMBER_FORMAT_RANGES:cz,aborted:Ml,allowsEval:az,assert:nee,assertEqual:QJ,assertIs:eee,assertNever:tee,assertNotEqual:JJ,assignProp:rl,base64ToUint8Array:yz,base64urlToUint8Array:fee,cached:bp,captureStackTrace:V1,cleanEnum:dee,cleanRegex:eb,clone:po,cloneDef:iee,createTransparentProxy:uee,defineLazy:Ct,esc:Y_,escapeRegex:qs,extend:mz,finalizeIssue:Ao,floatSafeRemainder:oz,getElementAtPath:oee,getEnumValues:F1,getLengthableOrigin:rb,getParsedType:cee,getSizableOrigin:nb,hexToUint8Array:pee,isObject:ld,isPlainObject:nc,issue:cd,joinValues:je,jsonStringifyReplacer:Fv,merge:hz,mergeDefs:es,normalizeParams:we,nullish:yc,numKeys:lee,objectClone:ree,omit:fz,optionalKeys:lz,partial:gz,pick:dz,prefixIssues:Eo,primitiveTypes:sz,promiseAllObject:aee,propertyKeyTypes:Vv,randomString:see,required:vz,safeExtend:pz,shallowClone:tb,stringifyPrimitive:nt,uint8ArrayToBase64:bz,uint8ArrayToBase64url:mee,uint8ArrayToHex:hee,unwrapMessage:ym},Symbol.toStringTag,{value:"Module"})),wz=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Fv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ib=oe("$ZodError",wz),Pi=oe("$ZodError",wz,{Parent:Error});function B1(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function H1(e,t=n=>n.message){const n={_errors:[]},r=i=>{for(const o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>r({issues:s}));else if(o.code==="invalid_key")r({issues:o.issues});else if(o.code==="invalid_element")r({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let s=n,c=0;for(;c<o.path.length;){const d=o.path[c];c===o.path.length-1?(s[d]=s[d]||{_errors:[]},s[d]._errors.push(t(o))):s[d]=s[d]||{_errors:[]},s=s[d],c++}}};return r(e),n}function Sz(e,t=n=>n.message){const n={errors:[]},r=(i,o=[])=>{var s,c;for(const d of i.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(f=>r({issues:f},d.path));else if(d.code==="invalid_key")r({issues:d.issues},d.path);else if(d.code==="invalid_element")r({issues:d.issues},d.path);else{const f=[...o,...d.path];if(f.length===0){n.errors.push(t(d));continue}let p=n,h=0;for(;h<f.length;){const v=f[h],y=h===f.length-1;typeof v=="string"?(p.properties??(p.properties={}),(s=p.properties)[v]??(s[v]={errors:[]}),p=p.properties[v]):(p.items??(p.items=[]),(c=p.items)[v]??(c[v]={errors:[]}),p=p.items[v]),y&&p.errors.push(t(d)),h++}}};return r(e),n}function _z(e){const t=[],n=e.map(r=>typeof r=="object"?r.key:r);for(const r of n)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Cz(e){const t=[],n=[...e.issues].sort((r,i)=>(r.path??[]).length-(i.path??[]).length);for(const r of n)t.push(`✖ ${r.message}`),r.path?.length&&t.push(` → at ${_z(r.path)}`);return t.join(`
|
|
414
|
-
`)}const xp=e=>(t,n,r,i)=>{const o=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Kl;if(s.issues.length){const c=new(i?.Err??e)(s.issues.map(d=>Ao(d,o,Fr())));throw V1(c,i?.callee),c}return s.value},Bv=xp(Pi),wp=e=>async(t,n,r,i)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const c=new(i?.Err??e)(s.issues.map(d=>Ao(d,o,Fr())));throw V1(c,i?.callee),c}return s.value},Hv=wp(Pi),Sp=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Kl;return o.issues.length?{success:!1,error:new(e??ib)(o.issues.map(s=>Ao(s,i,Fr())))}:{success:!0,data:o.value}},Ez=Sp(Pi),_p=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>Ao(s,i,Fr())))}:{success:!0,data:o.value}},kz=_p(Pi),q1=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return xp(e)(t,n,i)},vee=q1(Pi),G1=e=>(t,n,r)=>xp(e)(t,n,r),yee=G1(Pi),K1=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return wp(e)(t,n,i)},bee=K1(Pi),Z1=e=>async(t,n,r)=>wp(e)(t,n,r),xee=Z1(Pi),Y1=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Sp(e)(t,n,i)},wee=Y1(Pi),W1=e=>(t,n,r)=>Sp(e)(t,n,r),See=W1(Pi),X1=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return _p(e)(t,n,i)},_ee=X1(Pi),Q1=e=>async(t,n,r)=>_p(e)(t,n,r),Cee=Q1(Pi),Rz=/^[cC][^\s-]{8,}$/,jz=/^[0-9a-z]+$/,Iz=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Tz=/^[0-9a-vA-V]{20}$/,Nz=/^[A-Za-z0-9]{27}$/,Az=/^[a-zA-Z0-9_-]{21}$/,Oz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Eee=/^[-+]?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)?)??$/,$z=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ud=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,kee=ud(4),Ree=ud(6),jee=ud(7),Dz=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Iee=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Tee=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Pz=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Nee=Pz,Aee=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Oee="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Mz(){return new RegExp(Oee,"u")}const zz=/^(?:(?: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])$/,Lz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Uz=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Fz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Vz=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,J1=/^[A-Za-z0-9_-]*$/,eE=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Bz=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Hz=/^\+(?:[0-9]){6,14}[0-9]$/,qz="(?:(?:\\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])))",Gz=new RegExp(`^${qz}$`);function Kz(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Zz(e){return new RegExp(`^${Kz(e)}$`)}function Yz(e){const t=Kz({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${qz}T(?:${r})$`)}const Wz=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Xz=/^-?\d+n?$/,Qz=/^-?\d+$/,Jz=/^-?\d+(?:\.\d+)?/,eL=/^(?:true|false)$/i,tL=/^null$/i,nL=/^undefined$/i,rL=/^[^A-Z]*$/,iL=/^[^a-z]*$/,oL=/^[0-9a-fA-F]*$/;function Cp(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ep(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const $ee=/^[0-9a-fA-F]{32}$/,Dee=Cp(22,"=="),Pee=Ep(22),Mee=/^[0-9a-fA-F]{40}$/,zee=Cp(27,"="),Lee=Ep(27),Uee=/^[0-9a-fA-F]{64}$/,Fee=Cp(43,"="),Vee=Ep(43),Bee=/^[0-9a-fA-F]{96}$/,Hee=Cp(64,""),qee=Ep(64),Gee=/^[0-9a-fA-F]{128}$/,Kee=Cp(86,"=="),Zee=Ep(86),tE=Object.freeze(Object.defineProperty({__proto__:null,base64:Vz,base64url:J1,bigint:Xz,boolean:eL,browserEmail:Aee,cidrv4:Uz,cidrv6:Fz,cuid:Rz,cuid2:jz,date:Gz,datetime:Yz,domain:Bz,duration:Oz,e164:Hz,email:Dz,emoji:Mz,extendedDuration:Eee,guid:$z,hex:oL,hostname:eE,html5Email:Iee,idnEmail:Nee,integer:Qz,ipv4:zz,ipv6:Lz,ksuid:Nz,lowercase:rL,md5_base64:Dee,md5_base64url:Pee,md5_hex:$ee,nanoid:Az,null:tL,number:Jz,rfc5322Email:Tee,sha1_base64:zee,sha1_base64url:Lee,sha1_hex:Mee,sha256_base64:Fee,sha256_base64url:Vee,sha256_hex:Uee,sha384_base64:Hee,sha384_base64url:qee,sha384_hex:Bee,sha512_base64:Kee,sha512_base64url:Zee,sha512_hex:Gee,string:Wz,time:Zz,ulid:Iz,undefined:nL,unicodeEmail:Pz,uppercase:iL,uuid:ud,uuid4:kee,uuid6:Ree,uuid7:jee,xid:Tz},Symbol.toStringTag,{value:"Module"})),jn=oe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),aL={number:"number",bigint:"bigint",object:"date"},nE=oe("$ZodCheckLessThan",(e,t)=>{jn.init(e,t);const n=aL[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rE=oe("$ZodCheckGreaterThan",(e,t)=>{jn.init(e,t);const n=aL[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),sL=oe("$ZodCheckMultipleOf",(e,t)=>{jn.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):oz(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),lL=oe("$ZodCheckNumberFormat",(e,t)=>{jn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,o]=cz[t.format];e._zod.onattach.push(s=>{const c=s._zod.bag;c.format=t.format,c.minimum=i,c.maximum=o,n&&(c.pattern=Qz)}),e._zod.check=s=>{const c=s.value;if(n){if(!Number.isInteger(c)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort});return}}c<i&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),c>o&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inst:e})}}),cL=oe("$ZodCheckBigIntFormat",(e,t)=>{jn.init(e,t);const[n,r]=uz[t.format];e._zod.onattach.push(i=>{const o=i._zod.bag;o.format=t.format,o.minimum=n,o.maximum=r}),e._zod.check=i=>{const o=i.value;o<n&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>r&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:r,inst:e})}}),uL=oe("$ZodCheckMaxSize",(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!yc(i)&&i.size!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;i.size<=t.maximum||r.issues.push({origin:nb(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),dL=oe("$ZodCheckMinSize",(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!yc(i)&&i.size!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;i.size>=t.minimum||r.issues.push({origin:nb(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),fL=oe("$ZodCheckSizeEquals",(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!yc(i)&&i.size!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.size,i.maximum=t.size,i.size=t.size}),e._zod.check=r=>{const i=r.value,o=i.size;if(o===t.size)return;const s=o>t.size;r.issues.push({origin:nb(i),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),mL=oe("$ZodCheckMaxLength",(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!yc(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const s=rb(i);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),pL=oe("$ZodCheckMinLength",(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!yc(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const s=rb(i);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),hL=oe("$ZodCheckLengthEquals",(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!yc(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,o=i.length;if(o===t.length)return;const s=rb(i),c=o>t.length;r.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),kp=oe("$ZodCheckStringFormat",(e,t)=>{var n,r;jn.init(e,t),e._zod.onattach.push(i=>{const o=i._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),gL=oe("$ZodCheckRegex",(e,t)=>{kp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),vL=oe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=rL),kp.init(e,t)}),yL=oe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=iL),kp.init(e,t)}),bL=oe("$ZodCheckIncludes",(e,t)=>{jn.init(e,t);const n=qs(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),xL=oe("$ZodCheckStartsWith",(e,t)=>{jn.init(e,t);const n=new RegExp(`^${qs(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),wL=oe("$ZodCheckEndsWith",(e,t)=>{jn.init(e,t);const n=new RegExp(`.*${qs(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function xO(e,t,n){e.issues.length&&t.issues.push(...Eo(n,e.issues))}const SL=oe("$ZodCheckProperty",(e,t)=>{jn.init(e,t),e._zod.check=n=>{const r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(i=>xO(i,n,t.property));xO(r,n,t.property)}}),_L=oe("$ZodCheckMimeType",(e,t)=>{jn.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),CL=oe("$ZodCheckOverwrite",(e,t)=>{jn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class EL{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
415
|
-
`).filter(s=>s),i=Math.min(...r.map(s=>s.length-s.trimStart().length)),o=r.map(s=>s.slice(i)).map(s=>" ".repeat(this.indent*2)+s);for(const s of o)this.content.push(s)}compile(){const t=Function,n=this?.args,i=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,i.join(`
|
|
416
|
-
`))}}const kL={major:4,minor:1,patch:12},lt=oe("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kL;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const o of i._zod.onattach)o(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(s,c,d)=>{let f=Ml(s),p;for(const h of c){if(h._zod.def.when){if(!h._zod.def.when(s))continue}else if(f)continue;const v=s.issues.length,y=h._zod.check(s);if(y instanceof Promise&&d?.async===!1)throw new Kl;if(p||y instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await y,s.issues.length!==v&&(f||(f=Ml(s,v)))});else{if(s.issues.length===v)continue;f||(f=Ml(s,v))}}return p?p.then(()=>s):s},o=(s,c,d)=>{if(Ml(s))return s.aborted=!0,s;const f=i(c,r,d);if(f instanceof Promise){if(d.async===!1)throw new Kl;return f.then(p=>e._zod.parse(p,d))}return e._zod.parse(f,d)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){const f=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return f instanceof Promise?f.then(p=>o(p,s,c)):o(f,s,c)}const d=e._zod.parse(s,c);if(d instanceof Promise){if(c.async===!1)throw new Kl;return d.then(f=>i(f,r,c))}return i(d,r,c)}}e["~standard"]={validate:i=>{try{const o=Ez(e,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return kz(e,i).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Rp=oe("$ZodString",(e,t)=>{lt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Wz(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),en=oe("$ZodStringFormat",(e,t)=>{kp.init(e,t),Rp.init(e,t)}),RL=oe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=$z),en.init(e,t)}),jL=oe("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ud(r))}else t.pattern??(t.pattern=ud());en.init(e,t)}),IL=oe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Dz),en.init(e,t)}),TL=oe("$ZodURL",(e,t)=>{en.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:eE.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),NL=oe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Mz()),en.init(e,t)}),AL=oe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Az),en.init(e,t)}),OL=oe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Rz),en.init(e,t)}),$L=oe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=jz),en.init(e,t)}),DL=oe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Iz),en.init(e,t)}),PL=oe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Tz),en.init(e,t)}),ML=oe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Nz),en.init(e,t)}),zL=oe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Yz(t)),en.init(e,t)}),LL=oe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Gz),en.init(e,t)}),UL=oe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Zz(t)),en.init(e,t)}),FL=oe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Oz),en.init(e,t)}),VL=oe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=zz),en.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),BL=oe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Lz),en.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),HL=oe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Uz),en.init(e,t)}),qL=oe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Fz),en.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,o]=r;if(!o)throw new Error;const s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function iE(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const GL=oe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Vz),en.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{iE(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function KL(e){if(!J1.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return iE(n)}const ZL=oe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=J1),en.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{KL(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),YL=oe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Hz),en.init(e,t)});function WL(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const XL=oe("$ZodJWT",(e,t)=>{en.init(e,t),e._zod.check=n=>{WL(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),QL=oe("$ZodCustomStringFormat",(e,t)=>{en.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),oE=oe("$ZodNumber",(e,t)=>{lt.init(e,t),e._zod.pattern=e._zod.bag.pattern??Jz,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),JL=oe("$ZodNumber",(e,t)=>{lL.init(e,t),oE.init(e,t)}),aE=oe("$ZodBoolean",(e,t)=>{lt.init(e,t),e._zod.pattern=eL,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),sE=oe("$ZodBigInt",(e,t)=>{lt.init(e,t),e._zod.pattern=Xz,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),e4=oe("$ZodBigInt",(e,t)=>{cL.init(e,t),sE.init(e,t)}),t4=oe("$ZodSymbol",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;return typeof i=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),n}}),n4=oe("$ZodUndefined",(e,t)=>{lt.init(e,t),e._zod.pattern=nL,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,r)=>{const i=n.value;return typeof i>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),n}}),r4=oe("$ZodNull",(e,t)=>{lt.init(e,t),e._zod.pattern=tL,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),n}}),i4=oe("$ZodAny",(e,t)=>{lt.init(e,t),e._zod.parse=n=>n}),o4=oe("$ZodUnknown",(e,t)=>{lt.init(e,t),e._zod.parse=n=>n}),a4=oe("$ZodNever",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),s4=oe("$ZodVoid",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;return typeof i>"u"||n.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),n}}),l4=oe("$ZodDate",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const i=n.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),n}});function wO(e,t,n){e.issues.length&&t.issues.push(...Eo(n,e.issues)),t.value[n]=e.value}const c4=oe("$ZodArray",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const o=[];for(let s=0;s<i.length;s++){const c=i[s],d=t.element._zod.run({value:c,issues:[]},r);d instanceof Promise?o.push(d.then(f=>wO(f,n,s))):wO(d,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function qv(e,t,n,r){e.issues.length&&t.issues.push(...Eo(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function u4(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=lz(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function d4(e,t,n,r,i,o){const s=[],c=i.keySet,d=i.catchall._zod,f=d.def.type;for(const p of Object.keys(t)){if(c.has(p))continue;if(f==="never"){s.push(p);continue}const h=d.run({value:t[p],issues:[]},r);h instanceof Promise?e.push(h.then(v=>qv(v,n,p,t))):qv(h,n,p,t)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const f4=oe("$ZodObject",(e,t)=>{if(lt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...c};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=bp(()=>u4(t));Ct(e._zod,"propValues",()=>{const c=t.shape,d={};for(const f in c){const p=c[f]._zod;if(p.values){d[f]??(d[f]=new Set);for(const h of p.values)d[f].add(h)}}return d});const i=ld,o=t.catchall;let s;e._zod.parse=(c,d)=>{s??(s=r.value);const f=c.value;if(!i(f))return c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c;c.value={};const p=[],h=s.shape;for(const v of s.keys){const b=h[v]._zod.run({value:f[v],issues:[]},d);b instanceof Promise?p.push(b.then(S=>qv(S,c,v,f))):qv(b,c,v,f)}return o?d4(p,f,c,d,r.value,e):p.length?Promise.all(p).then(()=>c):c}}),m4=oe("$ZodObjectJIT",(e,t)=>{f4.init(e,t);const n=e._zod.parse,r=bp(()=>u4(t)),i=v=>{const y=new EL(["shape","payload","ctx"]),b=r.value,S=R=>{const I=Y_(R);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};y.write("const input = payload.value;");const C=Object.create(null);let E=0;for(const R of b.keys)C[R]=`key_${E++}`;y.write("const newResult = {};");for(const R of b.keys){const I=C[R],A=Y_(R);y.write(`const ${I} = ${S(R)};`),y.write(`
|
|
417
|
-
if (${I}.issues.length) {
|
|
418
|
-
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
419
|
-
...iss,
|
|
420
|
-
path: iss.path ? [${A}, ...iss.path] : [${A}]
|
|
421
|
-
})));
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
if (${I}.value === undefined) {
|
|
426
|
-
if (${A} in input) {
|
|
427
|
-
newResult[${A}] = undefined;
|
|
428
|
-
}
|
|
429
|
-
} else {
|
|
430
|
-
newResult[${A}] = ${I}.value;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
`)}y.write("payload.value = newResult;"),y.write("return payload;");const k=y.compile();return(R,I)=>k(v,R,I)};let o;const s=ld,c=!Uv.jitless,f=c&&az.value,p=t.catchall;let h;e._zod.parse=(v,y)=>{h??(h=r.value);const b=v.value;return s(b)?c&&f&&y?.async===!1&&y.jitless!==!0?(o||(o=i(t.shape)),v=o(v,y),p?d4([],b,v,y,h,e):v):n(v,y):(v.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),v)}});function SO(e,t,n,r){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const i=e.filter(o=>!Ml(o));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(s=>Ao(s,r,Fr())))}),t)}const lE=oe("$ZodUnion",(e,t)=>{lt.init(e,t),Ct(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ct(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ct(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Ct(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>eb(o.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let s=!1;const c=[];for(const d of t.options){const f=d._zod.run({value:i.value,issues:[]},o);if(f instanceof Promise)c.push(f),s=!0;else{if(f.issues.length===0)return f;c.push(f)}}return s?Promise.all(c).then(d=>SO(d,i,e,o)):SO(c,i,e,o)}}),p4=oe("$ZodDiscriminatedUnion",(e,t)=>{lE.init(e,t);const n=e._zod.parse;Ct(e._zod,"propValues",()=>{const i={};for(const o of t.options){const s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[c,d]of Object.entries(s)){i[c]||(i[c]=new Set);for(const f of d)i[c].add(f)}}return i});const r=bp(()=>{const i=t.options,o=new Map;for(const s of i){const c=s._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const d of c){if(o.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);o.set(d,s)}}return o});e._zod.parse=(i,o)=>{const s=i.value;if(!ld(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;const c=r.value.get(s?.[t.discriminator]);return c?c._zod.run(i,o):t.unionFallback?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),i)}}),h4=oe("$ZodIntersection",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,o=t.left._zod.run({value:i,issues:[]},r),s=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([d,f])=>_O(n,d,f)):_O(n,o,s)}});function W_(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(nc(e)&&nc(t)){const n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),i={...e,...t};for(const o of r){const s=W_(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};i[o]=s.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=e[r],o=t[r],s=W_(i,o);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function _O(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Ml(e))return e;const r=W_(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const cE=oe("$ZodTuple",(e,t)=>{lt.init(e,t);const n=t.items,r=n.length-[...n].reverse().findIndex(i=>i._zod.optin!=="optional");e._zod.parse=(i,o)=>{const s=i.value;if(!Array.isArray(s))return i.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const c=[];if(!t.rest){const f=s.length>n.length,p=s.length<r-1;if(f||p)return i.issues.push({...f?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},input:s,inst:e,origin:"array"}),i}let d=-1;for(const f of n){if(d++,d>=s.length&&d>=r)continue;const p=f._zod.run({value:s[d],issues:[]},o);p instanceof Promise?c.push(p.then(h=>Eg(h,i,d))):Eg(p,i,d)}if(t.rest){const f=s.slice(n.length);for(const p of f){d++;const h=t.rest._zod.run({value:p,issues:[]},o);h instanceof Promise?c.push(h.then(v=>Eg(v,i,d))):Eg(h,i,d)}}return c.length?Promise.all(c).then(()=>i):i}});function Eg(e,t,n){e.issues.length&&t.issues.push(...Eo(n,e.issues)),t.value[n]=e.value}const g4=oe("$ZodRecord",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!nc(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const o=[];if(t.keyType._zod.values){const s=t.keyType._zod.values;n.value={};for(const d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){const f=t.valueType._zod.run({value:i[d],issues:[]},r);f instanceof Promise?o.push(f.then(p=>{p.issues.length&&n.issues.push(...Eo(d,p.issues)),n.value[d]=p.value})):(f.issues.length&&n.issues.push(...Eo(d,f.issues)),n.value[d]=f.value)}let c;for(const d in i)s.has(d)||(c=c??[],c.push(d));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c})}else{n.value={};for(const s of Reflect.ownKeys(i)){if(s==="__proto__")continue;const c=t.keyType._zod.run({value:s,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(f=>Ao(f,r,Fr())),input:s,path:[s],inst:e}),n.value[c.value]=c.value;continue}const d=t.valueType._zod.run({value:i[s],issues:[]},r);d instanceof Promise?o.push(d.then(f=>{f.issues.length&&n.issues.push(...Eo(s,f.issues)),n.value[c.value]=f.value})):(d.issues.length&&n.issues.push(...Eo(s,d.issues)),n.value[c.value]=d.value)}}return o.length?Promise.all(o).then(()=>n):n}}),v4=oe("$ZodMap",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;const o=[];n.value=new Map;for(const[s,c]of i){const d=t.keyType._zod.run({value:s,issues:[]},r),f=t.valueType._zod.run({value:c,issues:[]},r);d instanceof Promise||f instanceof Promise?o.push(Promise.all([d,f]).then(([p,h])=>{CO(p,h,n,s,i,e,r)})):CO(d,f,n,s,i,e,r)}return o.length?Promise.all(o).then(()=>n):n}});function CO(e,t,n,r,i,o,s){e.issues.length&&(Vv.has(typeof r)?n.issues.push(...Eo(r,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:e.issues.map(c=>Ao(c,s,Fr()))})),t.issues.length&&(Vv.has(typeof r)?n.issues.push(...Eo(r,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:r,issues:t.issues.map(c=>Ao(c,s,Fr()))})),n.value.set(e.value,t.value)}const y4=oe("$ZodSet",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;const o=[];n.value=new Set;for(const s of i){const c=t.valueType._zod.run({value:s,issues:[]},r);c instanceof Promise?o.push(c.then(d=>EO(d,n))):EO(c,n)}return o.length?Promise.all(o).then(()=>n):n}});function EO(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const b4=oe("$ZodEnum",(e,t)=>{lt.init(e,t);const n=F1(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>Vv.has(typeof i)).map(i=>typeof i=="string"?qs(i):i.toString()).join("|")})$`),e._zod.parse=(i,o)=>{const s=i.value;return r.has(s)||i.issues.push({code:"invalid_value",values:n,input:s,inst:e}),i}}),x4=oe("$ZodLiteral",(e,t)=>{if(lt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?qs(n):n?qs(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,r)=>{const i=n.value;return e._zod.values.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),w4=oe("$ZodFile",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),n}}),S4=oe("$ZodTransform",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Jy(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(n.value=s,n));if(i instanceof Promise)throw new Kl;return n.value=i,n}});function kO(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const _4=oe("$ZodOptional",(e,t)=>{lt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ct(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ct(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${eb(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>kO(o,n.value)):kO(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),C4=oe("$ZodNullable",(e,t)=>{lt.init(e,t),Ct(e._zod,"optin",()=>t.innerType._zod.optin),Ct(e._zod,"optout",()=>t.innerType._zod.optout),Ct(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${eb(n.source)}|null)$`):void 0}),Ct(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),E4=oe("$ZodDefault",(e,t)=>{lt.init(e,t),e._zod.optin="optional",Ct(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>RO(o,t)):RO(i,t)}});function RO(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const k4=oe("$ZodPrefault",(e,t)=>{lt.init(e,t),e._zod.optin="optional",Ct(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),R4=oe("$ZodNonOptional",(e,t)=>{lt.init(e,t),Ct(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>jO(o,e)):jO(i,e)}});function jO(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const j4=oe("$ZodSuccess",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Jy("ZodSuccess");const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.issues.length===0,n)):(n.value=i.issues.length===0,n)}}),I4=oe("$ZodCatch",(e,t)=>{lt.init(e,t),Ct(e._zod,"optin",()=>t.innerType._zod.optin),Ct(e._zod,"optout",()=>t.innerType._zod.optout),Ct(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>Ao(s,r,Fr()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>Ao(o,r,Fr()))},input:n.value}),n.issues=[]),n)}}),T4=oe("$ZodNaN",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),N4=oe("$ZodPipe",(e,t)=>{lt.init(e,t),Ct(e._zod,"values",()=>t.in._zod.values),Ct(e._zod,"optin",()=>t.in._zod.optin),Ct(e._zod,"optout",()=>t.out._zod.optout),Ct(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(s=>kg(s,t.in,r)):kg(o,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(o=>kg(o,t.out,r)):kg(i,t.out,r)}});function kg(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const uE=oe("$ZodCodec",(e,t)=>{lt.init(e,t),Ct(e._zod,"values",()=>t.in._zod.values),Ct(e._zod,"optin",()=>t.in._zod.optin),Ct(e._zod,"optout",()=>t.out._zod.optout),Ct(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>Rg(s,t,r)):Rg(o,t,r)}else{const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(s=>Rg(s,t,r)):Rg(o,t,r)}}});function Rg(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){const i=t.transform(e.value,e);return i instanceof Promise?i.then(o=>jg(e,o,t.out,n)):jg(e,i,t.out,n)}else{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(o=>jg(e,o,t.in,n)):jg(e,i,t.in,n)}}function jg(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}const A4=oe("$ZodReadonly",(e,t)=>{lt.init(e,t),Ct(e._zod,"propValues",()=>t.innerType._zod.propValues),Ct(e._zod,"values",()=>t.innerType._zod.values),Ct(e._zod,"optin",()=>t.innerType._zod.optin),Ct(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(IO):IO(i)}});function IO(e){return e.value=Object.freeze(e.value),e}const O4=oe("$ZodTemplateLiteral",(e,t)=>{lt.init(e,t);const n=[];for(const r of t.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);const i=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${r._zod.traits}`);const o=i.startsWith("^")?1:0,s=i.endsWith("$")?i.length-1:i.length;n.push(i.slice(o,s))}else if(r===null||sz.has(typeof r))n.push(qs(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(r,i)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:e,expected:"template_literal",code:"invalid_type"}),r):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),r)}),$4=oe("$ZodFunction",(e,t)=>(lt.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...r){const i=e._def.input?Bv(e._def.input,r):r,o=Reflect.apply(n,this,i);return e._def.output?Bv(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...r){const i=e._def.input?await Hv(e._def.input,r):r,o=await Reflect.apply(n,this,i);return e._def.output?await Hv(e._def.output,o):o}},e._zod.parse=(n,r)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{const r=e.constructor;return Array.isArray(n[0])?new r({type:"function",input:new cE({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new r({type:"function",input:n[0],output:e._def.output})},e.output=n=>{const r=e.constructor;return new r({type:"function",input:e._def.input,output:n})},e)),D4=oe("$ZodPromise",(e,t)=>{lt.init(e,t),e._zod.parse=(n,r)=>Promise.resolve(n.value).then(i=>t.innerType._zod.run({value:i,issues:[]},r))}),P4=oe("$ZodLazy",(e,t)=>{lt.init(e,t),Ct(e._zod,"innerType",()=>t.getter()),Ct(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Ct(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Ct(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),Ct(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),M4=oe("$ZodCustom",(e,t)=>{jn.init(e,t),lt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(o=>TO(o,n,r,e));TO(i,n,r,e)}});function TO(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(cd(i))}}const Yee=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return i=>{switch(i.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${i.expected}، ولكن تم إدخال ${n(i.input)}`;case"invalid_value":return i.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${nt(i.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?` أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${o} ${i.maximum.toString()} ${s.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${o} ${i.minimum.toString()} ${s.unit}`:`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${i.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${r[o.format]??i.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${i.divisor}`;case"unrecognized_keys":return`معرف${i.keys.length>1?"ات":""} غريب${i.keys.length>1?"ة":""}: ${je(i.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${i.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${i.origin}`;default:return"مدخل غير مقبول"}}};function Wee(){return{localeError:Yee()}}const Xee=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${i.expected}, daxil olan ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Yanlış dəyər: gözlənilən ${nt(i.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${o}${i.maximum.toString()} ${s.unit??"element"}`:`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Çox kiçik: gözlənilən ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`Çox kiçik: gözlənilən ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${r[o.format]??i.format}`}case"not_multiple_of":return`Yanlış ədəd: ${i.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${i.keys.length>1?"lar":""}: ${je(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${i.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function Qee(){return{localeError:Xee()}}function NO(e,t,n,r){const i=Math.abs(e),o=i%10,s=i%100;return s>=11&&s<=19?r:o===1?t:o>=2&&o<=4?n:r}const Jee=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"лік";case"object":{if(Array.isArray(i))return"масіў";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return i=>{switch(i.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${i.expected}, атрымана ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Няправільны ўвод: чакалася ${nt(i.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);if(s){const c=Number(i.maximum),d=NO(c,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна ${s.verb} ${o}${i.maximum.toString()} ${d}`}return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна быць ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);if(s){const c=Number(i.minimum),d=NO(c,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${i.origin} павінна ${s.verb} ${o}${i.minimum.toString()} ${d}`}return`Занадта малы: чакалася, што ${i.origin} павінна быць ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${r[o.format]??i.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${i.keys.length>1?"ключы":"ключ"}: ${je(i.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${i.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${i.origin}`;default:return"Няправільны ўвод"}}};function ete(){return{localeError:Jee()}}const tte=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":{if(Array.isArray(e))return"масив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},nte=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(r){return e[r]??null}const n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"};return r=>{switch(r.code){case"invalid_type":return`Невалиден вход: очакван ${r.expected}, получен ${tte(r.input)}`;case"invalid_value":return r.values.length===1?`Невалиден вход: очакван ${nt(r.values[0])}`:`Невалидна опция: очаквано едно от ${je(r.values,"|")}`;case"too_big":{const i=r.inclusive?"<=":"<",o=t(r.origin);return o?`Твърде голямо: очаква се ${r.origin??"стойност"} да съдържа ${i}${r.maximum.toString()} ${o.unit??"елемента"}`:`Твърде голямо: очаква се ${r.origin??"стойност"} да бъде ${i}${r.maximum.toString()}`}case"too_small":{const i=r.inclusive?">=":">",o=t(r.origin);return o?`Твърде малко: очаква се ${r.origin} да съдържа ${i}${r.minimum.toString()} ${o.unit}`:`Твърде малко: очаква се ${r.origin} да бъде ${i}${r.minimum.toString()}`}case"invalid_format":{const i=r;if(i.format==="starts_with")return`Невалиден низ: трябва да започва с "${i.prefix}"`;if(i.format==="ends_with")return`Невалиден низ: трябва да завършва с "${i.suffix}"`;if(i.format==="includes")return`Невалиден низ: трябва да включва "${i.includes}"`;if(i.format==="regex")return`Невалиден низ: трябва да съвпада с ${i.pattern}`;let o="Невалиден";return i.format==="emoji"&&(o="Невалидно"),i.format==="datetime"&&(o="Невалидно"),i.format==="date"&&(o="Невалидна"),i.format==="time"&&(o="Невалидно"),i.format==="duration"&&(o="Невалидна"),`${o} ${n[i.format]??r.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${r.divisor}`;case"unrecognized_keys":return`Неразпознат${r.keys.length>1?"и":""} ключ${r.keys.length>1?"ове":""}: ${je(r.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${r.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${r.origin}`;default:return"Невалиден вход"}}};function rte(){return{localeError:nte()}}const ite=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipus invàlid: s'esperava ${i.expected}, s'ha rebut ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Valor invàlid: s'esperava ${nt(i.values[0])}`:`Opció invàlida: s'esperava una de ${je(i.values," o ")}`;case"too_big":{const o=i.inclusive?"com a màxim":"menys de",s=t(i.origin);return s?`Massa gran: s'esperava que ${i.origin??"el valor"} contingués ${o} ${i.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?"com a mínim":"més de",s=t(i.origin);return s?`Massa petit: s'esperava que ${i.origin} contingués ${o} ${i.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${r[o.format]??i.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${je(i.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${i.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${i.origin}`;default:return"Entrada invàlida"}}};function ote(){return{localeError:ite()}}const ate=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(i))return"pole";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return i=>{switch(i.code){case"invalid_type":return`Neplatný vstup: očekáváno ${i.expected}, obdrženo ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Neplatný vstup: očekáváno ${nt(i.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Hodnota je příliš velká: ${i.origin??"hodnota"} musí mít ${o}${i.maximum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš velká: ${i.origin??"hodnota"} musí být ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Hodnota je příliš malá: ${i.origin??"hodnota"} musí mít ${o}${i.minimum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš malá: ${i.origin??"hodnota"} musí být ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${r[o.format]??i.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${i.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${je(i.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${i.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${i.origin}`;default:return"Neplatný vstup"}}};function ste(){return{localeError:ate()}}const lte=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function n(s){return e[s]??null}function r(s){return t[s]??s}const i=s=>{const c=typeof s;switch(c){case"number":return Number.isNaN(s)?"NaN":"tal";case"object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return c},o={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return s=>{switch(s.code){case"invalid_type":return`Ugyldigt input: forventede ${r(s.expected)}, fik ${r(i(s.input))}`;case"invalid_value":return s.values.length===1?`Ugyldig værdi: forventede ${nt(s.values[0])}`:`Ugyldigt valg: forventede en af følgende ${je(s.values,"|")}`;case"too_big":{const c=s.inclusive?"<=":"<",d=n(s.origin),f=r(s.origin);return d?`For stor: forventede ${f??"value"} ${d.verb} ${c} ${s.maximum.toString()} ${d.unit??"elementer"}`:`For stor: forventede ${f??"value"} havde ${c} ${s.maximum.toString()}`}case"too_small":{const c=s.inclusive?">=":">",d=n(s.origin),f=r(s.origin);return d?`For lille: forventede ${f} ${d.verb} ${c} ${s.minimum.toString()} ${d.unit}`:`For lille: forventede ${f} havde ${c} ${s.minimum.toString()}`}case"invalid_format":{const c=s;return c.format==="starts_with"?`Ugyldig streng: skal starte med "${c.prefix}"`:c.format==="ends_with"?`Ugyldig streng: skal ende med "${c.suffix}"`:c.format==="includes"?`Ugyldig streng: skal indeholde "${c.includes}"`:c.format==="regex"?`Ugyldig streng: skal matche mønsteret ${c.pattern}`:`Ugyldig ${o[c.format]??s.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${s.divisor}`;case"unrecognized_keys":return`${s.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${je(s.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${s.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${s.origin}`;default:return"Ugyldigt input"}}};function cte(){return{localeError:lte()}}const ute=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"Zahl";case"object":{if(Array.isArray(i))return"Array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return i=>{switch(i.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${i.expected}, erhalten ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Ungültige Eingabe: erwartet ${nt(i.values[0])}`:`Ungültige Option: erwartet eine von ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Zu groß: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ist`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ist`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${r[o.format]??i.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${je(i.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${i.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${i.origin}`;default:return"Ungültige Eingabe"}}};function dte(){return{localeError:ute()}}const fte=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},mte=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(r){return e[r]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Invalid input: expected ${r.expected}, received ${fte(r.input)}`;case"invalid_value":return r.values.length===1?`Invalid input: expected ${nt(r.values[0])}`:`Invalid option: expected one of ${je(r.values,"|")}`;case"too_big":{const i=r.inclusive?"<=":"<",o=t(r.origin);return o?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{const i=r.inclusive?">=":">",o=t(r.origin);return o?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${o.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${je(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function z4(){return{localeError:mte()}}const pte=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},hte=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}const n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return r=>{switch(r.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${r.expected}, riceviĝis ${pte(r.input)}`;case"invalid_value":return r.values.length===1?`Nevalida enigo: atendiĝis ${nt(r.values[0])}`:`Nevalida opcio: atendiĝis unu el ${je(r.values,"|")}`;case"too_big":{const i=r.inclusive?"<=":"<",o=t(r.origin);return o?`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{const i=r.inclusive?">=":">",o=t(r.origin);return o?`Tro malgranda: atendiĝis ke ${r.origin} havu ${i}${r.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} ŝlosilo${r.keys.length>1?"j":""}: ${je(r.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function gte(){return{localeError:hte()}}const vte=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function n(s){return e[s]??null}function r(s){return t[s]??s}const i=s=>{const c=typeof s;switch(c){case"number":return Number.isNaN(s)?"NaN":"number";case"object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return c},o={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return s=>{switch(s.code){case"invalid_type":return`Entrada inválida: se esperaba ${r(s.expected)}, recibido ${r(i(s.input))}`;case"invalid_value":return s.values.length===1?`Entrada inválida: se esperaba ${nt(s.values[0])}`:`Opción inválida: se esperaba una de ${je(s.values,"|")}`;case"too_big":{const c=s.inclusive?"<=":"<",d=n(s.origin),f=r(s.origin);return d?`Demasiado grande: se esperaba que ${f??"valor"} tuviera ${c}${s.maximum.toString()} ${d.unit??"elementos"}`:`Demasiado grande: se esperaba que ${f??"valor"} fuera ${c}${s.maximum.toString()}`}case"too_small":{const c=s.inclusive?">=":">",d=n(s.origin),f=r(s.origin);return d?`Demasiado pequeño: se esperaba que ${f} tuviera ${c}${s.minimum.toString()} ${d.unit}`:`Demasiado pequeño: se esperaba que ${f} fuera ${c}${s.minimum.toString()}`}case"invalid_format":{const c=s;return c.format==="starts_with"?`Cadena inválida: debe comenzar con "${c.prefix}"`:c.format==="ends_with"?`Cadena inválida: debe terminar en "${c.suffix}"`:c.format==="includes"?`Cadena inválida: debe incluir "${c.includes}"`:c.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${c.pattern}`:`Inválido ${o[c.format]??s.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${s.divisor}`;case"unrecognized_keys":return`Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${je(s.keys,", ")}`;case"invalid_key":return`Llave inválida en ${r(s.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${r(s.origin)}`;default:return"Entrada inválida"}}};function yte(){return{localeError:vte()}}const bte=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"عدد";case"object":{if(Array.isArray(i))return"آرایه";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return i=>{switch(i.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${i.expected} میبود، ${n(i.input)} دریافت شد`;case"invalid_value":return i.values.length===1?`ورودی نامعتبر: میبایست ${nt(i.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${je(i.values,"|")} میبود`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`خیلی بزرگ: ${i.origin??"مقدار"} باید ${o}${i.maximum.toString()} ${s.unit??"عنصر"} باشد`:`خیلی بزرگ: ${i.origin??"مقدار"} باید ${o}${i.maximum.toString()} باشد`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`خیلی کوچک: ${i.origin} باید ${o}${i.minimum.toString()} ${s.unit} باشد`:`خیلی کوچک: ${i.origin} باید ${o}${i.minimum.toString()} باشد`}case"invalid_format":{const o=i;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${r[o.format]??i.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${i.divisor} باشد`;case"unrecognized_keys":return`کلید${i.keys.length>1?"های":""} ناشناس: ${je(i.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${i.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${i.origin}`;default:return"ورودی نامعتبر"}}};function xte(){return{localeError:bte()}}const wte=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return i=>{switch(i.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${i.expected}, oli ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Virheellinen syöte: täytyy olla ${nt(i.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Liian suuri: ${s.subject} täytyy olla ${o}${i.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Liian pieni: ${s.subject} täytyy olla ${o}${i.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${je(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function Ste(){return{localeError:wte()}}const _te=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"nombre";case"object":{if(Array.isArray(i))return"tableau";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return i=>{switch(i.code){case"invalid_type":return`Entrée invalide : ${i.expected} attendu, ${n(i.input)} reçu`;case"invalid_value":return i.values.length===1?`Entrée invalide : ${nt(i.values[0])} attendu`:`Option invalide : une valeur parmi ${je(i.values,"|")} attendue`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Trop grand : ${i.origin??"valeur"} doit ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"élément(s)"}`:`Trop grand : ${i.origin??"valeur"} doit être ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Trop petit : ${i.origin} doit ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Trop petit : ${i.origin} doit être ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${r[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${je(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function Cte(){return{localeError:_te()}}const Ete=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return i=>{switch(i.code){case"invalid_type":return`Entrée invalide : attendu ${i.expected}, reçu ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Entrée invalide : attendu ${nt(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"≤":"<",s=t(i.origin);return s?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${o}${i.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?"≥":">",s=t(i.origin);return s?`Trop petit : attendu que ${i.origin} ait ${o}${i.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${i.origin} soit ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${je(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function kte(){return{localeError:Ete()}}const Rte=()=>{const e={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return i=>{switch(i.code){case"invalid_type":return`קלט לא תקין: צריך ${i.expected}, התקבל ${n(i.input)}`;case"invalid_value":return i.values.length===1?`קלט לא תקין: צריך ${nt(i.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`גדול מדי: ${i.origin??"value"} צריך להיות ${o}${i.maximum.toString()} ${s.unit??"elements"}`:`גדול מדי: ${i.origin??"value"} צריך להיות ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`קטן מדי: ${i.origin} צריך להיות ${o}${i.minimum.toString()} ${s.unit}`:`קטן מדי: ${i.origin} צריך להיות ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`מחרוזת לא תקינה: חייבת להתחיל ב"${o.prefix}"`:o.format==="ends_with"?`מחרוזת לא תקינה: חייבת להסתיים ב "${o.suffix}"`:o.format==="includes"?`מחרוזת לא תקינה: חייבת לכלול "${o.includes}"`:o.format==="regex"?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${o.pattern}`:`${r[o.format]??i.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${i.divisor}`;case"unrecognized_keys":return`מפתח${i.keys.length>1?"ות":""} לא מזוה${i.keys.length>1?"ים":"ה"}: ${je(i.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${i.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${i.origin}`;default:return"קלט לא תקין"}}};function jte(){return{localeError:Rte()}}const Ite=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"szám";case"object":{if(Array.isArray(i))return"tömb";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return i=>{switch(i.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${i.expected}, a kapott érték ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Érvénytelen bemenet: a várt érték ${nt(i.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Túl nagy: ${i.origin??"érték"} mérete túl nagy ${o}${i.maximum.toString()} ${s.unit??"elem"}`:`Túl nagy: a bemeneti érték ${i.origin??"érték"} túl nagy: ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Túl kicsi: a bemeneti érték ${i.origin} mérete túl kicsi ${o}${i.minimum.toString()} ${s.unit}`:`Túl kicsi: a bemeneti érték ${i.origin} túl kicsi ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${r[o.format]??i.format}`}case"not_multiple_of":return`Érvénytelen szám: ${i.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${je(i.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${i.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${i.origin}`;default:return"Érvénytelen bemenet"}}};function Tte(){return{localeError:Ite()}}const Nte=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak valid: diharapkan ${i.expected}, diterima ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${nt(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${o}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Terlalu kecil: diharapkan ${i.origin} memiliki ${o}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${je(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function Ate(){return{localeError:Nte()}}const Ote=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},$te=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(r){return e[r]??null}const n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return r=>{switch(r.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${Ote(r.input)} þar sem á að vera ${r.expected}`;case"invalid_value":return r.values.length===1?`Rangt gildi: gert ráð fyrir ${nt(r.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${je(r.values,"|")}`;case"too_big":{const i=r.inclusive?"<=":"<",o=t(r.origin);return o?`Of stórt: gert er ráð fyrir að ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${o.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${r.origin??"gildi"} sé ${i}${r.maximum.toString()}`}case"too_small":{const i=r.inclusive?">=":">",o=t(r.origin);return o?`Of lítið: gert er ráð fyrir að ${r.origin} hafi ${i}${r.minimum.toString()} ${o.unit}`:`Of lítið: gert er ráð fyrir að ${r.origin} sé ${i}${r.minimum.toString()}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`Ógildur strengur: verður að byrja á "${i.prefix}"`:i.format==="ends_with"?`Ógildur strengur: verður að enda á "${i.suffix}"`:i.format==="includes"?`Ógildur strengur: verður að innihalda "${i.includes}"`:i.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??r.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`Óþekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${je(r.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${r.origin}`;default:return"Rangt gildi"}}};function Dte(){return{localeError:$te()}}const Pte=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"numero";case"object":{if(Array.isArray(i))return"vettore";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input non valido: atteso ${i.expected}, ricevuto ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Input non valido: atteso ${nt(i.values[0])}`:`Opzione non valida: atteso uno tra ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Troppo grande: ${i.origin??"valore"} deve avere ${o}${i.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Troppo piccolo: ${i.origin} deve avere ${o}${i.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${i.origin} deve essere ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${r[o.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${je(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function Mte(){return{localeError:Pte()}}const zte=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"数値";case"object":{if(Array.isArray(i))return"配列";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return i=>{switch(i.code){case"invalid_type":return`無効な入力: ${i.expected}が期待されましたが、${n(i.input)}が入力されました`;case"invalid_value":return i.values.length===1?`無効な入力: ${nt(i.values[0])}が期待されました`:`無効な選択: ${je(i.values,"、")}のいずれかである必要があります`;case"too_big":{const o=i.inclusive?"以下である":"より小さい",s=t(i.origin);return s?`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${s.unit??"要素"}${o}必要があります`:`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${o}必要があります`}case"too_small":{const o=i.inclusive?"以上である":"より大きい",s=t(i.origin);return s?`小さすぎる値: ${i.origin}は${i.minimum.toString()}${s.unit}${o}必要があります`:`小さすぎる値: ${i.origin}は${i.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=i;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${r[o.format]??i.format}`}case"not_multiple_of":return`無効な数値: ${i.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${i.keys.length>1?"群":""}: ${je(i.keys,"、")}`;case"invalid_key":return`${i.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${i.origin}内の無効な値`;default:return"無効な入力"}}};function Lte(){return{localeError:zte()}}const Ute=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"რიცხვი";case"object":{if(Array.isArray(e))return"მასივი";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[t]??t},Fte=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(r){return e[r]??null}const n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return r=>{switch(r.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${r.expected}, მიღებული ${Ute(r.input)}`;case"invalid_value":return r.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${nt(r.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${je(r.values,"|")}-დან`;case"too_big":{const i=r.inclusive?"<=":"<",o=t(r.origin);return o?`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} ${o.verb} ${i}${r.maximum.toString()} ${o.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} იყოს ${i}${r.maximum.toString()}`}case"too_small":{const i=r.inclusive?">=":">",o=t(r.origin);return o?`ზედმეტად პატარა: მოსალოდნელი ${r.origin} ${o.verb} ${i}${r.minimum.toString()} ${o.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${r.origin} იყოს ${i}${r.minimum.toString()}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${i.prefix}"-ით`:i.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${i.suffix}"-ით`:i.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${i.includes}"-ს`:i.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${i.pattern}`:`არასწორი ${n[i.format]??r.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${r.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${r.keys.length>1?"ები":"ი"}: ${je(r.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${r.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${r.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Vte(){return{localeError:Fte()}}const Bte=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(i))return"អារេ (Array)";if(i===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return i=>{switch(i.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${i.expected} ប៉ុន្តែទទួលបាន ${n(i.input)}`;case"invalid_value":return i.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${nt(i.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${o} ${i.maximum.toString()} ${s.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`តូចពេក៖ ត្រូវការ ${i.origin} ${o} ${i.minimum.toString()} ${s.unit}`:`តូចពេក៖ ត្រូវការ ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${r[o.format]??i.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${i.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${je(i.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function L4(){return{localeError:Bte()}}function Hte(){return L4()}const qte=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return i=>{switch(i.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${i.expected}, 받은 타입은 ${n(i.input)}입니다`;case"invalid_value":return i.values.length===1?`잘못된 입력: 값은 ${nt(i.values[0])} 이어야 합니다`:`잘못된 옵션: ${je(i.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=i.inclusive?"이하":"미만",s=o==="미만"?"이어야 합니다":"여야 합니다",c=t(i.origin),d=c?.unit??"요소";return c?`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()}${d} ${o}${s}`:`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()} ${o}${s}`}case"too_small":{const o=i.inclusive?"이상":"초과",s=o==="이상"?"이어야 합니다":"여야 합니다",c=t(i.origin),d=c?.unit??"요소";return c?`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()}${d} ${o}${s}`:`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()} ${o}${s}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${r[o.format]??i.format}`}case"not_multiple_of":return`잘못된 숫자: ${i.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${je(i.keys,", ")}`;case"invalid_key":return`잘못된 키: ${i.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${i.origin}`;default:return"잘못된 입력"}}};function Gte(){return{localeError:qte()}}const Kte=e=>bm(typeof e,e),bm=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"nežinomas objektas":t===null?"nulinė reikšmė":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return e},tm=e=>e.charAt(0).toUpperCase()+e.slice(1);function AO(e){const t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?"many":n===1?"one":"few"}const Zte=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(r,i,o,s){const c=e[r]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[s][o?"inclusive":"notInclusive"]}}const n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return r=>{switch(r.code){case"invalid_type":return`Gautas tipas ${Kte(r.input)}, o tikėtasi - ${bm(r.expected)}`;case"invalid_value":return r.values.length===1?`Privalo būti ${nt(r.values[0])}`:`Privalo būti vienas iš ${je(r.values,"|")} pasirinkimų`;case"too_big":{const i=bm(r.origin),o=t(r.origin,AO(Number(r.maximum)),r.inclusive??!1,"smaller");if(o?.verb)return`${tm(i??r.origin??"reikšmė")} ${o.verb} ${r.maximum.toString()} ${o.unit??"elementų"}`;const s=r.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${tm(i??r.origin??"reikšmė")} turi būti ${s} ${r.maximum.toString()} ${o?.unit}`}case"too_small":{const i=bm(r.origin),o=t(r.origin,AO(Number(r.minimum)),r.inclusive??!1,"bigger");if(o?.verb)return`${tm(i??r.origin??"reikšmė")} ${o.verb} ${r.minimum.toString()} ${o.unit??"elementų"}`;const s=r.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${tm(i??r.origin??"reikšmė")} turi būti ${s} ${r.minimum.toString()} ${o?.unit}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`Eilutė privalo prasidėti "${i.prefix}"`:i.format==="ends_with"?`Eilutė privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilutė privalo įtraukti "${i.includes}"`:i.format==="regex"?`Eilutė privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??r.format}`}case"not_multiple_of":return`Skaičius privalo būti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${je(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const i=bm(r.origin);return`${tm(i??r.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Yte(){return{localeError:Zte()}}const Wte=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"број";case"object":{if(Array.isArray(i))return"низа";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return i=>{switch(i.code){case"invalid_type":return`Грешен внес: се очекува ${i.expected}, примено ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${nt(i.values[0])}`:`Грешана опција: се очекува една ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Премногу голем: се очекува ${i.origin??"вредноста"} да има ${o}${i.maximum.toString()} ${s.unit??"елементи"}`:`Премногу голем: се очекува ${i.origin??"вредноста"} да биде ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Премногу мал: се очекува ${i.origin} да има ${o}${i.minimum.toString()} ${s.unit}`:`Премногу мал: се очекува ${i.origin} да биде ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${r[o.format]??i.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${je(i.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${i.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${i.origin}`;default:return"Грешен внес"}}};function Xte(){return{localeError:Wte()}}const Qte=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"nombor";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak sah: dijangka ${i.expected}, diterima ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${nt(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Terlalu besar: dijangka ${i.origin??"nilai"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Terlalu kecil: dijangka ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${je(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function Jte(){return{localeError:Qte()}}const ene=()=>{const e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"getal";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return i=>{switch(i.code){case"invalid_type":return`Ongeldige invoer: verwacht ${i.expected}, ontving ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${nt(i.values[0])}`:`Ongeldige optie: verwacht één van ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Te lang: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} is`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Te kort: verwacht dat ${i.origin} ${o}${i.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${i.origin} ${o}${i.minimum.toString()} is`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${je(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function tne(){return{localeError:ene()}}const nne=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"tall";case"object":{if(Array.isArray(i))return"liste";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Ugyldig input: forventet ${i.expected}, fikk ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${nt(i.values[0])}`:`Ugyldig valg: forventet en av ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`For stor(t): forventet ${i.origin??"value"} til å ha ${o}${i.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til å ha ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`For lite(n): forventet ${i.origin} til å ha ${o}${i.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${i.origin} til å ha ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${r[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${je(i.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function rne(){return{localeError:nne()}}const ine=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"numara";case"object":{if(Array.isArray(i))return"saf";if(i===null)return"gayb";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return i=>{switch(i.code){case"invalid_type":return`Fâsit giren: umulan ${i.expected}, alınan ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Fâsit giren: umulan ${nt(i.values[0])}`:`Fâsit tercih: mûteberler ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Fazla büyük: ${i.origin??"value"}, ${o}${i.maximum.toString()} ${s.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${i.origin??"value"}, ${o}${i.maximum.toString()} olmalıydı.`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Fazla küçük: ${i.origin}, ${o}${i.minimum.toString()} ${s.unit} sahip olmalıydı.`:`Fazla küçük: ${i.origin}, ${o}${i.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${r[o.format]??i.format}`}case"not_multiple_of":return`Fâsit sayı: ${i.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${i.keys.length>1?"s":""}: ${je(i.keys,", ")}`;case"invalid_key":return`${i.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${i.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function one(){return{localeError:ine()}}const ane=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"عدد";case"object":{if(Array.isArray(i))return"ارې";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return i=>{switch(i.code){case"invalid_type":return`ناسم ورودي: باید ${i.expected} وای, مګر ${n(i.input)} ترلاسه شو`;case"invalid_value":return i.values.length===1?`ناسم ورودي: باید ${nt(i.values[0])} وای`:`ناسم انتخاب: باید یو له ${je(i.values,"|")} څخه وای`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`ډیر لوی: ${i.origin??"ارزښت"} باید ${o}${i.maximum.toString()} ${s.unit??"عنصرونه"} ولري`:`ډیر لوی: ${i.origin??"ارزښت"} باید ${o}${i.maximum.toString()} وي`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`ډیر کوچنی: ${i.origin} باید ${o}${i.minimum.toString()} ${s.unit} ولري`:`ډیر کوچنی: ${i.origin} باید ${o}${i.minimum.toString()} وي`}case"invalid_format":{const o=i;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${r[o.format]??i.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${i.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${i.keys.length>1?"کلیډونه":"کلیډ"}: ${je(i.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${i.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${i.origin} کې`;default:return"ناسمه ورودي"}}};function sne(){return{localeError:ane()}}const lne=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"liczba";case"object":{if(Array.isArray(i))return"tablica";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return i=>{switch(i.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${i.expected}, otrzymano ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${nt(i.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Za duża wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${o}${i.maximum.toString()} ${s.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Za mała wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${o}${i.minimum.toString()} ${s.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${r[o.format]??i.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${je(i.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${i.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${i.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function cne(){return{localeError:lne()}}const une=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"número";case"object":{if(Array.isArray(i))return"array";if(i===null)return"nulo";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipo inválido: esperado ${i.expected}, recebido ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Entrada inválida: esperado ${nt(i.values[0])}`:`Opção inválida: esperada uma das ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${o}${i.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Muito pequeno: esperado que ${i.origin} tivesse ${o}${i.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${r[o.format]??i.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${je(i.keys,", ")}`;case"invalid_key":return`Chave inválida em ${i.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${i.origin}`;default:return"Campo inválido"}}};function dne(){return{localeError:une()}}function OO(e,t,n,r){const i=Math.abs(e),o=i%10,s=i%100;return s>=11&&s<=19?r:o===1?t:o>=2&&o<=4?n:r}const fne=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"число";case"object":{if(Array.isArray(i))return"массив";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return i=>{switch(i.code){case"invalid_type":return`Неверный ввод: ожидалось ${i.expected}, получено ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Неверный ввод: ожидалось ${nt(i.values[0])}`:`Неверный вариант: ожидалось одно из ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);if(s){const c=Number(i.maximum),d=OO(c,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет иметь ${o}${i.maximum.toString()} ${d}`}return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);if(s){const c=Number(i.minimum),d=OO(c,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${i.origin} будет иметь ${o}${i.minimum.toString()} ${d}`}return`Слишком маленькое значение: ожидалось, что ${i.origin} будет ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${r[o.format]??i.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспознанн${i.keys.length>1?"ые":"ый"} ключ${i.keys.length>1?"и":""}: ${je(i.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${i.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${i.origin}`;default:return"Неверные входные данные"}}};function mne(){return{localeError:fne()}}const pne=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"število";case"object":{if(Array.isArray(i))return"tabela";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return i=>{switch(i.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${i.expected}, prejeto ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Neveljaven vnos: pričakovano ${nt(i.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} imelo ${o}${i.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Premajhno: pričakovano, da bo ${i.origin} imelo ${o}${i.minimum.toString()} ${s.unit}`:`Premajhno: pričakovano, da bo ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??i.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i ključi":" ključ"}: ${je(i.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function hne(){return{localeError:pne()}}const gne=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"antal";case"object":{if(Array.isArray(i))return"lista";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return i=>{switch(i.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${i.expected}, fick ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Ogiltig inmatning: förväntat ${nt(i.values[0])}`:`Ogiltigt val: förväntade en av ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`För stor(t): förväntade ${i.origin??"värdet"} att ha ${o}${i.maximum.toString()} ${s.unit??"element"}`:`För stor(t): förväntat ${i.origin??"värdet"} att ha ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`För lite(t): förväntade ${i.origin??"värdet"} att ha ${o}${i.minimum.toString()} ${s.unit}`:`För lite(t): förväntade ${i.origin??"värdet"} att ha ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${je(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${i.origin??"värdet"}`;default:return"Ogiltig input"}}};function vne(){return{localeError:gne()}}const yne=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(i))return"அணி";if(i===null)return"வெறுமை";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${i.expected}, பெறப்பட்டது ${n(i.input)}`;case"invalid_value":return i.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${nt(i.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${je(i.values,"|")} இல் ஒன்று`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${o}${i.maximum.toString()} ${s.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${o}${i.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${o}${i.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${o}${i.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=i;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${r[o.format]??i.format}`}case"not_multiple_of":return`தவறான எண்: ${i.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${i.keys.length>1?"கள்":""}: ${je(i.keys,", ")}`;case"invalid_key":return`${i.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${i.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function bne(){return{localeError:yne()}}const xne=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(i))return"อาร์เรย์ (Array)";if(i===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return i=>{switch(i.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${i.expected} แต่ได้รับ ${n(i.input)}`;case"invalid_value":return i.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${nt(i.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"ไม่เกิน":"น้อยกว่า",s=t(i.origin);return s?`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${o} ${i.maximum.toString()} ${s.unit??"รายการ"}`:`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${o} ${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?"อย่างน้อย":"มากกว่า",s=t(i.origin);return s?`น้อยกว่ากำหนด: ${i.origin} ควรมี${o} ${i.minimum.toString()} ${s.unit}`:`น้อยกว่ากำหนด: ${i.origin} ควรมี${o} ${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${r[o.format]??i.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${i.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${je(i.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${i.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${i.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function wne(){return{localeError:xne()}}const Sne=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},_ne=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(r){return e[r]??null}const n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return r=>{switch(r.code){case"invalid_type":return`Geçersiz değer: beklenen ${r.expected}, alınan ${Sne(r.input)}`;case"invalid_value":return r.values.length===1?`Geçersiz değer: beklenen ${nt(r.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${je(r.values,"|")}`;case"too_big":{const i=r.inclusive?"<=":"<",o=t(r.origin);return o?`Çok büyük: beklenen ${r.origin??"değer"} ${i}${r.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${r.origin??"değer"} ${i}${r.maximum.toString()}`}case"too_small":{const i=r.inclusive?">=":">",o=t(r.origin);return o?`Çok küçük: beklenen ${r.origin} ${i}${r.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`Geçersiz metin: "${i.prefix}" ile başlamalı`:i.format==="ends_with"?`Geçersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Geçersiz metin: "${i.includes}" içermeli`:i.format==="regex"?`Geçersiz metin: ${i.pattern} desenine uymalı`:`Geçersiz ${n[i.format]??r.format}`}case"not_multiple_of":return`Geçersiz sayı: ${r.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${r.keys.length>1?"lar":""}: ${je(r.keys,", ")}`;case"invalid_key":return`${r.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${r.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Cne(){return{localeError:_ne()}}const Ene=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"число";case"object":{if(Array.isArray(i))return"масив";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return i=>{switch(i.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${i.expected}, отримано ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Неправильні вхідні дані: очікується ${nt(i.values[0])}`:`Неправильна опція: очікується одне з ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Занадто велике: очікується, що ${i.origin??"значення"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"елементів"}`:`Занадто велике: очікується, що ${i.origin??"значення"} буде ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Занадто мале: очікується, що ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Занадто мале: очікується, що ${i.origin} буде ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${r[o.format]??i.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${i.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${i.keys.length>1?"і":""}: ${je(i.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${i.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${i.origin}`;default:return"Неправильні вхідні дані"}}};function U4(){return{localeError:Ene()}}function kne(){return U4()}const Rne=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"نمبر";case"object":{if(Array.isArray(i))return"آرے";if(i===null)return"نل";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return i=>{switch(i.code){case"invalid_type":return`غلط ان پٹ: ${i.expected} متوقع تھا، ${n(i.input)} موصول ہوا`;case"invalid_value":return i.values.length===1?`غلط ان پٹ: ${nt(i.values[0])} متوقع تھا`:`غلط آپشن: ${je(i.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`بہت بڑا: ${i.origin??"ویلیو"} کے ${o}${i.maximum.toString()} ${s.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${i.origin??"ویلیو"} کا ${o}${i.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`بہت چھوٹا: ${i.origin} کے ${o}${i.minimum.toString()} ${s.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${i.origin} کا ${o}${i.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=i;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${r[o.format]??i.format}`}case"not_multiple_of":return`غلط نمبر: ${i.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${i.keys.length>1?"ز":""}: ${je(i.keys,"، ")}`;case"invalid_key":return`${i.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${i.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function jne(){return{localeError:Rne()}}const Ine=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"số";case"object":{if(Array.isArray(i))return"mảng";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return i=>{switch(i.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${i.expected}, nhận được ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Đầu vào không hợp lệ: mong đợi ${nt(i.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Quá lớn: mong đợi ${i.origin??"giá trị"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"phần tử"}`:`Quá lớn: mong đợi ${i.origin??"giá trị"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Quá nhỏ: mong đợi ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Quá nhỏ: mong đợi ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${r[o.format]??i.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${i.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${je(i.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${i.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${i.origin}`;default:return"Đầu vào không hợp lệ"}}};function Tne(){return{localeError:Ine()}}const Nne=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(i))return"数组";if(i===null)return"空值(null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return i=>{switch(i.code){case"invalid_type":return`无效输入:期望 ${i.expected},实际接收 ${n(i.input)}`;case"invalid_value":return i.values.length===1?`无效输入:期望 ${nt(i.values[0])}`:`无效选项:期望以下之一 ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`数值过大:期望 ${i.origin??"值"} ${o}${i.maximum.toString()} ${s.unit??"个元素"}`:`数值过大:期望 ${i.origin??"值"} ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`数值过小:期望 ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`数值过小:期望 ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${r[o.format]??i.format}`}case"not_multiple_of":return`无效数字:必须是 ${i.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${je(i.keys,", ")}`;case"invalid_key":return`${i.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${i.origin} 中包含无效值(value)`;default:return"无效输入"}}};function Ane(){return{localeError:Nne()}}const One=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return i=>{switch(i.code){case"invalid_type":return`無效的輸入值:預期為 ${i.expected},但收到 ${n(i.input)}`;case"invalid_value":return i.values.length===1?`無效的輸入值:預期為 ${nt(i.values[0])}`:`無效的選項:預期為以下其中之一 ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`數值過大:預期 ${i.origin??"值"} 應為 ${o}${i.maximum.toString()} ${s.unit??"個元素"}`:`數值過大:預期 ${i.origin??"值"} 應為 ${o}${i.maximum.toString()}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`數值過小:預期 ${i.origin} 應為 ${o}${i.minimum.toString()} ${s.unit}`:`數值過小:預期 ${i.origin} 應為 ${o}${i.minimum.toString()}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${r[o.format]??i.format}`}case"not_multiple_of":return`無效的數字:必須為 ${i.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${i.keys.length>1?"們":""}:${je(i.keys,"、")}`;case"invalid_key":return`${i.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${i.origin} 中有無效的值`;default:return"無效的輸入值"}}};function $ne(){return{localeError:One()}}const Dne=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(i){return e[i]??null}const n=i=>{const o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(i))return"akopọ";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},r={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return i=>{switch(i.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${i.expected}, àmọ̀ a rí ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${nt(i.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${je(i.values,"|")}`;case"too_big":{const o=i.inclusive?"<=":"<",s=t(i.origin);return s?`Tó pọ̀ jù: a ní láti jẹ́ pé ${i.origin??"iye"} ${s.verb} ${o}${i.maximum} ${s.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${o}${i.maximum}`}case"too_small":{const o=i.inclusive?">=":">",s=t(i.origin);return s?`Kéré ju: a ní láti jẹ́ pé ${i.origin} ${s.verb} ${o}${i.minimum} ${s.unit}`:`Kéré ju: a ní láti jẹ́ ${o}${i.minimum}`}case"invalid_format":{const o=i;return o.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"`:o.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"`:o.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"`:o.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}`:`Aṣìṣe: ${r[o.format]??i.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${i.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${je(i.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${i.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${i.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function Pne(){return{localeError:Dne()}}const F4=Object.freeze(Object.defineProperty({__proto__:null,ar:Wee,az:Qee,be:ete,bg:rte,ca:ote,cs:ste,da:cte,de:dte,en:z4,eo:gte,es:yte,fa:xte,fi:Ste,fr:Cte,frCA:kte,he:jte,hu:Tte,id:Ate,is:Dte,it:Mte,ja:Lte,ka:Vte,kh:Hte,km:L4,ko:Gte,lt:Yte,mk:Xte,ms:Jte,nl:tne,no:rne,ota:one,pl:cne,ps:sne,pt:dne,ru:mne,sl:hne,sv:vne,ta:bne,th:wne,tr:Cne,ua:kne,uk:U4,ur:jne,vi:Tne,yo:Pne,zhCN:Ane,zhTW:$ne},Symbol.toStringTag,{value:"Module"})),V4=Symbol("ZodOutput"),B4=Symbol("ZodInput");class dE{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function fE(){return new dE}const zl=fE();function H4(e,t){return new e({type:"string",...we(t)})}function q4(e,t){return new e({type:"string",coerce:!0,...we(t)})}function mE(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...we(t)})}function Gv(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...we(t)})}function pE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...we(t)})}function hE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...we(t)})}function gE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...we(t)})}function vE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...we(t)})}function ob(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...we(t)})}function yE(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...we(t)})}function bE(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...we(t)})}function xE(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...we(t)})}function wE(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...we(t)})}function SE(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...we(t)})}function _E(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...we(t)})}function CE(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...we(t)})}function EE(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...we(t)})}function kE(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...we(t)})}function RE(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...we(t)})}function jE(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...we(t)})}function IE(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...we(t)})}function TE(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...we(t)})}function NE(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...we(t)})}function AE(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...we(t)})}const G4={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function K4(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...we(t)})}function Z4(e,t){return new e({type:"string",format:"date",check:"string_format",...we(t)})}function Y4(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...we(t)})}function W4(e,t){return new e({type:"string",format:"duration",check:"string_format",...we(t)})}function X4(e,t){return new e({type:"number",checks:[],...we(t)})}function Q4(e,t){return new e({type:"number",coerce:!0,checks:[],...we(t)})}function J4(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...we(t)})}function eU(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...we(t)})}function tU(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...we(t)})}function nU(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...we(t)})}function rU(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...we(t)})}function iU(e,t){return new e({type:"boolean",...we(t)})}function oU(e,t){return new e({type:"boolean",coerce:!0,...we(t)})}function aU(e,t){return new e({type:"bigint",...we(t)})}function sU(e,t){return new e({type:"bigint",coerce:!0,...we(t)})}function lU(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...we(t)})}function cU(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...we(t)})}function uU(e,t){return new e({type:"symbol",...we(t)})}function dU(e,t){return new e({type:"undefined",...we(t)})}function fU(e,t){return new e({type:"null",...we(t)})}function mU(e){return new e({type:"any"})}function pU(e){return new e({type:"unknown"})}function hU(e,t){return new e({type:"never",...we(t)})}function gU(e,t){return new e({type:"void",...we(t)})}function vU(e,t){return new e({type:"date",...we(t)})}function yU(e,t){return new e({type:"date",coerce:!0,...we(t)})}function bU(e,t){return new e({type:"nan",...we(t)})}function rc(e,t){return new nE({check:"less_than",...we(t),value:e,inclusive:!1})}function Ro(e,t){return new nE({check:"less_than",...we(t),value:e,inclusive:!0})}function ic(e,t){return new rE({check:"greater_than",...we(t),value:e,inclusive:!1})}function Ri(e,t){return new rE({check:"greater_than",...we(t),value:e,inclusive:!0})}function xU(e){return ic(0,e)}function wU(e){return rc(0,e)}function SU(e){return Ro(0,e)}function _U(e){return Ri(0,e)}function Um(e,t){return new sL({check:"multiple_of",...we(t),value:e})}function ab(e,t){return new uL({check:"max_size",...we(t),maximum:e})}function Fm(e,t){return new dL({check:"min_size",...we(t),minimum:e})}function OE(e,t){return new fL({check:"size_equals",...we(t),size:e})}function sb(e,t){return new mL({check:"max_length",...we(t),maximum:e})}function dd(e,t){return new pL({check:"min_length",...we(t),minimum:e})}function lb(e,t){return new hL({check:"length_equals",...we(t),length:e})}function $E(e,t){return new gL({check:"string_format",format:"regex",...we(t),pattern:e})}function DE(e){return new vL({check:"string_format",format:"lowercase",...we(e)})}function PE(e){return new yL({check:"string_format",format:"uppercase",...we(e)})}function ME(e,t){return new bL({check:"string_format",format:"includes",...we(t),includes:e})}function zE(e,t){return new xL({check:"string_format",format:"starts_with",...we(t),prefix:e})}function LE(e,t){return new wL({check:"string_format",format:"ends_with",...we(t),suffix:e})}function CU(e,t,n){return new SL({check:"property",property:e,schema:t,...we(n)})}function UE(e,t){return new _L({check:"mime_type",mime:e,...we(t)})}function bc(e){return new CL({check:"overwrite",tx:e})}function FE(e){return bc(t=>t.normalize(e))}function VE(){return bc(e=>e.trim())}function BE(){return bc(e=>e.toLowerCase())}function HE(){return bc(e=>e.toUpperCase())}function EU(e,t,n){return new e({type:"array",element:t,...we(n)})}function Mne(e,t,n){return new e({type:"union",options:t,...we(n)})}function zne(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...we(r)})}function Lne(e,t,n){return new e({type:"intersection",left:t,right:n})}function Une(e,t,n,r){const i=n instanceof lt,o=i?r:n,s=i?n:null;return new e({type:"tuple",items:t,rest:s,...we(o)})}function Fne(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...we(r)})}function Vne(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...we(r)})}function Bne(e,t,n){return new e({type:"set",valueType:t,...we(n)})}function Hne(e,t,n){const r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:r,...we(n)})}function qne(e,t,n){return new e({type:"enum",entries:t,...we(n)})}function Gne(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...we(n)})}function kU(e,t){return new e({type:"file",...we(t)})}function Kne(e,t){return new e({type:"transform",transform:t})}function Zne(e,t){return new e({type:"optional",innerType:t})}function Yne(e,t){return new e({type:"nullable",innerType:t})}function Wne(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():tb(n)}})}function Xne(e,t,n){return new e({type:"nonoptional",innerType:t,...we(n)})}function Qne(e,t){return new e({type:"success",innerType:t})}function Jne(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function ere(e,t,n){return new e({type:"pipe",in:t,out:n})}function tre(e,t){return new e({type:"readonly",innerType:t})}function nre(e,t,n){return new e({type:"template_literal",parts:t,...we(n)})}function rre(e,t){return new e({type:"lazy",getter:t})}function ire(e,t){return new e({type:"promise",innerType:t})}function RU(e,t,n){const r=we(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function jU(e,t,n){return new e({type:"custom",check:"custom",fn:t,...we(n)})}function IU(e){const t=TU(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(cd(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(cd(i))}},e(n.value,n)));return t}function TU(e,t){const n=new jn({check:"custom",...we(t)});return n._zod.check=e,n}function NU(e,t){const n=we(t);let r=n.truthy??["true","1","yes","on","y","enabled"],i=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(r=r.map(y=>typeof y=="string"?y.toLowerCase():y),i=i.map(y=>typeof y=="string"?y.toLowerCase():y));const o=new Set(r),s=new Set(i),c=e.Codec??uE,d=e.Boolean??aE,f=e.String??Rp,p=new f({type:"string",error:n.error}),h=new d({type:"boolean",error:n.error}),v=new c({type:"pipe",in:p,out:h,transform:((y,b)=>{let S=y;return n.case!=="sensitive"&&(S=S.toLowerCase()),o.has(S)?!0:s.has(S)?!1:(b.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:b.value,inst:v,continue:!1}),{})}),reverseTransform:((y,b)=>y===!0?r[0]||"true":i[0]||"false"),error:n.error});return v}function jp(e,t,n,r={}){const i=we(r),o={...we(r),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:c=>n.test(c),...i};return n instanceof RegExp&&(o.pattern=n),new e(o)}class X_{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??zl,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,n={path:[],schemaPath:[]}){var r;const i=t._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,n.schemaPath.includes(t)&&(s.cycle=n.path),s.schema;const c={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(t,c);const d=t._zod.toJSONSchema?.();if(d)c.schema=d;else{const h={...n,schemaPath:[...n.schemaPath,t],path:n.path},v=t._zod.parent;if(v)c.ref=v,this.process(v,h),this.seen.get(v).isParent=!0;else{const y=c.schema;switch(i.type){case"string":{const b=y;b.type="string";const{minimum:S,maximum:C,format:E,patterns:k,contentEncoding:R}=t._zod.bag;if(typeof S=="number"&&(b.minLength=S),typeof C=="number"&&(b.maxLength=C),E&&(b.format=o[E]??E,b.format===""&&delete b.format),R&&(b.contentEncoding=R),k&&k.size>0){const I=[...k];I.length===1?b.pattern=I[0].source:I.length>1&&(c.schema.allOf=[...I.map(A=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:A.source}))])}break}case"number":{const b=y,{minimum:S,maximum:C,format:E,multipleOf:k,exclusiveMaximum:R,exclusiveMinimum:I}=t._zod.bag;typeof E=="string"&&E.includes("int")?b.type="integer":b.type="number",typeof I=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(b.minimum=I,b.exclusiveMinimum=!0):b.exclusiveMinimum=I),typeof S=="number"&&(b.minimum=S,typeof I=="number"&&this.target!=="draft-4"&&(I>=S?delete b.minimum:delete b.exclusiveMinimum)),typeof R=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(b.maximum=R,b.exclusiveMaximum=!0):b.exclusiveMaximum=R),typeof C=="number"&&(b.maximum=C,typeof R=="number"&&this.target!=="draft-4"&&(R<=C?delete b.maximum:delete b.exclusiveMaximum)),typeof k=="number"&&(b.multipleOf=k);break}case"boolean":{const b=y;b.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(y.type="string",y.nullable=!0,y.enum=[null]):y.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{y.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const b=y,{minimum:S,maximum:C}=t._zod.bag;typeof S=="number"&&(b.minItems=S),typeof C=="number"&&(b.maxItems=C),b.type="array",b.items=this.process(i.element,{...h,path:[...h.path,"items"]});break}case"object":{const b=y;b.type="object",b.properties={};const S=i.shape;for(const k in S)b.properties[k]=this.process(S[k],{...h,path:[...h.path,"properties",k]});const C=new Set(Object.keys(S)),E=new Set([...C].filter(k=>{const R=i.shape[k]._zod;return this.io==="input"?R.optin===void 0:R.optout===void 0}));E.size>0&&(b.required=Array.from(E)),i.catchall?._zod.def.type==="never"?b.additionalProperties=!1:i.catchall?i.catchall&&(b.additionalProperties=this.process(i.catchall,{...h,path:[...h.path,"additionalProperties"]})):this.io==="output"&&(b.additionalProperties=!1);break}case"union":{const b=y,S=i.options.map((C,E)=>this.process(C,{...h,path:[...h.path,"anyOf",E]}));b.anyOf=S;break}case"intersection":{const b=y,S=this.process(i.left,{...h,path:[...h.path,"allOf",0]}),C=this.process(i.right,{...h,path:[...h.path,"allOf",1]}),E=R=>"allOf"in R&&Object.keys(R).length===1,k=[...E(S)?S.allOf:[S],...E(C)?C.allOf:[C]];b.allOf=k;break}case"tuple":{const b=y;b.type="array";const S=this.target==="draft-2020-12"?"prefixItems":"items",C=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",E=i.items.map((A,T)=>this.process(A,{...h,path:[...h.path,S,T]})),k=i.rest?this.process(i.rest,{...h,path:[...h.path,C,...this.target==="openapi-3.0"?[i.items.length]:[]]}):null;this.target==="draft-2020-12"?(b.prefixItems=E,k&&(b.items=k)):this.target==="openapi-3.0"?(b.items={anyOf:E},k&&b.items.anyOf.push(k),b.minItems=E.length,k||(b.maxItems=E.length)):(b.items=E,k&&(b.additionalItems=k));const{minimum:R,maximum:I}=t._zod.bag;typeof R=="number"&&(b.minItems=R),typeof I=="number"&&(b.maxItems=I);break}case"record":{const b=y;b.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(b.propertyNames=this.process(i.keyType,{...h,path:[...h.path,"propertyNames"]})),b.additionalProperties=this.process(i.valueType,{...h,path:[...h.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const b=y,S=F1(i.entries);S.every(C=>typeof C=="number")&&(b.type="number"),S.every(C=>typeof C=="string")&&(b.type="string"),b.enum=S;break}case"literal":{const b=y,S=[];for(const C of i.values)if(C===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof C=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");S.push(Number(C))}else S.push(C);if(S.length!==0)if(S.length===1){const C=S[0];b.type=C===null?"null":typeof C,this.target==="draft-4"||this.target==="openapi-3.0"?b.enum=[C]:b.const=C}else S.every(C=>typeof C=="number")&&(b.type="number"),S.every(C=>typeof C=="string")&&(b.type="string"),S.every(C=>typeof C=="boolean")&&(b.type="string"),S.every(C=>C===null)&&(b.type="null"),b.enum=S;break}case"file":{const b=y,S={type:"string",format:"binary",contentEncoding:"binary"},{minimum:C,maximum:E,mime:k}=t._zod.bag;C!==void 0&&(S.minLength=C),E!==void 0&&(S.maxLength=E),k?k.length===1?(S.contentMediaType=k[0],Object.assign(b,S)):b.anyOf=k.map(R=>({...S,contentMediaType:R})):Object.assign(b,S);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const b=this.process(i.innerType,h);this.target==="openapi-3.0"?(c.ref=i.innerType,y.nullable=!0):y.anyOf=[b,{type:"null"}];break}case"nonoptional":{this.process(i.innerType,h),c.ref=i.innerType;break}case"success":{const b=y;b.type="boolean";break}case"default":{this.process(i.innerType,h),c.ref=i.innerType,y.default=JSON.parse(JSON.stringify(i.defaultValue));break}case"prefault":{this.process(i.innerType,h),c.ref=i.innerType,this.io==="input"&&(y._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break}case"catch":{this.process(i.innerType,h),c.ref=i.innerType;let b;try{b=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}y.default=b;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const b=y,S=t._zod.pattern;if(!S)throw new Error("Pattern not found in template literal");b.type="string",b.pattern=S.source;break}case"pipe":{const b=this.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;this.process(b,h),c.ref=b;break}case"readonly":{this.process(i.innerType,h),c.ref=i.innerType,y.readOnly=!0;break}case"promise":{this.process(i.innerType,h),c.ref=i.innerType;break}case"optional":{this.process(i.innerType,h),c.ref=i.innerType;break}case"lazy":{const b=t._zod.innerType;this.process(b,h),c.ref=b;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}const f=this.metadataRegistry.get(t);return f&&Object.assign(c.schema,f),this.io==="input"&&Xn(t)&&(delete c.schema.examples,delete c.schema.default),this.io==="input"&&c.schema._prefault&&((r=c.schema).default??(r.default=c.schema._prefault)),delete c.schema._prefault,this.seen.get(t).schema}emit(t,n){const r={cycles:n?.cycles??"ref",reused:n?.reused??"inline",external:n?.external??void 0},i=this.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=p=>{const h=this.target==="draft-2020-12"?"$defs":"definitions";if(r.external){const S=r.external.registry.get(p[0])?.id,C=r.external.uri??(k=>k);if(S)return{ref:C(S)};const E=p[1].defId??p[1].schema.id??`schema${this.counter++}`;return p[1].defId=E,{defId:E,ref:`${C("__shared")}#/${h}/${E}`}}if(p[1]===i)return{ref:"#"};const y=`#/${h}/`,b=p[1].schema.id??`__schema${this.counter++}`;return{defId:b,ref:y+b}},s=p=>{if(p[1].schema.$ref)return;const h=p[1],{ref:v,defId:y}=o(p);h.def={...h.schema},y&&(h.defId=y);const b=h.schema;for(const S in b)delete b[S];b.$ref=v};if(r.cycles==="throw")for(const p of this.seen.entries()){const h=p[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
|
|
434
|
-
|
|
435
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const p of this.seen.entries()){const h=p[1];if(t===p[0]){s(p);continue}if(r.external){const y=r.external.registry.get(p[0])?.id;if(t!==p[0]&&y){s(p);continue}}if(this.metadataRegistry.get(p[0])?.id){s(p);continue}if(h.cycle){s(p);continue}if(h.count>1&&r.reused==="ref"){s(p);continue}}const c=(p,h)=>{const v=this.seen.get(p),y=v.def??v.schema,b={...y};if(v.ref===null)return;const S=v.ref;if(v.ref=null,S){c(S,h);const C=this.seen.get(S).schema;C.$ref&&(h.target==="draft-7"||h.target==="draft-4"||h.target==="openapi-3.0")?(y.allOf=y.allOf??[],y.allOf.push(C)):(Object.assign(y,C),Object.assign(y,b))}v.isParent||this.override({zodSchema:p,jsonSchema:y,path:v.path??[]})};for(const p of[...this.seen.entries()].reverse())c(p[0],{target:this.target});const d={};if(this.target==="draft-2020-12"?d.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?d.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?d.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),r.external?.uri){const p=r.external.registry.get(t)?.id;if(!p)throw new Error("Schema is missing an `id` property");d.$id=r.external.uri(p)}Object.assign(d,i.def);const f=r.external?.defs??{};for(const p of this.seen.entries()){const h=p[1];h.def&&h.defId&&(f[h.defId]=h.def)}r.external||Object.keys(f).length>0&&(this.target==="draft-2020-12"?d.$defs=f:d.definitions=f);try{return JSON.parse(JSON.stringify(d))}catch{throw new Error("Error converting schema to JSON.")}}}function AU(e,t){if(e instanceof dE){const r=new X_(t),i={};for(const c of e._idmap.entries()){const[d,f]=c;r.process(f)}const o={},s={registry:e,uri:t?.uri,defs:i};for(const c of e._idmap.entries()){const[d,f]=c;o[d]=r.emit(f,{...t,external:s})}if(Object.keys(i).length>0){const c=r.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[c]:i}}return{schemas:o}}const n=new X_(t);return n.process(e),n.emit(e,t)}function Xn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;switch(i.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Xn(i.element,n);case"object":{for(const o in i.shape)if(Xn(i.shape[o],n))return!0;return!1}case"union":{for(const o of i.options)if(Xn(o,n))return!0;return!1}case"intersection":return Xn(i.left,n)||Xn(i.right,n);case"tuple":{for(const o of i.items)if(Xn(o,n))return!0;return!!(i.rest&&Xn(i.rest,n))}case"record":return Xn(i.keyType,n)||Xn(i.valueType,n);case"map":return Xn(i.keyType,n)||Xn(i.valueType,n);case"set":return Xn(i.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Xn(i.innerType,n);case"lazy":return Xn(i.getter(),n);case"default":return Xn(i.innerType,n);case"prefault":return Xn(i.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return Xn(i.in,n)||Xn(i.out,n);case"success":return!1;case"catch":return!1;case"function":return!1}throw new Error(`Unknown schema type: ${i.type}`)}const ore=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),are=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:i4,$ZodArray:c4,$ZodAsyncError:Kl,$ZodBase64:GL,$ZodBase64URL:ZL,$ZodBigInt:sE,$ZodBigIntFormat:e4,$ZodBoolean:aE,$ZodCIDRv4:HL,$ZodCIDRv6:qL,$ZodCUID:OL,$ZodCUID2:$L,$ZodCatch:I4,$ZodCheck:jn,$ZodCheckBigIntFormat:cL,$ZodCheckEndsWith:wL,$ZodCheckGreaterThan:rE,$ZodCheckIncludes:bL,$ZodCheckLengthEquals:hL,$ZodCheckLessThan:nE,$ZodCheckLowerCase:vL,$ZodCheckMaxLength:mL,$ZodCheckMaxSize:uL,$ZodCheckMimeType:_L,$ZodCheckMinLength:pL,$ZodCheckMinSize:dL,$ZodCheckMultipleOf:sL,$ZodCheckNumberFormat:lL,$ZodCheckOverwrite:CL,$ZodCheckProperty:SL,$ZodCheckRegex:gL,$ZodCheckSizeEquals:fL,$ZodCheckStartsWith:xL,$ZodCheckStringFormat:kp,$ZodCheckUpperCase:yL,$ZodCodec:uE,$ZodCustom:M4,$ZodCustomStringFormat:QL,$ZodDate:l4,$ZodDefault:E4,$ZodDiscriminatedUnion:p4,$ZodE164:YL,$ZodEmail:IL,$ZodEmoji:NL,$ZodEncodeError:Jy,$ZodEnum:b4,$ZodError:ib,$ZodFile:w4,$ZodFunction:$4,$ZodGUID:RL,$ZodIPv4:VL,$ZodIPv6:BL,$ZodISODate:LL,$ZodISODateTime:zL,$ZodISODuration:FL,$ZodISOTime:UL,$ZodIntersection:h4,$ZodJWT:XL,$ZodKSUID:ML,$ZodLazy:P4,$ZodLiteral:x4,$ZodMap:v4,$ZodNaN:T4,$ZodNanoID:AL,$ZodNever:a4,$ZodNonOptional:R4,$ZodNull:r4,$ZodNullable:C4,$ZodNumber:oE,$ZodNumberFormat:JL,$ZodObject:f4,$ZodObjectJIT:m4,$ZodOptional:_4,$ZodPipe:N4,$ZodPrefault:k4,$ZodPromise:D4,$ZodReadonly:A4,$ZodRealError:Pi,$ZodRecord:g4,$ZodRegistry:dE,$ZodSet:y4,$ZodString:Rp,$ZodStringFormat:en,$ZodSuccess:j4,$ZodSymbol:t4,$ZodTemplateLiteral:O4,$ZodTransform:S4,$ZodTuple:cE,$ZodType:lt,$ZodULID:DL,$ZodURL:TL,$ZodUUID:jL,$ZodUndefined:n4,$ZodUnion:lE,$ZodUnknown:o4,$ZodVoid:s4,$ZodXID:PL,$brand:iz,$constructor:oe,$input:B4,$output:V4,Doc:EL,JSONSchema:ore,JSONSchemaGenerator:X_,NEVER:rz,TimePrecision:G4,_any:mU,_array:EU,_base64:IE,_base64url:TE,_bigint:aU,_boolean:iU,_catch:Jne,_check:TU,_cidrv4:RE,_cidrv6:jE,_coercedBigint:sU,_coercedBoolean:oU,_coercedDate:yU,_coercedNumber:Q4,_coercedString:q4,_cuid:xE,_cuid2:wE,_custom:RU,_date:vU,_decode:G1,_decodeAsync:Z1,_default:Wne,_discriminatedUnion:zne,_e164:NE,_email:mE,_emoji:yE,_encode:q1,_encodeAsync:K1,_endsWith:LE,_enum:Hne,_file:kU,_float32:eU,_float64:tU,_gt:ic,_gte:Ri,_guid:Gv,_includes:ME,_int:J4,_int32:nU,_int64:lU,_intersection:Lne,_ipv4:EE,_ipv6:kE,_isoDate:Z4,_isoDateTime:K4,_isoDuration:W4,_isoTime:Y4,_jwt:AE,_ksuid:CE,_lazy:rre,_length:lb,_literal:Gne,_lowercase:DE,_lt:rc,_lte:Ro,_map:Vne,_max:Ro,_maxLength:sb,_maxSize:ab,_mime:UE,_min:Ri,_minLength:dd,_minSize:Fm,_multipleOf:Um,_nan:bU,_nanoid:bE,_nativeEnum:qne,_negative:wU,_never:hU,_nonnegative:_U,_nonoptional:Xne,_nonpositive:SU,_normalize:FE,_null:fU,_nullable:Yne,_number:X4,_optional:Zne,_overwrite:bc,_parse:xp,_parseAsync:wp,_pipe:ere,_positive:xU,_promise:ire,_property:CU,_readonly:tre,_record:Fne,_refine:jU,_regex:$E,_safeDecode:W1,_safeDecodeAsync:Q1,_safeEncode:Y1,_safeEncodeAsync:X1,_safeParse:Sp,_safeParseAsync:_p,_set:Bne,_size:OE,_startsWith:zE,_string:H4,_stringFormat:jp,_stringbool:NU,_success:Qne,_superRefine:IU,_symbol:uU,_templateLiteral:nre,_toLowerCase:BE,_toUpperCase:HE,_transform:Kne,_trim:VE,_tuple:Une,_uint32:rU,_uint64:cU,_ulid:SE,_undefined:dU,_union:Mne,_unknown:pU,_uppercase:PE,_url:ob,_uuid:pE,_uuidv4:hE,_uuidv6:gE,_uuidv7:vE,_void:gU,_xid:_E,clone:po,config:Fr,decode:yee,decodeAsync:xee,encode:vee,encodeAsync:bee,flattenError:B1,formatError:H1,globalConfig:Uv,globalRegistry:zl,isValidBase64:iE,isValidBase64URL:KL,isValidJWT:WL,locales:F4,parse:Bv,parseAsync:Hv,prettifyError:Cz,regexes:tE,registry:fE,safeDecode:See,safeDecodeAsync:Cee,safeEncode:wee,safeEncodeAsync:_ee,safeParse:Ez,safeParseAsync:kz,toDotPath:_z,toJSONSchema:AU,treeifyError:Sz,util:xz,version:kL},Symbol.toStringTag,{value:"Module"})),qE=oe("ZodISODateTime",(e,t)=>{zL.init(e,t),sn.init(e,t)});function OU(e){return K4(qE,e)}const GE=oe("ZodISODate",(e,t)=>{LL.init(e,t),sn.init(e,t)});function $U(e){return Z4(GE,e)}const KE=oe("ZodISOTime",(e,t)=>{UL.init(e,t),sn.init(e,t)});function DU(e){return Y4(KE,e)}const ZE=oe("ZodISODuration",(e,t)=>{FL.init(e,t),sn.init(e,t)});function PU(e){return W4(ZE,e)}const sre=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:GE,ZodISODateTime:qE,ZodISODuration:ZE,ZodISOTime:KE,date:$U,datetime:OU,duration:PU,time:DU},Symbol.toStringTag,{value:"Module"})),MU=(e,t)=>{ib.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>H1(e,n)},flatten:{value:n=>B1(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Fv,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Fv,2)}},isEmpty:{get(){return e.issues.length===0}}})},lre=oe("ZodError",MU),Mi=oe("ZodError",MU,{Parent:Error}),zU=xp(Mi),LU=wp(Mi),UU=Sp(Mi),FU=_p(Mi),VU=q1(Mi),BU=G1(Mi),HU=K1(Mi),qU=Z1(Mi),GU=Y1(Mi),KU=W1(Mi),ZU=X1(Mi),YU=Q1(Mi),yt=oe("ZodType",(e,t)=>(lt.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(es(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>po(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>zU(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>UU(e,n,r),e.parseAsync=async(n,r)=>LU(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>FU(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>VU(e,n,r),e.decode=(n,r)=>BU(e,n,r),e.encodeAsync=async(n,r)=>HU(e,n,r),e.decodeAsync=async(n,r)=>qU(e,n,r),e.safeEncode=(n,r)=>GU(e,n,r),e.safeDecode=(n,r)=>KU(e,n,r),e.safeEncodeAsync=async(n,r)=>ZU(e,n,r),e.safeDecodeAsync=async(n,r)=>YU(e,n,r),e.refine=(n,r)=>e.check($F(n,r)),e.superRefine=n=>e.check(DF(n)),e.overwrite=n=>e.check(bc(n)),e.optional=()=>Yv(e),e.nullable=()=>Wv(e),e.nullish=()=>Yv(Wv(e)),e.nonoptional=n=>SF(e,n),e.array=()=>md(e),e.or=n=>vk([e,n]),e.and=n=>cF(e,n),e.transform=n=>Xv(e,xk(n)),e.default=n=>bF(e,n),e.prefault=n=>wF(e,n),e.catch=n=>EF(e,n),e.pipe=n=>Xv(e,n),e.readonly=()=>jF(e),e.describe=n=>{const r=e.clone();return zl.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return zl.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return zl.get(e);const r=e.clone();return zl.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),YE=oe("_ZodString",(e,t)=>{Rp.init(e,t),yt.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check($E(...r)),e.includes=(...r)=>e.check(ME(...r)),e.startsWith=(...r)=>e.check(zE(...r)),e.endsWith=(...r)=>e.check(LE(...r)),e.min=(...r)=>e.check(dd(...r)),e.max=(...r)=>e.check(sb(...r)),e.length=(...r)=>e.check(lb(...r)),e.nonempty=(...r)=>e.check(dd(1,...r)),e.lowercase=r=>e.check(DE(r)),e.uppercase=r=>e.check(PE(r)),e.trim=()=>e.check(VE()),e.normalize=(...r)=>e.check(FE(...r)),e.toLowerCase=()=>e.check(BE()),e.toUpperCase=()=>e.check(HE())}),cb=oe("ZodString",(e,t)=>{Rp.init(e,t),YE.init(e,t),e.email=n=>e.check(mE(WE,n)),e.url=n=>e.check(ob(ub,n)),e.jwt=n=>e.check(AE(dk,n)),e.emoji=n=>e.check(yE(XE,n)),e.guid=n=>e.check(Gv(Kv,n)),e.uuid=n=>e.check(pE(za,n)),e.uuidv4=n=>e.check(hE(za,n)),e.uuidv6=n=>e.check(gE(za,n)),e.uuidv7=n=>e.check(vE(za,n)),e.nanoid=n=>e.check(bE(QE,n)),e.guid=n=>e.check(Gv(Kv,n)),e.cuid=n=>e.check(xE(JE,n)),e.cuid2=n=>e.check(wE(ek,n)),e.ulid=n=>e.check(SE(tk,n)),e.base64=n=>e.check(IE(lk,n)),e.base64url=n=>e.check(TE(ck,n)),e.xid=n=>e.check(_E(nk,n)),e.ksuid=n=>e.check(CE(rk,n)),e.ipv4=n=>e.check(EE(ik,n)),e.ipv6=n=>e.check(kE(ok,n)),e.cidrv4=n=>e.check(RE(ak,n)),e.cidrv6=n=>e.check(jE(sk,n)),e.e164=n=>e.check(NE(uk,n)),e.datetime=n=>e.check(OU(n)),e.date=n=>e.check($U(n)),e.time=n=>e.check(DU(n)),e.duration=n=>e.check(PU(n))});function wt(e){return H4(cb,e)}const sn=oe("ZodStringFormat",(e,t)=>{en.init(e,t),YE.init(e,t)}),WE=oe("ZodEmail",(e,t)=>{IL.init(e,t),sn.init(e,t)});function WU(e){return mE(WE,e)}const Kv=oe("ZodGUID",(e,t)=>{RL.init(e,t),sn.init(e,t)});function cre(e){return Gv(Kv,e)}const za=oe("ZodUUID",(e,t)=>{jL.init(e,t),sn.init(e,t)});function ure(e){return pE(za,e)}function dre(e){return hE(za,e)}function fre(e){return gE(za,e)}function mre(e){return vE(za,e)}const ub=oe("ZodURL",(e,t)=>{TL.init(e,t),sn.init(e,t)});function pre(e){return ob(ub,e)}function hre(e){return ob(ub,{protocol:/^https?$/,hostname:Bz,...we(e)})}const XE=oe("ZodEmoji",(e,t)=>{NL.init(e,t),sn.init(e,t)});function gre(e){return yE(XE,e)}const QE=oe("ZodNanoID",(e,t)=>{AL.init(e,t),sn.init(e,t)});function vre(e){return bE(QE,e)}const JE=oe("ZodCUID",(e,t)=>{OL.init(e,t),sn.init(e,t)});function yre(e){return xE(JE,e)}const ek=oe("ZodCUID2",(e,t)=>{$L.init(e,t),sn.init(e,t)});function bre(e){return wE(ek,e)}const tk=oe("ZodULID",(e,t)=>{DL.init(e,t),sn.init(e,t)});function xre(e){return SE(tk,e)}const nk=oe("ZodXID",(e,t)=>{PL.init(e,t),sn.init(e,t)});function wre(e){return _E(nk,e)}const rk=oe("ZodKSUID",(e,t)=>{ML.init(e,t),sn.init(e,t)});function Sre(e){return CE(rk,e)}const ik=oe("ZodIPv4",(e,t)=>{VL.init(e,t),sn.init(e,t)});function _re(e){return EE(ik,e)}const ok=oe("ZodIPv6",(e,t)=>{BL.init(e,t),sn.init(e,t)});function Cre(e){return kE(ok,e)}const ak=oe("ZodCIDRv4",(e,t)=>{HL.init(e,t),sn.init(e,t)});function Ere(e){return RE(ak,e)}const sk=oe("ZodCIDRv6",(e,t)=>{qL.init(e,t),sn.init(e,t)});function kre(e){return jE(sk,e)}const lk=oe("ZodBase64",(e,t)=>{GL.init(e,t),sn.init(e,t)});function Rre(e){return IE(lk,e)}const ck=oe("ZodBase64URL",(e,t)=>{ZL.init(e,t),sn.init(e,t)});function jre(e){return TE(ck,e)}const uk=oe("ZodE164",(e,t)=>{YL.init(e,t),sn.init(e,t)});function Ire(e){return NE(uk,e)}const dk=oe("ZodJWT",(e,t)=>{XL.init(e,t),sn.init(e,t)});function Tre(e){return AE(dk,e)}const Ip=oe("ZodCustomStringFormat",(e,t)=>{QL.init(e,t),sn.init(e,t)});function Nre(e,t,n={}){return jp(Ip,e,t,n)}function Are(e){return jp(Ip,"hostname",eE,e)}function Ore(e){return jp(Ip,"hex",oL,e)}function $re(e,t){const n=t?.enc??"hex",r=`${e}_${n}`,i=tE[r];if(!i)throw new Error(`Unrecognized hash format: ${r}`);return jp(Ip,r,i,t)}const db=oe("ZodNumber",(e,t)=>{oE.init(e,t),yt.init(e,t),e.gt=(r,i)=>e.check(ic(r,i)),e.gte=(r,i)=>e.check(Ri(r,i)),e.min=(r,i)=>e.check(Ri(r,i)),e.lt=(r,i)=>e.check(rc(r,i)),e.lte=(r,i)=>e.check(Ro(r,i)),e.max=(r,i)=>e.check(Ro(r,i)),e.int=r=>e.check(Q_(r)),e.safe=r=>e.check(Q_(r)),e.positive=r=>e.check(ic(0,r)),e.nonnegative=r=>e.check(Ri(0,r)),e.negative=r=>e.check(rc(0,r)),e.nonpositive=r=>e.check(Ro(0,r)),e.multipleOf=(r,i)=>e.check(Um(r,i)),e.step=(r,i)=>e.check(Um(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function fk(e){return X4(db,e)}const $d=oe("ZodNumberFormat",(e,t)=>{JL.init(e,t),db.init(e,t)});function Q_(e){return J4($d,e)}function Dre(e){return eU($d,e)}function Pre(e){return tU($d,e)}function Mre(e){return nU($d,e)}function zre(e){return rU($d,e)}const fb=oe("ZodBoolean",(e,t)=>{aE.init(e,t),yt.init(e,t)});function Vm(e){return iU(fb,e)}const mb=oe("ZodBigInt",(e,t)=>{sE.init(e,t),yt.init(e,t),e.gte=(r,i)=>e.check(Ri(r,i)),e.min=(r,i)=>e.check(Ri(r,i)),e.gt=(r,i)=>e.check(ic(r,i)),e.gte=(r,i)=>e.check(Ri(r,i)),e.min=(r,i)=>e.check(Ri(r,i)),e.lt=(r,i)=>e.check(rc(r,i)),e.lte=(r,i)=>e.check(Ro(r,i)),e.max=(r,i)=>e.check(Ro(r,i)),e.positive=r=>e.check(ic(BigInt(0),r)),e.negative=r=>e.check(rc(BigInt(0),r)),e.nonpositive=r=>e.check(Ro(BigInt(0),r)),e.nonnegative=r=>e.check(Ri(BigInt(0),r)),e.multipleOf=(r,i)=>e.check(Um(r,i));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Lre(e){return aU(mb,e)}const mk=oe("ZodBigIntFormat",(e,t)=>{e4.init(e,t),mb.init(e,t)});function Ure(e){return lU(mk,e)}function Fre(e){return cU(mk,e)}const XU=oe("ZodSymbol",(e,t)=>{t4.init(e,t),yt.init(e,t)});function Vre(e){return uU(XU,e)}const QU=oe("ZodUndefined",(e,t)=>{n4.init(e,t),yt.init(e,t)});function Zv(e){return dU(QU,e)}const JU=oe("ZodNull",(e,t)=>{r4.init(e,t),yt.init(e,t)});function eF(e){return fU(JU,e)}const tF=oe("ZodAny",(e,t)=>{i4.init(e,t),yt.init(e,t)});function Bre(){return mU(tF)}const nF=oe("ZodUnknown",(e,t)=>{o4.init(e,t),yt.init(e,t)});function fd(){return pU(nF)}const rF=oe("ZodNever",(e,t)=>{a4.init(e,t),yt.init(e,t)});function pk(e){return hU(rF,e)}const iF=oe("ZodVoid",(e,t)=>{s4.init(e,t),yt.init(e,t)});function Hre(e){return gU(iF,e)}const hk=oe("ZodDate",(e,t)=>{l4.init(e,t),yt.init(e,t),e.min=(r,i)=>e.check(Ri(r,i)),e.max=(r,i)=>e.check(Ro(r,i));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function qre(e){return vU(hk,e)}const oF=oe("ZodArray",(e,t)=>{c4.init(e,t),yt.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(dd(n,r)),e.nonempty=n=>e.check(dd(1,n)),e.max=(n,r)=>e.check(sb(n,r)),e.length=(n,r)=>e.check(lb(n,r)),e.unwrap=()=>e.element});function md(e,t){return EU(oF,e,t)}function Gre(e){const t=e._zod.def.shape;return Dd(Object.keys(t))}const pb=oe("ZodObject",(e,t)=>{m4.init(e,t),yt.init(e,t),Ct(e,"shape",()=>t.shape),e.keyof=()=>Dd(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:fd()}),e.loose=()=>e.clone({...e._zod.def,catchall:fd()}),e.strict=()=>e.clone({...e._zod.def,catchall:pk()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>mz(e,n),e.safeExtend=n=>pz(e,n),e.merge=n=>hz(e,n),e.pick=n=>dz(e,n),e.omit=n=>fz(e,n),e.partial=(...n)=>gz(wk,e,n[0]),e.required=(...n)=>vz(Sk,e,n[0])});function En(e,t){const n={type:"object",shape:e??{},...we(t)};return new pb(n)}function Kre(e,t){return new pb({type:"object",shape:e,catchall:pk(),...we(t)})}function Zre(e,t){return new pb({type:"object",shape:e,catchall:fd(),...we(t)})}const gk=oe("ZodUnion",(e,t)=>{lE.init(e,t),yt.init(e,t),e.options=t.options});function vk(e,t){return new gk({type:"union",options:e,...we(t)})}const aF=oe("ZodDiscriminatedUnion",(e,t)=>{gk.init(e,t),p4.init(e,t)});function sF(e,t,n){return new aF({type:"union",options:t,discriminator:e,...we(n)})}const lF=oe("ZodIntersection",(e,t)=>{h4.init(e,t),yt.init(e,t)});function cF(e,t){return new lF({type:"intersection",left:e,right:t})}const uF=oe("ZodTuple",(e,t)=>{cE.init(e,t),yt.init(e,t),e.rest=n=>e.clone({...e._zod.def,rest:n})});function dF(e,t,n){const r=t instanceof lt,i=r?n:t,o=r?t:null;return new uF({type:"tuple",items:e,rest:o,...we(i)})}const yk=oe("ZodRecord",(e,t)=>{g4.init(e,t),yt.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function bk(e,t,n){return new yk({type:"record",keyType:e,valueType:t,...we(n)})}function Yre(e,t,n){const r=po(e);return r._zod.values=void 0,new yk({type:"record",keyType:r,valueType:t,...we(n)})}const fF=oe("ZodMap",(e,t)=>{v4.init(e,t),yt.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Wre(e,t,n){return new fF({type:"map",keyType:e,valueType:t,...we(n)})}const mF=oe("ZodSet",(e,t)=>{y4.init(e,t),yt.init(e,t),e.min=(...n)=>e.check(Fm(...n)),e.nonempty=n=>e.check(Fm(1,n)),e.max=(...n)=>e.check(ab(...n)),e.size=(...n)=>e.check(OE(...n))});function Xre(e,t){return new mF({type:"set",valueType:e,...we(t)})}const Bm=oe("ZodEnum",(e,t)=>{b4.init(e,t),yt.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const o={};for(const s of r)if(n.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Bm({...t,checks:[],...we(i),entries:o})},e.exclude=(r,i)=>{const o={...t.entries};for(const s of r)if(n.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Bm({...t,checks:[],...we(i),entries:o})}});function Dd(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Bm({type:"enum",entries:n,...we(t)})}function Qre(e,t){return new Bm({type:"enum",entries:e,...we(t)})}const pF=oe("ZodLiteral",(e,t)=>{x4.init(e,t),yt.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Hm(e,t){return new pF({type:"literal",values:Array.isArray(e)?e:[e],...we(t)})}const hF=oe("ZodFile",(e,t)=>{w4.init(e,t),yt.init(e,t),e.min=(n,r)=>e.check(Fm(n,r)),e.max=(n,r)=>e.check(ab(n,r)),e.mime=(n,r)=>e.check(UE(Array.isArray(n)?n:[n],r))});function Jre(e){return kU(hF,e)}const gF=oe("ZodTransform",(e,t)=>{S4.init(e,t),yt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Jy(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(cd(o,n.value,t));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(cd(s))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(o=>(n.value=o,n)):(n.value=i,n)}});function xk(e){return new gF({type:"transform",transform:e})}const wk=oe("ZodOptional",(e,t)=>{_4.init(e,t),yt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Yv(e){return new wk({type:"optional",innerType:e})}const vF=oe("ZodNullable",(e,t)=>{C4.init(e,t),yt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Wv(e){return new vF({type:"nullable",innerType:e})}function eie(e){return Yv(Wv(e))}const yF=oe("ZodDefault",(e,t)=>{E4.init(e,t),yt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function bF(e,t){return new yF({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():tb(t)}})}const xF=oe("ZodPrefault",(e,t)=>{k4.init(e,t),yt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function wF(e,t){return new xF({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():tb(t)}})}const Sk=oe("ZodNonOptional",(e,t)=>{R4.init(e,t),yt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function SF(e,t){return new Sk({type:"nonoptional",innerType:e,...we(t)})}const _F=oe("ZodSuccess",(e,t)=>{j4.init(e,t),yt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function tie(e){return new _F({type:"success",innerType:e})}const CF=oe("ZodCatch",(e,t)=>{I4.init(e,t),yt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function EF(e,t){return new CF({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const kF=oe("ZodNaN",(e,t)=>{T4.init(e,t),yt.init(e,t)});function nie(e){return bU(kF,e)}const _k=oe("ZodPipe",(e,t)=>{N4.init(e,t),yt.init(e,t),e.in=t.in,e.out=t.out});function Xv(e,t){return new _k({type:"pipe",in:e,out:t})}const Ck=oe("ZodCodec",(e,t)=>{_k.init(e,t),uE.init(e,t)});function rie(e,t,n){return new Ck({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const RF=oe("ZodReadonly",(e,t)=>{A4.init(e,t),yt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function jF(e){return new RF({type:"readonly",innerType:e})}const IF=oe("ZodTemplateLiteral",(e,t)=>{O4.init(e,t),yt.init(e,t)});function iie(e,t){return new IF({type:"template_literal",parts:e,...we(t)})}const TF=oe("ZodLazy",(e,t)=>{P4.init(e,t),yt.init(e,t),e.unwrap=()=>e._zod.def.getter()});function NF(e){return new TF({type:"lazy",getter:e})}const AF=oe("ZodPromise",(e,t)=>{D4.init(e,t),yt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function oie(e){return new AF({type:"promise",innerType:e})}const OF=oe("ZodFunction",(e,t)=>{$4.init(e,t),yt.init(e,t)});function $O(e){return new OF({type:"function",input:Array.isArray(e?.input)?dF(e?.input):e?.input??md(fd()),output:e?.output??fd()})}const hb=oe("ZodCustom",(e,t)=>{M4.init(e,t),yt.init(e,t)});function aie(e){const t=new jn({check:"custom"});return t._zod.check=e,t}function sie(e,t){return RU(hb,e??(()=>!0),t)}function $F(e,t={}){return jU(hb,e,t)}function DF(e){return IU(e)}function lie(e,t={error:`Input not instance of ${e.name}`}){const n=new hb({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...we(t)});return n._zod.bag.Class=e,n}const cie=(...e)=>NU({Codec:Ck,Boolean:fb,String:cb},...e);function uie(e){const t=NF(()=>vk([wt(e),fk(),Vm(),eF(),md(t),bk(wt(),t)]));return t}function die(e,t){return Xv(xk(e),t)}const fie={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function mie(e){Fr({customError:e})}function pie(){return Fr().customError}var J_;J_||(J_={});function hie(e){return q4(cb,e)}function gie(e){return Q4(db,e)}function vie(e){return oU(fb,e)}function yie(e){return sU(mb,e)}function bie(e){return yU(hk,e)}const xie=Object.freeze(Object.defineProperty({__proto__:null,bigint:yie,boolean:vie,date:bie,number:gie,string:hie},Symbol.toStringTag,{value:"Module"}));Fr(z4());const Sr=Object.freeze(Object.defineProperty({__proto__:null,$brand:iz,$input:B4,$output:V4,NEVER:rz,TimePrecision:G4,ZodAny:tF,ZodArray:oF,ZodBase64:lk,ZodBase64URL:ck,ZodBigInt:mb,ZodBigIntFormat:mk,ZodBoolean:fb,ZodCIDRv4:ak,ZodCIDRv6:sk,ZodCUID:JE,ZodCUID2:ek,ZodCatch:CF,ZodCodec:Ck,ZodCustom:hb,ZodCustomStringFormat:Ip,ZodDate:hk,ZodDefault:yF,ZodDiscriminatedUnion:aF,ZodE164:uk,ZodEmail:WE,ZodEmoji:XE,ZodEnum:Bm,ZodError:lre,ZodFile:hF,get ZodFirstPartyTypeKind(){return J_},ZodFunction:OF,ZodGUID:Kv,ZodIPv4:ik,ZodIPv6:ok,ZodISODate:GE,ZodISODateTime:qE,ZodISODuration:ZE,ZodISOTime:KE,ZodIntersection:lF,ZodIssueCode:fie,ZodJWT:dk,ZodKSUID:rk,ZodLazy:TF,ZodLiteral:pF,ZodMap:fF,ZodNaN:kF,ZodNanoID:QE,ZodNever:rF,ZodNonOptional:Sk,ZodNull:JU,ZodNullable:vF,ZodNumber:db,ZodNumberFormat:$d,ZodObject:pb,ZodOptional:wk,ZodPipe:_k,ZodPrefault:xF,ZodPromise:AF,ZodReadonly:RF,ZodRealError:Mi,ZodRecord:yk,ZodSet:mF,ZodString:cb,ZodStringFormat:sn,ZodSuccess:_F,ZodSymbol:XU,ZodTemplateLiteral:IF,ZodTransform:gF,ZodTuple:uF,ZodType:yt,ZodULID:tk,ZodURL:ub,ZodUUID:za,ZodUndefined:QU,ZodUnion:gk,ZodUnknown:nF,ZodVoid:iF,ZodXID:nk,_ZodString:YE,_default:bF,_function:$O,any:Bre,array:md,base64:Rre,base64url:jre,bigint:Lre,boolean:Vm,catch:EF,check:aie,cidrv4:Ere,cidrv6:kre,clone:po,codec:rie,coerce:xie,config:Fr,core:are,cuid:yre,cuid2:bre,custom:sie,date:qre,decode:BU,decodeAsync:qU,discriminatedUnion:sF,e164:Ire,email:WU,emoji:gre,encode:VU,encodeAsync:HU,endsWith:LE,enum:Dd,file:Jre,flattenError:B1,float32:Dre,float64:Pre,formatError:H1,function:$O,getErrorMap:pie,globalRegistry:zl,gt:ic,gte:Ri,guid:cre,hash:$re,hex:Ore,hostname:Are,httpUrl:hre,includes:ME,instanceof:lie,int:Q_,int32:Mre,int64:Ure,intersection:cF,ipv4:_re,ipv6:Cre,iso:sre,json:uie,jwt:Tre,keyof:Gre,ksuid:Sre,lazy:NF,length:lb,literal:Hm,locales:F4,looseObject:Zre,lowercase:DE,lt:rc,lte:Ro,map:Wre,maxLength:sb,maxSize:ab,mime:UE,minLength:dd,minSize:Fm,multipleOf:Um,nan:nie,nanoid:vre,nativeEnum:Qre,negative:wU,never:pk,nonnegative:_U,nonoptional:SF,nonpositive:SU,normalize:FE,null:eF,nullable:Wv,nullish:eie,number:fk,object:En,optional:Yv,overwrite:bc,parse:zU,parseAsync:LU,partialRecord:Yre,pipe:Xv,positive:xU,prefault:wF,preprocess:die,prettifyError:Cz,promise:oie,property:CU,readonly:jF,record:bk,refine:$F,regex:$E,regexes:tE,registry:fE,safeDecode:KU,safeDecodeAsync:YU,safeEncode:GU,safeEncodeAsync:ZU,safeParse:UU,safeParseAsync:FU,set:Xre,setErrorMap:mie,size:OE,startsWith:zE,strictObject:Kre,string:wt,stringFormat:Nre,stringbool:cie,success:tie,superRefine:DF,symbol:Vre,templateLiteral:iie,toJSONSchema:AU,toLowerCase:BE,toUpperCase:HE,transform:xk,treeifyError:Sz,trim:VE,tuple:dF,uint32:zre,uint64:Fre,ulid:xre,undefined:Zv,union:vk,unknown:fd,uppercase:PE,url:pre,util:xz,uuid:ure,uuidv4:dre,uuidv6:fre,uuidv7:mre,void:Hre,xid:wre},Symbol.toStringTag,{value:"Module"})),Tp=wt().nonempty({error:"Please enter your password."}),Ek=wt().nonempty({error:"Please enter a username."}),wie=En({username:Ek,password:Tp}),DO=["localhost","127.0.0.1"];var eC=(e=>(e.MixedLoopback="MixedLoopback",e.InsecureCookieOutsideChromeAndFirefox="InsecureCookieOutsideChromeAndFirefox",e))(eC||{});function Sie(e,t,n){if(!n||!t||!e)return null;const r=new URL(n).hostname,i=DO.includes(t),o=DO.includes(r);if(i&&o&&r!==t)return"MixedLoopback";if(!i&&o){const s=e.indexOf("Chrome")>=0,c=e.indexOf("Firefox")>=0;if(!s&&!c)return"InsecureCookieOutsideChromeAndFirefox"}return null}const PO=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Te(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},tC=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?PO(r.ref,n,e):r&&r.refs&&r.refs.forEach(i=>PO(i,n,e))}},MO=(e,t)=>{t.shouldUseNativeValidation&&tC(e,t);const n={};for(const r in e){const i=Te(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(_ie(t.names||Object.keys(e),r)){const s=Object.assign({},Te(n,r));Pt(s,"root",o),Pt(n,r,s)}else Pt(n,r,o)}return n},_ie=(e,t)=>{const n=zO(t);return e.some(r=>zO(r).match(`^${n}\\.\\d+`))};function zO(e){return e.replace(/\]|\[/g,"")}function LO(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function Cie(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,s=r.path.join(".");if(!n[s])if("unionErrors"in r){var c=r.unionErrors[0].errors[0];n[s]={message:c.message,type:c.code}}else n[s]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(p){return p.errors.forEach(function(h){return e.push(h)})}),t){var d=n[s].types,f=d&&d[r.code];n[s]=P1(s,t,n,i,f?[].concat(f,r.message):r.message)}e.shift()}return n}function Eie(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,s=r.path.join(".");if(!n[s])if(r.code==="invalid_union"&&r.errors.length>0){var c=r.errors[0][0];n[s]={message:c.message,type:c.code}}else n[s]={message:o,type:i};if(r.code==="invalid_union"&&r.errors.forEach(function(p){return p.forEach(function(h){return e.push(h)})}),t){var d=n[s].types,f=d&&d[r.code];n[s]=P1(s,t,n,i,f?[].concat(f,r.message):r.message)}e.shift()}return n}function wn(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,i,o){try{return Promise.resolve(LO(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(s){return o.shouldUseNativeValidation&&tC({},o),{errors:{},values:n.raw?Object.assign({},r):s}})},function(s){if((function(c){return Array.isArray(c?.issues)})(s))return{values:{},errors:MO(Cie(s.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,i,o){try{return Promise.resolve(LO(function(){return Promise.resolve((n.mode==="sync"?Bv:Hv)(e,r,t)).then(function(s){return o.shouldUseNativeValidation&&tC({},o),{errors:{},values:n.raw?Object.assign({},r):s}})},function(s){if((function(c){return c instanceof ib})(s))return{values:{},errors:MO(Eie(s.issues,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}};throw new Error("Invalid input: not a Zod schema")}function kk(){const e=bn(),t=mn(),n=kr(),{redirect:r}=Er({strict:!1}),{clusterId:i,instanceId:o}=tt({strict:!1}),{data:s}=Ut(vc(i,!0)),c=x.useMemo(()=>o&&s&&s?.instances?.find(T=>T.id===o),[s,o]),d=x.useMemo(()=>s?.status&&Qy.includes(s.status),[s?.status]),f="Local",p="instance",h=x.useMemo(()=>s?c?u1(c):c1(s):null,[s,c]),v=xn(h),y=x.useMemo(()=>Sie(navigator.userAgent,location.hostname,h),[h]),{data:b}=Ut(XJ(v)),S=pn({resolver:wn(wie),defaultValues:{username:"",password:""}}),{setFocus:C,control:E,handleSubmit:k}=S;x.useEffect(()=>{C("username")},[C]);const{mutate:R,isPending:I}=WJ(),A=x.useCallback(async T=>{R({...T,...v},{onSuccess:async N=>{Ee.success(N.message);const z=await rd(v);if(s?.instances?.length&&!c)for(const L of s.instances)lr.setUserForEntity(L,z);lr.setUserForEntity(c||s||Bn,z),n.invalidateQueries({queryKey:$y,refetchType:"none"}),t.invalidate(),await e({to:r?.startsWith("/")?r:Js})}})},[s,c,v,e,n,r,t,R]);return!o&&s&&!s?.fqdn?u.jsx(Gl,{to:"../instances",replace:!0}):d&&s?.resetPassword?u.jsx(Gl,{to:`/${s.organizationId}/${s.id}/finish-setup`,replace:!0}):!d&&s?.resetPassword?u.jsx(Gl,{to:`/${s.organizationId}/${s.id}/starting-up`,replace:!0}):u.jsxs(u.Fragment,{children:[!Fu,u.jsx("div",{className:"h-screen items-center justify-center flex",children:u.jsxs("div",{className:"text-white w-xs",children:[u.jsxs("h2",{className:"text-2xl font-light",children:["Sign in to Harper ",f]}),u.jsx(hn,{...S,children:u.jsxs("form",{onSubmit:k(A),className:"my-4",children:[u.jsx(Pe,{control:E,name:"username",render:({field:T})=>u.jsxs(Oe,{className:"my-4",children:[u.jsx($e,{children:"Username"}),u.jsx(Me,{children:u.jsx(Ge,{autoComplete:"username",type:"text",...T})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:E,name:"password",render:({field:T})=>u.jsxs(Oe,{className:"my-4",children:[u.jsx($e,{children:"Password"}),u.jsx(Me,{children:u.jsx(Ge,{type:"password",...T})}),u.jsx(De,{})]})}),u.jsx(Ce,{disabled:I,type:"submit",variant:"submit",className:"w-full my-2 rounded-full",children:"Sign In"}),b===!1&&u.jsxs("div",{className:"p-4 mt-4 text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300",role:"alert",children:[u.jsx("span",{className:"font-medium",children:"Warning!"})," This ",p," is not responding to GET ",h,"health. Is the server running? Have you ",u.jsx("a",{href:"https://docs.harperdb.io/docs/developers/security/configuration#cors",target:"_blank",className:"underline",children:"enabled CORS"})," for the operations API?"]}),y===eC.MixedLoopback&&u.jsxs("div",{className:"p-4 mt-4 text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300",role:"alert",children:[u.jsx("span",{className:"font-medium",children:"Warning!"})," Your login might not work because you're mixing 127.0.0.1 and localhost. Pick one or the other."]}),y===eC.InsecureCookieOutsideChromeAndFirefox&&u.jsxs("div",{className:"p-4 mt-4 text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300",role:"alert",children:[u.jsx("span",{className:"font-medium",children:"Warning!"})," Your login might not work because your browser doesn't consider localhost to be secure, so it doesn't pass the cookies along. Firefox or Chromium based browsers should pass the cookies properly."]}),u.jsxs("div",{className:"p-4 mt-4 text-sm rounded-lg bg-purple-950",role:"alert",children:[u.jsx("span",{className:"font-medium",children:"Did you know?"})," You can add this instance to your Harper account to manage it remotely.",u.jsx("div",{className:"text-center pt-2",children:u.jsx(We,{to:YJ(),target:"_blank",children:u.jsx(Ce,{type:"button",variant:"positive",children:"Connect to Harper Fabric"})})})]})]})})]})})]})}const Pd=WU({error:"Please enter a valid email address."}).toLowerCase().trim();async function kie({email:e}){const{data:t}=await Vt.post("/ForgotPassword/",{email:e});if(t)return t;throw new Error("Something went wrong")}function Rie(){return vt({mutationFn:e=>kie(e)})}const jie=En({email:Pd});function Iie(){const e=bn(),{me:t}=Er({strict:!1}),n=pn({resolver:wn(jie),defaultValues:{email:t||""}}),r=n.watch("email"),{setFocus:i,control:o,handleSubmit:s}=n;x.useEffect(()=>{i("email")},[i]);const{mutate:c,isPending:d}=Rie(),f=async p=>{c(p,{onSuccess:h=>{Ee.success("Success",{description:`${h}`,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}}),e({to:"/sign-in",search:{me:r}})}})};return u.jsxs("div",{className:"text-white w-xs",children:[u.jsx("h2",{className:"text-2xl font-light",children:"Enter your account email"}),u.jsx("p",{className:"text-sm pt-1",children:"If a matching account exists, we'll send you a password reset link."}),u.jsx(hn,{...n,children:u.jsxs("form",{onSubmit:s(f),className:"my-4",children:[u.jsx(Pe,{control:o,name:"email",render:({field:p})=>u.jsxs(Oe,{className:"my-2",children:[u.jsx($e,{children:"Email"}),u.jsx(Me,{children:u.jsx(Ge,{disabled:d,type:"email",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...p})}),u.jsx(De,{})]})}),u.jsx(Ce,{type:"submit",variant:"submit",disabled:d,className:"w-full my-2 rounded-full",children:"Send Password Reset Email"})]})}),u.jsxs("div",{className:"flex px-4 mt-4 underline place-content-between",children:[u.jsx(We,{className:"text-sm hover:text-blue-300",to:"/sign-in",search:{me:r},children:"Sign in to your account"}),u.jsx(We,{className:"text-sm hover:text-blue-300",to:"/sign-up",search:{me:r},children:"Sign up for free"})]})]})}const Tie=async({token:e,password:t})=>{const{data:n}=await Vt.put("/ResetPassword/",{token:e,newPassword:t});return n};function Nie(){return vt({mutationFn:e=>Tie(e)})}const Aie=En({password:Tp.min(8,{error:"Password must be at least 8 characters long."}).max(50,{error:"Password cannot be longer than 50 characters."}),confirmPassword:wt()}).refine(e=>e.password===e.confirmPassword,{error:"Passwords do not match.",path:["confirmPassword"]});function Oie(){const{token:e}=Er({strict:!1}),t=bn();x.useEffect(()=>{e||t({to:"/sign-in"})},[e,t]);const n=pn({resolver:wn(Aie),defaultValues:{password:"",confirmPassword:""}}),{setFocus:r,control:i,handleSubmit:o}=n;x.useEffect(()=>{r("password")},[r]);const{mutate:s,isPending:c}=Nie(),d=x.useCallback(async f=>{s({token:e,password:f.password},{onSuccess:()=>{Ee.success("Success",{description:"Your password has been reset successfully.",action:{label:"Dismiss",onClick:()=>Ee.dismiss()}}),t({to:"/sign-in"})}})},[t,s,e]);return u.jsxs("div",{className:"text-white w-xs",children:[u.jsx("h2",{className:"text-2xl font-light",children:"Reset Password"}),u.jsx(hn,{...n,children:u.jsxs("form",{className:"my-4",onSubmit:o(d),children:[u.jsx(Pe,{control:i,name:"password",render:({field:f})=>u.jsxs(Oe,{className:"my-2",children:[u.jsx($e,{children:"New Password"}),u.jsx(Me,{children:u.jsx(Ge,{disabled:c,type:"password",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...f})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:i,name:"confirmPassword",render:({field:f})=>u.jsxs(Oe,{className:"my-2",children:[u.jsx($e,{children:"Confirm Password"}),u.jsx(Me,{children:u.jsx(Ge,{disabled:c,type:"password",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...f})}),u.jsx(De,{})]})}),u.jsx(Ce,{variant:"submit",type:"submit",disabled:c,className:"w-full my-2 rounded-full",children:"Submit New Password"})]})})]})}async function $ie({email:e,password:t}){const{data:n}=await Vt.post("/Login/",{email:e,password:t});if(n)return n;throw new Error("Something went wrong")}function Die(){return vt({mutationFn:e=>$ie(e)})}function Pie(){x.useEffect(()=>{},[])}const Mie=["gmail.com","yahoo.com","hotmail.com","outlook.com","icloud.com","aol.com","protonmail.com","mail.com","zoho.com","yandex.com","gmx.com","live.com","msn.com","me.com","inbox.com"];function PF(e){if(!e||!e.includes("@"))return null;const t=e.split("@").pop()||"";if(!t)return null;for(const n of Mie)if(t===n||t.endsWith("."+n))return null;return t}const gb={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},Da=console,Ou={};Object.keys(gb).forEach(e=>{Ou[e]=Da[e]});const nm="Datadog Browser SDK:",ft={debug:Ou.debug.bind(Da,nm),log:Ou.log.bind(Da,nm),info:Ou.info.bind(Da,nm),warn:Ou.warn.bind(Da,nm),error:Ou.error.bind(Da,nm)},vb="https://docs.datadoghq.com",zie=`${vb}/real_user_monitoring/browser/troubleshooting`,Rk="More details:";function MF(e,t){return(...n)=>{try{return e(...n)}catch(r){ft.error(t,r)}}}function Ll(e){return e!==0&&Math.random()*100<=e}function km(e,t){return+e.toFixed(t)}function Lie(e){return Np(e)&&e>=0&&e<=100}function Np(e){return typeof e=="number"}const Rr=1e3,Vr=60*Rr,zF=60*Vr,Uie=24*zF,LF=365*Uie;function yb(e){return{relative:e,timeStamp:Vie(e)}}function Fie(e){return{relative:jk(e),timeStamp:e}}function Vie(e){const t=Ur()-performance.now();return t>Ap()?Math.round(Md(t,e)):Hie(e)}function Bie(){return Math.round(Ur()-Md(Ap(),performance.now()))}function ht(e){return Np(e)?km(e*1e6,0):e}function Ur(){return new Date().getTime()}function sr(){return Ur()}function Ai(){return performance.now()}function Jn(){return{relative:Ai(),timeStamp:sr()}}function UF(){return{relative:0,timeStamp:Ap()}}function kn(e,t){return t-e}function Md(e,t){return e+t}function jk(e){return e-Ap()}function Hie(e){return Math.round(Md(Ap(),e))}function qie(e){return e<LF}let tS;function Ap(){var e,t;return tS===void 0&&(tS=(t=(e=performance.timing)===null||e===void 0?void 0:e.navigationStart)!==null&&t!==void 0?t:performance.timeOrigin),tS}const pd=1024,FF=1024*pd,Gie=/[^\u0000-\u007F]/;function VF(e){return Gie.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function Kie(e){const t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function qm(e){return{...e}}function Qv(e,t){return Object.keys(e).some(n=>e[n]===t)}function xc(e){return Object.keys(e).length===0}function BF(e,t){const n={};for(const r of Object.keys(e))n[r]=t(e[r]);return n}function ho(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!="object"&&(typeof self=="object"?e=self:typeof window=="object"?e=window:e={}),e}const ta=ho(),Jv="WorkerGlobalScope"in ta;function Gs(e,t){const n=ho();let r;return n.Zone&&typeof n.Zone.__symbol__=="function"&&(r=e[n.Zone.__symbol__(t)]),r||(r=e[t]),r}let nC,HF=!1;function Zie(e){nC=e}function Yie(e){HF=e}function st(e){return function(){return Vs(e,this,arguments)}}function Vs(e,t,n){try{return e.apply(t,n)}catch(r){oc(r)}}function oc(e){if(rC(e),nC)try{nC(e)}catch(t){rC(t)}}function rC(...e){HF&&ft.error("[MONITOR]",...e)}function _r(e,t){return Gs(ho(),"setTimeout")(st(e),t)}function no(e){Gs(ho(),"clearTimeout")(e)}function zd(e,t){return Gs(ho(),"setInterval")(st(e),t)}function bb(e){Gs(ho(),"clearInterval")(e)}function UO(e){var t;const n=(t=ta.queueMicrotask)===null||t===void 0?void 0:t.bind(ta);typeof n=="function"?n(st(e)):Promise.resolve().then(st(e))}class Nt{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach(n=>n(t))}addObserver(t){this.observers.push(t),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(t){this.observers=this.observers.filter(n=>t!==n),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function qF(...e){return new Nt(t=>{const n=e.map(r=>r.subscribe(i=>t.notify(i)));return()=>n.forEach(r=>r.unsubscribe())})}class GF extends Nt{constructor(t){super(),this.maxBufferSize=t,this.buffer=[]}notify(t){this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(t)}subscribe(t){let n=!1;const r={unsubscribe:()=>{n=!0,this.removeObserver(t)}};return UO(()=>{for(const i of this.buffer){if(n)return;t(i)}n||this.addObserver(t)}),r}unbuffer(){UO(()=>{this.maxBufferSize=this.buffer.length=0})}}function xb(e,t,n){const r=n&&n.leading!==void 0?n.leading:!0,i=n&&n.trailing!==void 0?n.trailing:!0;let o=!1,s,c;return{throttled:(...d)=>{if(o){s=d;return}r?e(...d):s=d,o=!0,c=_r(()=>{i&&s&&e(...s),o=!1,s=void 0},t)},cancel:()=>{no(c),o=!1,s=void 0}}}function Ft(){}function jr(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,jr)}const ey=/([\w-]+)\s*=\s*([^;]+)/g;function Gm(e,t){for(ey.lastIndex=0;;){const n=ey.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function Wie(e){const t=new Map;for(ey.lastIndex=0;;){const n=ey.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function Ik(e,t,n=""){const r=e.charCodeAt(t-1),o=r>=55296&&r<=56319?t+1:t;return e.length<=o?e:`${e.slice(0,o)}${n}`}function Xie(){return KF()===0}function PTe(){return KF()===1}let Ig;function KF(){return Ig??(Ig=Qie())}function Qie(e=window){var t;const n=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(n)?0:((t=e.navigator.vendor)===null||t===void 0?void 0:t.indexOf("Apple"))===0||/safari/i.test(n)&&!/chrome|android/i.test(n)?1:2}function Tk(e){return wb(e,location.href).href}function Jie(e){try{return!!wb(e)}catch{return!1}}function eoe(e){const t=wb(e).pathname;return t[0]==="/"?t:`/${t}`}function wb(e,t){const{URL:n}=toe();try{return t!==void 0?new n(e,t):new n(e)}catch(r){throw new Error(`Failed to construct URL: ${String(r)}`)}}let nS;function toe(){if(!nS){let e,t;try{e=document.createElement("iframe"),e.style.display="none",document.body.appendChild(e),t=e.contentWindow}catch{t=ta}nS={URL:t.URL},e?.remove()}return nS}function Sb(e,t,n=0,r){const i=new Date;i.setTime(i.getTime()+n);const o=`expires=${i.toUTCString()}`,s=r&&r.crossSite?"none":"strict",c=r&&r.domain?`;domain=${r.domain}`:"",d=r&&r.secure?";secure":"",f=r&&r.partitioned?";partitioned":"";document.cookie=`${e}=${t};${o};path=/;samesite=${s}${c}${d}${f}`}function _b(e){return Gm(document.cookie,e)}let rS;function Ps(e){return rS||(rS=Wie(document.cookie)),rS.get(e)}function ZF(e,t){Sb(e,"",0,t)}function noe(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${jr()}`,n="test";Sb(t,n,Vr,e);const r=_b(t)===n;return ZF(t,e),r}catch(t){return ft.error(t),!1}}let iS;function YF(e=location.hostname,t=document.referrer){if(iS===void 0){const n=roe(e,t);if(n){const r=`dd_site_test_${jr()}`,i="test",o=n.split(".");let s=o.pop();for(;o.length&&!_b(r);)s=`${o.pop()}.${s}`,Sb(r,i,Rr,{domain:s});ZF(r,{domain:s}),iS=s}}return iS}function roe(e,t){try{return e||wb(t).hostname}catch{}}const Ks="_dd_s";function WF(e,t){for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(t(r,n,e))return r}}function XF(e){return Object.values(e)}function Nk(e){return Object.entries(e)}const wc=4*zF,QF=15*Vr,ioe=LF,JF="0",Km={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},e6=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Ak="&";function ooe(e){return!!e&&(e.indexOf(Ak)!==-1||e6.test(e))}const aoe="1";function jl(e,t){const n={isExpired:aoe};return t.trackAnonymousUser&&(e?.anonymousId?n.anonymousId=e?.anonymousId:n.anonymousId=jr()),n}function dv(e){return xc(e)}function t6(e){return!dv(e)}function Rm(e){return e.isExpired!==void 0||!soe(e)}function soe(e){return(e.created===void 0||Ur()-Number(e.created)<wc)&&(e.expire===void 0||Ur()<Number(e.expire))}function n6(e){e.expire=String(Ur()+QF)}function r6(e){return Nk(e).map(([t,n])=>t==="anonymousId"?`aid=${n}`:`${t}=${n}`).join(Ak)}function Ok(e){const t={};return ooe(e)&&e.split(Ak).forEach(n=>{const r=e6.exec(n);if(r!==null){const[,i,o]=r;i==="aid"?t.anonymousId=o:t[i]=o}}),t}const loe="_dd",coe="_dd_r",uoe="_dd_l",doe="rum",foe="logs";function moe(e){if(!Ps(Ks)){const n=Ps(loe),r=Ps(coe),i=Ps(uoe),o={};n&&(o.id=n),i&&/^[01]$/.test(i)&&(o[foe]=i),r&&/^[012]$/.test(r)&&(o[doe]=r),t6(o)&&(n6(o),e.persistSession(o))}}function FO(e){const t=hoe(e);return t&&noe(t)?{type:Km.COOKIE,cookieOptions:t}:void 0}function poe(e,t){const n={isLockEnabled:Xie(),persistSession:r=>VO(t,e,r,QF),retrieveSession:i6,expireSession:r=>VO(t,e,jl(r,e),wc)};return moe(n),n}function VO(e,t,n,r){Sb(Ks,r6(n),t.trackAnonymousUser?ioe:r,e)}function i6(){const e=_b(Ks);return Ok(e)}function hoe(e){const t={};if(t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){const n=YF();if(!n)return;t.domain=n}return t}const goe="_dd_test_";function BO(){try{const e=jr(),t=`${goe}${e}`;localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:Km.LOCAL_STORAGE}:void 0}catch{return}}function voe(e){return{isLockEnabled:!1,persistSession:o6,retrieveSession:yoe,expireSession:t=>boe(t,e)}}function o6(e){localStorage.setItem(Ks,r6(e))}function yoe(){const e=localStorage.getItem(Ks);return Ok(e)}function boe(e,t){o6(jl(e,t))}const xoe=10,woe=100,Soe=Rr,a6="--",s6=[];let fv;function Il(e,t,n=0){var r;const{isLockEnabled:i,persistSession:o,expireSession:s}=t,c=v=>o({...v,lock:f}),d=()=>{const{lock:v,...y}=t.retrieveSession();return{session:y,lock:v&&!Coe(v)?v:void 0}};if(fv||(fv=e),e!==fv){s6.push(e);return}if(i&&n>=woe){HO(t);return}let f,p=d();if(i){if(p.lock){Tg(e,t,n);return}if(f=_oe(),c(p.session),p=d(),p.lock!==f){Tg(e,t,n);return}}let h=e.process(p.session);if(i&&(p=d(),p.lock!==f)){Tg(e,t,n);return}if(h&&(Rm(h)?s(h):(n6(h),i?c(h):o(h))),i&&!(h&&Rm(h))){if(p=d(),p.lock!==f){Tg(e,t,n);return}o(p.session),h=p.session}(r=e.after)===null||r===void 0||r.call(e,h||p.session),HO(t)}function Tg(e,t,n){_r(()=>{Il(e,t,n+1)},xoe)}function HO(e){fv=void 0;const t=s6.shift();t&&Il(t,e)}function _oe(){return jr()+a6+sr()}function Coe(e){const[,t]=e.split(a6);return!t||kn(Number(t),sr())>Soe}const qO=Rr;function Eoe(e){switch(e.sessionPersistence){case Km.COOKIE:return FO(e);case Km.LOCAL_STORAGE:return BO();case void 0:{let t=FO(e);return!t&&e.allowFallbackToLocalStorage&&(t=BO()),t}default:ft.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}function koe(e,t){return e.type===Km.COOKIE?poe(t,e.cookieOptions):voe(t)}function Roe(e,t,n,r,i=koe(e,t)){const o=new Nt,s=new Nt,c=new Nt,d=zd(y,qO);let f;S();const{throttled:p,cancel:h}=xb(()=>{Il({process:T=>{if(dv(T))return;const N=b(T);return C(N),N},after:T=>{t6(T)&&!E()&&I(T),f=T}},i)},qO);function v(){Il({process:T=>E()?b(T):void 0},i)}function y(){const T=i.retrieveSession();Rm(T)?Il({process:N=>Rm(N)?jl(N,t):void 0,after:b},i):b(T)}function b(T){return Rm(T)&&(T=jl(T,t)),E()&&(k(T)?R():(c.notify({previousState:f,newState:T}),f=T)),T}function S(){Il({process:T=>{if(dv(T))return jl(T,t)},after:T=>{f=T}},i)}function C(T){if(dv(T))return!1;const N=r(T[n]);T[n]=N,delete T.isExpired,N!==JF&&!T.id&&(T.id=jr(),T.created=String(Ur()))}function E(){return f?.[n]!==void 0}function k(T){return f.id!==T.id||f[n]!==T[n]}function R(){f=jl(f,t),s.notify()}function I(T){f=T,o.notify()}function A(T){Il({process:N=>({...N,...T}),after:b},i)}return{expandOrRenewSession:p,expandSession:v,getSession:()=>f,renewObservable:o,expireObservable:s,sessionStateUpdateObservable:c,restartSession:S,expire:()=>{h(),i.expireSession(f),b(jl(f,t))},stop:()=>{bb(d)},updateSessionState:A}}const iC={GRANTED:"granted",NOT_GRANTED:"not-granted"};function joe(e){const t=new Nt;return{tryToInit(n){e||(e=n)},update(n){e=n,t.notify()},isGranted(){return e===iC.GRANTED},observable:t}}function Sc(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function Zm(e){const t=Sc(e);return t==="string"||t==="function"||e instanceof RegExp}function Cb(e,t,n=!1){return e.some(r=>{try{if(typeof r=="function")return r(t);if(r instanceof RegExp)return r.test(t);if(typeof r=="string")return n?t.startsWith(r):r===t}catch(i){ft.error(i)}return!1})}const l6=["chrome-extension://","moz-extension://"];function GO(e){return l6.some(t=>e.includes(t))}function Ioe(e,t=""){if(GO(e))return!1;const r=t.split(`
|
|
436
|
-
`).filter(i=>{const o=i.trim();return o.length&&/^at\s+|@/.test(o)})[1]||"";return GO(r)}function Toe(e=""){for(const t of l6){const n=e.match(new RegExp(`${t}[^/]+`));if(n)return n[0]}}function Op(e,t,n){if(typeof e!="object"||e===null)return JSON.stringify(e);const r=Pu(Object.prototype),i=Pu(Array.prototype),o=Pu(Object.getPrototypeOf(e)),s=Pu(e);try{return JSON.stringify(e,t,n)}catch{return"<error: unable to serialize object>"}finally{r(),i(),o(),s()}}function Pu(e){const t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):Ft}const Noe=220*pd,Aoe="$",Ooe=3;function an(e,t=Noe){const n=Pu(Object.prototype),r=Pu(Array.prototype),i=[],o=new WeakMap,s=oS(e,Aoe,void 0,i,o),c=JSON.stringify(s);let d=c?c.length:0;if(d>t){aS(t,"discarded",e);return}for(;i.length>0&&d<t;){const f=i.shift();let p=0;if(Array.isArray(f.source))for(let h=0;h<f.source.length;h++){const v=oS(f.source[h],f.path,h,i,o);if(v!==void 0?d+=JSON.stringify(v).length:d+=4,d+=p,p=1,d>t){aS(t,"truncated",e);break}f.target[h]=v}else for(const h in f.source)if(Object.prototype.hasOwnProperty.call(f.source,h)){const v=oS(f.source[h],f.path,h,i,o);if(v!==void 0&&(d+=JSON.stringify(v).length+p+h.length+Ooe,p=1),d>t){aS(t,"truncated",e);break}f.target[h]=v}}return n(),r(),s}function oS(e,t,n,r,i){const o=Poe(e);if(!o||typeof o!="object")return $oe(o);const s=oC(o);if(s!=="[Object]"&&s!=="[Array]"&&s!=="[Error]")return s;const c=e;if(i.has(c))return`[Reference seen at ${i.get(c)}]`;const d=n!==void 0?`${t}.${n}`:t,f=Array.isArray(o)?[]:{};return i.set(c,d),r.push({source:o,target:f,path:d}),f}function $oe(e){return typeof e=="bigint"?`[BigInt] ${e.toString()}`:typeof e=="function"?`[Function] ${e.name||"unknown"}`:typeof e=="symbol"?`[Symbol] ${e.description||e.toString()}`:e}function oC(e){try{if(e instanceof Event)return Doe(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;const n=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch{}return"[Unserializable]"}function Doe(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?oC(e.currentTarget):null,target:e.target?oC(e.target):null}}function Poe(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch{}return e}function aS(e,t,n){ft.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}const hd="?";function $p(e){var t,n;const r=[];let i=sS(e,"stack");const o=String(e);if(i&&i.startsWith(o)&&(i=i.slice(o.length)),i&&i.split(`
|
|
437
|
-
`).forEach(s=>{const c=Loe(s)||Foe(s)||Boe(s)||Goe(s);c&&(!c.func&&c.line&&(c.func=hd),r.push(c))}),r.length>0&&Woe()&&e instanceof Error){const s=[];let c=e;for(;(c=Object.getPrototypeOf(c))&&u6(c);){const d=((t=c.constructor)===null||t===void 0?void 0:t.name)||hd;s.push(d)}for(let d=s.length-1;d>=0&&((n=r[0])===null||n===void 0?void 0:n.func)===s[d];d--)r.shift()}return{message:sS(e,"message"),name:sS(e,"name"),stack:r}}const c6="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",gd="(?::(\\d+))",Moe=new RegExp(`^\\s*at (.*?) ?\\(${c6}${gd}?${gd}?\\)?\\s*$`,"i"),zoe=new RegExp(`\\((\\S*)${gd}${gd}\\)`);function Loe(e){const t=Moe.exec(e);if(!t)return;const n=t[2]&&t[2].indexOf("native")===0,r=t[2]&&t[2].indexOf("eval")===0,i=zoe.exec(t[2]);return r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||hd,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}const Uoe=new RegExp(`^\\s*at ?${c6}${gd}?${gd}??\\s*$`,"i");function Foe(e){const t=Uoe.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:hd,line:t[2]?+t[2]:void 0,url:t[1]}}const Voe=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Boe(e){const t=Voe.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||hd,line:+t[3],url:t[2]}}const Hoe=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,qoe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Goe(e){const t=Hoe.exec(e);if(!t)return;const n=t[3]&&t[3].indexOf(" > eval")>-1,r=qoe.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||hd,line:t[4]?+t[4]:void 0,url:t[3]}}function sS(e,t){if(typeof e!="object"||!e||!(t in e))return;const n=e[t];return typeof n=="string"?n:void 0}function Koe(e,t,n,r){if(t===void 0)return;const{name:i,message:o}=Yoe(e);return{name:i,message:o,stack:[{url:t,column:r,line:n}]}}const Zoe=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function Yoe(e){let t,n;return{}.toString.call(e)==="[object String]"&&([,t,n]=Zoe.exec(e)),{name:t,message:n}}function u6(e){return String(e.constructor).startsWith("class ")}let Ng;function Woe(){if(Ng!==void 0)return Ng;class e extends Error{constructor(){super(),this.name="Error"}}const[t,n]=[e,Error].map(r=>new r);return Ng=u6(Object.getPrototypeOf(t))&&n.stack!==t.stack,Ng}function Ym(e){const n=new Error(e);n.name="HandlingStack";let r;return Vs(()=>{const i=$p(n);i.stack=i.stack.slice(2),r=Dp(i)}),r}function Dp(e){let t=d6(e);return e.stack.forEach(n=>{const r=n.func==="?"?"<anonymous>":n.func,i=n.args&&n.args.length>0?`(${n.args.join(", ")})`:"",o=n.line?`:${n.line}`:"",s=n.line&&n.column?`:${n.column}`:"";t+=`
|
|
438
|
-
at ${r}${i} @ ${n.url}${o}${s}`}),t}function d6(e){return`${e.name||"Error"}: ${e.message}`}const f6="No stack, consider using an instance of Error";function $k({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:o,useFallbackStack:s=!0,source:c,handling:d}){const f=_c(t);return!e&&f&&(e=$p(t)),{startClocks:i,source:c,handling:d,handlingStack:n,componentStack:r,originalError:t,type:e?e.name:void 0,message:Xoe(e,f,o,t),stack:e?Dp(e):s?f6:void 0,causes:f?eae(t,c):void 0,fingerprint:Qoe(t),context:Joe(t)}}function Xoe(e,t,n,r){return e?.message&&e?.name?e.message:t?"Empty message":`${n} ${Op(an(r))}`}function Qoe(e){return _c(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function Joe(e){if(e!==null&&typeof e=="object"&&"dd_context"in e)return e.dd_context}function _c(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function eae(e,t){let n=e;const r=[];for(;_c(n?.cause)&&r.length<10;){const i=$p(n.cause);r.push({message:n.cause.message,source:t,type:i?.name,stack:i&&Dp(i)}),n=n.cause}return r.length?r:void 0}var qa;(function(e){e.TRACK_INTAKE_REQUESTS="track_intake_requests",e.WRITABLE_RESOURCE_GRAPHQL="writable_resource_graphql",e.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",e.GRAPHQL_TRACKING="graphql_tracking",e.FEATURE_OPERATION_VITAL="feature_operation_vital",e.SHORT_SESSION_INVESTIGATION="short_session_investigation"})(qa||(qa={}));const Dk=new Set;function tae(e){Array.isArray(e)&&nae(e.filter(t=>Qv(qa,t)))}function nae(e){e.forEach(t=>{Dk.add(t)})}function Ld(e){return Dk.has(e)}function rae(){return Dk}const iae=200;function m6(e){const{env:t,service:n,version:r,datacenter:i,sdkVersion:o,variant:s}=e,c=[wu("sdk_version",o??"6.21.2")];return t&&c.push(wu("env",t)),n&&c.push(wu("service",n)),r&&c.push(wu("version",r)),i&&c.push(wu("datacenter",i)),s&&c.push(wu("variant",s)),c}function wu(e,t){const n=t?`${e}:${t}`:e;return(n.length>iae||aae(n))&&ft.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${Rk} ${vb}/getting_started/tagging/#defining-tags`),oae(n)}function oae(e){return e.replace(/,/g,"_")}function aae(e){return sae()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function sae(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}const p6="datad0g.com",lae="dd0g-gov.com",Ul="datadoghq.com",cae="datadoghq.eu",uae="ddog-gov.com",dae="pci.browser-intake-datadoghq.com",fae=["ddsource","dd-api-key","dd-request-id"];function h6(e,t){const n=ta.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function ty(e,t,n=mae()){if(t===void 0)return e;if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const i=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,i)}if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){const i=Array.isArray(e)?e:[];for(let o=0;o<t.length;++o)i[o]=ty(i[o],t[o],n);return i}const r=Sc(e)==="object"?e:{};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=ty(r[i],t[i],n));return r}function Pk(e){return ty(void 0,e)}function Ga(...e){let t;for(const n of e)n!=null&&(t=ty(t,n));return t}function mae(){if(typeof WeakSet<"u"){const t=new WeakSet;return{hasAlreadyBeenSeen(n){const r=t.has(n);return r||t.add(n),r}}}const e=[];return{hasAlreadyBeenSeen(t){const n=e.indexOf(t)>=0;return n||e.push(t),n}}}function g6(){var e;const t=ta.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:(e=t.connection)===null||e===void 0?void 0:e.effectiveType}}function pae(e){return e>=500}function hae(e){try{return e.clone()}catch{return}}const Ud={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"},gae=80*pd,vae=32,v6=20*FF,yae=Vr,y6=Rr;function b6(e,t,n,r,i,o){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?w6(e,t,n,o,{onSuccess:()=>S6(0,t,n,r,i,o),onFailure:()=>{t.queuedPayloads.enqueue(e)||o.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e}),x6(t,n,r,i,o)}}):t.queuedPayloads.enqueue(e)||o.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e})}function x6(e,t,n,r,i){e.transportStatus===2&&_r(()=>{const o=e.queuedPayloads.first();w6(o,e,t,i,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=y6,S6(1,e,t,n,r,i)},onFailure:()=>{e.currentBackoffTime=Math.min(yae,e.currentBackoffTime*2),x6(e,t,n,r,i)}})},e.currentBackoffTime)}function w6(e,t,n,r,{onSuccess:i,onFailure:o}){t.bandwidthMonitor.add(e),n(e,s=>{t.bandwidthMonitor.remove(e),bae(s)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:s.status},r.notify({type:"failure",bandwidth:t.bandwidthMonitor.stats(),payload:e}),o()):(t.transportStatus=0,r.notify({type:"success",bandwidth:t.bandwidthMonitor.stats(),payload:e}),i())})}function S6(e,t,n,r,i,o){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:`Reached max ${r} events size queued for upload: ${v6/FF}MiB`,source:Ud.AGENT,startClocks:Jn()}),t.queueFullReported=!0);const s=t.queuedPayloads;for(t.queuedPayloads=_6();s.size()>0;)b6(s.dequeue(),t,n,r,i,o)}function bae(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||pae(e.status))}function xae(){return{transportStatus:0,currentBackoffTime:y6,bandwidthMonitor:wae(),queuedPayloads:_6(),queueFullReported:!1}}function _6(){const e=[];return{bytesCount:0,enqueue(t){return this.isFull()?!1:(e.push(t),this.bytesCount+=t.bytesCount,!0)},first(){return e[0]},dequeue(){const t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=v6}}}function wae(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=gae&&this.ongoingRequestCount<vae},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}function C6(e,t,n){const r=new Nt,i=xae();return{observable:r,send:o=>{for(const s of e)b6(o,i,(c,d)=>Cae(s,t,c,d),s.trackType,n,r)},sendOnExit:o=>{for(const s of e)Sae(s,t,o)}}}function Sae(e,t,n){if(!!navigator.sendBeacon&&n.bytesCount<t)try{const i=e.build("beacon",n);if(navigator.sendBeacon(i,n.data))return}catch(i){_ae(i)}aC(e,n)}let KO=!1;function _ae(e){KO||(KO=!0,oc(e))}function Cae(e,t,n,r){if(Eae()&&n.bytesCount<t){const o=e.build("fetch-keepalive",n);fetch(o,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then(st(s=>r?.({status:s.status,type:s.type}))).catch(st(()=>aC(e,n,r)))}else aC(e,n,r)}function aC(e,t,n){const r=e.build("fetch",t);fetch(r,{method:"POST",body:t.data,mode:"cors"}).then(st(i=>n?.({status:i.status,type:i.type}))).catch(st(()=>n?.({status:0})))}function Eae(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function Pp(){const e=kae();if(e)return{getCapabilities(){var t;return JSON.parse(((t=e.getCapabilities)===null||t===void 0?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return(t=e.getPrivacyLevel)===null||t===void 0?void 0:t.call(e)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){const i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function E6(e){const t=Pp();return!!t&&t.getCapabilities().includes(e)}function vd(e){var t;e===void 0&&(e=(t=ho().location)===null||t===void 0?void 0:t.hostname);const n=Pp();return!!n&&n.getAllowedWebViewHosts().some(r=>e===r||e.endsWith(`.${r}`))}function kae(){return ho().DatadogEventBridge}function yn(e,t,n,r,i){return Zs(e,t,[n],r,i)}function Zs(e,t,n,r,{once:i,capture:o,passive:s}={}){const c=st(v=>{!v.isTrusted&&!v.__ddIsTrusted&&!e.allowUntrustedEvents||(i&&h(),r(v))}),d=s?{capture:o,passive:s}:o,f=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,p=Gs(f,"addEventListener");n.forEach(v=>p.call(t,v,c,d));function h(){const v=Gs(f,"removeEventListener");n.forEach(y=>v.call(t,y,c,d))}return{stop:h}}const qu={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function Rae(e){return new Nt(t=>{const{stop:n}=Zs(e,window,["visibilitychange","freeze"],i=>{i.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:qu.HIDDEN}):i.type==="freeze"&&t.notify({reason:qu.FROZEN})},{capture:!0}),r=yn(e,window,"beforeunload",()=>{t.notify({reason:qu.UNLOADING})}).stop;return()=>{n(),r()}})}function jae(e){return XF(qu).includes(e)}function k6({encoder:e,request:t,flushController:n,messageBytesLimit:r}){let i={};const o=n.flushObservable.subscribe(h=>p(h));function s(h,v,y){n.notifyBeforeAddMessage(v),y!==void 0?(i[y]=h,n.notifyAfterAddMessage()):e.write(e.isEmpty?h:`
|
|
439
|
-
${h}`,b=>{n.notifyAfterAddMessage(b-v)})}function c(h){return h!==void 0&&i[h]!==void 0}function d(h){const v=i[h];delete i[h];const y=e.estimateEncodedBytesCount(v);n.notifyAfterRemoveMessage(y)}function f(h,v){const y=Op(h),b=e.estimateEncodedBytesCount(y);if(b>=r){ft.warn(`Discarded a message whose size was bigger than the maximum allowed size ${r}KB. ${Rk} ${zie}/#technical-limitations`);return}c(v)&&d(v),s(y,b,v)}function p(h){const v=XF(i).join(`
|
|
440
|
-
`);i={};const y=jae(h.reason),b=y?t.sendOnExit:t.send;if(y&&e.isAsync){const S=e.finishSync();S.outputBytesCount&&b(ZO(S));const C=[S.pendingData,v].filter(Boolean).join(`
|
|
441
|
-
`);C&&b({data:C,bytesCount:VF(C)})}else v&&e.write(e.isEmpty?v:`
|
|
442
|
-
${v}`),e.finish(S=>{b(ZO(S))})}return{flushController:n,add:f,upsert:f,stop:o.unsubscribe}}function ZO(e){let t;return typeof e.output=="string"?t=e.output:t=new Blob([e.output],{type:"text/plain"}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}function R6({messagesLimit:e,bytesLimit:t,durationLimit:n,pageMayExitObservable:r,sessionExpireObservable:i}){const o=r.subscribe(b=>p(b.reason)),s=i.subscribe(()=>p("session_expire")),c=new Nt(()=>()=>{o.unsubscribe(),s.unsubscribe()});let d=0,f=0;function p(b){if(f===0)return;const S=f,C=d;f=0,d=0,y(),c.notify({reason:b,messagesCount:S,bytesCount:C})}let h;function v(){h===void 0&&(h=_r(()=>{p("duration_limit")},n))}function y(){no(h),h=void 0}return{flushObservable:c,get messagesCount(){return f},notifyBeforeAddMessage(b){d+b>=t&&p("bytes_limit"),f+=1,d+=b,v()},notifyAfterAddMessage(b=0){d+=b,f>=e?p("messages_limit"):d>=t&&p("bytes_limit")},notifyAfterRemoveMessage(b){d-=b,f-=1,f===0&&y()}}}const Ys="DISCARDED",Oi="SKIPPED";function Iae(){const e={};return{register(t,n){return e[t]||(e[t]=[]),e[t].push(n),{unregister:()=>{e[t]=e[t].filter(r=>r!==n)}}},triggerHook(t,n){const r=e[t]||[],i=[];for(const o of r){const s=o(n);if(s===Ys)return Ys;s!==Oi&&i.push(s)}return Ga(...i)}}}const Bs={LOG:"log",CONFIGURATION:"configuration",USAGE:"usage"},Tae=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],Nae=1,Aae=[uae];let lS;function Fd(){return lS||(lS=new GF(100)),lS}function Oae(e,t,n,r,i,o){const s=new Nt,{stop:c}=Dae(t,r,i,o,s),{enabled:d,metricsEnabled:f}=$ae(e,t,n,s);return{stop:c,enabled:d,metricsEnabled:f}}function $ae(e,t,n,r,i=Nae){const o={},s=!Aae.includes(t.site)&&Ll(t.telemetrySampleRate),c={[Bs.LOG]:s,[Bs.CONFIGURATION]:s&&Ll(t.telemetryConfigurationSampleRate),[Bs.USAGE]:s&&Ll(t.telemetryUsageSampleRate),metric:s&&Ll(i)},d=Pae(),f=Fd();return f.subscribe(({rawEvent:h,metricName:v})=>{if(v&&!c.metric||!c[h.type])return;const y=v||h.status||h.type;let b=o[y];if(b||(b=o[y]=new Set),b.size>=t.maxTelemetryEventsPerPage)return;const S=Op(h);if(b.has(S))return;const C=n.triggerHook(1,{startTime:Jn().relative});if(C===Ys)return;const E=p(C,e,h,d);r.notify(E),h6("telemetry",E),b.add(S)}),f.unbuffer(),Zie(Mk),{enabled:s,metricsEnabled:c.metric};function p(h,v,y,b){const C={type:"telemetry",date:Jn().timeStamp,service:v,version:"6.21.2",source:"browser",_dd:{format_version:2},telemetry:Ga(y,{runtime_env:b,connectivity:g6(),sdk_setup:"npm"}),ddtags:m6(t).join(","),experimental_features:Array.from(rae())};return Ga(C,h)}}function Dae(e,t,n,r,i){const o=[];if(vd()){const s=Pp(),c=i.subscribe(d=>s.send("internal_telemetry",d));o.push(c.unsubscribe)}else{const s=[e.rumEndpointBuilder];e.replica&&Mae(e)&&s.push(e.replica.rumEndpointBuilder);const c=k6({encoder:r(4),request:C6(s,e.batchBytesLimit,t),flushController:R6({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageMayExitObservable:n,sessionExpireObservable:new Nt}),messageBytesLimit:e.messageBytesLimit});o.push(c.stop);const d=i.subscribe(c.add);o.push(d.unsubscribe)}return{stop:()=>o.forEach(s=>s())}}function Pae(){var e;return{is_local_file:((e=ta.location)===null||e===void 0?void 0:e.protocol)==="file:",is_worker:Jv}}function Mae(e){return e.site===p6}function Vd(e,t){rC(gb.debug,e,t),Fd().notify({rawEvent:{type:Bs.LOG,message:e,status:"debug",...t}})}function Mk(e,t){Fd().notify({rawEvent:{type:Bs.LOG,status:"error",...Lae(e),...t}})}function zae(e){Fd().notify({rawEvent:{type:Bs.CONFIGURATION,configuration:e}})}function Eb(e,t){Fd().notify({rawEvent:{type:Bs.LOG,message:e,status:"debug",...t},metricName:e})}function or(e){Fd().notify({rawEvent:{type:Bs.USAGE,usage:e}})}function Lae(e){if(_c(e)){const t=$p(e);return{error:{kind:t.name,stack:Dp(Uae(t))},message:t.message}}return{error:{stack:f6},message:`Uncaught ${Op(e)}`}}function Uae(e){return e.stack=e.stack.filter(t=>!t.url||Tae.some(n=>t.url.startsWith(n))),e}const YO="Running the Browser SDK in a Web extension content script is discouraged and will be forbidden in a future major release unless the `allowedTrackingOrigins` option is provided.",Fae="SDK initialized on a non-allowed domain.";function Vae(e,t,n=typeof location<"u"?location.origin:""){const r=e.allowedTrackingOrigins;if(!r){if(Ioe(n,t)){ft.warn(YO);const o=Toe(t);Vd(YO,{extensionUrl:o||"unknown"})}return!0}const i=Cb(r,n);return i||ft.error(Fae),i}function Tl(e,t,n){const r=Bae(e,t);return{build(i,o){const s=Hae(e,t,i,o,n);return r(s)},trackType:t}}function Bae(e,t){const n=`/api/v2/${t}`,r=e.proxy;if(typeof r=="string"){const o=Tk(r);return s=>`${o}?ddforward=${encodeURIComponent(`${n}?${s}`)}`}if(typeof r=="function")return o=>r({path:n,parameters:o});const i=j6(t,e);return o=>`https://${i}${n}?${o}`}function j6(e,t){const{site:n=Ul,internalAnalyticsSubdomain:r}=t;if(e==="logs"&&t.usePciIntake&&n===Ul)return dae;if(r&&n===Ul)return`${r}.${Ul}`;if(n===lae)return`http-intake.logs.${n}`;const i=n.split("."),o=i.pop();return`browser-intake-${i.join("-")}.${o}`}function Hae({clientToken:e,internalAnalyticsSubdomain:t,source:n="browser"},r,i,{retry:o,encoding:s},c=[]){const d=[`ddsource=${n}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.21.2")}`,"dd-evp-origin=browser",`dd-request-id=${jr()}`].concat(c);return s&&d.push(`dd-evp-encoding=${s}`),r==="rum"&&(d.push(`batch_time=${sr()}`,`_dd.api=${i}`),o&&d.push(`_dd.retry_count=${o.count}`,`_dd.retry_after=${o.lastFailureStatus}`)),t&&d.reverse(),d.join("&")}function qae(e){const t=e.site||Ul,n=Gae(e.source),r=Kae({...e,site:t,source:n});return{replica:Zae({...e,site:t,source:n}),site:t,source:n,...r}}function Gae(e){return e==="flutter"||e==="unity"?e:"browser"}function Kae(e){return{logsEndpointBuilder:Tl(e,"logs"),rumEndpointBuilder:Tl(e,"rum"),profilingEndpointBuilder:Tl(e,"profile"),sessionReplayEndpointBuilder:Tl(e,"replay"),exposuresEndpointBuilder:Tl(e,"exposures")}}function Zae(e){if(!e.replica)return;const t={...e,site:Ul,clientToken:e.replica.clientToken};return{logsEndpointBuilder:Tl(t,"logs"),rumEndpointBuilder:Tl(t,"rum",[`application.id=${e.replica.applicationId}`])}}function Yae(e){return fae.every(t=>e.includes(t))}const Mu={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},sC={ALL:"all",SAMPLED:"sampled"};function cS(e,t){return e!=null&&typeof e!="string"?(ft.error(`${t} must be defined as a string`),!1):!0}function Wae(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(ft.error(`Site should be a valid Datadog site. ${Rk} ${vb}/getting_started/site/.`),!1):!0}function zu(e,t){return e!==void 0&&!Lie(e)?(ft.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function Xae(e,t){var n,r,i,o,s,c,d,f,p,h;if(!e||!e.clientToken){ft.error("Client Token is not configured, we will not send any data.");return}if(e.allowedTrackingOrigins!==void 0&&!Array.isArray(e.allowedTrackingOrigins)){ft.error("Allowed Tracking Origins must be an array");return}if(!(!Wae(e.site)||!zu(e.sessionSampleRate,"Session")||!zu(e.telemetrySampleRate,"Telemetry")||!zu(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!zu(e.telemetryUsageSampleRate,"Telemetry Usage")||!cS(e.version,"Version")||!cS(e.env,"Env")||!cS(e.service,"Service")||!Vae(e,t??""))){if(e.trackingConsent!==void 0&&!Qv(iC,e.trackingConsent)){ft.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:e.beforeSend&&MF(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:Jv?void 0:Eoe(e),sessionSampleRate:(n=e.sessionSampleRate)!==null&&n!==void 0?n:100,telemetrySampleRate:(r=e.telemetrySampleRate)!==null&&r!==void 0?r:20,telemetryConfigurationSampleRate:(i=e.telemetryConfigurationSampleRate)!==null&&i!==void 0?i:5,telemetryUsageSampleRate:(o=e.telemetryUsageSampleRate)!==null&&o!==void 0?o:5,service:(s=e.service)!==null&&s!==void 0?s:void 0,env:(c=e.env)!==null&&c!==void 0?c:void 0,version:(d=e.version)!==null&&d!==void 0?d:void 0,datacenter:(f=e.datacenter)!==null&&f!==void 0?f:void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:(p=e.trackingConsent)!==null&&p!==void 0?p:iC.GRANTED,trackAnonymousUser:(h=e.trackAnonymousUser)!==null&&h!==void 0?h:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,batchBytesLimit:16*pd,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*Rr,batchMessagesLimit:Jv?1:50,messageBytesLimit:256*pd,variant:e.variant,sdkVersion:e.sdkVersion,...qae(e)}}}function Qae(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),source:e.source,sdk_version:e.sdkVersion,variant:e.variant}}function Jo(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!="function")if(t in e&&t.startsWith("on"))i=Ft;else return{stop:Ft};let o=!1;const s=function(){if(o)return i.apply(this,arguments);const c=Array.from(arguments);let d;Vs(n,null,[{target:this,parameters:c,onPostCall:p=>{d=p},handlingStack:r?Ym("instrumented method"):void 0}]);const f=i.apply(this,c);return d&&Vs(d,null,[f]),f};return e[t]=s,{stop:()=>{o=!0,e[t]===s&&(e[t]=i)}}}function MTe(e,t,n){const r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:Ft};const i=Ft;let o=(c,d)=>{_r(()=>{o!==i&&n(c,d)},0)};const s=function(c){r.set.call(this,c),o(this,c)};return Object.defineProperty(e,t,{set:s}),{stop:()=>{var c;((c=Object.getOwnPropertyDescriptor(e,t))===null||c===void 0?void 0:c.set)===s&&Object.defineProperty(e,t,r),o=i}}}function Jae(){return new Nt(e=>{const t=(i,o)=>{const s=$k({stackTrace:o,originalError:i,startClocks:Jn(),nonErrorPrefix:"Uncaught",source:Ud.SOURCE,handling:"unhandled"});e.notify(s)},{stop:n}=ese(t),{stop:r}=tse(t);return()=>{n(),r()}})}function ese(e){return Jo(ho(),"onerror",({parameters:[t,n,r,i,o]})=>{let s;_c(o)||(s=Koe(t,n,r,i)),e(o??t,s)})}function tse(e){return Jo(ho(),"onunhandledrejection",({parameters:[t]})=>{e(t.reason||"Empty reason")})}function nse(e){const t={version:"6.21.2",onReady(n){n()},...e};return Object.defineProperty(t,"_setDebug",{get(){return Yie},enumerable:!1}),t}function rse(e,t,n){const r=e[t];r&&!r.q&&r.version&&ft.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=n,r&&r.q&&r.q.forEach(i=>MF(i,"onReady callback threw an error:")())}function I6(e,t){t.silentMultipleInit||ft.error(`${e} is already initialized.`)}const Wm={intervention:"intervention",cspViolation:"csp_violation"};function ise(e,t){const n=[];t.includes(Wm.cspViolation)&&n.push(ase(e));const r=t.filter(i=>i!==Wm.cspViolation);return r.length&&n.push(ose(r)),qF(...n)}function ose(e){return new Nt(t=>{if(!window.ReportingObserver)return;const n=st((i,o)=>i.forEach(s=>t.notify(sse(s)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function ase(e){return new Nt(t=>{const{stop:n}=yn(e,document,"securitypolicyviolation",r=>{t.notify(lse(r))});return n})}function sse(e){const{type:t,body:n}=e;return T6({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:N6(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function lse(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return T6({type:e.effectiveDirective,message:`${Wm.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:N6(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${Ik(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function T6(e){return{startClocks:Jn(),source:Ud.REPORT,handling:"unhandled",...e}}function N6(e,t,n,r,i){return n?Dp({name:e,message:t,stack:[{func:"?",url:n,line:r??void 0,column:i??void 0}]}):void 0}function A6(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function jm(e){return Array.isArray(e)&&e.length>0}const Ag=1/0,cse=Vr;let rm=null;const mv=new Set;function use(){mv.forEach(e=>e())}function Bd({expireDelay:e,maxEntries:t}){let n=[];rm||(rm=zd(()=>use(),cse));const r=()=>{const p=Ai()-e;for(;n.length>0&&n[n.length-1].endTime<p;)n.pop()};mv.add(r);function i(p,h){const v={value:p,startTime:h,endTime:Ag,remove:()=>{A6(n,v)},close:y=>{v.endTime=y}};return t&&n.length>=t&&n.pop(),n.unshift(v),v}function o(p=Ag,h={returnInactive:!1}){for(const v of n)if(v.startTime<=p){if(h.returnInactive||p<=v.endTime)return v.value;break}}function s(p){const h=n[0];h&&h.endTime===Ag&&h.close(p)}function c(p=Ag,h=0){const v=Md(p,h);return n.filter(y=>y.startTime<=v&&p<=y.endTime).map(y=>y.value)}function d(){n=[]}function f(){mv.delete(r),mv.size===0&&rm&&(bb(rm),rm=null)}return{add:i,find:o,closeActive:s,findAll:c,reset:d,stop:f}}const dse="datadog-synthetics-public-id",fse="datadog-synthetics-result-id",mse="datadog-synthetics-injects-rum";function O6(){return Jv?!1:!!(ta._DATADOG_SYNTHETICS_INJECTS_RUM||Ps(mse))}function $6(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||Ps(dse);return typeof e=="string"?e:void 0}function D6(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||Ps(fse);return typeof e=="string"?e:void 0}function P6(){return!!($6()&&D6())}const pse=Vr,hse=wc;function gse(e,t,n,r){const i=new Nt,o=new Nt,s=Roe(e.sessionStoreStrategyType,e,t,n),c=Bd({expireDelay:hse});if(s.renewObservable.subscribe(()=>{c.add(d(),Ai()),i.notify()}),s.expireObservable.subscribe(()=>{o.notify(),c.closeActive(Ai())}),s.expandOrRenewSession(),c.add(d(),UF().relative),Ld(qa.SHORT_SESSION_INVESTIGATION)){const f=s.getSession();f&&wse(e,f)}r.observable.subscribe(()=>{r.isGranted()?s.expandOrRenewSession():s.expire()}),vse(e,()=>{r.isGranted()&&s.expandOrRenewSession()}),yse(e,()=>s.expandSession()),bse(e,()=>s.restartSession());function d(){const f=s.getSession();return f?{id:f.id,trackingType:f[t],isReplayForced:!!f.forcedReplay,anonymousId:f.anonymousId}:(xse().catch(()=>{}),{id:"invalid",trackingType:JF,isReplayForced:!1,anonymousId:void 0})}return{findSession:(f,p)=>c.find(f,p),renewObservable:i,expireObservable:o,sessionStateUpdateObservable:s.sessionStateUpdateObservable,expire:s.expire,updateSessionState:s.updateSessionState}}function vse(e,t){const{stop:n}=Zs(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function yse(e,t){const n=()=>{document.visibilityState==="visible"&&t()},{stop:r}=yn(e,document,"visibilitychange",n);zd(n,pse)}function bse(e,t){const{stop:n}=yn(e,window,"resume",t,{capture:!0})}async function xse(){const e=i6();Vd("Unexpected session state",{session:e,isSyntheticsTest:P6(),createdTimestamp:e?.created,expireTimestamp:e?.expire,cookie:await M6(),currentDomain:`${window.location.protocol}//${window.location.hostname}`})}function wse(e,t){if(!window.cookieStore||!t.created)return;const n=Number(t.created),r=Ur(),{stop:i}=yn(e,cookieStore,"change",o);function o(s){const c=WF(s.changed,f=>f.name===Ks);if(!c)return;const d=Ur()-n;if(d>14*Vr)i();else{const f=Ok(c.value);if(f.id&&f.id!==t.id){i();const p=Ur()-r;M6().then(h=>{Vd("Session cookie changed",{time:p,session_age:d,old:t,new:f,cookie:h})}).catch(oc)}}}}async function M6(){let e;return"cookieStore"in window?e=await window.cookieStore.getAll(Ks):e=document.cookie.split(/\s*;\s*/).filter(t=>t.startsWith(Ks)),{count:e.length,domain:YF()||"undefined",...e}}function Sse(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){const i=VF(n);t+=i,e+=n,r&&r(i)},finish(n){n(this.finishSync())},finishSync(){const n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,n},estimateEncodedBytesCount(n){return n.length}}}class _se{constructor(){this.callbacks={}}notify(t,n){const r=this.callbacks[t];r&&r.forEach(i=>i(n))}subscribe(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(r=>n!==r)}}}}function uS(e,t,n){let r=0,i=!1;return{isLimitReached(){if(r===0&&_r(()=>{r=0},Vr),r+=1,r<=t||i)return i=!1,!1;if(r===t+1){i=!0;try{n({message:`Reached max number of ${e}s by minute: ${t}`,source:Ud.AGENT,startClocks:Jn()})}finally{i=!1}}return!0}}}function zk(e,t,n){return document.readyState===t||document.readyState==="complete"?(n(),{stop:Ft}):yn(e,window,t==="complete"?"load":"DOMContentLoaded",n,{once:!0})}function Cse(e,t){return new Promise(n=>{zk(e,t,n)})}let dS;const Lk=new WeakMap;function Ese(e){return dS||(dS=kse(e)),dS}function kse(e){return new Nt(t=>{const{stop:n}=Jo(XMLHttpRequest.prototype,"open",Rse),{stop:r}=Jo(XMLHttpRequest.prototype,"send",o=>{jse(o,e,t)},{computeHandlingStack:!0}),{stop:i}=Jo(XMLHttpRequest.prototype,"abort",Ise);return()=>{n(),r(),i()}})}function Rse({target:e,parameters:[t,n]}){Lk.set(e,{state:"open",method:String(t).toUpperCase(),url:Tk(String(n))})}function jse({target:e,parameters:[t],handlingStack:n},r,i){const o=Lk.get(e);if(!o)return;const s=o;s.state="start",s.startClocks=Jn(),s.isAborted=!1,s.xhr=e,s.handlingStack=n,s.body=t;let c=!1;const{stop:d}=Jo(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&f()}),f=()=>{if(p(),d(),c)return;c=!0;const h=o;h.state="complete",h.duration=kn(s.startClocks.timeStamp,sr()),h.status=e.status,i.notify(qm(h))},{stop:p}=yn(r,e,"loadend",f);i.notify(s)}function Ise({target:e}){const t=Lk.get(e);t&&(t.isAborted=!0)}let fS;function z6(){return fS||(fS=Tse()),fS}function Tse(){return new Nt(e=>{if(!ta.fetch)return;const{stop:t}=Jo(ta,"fetch",n=>Nse(n,e),{computeHandlingStack:!0});return t})}function Nse({parameters:e,onPostCall:t,handlingStack:n},r){const[i,o]=e;let s=o&&o.method;s===void 0&&i instanceof Request&&(s=i.method);const c=s!==void 0?String(s).toUpperCase():"GET",d=i instanceof Request?i.url:Tk(String(i)),f=Jn(),p={state:"start",init:o,input:i,method:c,startClocks:f,url:d,handlingStack:n};r.notify(p),e[0]=p.input,e[1]=p.init,t(h=>Ase(r,h,p))}function Ase(e,t,n){const r=n;function i(o){r.state="resolve",Object.assign(r,o),e.notify(r)}t.then(st(o=>{i({response:o,responseType:o.type,status:o.status,isAborted:!1})}),st(o=>{var s,c;i({status:0,isAborted:((c=(s=r.init)===null||s===void 0?void 0:s.signal)===null||c===void 0?void 0:c.aborted)||o instanceof DOMException&&o.code===DOMException.ABORT_ERR,error:o})}))}function Ose(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback(st(e),t);return()=>window.cancelIdleCallback(n)}return Dse(e)}const $se=50;function Dse(e){const t=Ur(),n=_r(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,$se-(Ur()-t))})},0);return()=>no(n)}const Pse=Rr,Mse=30;function zse(){const e=[];function t(r){let i;if(r.didTimeout){const o=performance.now();i=()=>Mse-(performance.now()-o)}else i=r.timeRemaining.bind(r);for(;i()>0&&e.length;)e.shift()();e.length&&n()}function n(){Ose(t,{timeout:Pse})}return{push(r){e.push(r)===1&&n()},stop(){e.length=0}}}let mS={};function Lse(e){const t=e.map(n=>(mS[n]||(mS[n]=Use(n)),mS[n]));return qF(...t)}function Use(e){return new Nt(t=>{const n=Da[e];return Da[e]=(...r)=>{n.apply(console,r);const i=Ym("console error");Vs(()=>{t.notify(Fse(r,e,i))})},()=>{Da[e]=n}})}function Fse(e,t,n){const r=e.map(i=>Vse(i)).join(" ");if(t===gb.error){const i=e.find(_c),o=$k({originalError:i,handlingStack:n,startClocks:Jn(),source:Ud.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return o.message=r,{api:t,message:r,handlingStack:n,error:o}}return{api:t,message:r,error:void 0,handlingStack:n}}function Vse(e){return typeof e=="string"?an(e):_c(e)?d6($p(e)):Op(an(e),void 0,2)}const Bse=500;function Hse(){const e=[];return{add:i=>{e.push(i)>Bse&&e.splice(0,1)},remove:i=>{A6(e,i)},drain:i=>{e.forEach(o=>o(i)),e.length=0}}}function qse(e){const t=Sc(e)==="object";return t||ft.error("Unsupported context:",e),t}function pS(e,t,n){const r={...e};for(const[i,{required:o,type:s}]of Object.entries(t))s==="string"&&!WO(r[i])&&(r[i]=String(r[i])),o&&WO(r[i])&&ft.warn(`The property ${i} of ${n} is required; context will not be sent to the intake.`);return r}function WO(e){return e==null||e===""}function kb(e="",{propertiesConfig:t={}}={}){let n={};const r=new Nt,i={getContext:()=>Pk(n),setContext:o=>{qse(o)?n=an(pS(o,t,e)):i.clearContext(),r.notify()},setContextProperty:(o,s)=>{n=an(pS({...n,[o]:s},t,e)),r.notify()},removeContextProperty:o=>{delete n[o],pS(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}function Nr(e,t,n,r){return st((...i)=>(r&&or({feature:r}),e()[t][n](...i)))}const Gse="_dd_c",Kse=[];function Uk(e,t,n,r){const i=Zse(n,r);Kse.push(yn(e,window,"storage",({key:f})=>{i===f&&s()})),t.changeObservable.subscribe(c);const o=Ga(d(),t.getContext());xc(o)||t.setContext(o);function s(){t.setContext(d())}function c(){localStorage.setItem(i,JSON.stringify(t.getContext()))}function d(){const f=localStorage.getItem(i);return f?JSON.parse(f):{}}}function Zse(e,t){return`${Gse}_${e}_${t}`}function Yse(e,t,n){const r=L6();return t.storeContextsAcrossPages&&Uk(t,r,n,4),e.register(0,()=>{const i=r.getContext();return xc(i)||!i.id?Oi:{account:i}}),r}function L6(){return kb("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function Wse(e,t,n,r){const i=U6();return t.storeContextsAcrossPages&&Uk(t,i,n,2),e.register(0,()=>({context:i.getContext()})),i}function U6(){return kb("global context")}function Xse(e,t,n,r){const i=F6();return t.storeContextsAcrossPages&&Uk(t,i,r,1),e.register(0,({eventType:o,startTime:s})=>{const c=i.getContext(),d=n.findTrackedSession(s);return d&&d.anonymousId&&!c.anonymous_id&&t.trackAnonymousUser&&(c.anonymous_id=d.anonymousId),xc(c)?Oi:{type:o,usr:c}}),e.register(1,({startTime:o})=>{var s;return{anonymous_id:(s=n.findTrackedSession(o))===null||s===void 0?void 0:s.anonymousId}}),i}function F6(){return kb("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}const ar={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},Ar={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"};function Qse(e,t,n){const r=e.getReader();let i=0;o();function o(){r.read().then(st(c=>{if(c.done){s();return}i+=c.value.length,i>n.bytesLimit?s():o()}),st(c=>t(c)))}function s(){r.cancel().catch(Ft),t(void 0,void 0,void 0)}}const Dr={DOCUMENT:"document",XHR:"xhr",BEACON:"beacon",FETCH:"fetch",CSS:"css",JS:"js",IMAGE:"image",FONT:"font",MEDIA:"media",OTHER:"other"},Rb={FETCH:Dr.FETCH,XHR:Dr.XHR},Jse=500;function ele(e=Jae){const t=new GF(Jse),n=e().subscribe(r=>{t.notify({type:0,error:r})});return{observable:t,stop:()=>{n.unsubscribe()}}}function tle(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}const gt={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",VITAL:"vital"},V6={LONG_TASK:"long-task",LONG_ANIMATION_FRAME:"long-animation-frame"},Pa={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change",BF_CACHE:"bf_cache"},Fk={CLICK:"click",CUSTOM:"custom"},im={RAGE_CLICK:"rage_click",ERROR_CLICK:"error_click",DEAD_CLICK:"dead_click"},Xm={DURATION:"duration",OPERATION_STEP:"operation_step"};function nle(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function rle(e,t,n){function r(s){return!t.wasInPageStateDuringPeriod("frozen",s.startClocks.relative,s.duration)}function i(s){r(s)&&e.notify(12,XO(s))}function o(s,c,d,f){if(!Ld(qa.FEATURE_OPERATION_VITAL))return;const{operationKey:p,context:h,description:v}=d||{},y={name:s,type:Xm.OPERATION_STEP,operationKey:p,failureReason:f,stepType:c,startClocks:Jn(),context:an(h),description:v};e.notify(12,XO(y))}return{addOperationStepVital:o,addDurationVital:i,startDurationVital:(s,c={})=>B6(n,s,c),stopDurationVital:(s,c={})=>{H6(i,n,s,c)}}}function B6({vitalsByName:e,vitalsByReference:t},n,r={}){const i={name:n,startClocks:Jn(),...r},o={__dd_vital_reference:!0};return e.set(n,i),t.set(o,i),o}function H6(e,{vitalsByName:t,vitalsByReference:n},r,i={}){const o=typeof r=="string"?t.get(r):n.get(r);o&&(e(ile(o,o.startClocks,i,Jn())),typeof r=="string"?t.delete(r):n.delete(r))}function ile(e,t,n,r){var i;return{name:e.name,type:Xm.DURATION,startClocks:t,duration:kn(t.timeStamp,r.timeStamp),context:Ga(e.context,n.context),description:(i=n.description)!==null&&i!==void 0?i:e.description}}function XO(e){const{startClocks:t,type:n,name:r,description:i,context:o}=e,s={id:jr(),type:n,name:r,description:i,...n===Xm.DURATION?{duration:ht(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason}};return{rawRumEvent:{date:t.timeStamp,vital:s,type:gt.VITAL,context:o},startTime:t.relative,duration:n===Xm.DURATION?e.duration:void 0,domainContext:{}}}function q6(e,t,n){if(e)for(const r of e){const i=r[t];i&&i(n)}}const QO=new Map;function G6(e,t){if(t===100)return!0;if(t===0)return!1;const n=QO.get(t);if(n&&e===n.sessionId)return n.decision;let r;return window.BigInt?r=ole(BigInt(`0x${e.split("-")[4]}`),t):r=Ll(t),QO.set(t,{sessionId:e,decision:r}),r}function ole(e,t){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000"),i=e*n%r;return Number(i)<=t/100*Number(r)}function ale(){return Z6(64)}function K6(){return Z6(63)}function Z6(e){const t=crypto.getRandomValues(new Uint32Array(2));return e===63&&(t[t.length-1]>>>=1),{toString(n=10){let r=t[1],i=t[0],o="";do{const s=r%n*4294967296+i;r=Math.floor(r/n),i=Math.floor(s/n),o=(s%n).toString(n)+o}while(r||i);return o}}}function Su(e){return e.toString(16).padStart(16,"0")}function sle(e){const t=e;return Sc(t)==="object"&&Zm(t.match)&&Array.isArray(t.propagatorTypes)}function lle(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function cle(e,t,n,r){return{clearTracingIfNeeded:lle,traceFetch:i=>JO(e,i,t,n,r,o=>{var s;if(i.input instanceof Request&&!(!((s=i.init)===null||s===void 0)&&s.headers))i.input=new Request(i.input),Object.keys(o).forEach(c=>{i.input.headers.append(c,o[c])});else{i.init=qm(i.init);const c=[];i.init.headers instanceof Headers?i.init.headers.forEach((d,f)=>{c.push([f,d])}):Array.isArray(i.init.headers)?i.init.headers.forEach(d=>{c.push(d)}):i.init.headers&&Object.keys(i.init.headers).forEach(d=>{c.push([d,i.init.headers[d]])}),i.init.headers=c.concat(Nk(o))}}),traceXhr:(i,o)=>JO(e,i,t,n,r,s=>{Object.keys(s).forEach(c=>{o.setRequestHeader(c,s[c])})})}}function JO(e,t,n,r,i,o){const s=n.findTrackedSession();if(!s)return;const c=e.allowedTracingUrls.find(p=>Cb([p.match],t.url,!0));if(!c)return;const d=G6(s.id,e.traceSampleRate);(d||e.traceContextInjection===sC.ALL)&&(t.traceSampled=d,t.traceId=ale(),t.spanId=K6(),o(ule(t.traceId,t.spanId,t.traceSampled,s.id,c.propagatorTypes,r,i,e)))}function ule(e,t,n,r,i,o,s,c){const d={};if(i.forEach(f=>{switch(f){case"datadog":{Object.assign(d,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":e.toString()});break}case"tracecontext":{Object.assign(d,{traceparent:`00-0000000000000000${Su(e)}-${Su(t)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break}case"b3":{Object.assign(d,{b3:`${Su(e)}-${Su(t)}-${n?"1":"0"}`});break}case"b3multi":{Object.assign(d,{"X-B3-TraceId":Su(e),"X-B3-SpanId":Su(t),"X-B3-Sampled":n?"1":"0"});break}}}),c.propagateTraceBaggage){const f={"session.id":r},p=o.getContext().id;typeof p=="string"&&(f["user.id"]=p);const h=s.getContext().id;typeof h=="string"&&(f["account.id"]=h);const v=Object.entries(f).map(([y,b])=>`${y}=${encodeURIComponent(b)}`).join(",");v&&(d.baggage=v)}return d}const Y6=["tracecontext","datadog"];function dle(e,t){var n,r,i,o,s,c,d;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&ft.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){ft.error("Application ID is not configured, no RUM data will be collected.");return}if(!zu(e.sessionReplaySampleRate,"Session Replay")||!zu(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){ft.error("Excluded Activity Urls should be an array");return}const f=fle(e);if(!f)return;const p=Xae(e,t),h=ple(e);if(!p)return;const v=(n=e.sessionReplaySampleRate)!==null&&n!==void 0?n:0;return{applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:v,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually!==void 0?!!e.startSessionReplayRecordingManually:v===0,traceSampleRate:(r=e.traceSampleRate)!==null&&r!==void 0?r:100,rulePsr:Np(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:f,excludedActivityUrls:(i=e.excludedActivityUrls)!==null&&i!==void 0?i:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(!((o=e.trackUserInteractions)!==null&&o!==void 0)||o),trackViewsManually:!!e.trackViewsManually,trackResources:!!(!((s=e.trackResources)!==null&&s!==void 0)||s),trackLongTasks:!!(!((c=e.trackLongTasks)!==null&&c!==void 0)||c),trackBfcacheViews:!!e.trackBfcacheViews,trackEarlyRequests:!!e.trackEarlyRequests,subdomain:e.subdomain,defaultPrivacyLevel:Qv(Mu,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:Mu.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,traceContextInjection:Qv(sC,e.traceContextInjection)?e.traceContextInjection:sC.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:(d=e.profilingSampleRate)!==null&&d!==void 0?d:0,propagateTraceBaggage:!!e.propagateTraceBaggage,allowedGraphQlUrls:h,...p}}function fle(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){ft.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){ft.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(n=>{Zm(n)?t.push({match:n,propagatorTypes:Y6}):sle(n)?t.push(n):ft.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",n)}),t}function mle(e){const t=new Set;return jm(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(n=>{Zm(n)?Y6.forEach(r=>t.add(r)):Sc(n)==="object"&&Array.isArray(n.propagatorTypes)&&n.propagatorTypes.forEach(r=>t.add(r))}),Array.from(t)}function ple(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return ft.warn("allowedGraphQlUrls should be an array"),[];const t=[];return e.allowedGraphQlUrls.forEach(n=>{Zm(n)?t.push({match:n,trackPayload:!1}):n&&typeof n=="object"&&"match"in n&&Zm(n.match)&&t.push({match:n.match,trackPayload:!!n.trackPayload})}),t}function hle(e){return jm(e)&&e.some(t=>typeof t=="object"&&"trackPayload"in t?!!t.trackPayload:!1)}function gle(e){var t;const n=Qae(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:jm(e.allowedTracingUrls),use_allowed_graph_ql_urls:jm(e.allowedGraphQlUrls),use_track_graph_ql_payload:hle(e.allowedGraphQlUrls),selected_tracing_propagators:mle(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:jm(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,track_bfcache_views:e.trackBfcacheViews,track_early_requests:e.trackEarlyRequests,plugins:(t=e.plugins)===null||t===void 0?void 0:t.map(r=>{var i;return{name:r.name,...(i=r.getConfigurationTelemetry)===null||i===void 0?void 0:i.call(r)}}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:e.remoteConfigurationId,profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy,...n}}function vle(e){const t=[];let n=0,r;const i={quote:void 0,escapeSequence:void 0};let o="";for(const s of e){if(r=e$[n].find(c=>_le[c](s,i)),!r)return[];if(i.escapeSequence!==void 0&&r!==12){if(!kle(i.escapeSequence))return[];o+=jle(i.escapeSequence),i.escapeSequence=void 0}Cle.includes(r)?o+=s:Ele.includes(r)&&o!==""?(t.push(o),o=""):r===12?i.escapeSequence=i.escapeSequence?`${i.escapeSequence}${s}`:s:r===8?i.quote=s:r===9&&(i.quote=void 0),n=r}return e$[n].includes(1)?(o!==""&&t.push(o),t):[]}const yle=/[a-zA-Z_$]/,ble=/[a-zA-Z0-9_$]/,xle=/[0-9]/,wle=/[a-fA-F0-9]/,Sle=`'"`,_le={0:()=>!1,1:()=>!1,2:e=>yle.test(e),3:e=>ble.test(e),4:e=>e===".",5:e=>e==="[",6:e=>e==="]",7:e=>xle.test(e),8:e=>Sle.includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>e==="\\",12:(e,t)=>t.escapeSequence===void 0?`${t.quote}/\\bfnrtu`.includes(e):t.escapeSequence.startsWith("u")&&t.escapeSequence.length<5?wle.test(e):!1},e$={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},Cle=[2,3,7,10],Ele=[4,5,6];function kle(e){return`"'/\\bfnrt`.includes(e)||e.startsWith("u")&&e.length===5}const Rle={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:`
|
|
443
|
-
`,r:"\r",t:" "};function jle(e){return e.startsWith("u")?String.fromCharCode(parseInt(e.slice(1),16)):Rle[e]}const Ile="v1",Tle=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function Nle(e,t){let n;const r=Ole(),i=await Mle(e);return i.ok?(r.increment("fetch","success"),n=Ale(e,i.value,t,r)):(r.increment("fetch","failure"),ft.error(i.error)),Eb("remote configuration metrics",{metrics:r.get()}),n}function Ale(e,t,n,r){const i={...e};return Tle.forEach(v=>{v in t&&(i[v]=o(t[v]))}),Object.keys(n).forEach(v=>{t[v]!==void 0&&s(n[v],t[v])}),i;function o(v){if(Array.isArray(v))return v.map(o);if($le(v)){if(Dle(v)){const y=v.rcSerializedType;switch(y){case"string":return v.value;case"regex":return W6(v.value);case"dynamic":return c(v);default:ft.error(`Unsupported remote configuration: "rcSerializedType": "${y}"`);return}}return BF(v,o)}return v}function s(v,y){y.forEach(({key:b,value:S})=>{v.setContextProperty(b,o(S))})}function c(v){const y=v.strategy;let b;switch(y){case"cookie":b=d(v);break;case"dom":b=f(v);break;case"js":b=h(v);break;default:ft.error(`Unsupported remote configuration: "strategy": "${y}"`);return}const S=v.extractor;return S!==void 0&&typeof b=="string"?Ple(S,b):b}function d({name:v}){const y=_b(v);return r.increment("cookie",y!==void 0?"success":"missing"),y}function f({selector:v,attribute:y}){let b;try{b=document.querySelector(v)}catch{ft.error(`Invalid selector in the remote configuration: '${v}'`),r.increment("dom","failure");return}if(!b){r.increment("dom","missing");return}if(p(b,y)){ft.error(`Forbidden element selected by the remote configuration: '${v}'`),r.increment("dom","failure");return}const S=y!==void 0?b.getAttribute(y):b.textContent;if(S===null){r.increment("dom","missing");return}return r.increment("dom","success"),S}function p(v,y){return v.getAttribute("type")==="password"&&y==="value"}function h({path:v}){let y=window;const b=vle(v);if(b.length===0){ft.error(`Invalid JSON path in the remote configuration: '${v}'`),r.increment("js","failure");return}for(const S of b){if(!(S in y)){r.increment("js","missing");return}try{y=y[S]}catch(C){ft.error(`Error accessing: '${v}'`,C),r.increment("js","failure");return}}return r.increment("js","success"),y}}function Ole(){const e={fetch:{}};return{get:()=>e,increment:(t,n)=>{e[t]||(e[t]={}),e[t][n]||(e[t][n]=0),e[t][n]=e[t][n]+1}}}function $le(e){return typeof e=="object"&&e!==null}function Dle(e){return"rcSerializedType"in e}function W6(e){try{return new RegExp(e)}catch{ft.error(`Invalid regex in the remote configuration: '${e}'`)}}function Ple(e,t){const n=W6(e.value);if(n===void 0)return;const r=n.exec(t);if(r===null)return;const[i,o]=r;return o||i}async function Mle(e){let t;try{t=await fetch(zle(e))}catch{t=void 0}if(!t||!t.ok)return{ok:!1,error:new Error("Error fetching the remote configuration.")};const n=await t.json();return n.rum?{ok:!0,value:n.rum}:{ok:!1,error:new Error("No remote configuration for RUM.")}}function zle(e){return e.remoteConfigurationProxy?e.remoteConfigurationProxy:`https://sdk-configuration.${j6("rum",e)}/${Ile}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function Lle({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t},n,r,i){const o=Hse(),s=U6();hS(s,ar.globalContext,o);const c=F6();hS(c,ar.userContext,o);const d=L6();hS(d,ar.accountContext,o);let f,p,h,v;const y=n.observable.subscribe(S),b={};function S(){if(!h||!v||!n.isGranted())return;y.unsubscribe();let I;if(v.trackViewsManually){if(!f)return;o.remove(f.callback),I=f.options}const A=i(v,p,I);o.drain(A)}function C(I,A){const T=vd();if(T&&(I=Ule(I)),h=I,zae(gle(I)),v){I6("DD_RUM",I);return}const N=dle(I,A);if(N){if(!T&&!N.sessionStoreStrategyType){ft.warn("No storage available for session. We will not send any data.");return}N.compressIntakeRequests&&!T&&t&&(p=t(N,"Datadog RUM",Ft),!p)||(v=N,z6().subscribe(Ft),n.tryToInit(N.trackingConsent),S())}}const E=I=>{o.add(A=>A.addDurationVital(I))};return{init(I,A,T){if(!I){ft.error("Missing configuration");return}tae(I.enableExperimentalFeatures),h=I,!(e&&O6())&&(q6(I.plugins,"onInit",{initConfiguration:I,publicApi:A}),I.remoteConfigurationId?Nle(I,{user:c,context:s}).then(N=>{N&&C(N,T)}).catch(oc):C(I,T))},get initConfiguration(){return h},getInternalContext:Ft,stopSession:Ft,addTiming(I,A=sr()){o.add(T=>T.addTiming(I,A))},startView(I,A=Jn()){const T=N=>{N.startView(I,A)};o.add(T),f||(f={options:I,callback:T},S())},setViewName(I){o.add(A=>A.setViewName(I))},setViewContext(I){o.add(A=>A.setViewContext(I))},setViewContextProperty(I,A){o.add(T=>T.setViewContextProperty(I,A))},getViewContext:()=>b,globalContext:s,userContext:c,accountContext:d,addAction(I){o.add(A=>A.addAction(I))},addError(I){o.add(A=>A.addError(I))},addFeatureFlagEvaluation(I,A){o.add(T=>T.addFeatureFlagEvaluation(I,A))},startDurationVital(I,A){return B6(r,I,A)},stopDurationVital(I,A){H6(E,r,I,A)},addDurationVital:E,addOperationStepVital:(I,A,T,N)=>{o.add(z=>z.addOperationStepVital(an(I),A,an(T),an(N)))}}}function Ule(e){var t,n;return{...e,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:(t=e.defaultPrivacyLevel)!==null&&t!==void 0?t:(n=Pp())===null||n===void 0?void 0:n.getPrivacyLevel()}}function hS(e,t,n){e.changeObservable.subscribe(()=>{const r=e.getContext();n.add(i=>i[t].setContext(r))})}function Fle(e,t,n,r={}){const i=joe(),o=nle(),s=ele().observable;let c=Lle(r,i,o,(h,v,y)=>{const b=e(h,t,n,y,v&&r.createDeflateEncoder?S=>r.createDeflateEncoder(h,v,S):Sse,i,o,s,r.sdkName);return t.onRumStart(b.lifeCycle,h,b.session,b.viewHistory,v,b.telemetry),n.onRumStart(b.lifeCycle,b.hooks,h,b.session,b.viewHistory),c=Vle(c,b),q6(h.plugins,"onRumStart",{strategy:c,addEvent:b.addEvent}),b});const d=()=>c,f=st(h=>{const v=typeof h=="object"?h:{name:h};c.startView(v),or({feature:"start-view"})}),p=nse({init:h=>{const v=new Error().stack;Vs(()=>c.init(h,p,v))},setTrackingConsent:st(h=>{i.update(h),or({feature:"set-tracking-consent",tracking_consent:h})}),setViewName:st(h=>{c.setViewName(h),or({feature:"set-view-name"})}),setViewContext:st(h=>{c.setViewContext(h),or({feature:"set-view-context"})}),setViewContextProperty:st((h,v)=>{c.setViewContextProperty(h,v),or({feature:"set-view-context-property"})}),getViewContext:st(()=>(or({feature:"set-view-context-property"}),c.getViewContext())),getInternalContext:st(h=>c.getInternalContext(h)),getInitConfiguration:st(()=>Pk(c.initConfiguration)),addAction:(h,v)=>{const y=Ym("action");Vs(()=>{c.addAction({name:an(h),context:an(v),startClocks:Jn(),type:Fk.CUSTOM,handlingStack:y}),or({feature:"add-action"})})},addError:(h,v)=>{const y=Ym("error");Vs(()=>{c.addError({error:h,handlingStack:y,context:an(v),startClocks:Jn()}),or({feature:"add-error"})})},addTiming:st((h,v)=>{c.addTiming(an(h),v)}),setGlobalContext:Nr(d,ar.globalContext,Ar.setContext,"set-global-context"),getGlobalContext:Nr(d,ar.globalContext,Ar.getContext,"get-global-context"),setGlobalContextProperty:Nr(d,ar.globalContext,Ar.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:Nr(d,ar.globalContext,Ar.removeContextProperty,"remove-global-context-property"),clearGlobalContext:Nr(d,ar.globalContext,Ar.clearContext,"clear-global-context"),setUser:Nr(d,ar.userContext,Ar.setContext,"set-user"),getUser:Nr(d,ar.userContext,Ar.getContext,"get-user"),setUserProperty:Nr(d,ar.userContext,Ar.setContextProperty,"set-user-property"),removeUserProperty:Nr(d,ar.userContext,Ar.removeContextProperty,"remove-user-property"),clearUser:Nr(d,ar.userContext,Ar.clearContext,"clear-user"),setAccount:Nr(d,ar.accountContext,Ar.setContext,"set-account"),getAccount:Nr(d,ar.accountContext,Ar.getContext,"get-account"),setAccountProperty:Nr(d,ar.accountContext,Ar.setContextProperty,"set-account-property"),removeAccountProperty:Nr(d,ar.accountContext,Ar.removeContextProperty,"remove-account-property"),clearAccount:Nr(d,ar.accountContext,Ar.clearContext,"clear-account"),startView:f,stopSession:st(()=>{c.stopSession(),or({feature:"stop-session"})}),addFeatureFlagEvaluation:st((h,v)=>{c.addFeatureFlagEvaluation(an(h),an(v)),or({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:st(()=>t.getSessionReplayLink()),startSessionReplayRecording:st(h=>{t.start(h),or({feature:"start-session-replay-recording",force:h&&h.force})}),stopSessionReplayRecording:st(()=>t.stop()),addDurationVital:st((h,v)=>{or({feature:"add-duration-vital"}),c.addDurationVital({name:an(h),type:Xm.DURATION,startClocks:Fie(v.startTime),duration:v.duration,context:an(v&&v.context),description:an(v&&v.description)})}),startDurationVital:st((h,v)=>(or({feature:"start-duration-vital"}),c.startDurationVital(an(h),{context:an(v&&v.context),description:an(v&&v.description)}))),stopDurationVital:st((h,v)=>{or({feature:"stop-duration-vital"}),c.stopDurationVital(typeof h=="string"?an(h):h,{context:an(v&&v.context),description:an(v&&v.description)})}),startFeatureOperation:st((h,v)=>{or({feature:"add-operation-step-vital",action_type:"start"}),c.addOperationStepVital(h,"start",v)}),succeedFeatureOperation:st((h,v)=>{or({feature:"add-operation-step-vital",action_type:"succeed"}),c.addOperationStepVital(h,"end",v)}),failFeatureOperation:st((h,v,y)=>{or({feature:"add-operation-step-vital",action_type:"fail"}),c.addOperationStepVital(h,"end",y,v)})});return p}function Vle(e,t){return{init:n=>{I6("DD_RUM",n)},initConfiguration:e.initConfiguration,...t}}function Ble(){const e=Hle();return new Nt(t=>{if(!e)return;const n=new e(st(r=>t.notify(r)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Hle(){let e;const t=window;if(t.Zone&&(e=Gs(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const n=new t.MutationObserver(Ft),r=Gs(n,"originalInstance");e=r&&r.constructor}return e||(e=t.MutationObserver),e}function qle(){const e=new Nt,{stop:t}=Jo(window,"open",()=>e.notify());return{observable:e,stop:t}}function Gle(e,t,n,r,i){return{get:o=>{const s=n.findView(o),c=i.findUrl(o),d=t.findTrackedSession(o);if(d&&s&&c){const f=r.findActionId(o);return{application_id:e,session_id:d.id,user_action:f?{id:f}:void 0,view:{id:s.id,name:s.name,referrer:c.referrer,url:c.url}}}}}}const Kle=_se,Zle=wc;function Yle(e){const t=Bd({expireDelay:Zle});e.subscribe(1,r=>{t.add(n(r),r.startClocks.relative)}),e.subscribe(6,({endClocks:r})=>{t.closeActive(r.relative)}),e.subscribe(3,r=>{const i=t.find(r.startClocks.relative);i&&(r.name&&(i.name=r.name),r.context&&(i.context=r.context),i.sessionIsActive=r.sessionIsActive)}),e.subscribe(10,()=>{t.reset()});function n(r){return{service:r.service,version:r.version,context:r.context,id:r.id,name:r.name,startClocks:r.startClocks}}return{findView:r=>t.find(r),stop:()=>{t.stop()}}}const X6="initial_document",Wle=[[Dr.DOCUMENT,e=>X6===e],[Dr.XHR,e=>e==="xmlhttprequest"],[Dr.FETCH,e=>e==="fetch"],[Dr.BEACON,e=>e==="beacon"],[Dr.CSS,(e,t)=>/\.css$/i.test(t)],[Dr.JS,(e,t)=>/\.js$/i.test(t)],[Dr.IMAGE,(e,t)=>["image","img","icon"].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[Dr.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[Dr.MEDIA,(e,t)=>["audio","video"].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function Xle(e){const t=e.name;if(!Jie(t))return Dr.OTHER;const n=eoe(t);for(const[r,i]of Wle)if(i(e.initiatorType,n))return r;return Dr.OTHER}function t$(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Q6(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function Qle(e){const{duration:t,startTime:n,responseEnd:r}=e;return t===0&&n<r?kn(n,r):t}function Jle(e){if(!e3(e))return;const{startTime:t,fetchStart:n,workerStart:r,redirectStart:i,redirectEnd:o,domainLookupStart:s,domainLookupEnd:c,connectStart:d,secureConnectionStart:f,connectEnd:p,requestStart:h,responseStart:v,responseEnd:y}=e,b={download:Rl(t,v,y),first_byte:Rl(t,h,v)};return 0<r&&r<n&&(b.worker=Rl(t,r,n)),n<p&&(b.connect=Rl(t,d,p),d<=f&&f<=p&&(b.ssl=Rl(t,f,p))),n<c&&(b.dns=Rl(t,s,c)),t<o&&(b.redirect=Rl(t,i,o)),b}function J6(e){return e.duration>=0}function e3(e){const t=t$(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=ece(e)?t$(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function ece(e){return e.redirectEnd>e.startTime}function Rl(e,t,n){if(e<=t&&t<=n)return{duration:ht(kn(t,n)),start:ht(kn(e,t))}}function tce(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function nce(e){return e.deliveryType===""?"other":e.deliveryType}function rce(e){if(e.startTime<e.responseStart){const{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function Vk(e){return e&&(!Yae(e)||Ld(qa.TRACK_INTAKE_REQUESTS))}const ice=/data:(.+)?(;base64)?,/g,oce=24e3;function ace(e,t=oce){if(e.length<=t||!e.startsWith("data:"))return e;const n=e.substring(0,100).match(ice);return n?`${n[0]}[...]`:e}let n$=1;function sce(e,t,n,r,i){const o=cle(t,n,r,i);lce(e,t,o),cce(e,o)}function lce(e,t,n){const r=Ese(t).subscribe(i=>{const o=i;if(Vk(o.url))switch(o.state){case"start":n.traceXhr(o,o.xhr),o.requestIndex=t3(),e.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"complete":n.clearTracingIfNeeded(o),e.notify(8,{duration:o.duration,method:o.method,requestIndex:o.requestIndex,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:Rb.XHR,url:o.url,xhr:o.xhr,isAborted:o.isAborted,handlingStack:o.handlingStack,body:o.body});break}});return{stop:()=>r.unsubscribe()}}function cce(e,t){const n=z6().subscribe(r=>{const i=r;if(Vk(i.url))switch(i.state){case"start":t.traceFetch(i),i.requestIndex=t3(),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":uce(i,o=>{var s;t.clearTracingIfNeeded(i),e.notify(8,{duration:o,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:Rb.FETCH,url:i.url,response:i.response,init:i.init,input:i.input,isAborted:i.isAborted,handlingStack:i.handlingStack,body:(s=i.init)===null||s===void 0?void 0:s.body})});break}});return{stop:()=>n.unsubscribe()}}function t3(){const e=n$;return n$+=1,e}function uce(e,t){const n=e.response&&hae(e.response);!n||!n.body?t(kn(e.startClocks.timeStamp,sr())):Qse(n.body,()=>{t(kn(e.startClocks.timeStamp,sr()))},{bytesLimit:Number.POSITIVE_INFINITY})}function n3(e){return Np(e)&&e<0?void 0:e}function r3({lifeCycle:e,isChildEvent:t,onChange:n=Ft}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(13,o=>{var s;if(!(o.type==="view"||o.type==="vital"||!t(o)))switch(o.type){case gt.ERROR:r.errorCount+=1,n();break;case gt.ACTION:r.actionCount+=1,o.action.frustration&&(r.frustrationCount+=o.action.frustration.type.length),n();break;case gt.LONG_TASK:r.longTaskCount+=1,n();break;case gt.RESOURCE:!((s=o._dd)===null||s===void 0)&&s.discarded||(r.resourceCount+=1,n());break}});return{stop:()=>{i.unsubscribe()},eventCounts:r}}function dce(e,t){const n=Ur();let r=!1;const{stop:i}=Zs(e,window,["click","mousedown","keydown","touchstart","pointerdown"],c=>{if(!c.cancelable)return;const d={entryType:"first-input",processingStart:Ai(),processingEnd:Ai(),startTime:c.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};c.type==="pointerdown"?o(e,d):s(d)},{passive:!0,capture:!0});return{stop:i};function o(c,d){Zs(c,window,["pointerup","pointercancel"],f=>{f.type==="pointerup"&&s(d)},{once:!0})}function s(c){if(!r){r=!0,i();const d=c.processingStart-c.startTime;d>=0&&d<Ur()-n&&t(c)}}}var $t;(function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.LONG_ANIMATION_FRAME="long-animation-frame",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource",e.VISIBILITY_STATE="visibility-state"})($t||($t={}));function na(e,t){return new Nt(n=>{if(!window.PerformanceObserver)return;const r=d=>{const f=pce(d);f.length>0&&n.notify(f)};let i,o=!0;const s=new PerformanceObserver(st(d=>{o?i=_r(()=>r(d.getEntries())):r(d.getEntries())}));try{s.observe(t)}catch{if([$t.RESOURCE,$t.NAVIGATION,$t.LONG_TASK,$t.PAINT].includes(t.type)){t.buffered&&(i=_r(()=>r(performance.getEntriesByType(t.type))));try{s.observe({entryTypes:[t.type]})}catch{return}}}o=!1,fce(e);let c;return!Cc($t.FIRST_INPUT)&&t.type===$t.FIRST_INPUT&&({stop:c}=dce(e,d=>{r([d])})),()=>{s.disconnect(),c&&c(),no(i)}})}let om;function fce(e){return!om&&mce()&&"addEventListener"in performance&&(om=yn(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{om?.stop()}}function mce(){return window.performance!==void 0&&"getEntries"in performance}function Cc(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function pce(e){return e.filter(t=>!hce(t))}function hce(e){return e.entryType===$t.RESOURCE&&(!Vk(e.name)||!J6(e))}function lC(e){return e.nodeType===Node.TEXT_NODE}function gce(e){return e.nodeType===Node.COMMENT_NODE}function Ka(e){return e.nodeType===Node.ELEMENT_NODE}function i3(e){return Ka(e)&&!!e.shadowRoot}function vce(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Ka(t.host)}function zTe(e){return e.childNodes.length>0||i3(e)}function LTe(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;i3(e)&&t(e.shadowRoot)}function yce(e){return vce(e)?e.host:e.parentNode}const o3=100,bce=100,r$="data-dd-excluded-activity-mutations";function Bk(e,t,n,r,i,o){const s=wce(e,t,n,r);return xce(s,i,o)}function xce(e,t,n){let r,i=!1;const o=_r(st(()=>f({hadActivity:!1})),o3),s=n!==void 0?_r(st(()=>f({hadActivity:!0,end:sr()})),n):void 0,c=e.subscribe(({isBusy:p})=>{no(o),no(r);const h=sr();p||(r=_r(st(()=>f({hadActivity:!0,end:h})),bce))}),d=()=>{i=!0,no(o),no(r),no(s),c.unsubscribe()};function f(p){i||(d(),t(p))}return{stop:d}}function wce(e,t,n,r){return new Nt(i=>{const o=[];let s,c=0;return o.push(t.subscribe(f=>{f.every(Sce)||d()}),n.subscribe(d),na(r,{type:$t.RESOURCE}).subscribe(f=>{f.some(p=>!gS(r,p.name))&&d()}),e.subscribe(7,f=>{gS(r,f.url)||(s===void 0&&(s=f.requestIndex),c+=1,d())}),e.subscribe(8,f=>{gS(r,f.url)||s===void 0||f.requestIndex<s||(c-=1,d())})),()=>{o.forEach(f=>f.unsubscribe())};function d(){i.notify({isBusy:c>0})}})}function gS(e,t){return Cb(e.excludedActivityUrls,t)}function Sce(e){const t=e.type==="characterData"?e.target.parentElement:e.target;return!!(t&&Ka(t)&&t.matches(`[${r$}], [${r$}] *`))}const jb="data-dd-action-name",_ce="Masked Element",Cce=[jb,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],Ece=[s3,Rce],kce=[s3,jce,Ice];function Mp(e,t){if(!e.isConnected)return;let n,r=e;for(;r&&r.nodeName!=="HTML";){const i=i$(r,Ece,Nce,t,n);if(i)return i;n=i$(r,kce,Ace,t,n)||Ib(Tce(r),n),r=r.parentElement}return n}function a3(e){return/[0-9]/.test(e)}function Rce(e){if(e.id&&!a3(e.id))return`#${CSS.escape(e.id)}`}function jce(e){if(e.tagName==="BODY")return;const t=e.classList;for(let n=0;n<t.length;n+=1){const r=t[n];if(!a3(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function Ice(e){return CSS.escape(e.tagName)}function s3(e,t){if(t){const r=n(t);if(r)return r}for(const r of Cce){const i=n(r);if(i)return i}function n(r){if(e.hasAttribute(r))return`${CSS.escape(e.tagName)}[${r}="${CSS.escape(e.getAttribute(r))}"]`}}function Tce(e){let t=e.parentElement.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return`${CSS.escape(e.tagName)}:nth-of-type(${n})`}function i$(e,t,n,r,i){for(const o of t){const s=o(e,r);if(s&&n(e,s,i))return Ib(s,i)}}function Nce(e,t,n){return e.ownerDocument.querySelectorAll(Ib(t,n)).length===1}function Ace(e,t,n){let r;if(n===void 0)r=s=>s.matches(t);else{const s=Ib(`${t}:scope`,n);r=c=>c.querySelector(s)!==null}let o=e.parentElement.firstElementChild;for(;o;){if(o!==e&&r(o))return!1;o=o.nextElementSibling}return!0}function Ib(e,t){return t?`${e}>${t}`:e}const Rt={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Mu.ALLOW,MASK:Mu.MASK,MASK_USER_INPUT:Mu.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:Mu.MASK_UNLESS_ALLOWLISTED},Oce="data-dd-privacy",UTe="hidden",$ce="dd-privacy-",vS="***",FTe="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",Dce={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},Pce="x";function Nl(e){return`[${Oce}="${e}"], .${$ce}${e}`}function Hk(e,t,n){if(n&&n.has(e))return n.get(e);const r=yce(e),i=r?Hk(r,t,n):t,o=zce(e),s=Mce(o,i);return n&&n.set(e,s),s}function Mce(e,t){switch(t){case Rt.HIDDEN:case Rt.IGNORE:return t}switch(e){case Rt.ALLOW:case Rt.MASK:case Rt.MASK_USER_INPUT:case Rt.MASK_UNLESS_ALLOWLISTED:case Rt.HIDDEN:case Rt.IGNORE:return e;default:return t}}function zce(e){if(Ka(e)){if(e.tagName==="BASE")return Rt.ALLOW;if(e.tagName==="INPUT"){const t=e;if(t.type==="password"||t.type==="email"||t.type==="tel"||t.type==="hidden")return Rt.MASK;const n=t.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return Rt.MASK}if(e.matches(Nl(Rt.HIDDEN)))return Rt.HIDDEN;if(e.matches(Nl(Rt.MASK)))return Rt.MASK;if(e.matches(Nl(Rt.MASK_UNLESS_ALLOWLISTED)))return Rt.MASK_UNLESS_ALLOWLISTED;if(e.matches(Nl(Rt.MASK_USER_INPUT)))return Rt.MASK_USER_INPUT;if(e.matches(Nl(Rt.ALLOW)))return Rt.ALLOW;if(Lce(e))return Rt.IGNORE}}function l3(e,t){switch(t){case Rt.MASK:case Rt.HIDDEN:case Rt.IGNORE:return!0;case Rt.MASK_UNLESS_ALLOWLISTED:return lC(e)?Og(e.parentNode)?!0:!u3(e.textContent||""):Og(e);case Rt.MASK_USER_INPUT:return lC(e)?Og(e.parentNode):Og(e);default:return!1}}function Og(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;const t=e;if(t.tagName==="INPUT")switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!Dce[t.tagName]}const c3=e=>e.replace(/\S/g,Pce);function VTe(e,t,n){var r;const i=(r=e.parentElement)===null||r===void 0?void 0:r.tagName;let o=e.textContent||"";if(t&&!o.trim())return;const s=n;if(i==="SCRIPT")o=vS;else if(s===Rt.HIDDEN)o=vS;else if(l3(e,s))if(i==="DATALIST"||i==="SELECT"||i==="OPTGROUP"){if(!o.trim())return}else i==="OPTION"?o=vS:s===Rt.MASK_UNLESS_ALLOWLISTED?o=Uce(o):o=c3(o);return o}function Lce(e){if(e.nodeName==="SCRIPT")return!0;if(e.nodeName==="LINK"){const n=t("rel");return/preload|prefetch/i.test(n)&&t("as")==="script"||n==="shortcut icon"||n==="icon"}if(e.nodeName==="META"){const n=t("name"),r=t("rel"),i=t("property");return/^msapplication-tile(image|color)$/.test(n)||n==="application-name"||r==="icon"||r==="apple-touch-icon"||r==="shortcut icon"||n==="keywords"||n==="description"||/^(og|twitter|fb):/.test(i)||/^(og|twitter):/.test(n)||n==="pinterest"||n==="robots"||n==="googlebot"||n==="bingbot"||e.hasAttribute("http-equiv")||n==="author"||n==="generator"||n==="framework"||n==="publisher"||n==="progid"||/^article:/.test(i)||/^product:/.test(i)||n==="google-site-verification"||n==="yandex-verification"||n==="csrf-token"||n==="p:domain_verify"||n==="verify-v1"||n==="verification"||n==="shopify-checkout-api-token"}function t(n){return(e.getAttribute(n)||"").toLowerCase()}return!1}function u3(e){var t;return!e||!e.trim()?!0:((t=window.$DD_ALLOW)===null||t===void 0?void 0:t.has(e.toLocaleLowerCase()))||!1}function Uce(e,t){return u3(e)?e:t||c3(e)}const d3=Rr,Fce=100;function Vce(e,t){const n=[];let r=0,i;o(e);function o(d){d.stopObservable.subscribe(s),n.push(d),no(i),i=_r(c,d3)}function s(){r===1&&n.every(d=>d.isStopped())&&(r=2,t(n))}function c(){no(i),r===0&&(r=1,s())}return{tryAppend:d=>r!==0?!1:n.length>0&&!Bce(n[n.length-1].event,d.event)?(c(),!1):(o(d),!0),stop:()=>{c()}}}function Bce(e,t){return e.target===t.target&&Hce(e,t)<=Fce&&e.timeStamp-t.timeStamp<=d3}function Hce(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function qce(e,t,n=Rt.ALLOW){const{actionNameAttribute:r}=t,i=o$(e,jb)||r&&o$(e,r);return i?{name:i,nameSource:"custom_attribute"}:n===Rt.MASK?{name:_ce,nameSource:"mask_placeholder"}:a$(e,Gce,t)||a$(e,Kce,t)||{name:"",nameSource:"blank"}}function o$(e,t){const n=e.closest(`[${t}]`);if(!n)return;const r=n.getAttribute(t);return m3(f3(r.trim()))}const Gce=[(e,t)=>{if("labels"in e&&e.labels&&e.labels.length>0)return pv(e.labels[0],t)},e=>{if(e.nodeName==="INPUT"){const t=e,n=t.getAttribute("type");if(n==="button"||n==="submit"||n==="reset")return{name:t.value,nameSource:"text_content"}}},(e,t)=>{if(e.nodeName==="BUTTON"||e.nodeName==="LABEL"||e.getAttribute("role")==="button")return pv(e,t)},e=>am(e,"aria-label"),(e,t)=>{const n=e.getAttribute("aria-labelledby");if(n)return{name:n.split(/\s+/).map(r=>Yce(e,r)).filter(r=>!!r).map(r=>p3(r,t)).join(" "),nameSource:"text_content"}},e=>am(e,"alt"),e=>am(e,"name"),e=>am(e,"title"),e=>am(e,"placeholder"),(e,t)=>{if("options"in e&&e.options.length>0)return pv(e.options[0],t)}],Kce=[(e,t)=>pv(e,t)],Zce=10;function a$(e,t,n){let r=e,i=0;for(;i<=Zce&&r&&r.nodeName!=="BODY"&&r.nodeName!=="HTML"&&r.nodeName!=="HEAD";){for(const o of t){const s=o(r,n);if(s){const{name:c,nameSource:d}=s,f=c&&c.trim();if(f)return{name:m3(f3(f)),nameSource:d}}}if(r.nodeName==="FORM")break;r=r.parentElement,i+=1}}function f3(e){return e.replace(/\s+/g," ")}function m3(e){return e.length>100?`${Ik(e,100)} [...]`:e}function Yce(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function am(e,t){return{name:e.getAttribute(t)||"",nameSource:"standard_attribute"}}function pv(e,t){return{name:p3(e,t)||"",nameSource:"text_content"}}function p3(e,t){if(e.isContentEditable)return;const{enablePrivacyForActionName:n,actionNameAttribute:r,defaultPrivacyLevel:i}=t;if(Ld(qa.USE_TREE_WALKER_FOR_ACTION_NAME))return Wce(e,r,n,i);if("innerText"in e){let o=e.innerText;const s=c=>{const d=e.querySelectorAll(c);for(let f=0;f<d.length;f+=1){const p=d[f];if("innerText"in p){const h=p.innerText;h&&h.trim().length>0&&(o=o.replace(h,""))}}};return s(`[${jb}]`),r&&s(`[${r}]`),n&&s(`${Nl(Rt.HIDDEN)}, ${Nl(Rt.MASK)}`),o}return e.textContent}function Wce(e,t,n,r){const i=new Map,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,c);let s="";for(;o.nextNode();){const d=o.currentNode;if(Ka(d)){(d.nodeName==="BR"||d.nodeName==="P"||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(d).display))&&(s+=" ");continue}s+=d.textContent||""}return s.replace(/\s+/g," ").trim();function c(d){const f=Hk(d,r,i);if(n&&f&&l3(d,f))return NodeFilter.FILTER_REJECT;if(Ka(d)){if(d.hasAttribute(jb)||t&&d.hasAttribute(t))return NodeFilter.FILTER_REJECT;const p=getComputedStyle(d);if(p.visibility!=="visible"||p.display==="none"||p.contentVisibility&&p.contentVisibility!=="visible")return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function Xce(e,{onPointerDown:t,onPointerUp:n}){let r,i={selection:!1,input:!1,scroll:!1},o;const s=[yn(e,window,"pointerdown",c=>{l$(c)&&(r=s$(),i={selection:!1,input:!1,scroll:!1},o=t(c))},{capture:!0}),yn(e,window,"selectionchange",()=>{(!r||!s$())&&(i.selection=!0)},{capture:!0}),yn(e,window,"scroll",()=>{i.scroll=!0},{capture:!0,passive:!0}),yn(e,window,"pointerup",c=>{if(l$(c)&&o){const d=i;n(o,c,()=>d),o=void 0}},{capture:!0}),yn(e,window,"input",()=>{i.input=!0},{capture:!0})];return{stop:()=>{s.forEach(c=>c.stop())}}}function s$(){const e=window.getSelection();return!e||e.isCollapsed}function l$(e){return e.target instanceof Element&&e.isPrimary!==!1}const c$=3;function Qce(e,t){if(Jce(e))return t.addFrustration(im.RAGE_CLICK),e.some(u$)&&t.addFrustration(im.DEAD_CLICK),t.hasError&&t.addFrustration(im.ERROR_CLICK),{isRage:!0};const n=e.some(r=>r.getUserActivity().selection);return e.forEach(r=>{r.hasError&&r.addFrustration(im.ERROR_CLICK),u$(r)&&!n&&r.addFrustration(im.DEAD_CLICK)}),{isRage:!1}}function Jce(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(c$-1);t+=1)if(e[t+c$-1].event.timeStamp-e[t].event.timeStamp<=Rr)return!0;return!1}const eue='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function u$(e){if(e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return t.tagName==="LABEL"&&t.hasAttribute("for")&&(t=document.getElementById(t.getAttribute("for"))),!t||!t.matches(eue)}const h3=10*Rr,Im=new Map;function tue(e){const t=Im.get(e);return Im.delete(e),t}function g3(e,t){Im.set(e,t),Im.forEach((n,r)=>{kn(r,Ai())>h3&&Im.delete(r)})}const nue=5*Vr;function rue(e,t,n,r){const i=Bd({expireDelay:nue}),o=new Nt;let s;e.subscribe(10,()=>{i.reset()}),e.subscribe(5,p),e.subscribe(11,h=>{h.reason===qu.UNLOADING&&p()});const{stop:c}=Xce(r,{onPointerDown:h=>iue(r,e,t,h,n),onPointerUp:({clickActionBase:h,hadActivityOnPointerDown:v},y,b)=>{oue(r,e,t,n,i,o,f,h,y,b,v)}});return{stop:()=>{p(),o.notify(),c()},actionContexts:{findActionId:h=>i.findAll(h)}};function f(h){if(!s||!s.tryAppend(h)){const v=h.clone();s=Vce(h,y=>{sue(y,v)})}}function p(){s&&s.stop()}}function iue(e,t,n,r,i){let o;if(e.enablePrivacyForActionName?o=Hk(r.target,e.defaultPrivacyLevel):o=Rt.ALLOW,o===Rt.HIDDEN)return;const s=aue(r,o,e);let c=!1;return Bk(t,n,i,e,d=>{c=d.hadActivity},o3),{clickActionBase:s,hadActivityOnPointerDown:()=>c}}function oue(e,t,n,r,i,o,s,c,d,f,p){var h;const v=v3(t,i,f,c,d);s(v);const y=(h=c?.target)===null||h===void 0?void 0:h.selector;y&&g3(d.timeStamp,y);const{stop:b}=Bk(t,n,r,e,E=>{E.hadActivity&&E.end<v.startClocks.timeStamp?v.discard():E.hadActivity?v.stop(E.end):p()?v.stop(v.startClocks.timeStamp):v.stop()},h3),S=t.subscribe(5,({endClocks:E})=>{v.stop(E.timeStamp)}),C=o.subscribe(()=>{v.stop()});v.stopObservable.subscribe(()=>{S.unsubscribe(),b(),C.unsubscribe()})}function aue(e,t,n){const r=e.target.getBoundingClientRect(),i=Mp(e.target,n.actionNameAttribute);i&&g3(e.timeStamp,i);const{name:o,nameSource:s}=qce(e.target,n,t);return{type:Fk.CLICK,target:{width:Math.round(r.width),height:Math.round(r.height),selector:i},position:{x:Math.round(e.clientX-r.left),y:Math.round(e.clientY-r.top)},name:o,nameSource:s}}function v3(e,t,n,r,i){const o=jr(),s=Jn(),c=t.add(o,s.relative),d=r3({lifeCycle:e,isChildEvent:b=>b.action!==void 0&&(Array.isArray(b.action.id)?b.action.id.includes(o):b.action.id===o)});let f=0,p;const h=[],v=new Nt;function y(b){f===0&&(p=b,f=1,p?c.close(jk(p)):c.remove(),d.stop(),v.notify())}return{event:i,stop:y,stopObservable:v,get hasError(){return d.eventCounts.errorCount>0},get hasPageActivity(){return p!==void 0},getUserActivity:n,addFrustration:b=>{h.push(b)},startClocks:s,isStopped:()=>f===1||f===2,clone:()=>v3(e,t,n,r,i),validate:b=>{if(y(),f!==1)return;const{resourceCount:S,errorCount:C,longTaskCount:E}=d.eventCounts,k={duration:p&&kn(s.timeStamp,p),startClocks:s,id:o,frustrationTypes:h,counts:{resourceCount:S,errorCount:C,longTaskCount:E},events:b??[i],event:i,...r};e.notify(0,k),f=2},discard:()=>{y(),f=2}}}function sue(e,t){const{isRage:n}=Qce(e,t);n?(e.forEach(r=>r.discard()),t.stop(sr()),t.validate(e.map(r=>r.event))):(t.discard(),e.forEach(r=>r.validate()))}function lue(e,t,n,r,i){const{unsubscribe:o}=e.subscribe(0,d=>{e.notify(12,d$(d))});t.register(0,({startTime:d,eventType:f})=>{if(f!==gt.ERROR&&f!==gt.RESOURCE&&f!==gt.LONG_TASK)return Oi;const p=s.findActionId(d);return p?{type:f,action:{id:p}}:Oi}),t.register(1,({startTime:d})=>({action:{id:s.findActionId(d)}}));let s={findActionId:Ft},c=Ft;return i.trackUserInteractions&&({actionContexts:s,stop:c}=rue(e,n,r,i)),{addAction:d=>{e.notify(12,d$(d))},actionContexts:s,stop:()=>{o(),c()}}}function d$(e){const t=yS(e)?{action:{id:e.id,loading_time:n3(ht(e.duration)),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position,name_source:e.nameSource}}}:{context:e.context},n=Ga({action:{id:jr(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:gt.ACTION},t),r=yS(e)?e.duration:void 0,i=yS(e)?{events:e.events}:{handlingStack:e.handlingStack};return{rawRumEvent:n,duration:r,startTime:e.startClocks.relative,domainContext:i}}function yS(e){return e.type!==Fk.CUSTOM}function cue(e){const t=Lse([gb.error]).subscribe(n=>e.notify(n.error));return{stop:()=>{t.unsubscribe()}}}function uue(e,t){const n=ise(e,[Wm.cspViolation,Wm.intervention]).subscribe(r=>t.notify(r));return{stop:()=>{n.unsubscribe()}}}function due(e,t,n){const r=new Nt;return n.subscribe(i=>{i.type===0&&r.notify(i.error)}),cue(r),uue(t,r),r.subscribe(i=>e.notify(14,{error:i})),fue(e)}function fue(e){return e.subscribe(14,({error:t})=>{e.notify(12,mue(t))}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:i,context:o})=>{const s=$k({originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:"Provided",source:Ud.CUSTOM,handling:"handled"});s.context=Ga(s.context,o),e.notify(14,{error:s})}}}function mue(e){const t={date:e.startClocks.timeStamp,error:{id:jr(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:gt.ERROR,context:e.context},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startTime:e.startClocks.relative,domainContext:n}}const f$=new WeakSet;function pue(e){if(!performance||!("getEntriesByName"in performance))return;const t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;const n=t.filter(r=>!f$.has(r)).filter(r=>J6(r)&&e3(r)).filter(r=>hue(r,e.startClocks.relative,y3({startTime:e.startClocks.relative,duration:e.duration})));if(n.length===1)return f$.add(n[0]),n[0].toJSON()}function y3(e){return Md(e.startTime,e.duration)}function hue(e,t,n){return e.startTime>=t-1&&y3(e)<=Md(n,1)}const gue=2*Vr;function vue(e){const t=yue(e)||bue(e);if(!(!t||t.traceTime<=Ur()-gue))return t.traceId}function yue(e){const t=e.querySelector("meta[name=dd-trace-id]"),n=e.querySelector("meta[name=dd-trace-time]");return b3(t&&t.content,n&&n.content)}function bue(e){const t=xue(e);if(t)return b3(Gm(t,"trace-id"),Gm(t,"trace-time"))}function b3(e,t){const n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function xue(e){for(let t=0;t<e.childNodes.length;t+=1){const n=m$(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;t-=1){const n=e.body.childNodes[t],r=m$(n);if(r)return r;if(!lC(n))break}}function m$(e){if(e&&gce(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function x3(){if(Cc($t.NAVIGATION)){const n=performance.getEntriesByType($t.NAVIGATION)[0];if(n)return n}const e=wue(),t={entryType:$t.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function wue(){const e={},t=performance.timing;for(const n in t)if(Np(t[n])){const r=n,i=t[r];e[r]=i===0?0:jk(i)}return e}function Sue(e,t,n=x3){zk(e,"interactive",()=>{const r=n(),i=Object.assign(r.toJSON(),{entryType:$t.RESOURCE,initiatorType:X6,duration:r.responseEnd,traceId:vue(document),toJSON:()=>({...i,toJSON:void 0})});t(i)})}const _ue=1e3;function Cue(e){const t=new Set,n=e.subscribe(8,r=>{t.add(r),t.size>_ue&&(Vd("Too many requests"),t.delete(t.values().next().value))});return{getMatchingRequest(r){let i=1/0,o;for(const s of t){const c=r.startTime-s.startClocks.relative;0<=c&&c<i&&s.url===r.name&&(i=Math.abs(c),o=s)}return o&&t.delete(o),o},stop(){n.unsubscribe()}}}const Eue=32*pd;function kue(e,t){return t.allowedGraphQlUrls.find(n=>Cb([n.match],e))}function Rue(e,t=!1){if(!e||typeof e!="string")return;let n;try{n=JSON.parse(e)}catch{return}if(!n||!n.query)return;const r=n.query.trim(),i=jue(r),o=n.operationName;if(!i)return;let s;return n.variables&&(s=JSON.stringify(n.variables)),{operationType:i,operationName:o,variables:s,payload:t?Ik(r,Eue,"..."):void 0}}function jue(e){var t;return(t=e.match(/^\s*(query|mutation|subscription)\b/i))===null||t===void 0?void 0:t[1]}function Iue(e,t,n,r=zse(),i=Sue){let o;const s=t.trackEarlyRequests;s?o=Cue(e):e.subscribe(8,f=>{d(()=>Tue(f,t,n))});const c=na(t,{type:$t.RESOURCE,buffered:!0}).subscribe(f=>{for(const p of f)(s||!Q6(p))&&d(()=>p$(p,t,n,o))});i(t,f=>{d(()=>p$(f,t,n,o))});function d(f){r.push(()=>{const p=f();p&&e.notify(12,p)})}return{stop:()=>{r.stop(),c.unsubscribe()}}}function Tue(e,t,n){const r=pue(e);return w3(r,e,n,t)}function p$(e,t,n,r){const i=Q6(e)&&r?r.getMatchingRequest(e):void 0;return w3(e,i,n,t)}function w3(e,t,n,r){if(!e&&!t)return;const i=t?$ue(t,r):Due(e,r);if(!r.trackResources&&!i)return;const o=e?yb(e.startTime):t.startClocks,s=e?Qle(e):Pue(n,o,t.duration),c=t&&Nue(t,r),d=Ga({date:o.timeStamp,resource:{id:jr(),duration:ht(s),type:t?t.type===Rb.XHR?Dr.XHR:Dr.FETCH:Xle(e),method:t?t.method:void 0,status_code:t?t.status:Mue(e.responseStatus),url:t?ace(t.url):e.name,protocol:e&&tce(e),delivery_type:e&&nce(e),graphql:c},type:gt.RESOURCE,_dd:{discarded:!r.trackResources}},i,e&&Oue(e));return{startTime:o.relative,duration:s,rawRumEvent:d,domainContext:Aue(e,t)}}function Nue(e,t){if(!Ld(qa.GRAPHQL_TRACKING))return;const n=kue(e.url,t);if(n)return Rue(e.body,n.trackPayload)}function Aue(e,t){if(t){const n={performanceEntry:e,isAborted:t.isAborted,handlingStack:t.handlingStack};return t.type===Rb.XHR?{xhr:t.xhr,...n}:{requestInput:t.input,requestInit:t.init,response:t.response,error:t.error,...n}}return{performanceEntry:e}}function Oue(e){const{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...rce(e),...Jle(e)}}}function $ue(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function Due(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:K6().toString(),rule_psr:t.rulePsr}}}function Pue(e,t,n){return e.wasInPageStateDuringPeriod("frozen",t.relative,n)?void 0:n}function Mue(e){return e===0?void 0:e}function zue(e,t,n){const{stop:r,eventCounts:i}=r3({lifeCycle:e,isChildEvent:o=>o.view.id===t,onChange:n});return{stop:r,eventCounts:i}}const Lue=10*Vr;function Uue(e,t,n){return{stop:na(e,{type:$t.PAINT,buffered:!0}).subscribe(i=>{const o=i.find(s=>s.name==="first-contentful-paint"&&s.startTime<t.timeStamp&&s.startTime<Lue);o&&n(o.startTime)}).unsubscribe}}function Fue(e,t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t(kn(e,Ai()))})})}function Vue(e,t,n){const r=na(e,{type:$t.FIRST_INPUT,buffered:!0}).subscribe(i=>{const o=i.find(s=>s.startTime<t.timeStamp);if(o){const s=kn(o.startTime,o.processingStart);let c;o.target&&Ka(o.target)&&(c=Mp(o.target,e.actionNameAttribute)),n({delay:s>=0?s:0,time:o.startTime,targetSelector:c})}});return{stop:()=>{r.unsubscribe()}}}function Bue(e,t,n=x3){return Gue(e,()=>{const r=n();que(r)||t(Hue(r))})}function Hue(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=Ai()?e.responseStart:void 0}}function que(e){return e.loadEventEnd<=0}function Gue(e,t){let n;const{stop:r}=zk(e,"complete",()=>{n=_r(()=>t())});return{stop:()=>{r(),no(n)}}}const Kue=10*Vr;function Zue(e,t,n,r){let i=1/0;const{stop:o}=Zs(e,n,["pointerdown","keydown"],d=>{i=d.timeStamp},{capture:!0,once:!0});let s=0;const c=na(e,{type:$t.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(d=>{const f=WF(d,p=>p.entryType===$t.LARGEST_CONTENTFUL_PAINT&&p.startTime<i&&p.startTime<t.timeStamp&&p.startTime<Kue&&p.size>s);if(f){let p;f.element&&(p=Mp(f.element,e.actionNameAttribute)),r({value:f.startTime,targetSelector:p,resourceUrl:Yue(f)}),s=f.size}});return{stop:()=>{o(),c.unsubscribe()}}}function Yue(e){return e.url===""?void 0:e.url}function S3(e,t,n=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:Ft};if(Cc($t.VISIBILITY_STATE)){const o=performance.getEntriesByType($t.VISIBILITY_STATE).filter(s=>s.name==="hidden").find(s=>s.startTime>=t.relative);if(o)return{timeStamp:o.startTime,stop:Ft}}let r=1/0;const{stop:i}=Zs(e,n,["pagehide","visibilitychange"],o=>{(o.type==="pagehide"||document.visibilityState==="hidden")&&(r=o.timeStamp,i())},{capture:!0});return{get timeStamp(){return r},stop:i}}function Wue(e,t,n,r){const i={},{stop:o}=Bue(e,h=>{n(h.loadEvent),i.navigationTimings=h,r()}),s=S3(e,t),{stop:c}=Uue(e,s,h=>{i.firstContentfulPaint=h,r()}),{stop:d}=Zue(e,s,window,h=>{i.largestContentfulPaint=h,r()}),{stop:f}=Vue(e,s,h=>{i.firstInput=h,r()});function p(){o(),c(),d(),f(),s.stop()}return{stop:p,initialViewMetrics:i}}const cC=(e,t)=>e*t,Xue=(e,t)=>{const n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),o=Math.min(e.bottom,t.bottom);return n>=i||r>=o?0:cC(i-n,o-r)},h$=e=>{const t=cC(e.previousRect.width,e.previousRect.height),n=cC(e.currentRect.width,e.currentRect.height),r=Xue(e.previousRect,e.currentRect);return t+n-r};function Que(e,t,n){if(!rde())return{stop:Ft};let r=0,i;n({value:0});const o=nde(),s=na(e,{type:$t.LAYOUT_SHIFT,buffered:!0}).subscribe(c=>{var d;for(const f of c){if(f.hadRecentInput||f.startTime<t)continue;const{cumulatedValue:p,isMaxValue:h}=o.update(f);if(h){const v=Jue(f.sources);i={target:v?.node?new WeakRef(v.node):void 0,time:kn(t,f.startTime),previousRect:v?.previousRect,currentRect:v?.currentRect,devicePixelRatio:window.devicePixelRatio}}if(p>r){r=p;const v=(d=i?.target)===null||d===void 0?void 0:d.deref();n({value:km(r,4),targetSelector:v&&Mp(v,e.actionNameAttribute),time:i?.time,previousRect:i?.previousRect?g$(i.previousRect):void 0,currentRect:i?.currentRect?g$(i.currentRect):void 0,devicePixelRatio:i?.devicePixelRatio})}}});return{stop:()=>{s.unsubscribe()}}}function Jue(e){let t;for(const n of e)if(n.node&&Ka(n.node)){const r=h$(n);(!t||h$(t)<r)&&(t=n)}return t}function g$({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}const ede=5*Rr,tde=Rr;function nde(){let e=0,t,n,r=0;return{update:i=>{const o=t===void 0||i.startTime-n>=tde||i.startTime-t>=ede;let s;return o?(t=n=i.startTime,r=e=i.value,s=!0):(e+=i.value,n=i.startTime,s=i.value>r,s&&(r=i.value)),{cumulatedValue:e,isMaxValue:s}}}}function rde(){return Cc($t.LAYOUT_SHIFT)&&"WeakRef"in window}let hv,_3=0,bS=1/0,xS=0;function ide(){"interactionCount"in performance||hv||(hv=new window.PerformanceObserver(st(e=>{e.getEntries().forEach(t=>{const n=t;n.interactionId&&(bS=Math.min(bS,n.interactionId),xS=Math.max(xS,n.interactionId),_3=(xS-bS)/7+1)})})),hv.observe({type:"event",buffered:!0,durationThreshold:0}))}const v$=()=>hv?_3:window.performance.interactionCount||0,y$=10,ode=1*Vr;function ade(e,t,n){if(!cde())return{getInteractionToNextPaint:()=>{},setViewEnd:Ft,stop:Ft};const{getViewInteractionCount:r,stopViewInteractionCount:i}=lde(n);let o=1/0;const s=sde(r);let c=-1,d,f;function p(y){for(const S of y)S.interactionId&&S.startTime>=t&&S.startTime<=o&&s.process(S);const b=s.estimateP98Interaction();b&&b.duration!==c&&(c=b.duration,f=kn(t,b.startTime),d=tue(b.startTime),!d&&b.target&&Ka(b.target)&&(d=Mp(b.target,e.actionNameAttribute)))}const h=na(e,{type:$t.FIRST_INPUT,buffered:!0}).subscribe(p),v=na(e,{type:$t.EVENT,durationThreshold:40,buffered:!0}).subscribe(p);return{getInteractionToNextPaint:()=>{if(c>=0)return{value:Math.min(c,ode),targetSelector:d,time:f};if(r())return{value:0}},setViewEnd:y=>{o=y,i()},stop:()=>{v.unsubscribe(),h.unsubscribe()}}}function sde(e){const t=[];function n(){t.sort((r,i)=>i.duration-r.duration).splice(y$)}return{process(r){const i=t.findIndex(s=>r.interactionId===s.interactionId),o=t[t.length-1];i!==-1?r.duration>t[i].duration&&(t[i]=r,n()):(t.length<y$||r.duration>o.duration)&&(t.push(r),n())},estimateP98Interaction(){const r=Math.min(t.length-1,Math.floor(e()/50));return t[r]}}}function lde(e){ide();const t=e===Pa.INITIAL_LOAD?0:v$();let n={stopped:!1};function r(){return v$()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function cde(){return Cc($t.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function ude(e,t,n,r,i,o,s){let c=i===Pa.INITIAL_LOAD,d=!0;const f=[],p=S3(r,o);function h(){if(!d&&!c&&f.length>0){const y=Math.max(...f);y<p.timeStamp-o.relative&&s(y)}}const{stop:v}=Bk(e,t,n,r,y=>{d&&(d=!1,y.hadActivity&&f.push(kn(o.timeStamp,y.end)),h())});return{stop:()=>{v(),p.stop()},setLoadEvent:y=>{c&&(c=!1,f.push(y),h())}}}function BTe(){let e;const t=window.visualViewport;return t?e=t.pageLeft-t.offsetLeft:window.scrollX!==void 0?e=window.scrollX:e=window.pageXOffset||0,Math.round(e)}function dde(){let e;const t=window.visualViewport;return t?e=t.pageTop-t.offsetTop:window.scrollY!==void 0?e=window.scrollY:e=window.pageYOffset||0,Math.round(e)}let wS;function fde(e){return wS||(wS=mde(e)),wS}function mde(e){return new Nt(t=>{const{throttled:n}=xb(()=>{t.notify(qk())},200);return yn(e,window,"resize",n,{capture:!0,passive:!0}).stop})}function qk(){const e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const pde=Rr;function hde(e,t,n,r=vde(e)){let i=0,o=0,s=0;const c=r.subscribe(({scrollDepth:d,scrollTop:f,scrollHeight:p})=>{let h=!1;if(d>i&&(i=d,h=!0),p>o){o=p;const v=Ai();s=kn(t.relative,v),h=!0}h&&n({maxDepth:Math.min(i,o),maxDepthScrollTop:f,maxScrollHeight:o,maxScrollHeightTime:s})});return{stop:()=>c.unsubscribe()}}function gde(){const e=dde(),{height:t}=qk(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(t+e);return{scrollHeight:n,scrollDepth:r,scrollTop:e}}function vde(e,t=pde){return new Nt(n=>{function r(){n.notify(gde())}if(window.ResizeObserver){const i=xb(r,t,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,s=new ResizeObserver(st(i.throttled));o&&s.observe(o);const c=yn(e,window,"scroll",i.throttled,{passive:!0});return()=>{i.cancel(),s.disconnect(),c.stop()}}})}function yde(e,t,n,r,i,o,s){const c={},{stop:d,setLoadEvent:f}=ude(e,t,n,r,o,s,S=>{c.loadingTime=S,i()}),{stop:p}=hde(r,s,S=>{c.scroll=S}),{stop:h}=Que(r,s.relative,S=>{c.cumulativeLayoutShift=S,i()}),{stop:v,getInteractionToNextPaint:y,setViewEnd:b}=ade(r,s.relative,o);return{stop:()=>{d(),h(),p()},stopINPTracking:v,setLoadEvent:f,setViewEnd:b,getCommonViewMetrics:()=>(c.interactionToNextPaint=y(),c)}}function bde(e,t){const{stop:n}=yn(e,window,"pageshow",r=>{r.persisted&&t(r)},{capture:!0});return n}function xde(e,t,n){Fue(e.relative,r=>{t.firstContentfulPaint=r,t.largestContentfulPaint={value:r},n()})}const wde=3e3,Sde=5*Vr,_de=5*Vr;function Cde(e,t,n,r,i,o,s,c){const d=new Set;let f=v(Pa.INITIAL_LOAD,UF(),c),p;y();let h;s&&(h=b(o),i.trackBfcacheViews&&(p=bde(i,S=>{f.end();const C=yb(S.timeStamp);f=v(Pa.BF_CACHE,C,void 0)})));function v(S,C,E){const k=Ede(t,n,r,i,e,S,C,E);return d.add(k),k.stopObservable.subscribe(()=>{d.delete(k)}),k}function y(){t.subscribe(10,()=>{f=v(Pa.ROUTE_CHANGE,void 0,{name:f.name,service:f.service,version:f.version,context:f.contextManager.getContext()})}),t.subscribe(9,()=>{f.end({sessionIsActive:!1})})}function b(S){return S.subscribe(({oldLocation:C,newLocation:E})=>{Rde(C,E)&&(f.end(),f=v(Pa.ROUTE_CHANGE))})}return{addTiming:(S,C=sr())=>{f.addTiming(S,C)},startView:(S,C)=>{f.end({endClocks:C}),f=v(Pa.ROUTE_CHANGE,C,S)},setViewContext:S=>{f.contextManager.setContext(S)},setViewContextProperty:(S,C)=>{f.contextManager.setContextProperty(S,C)},setViewName:S=>{f.setViewName(S)},getViewContext:()=>f.contextManager.getContext(),stop:()=>{h&&h.unsubscribe(),p&&p(),f.end(),d.forEach(S=>S.stop())}}}function Ede(e,t,n,r,i,o,s=Jn(),c){const d=jr(),f=new Nt,p={};let h=0,v;const y=qm(i),b=kb();let S=!0,C=c?.name;const E=c?.service||r.service,k=c?.version||r.version,R=c?.context;R&&b.setContext(R);const I={id:d,name:C,startClocks:s,service:E,version:k,context:R};e.notify(1,I),e.notify(2,I);const{throttled:A,cancel:T}=xb($,wde,{leading:!1}),{setLoadEvent:N,setViewEnd:z,stop:L,stopINPTracking:K,getCommonViewMetrics:ee}=yde(e,t,n,r,te,o,s),{stop:Z,initialViewMetrics:Y}=o===Pa.INITIAL_LOAD?Wue(r,s,N,te):{stop:Ft,initialViewMetrics:{}};o===Pa.BF_CACHE&&xde(s,Y,te);const{stop:B,eventCounts:W}=zue(e,d,te),P=zd($,Sde),G=e.subscribe(11,M=>{M.reason===qu.UNLOADING&&$()});$(),b.changeObservable.subscribe(te);function U(){e.notify(3,{id:d,name:C,context:b.getContext(),startClocks:s,sessionIsActive:S})}function te(){U(),A()}function $(){T(),U(),h+=1;const M=v===void 0?sr():v.timeStamp;e.notify(4,{customTimings:p,documentVersion:h,id:d,name:C,service:E,version:k,context:b.getContext(),loadingType:o,location:y,startClocks:s,commonViewMetrics:ee(),initialViewMetrics:Y,duration:kn(s.timeStamp,M),isActive:v===void 0,sessionIsActive:S,eventCounts:W})}return{get name(){return C},service:E,version:k,contextManager:b,stopObservable:f,end(M={}){var F,O;v||(v=(F=M.endClocks)!==null&&F!==void 0?F:Jn(),S=(O=M.sessionIsActive)!==null&&O!==void 0?O:!0,e.notify(5,{endClocks:v}),e.notify(6,{endClocks:v}),bb(P),z(v.relative),L(),G.unsubscribe(),$(),_r(()=>{this.stop()},_de))},stop(){Z(),B(),K(),f.notify()},addTiming(M,F){if(v)return;const O=qie(F)?F:kn(s.timeStamp,F);p[kde(M)]=O,te()},setViewName(M){C=M,$()}}}function kde(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&ft.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function Rde(e,t){return e.pathname!==t.pathname||!jde(t.hash)&&b$(t.hash)!==b$(e.hash)}function jde(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function b$(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Ide(e,t,n,r,i,o,s,c,d,f){return e.subscribe(4,p=>e.notify(12,Tde(p,n,c))),t.register(0,({startTime:p,eventType:h})=>{const v=d.findView(p);return v?{type:h,service:v.service,version:v.version,context:v.context,view:{id:v.id,name:v.name}}:Ys}),t.register(1,({startTime:p})=>{var h;return{view:{id:(h=d.findView(p))===null||h===void 0?void 0:h.id}}}),Cde(r,e,i,o,n,s,!n.trackViewsManually,f)}function Tde(e,t,n){var r,i,o,s,c,d,f,p,h,v,y,b,S,C,E,k,R,I;const A=n.getReplayStats(e.id),T=(i=(r=e.commonViewMetrics)===null||r===void 0?void 0:r.cumulativeLayoutShift)===null||i===void 0?void 0:i.devicePixelRatio,N={_dd:{document_version:e.documentVersion,replay_stats:A,cls:T?{device_pixel_ratio:T}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:gt.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:(o=e.commonViewMetrics.cumulativeLayoutShift)===null||o===void 0?void 0:o.value,cumulative_layout_shift_time:ht((s=e.commonViewMetrics.cumulativeLayoutShift)===null||s===void 0?void 0:s.time),cumulative_layout_shift_target_selector:(c=e.commonViewMetrics.cumulativeLayoutShift)===null||c===void 0?void 0:c.targetSelector,first_byte:ht((d=e.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.firstByte),dom_complete:ht((f=e.initialViewMetrics.navigationTimings)===null||f===void 0?void 0:f.domComplete),dom_content_loaded:ht((p=e.initialViewMetrics.navigationTimings)===null||p===void 0?void 0:p.domContentLoaded),dom_interactive:ht((h=e.initialViewMetrics.navigationTimings)===null||h===void 0?void 0:h.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:ht(e.initialViewMetrics.firstContentfulPaint),first_input_delay:ht((v=e.initialViewMetrics.firstInput)===null||v===void 0?void 0:v.delay),first_input_time:ht((y=e.initialViewMetrics.firstInput)===null||y===void 0?void 0:y.time),first_input_target_selector:(b=e.initialViewMetrics.firstInput)===null||b===void 0?void 0:b.targetSelector,interaction_to_next_paint:ht((S=e.commonViewMetrics.interactionToNextPaint)===null||S===void 0?void 0:S.value),interaction_to_next_paint_time:ht((C=e.commonViewMetrics.interactionToNextPaint)===null||C===void 0?void 0:C.time),interaction_to_next_paint_target_selector:(E=e.commonViewMetrics.interactionToNextPaint)===null||E===void 0?void 0:E.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:ht((k=e.initialViewMetrics.largestContentfulPaint)===null||k===void 0?void 0:k.value),largest_contentful_paint_target_selector:(R=e.initialViewMetrics.largestContentfulPaint)===null||R===void 0?void 0:R.targetSelector,load_event:ht((I=e.initialViewMetrics.navigationTimings)===null||I===void 0?void 0:I.loadEvent),loading_time:n3(ht(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:Nde(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:ht(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:ht(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:tle()}};return xc(e.customTimings)||(N.view.custom_timings=BF(e.customTimings,ht)),{rawRumEvent:N,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}function Nde({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:i}){return{cls:e&&{score:e.value,timestamp:ht(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:ht(n)},fid:r&&{duration:ht(r.delay),timestamp:ht(r.time),target_selector:r.targetSelector},inp:t&&{duration:ht(t.value),timestamp:ht(t.time),target_selector:t.targetSelector},lcp:i&&{timestamp:ht(i.value),target_selector:i.targetSelector,resource_url:i.resourceUrl}}}const Ade="rum";function Ode(e,t,n){const r=gse(e,Ade,i=>Dde(e,i),n);return r.expireObservable.subscribe(()=>{t.notify(9)}),r.renewObservable.subscribe(()=>{t.notify(10)}),r.sessionStateUpdateObservable.subscribe(({previousState:i,newState:o})=>{if(!i.forcedReplay&&o.forcedReplay){const s=r.findSession();s&&(s.isReplayForced=!0)}}),{findTrackedSession:i=>{const o=r.findSession(i);if(!(!o||o.trackingType==="0"))return{id:o.id,sessionReplay:o.trackingType==="1"?1:o.isReplayForced?2:0,anonymousId:o.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:"1"})}}function $de(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:E6("records")?1:0};return{findTrackedSession:()=>e,expire:Ft,expireObservable:new Nt,setForcedReplay:Ft}}function Dde(e,t){return Pde(t)?t:Ll(e.sessionSampleRate)?Ll(e.sessionReplaySampleRate)?"1":"2":"0"}function Pde(e){return e==="0"||e==="1"||e==="2"}function Mde(e,t,n,r,i,o){const s=[e.rumEndpointBuilder];e.replica&&s.push(e.replica.rumEndpointBuilder);const c=k6({encoder:o(2),request:C6(s,e.batchBytesLimit,n),flushController:R6({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageMayExitObservable:r,sessionExpireObservable:i}),messageBytesLimit:e.messageBytesLimit});return t.subscribe(13,d=>{d.type===gt.VIEW?c.upsert(d,d.view.id):c.add(d)}),c}function zde(e){const t=Pp();e.subscribe(13,n=>{t.send("rum",n)})}const Lde=wc;function Ude(e,t,n,r){const i=Bd({expireDelay:Lde});let o;e.subscribe(1,({startClocks:d})=>{const f=r.href;i.add(c({url:f,referrer:o||document.referrer}),d.relative),o=f}),e.subscribe(6,({endClocks:d})=>{i.closeActive(d.relative)});const s=n.subscribe(({newLocation:d})=>{const f=i.find();if(f){const p=Ai();i.closeActive(p),i.add(c({url:d.href,referrer:f.referrer}),p)}});function c({url:d,referrer:f}){return{url:d,referrer:f}}return t.register(0,({startTime:d,eventType:f})=>{const p=i.find(d);return p?{type:f,view:{url:p.url,referrer:p.referrer}}:Ys}),{findUrl:d=>i.find(d),stop:()=>{s.unsubscribe(),i.stop()}}}function Fde(e,t){let n=qm(t);return new Nt(r=>{const{stop:i}=Vde(e,s),{stop:o}=Bde(e,s);function s(){if(n.href===t.href)return;const c=qm(t);r.notify({newLocation:c,oldLocation:n}),n=c}return()=>{i(),o()}})}function Vde(e,t){const{stop:n}=Jo(x$("pushState"),"pushState",({onPostCall:o})=>{o(t)}),{stop:r}=Jo(x$("replaceState"),"replaceState",({onPostCall:o})=>{o(t)}),{stop:i}=yn(e,window,"popstate",t);return{stop:()=>{n(),r(),i()}}}function Bde(e,t){return yn(e,window,"hashchange",t)}function x$(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const Hde=wc;function qde(e,t,n){const r=Bd({expireDelay:Hde});return e.subscribe(1,({startClocks:i})=>{r.add({},i.relative)}),e.subscribe(6,({endClocks:i})=>{r.closeActive(i.relative)}),t.register(0,({startTime:i,eventType:o})=>{if(!n.trackFeatureFlagsForEvents.concat([gt.VIEW,gt.ERROR]).includes(o))return Oi;const c=r.find(i);return!c||xc(c)?Oi:{type:o,feature_flags:c}}),{addFeatureFlagEvaluation:(i,o)=>{const s=r.find();s&&(s[i]=o)}}}const Gde=10*Rr;let Gu,$g;function Kde(e,t,n){e.metricsEnabled&&(C3(),$g=!1,t.subscribe(13,()=>{$g=!0}),n.subscribe(({bytesCount:r,messagesCount:i})=>{$g&&($g=!1,Gu.batchCount+=1,S$(Gu.batchBytesCount,r),S$(Gu.batchMessagesCount,i))}),zd(Zde,Gde))}function Zde(){Gu.batchCount!==0&&(Eb("Customer data measures",Gu),C3())}function w$(){return{min:1/0,max:0,sum:0}}function S$(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function C3(){Gu={batchCount:0,batchBytesCount:w$(),batchMessagesCount:w$()}}const Yde=4e3,Wde=500,Xde=wc;function Qde(e,t,n=Wde){const r=Bd({expireDelay:Xde,maxEntries:Yde});let i;Cc($t.VISIBILITY_STATE)&&performance.getEntriesByType($t.VISIBILITY_STATE).forEach(f=>{const p=f.name==="hidden"?"hidden":"active";s(p,f.startTime)}),s(E3(),Ai());const{stop:o}=Zs(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],d=>{s(efe(d),d.timeStamp)},{capture:!0});function s(d,f=Ai()){d!==i&&(i=d,r.closeActive(f),r.add({state:i,startTime:f},f))}function c(d,f,p){return r.findAll(f,p).some(h=>h.state===d)}return e.register(0,({startTime:d,duration:f=0,eventType:p})=>{if(p===gt.VIEW){const h=r.findAll(d,f);return{type:p,_dd:{page_states:Jde(h,d,n)}}}return p===gt.ACTION||p===gt.ERROR?{type:p,view:{in_foreground:c("active",d,0)}}:Oi}),{wasInPageStateDuringPeriod:c,addPageState:s,stop:()=>{o(),r.stop()}}}function Jde(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:r,startTime:i})=>({state:r,start:ht(kn(t,i))}))}function efe(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":E3()}function E3(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function tfe(e,t){let n;const r=requestAnimationFrame(st(()=>{n=qk()})),i=fde(t).subscribe(o=>{n=o}).unsubscribe;return e.register(0,({eventType:o})=>({type:o,display:n?{viewport:n}:void 0})),{stop:()=>{i(),r&&cancelAnimationFrame(r)}}}function nfe(e,t){const n=window.cookieStore?rfe(e):ofe;return new Nt(r=>n(t,i=>r.notify(i)))}function rfe(e){return(t,n)=>yn(e,window.cookieStore,"change",i=>{const o=i.changed.find(s=>s.name===t)||i.deleted.find(s=>s.name===t);o&&n(o.value)}).stop}const ife=Rr;function ofe(e,t){const n=Gm(document.cookie,e),r=zd(()=>{const i=Gm(document.cookie,e);i!==n&&t(i)},ife);return()=>{bb(r)}}const _$="datadog-ci-visibility-test-execution-id";function afe(e,t,n=nfe(e,_$)){var r;let i=Ps(_$)||((r=window.Cypress)===null||r===void 0?void 0:r.env("traceId"));const o=n.subscribe(s=>{i=s});return t.register(0,({eventType:s})=>typeof i!="string"?Oi:{type:s,session:{type:"ci_test"},ci_test:{test_execution_id:i}}),{stop:()=>{o.unsubscribe()}}}function sfe(e,t){const n=na(t,{type:$t.LONG_ANIMATION_FRAME,buffered:!0}).subscribe(r=>{for(const i of r){const o=yb(i.startTime),s={date:o.timeStamp,long_task:{id:jr(),entry_type:V6.LONG_ANIMATION_FRAME,duration:ht(i.duration),blocking_duration:ht(i.blockingDuration),first_ui_event_timestamp:ht(i.firstUIEventTimestamp),render_start:ht(i.renderStart),style_and_layout_start:ht(i.styleAndLayoutStart),start_time:ht(i.startTime),scripts:i.scripts.map(c=>({duration:ht(c.duration),pause_duration:ht(c.pauseDuration),forced_style_and_layout_duration:ht(c.forcedStyleAndLayoutDuration),start_time:ht(c.startTime),execution_start:ht(c.executionStart),source_url:c.sourceURL,source_function_name:c.sourceFunctionName,source_char_position:c.sourceCharPosition,invoker:c.invoker,invoker_type:c.invokerType,window_attribution:c.windowAttribution}))},type:gt.LONG_TASK,_dd:{discarded:!1}};e.notify(12,{rawRumEvent:s,startTime:o.relative,duration:i.duration,domainContext:{performanceEntry:i}})}});return{stop:()=>n.unsubscribe()}}function lfe(e,t){const n=na(t,{type:$t.LONG_TASK,buffered:!0}).subscribe(r=>{for(const i of r){if(i.entryType!==$t.LONG_TASK||!t.trackLongTasks)break;const o=yb(i.startTime),s={date:o.timeStamp,long_task:{id:jr(),entry_type:V6.LONG_TASK,duration:ht(i.duration)},type:gt.LONG_TASK,_dd:{discarded:!1}};e.notify(12,{rawRumEvent:s,startTime:o.relative,duration:i.duration,domainContext:{performanceEntry:i}})}});return{stop(){n.unsubscribe()}}}function cfe(e){e.register(0,({eventType:t})=>{if(!P6())return Oi;const n=$6(),r=D6();return{type:t,session:{type:"synthetics"},synthetics:{test_id:n,result_id:r,injected:O6()}}})}function ufe(e,t,n){const r=Pk(e),i=n(r);return Nk(t).forEach(([o,s])=>uC(e,r,o.split(/\.|(?=\[\])/),s)),i}function uC(e,t,n,r){const[i,...o]=n;if(i==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((s,c)=>uC(s,t[c],o,r));return}if(!(!C$(e)||!C$(t))){if(o.length>0)return uC(e[i],t[i],o,r);dfe(e,i,t[i],r)}}function dfe(e,t,n,r){const i=Sc(n);i===r?e[t]=an(n):r==="object"&&(i==="undefined"||i==="null")&&(e[t]={})}function C$(e){return Sc(e)==="object"}const _u={"view.name":"string","view.url":"string","view.referrer":"string"},Cu={context:"object"},Eu={service:"string",version:"string"};let k3;function ffe(e,t,n,r){k3={[gt.VIEW]:{"view.performance.lcp.resource_url":"string",...Cu,..._u,...Eu},[gt.ERROR]:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...Cu,..._u,...Eu},[gt.RESOURCE]:{"resource.url":"string",...Ld(qa.WRITABLE_RESOURCE_GRAPHQL)?{"resource.graphql":"object"}:{},...Cu,..._u,...Eu},[gt.ACTION]:{"action.target.name":"string",...Cu,..._u,...Eu},[gt.LONG_TASK]:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...Cu,..._u,...Eu},[gt.VITAL]:{...Cu,..._u,...Eu}};const i={[gt.ERROR]:uS(gt.ERROR,e.eventRateLimiterThreshold,r),[gt.ACTION]:uS(gt.ACTION,e.eventRateLimiterThreshold,r),[gt.VITAL]:uS(gt.VITAL,e.eventRateLimiterThreshold,r)};t.subscribe(12,({startTime:o,duration:s,rawRumEvent:c,domainContext:d})=>{const f=n.triggerHook(0,{eventType:c.type,startTime:o,duration:s});if(f===Ys)return;const p=Ga(f,c,{ddtags:m6(e).join(",")});mfe(p,e.beforeSend,d,i)&&(xc(p.context)&&delete p.context,t.notify(13,p))})}function mfe(e,t,n,r){var i;if(t){const s=ufe(e,k3[e.type],c=>t(c,n));if(s===!1&&e.type!==gt.VIEW)return!1;s===!1&&ft.warn("Can't dismiss view events using beforeSend!")}return!((i=r[e.type])===null||i===void 0?void 0:i.isLimitReached())}function pfe(e,t,n,r){e.register(0,({eventType:i,startTime:o})=>{const s=t.findTrackedSession(o),c=r.findView(o);if(!s||!c)return Ys;let d,f,p;return i===gt.VIEW?(d=n.getReplayStats(c.id)?!0:void 0,f=s.sessionReplay===1,p=c.sessionIsActive?void 0:!1):d=n.isRecording()?!0:void 0,{type:i,session:{id:s.id,type:"user",has_replay:d,sampled_for_replay:f,is_active:p}}}),e.register(1,({startTime:i})=>{const o=t.findTrackedSession(i);return o?{session:{id:o.id}}:Oi})}function hfe(e){e.register(0,({eventType:t})=>({type:t,connectivity:g6()}))}function gfe(e,t,n){e.register(0,({eventType:r})=>{const i=t.source;return{type:r,_dd:{format_version:2,drift:Bie(),configuration:{session_sample_rate:km(t.sessionSampleRate,3),session_replay_sample_rate:km(t.sessionReplaySampleRate,3),profiling_sample_rate:km(t.profilingSampleRate,3)},browser_sdk_version:vd()?"6.21.2":void 0,sdk_name:n},application:{id:t.applicationId},date:sr(),source:i}}),e.register(1,()=>({application:{id:t.applicationId}}))}function vfe(e,t){e.register(1,()=>t.isGranted()?Oi:Ys)}const yfe=Iae,bfe=[gt.ACTION,gt.ERROR,gt.LONG_TASK,gt.RESOURCE,gt.VITAL];function xfe(e){return{addEvent:(t,n,r,i)=>{bfe.includes(n.type)&&e.notify(12,{startTime:t,rawRumEvent:n,domainContext:r,duration:i})}}}function wfe(e,t){if(!t.metricsEnabled)return{stop:Ft};const{unsubscribe:n}=e.subscribe(4,({initialViewMetrics:r})=>{!r.largestContentfulPaint||!r.navigationTimings||(Eb("Initial view metrics",{metrics:Sfe(r.largestContentfulPaint,r.navigationTimings)}),n())});return{stop:n}}function Sfe(e,t){return{lcp:{value:e.value},navigation:{domComplete:t.domComplete,domContentLoaded:t.domContentLoaded,domInteractive:t.domInteractive,firstByte:t.firstByte,loadEvent:t.loadEvent}}}function _fe(e,t,n,r,i,o,s,c,d){const f=[],p=new Kle,h=yfe();p.subscribe(13,ie=>h6("rum",ie));const v=ie=>{p.notify(14,{error:ie}),Vd("Error reported to customer",{"error.message":ie.message})},y=Rae(e),b=y.subscribe(ie=>{p.notify(11,ie)});f.push(()=>b.unsubscribe());const S=Oae("browser-rum-sdk",e,h,v,y,i);f.push(S.stop);const C=vd()?$de():Ode(e,p,o);if(vd())zde(p);else{const ie=Mde(e,p,v,y,C.expireObservable,i);f.push(()=>ie.stop()),Kde(S,p,ie.flushController.flushObservable)}const E=Ble(),k=Fde(e,location),{observable:R,stop:I}=qle();f.push(I),gfe(h,e,d);const A=Qde(h,e),T=Yle(p);f.push(()=>T.stop());const N=Ude(p,h,k,location);f.push(()=>N.stop());const z=qde(p,h,e);pfe(h,C,t,T),hfe(h),vfe(h,o);const L=Wse(h,e,"rum"),K=Xse(h,e,C,"rum"),ee=Yse(h,e,"rum"),{actionContexts:Z,addAction:Y,addEvent:B,stop:W}=Cfe(p,h,e,A,E,R,v);f.push(W);const{addTiming:P,startView:G,setViewName:U,setViewContext:te,setViewContextProperty:$,getViewContext:M,stop:F}=Ide(p,h,e,location,E,R,k,t,T,r);f.push(F);const{stop:O}=wfe(p,S);f.push(O);const{stop:J}=Iue(p,e,A);if(f.push(J),e.trackLongTasks)if(Cc($t.LONG_ANIMATION_FRAME)){const{stop:ie}=sfe(p,e);f.push(ie)}else lfe(p,e);const{addError:de}=due(p,e,c);c.unbuffer(),sce(p,e,C,K,ee);const pe=rle(p,A,s),V=Gle(e.applicationId,C,T,Z,N);return f.push(()=>n.stop()),{addAction:Y,addEvent:B,addError:de,addTiming:P,addFeatureFlagEvaluation:z.addFeatureFlagEvaluation,startView:G,setViewContext:te,setViewContextProperty:$,getViewContext:M,setViewName:U,lifeCycle:p,viewHistory:T,session:C,stopSession:()=>C.expire(),getInternalContext:V.get,startDurationVital:pe.startDurationVital,stopDurationVital:pe.stopDurationVital,addDurationVital:pe.addDurationVital,addOperationStepVital:pe.addOperationStepVital,globalContext:L,userContext:K,accountContext:ee,telemetry:S,stop:()=>{f.forEach(ie=>ie())},hooks:h}}function Cfe(e,t,n,r,i,o,s){const c=lue(e,t,i,o,n),d=xfe(e),f=tfe(t,n),p=afe(n,t);return cfe(t),ffe(n,e,t,s),{pageStateHistory:r,addAction:c.addAction,addEvent:d.addEvent,actionContexts:c.actionContexts,stop:()=>{c.stop(),p.stop(),f.stop(),r.stop()}}}function Efe(e,{session:t,viewContext:n,errorType:r}){const i=t?t.id:"no-session-id",o=[];r!==void 0&&o.push(`error-type=${r}`),n&&(o.push(`seed=${n.id}`),o.push(`from=${n.startClocks.timeStamp}`));const s=kfe(e),c=`/rum/replay/sessions/${i}`;return`${s}${c}?${o.join("&")}`}function kfe(e){const t=e.site,n=e.subdomain||Rfe(e);return`https://${n?`${n}.`:""}${t}`}function Rfe(e){switch(e.site){case Ul:case cae:return"app";case p6:return"dd";default:return}}const jfe=1e3;let Ji;function HTe(e){return Tb(e).segments_count}function qTe(e){Tb(e).segments_count+=1}function GTe(e){Tb(e).records_count+=1}function KTe(e,t){Tb(e).segments_total_raw_size+=t}function Ife(e){return Ji?.get(e)}function Tb(e){Ji||(Ji=new Map);let t;return Ji.has(e)?t=Ji.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},Ji.set(e,t),Ji.size>jfe&&Tfe()),t}function Tfe(){if(!Ji)return;const e=Ji.keys().next().value;e&&Ji.delete(e)}function R3(e,t,n){let r=0,i=[],o,s=!0,c=0;const d=[],{stop:f}=yn(e,t,"message",({data:v})=>{if(v.type!=="wrote"||v.streamId!==n)return;const y=d[0];y&&(y.id===v.id?(d.shift(),r+=v.additionalBytesCount,i.push(v.result),o=v.trailer,y.writeCallback?y.writeCallback(v.result.byteLength):y.finishCallback&&y.finishCallback()):y.id<v.id&&f())});function p(){const v=i.length===0?new Uint8Array(0):Kie(i.concat(o)),y={rawBytesCount:r,output:v,outputBytesCount:v.byteLength,encoding:"deflate"};return r=0,i=[],y}function h(){s||(t.postMessage({action:"reset",streamId:n}),s=!0)}return{isAsync:!0,get isEmpty(){return s},write(v,y){t.postMessage({action:"write",id:c,data:v,streamId:n}),d.push({id:c,writeCallback:y,data:v}),s=!1,c+=1},finish(v){h(),d.length?(d.forEach(y=>{delete y.writeCallback}),d[d.length-1].finishCallback=()=>v(p())):v(p())},finishSync(){h();const v=d.map(y=>y.data).join("");return d.length=0,{...p(),pendingData:v}},estimateEncodedBytesCount(v){return v.length/8},stop(){f()}}}function Gk({configuredUrl:e,error:t,source:n,scriptType:r}){if(ft.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&Nfe(t.message)){let i;e?i=`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:i="Please make sure CSP is correctly configured.",ft.error(`${i} See documentation at ${vb}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r==="worker"&&Mk(t)}function Nfe(e){return e.includes("Content Security Policy")||e.includes("requires 'TrustedScriptURL'")}const Afe=30*Rr;function j3(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.21.2"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let $n={status:0};function I3(e,t,n,r=j3){switch($n.status===0&&Ofe(e,t,r),$n.status){case 1:return $n.initializationFailureCallbacks.push(n),$n.worker;case 3:return $n.worker}}function E$(){return $n.status}function Ofe(e,t,n=j3){try{const r=n(e),{stop:i}=yn(e,r,"error",c=>{SS(e,t,c)}),{stop:o}=yn(e,r,"message",({data:c})=>{c.type==="errored"?SS(e,t,c.error,c.streamId):c.type==="initialized"&&Dfe(c.version)});r.postMessage({action:"init"}),_r(()=>$fe(t),Afe),$n={status:1,worker:r,stop:()=>{i(),o()},initializationFailureCallbacks:[]}}catch(r){SS(e,t,r)}}function $fe(e){$n.status===1&&(ft.error(`${e} failed to start: a timeout occurred while initializing the Worker`),$n.initializationFailureCallbacks.forEach(t=>t()),$n={status:2})}function Dfe(e){$n.status===1&&($n={status:3,worker:$n.worker,stop:$n.stop,version:e})}function SS(e,t,n,r){$n.status===1||$n.status===0?(Gk({configuredUrl:e.workerUrl,error:n,source:t,scriptType:"worker"}),$n.status===1&&$n.initializationFailureCallbacks.forEach(i=>i()),$n={status:2}):Mk(n,{worker_version:$n.status===3&&$n.version,stream_id:r})}function T3(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function Pfe(e,t,n,r){const i=t.findTrackedSession(),o=Mfe(i,r),s=n.findView();return Efe(e,{viewContext:s,errorType:o,session:i})}function Mfe(e,t){if(!T3())return"browser-not-supported";if(!e)return"rum-not-tracked";if(e.sessionReplay===0)return"incorrect-session-plan";if(!t)return"replay-not-started"}function zfe(e,t){if(!e.metricsEnabled)return{stop:Ft};let n,r,i;const{unsubscribe:o}=t.subscribe(s=>{switch(s.type){case"start":n={forced:s.forced,timestamp:sr()},r=void 0,i=void 0;break;case"document-ready":n&&(r=kn(n.timestamp,sr()));break;case"recorder-settled":n&&(i=kn(n.timestamp,sr()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":o(),n&&Eb("Recorder init metrics",{metrics:Lfe(n.forced,i,kn(n.timestamp,sr()),s.type,r)});break}});return{stop:o}}function Lfe(e,t,n,r,i){return{forced:e,loadRecorderModuleDuration:t,recorderInitDuration:n,result:r,waitForDocReadyDuration:i}}function Ufe(e,t,n,r,i,o,s){let c=0,d;t.subscribe(9,()=>{(c===2||c===3)&&(v(),c=1)}),t.subscribe(10,()=>{c===1&&h()});const f=new Nt;zfe(s,f);const p=async y=>{f.notify({type:"start",forced:y});const[b]=await Promise.all([k$(f,{type:"recorder-settled"},i()),k$(f,{type:"document-ready"},Cse(e,"interactive"))]);if(c!==2){f.notify({type:"aborted"});return}if(!b){c=0,f.notify({type:"recorder-load-failed"});return}const S=o();if(!S){c=0,f.notify({type:"deflate-encoder-load-failed"});return}({stop:d}=b(t,e,n,r,S,s)),c=3,f.notify({type:"succeeded"})};function h(y){const b=n.findTrackedSession();if(Ffe(b,y)){c=1;return}if(Vfe(c))return;c=2;const S=Bfe(b,y)||!1;p(S).catch(oc),S&&n.setForcedReplay()}function v(){c===3&&d?.(),c=0}return{start:h,stop:v,getSessionReplayLink(){return Pfe(e,n,r,c!==0)},isRecording:()=>c===3}}function Ffe(e,t){return!e||e.sessionReplay===0&&(!t||!t.force)}function Vfe(e){return e===2||e===3}function Bfe(e,t){return t&&t.force&&e.sessionReplay===0}async function k$(e,t,n){try{return await n}finally{e.notify(t)}}function Hfe(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:Ft},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function qfe(e,t){if(vd()&&!E6("records")||!T3())return{start:Ft,stop:Ft,getReplayStats:()=>{},onRumStart:Ft,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=Hfe();return{start:o=>n.start(o),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:i,isRecording:()=>E$()===3&&n.isRecording(),getReplayStats:o=>E$()===3?Ife(o):void 0};function i(o,s,c,d,f,p){let h;function v(){return h||(f??(f=I3(s,"Datadog Session Replay",()=>{n.stop()},t)),f&&(h=R3(s,f,1))),h}n=Ufe(s,o,c,d,e,v,p),r(s)&&n.start()}}const Gfe="modulepreload",Kfe=function(e){return"/"+e},R$={},zp=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),c=s?.nonce||s?.getAttribute("nonce");i=d(n.map(f=>{if(f=Kfe(f),f in R$)return;R$[f]=!0;const p=f.endsWith(".css"),h=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${h}`))return;const v=document.createElement("link");if(v.rel=p?"stylesheet":Gfe,p||(v.as="script"),v.crossOrigin="",v.href=f,c&&v.setAttribute("nonce",c),document.head.appendChild(v),p)return new Promise((y,b)=>{v.addEventListener("load",y),v.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(s){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=s,window.dispatchEvent(c),!c.defaultPrevented)throw s}return i.then(s=>{for(const c of s||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};async function Zfe(e=Yfe){try{return await e()}catch(t){Gk({error:t,source:"Recorder",scriptType:"module"})}}async function Yfe(){return(await zp(()=>import("./startRecording-CTxWO2nY.js"),[])).startRecording}function Wfe(){return ho().Profiler!==void 0}const Xfe=e=>{let t={status:"starting"};return e.register(0,({eventType:n})=>n!==gt.VIEW&&n!==gt.LONG_TASK?Oi:{type:n,_dd:{profiling:t}}),{get:()=>t,set:n=>{t=n}}};async function Qfe(e=Jfe){try{return await e()}catch(t){Gk({error:t,source:"Profiler",scriptType:"module"})}}async function Jfe(){return(await zp(()=>import("./profiler-Nd-IJd-3.js"),[])).createRumProfiler}function eme(){let e;function t(n,r,i,o,s){const c=o.findTrackedSession();if(!c||!G6(c.id,i.profilingSampleRate))return;const d=Xfe(r);if(!Wfe()){d.set({status:"error",error_reason:"not-supported-by-browser"});return}Qfe().then(f=>{if(!f){Vd("[DD_RUM] Failed to lazy load the RUM Profiler"),d.set({status:"error",error_reason:"failed-to-lazy-load"});return}e=f(i,n,o,d),e.start(s.findView())}).catch(oc)}return{onRumStart:t,stop:()=>{e?.stop().catch(oc)}}}const tme=qfe(Zfe),nme=eme(),rme=Fle(_fe,tme,nme,{startDeflateWorker:I3,createDeflateEncoder:R3,sdkName:"rum"});rse(ho(),"DD_RUM",rme);function gv(e,t){Ym("react error"),Jn()}const j$={didCatch:!1,error:null};class ZTe extends X.Component{constructor(t){super(t),this.resetError=()=>{this.setState(j$)},this.state=j$}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}componentDidCatch(t,n){gv()}render(){return this.state.didCatch?X.createElement(this.props.fallback,{error:this.state.error,resetError:this.resetError}):this.props.children}}let I$=!1;function ime(){x.useEffect(()=>{I$||(I$=!0)},[])}const ome=En({email:Pd,password:Tp});function ame(){const e=bn(),{me:t}=Er({strict:!1}),n=mn(),r=kr(),{redirect:i}=Er({strict:!1}),o=pn({resolver:wn(ome),defaultValues:{email:t||"",password:""}}),s=o.watch("email"),{handleSubmit:c,control:d,setFocus:f}=o;x.useEffect(()=>{f("email")},[f]);const{mutate:p,isPending:h}=Die(),v=y=>{p(y,{onSuccess:async b=>{lr.setUserForEntity(Bn,b);const S=Td(b);PF(b.email),await r.invalidateQueries({queryKey:$y,refetchType:"none"}),n.invalidate(),await e({to:i?.startsWith("/")?i:S})}})};return u.jsxs("div",{className:"text-white w-xs",children:[u.jsx("h2",{className:"text-2xl font-light",children:"Sign in to Harper Fabric"}),u.jsx(hn,{...o,children:u.jsxs("form",{onSubmit:c(v),className:"my-4",children:[u.jsx(Pe,{control:d,name:"email",render:({field:y})=>u.jsxs(Oe,{className:"my-4",children:[u.jsx($e,{children:"Email"}),u.jsx(Me,{children:u.jsx(Ge,{type:"email",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...y})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:d,name:"password",render:({field:y})=>u.jsxs(Oe,{className:"my-4",children:[u.jsx($e,{children:"Password"}),u.jsx(Me,{children:u.jsx(Ge,{type:"password",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...y})}),u.jsx(De,{})]})}),u.jsx(Ce,{type:"submit",variant:"submit",className:"w-full my-2 rounded-full",disabled:h,children:"Sign In"})]})}),u.jsxs("div",{className:"flex px-4 mt-4 underline place-content-between",children:[u.jsx(We,{className:"text-sm hover:text-blue-300",to:"/sign-up",search:{me:s},children:"Sign up for free"}),u.jsx(We,{className:"text-sm hover:text-blue-300",to:"/forgot-password",search:{me:s},children:"Forgot password?"})]})]})}async function sme(e){const{data:t}=await Vt.post("/User/",e);if(t)return t;throw new Error("Something went wrong")}function lme(){return vt({mutationFn:e=>sme(e)})}const cme=En({email:Pd.max(80,{error:"Email cannot be longer than 80 characters."}),firstname:wt().trim().min(2,{error:"Please enter your first name."}).max(40,{error:"First name cannot be longer than 40 characters."}),lastname:wt().trim().min(2,{error:"Please enter your last name."}).max(80,{error:"Last name cannot be longer than 80 characters."}),password:Tp.min(8,{error:"Password must be at least 8 characters long."}),confirmPassword:wt()}).refine(e=>e.password===e.confirmPassword,{error:"Passwords do not match.",path:["confirmPassword"]});function ume(){const e=bn(),{email:t,me:n}=Er({strict:!1}),r=pn({resolver:wn(cme),defaultValues:{firstname:"",lastname:"",email:n||t||"",password:"",confirmPassword:""}}),i=r.watch("email"),{setFocus:o,control:s,handleSubmit:c}=r;x.useEffect(()=>{o("firstname")},[o]);const{mutate:d}=lme(),f=async p=>{const{confirmPassword:h,...v}=p;d(v,{onSuccess:()=>{PF(v.email),e({to:"/verifying?email="+encodeURIComponent(v.email)})}})};return u.jsxs("div",{className:"text-white w-xs",children:[u.jsx("h2",{className:"text-2xl font-light",children:"Sign up for Harper Fabric"}),u.jsx(hn,{...r,children:u.jsxs("form",{onSubmit:c(f),className:"grid gap-4 my-4",children:[u.jsx(Pe,{control:s,name:"firstname",render:({field:p})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"First Name"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",autoCapitalize:"words",...p})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:s,name:"lastname",render:({field:p})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Last Name"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",autoCapitalize:"words",...p})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:s,name:"email",render:({field:p})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Email"}),u.jsx(Me,{children:u.jsx(Ge,{type:"email",readOnly:!!t,disabled:!!t,className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",autoComplete:"email",autoCapitalize:"none",...p})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:s,name:"password",render:({field:p})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Password"}),u.jsx(Me,{children:u.jsx(Ge,{type:"password",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...p})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:s,name:"confirmPassword",render:({field:p})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Confirm Password"}),u.jsx(Me,{children:u.jsx(Ge,{type:"password",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...p})}),u.jsx(De,{})]})}),u.jsxs("p",{className:"text-xs",children:["By creating an account, you agree to the ",u.jsx("a",{rel:"noopener",href:"https://www.harper.fast/resources/privacy-policy",target:"_blank",className:"underline hover:text-blue-300",children:"Privacy Policy"})," and ",u.jsx("a",{rel:"noopener",href:"https://www.harper.fast/resources/terms-of-use",target:"_blank",className:"underline hover:text-blue-300",children:"Terms of Service"})]}),u.jsx(Ce,{type:"submit",variant:"submit",className:"w-full my-2 rounded-full",children:"Sign Up For Free"})]})}),u.jsx("div",{className:"flex px-4 mt-4 underline place-content-between",children:u.jsx(We,{className:"m-auto text-sm hover:text-blue-300",to:"/sign-in",search:{me:i},children:"Already have an account? Sign in instead."})})]})}const dme=async e=>{const{data:t}=await Vt.put("/VerifyEmail/",{token:e.toString()});return t};function fme(){return vt({mutationFn:e=>dme(e)})}const mme=async({email:e})=>{const{data:t}=await Vt.post("/ResendVerificationEmail/",{email:e});return t};function N3(){return vt({mutationFn:e=>mme(e)})}const pme=En({email:Pd});function hme(){const e=bn(),{mutate:t,isPending:n}=N3(),r=pn({resolver:wn(pme),defaultValues:{email:""}}),i=r.watch("email"),{setFocus:o,control:s,handleSubmit:c}=r;x.useEffect(()=>{o("email")},[o]);const d=x.useCallback(async f=>{t(f,{onSuccess:p=>{Ee.success("Success",{description:`${p}`,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}}),e({to:"/sign-in",search:{me:i}})}})},[i,e,t]);return u.jsxs(hn,{...r,children:[u.jsx("p",{className:"text-sm py-2",children:"Please Enter an Email"}),u.jsxs("form",{onSubmit:c(d),className:"my-4",children:[u.jsx(Pe,{control:s,name:"email",render:({field:f})=>u.jsxs(Oe,{className:"my-2",children:[u.jsx($e,{children:"Email"}),u.jsx(Me,{children:u.jsx(Ge,{disabled:n,type:"email",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",...f})}),u.jsx(De,{})]})}),u.jsx(Ce,{type:"submit",variant:"submit",disabled:n,className:"w-full my-2 rounded-full",children:"Send Verification Email"})]})]})}function gme(){const{token:e}=Er({strict:!1}),t=bn(),{mutate:n,isPending:r}=fme(),i=x.useCallback(o=>{n(o,{onSuccess:()=>{Ee.success("Success",{description:"Email verified successfully",action:{label:"Dismiss",onClick:()=>Ee.dismiss()}}),t({to:"/sign-in"})}})},[n,t]);return x.useEffect(()=>{e&&i(e)},[i,e]),u.jsxs("div",{className:"text-white w-xs",children:[u.jsx("h1",{className:"text-3xl font-light",children:"Verify Email"}),r?u.jsx("p",{className:"text-sm pt-1",children:"Verifying email..."}):u.jsx(hme,{})]})}function vme(){const{email:e}=Er({strict:!1}),{mutate:t,isPending:n}=N3(),r=x.useCallback(i=>(i.preventDefault(),e&&t({email:e},{onSuccess:o=>{Ee.success("Code Sent",{description:`${o}`,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}})}}),!1),[e,t]);return u.jsxs("div",{className:"text-white w-lg flex flex-col gap-4",children:[u.jsxs("h1",{className:"text-3xl font-light",children:[u.jsx("span",{"aria-hidden":"true",className:"text-2xl animate-flower-dance mr-4",title:"Loading",children:"🌼"}),"Check your email!"]}),u.jsxs("p",{children:["Your account has been created! You should receive an email with a link to ",u.jsx("strong",{children:"[Verify My Email]"}),"!"]}),u.jsxs("p",{children:["From: ",u.jsx("strong",{children:"harper@notifications.harperfabric.com"})]}),u.jsxs("p",{children:["To: ",u.jsx("strong",{children:e||"your email"})]}),u.jsx("p",{children:"Can you click it? Then we can carry on to more fun things!"}),u.jsxs("div",{className:"underline flex gap-4",children:[u.jsx(We,{className:"text-sm hover:text-blue-300",to:"/sign-in",search:{me:e},children:"I did it, let me sign in!"}),u.jsx(We,{className:"text-sm opacity-50 hover:text-blue-300",to:void 0,onClick:r,disabled:n,children:"Send me another code, please."})]})]})}function yme(){return u.jsx(u.Fragment,{children:u.jsx(el,{})})}const Nb=WZ()({component:yme}),Ec=it({getParentRoute:()=>Nb,id:"_authLayout",component:CJ}),bme=it({getParentRoute:()=>Ec,path:"sign-in",component:ame,beforeLoad:({context:e,location:t})=>{const n=e.authentication[Bn]?.user;if(n){const r=t?.search,i=Td(n);throw kd({to:r?.redirect?.startsWith("/")?r.redirect:i})}}}),xme=it({getParentRoute:()=>Nb,path:"sign-in",component:kk,beforeLoad:({context:e,location:t})=>{if(e.authentication[Bn]?.user){const n=t?.search;throw kd({to:n?.redirect?.startsWith("/")?n.redirect:Js})}}}),wme=it({getParentRoute:()=>Ec,path:"sign-up",component:ume}),Sme=it({getParentRoute:()=>Ec,path:"forgot-password",component:Iie}),_me=it({getParentRoute:()=>Ec,path:"verify-email",component:gme}),Cme=it({getParentRoute:()=>Ec,path:"verifying",component:vme}),Eme=it({getParentRoute:()=>Ec,path:"reset-password",component:Oie});Ec.addChildren([bme,wme,Sme,_me,Cme,Eme]);const kme=[xme];function la({children:e}){return u.jsx("nav",{className:"fixed top-20 w-full md:h-12 z-39 py-2 px-4 md:px-12 bg-grey-700",children:u.jsxs("div",{className:"md:flex items-center h-full space-x-8",children:[u.jsx(Ky,{}),e]})})}var _S="focusScope.autoFocusOnMount",CS="focusScope.autoFocusOnUnmount",T$={bubbles:!1,cancelable:!0},Rme="FocusScope",Ab=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[c,d]=x.useState(null),f=fn(i),p=fn(o),h=x.useRef(null),v=ct(t,S=>d(S)),y=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let S=function(R){if(y.paused||!c)return;const I=R.target;c.contains(I)?h.current=I:Ns(h.current,{select:!0})},C=function(R){if(y.paused||!c)return;const I=R.relatedTarget;I!==null&&(c.contains(I)||Ns(h.current,{select:!0}))},E=function(R){if(document.activeElement===document.body)for(const A of R)A.removedNodes.length>0&&Ns(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const k=new MutationObserver(E);return c&&k.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),k.disconnect()}}},[r,c,y.paused]),x.useEffect(()=>{if(c){A$.add(y);const S=document.activeElement;if(!c.contains(S)){const E=new CustomEvent(_S,T$);c.addEventListener(_S,f),c.dispatchEvent(E),E.defaultPrevented||(jme(Ome(A3(c)),{select:!0}),document.activeElement===S&&Ns(c))}return()=>{c.removeEventListener(_S,f),setTimeout(()=>{const E=new CustomEvent(CS,T$);c.addEventListener(CS,p),c.dispatchEvent(E),E.defaultPrevented||Ns(S??document.body,{select:!0}),c.removeEventListener(CS,p),A$.remove(y)},0)}}},[c,f,p,y]);const b=x.useCallback(S=>{if(!n&&!r||y.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,E=document.activeElement;if(C&&E){const k=S.currentTarget,[R,I]=Ime(k);R&&I?!S.shiftKey&&E===I?(S.preventDefault(),n&&Ns(R,{select:!0})):S.shiftKey&&E===R&&(S.preventDefault(),n&&Ns(I,{select:!0})):E===k&&S.preventDefault()}},[n,r,y.paused]);return u.jsx(Be.div,{tabIndex:-1,...s,ref:v,onKeyDown:b})});Ab.displayName=Rme;function jme(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ns(r,{select:t}),document.activeElement!==n)return}function Ime(e){const t=A3(e),n=N$(t,e),r=N$(t.reverse(),e);return[n,r]}function A3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function N$(e,t){for(const n of e)if(!Tme(n,{upTo:t}))return n}function Tme(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Nme(e){return e instanceof HTMLInputElement&&"select"in e}function Ns(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Nme(e)&&t&&e.select()}}var A$=Ame();function Ame(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=O$(e,t),e.unshift(t)},remove(t){e=O$(e,t),e[0]?.resume()}}}function O$(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ome(e){return e.filter(t=>t.tagName!=="A")}var $me="Portal",Lp=x.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=x.useState(!1);qn(()=>o(!0),[]);const s=n||i&&globalThis?.document?.body;return s?g1.createPortal(u.jsx(Be.div,{...r,ref:t}),s):null});Lp.displayName=$me;var ES=0;function Kk(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$$()),document.body.insertAdjacentElement("beforeend",e[1]??$$()),ES++,()=>{ES===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ES--}},[])}function $$(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var dC=function(e,t){return dC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},dC(e,t)};function YTe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");dC(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ko=function(){return Ko=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ko.apply(this,arguments)};function O3(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Dme(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var vv="right-scroll-bar-position",yv="width-before-scroll-bar",Pme="with-scroll-bars-hidden",Mme="--removed-body-scroll-bar-size";function kS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function zme(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Lme=typeof window<"u"?x.useLayoutEffect:x.useEffect,D$=new WeakMap;function Ume(e,t){var n=zme(null,function(r){return e.forEach(function(i){return kS(i,r)})});return Lme(function(){var r=D$.get(n);if(r){var i=new Set(r),o=new Set(e),s=n.current;i.forEach(function(c){o.has(c)||kS(c,null)}),o.forEach(function(c){i.has(c)||kS(c,s)})}D$.set(n,e)},[e]),n}function Fme(e){return e}function Vme(e,t){t===void 0&&(t=Fme);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(c){return c!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var c=n;n=[],c.forEach(o),s=n}var d=function(){var p=s;s=[],p.forEach(o)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(p){s.push(p),f()},filter:function(p){return s=s.filter(p),n}}}};return i}function Bme(e){e===void 0&&(e={});var t=Vme(null);return t.options=Ko({async:!0,ssr:!1},e),t}var $3=function(e){var t=e.sideCar,n=O3(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,Ko({},n))};$3.isSideCarExport=!0;function Hme(e,t){return e.useMedium(t),$3}var D3=Bme(),RS=function(){},Ob=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:RS,onWheelCapture:RS,onTouchMoveCapture:RS}),i=r[0],o=r[1],s=e.forwardProps,c=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,h=e.shards,v=e.sideCar,y=e.noRelative,b=e.noIsolation,S=e.inert,C=e.allowPinchZoom,E=e.as,k=E===void 0?"div":E,R=e.gapMode,I=O3(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=v,T=Ume([n,t]),N=Ko(Ko({},I),i);return x.createElement(x.Fragment,null,p&&x.createElement(A,{sideCar:D3,removeScrollBar:f,shards:h,noRelative:y,noIsolation:b,inert:S,setCallbacks:o,allowPinchZoom:!!C,lockRef:n,gapMode:R}),s?x.cloneElement(x.Children.only(c),Ko(Ko({},N),{ref:T})):x.createElement(k,Ko({},N,{className:d,ref:T}),c))});Ob.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ob.classNames={fullWidth:yv,zeroRight:vv};var qme=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Gme(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qme();return t&&e.setAttribute("nonce",t),e}function Kme(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Zme(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yme=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Gme())&&(Kme(t,n),Zme(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wme=function(){var e=Yme();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},P3=function(){var e=Wme(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Xme={left:0,top:0,right:0,gap:0},jS=function(e){return parseInt(e||"",10)||0},Qme=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[jS(n),jS(r),jS(i)]},Jme=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xme;var t=Qme(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},epe=P3(),Ku="data-scroll-locked",tpe=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
444
|
-
.`.concat(Pme,` {
|
|
445
|
-
overflow: hidden `).concat(r,`;
|
|
446
|
-
padding-right: `).concat(c,"px ").concat(r,`;
|
|
447
|
-
}
|
|
448
|
-
body[`).concat(Ku,`] {
|
|
449
|
-
overflow: hidden `).concat(r,`;
|
|
450
|
-
overscroll-behavior: contain;
|
|
451
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
452
|
-
padding-left: `.concat(i,`px;
|
|
453
|
-
padding-top: `).concat(o,`px;
|
|
454
|
-
padding-right: `).concat(s,`px;
|
|
455
|
-
margin-left:0;
|
|
456
|
-
margin-top:0;
|
|
457
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
458
|
-
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.`).concat(vv,` {
|
|
462
|
-
right: `).concat(c,"px ").concat(r,`;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
.`).concat(yv,` {
|
|
466
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
.`).concat(vv," .").concat(vv,` {
|
|
470
|
-
right: 0 `).concat(r,`;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
.`).concat(yv," .").concat(yv,` {
|
|
474
|
-
margin-right: 0 `).concat(r,`;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
body[`).concat(Ku,`] {
|
|
478
|
-
`).concat(Mme,": ").concat(c,`px;
|
|
479
|
-
}
|
|
480
|
-
`)},P$=function(){var e=parseInt(document.body.getAttribute(Ku)||"0",10);return isFinite(e)?e:0},npe=function(){x.useEffect(function(){return document.body.setAttribute(Ku,(P$()+1).toString()),function(){var e=P$()-1;e<=0?document.body.removeAttribute(Ku):document.body.setAttribute(Ku,e.toString())}},[])},rpe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;npe();var o=x.useMemo(function(){return Jme(i)},[i]);return x.createElement(epe,{styles:tpe(o,!t,i,n?"":"!important")})},fC=!1;if(typeof window<"u")try{var Dg=Object.defineProperty({},"passive",{get:function(){return fC=!0,!0}});window.addEventListener("test",Dg,Dg),window.removeEventListener("test",Dg,Dg)}catch{fC=!1}var ku=fC?{passive:!1}:!1,ipe=function(e){return e.tagName==="TEXTAREA"},M3=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ipe(e)&&n[t]==="visible")},ope=function(e){return M3(e,"overflowY")},ape=function(e){return M3(e,"overflowX")},M$=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=z3(e,r);if(i){var o=L3(e,r),s=o[1],c=o[2];if(s>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},spe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},lpe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},z3=function(e,t){return e==="v"?ope(t):ape(t)},L3=function(e,t){return e==="v"?spe(t):lpe(t)},cpe=function(e,t){return e==="h"&&t==="rtl"?-1:1},upe=function(e,t,n,r,i){var o=cpe(e,window.getComputedStyle(t).direction),s=o*r,c=n.target,d=t.contains(c),f=!1,p=s>0,h=0,v=0;do{if(!c)break;var y=L3(e,c),b=y[0],S=y[1],C=y[2],E=S-C-o*b;(b||E)&&z3(e,c)&&(h+=E,v+=b);var k=c.parentNode;c=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(p&&Math.abs(h)<1||!p&&Math.abs(v)<1)&&(f=!0),f},Pg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},z$=function(e){return[e.deltaX,e.deltaY]},L$=function(e){return e&&"current"in e?e.current:e},dpe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},fpe=function(e){return`
|
|
481
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
482
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
483
|
-
`)},mpe=0,Ru=[];function ppe(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(mpe++)[0],o=x.useState(P3)[0],s=x.useRef(e);x.useEffect(function(){s.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=Dme([e.lockRef.current],(e.shards||[]).map(L$),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=x.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!s.current.allowPinchZoom;var E=Pg(S),k=n.current,R="deltaX"in S?S.deltaX:k[0]-E[0],I="deltaY"in S?S.deltaY:k[1]-E[1],A,T=S.target,N=Math.abs(R)>Math.abs(I)?"h":"v";if("touches"in S&&N==="h"&&T.type==="range")return!1;var z=M$(N,T);if(!z)return!0;if(z?A=N:(A=N==="v"?"h":"v",z=M$(N,T)),!z)return!1;if(!r.current&&"changedTouches"in S&&(R||I)&&(r.current=A),!A)return!0;var L=r.current||A;return upe(L,C,S,L==="h"?R:I)},[]),d=x.useCallback(function(S){var C=S;if(!(!Ru.length||Ru[Ru.length-1]!==o)){var E="deltaY"in C?z$(C):Pg(C),k=t.current.filter(function(A){return A.name===C.type&&(A.target===C.target||C.target===A.shadowParent)&&dpe(A.delta,E)})[0];if(k&&k.should){C.cancelable&&C.preventDefault();return}if(!k){var R=(s.current.shards||[]).map(L$).filter(Boolean).filter(function(A){return A.contains(C.target)}),I=R.length>0?c(C,R[0]):!s.current.noIsolation;I&&C.cancelable&&C.preventDefault()}}},[]),f=x.useCallback(function(S,C,E,k){var R={name:S,delta:C,target:E,should:k,shadowParent:hpe(E)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(I){return I!==R})},1)},[]),p=x.useCallback(function(S){n.current=Pg(S),r.current=void 0},[]),h=x.useCallback(function(S){f(S.type,z$(S),S.target,c(S,e.lockRef.current))},[]),v=x.useCallback(function(S){f(S.type,Pg(S),S.target,c(S,e.lockRef.current))},[]);x.useEffect(function(){return Ru.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",d,ku),document.addEventListener("touchmove",d,ku),document.addEventListener("touchstart",p,ku),function(){Ru=Ru.filter(function(S){return S!==o}),document.removeEventListener("wheel",d,ku),document.removeEventListener("touchmove",d,ku),document.removeEventListener("touchstart",p,ku)}},[]);var y=e.removeScrollBar,b=e.inert;return x.createElement(x.Fragment,null,b?x.createElement(o,{styles:fpe(i)}):null,y?x.createElement(rpe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function hpe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const gpe=Hme(D3,ppe);var $b=x.forwardRef(function(e,t){return x.createElement(Ob,Ko({},e,{ref:t,sideCar:gpe}))});$b.classNames=Ob.classNames;var vpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ju=new WeakMap,Mg=new WeakMap,zg={},IS=0,U3=function(e){return e&&(e.host||U3(e.parentNode))},ype=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=U3(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},bpe=function(e,t,n,r){var i=ype(t,Array.isArray(e)?e:[e]);zg[n]||(zg[n]=new WeakMap);var o=zg[n],s=[],c=new Set,d=new Set(i),f=function(h){!h||c.has(h)||(c.add(h),f(h.parentNode))};i.forEach(f);var p=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(v){if(c.has(v))p(v);else try{var y=v.getAttribute(r),b=y!==null&&y!=="false",S=(ju.get(v)||0)+1,C=(o.get(v)||0)+1;ju.set(v,S),o.set(v,C),s.push(v),S===1&&b&&Mg.set(v,!0),C===1&&v.setAttribute(n,"true"),b||v.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",v,E)}})};return p(t),c.clear(),IS++,function(){s.forEach(function(h){var v=ju.get(h)-1,y=o.get(h)-1;ju.set(h,v),o.set(h,y),v||(Mg.has(h)||h.removeAttribute(r),Mg.delete(h)),y||h.removeAttribute(n)}),IS--,IS||(ju=new WeakMap,ju=new WeakMap,Mg=new WeakMap,zg={})}},Zk=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=vpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),bpe(r,i,n,"aria-hidden")):function(){return null}},Db="Dialog",[F3]=Di(Db),[xpe,zo]=F3(Db),V3=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,c=x.useRef(null),d=x.useRef(null),[f,p]=No({prop:r,defaultProp:i??!1,onChange:o,caller:Db});return u.jsx(xpe,{scope:t,triggerRef:c,contentRef:d,contentId:Ii(),titleId:Ii(),descriptionId:Ii(),open:f,onOpenChange:p,onOpenToggle:x.useCallback(()=>p(h=>!h),[p]),modal:s,children:n})};V3.displayName=Db;var B3="DialogTrigger",H3=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=zo(B3,n),o=ct(t,i.triggerRef);return u.jsx(Be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Xk(i.open),...r,ref:o,onClick:Re(e.onClick,i.onOpenToggle)})});H3.displayName=B3;var Yk="DialogPortal",[wpe,q3]=F3(Yk,{forceMount:void 0}),G3=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=zo(Yk,t);return u.jsx(wpe,{scope:t,forceMount:n,children:x.Children.map(r,s=>u.jsx(Gn,{present:n||o.open,children:u.jsx(Lp,{asChild:!0,container:i,children:s})}))})};G3.displayName=Yk;var ny="DialogOverlay",K3=x.forwardRef((e,t)=>{const n=q3(ny,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=zo(ny,e.__scopeDialog);return o.modal?u.jsx(Gn,{present:r||o.open,children:u.jsx(_pe,{...i,ref:t})}):null});K3.displayName=ny;var Spe=Jl("DialogOverlay.RemoveScroll"),_pe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=zo(ny,n);return u.jsx($b,{as:Spe,allowPinchZoom:!0,shards:[i.contentRef],children:u.jsx(Be.div,{"data-state":Xk(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ac="DialogContent",Z3=x.forwardRef((e,t)=>{const n=q3(ac,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=zo(ac,e.__scopeDialog);return u.jsx(Gn,{present:r||o.open,children:o.modal?u.jsx(Cpe,{...i,ref:t}):u.jsx(Epe,{...i,ref:t})})});Z3.displayName=ac;var Cpe=x.forwardRef((e,t)=>{const n=zo(ac,e.__scopeDialog),r=x.useRef(null),i=ct(t,n.contentRef,r);return x.useEffect(()=>{const o=r.current;if(o)return Zk(o)},[]),u.jsx(Y3,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Re(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Re(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&o.preventDefault()}),onFocusOutside:Re(e.onFocusOutside,o=>o.preventDefault())})}),Epe=x.forwardRef((e,t)=>{const n=zo(ac,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return u.jsx(Y3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;n.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Y3=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,c=zo(ac,n),d=x.useRef(null),f=ct(t,d);return Kk(),u.jsxs(u.Fragment,{children:[u.jsx(Ab,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:u.jsx(Nd,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Xk(c.open),...s,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(kpe,{titleId:c.titleId}),u.jsx(jpe,{contentRef:d,descriptionId:c.descriptionId})]})]})}),Wk="DialogTitle",W3=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=zo(Wk,n);return u.jsx(Be.h2,{id:i.titleId,...r,ref:t})});W3.displayName=Wk;var X3="DialogDescription",Q3=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=zo(X3,n);return u.jsx(Be.p,{id:i.descriptionId,...r,ref:t})});Q3.displayName=X3;var J3="DialogClose",eV=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=zo(J3,n);return u.jsx(Be.button,{type:"button",...r,ref:t,onClick:Re(e.onClick,()=>i.onOpenChange(!1))})});eV.displayName=J3;function Xk(e){return e?"open":"closed"}var tV="DialogTitleWarning",[WTe,nV]=CQ(tV,{contentName:ac,titleName:Wk,docsSlug:"dialog"}),kpe=({titleId:e})=>{const t=nV(tV),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
484
|
-
|
|
485
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
486
|
-
|
|
487
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Rpe="DialogDescriptionWarning",jpe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nV(Rpe).contentName}}.`;return x.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ipe=V3,Tpe=H3,Npe=G3,Ape=K3,Ope=Z3,$pe=W3,Dpe=Q3,Ppe=eV;function cr({...e}){return u.jsx(Ipe,{"data-slot":"dialog",...e})}function rV({...e}){return u.jsx(Tpe,{"data-slot":"dialog-trigger",...e})}function Mpe({...e}){return u.jsx(Npe,{"data-slot":"dialog-portal",...e})}function zpe({className:e,...t}){return u.jsx(Ape,{"data-slot":"dialog-overlay",className:Le("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-dark/90",e),...t})}function ur({className:e,children:t,...n}){return u.jsxs(Mpe,{"data-slot":"dialog-portal",children:[u.jsx(zpe,{}),u.jsxs(Ope,{"data-slot":"dialog-content",className:Le("bg-black 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-md p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,u.jsxs(Ppe,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[u.jsx(p2,{className:"text-white"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Br({className:e,...t}){return u.jsx("div",{"data-slot":"dialog-header",className:Le("flex flex-col gap-2 text-center sm:text-left",e),...t})}function er({className:e,...t}){return u.jsx("div",{"data-slot":"dialog-footer",className:Le("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function tr({className:e,...t}){return u.jsx($pe,{"data-slot":"dialog-title",className:Le("text-lg leading-none text-white font-semibold",e),...t})}function mi({className:e,...t}){return u.jsx(Dpe,{"data-slot":"dialog-description",className:Le("text-muted-foreground text-sm",e),...t})}function Pb({typeOfThingBeingDeleted:e,nameOfThingBeingDeleted:t,isModalOpen:n,hideDataLossWarning:r,setIsModalOpen:i,deletionConfirmed:o,deletionPending:s,trigger:c,presentParticiple:d="Deleting",transitiveVerb:f="Delete"}){return u.jsxs(cr,{open:n,onOpenChange:i,children:[c&&u.jsx(rV,{asChild:!0,children:c}),u.jsxs(ur,{className:"sm:max-w-[750px]",children:[u.jsxs(Br,{children:[u.jsxs(tr,{children:["Are you sure you want to ",f.toLowerCase()," this ",e,"?"]}),u.jsx(mi,{children:"This action cannot be undone."})]}),!r&&u.jsxs("div",{className:"p-3 my-5 text-white rounded-md bg-amber-600",children:[u.jsxs("p",{className:"flex space-x-1 font-semibold align-baseline",children:[u.jsx(HX,{className:"inline-block size-5"})," ",u.jsx("span",{children:"Warning"})]}),u.jsxs("p",{className:"pt-2 text-base",children:["By ",d.toLowerCase()," ",e,u.jsxs("span",{className:"font-semibold",children:[" ",t," "]}),"you will lose the data stored in it permanently."]})]}),u.jsx(er,{children:u.jsxs("div",{className:"flex justify-center space-x-5",children:[u.jsxs(Ce,{className:"rounded-full",onClick:()=>i(!1),children:[u.jsx(tc,{})," Cancel"]}),u.jsxs(Ce,{variant:"destructive",className:"rounded-full",onClick:o,disabled:s,children:[u.jsx(Ja,{})," ",f]})]})})]})]})}function ra({className:e,variant:t,asChild:n=!1,...r}){const i=n?y1:"span";return u.jsx(i,{"data-slot":"badge",className:Le(M2({variant:t}),e),...r})}const Lpe=["top","right","bottom","left"],Ws=Math.min,Ei=Math.max,ry=Math.round,Lg=Math.floor,ea=e=>({x:e,y:e}),Upe={left:"right",right:"left",bottom:"top",top:"bottom"},Fpe={start:"end",end:"start"};function mC(e,t,n){return Ei(e,Ws(t,n))}function Za(e,t){return typeof e=="function"?e(t):e}function Ya(e){return e.split("-")[0]}function Hd(e){return e.split("-")[1]}function Qk(e){return e==="x"?"y":"x"}function Jk(e){return e==="y"?"height":"width"}const Vpe=new Set(["top","bottom"]);function Wo(e){return Vpe.has(Ya(e))?"y":"x"}function eR(e){return Qk(Wo(e))}function Bpe(e,t,n){n===void 0&&(n=!1);const r=Hd(e),i=eR(e),o=Jk(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=iy(s)),[s,iy(s)]}function Hpe(e){const t=iy(e);return[pC(e),t,pC(t)]}function pC(e){return e.replace(/start|end/g,t=>Fpe[t])}const U$=["left","right"],F$=["right","left"],qpe=["top","bottom"],Gpe=["bottom","top"];function Kpe(e,t,n){switch(e){case"top":case"bottom":return n?t?F$:U$:t?U$:F$;case"left":case"right":return t?qpe:Gpe;default:return[]}}function Zpe(e,t,n,r){const i=Hd(e);let o=Kpe(Ya(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(pC)))),o}function iy(e){return e.replace(/left|right|bottom|top/g,t=>Upe[t])}function Ype(e){return{top:0,right:0,bottom:0,left:0,...e}}function iV(e){return typeof e!="number"?Ype(e):{top:e,right:e,bottom:e,left:e}}function oy(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function V$(e,t,n){let{reference:r,floating:i}=e;const o=Wo(t),s=eR(t),c=Jk(s),d=Ya(t),f=o==="y",p=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,v=r[c]/2-i[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-i.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:h};break;case"left":y={x:r.x-i.width,y:h};break;default:y={x:r.x,y:r.y}}switch(Hd(t)){case"start":y[s]-=v*(n&&f?-1:1);break;case"end":y[s]+=v*(n&&f?-1:1);break}return y}const Wpe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,c=o.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:h}=V$(f,r,d),v=r,y={},b=0;for(let S=0;S<c.length;S++){const{name:C,fn:E}=c[S],{x:k,y:R,data:I,reset:A}=await E({x:p,y:h,initialPlacement:r,placement:v,strategy:i,middlewareData:y,rects:f,platform:s,elements:{reference:e,floating:t}});p=k??p,h=R??h,y={...y,[C]:{...y[C],...I}},A&&b<=50&&(b++,typeof A=="object"&&(A.placement&&(v=A.placement),A.rects&&(f=A.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:p,y:h}=V$(f,v,d)),S=-1)}return{x:p,y:h,placement:v,strategy:i,middlewareData:y}};async function Qm(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:v=!1,padding:y=0}=Za(t,e),b=iV(y),C=c[v?h==="floating"?"reference":"floating":h],E=oy(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),k=h==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),I=await(o.isElement==null?void 0:o.isElement(R))?await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1}:{x:1,y:1},A=oy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:R,strategy:d}):k);return{top:(E.top-A.top+b.top)/I.y,bottom:(A.bottom-E.bottom+b.bottom)/I.y,left:(E.left-A.left+b.left)/I.x,right:(A.right-E.right+b.right)/I.x}}const Xpe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:c,middlewareData:d}=t,{element:f,padding:p=0}=Za(e,t)||{};if(f==null)return{};const h=iV(p),v={x:n,y:r},y=eR(i),b=Jk(y),S=await s.getDimensions(f),C=y==="y",E=C?"top":"left",k=C?"bottom":"right",R=C?"clientHeight":"clientWidth",I=o.reference[b]+o.reference[y]-v[y]-o.floating[b],A=v[y]-o.reference[y],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let N=T?T[R]:0;(!N||!await(s.isElement==null?void 0:s.isElement(T)))&&(N=c.floating[R]||o.floating[b]);const z=I/2-A/2,L=N/2-S[b]/2-1,K=Ws(h[E],L),ee=Ws(h[k],L),Z=K,Y=N-S[b]-ee,B=N/2-S[b]/2+z,W=mC(Z,B,Y),P=!d.arrow&&Hd(i)!=null&&B!==W&&o.reference[b]/2-(B<Z?K:ee)-S[b]/2<0,G=P?B<Z?B-Z:B-Y:0;return{[y]:v[y]+G,data:{[y]:W,centerOffset:B-W-G,...P&&{alignmentOffset:G}},reset:P}}}),Qpe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:S=!0,...C}=Za(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const E=Ya(i),k=Wo(c),R=Ya(c)===c,I=await(d.isRTL==null?void 0:d.isRTL(f.floating)),A=v||(R||!S?[iy(c)]:Hpe(c)),T=b!=="none";!v&&T&&A.push(...Zpe(c,S,b,I));const N=[c,...A],z=await Qm(t,C),L=[];let K=((r=o.flip)==null?void 0:r.overflows)||[];if(p&&L.push(z[E]),h){const B=Bpe(i,s,I);L.push(z[B[0]],z[B[1]])}if(K=[...K,{placement:i,overflows:L}],!L.every(B=>B<=0)){var ee,Z;const B=(((ee=o.flip)==null?void 0:ee.index)||0)+1,W=N[B];if(W&&(!(h==="alignment"?k!==Wo(W):!1)||K.every(U=>Wo(U.placement)===k?U.overflows[0]>0:!0)))return{data:{index:B,overflows:K},reset:{placement:W}};let P=(Z=K.filter(G=>G.overflows[0]<=0).sort((G,U)=>G.overflows[1]-U.overflows[1])[0])==null?void 0:Z.placement;if(!P)switch(y){case"bestFit":{var Y;const G=(Y=K.filter(U=>{if(T){const te=Wo(U.placement);return te===k||te==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(te=>te>0).reduce((te,$)=>te+$,0)]).sort((U,te)=>U[1]-te[1])[0])==null?void 0:Y[0];G&&(P=G);break}case"initialPlacement":P=c;break}if(i!==P)return{reset:{placement:P}}}return{}}}};function B$(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function H$(e){return Lpe.some(t=>e[t]>=0)}const Jpe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Za(e,t);switch(r){case"referenceHidden":{const o=await Qm(t,{...i,elementContext:"reference"}),s=B$(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:H$(s)}}}case"escaped":{const o=await Qm(t,{...i,altBoundary:!0}),s=B$(o,n.floating);return{data:{escapedOffsets:s,escaped:H$(s)}}}default:return{}}}}},oV=new Set(["left","top"]);async function ehe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Ya(n),c=Hd(n),d=Wo(n)==="y",f=oV.has(s)?-1:1,p=o&&d?-1:1,h=Za(t,e);let{mainAxis:v,crossAxis:y,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof b=="number"&&(y=c==="end"?b*-1:b),d?{x:y*p,y:v*f}:{x:v*f,y:y*p}}const the=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:c}=t,d=await ehe(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:o+d.y,data:{...d,placement:s}}}}},nhe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:C=>{let{x:E,y:k}=C;return{x:E,y:k}}},...d}=Za(e,t),f={x:n,y:r},p=await Qm(t,d),h=Wo(Ya(i)),v=Qk(h);let y=f[v],b=f[h];if(o){const C=v==="y"?"top":"left",E=v==="y"?"bottom":"right",k=y+p[C],R=y-p[E];y=mC(k,y,R)}if(s){const C=h==="y"?"top":"left",E=h==="y"?"bottom":"right",k=b+p[C],R=b-p[E];b=mC(k,b,R)}const S=c.fn({...t,[v]:y,[h]:b});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[v]:o,[h]:s}}}}}},rhe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=Za(e,t),p={x:n,y:r},h=Wo(i),v=Qk(h);let y=p[v],b=p[h];const S=Za(c,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const R=v==="y"?"height":"width",I=o.reference[v]-o.floating[R]+C.mainAxis,A=o.reference[v]+o.reference[R]-C.mainAxis;y<I?y=I:y>A&&(y=A)}if(f){var E,k;const R=v==="y"?"width":"height",I=oV.has(Ya(i)),A=o.reference[h]-o.floating[R]+(I&&((E=s.offset)==null?void 0:E[h])||0)+(I?0:C.crossAxis),T=o.reference[h]+o.reference[R]+(I?0:((k=s.offset)==null?void 0:k[h])||0)-(I?C.crossAxis:0);b<A?b=A:b>T&&(b=T)}return{[v]:y,[h]:b}}}},ihe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:c}=t,{apply:d=()=>{},...f}=Za(e,t),p=await Qm(t,f),h=Ya(i),v=Hd(i),y=Wo(i)==="y",{width:b,height:S}=o.floating;let C,E;h==="top"||h==="bottom"?(C=h,E=v===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(E=h,C=v==="end"?"top":"bottom");const k=S-p.top-p.bottom,R=b-p.left-p.right,I=Ws(S-p[C],k),A=Ws(b-p[E],R),T=!t.middlewareData.shift;let N=I,z=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(z=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=k),T&&!v){const K=Ei(p.left,0),ee=Ei(p.right,0),Z=Ei(p.top,0),Y=Ei(p.bottom,0);y?z=b-2*(K!==0||ee!==0?K+ee:Ei(p.left,p.right)):N=S-2*(Z!==0||Y!==0?Z+Y:Ei(p.top,p.bottom))}await d({...t,availableWidth:z,availableHeight:N});const L=await s.getDimensions(c.floating);return b!==L.width||S!==L.height?{reset:{rects:!0}}:{}}}};function Mb(){return typeof window<"u"}function qd(e){return aV(e)?(e.nodeName||"").toLowerCase():"#document"}function Ti(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ca(e){var t;return(t=(aV(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function aV(e){return Mb()?e instanceof Node||e instanceof Ti(e).Node:!1}function Oo(e){return Mb()?e instanceof Element||e instanceof Ti(e).Element:!1}function ia(e){return Mb()?e instanceof HTMLElement||e instanceof Ti(e).HTMLElement:!1}function q$(e){return!Mb()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ti(e).ShadowRoot}const ohe=new Set(["inline","contents"]);function Up(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=$o(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ohe.has(i)}const ahe=new Set(["table","td","th"]);function she(e){return ahe.has(qd(e))}const lhe=[":popover-open",":modal"];function zb(e){return lhe.some(t=>{try{return e.matches(t)}catch{return!1}})}const che=["transform","translate","scale","rotate","perspective"],uhe=["transform","translate","scale","rotate","perspective","filter"],dhe=["paint","layout","strict","content"];function tR(e){const t=nR(),n=Oo(e)?$o(e):e;return che.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||uhe.some(r=>(n.willChange||"").includes(r))||dhe.some(r=>(n.contain||"").includes(r))}function fhe(e){let t=Xs(e);for(;ia(t)&&!yd(t);){if(tR(t))return t;if(zb(t))return null;t=Xs(t)}return null}function nR(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const mhe=new Set(["html","body","#document"]);function yd(e){return mhe.has(qd(e))}function $o(e){return Ti(e).getComputedStyle(e)}function Lb(e){return Oo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xs(e){if(qd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||q$(e)&&e.host||ca(e);return q$(t)?t.host:t}function sV(e){const t=Xs(e);return yd(t)?e.ownerDocument?e.ownerDocument.body:e.body:ia(t)&&Up(t)?t:sV(t)}function Jm(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=sV(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=Ti(i);if(o){const c=hC(s);return t.concat(s,s.visualViewport||[],Up(i)?i:[],c&&n?Jm(c):[])}return t.concat(i,Jm(i,[],n))}function hC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lV(e){const t=$o(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ia(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,c=ry(n)!==o||ry(r)!==s;return c&&(n=o,r=s),{width:n,height:r,$:c}}function rR(e){return Oo(e)?e:e.contextElement}function Zu(e){const t=rR(e);if(!ia(t))return ea(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=lV(t);let s=(o?ry(n.width):n.width)/r,c=(o?ry(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const phe=ea(0);function cV(e){const t=Ti(e);return!nR()||!t.visualViewport?phe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hhe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ti(e)?!1:t}function sc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=rR(e);let s=ea(1);t&&(r?Oo(r)&&(s=Zu(r)):s=Zu(e));const c=hhe(o,n,r)?cV(o):ea(0);let d=(i.left+c.x)/s.x,f=(i.top+c.y)/s.y,p=i.width/s.x,h=i.height/s.y;if(o){const v=Ti(o),y=r&&Oo(r)?Ti(r):r;let b=v,S=hC(b);for(;S&&r&&y!==b;){const C=Zu(S),E=S.getBoundingClientRect(),k=$o(S),R=E.left+(S.clientLeft+parseFloat(k.paddingLeft))*C.x,I=E.top+(S.clientTop+parseFloat(k.paddingTop))*C.y;d*=C.x,f*=C.y,p*=C.x,h*=C.y,d+=R,f+=I,b=Ti(S),S=hC(b)}}return oy({width:p,height:h,x:d,y:f})}function Ub(e,t){const n=Lb(e).scrollLeft;return t?t.left+n:sc(ca(e)).left+n}function uV(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ub(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function ghe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=ca(r),c=t?zb(t.floating):!1;if(r===s||c&&o)return n;let d={scrollLeft:0,scrollTop:0},f=ea(1);const p=ea(0),h=ia(r);if((h||!h&&!o)&&((qd(r)!=="body"||Up(s))&&(d=Lb(r)),ia(r))){const y=sc(r);f=Zu(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const v=s&&!h&&!o?uV(s,d):ea(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+v.x,y:n.y*f.y-d.scrollTop*f.y+p.y+v.y}}function vhe(e){return Array.from(e.getClientRects())}function yhe(e){const t=ca(e),n=Lb(e),r=e.ownerDocument.body,i=Ei(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ei(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ub(e);const c=-n.scrollTop;return $o(r).direction==="rtl"&&(s+=Ei(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:c}}const G$=25;function bhe(e,t){const n=Ti(e),r=ca(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,c=0,d=0;if(i){o=i.width,s=i.height;const p=nR();(!p||p&&t==="fixed")&&(c=i.offsetLeft,d=i.offsetTop)}const f=Ub(r);if(f<=0){const p=r.ownerDocument,h=p.body,v=getComputedStyle(h),y=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,b=Math.abs(r.clientWidth-h.clientWidth-y);b<=G$&&(o-=b)}else f<=G$&&(o+=f);return{width:o,height:s,x:c,y:d}}const xhe=new Set(["absolute","fixed"]);function whe(e,t){const n=sc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=ia(e)?Zu(e):ea(1),s=e.clientWidth*o.x,c=e.clientHeight*o.y,d=i*o.x,f=r*o.y;return{width:s,height:c,x:d,y:f}}function K$(e,t,n){let r;if(t==="viewport")r=bhe(e,n);else if(t==="document")r=yhe(ca(e));else if(Oo(t))r=whe(t,n);else{const i=cV(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return oy(r)}function dV(e,t){const n=Xs(e);return n===t||!Oo(n)||yd(n)?!1:$o(n).position==="fixed"||dV(n,t)}function She(e,t){const n=t.get(e);if(n)return n;let r=Jm(e,[],!1).filter(c=>Oo(c)&&qd(c)!=="body"),i=null;const o=$o(e).position==="fixed";let s=o?Xs(e):e;for(;Oo(s)&&!yd(s);){const c=$o(s),d=tR(s);!d&&c.position==="fixed"&&(i=null),(o?!d&&!i:!d&&c.position==="static"&&!!i&&xhe.has(i.position)||Up(s)&&!d&&dV(e,s))?r=r.filter(p=>p!==s):i=c,s=Xs(s)}return t.set(e,r),r}function _he(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?zb(t)?[]:She(t,this._c):[].concat(n),r],c=s[0],d=s.reduce((f,p)=>{const h=K$(t,p,i);return f.top=Ei(h.top,f.top),f.right=Ws(h.right,f.right),f.bottom=Ws(h.bottom,f.bottom),f.left=Ei(h.left,f.left),f},K$(t,c,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Che(e){const{width:t,height:n}=lV(e);return{width:t,height:n}}function Ehe(e,t,n){const r=ia(t),i=ca(t),o=n==="fixed",s=sc(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=ea(0);function f(){d.x=Ub(i)}if(r||!r&&!o)if((qd(t)!=="body"||Up(i))&&(c=Lb(t)),r){const y=sc(t,!0,o,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else i&&f();o&&!r&&i&&f();const p=i&&!r&&!o?uV(i,c):ea(0),h=s.left+c.scrollLeft-d.x-p.x,v=s.top+c.scrollTop-d.y-p.y;return{x:h,y:v,width:s.width,height:s.height}}function TS(e){return $o(e).position==="static"}function Z$(e,t){if(!ia(e)||$o(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ca(e)===n&&(n=n.ownerDocument.body),n}function fV(e,t){const n=Ti(e);if(zb(e))return n;if(!ia(e)){let i=Xs(e);for(;i&&!yd(i);){if(Oo(i)&&!TS(i))return i;i=Xs(i)}return n}let r=Z$(e,t);for(;r&&she(r)&&TS(r);)r=Z$(r,t);return r&&yd(r)&&TS(r)&&!tR(r)?n:r||fhe(e)||n}const khe=async function(e){const t=this.getOffsetParent||fV,n=this.getDimensions,r=await n(e.floating);return{reference:Ehe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Rhe(e){return $o(e).direction==="rtl"}const jhe={convertOffsetParentRelativeRectToViewportRelativeRect:ghe,getDocumentElement:ca,getClippingRect:_he,getOffsetParent:fV,getElementRects:khe,getClientRects:vhe,getDimensions:Che,getScale:Zu,isElement:Oo,isRTL:Rhe};function mV(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ihe(e,t){let n=null,r;const i=ca(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function s(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),o();const f=e.getBoundingClientRect(),{left:p,top:h,width:v,height:y}=f;if(c||t(),!v||!y)return;const b=Lg(h),S=Lg(i.clientWidth-(p+v)),C=Lg(i.clientHeight-(h+y)),E=Lg(p),R={rootMargin:-b+"px "+-S+"px "+-C+"px "+-E+"px",threshold:Ei(0,Ws(1,d))||1};let I=!0;function A(T){const N=T[0].intersectionRatio;if(N!==d){if(!I)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!mV(f,e.getBoundingClientRect())&&s(),I=!1}try{n=new IntersectionObserver(A,{...R,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,R)}n.observe(e)}return s(!0),o}function The(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=rR(e),p=i||o?[...f?Jm(f):[],...Jm(t)]:[];p.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const h=f&&c?Ihe(f,n):null;let v=-1,y=null;s&&(y=new ResizeObserver(E=>{let[k]=E;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let b,S=d?sc(e):null;d&&C();function C(){const E=sc(e);S&&!mV(S,E)&&n(),S=E,b=requestAnimationFrame(C)}return n(),()=>{var E;p.forEach(k=>{i&&k.removeEventListener("scroll",n),o&&k.removeEventListener("resize",n)}),h?.(),(E=y)==null||E.disconnect(),y=null,d&&cancelAnimationFrame(b)}}const Nhe=the,Ahe=nhe,Ohe=Qpe,$he=ihe,Dhe=Jpe,Y$=Xpe,Phe=rhe,Mhe=(e,t,n)=>{const r=new Map,i={platform:jhe,...n},o={...i.platform,_c:r};return Wpe(e,t,{...i,platform:o})};var zhe=typeof document<"u",Lhe=function(){},bv=zhe?x.useLayoutEffect:Lhe;function ay(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ay(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ay(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function pV(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function W$(e,t){const n=pV(e);return Math.round(t*n)/n}function NS(e){const t=x.useRef(e);return bv(()=>{t.current=e}),t}function Uhe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:c=!0,whileElementsMounted:d,open:f}=e,[p,h]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,y]=x.useState(r);ay(v,r)||y(r);const[b,S]=x.useState(null),[C,E]=x.useState(null),k=x.useCallback(U=>{U!==T.current&&(T.current=U,S(U))},[]),R=x.useCallback(U=>{U!==N.current&&(N.current=U,E(U))},[]),I=o||b,A=s||C,T=x.useRef(null),N=x.useRef(null),z=x.useRef(p),L=d!=null,K=NS(d),ee=NS(i),Z=NS(f),Y=x.useCallback(()=>{if(!T.current||!N.current)return;const U={placement:t,strategy:n,middleware:v};ee.current&&(U.platform=ee.current),Mhe(T.current,N.current,U).then(te=>{const $={...te,isPositioned:Z.current!==!1};B.current&&!ay(z.current,$)&&(z.current=$,Rd.flushSync(()=>{h($)}))})},[v,t,n,ee,Z]);bv(()=>{f===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,h(U=>({...U,isPositioned:!1})))},[f]);const B=x.useRef(!1);bv(()=>(B.current=!0,()=>{B.current=!1}),[]),bv(()=>{if(I&&(T.current=I),A&&(N.current=A),I&&A){if(K.current)return K.current(I,A,Y);Y()}},[I,A,Y,K,L]);const W=x.useMemo(()=>({reference:T,floating:N,setReference:k,setFloating:R}),[k,R]),P=x.useMemo(()=>({reference:I,floating:A}),[I,A]),G=x.useMemo(()=>{const U={position:n,left:0,top:0};if(!P.floating)return U;const te=W$(P.floating,p.x),$=W$(P.floating,p.y);return c?{...U,transform:"translate("+te+"px, "+$+"px)",...pV(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:$}},[n,c,P.floating,p.x,p.y]);return x.useMemo(()=>({...p,update:Y,refs:W,elements:P,floatingStyles:G}),[p,Y,W,P,G])}const Fhe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Y$({element:r.current,padding:i}).fn(n):{}:r?Y$({element:r,padding:i}).fn(n):{}}}},Vhe=(e,t)=>({...Nhe(e),options:[e,t]}),Bhe=(e,t)=>({...Ahe(e),options:[e,t]}),Hhe=(e,t)=>({...Phe(e),options:[e,t]}),qhe=(e,t)=>({...Ohe(e),options:[e,t]}),Ghe=(e,t)=>({...$he(e),options:[e,t]}),Khe=(e,t)=>({...Dhe(e),options:[e,t]}),Zhe=(e,t)=>({...Fhe(e),options:[e,t]});var Yhe="Arrow",hV=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return u.jsx(Be.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});hV.displayName=Yhe;var Whe=hV;function gV(e){const[t,n]=x.useState(void 0);return qn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,c;if("borderBoxSize"in o){const d=o.borderBoxSize,f=Array.isArray(d)?d[0]:d;s=f.inlineSize,c=f.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var iR="Popper",[vV,Gd]=Di(iR),[Xhe,yV]=vV(iR),bV=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return u.jsx(Xhe,{scope:t,anchor:r,onAnchorChange:i,children:n})};bV.displayName=iR;var xV="PopperAnchor",wV=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=yV(xV,n),s=x.useRef(null),c=ct(t,s),d=x.useRef(null);return x.useEffect(()=>{const f=d.current;d.current=r?.current||s.current,f!==d.current&&o.onAnchorChange(d.current)}),r?null:u.jsx(Be.div,{...i,ref:c})});wV.displayName=xV;var oR="PopperContent",[Qhe,Jhe]=vV(oR),SV=x.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:b,...S}=e,C=yV(oR,n),[E,k]=x.useState(null),R=ct(t,V=>k(V)),[I,A]=x.useState(null),T=gV(I),N=T?.width??0,z=T?.height??0,L=r+(o!=="center"?"-"+o:""),K=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},ee=Array.isArray(f)?f:[f],Z=ee.length>0,Y={padding:K,boundary:ee.filter(tge),altBoundary:Z},{refs:B,floatingStyles:W,placement:P,isPositioned:G,middlewareData:U}=Uhe({strategy:"fixed",placement:L,whileElementsMounted:(...V)=>The(...V,{animationFrame:y==="always"}),elements:{reference:C.anchor},middleware:[Vhe({mainAxis:i+z,alignmentAxis:s}),d&&Bhe({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Hhe():void 0,...Y}),d&&qhe({...Y}),Ghe({...Y,apply:({elements:V,rects:ie,availableWidth:_e,availableHeight:Ie})=>{const{width:He,height:Ae}=ie.reference,Ye=V.floating.style;Ye.setProperty("--radix-popper-available-width",`${_e}px`),Ye.setProperty("--radix-popper-available-height",`${Ie}px`),Ye.setProperty("--radix-popper-anchor-width",`${He}px`),Ye.setProperty("--radix-popper-anchor-height",`${Ae}px`)}}),I&&Zhe({element:I,padding:c}),nge({arrowWidth:N,arrowHeight:z}),v&&Khe({strategy:"referenceHidden",...Y})]}),[te,$]=EV(P),M=fn(b);qn(()=>{G&&M?.()},[G,M]);const F=U.arrow?.x,O=U.arrow?.y,J=U.arrow?.centerOffset!==0,[de,pe]=x.useState();return qn(()=>{E&&pe(window.getComputedStyle(E).zIndex)},[E]),u.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:G?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[U.transformOrigin?.x,U.transformOrigin?.y].join(" "),...U.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Qhe,{scope:n,placedSide:te,onArrowChange:A,arrowX:F,arrowY:O,shouldHideArrow:J,children:u.jsx(Be.div,{"data-side":te,"data-align":$,...S,ref:R,style:{...S.style,animation:G?void 0:"none"}})})})});SV.displayName=oR;var _V="PopperArrow",ege={top:"bottom",right:"left",bottom:"top",left:"right"},CV=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Jhe(_V,r),s=ege[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(Whe,{...i,ref:n,style:{...i.style,display:"block"}})})});CV.displayName=_V;function tge(e){return e!==null}var nge=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,c=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[f,p]=EV(n),h={start:"0%",center:"50%",end:"100%"}[p],v=(i.arrow?.x??0)+c/2,y=(i.arrow?.y??0)+d/2;let b="",S="";return f==="bottom"?(b=s?h:`${v}px`,S=`${-d}px`):f==="top"?(b=s?h:`${v}px`,S=`${r.floating.height+d}px`):f==="right"?(b=`${-d}px`,S=s?h:`${y}px`):f==="left"&&(b=`${r.floating.width+d}px`,S=s?h:`${y}px`),{data:{x:b,y:S}}}});function EV(e){const[t,n="center"]=e.split("-");return[t,n]}var aR=bV,sR=wV,lR=SV,cR=CV,AS="rovingFocusGroup.onEntryFocus",rge={bubbles:!1,cancelable:!0},Fp="RovingFocusGroup",[gC,kV,ige]=gp(Fp),[oge,Kd]=Di(Fp,[ige]),[age,sge]=oge(Fp),RV=x.forwardRef((e,t)=>u.jsx(gC.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(gC.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(lge,{...e,ref:t})})}));RV.displayName=Fp;var lge=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...h}=e,v=x.useRef(null),y=ct(t,v),b=hc(o),[S,C]=No({prop:s,defaultProp:c??null,onChange:d,caller:Fp}),[E,k]=x.useState(!1),R=fn(f),I=kV(n),A=x.useRef(!1),[T,N]=x.useState(0);return x.useEffect(()=>{const z=v.current;if(z)return z.addEventListener(AS,R),()=>z.removeEventListener(AS,R)},[R]),u.jsx(age,{scope:n,orientation:r,dir:b,loop:i,currentTabStopId:S,onItemFocus:x.useCallback(z=>C(z),[C]),onItemShiftTab:x.useCallback(()=>k(!0),[]),onFocusableItemAdd:x.useCallback(()=>N(z=>z+1),[]),onFocusableItemRemove:x.useCallback(()=>N(z=>z-1),[]),children:u.jsx(Be.div,{tabIndex:E||T===0?-1:0,"data-orientation":r,...h,ref:y,style:{outline:"none",...e.style},onMouseDown:Re(e.onMouseDown,()=>{A.current=!0}),onFocus:Re(e.onFocus,z=>{const L=!A.current;if(z.target===z.currentTarget&&L&&!E){const K=new CustomEvent(AS,rge);if(z.currentTarget.dispatchEvent(K),!K.defaultPrevented){const ee=I().filter(P=>P.focusable),Z=ee.find(P=>P.active),Y=ee.find(P=>P.id===S),W=[Z,Y,...ee].filter(Boolean).map(P=>P.ref.current);TV(W,p)}}A.current=!1}),onBlur:Re(e.onBlur,()=>k(!1))})})}),jV="RovingFocusGroupItem",IV=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:s,...c}=e,d=Ii(),f=o||d,p=sge(jV,n),h=p.currentTabStopId===f,v=kV(n),{onFocusableItemAdd:y,onFocusableItemRemove:b,currentTabStopId:S}=p;return x.useEffect(()=>{if(r)return y(),()=>b()},[r,y,b]),u.jsx(gC.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:u.jsx(Be.span,{tabIndex:h?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:Re(e.onMouseDown,C=>{r?p.onItemFocus(f):C.preventDefault()}),onFocus:Re(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:Re(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){p.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const E=dge(C,p.orientation,p.dir);if(E!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let R=v().filter(I=>I.focusable).map(I=>I.ref.current);if(E==="last")R.reverse();else if(E==="prev"||E==="next"){E==="prev"&&R.reverse();const I=R.indexOf(C.currentTarget);R=p.loop?fge(R,I+1):R.slice(I+1)}setTimeout(()=>TV(R))}}),children:typeof s=="function"?s({isCurrentTabStop:h,hasTabStop:S!=null}):s})})});IV.displayName=jV;var cge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uge(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dge(e,t,n){const r=uge(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return cge[r]}function TV(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function fge(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uR=RV,dR=IV,vC=["Enter"," "],mge=["ArrowDown","PageUp","Home"],NV=["ArrowUp","PageDown","End"],pge=[...mge,...NV],hge={ltr:[...vC,"ArrowRight"],rtl:[...vC,"ArrowLeft"]},gge={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Vp="Menu",[ep,vge,yge]=gp(Vp),[kc,AV]=Di(Vp,[yge,Gd,Kd]),Fb=Gd(),OV=Kd(),[bge,Rc]=kc(Vp),[xge,Bp]=kc(Vp),$V=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=e,c=Fb(t),[d,f]=x.useState(null),p=x.useRef(!1),h=fn(o),v=hc(i);return x.useEffect(()=>{const y=()=>{p.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>p.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),u.jsx(aR,{...c,children:u.jsx(bge,{scope:t,open:n,onOpenChange:h,content:d,onContentChange:f,children:u.jsx(xge,{scope:t,onClose:x.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:v,modal:s,children:r})})})};$V.displayName=Vp;var wge="MenuAnchor",fR=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Fb(n);return u.jsx(sR,{...i,...r,ref:t})});fR.displayName=wge;var mR="MenuPortal",[Sge,DV]=kc(mR,{forceMount:void 0}),PV=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=Rc(mR,t);return u.jsx(Sge,{scope:t,forceMount:n,children:u.jsx(Gn,{present:n||o.open,children:u.jsx(Lp,{asChild:!0,container:i,children:r})})})};PV.displayName=mR;var ao="MenuContent",[_ge,pR]=kc(ao),MV=x.forwardRef((e,t)=>{const n=DV(ao,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Rc(ao,e.__scopeMenu),s=Bp(ao,e.__scopeMenu);return u.jsx(ep.Provider,{scope:e.__scopeMenu,children:u.jsx(Gn,{present:r||o.open,children:u.jsx(ep.Slot,{scope:e.__scopeMenu,children:s.modal?u.jsx(Cge,{...i,ref:t}):u.jsx(Ege,{...i,ref:t})})})})}),Cge=x.forwardRef((e,t)=>{const n=Rc(ao,e.__scopeMenu),r=x.useRef(null),i=ct(t,r);return x.useEffect(()=>{const o=r.current;if(o)return Zk(o)},[]),u.jsx(hR,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Re(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ege=x.forwardRef((e,t)=>{const n=Rc(ao,e.__scopeMenu);return u.jsx(hR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),kge=Jl("MenuContent.ScrollLock"),hR=x.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:v,onDismiss:y,disableOutsideScroll:b,...S}=e,C=Rc(ao,n),E=Bp(ao,n),k=Fb(n),R=OV(n),I=vge(n),[A,T]=x.useState(null),N=x.useRef(null),z=ct(t,N,C.onContentChange),L=x.useRef(0),K=x.useRef(""),ee=x.useRef(0),Z=x.useRef(null),Y=x.useRef("right"),B=x.useRef(0),W=b?$b:x.Fragment,P=b?{as:kge,allowPinchZoom:!0}:void 0,G=te=>{const $=K.current+te,M=I().filter(V=>!V.disabled),F=document.activeElement,O=M.find(V=>V.ref.current===F)?.textValue,J=M.map(V=>V.textValue),de=zge(J,$,O),pe=M.find(V=>V.textValue===de)?.ref.current;(function V(ie){K.current=ie,window.clearTimeout(L.current),ie!==""&&(L.current=window.setTimeout(()=>V(""),1e3))})($),pe&&setTimeout(()=>pe.focus())};x.useEffect(()=>()=>window.clearTimeout(L.current),[]),Kk();const U=x.useCallback(te=>Y.current===Z.current?.side&&Uge(te,Z.current?.area),[]);return u.jsx(_ge,{scope:n,searchRef:K,onItemEnter:x.useCallback(te=>{U(te)&&te.preventDefault()},[U]),onItemLeave:x.useCallback(te=>{U(te)||(N.current?.focus(),T(null))},[U]),onTriggerLeave:x.useCallback(te=>{U(te)&&te.preventDefault()},[U]),pointerGraceTimerRef:ee,onPointerGraceIntentChange:x.useCallback(te=>{Z.current=te},[]),children:u.jsx(W,{...P,children:u.jsx(Ab,{asChild:!0,trapped:i,onMountAutoFocus:Re(o,te=>{te.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:u.jsx(Nd,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:v,onDismiss:y,children:u.jsx(uR,{asChild:!0,...R,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:A,onCurrentTabStopIdChange:T,onEntryFocus:Re(d,te=>{E.isUsingKeyboardRef.current||te.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(lR,{role:"menu","aria-orientation":"vertical","data-state":JV(C.open),"data-radix-menu-content":"",dir:E.dir,...k,...S,ref:z,style:{outline:"none",...S.style},onKeyDown:Re(S.onKeyDown,te=>{const M=te.target.closest("[data-radix-menu-content]")===te.currentTarget,F=te.ctrlKey||te.altKey||te.metaKey,O=te.key.length===1;M&&(te.key==="Tab"&&te.preventDefault(),!F&&O&&G(te.key));const J=N.current;if(te.target!==J||!pge.includes(te.key))return;te.preventDefault();const pe=I().filter(V=>!V.disabled).map(V=>V.ref.current);NV.includes(te.key)&&pe.reverse(),Pge(pe)}),onBlur:Re(e.onBlur,te=>{te.currentTarget.contains(te.target)||(window.clearTimeout(L.current),K.current="")}),onPointerMove:Re(e.onPointerMove,tp(te=>{const $=te.target,M=B.current!==te.clientX;if(te.currentTarget.contains($)&&M){const F=te.clientX>B.current?"right":"left";Y.current=F,B.current=te.clientX}}))})})})})})})});MV.displayName=ao;var Rge="MenuGroup",gR=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(Be.div,{role:"group",...r,ref:t})});gR.displayName=Rge;var jge="MenuLabel",zV=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(Be.div,{...r,ref:t})});zV.displayName=jge;var sy="MenuItem",X$="menu.itemSelect",Vb=x.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=x.useRef(null),s=Bp(sy,e.__scopeMenu),c=pR(sy,e.__scopeMenu),d=ct(t,o),f=x.useRef(!1),p=()=>{const h=o.current;if(!n&&h){const v=new CustomEvent(X$,{bubbles:!0,cancelable:!0});h.addEventListener(X$,y=>r?.(y),{once:!0}),Dv(h,v),v.defaultPrevented?f.current=!1:s.onClose()}};return u.jsx(LV,{...i,ref:d,disabled:n,onClick:Re(e.onClick,p),onPointerDown:h=>{e.onPointerDown?.(h),f.current=!0},onPointerUp:Re(e.onPointerUp,h=>{f.current||h.currentTarget?.click()}),onKeyDown:Re(e.onKeyDown,h=>{const v=c.searchRef.current!=="";n||v&&h.key===" "||vC.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Vb.displayName=sy;var LV=x.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,s=pR(sy,n),c=OV(n),d=x.useRef(null),f=ct(t,d),[p,h]=x.useState(!1),[v,y]=x.useState("");return x.useEffect(()=>{const b=d.current;b&&y((b.textContent??"").trim())},[o.children]),u.jsx(ep.ItemSlot,{scope:n,disabled:r,textValue:i??v,children:u.jsx(dR,{asChild:!0,...c,focusable:!r,children:u.jsx(Be.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:f,onPointerMove:Re(e.onPointerMove,tp(b=>{r?s.onItemLeave(b):(s.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Re(e.onPointerLeave,tp(b=>s.onItemLeave(b))),onFocus:Re(e.onFocus,()=>h(!0)),onBlur:Re(e.onBlur,()=>h(!1))})})})}),Ige="MenuCheckboxItem",UV=x.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return u.jsx(qV,{scope:e.__scopeMenu,checked:n,children:u.jsx(Vb,{role:"menuitemcheckbox","aria-checked":ly(n)?"mixed":n,...i,ref:t,"data-state":yR(n),onSelect:Re(i.onSelect,()=>r?.(ly(n)?!0:!n),{checkForDefaultPrevented:!1})})})});UV.displayName=Ige;var FV="MenuRadioGroup",[Tge,Nge]=kc(FV,{value:void 0,onValueChange:()=>{}}),VV=x.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=fn(r);return u.jsx(Tge,{scope:e.__scopeMenu,value:n,onValueChange:o,children:u.jsx(gR,{...i,ref:t})})});VV.displayName=FV;var BV="MenuRadioItem",HV=x.forwardRef((e,t)=>{const{value:n,...r}=e,i=Nge(BV,e.__scopeMenu),o=n===i.value;return u.jsx(qV,{scope:e.__scopeMenu,checked:o,children:u.jsx(Vb,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":yR(o),onSelect:Re(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});HV.displayName=BV;var vR="MenuItemIndicator",[qV,Age]=kc(vR,{checked:!1}),GV=x.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=Age(vR,n);return u.jsx(Gn,{present:r||ly(o.checked)||o.checked===!0,children:u.jsx(Be.span,{...i,ref:t,"data-state":yR(o.checked)})})});GV.displayName=vR;var Oge="MenuSeparator",KV=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(Be.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});KV.displayName=Oge;var $ge="MenuArrow",ZV=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Fb(n);return u.jsx(cR,{...i,...r,ref:t})});ZV.displayName=$ge;var Dge="MenuSub",[XTe,YV]=kc(Dge),xm="MenuSubTrigger",WV=x.forwardRef((e,t)=>{const n=Rc(xm,e.__scopeMenu),r=Bp(xm,e.__scopeMenu),i=YV(xm,e.__scopeMenu),o=pR(xm,e.__scopeMenu),s=x.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=o,f={__scopeMenu:e.__scopeMenu},p=x.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return x.useEffect(()=>p,[p]),x.useEffect(()=>{const h=c.current;return()=>{window.clearTimeout(h),d(null)}},[c,d]),u.jsx(fR,{asChild:!0,...f,children:u.jsx(LV,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":JV(n.open),...e,ref:hp(t,i.onTriggerChange),onClick:h=>{e.onClick?.(h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Re(e.onPointerMove,tp(h=>{o.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:Re(e.onPointerLeave,tp(h=>{p();const v=n.content?.getBoundingClientRect();if(v){const y=n.content?.dataset.side,b=y==="right",S=b?-5:5,C=v[b?"left":"right"],E=v[b?"right":"left"];o.onPointerGraceIntentChange({area:[{x:h.clientX+S,y:h.clientY},{x:C,y:v.top},{x:E,y:v.top},{x:E,y:v.bottom},{x:C,y:v.bottom}],side:y}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(h),h.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Re(e.onKeyDown,h=>{const v=o.searchRef.current!=="";e.disabled||v&&h.key===" "||hge[r.dir].includes(h.key)&&(n.onOpenChange(!0),n.content?.focus(),h.preventDefault())})})})});WV.displayName=xm;var XV="MenuSubContent",QV=x.forwardRef((e,t)=>{const n=DV(ao,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Rc(ao,e.__scopeMenu),s=Bp(ao,e.__scopeMenu),c=YV(XV,e.__scopeMenu),d=x.useRef(null),f=ct(t,d);return u.jsx(ep.Provider,{scope:e.__scopeMenu,children:u.jsx(Gn,{present:r||o.open,children:u.jsx(ep.Slot,{scope:e.__scopeMenu,children:u.jsx(hR,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:f,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{s.isUsingKeyboardRef.current&&d.current?.focus(),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Re(e.onFocusOutside,p=>{p.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Re(e.onEscapeKeyDown,p=>{s.onClose(),p.preventDefault()}),onKeyDown:Re(e.onKeyDown,p=>{const h=p.currentTarget.contains(p.target),v=gge[s.dir].includes(p.key);h&&v&&(o.onOpenChange(!1),c.trigger?.focus(),p.preventDefault())})})})})})});QV.displayName=XV;function JV(e){return e?"open":"closed"}function ly(e){return e==="indeterminate"}function yR(e){return ly(e)?"indeterminate":e?"checked":"unchecked"}function Pge(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Mge(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function zge(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=Mge(e,Math.max(o,0));i.length===1&&(s=s.filter(f=>f!==n));const d=s.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function Lge(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const c=t[o],d=t[s],f=c.x,p=c.y,h=d.x,v=d.y;p>r!=v>r&&n<(h-f)*(r-p)/(v-p)+f&&(i=!i)}return i}function Uge(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Lge(n,t)}function tp(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Fge=$V,Vge=fR,Bge=PV,Hge=MV,qge=gR,Gge=zV,Kge=Vb,Zge=UV,Yge=VV,Wge=HV,Xge=GV,Qge=KV,Jge=ZV,eve=WV,tve=QV,Bb="DropdownMenu",[nve]=Di(Bb,[AV]),Hr=AV(),[rve,e5]=nve(Bb),t5=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,d=Hr(t),f=x.useRef(null),[p,h]=No({prop:i,defaultProp:o??!1,onChange:s,caller:Bb});return u.jsx(rve,{scope:t,triggerId:Ii(),triggerRef:f,contentId:Ii(),open:p,onOpenChange:h,onOpenToggle:x.useCallback(()=>h(v=>!v),[h]),modal:c,children:u.jsx(Fge,{...d,open:p,onOpenChange:h,dir:r,modal:c,children:n})})};t5.displayName=Bb;var n5="DropdownMenuTrigger",r5=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=e5(n5,n),s=Hr(n);return u.jsx(Vge,{asChild:!0,...s,children:u.jsx(Be.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:hp(t,o.triggerRef),onPointerDown:Re(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:Re(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});r5.displayName=n5;var ive="DropdownMenuPortal",i5=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Hr(t);return u.jsx(Bge,{...r,...n})};i5.displayName=ive;var o5="DropdownMenuContent",a5=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=e5(o5,n),o=Hr(n),s=x.useRef(!1);return u.jsx(Hge,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Re(e.onCloseAutoFocus,c=>{s.current||i.triggerRef.current?.focus(),s.current=!1,c.preventDefault()}),onInteractOutside:Re(e.onInteractOutside,c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,p=d.button===2||f;(!i.modal||p)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});a5.displayName=o5;var ove="DropdownMenuGroup",ave=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Hr(n);return u.jsx(qge,{...i,...r,ref:t})});ave.displayName=ove;var sve="DropdownMenuLabel",s5=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Hr(n);return u.jsx(Gge,{...i,...r,ref:t})});s5.displayName=sve;var lve="DropdownMenuItem",l5=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Hr(n);return u.jsx(Kge,{...i,...r,ref:t})});l5.displayName=lve;var cve="DropdownMenuCheckboxItem",c5=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Hr(n);return u.jsx(Zge,{...i,...r,ref:t})});c5.displayName=cve;var uve="DropdownMenuRadioGroup",dve=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Hr(n);return u.jsx(Yge,{...i,...r,ref:t})});dve.displayName=uve;var fve="DropdownMenuRadioItem",mve=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Hr(n);return u.jsx(Wge,{...i,...r,ref:t})});mve.displayName=fve;var pve="DropdownMenuItemIndicator",u5=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Hr(n);return u.jsx(Xge,{...i,...r,ref:t})});u5.displayName=pve;var hve="DropdownMenuSeparator",d5=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Hr(n);return u.jsx(Qge,{...i,...r,ref:t})});d5.displayName=hve;var gve="DropdownMenuArrow",vve=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Hr(n);return u.jsx(Jge,{...i,...r,ref:t})});vve.displayName=gve;var yve="DropdownMenuSubTrigger",bve=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Hr(n);return u.jsx(eve,{...i,...r,ref:t})});bve.displayName=yve;var xve="DropdownMenuSubContent",wve=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Hr(n);return u.jsx(tve,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wve.displayName=xve;var Sve=t5,_ve=r5,Cve=i5,Eve=a5,kve=s5,Rve=l5,jve=c5,Ive=u5,Tve=d5;function Hp({...e}){return u.jsx(Sve,{"data-slot":"dropdown-menu",...e})}function qp({...e}){return u.jsx(_ve,{"data-slot":"dropdown-menu-trigger",...e})}function Gp({className:e,sideOffset:t=4,...n}){return u.jsx(Cve,{children:u.jsx(Eve,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Le("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-grey-700 p-1 shadow-md",e),...n})})}function Mr({className:e,inset:t,variant:n="default",...r}){return u.jsx(Rve,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Le("focus:bg-accent focus:text-grey data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function Nve({className:e,children:t,checked:n,...r}){return u.jsxs(jve,{"data-slot":"dropdown-menu-checkbox-item",className:Le("focus:bg-primary relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 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",e),checked:n,...r,children:[u.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:u.jsx(Ive,{children:u.jsx(b1,{className:"size-4"})})}),t]})}function cy({className:e,inset:t,...n}){return u.jsx(kve,{"data-slot":"dropdown-menu-label","data-inset":t,className:Le("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function uy({className:e,...t}){return u.jsx(Tve,{"data-slot":"dropdown-menu-separator",className:Le("bg-grey-700 -mx-1 my-1 h-px",e),...t})}function bR({cluster:e}){const t=Xa(e.id),{view:n,update:r}=Gy(e.organizationId,e.id),i=x.useMemo(()=>e.resetPassword,[e]);if(n){if(!e.fqdn)return u.jsx(We,{to:`/${e.organizationId}/${e.id}/instances`,className:"text-sm text-nowrap","aria-label":`View ${e.name}`,title:`View ${e.name}`,children:u.jsxs("span",{className:"py-2 hover:border-b-2",children:["Instances ",u.jsx(Co,{className:"inline-block"})]})});if(i)return r?u.jsx(We,{to:`/${e.organizationId}/${e.id}/finish-setup`,className:"text-sm text-nowrap","aria-label":`Set Password on ${e.name}`,title:`Set Password on ${e.name}`,children:u.jsxs(Ce,{variant:"positive",className:"py-2 hover:border-b-2 animate-glow-pulse",children:["Finish Setup ",u.jsx(Co,{className:"inline-block"})]})}):u.jsx("span",{className:"py-2 text-nowrap",children:"Pending Owner Setup"});if(!t.isLoading)return t.user?u.jsx(We,{to:`/${e.organizationId}/${e.id}${Js}`,className:"text-sm text-nowrap","aria-label":`View ${e.name}`,title:`View ${e.name}`,children:u.jsxs("span",{className:"py-2 hover:border-b-2",children:["View ",u.jsx(Co,{className:"inline-block"})]})}):u.jsx(We,{to:`/${e.organizationId}/${e.id}/sign-in`,className:"text-sm text-nowrap","aria-label":`Sign In to ${e.name}`,title:`Sign In to ${e.name}`,children:u.jsxs("span",{className:"py-2 hover:border-b-2",children:["Sign In ",u.jsx(Co,{className:"inline-block"})]})})}}function Ave(e){if(yC(e)||bC(e))return"warning";if(f5(e))return"success";switch(e){case"STOPPED":return"secondary";case"TERMINATING":case"TERMINATED":case"REMOVED":case"ERROR":return"destructive";default:return"default"}}function f5(e){switch(e){case"RUNNING":case"UPDATED":return!0;default:return!1}}function yC(e){switch(e){case"CLONE_PENDING":return!0;default:return!1}}function bC(e){switch(e){case"PROVISIONING":case"CLONING":case"CLONE_READY":case"UPDATING_HDB_NODES":case"UPDATING":return!0;default:return!1}}function Ove(e,t){const n=[];if(e)for(const r of e)n.push(r[t]);return n}function xR({cluster:e,forceProgressBarVisible:t}){const[n,r]=x.useState(t||!1),{data:i}=Ut(vc(n&&e.id,2e3));x.useEffect(function(){(yC(e.status)||bC(e.status))&&r(!0)},[n,e.status,i?.instances]);const o=x.useMemo(()=>{const s=Ove(i?.plans??[],"planId"),c=i?.instances??[];let d=0;const f={};let p=0;const h={};let v=0;const y={};for(const S of c){const C=S.status;!C||C==="TERMINATED"||(yC(C)?(d+=1,f[C]=`${d} ${Ma(C)}`):bC(C)?(p+=1,h[C]=`${p} ${Ma(C)}`):!S.planId||!s.includes(S.planId)?(p+=1,h.DRAINING_TRAFFIC=`${p} ${Ma("Draining Traffic")}`):f5(C)&&(v+=1,y[C]=`${v} ${Ma(C)}`))}const b=d+p+v;return{pendingWidth:`${b===0?100:d===0?0:d/b*100}%`,updatingWidth:`${p===0?0:p/b*100}%`,runningWidth:`${v===0?0:v/b*100}%`,text:[...Object.values(y).sort(),...Object.values(h).sort(),...Object.values(f).sort()].join(" · ")}},[i]);return n?u.jsxs("div",{className:"w-full text-center",children:[u.jsxs("div",{className:"w-full h-2.5 rounded-full overflow-clip flex shadow",children:[u.jsx("div",{style:{width:o.runningWidth},className:"grow bg-green/80 transition-[width] duration-1000 ease-in-out motion-reduce:transition-none"}),u.jsx("div",{style:{width:o.updatingWidth},className:"grow animate-pulse bg-yellow/80 transition-[width] duration-1000 ease-in-out motion-reduce:transition-none"}),u.jsx("div",{style:{width:o.pendingWidth},className:"grow bg-gray-600 transition-[width] duration-1000 ease-in-out motion-reduce:transition-none"})]}),o.text&&u.jsx("div",{className:"text-xs text-muted-foreground font-light mt-2",children:o.text})]}):null}async function $ve(e){const{data:t}=await Vt.delete(`/Cluster/${e}`,{timeout:0});return t}function Dve(){return vt({mutationFn:e=>$ve(e)})}function m5(...e){return x.useMemo(()=>e.map(t=>(()=>{navigator.clipboard.writeText(t),Ee.info("Copied to clipboard!",{icon:u.jsx(RW,{}),duration:1e3})})),e)}function Pve({cluster:e}){const t=mn(),n=kr(),r=x.useMemo(()=>c1(e),[e]),i=By(r),o=Xa(e.id),{view:s,update:c,remove:d}=Gy(e.organizationId,e.id),{mutate:f,isPending:p}=Dve(),[h,v]=x.useState(!1),[y,b]=x.useState(!1),S=x.useMemo(()=>e.status&&Qy.includes(e.status),[e.status]),C=x.useMemo(()=>!!e?.plans?.[0]?.planId?.startsWith("self-hosted"),[e]),E=x.useMemo(()=>e.status&&ZJ.includes(e.status),[e.status]),k=x.useCallback(async()=>{v(!0);const z=await U1(e.id).catch(L=>(console.error("Failed to lookup cluster details, proceeding without checking instances.",L),null));if(await mp({instanceClient:i}),z?.instances?.length)for(const L of z.instances)lr.setUserForEntity(L,null);lr.setUserForEntity(e,null)},[e,i]),R=x.useCallback(()=>b(!0),[]),I=x.useCallback(()=>{const z=e.organizationId;f(e.id,{onSuccess:async()=>{await n.invalidateQueries({queryKey:[z],refetchType:"active"}),await t.invalidate(),Ee.success("Success",{description:C?"Cluster successfully removed.":"Cluster successfully terminated.",duration:5e3,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}}),b(!1)},onError:()=>{Ee.error("Error",{description:C?`Failed to remove cluster: ${e.name}`:`Failed to terminate cluster: ${e.name}.`,duration:5e3,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}}),b(!1)}})},[t,e.organizationId,e.id,e.name,f,C,n]),[A,T]=m5(`${e.fqdn}`,`https://${e.fqdn}`),N=[S&&c&&u.jsx(We,{to:`${e.id}/edit`,disabled:h,children:u.jsx(Mr,{children:"Edit"})}),S&&s&&u.jsx(We,{to:`${e.id}/instances`,disabled:h,children:u.jsx(Mr,{children:"Instances"})}),S&&s&&e.fqdn&&u.jsx(Mr,{onClick:A,disabled:h,children:"Copy host name"}),S&&s&&e.fqdn&&u.jsx(Mr,{onClick:T,disabled:h,children:"Copy API URL"}),S&&s&&!!r&&!o.isLoading&&o.user&&u.jsx(Mr,{onClick:k,disabled:h,children:"Sign Out"}),!E&&d&&u.jsx(Mr,{className:"focus:bg-red/70 focus:text-white",onClick:R,children:C?"Remove":"Terminate"})].filter(sa);return u.jsxs(ec,{className:"relative h-full justify-between",children:[u.jsxs(tl,{children:[u.jsxs(pc,{className:"flex items-center justify-between",children:[e.fqdn?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"truncate max-w-48",children:e.fqdn}),u.jsx(r2,{onClick:A,size:16,className:"cursor-pointer"}),u.jsx("span",{className:"grow"})]}):u.jsx("span",{children:"Self-Hosted"}),!E&&u.jsxs(Hp,{children:[u.jsx(qp,{children:u.jsx(x1,{"aria-label":"Cluster options"})}),u.jsxs(Gp,{children:[u.jsx(cy,{className:"text-gray-600 text-xs",children:"Plans"}),e.plans?.map(z=>u.jsxs(cy,{children:[z.planId," / ",z.regionId,u.jsx("br",{}),"Auto Renewal ",u.jsx(ra,{variant:"success",children:"ON"})]},z.planId+z.regionId)),N.length>0&&u.jsxs(u.Fragment,{children:[u.jsx(uy,{}),...N]})]})]})]}),u.jsx(nl,{children:u.jsx("h2",{children:e.name})})]}),u.jsxs(Qa,{className:"flex items-center justify-between gap-2",children:[u.jsx(xR,{cluster:e}),S&&s&&u.jsx(bR,{cluster:e})]}),u.jsx(Pb,{typeOfThingBeingDeleted:"cluster",transitiveVerb:C?"Remove":"Terminate",presentParticiple:C?"Removing":"Terminating",nameOfThingBeingDeleted:e.name,isModalOpen:y,hideDataLossWarning:C,setIsModalOpen:z=>b(z),deletionConfirmed:I,deletionPending:p})]})}function lc({overEmail:e}){return u.jsx("a",{href:e?"mailto:support@harperdb.io":"https://discord.com/channels/1415002037439041710/1415002038286286994",target:"_blank",className:"underline",children:"Contact us"})}function go({className:e,text:t,centered:n,...r}){const i=n?"flex flex-col items-center justify-center h-full":"";return u.jsxs("div",{className:`text-white h-full w-full ${e||""} ${i}`,...r,children:[u.jsx("img",{src:"/HDBDogOnly.svg",width:"100px",height:"100px",alt:"HDB Dog Logo Loading",className:"inline-block"}),u.jsx("p",{className:"pt-4",children:t||"Loading..."})]})}function Ug({children:e}){return u.jsxs(u.Fragment,{children:[u.jsx(la,{}),u.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))] relative",children:e})]})}async function Mve(e){const{data:t}=await Vt.get("/Plan/",{params:{organizationId:e}});return t}function zve(e){return{queryKey:[e,"instancePlan"],queryFn:()=>Mve(e),retry:!1}}async function Lve({organizationId:e,availableHosts:t}={}){const{data:n}=await Vt.get("/Region/",{params:{availableHosts:t,organizationId:e}});return n}function Q$({organizationId:e,availableHosts:t}={}){return{queryKey:[e,"regionLocations",t],queryFn:()=>Lve({organizationId:e,availableHosts:t}),retry:!1}}function np({width:e,className:t,animated:n,placeholder:r}){return u.jsxs("div",{className:Ba("w-full bg-gray-200 rounded-full relative",r?"h-6":"h-2.5"),children:[r&&u.jsx("div",{className:"absolute top-0 h-full w-full font-bold text-xs flex flex-col items-center justify-center text-black/60 text-shadow-2xs",children:r}),u.jsx("div",{className:Ba("rounded-full",r?"h-6":"h-2.5",!t?.includes("bg-")&&"bg-purple/40",n&&"transition-[width] duration-1000 ease-in-out motion-reduce:transition-none",t),style:{width:e}})]})}function Uve({duration:e,message:t,lateMessage:n}){const r=x.useRef(0),i=x.useRef(0),[o,s]=x.useState(!1),c=5,[d,f]=x.useState(`${c}%`),p=x.useCallback(function h(v){i.current||(i.current=v);const y=v-i.current,b=Math.min(y/e,1);f(Math.max(c,b*100)+"%"),b<1?r.current=requestAnimationFrame(h):s(!0)},[e]);return x.useEffect(()=>(r.current=requestAnimationFrame(p),()=>cancelAnimationFrame(r.current)),[p]),u.jsxs(u.Fragment,{children:[o?n:t,u.jsx(np,{width:d,animated:!1})]})}async function Fve(e){const{data:t}=await Vt.post("/Cluster/",e,{timeout:0});return t}function Vve(){return vt({mutationFn:e=>Fve(e)})}async function Bve(e){const{data:t}=await Vt.put(`/Cluster/${e.id}`,{regionPlans:e.regionPlans},{timeout:0});return t}function Hve(){return vt({mutationFn:e=>Bve(e)})}async function qve(e){await Vt.put("/Payment/",e)}function Gve(){return vt({mutationFn:e=>qve(e)})}function p5(e){const{mutate:t}=Gve();return x.useCallback((n,r)=>{t({paymentMethodId:typeof n=="string"?n:n.id,organizationId:e},{onSuccess:()=>{Ee.success("Success! Your payment method has been saved."),r(!0)},onError:()=>{Ee.error("Failed to process payment method details. Please try another payment method."),r(!1)}})},[t,e])}const Kve=x.createContext(null);function Zve(){return x.useContext(Kve)}var OS={exports:{}},$S,J$;function Yve(){if(J$)return $S;J$=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $S=e,$S}var DS,eD;function Wve(){if(eD)return DS;eD=1;var e=Yve();function t(){}function n(){}return n.resetWarningCache=t,DS=function(){function r(s,c,d,f,p,h){if(h!==e){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},DS}var tD;function Xve(){return tD||(tD=1,OS.exports=Wve()()),OS.exports}var Qve=Xve();const rn=sp(Qve);function nD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nD(Object(n),!0).forEach(function(r){h5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xv(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xv=function(t){return typeof t}:xv=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xv(e)}function h5(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jve(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function eye(e,t){if(e==null)return{};var n=Jve(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tye(e,t){return nye(e)||rye(e,t)||iye(e,t)||oye()}function nye(e){if(Array.isArray(e))return e}function rye(e,t){var n=e&&(typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"]);if(n!=null){var r=[],i=!0,o=!1,s,c;try{for(n=n.call(e);!(i=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));i=!0);}catch(d){o=!0,c=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw c}}return r}}function iye(e,t){if(e){if(typeof e=="string")return iD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iD(e,t)}}function iD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
488
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Or=function(t,n,r){var i=!!r,o=X.useRef(r);X.useEffect(function(){o.current=r},[r]),X.useEffect(function(){if(!i||!t)return function(){};var s=function(){o.current&&o.current.apply(o,arguments)};return t.on(n,s),function(){t.off(n,s)}},[i,n,t,o])},aye=function(t){var n=X.useRef(t);return X.useEffect(function(){n.current=t},[t]),n.current},dy=function(t){return t!==null&&xv(t)==="object"},oD="[object Object]",sye=function e(t,n){if(!dy(t)||!dy(n))return t===n;var r=Array.isArray(t),i=Array.isArray(n);if(r!==i)return!1;var o=Object.prototype.toString.call(t)===oD,s=Object.prototype.toString.call(n)===oD;if(o!==s)return!1;if(!o&&!r)return t===n;var c=Object.keys(t),d=Object.keys(n);if(c.length!==d.length)return!1;for(var f={},p=0;p<c.length;p+=1)f[c[p]]=!0;for(var h=0;h<d.length;h+=1)f[d[h]]=!0;var v=Object.keys(f);if(v.length!==c.length)return!1;var y=t,b=n,S=function(E){return e(y[E],b[E])};return v.every(S)},lye=function(t,n,r){return dy(t)?Object.keys(t).reduce(function(i,o){var s=!dy(n)||!sye(t[o],n[o]);return r.includes(o)?(s&&console.warn("Unsupported prop change: options.".concat(o," is not a mutable property.")),i):s?rD(rD({},i||{}),{},h5({},o,t[o])):i},null):null},wR=X.createContext(null);wR.displayName="ElementsContext";var g5=function(t,n){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return t};rn.any,rn.object;var cye=function(t){var n=X.useContext(wR);return g5(n,t)},uye=function(){var t=cye("calls useElements()"),n=t.elements;return n};rn.func.isRequired;var v5=X.createContext(null);v5.displayName="CheckoutContext";rn.any,rn.shape({fetchClientSecret:rn.func.isRequired,elementsOptions:rn.object}).isRequired;var xC=function(t){var n=X.useContext(v5),r=X.useContext(wR);if(n){if(r)throw new Error("You cannot wrap the part of your app that ".concat(t," in both <CheckoutProvider> and <Elements> providers."));return n}else return g5(r,t)},dye=["mode"],fye=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},Kn=function(t,n){var r="".concat(fye(t),"Element"),i=function(d){var f=d.id,p=d.className,h=d.options,v=h===void 0?{}:h,y=d.onBlur,b=d.onFocus,S=d.onReady,C=d.onChange,E=d.onEscape,k=d.onClick,R=d.onLoadError,I=d.onLoaderStart,A=d.onNetworksChange,T=d.onConfirm,N=d.onCancel,z=d.onShippingAddressChange,L=d.onShippingRateChange,K=d.onSavedPaymentMethodRemove,ee=d.onSavedPaymentMethodUpdate,Z=xC("mounts <".concat(r,">")),Y="elements"in Z?Z.elements:null,B="checkoutState"in Z?Z.checkoutState:null,W=B?.type==="success"?B.checkout:null,P=X.useState(null),G=tye(P,2),U=G[0],te=G[1],$=X.useRef(null),M=X.useRef(null);Or(U,"blur",y),Or(U,"focus",b),Or(U,"escape",E),Or(U,"click",k),Or(U,"loaderror",R),Or(U,"loaderstart",I),Or(U,"networkschange",A),Or(U,"confirm",T),Or(U,"cancel",N),Or(U,"shippingaddresschange",z),Or(U,"shippingratechange",L),Or(U,"savedpaymentmethodremove",K),Or(U,"savedpaymentmethodupdate",ee),Or(U,"change",C);var F;S&&(t==="expressCheckout"?F=S:F=function(){S(U)}),Or(U,"ready",F),X.useLayoutEffect(function(){if($.current===null&&M.current!==null&&(Y||W)){var J=null;if(W)switch(t){case"payment":J=W.createPaymentElement(v);break;case"address":if("mode"in v){var de=v.mode,pe=eye(v,dye);if(de==="shipping")J=W.createShippingAddressElement(pe);else if(de==="billing")J=W.createBillingAddressElement(pe);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":J=W.createExpressCheckoutElement(v);break;case"currencySelector":J=W.createCurrencySelectorElement();break;case"taxId":J=W.createTaxIdElement(v);break;default:throw new Error("Invalid Element type ".concat(r,". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />."))}else Y&&(J=Y.create(t,v));$.current=J,te(J),J&&J.mount(M.current)}},[Y,W,v]);var O=aye(v);return X.useEffect(function(){if($.current){var J=lye(v,O,["paymentRequest"]);J&&"update"in $.current&&$.current.update(J)}},[v,O]),X.useLayoutEffect(function(){return function(){if($.current&&typeof $.current.destroy=="function")try{$.current.destroy(),$.current=null}catch{}}},[]),X.createElement("div",{id:f,className:p,ref:M})},o=function(d){xC("mounts <".concat(r,">"));var f=d.id,p=d.className;return X.createElement("div",{id:f,className:p})},s=n?o:i;return s.propTypes={id:rn.string,className:rn.string,onChange:rn.func,onBlur:rn.func,onFocus:rn.func,onReady:rn.func,onEscape:rn.func,onClick:rn.func,onLoadError:rn.func,onLoaderStart:rn.func,onNetworksChange:rn.func,onConfirm:rn.func,onCancel:rn.func,onShippingAddressChange:rn.func,onShippingRateChange:rn.func,onSavedPaymentMethodRemove:rn.func,onSavedPaymentMethodUpdate:rn.func,options:rn.object},s.displayName=r,s.__elementType=t,s},Zn=typeof window>"u",mye=X.createContext(null);mye.displayName="EmbeddedCheckoutProviderContext";var y5=function(){var t=xC("calls useStripe()"),n=t.stripe;return n};Kn("auBankAccount",Zn);Kn("card",Zn);Kn("cardNumber",Zn);Kn("cardExpiry",Zn);Kn("cardCvc",Zn);Kn("fpxBank",Zn);Kn("iban",Zn);Kn("idealBank",Zn);Kn("p24Bank",Zn);Kn("epsBank",Zn);var pye=Kn("payment",Zn);Kn("expressCheckout",Zn);Kn("paymentRequestButton",Zn);Kn("linkAuthentication",Zn);var hye=Kn("address",Zn);Kn("shippingAddress",Zn);Kn("paymentMethodMessaging",Zn);Kn("affirmMessage",Zn);Kn("afterpayClearpayMessage",Zn);Kn("taxId",Zn);function gye({hasExistingBilling:e,onPaymentAdded:t,onSaveStateForBillingRedirect:n}){const{organizationId:r}=tt({strict:!1}),i=y5(),o=Zve(),s=uye(),[c,d]=x.useState(!1),f=p5(r),p=x.useCallback(()=>{t(!1)},[t]),h=x.useCallback(async v=>{if(v.preventDefault(),!i||!s)return;d(!0),await s.submit(),n?.(!0);const y=await i.confirmSetup({clientSecret:o.clientSecret,elements:s,redirect:"if_required",confirmParams:{return_url:`${window.location.origin}/#/${r}/billing/confirm`}});y.error?(console.error(y.error.message),Ee.error(y.error.message),d(!1),n?.(!1)):y.setupIntent.payment_method&&(f(y.setupIntent.payment_method,t),n?.(!1))},[s,t,n,r,f,i,o.clientSecret]);return u.jsxs("form",{onSubmit:h,className:"max-w-xl",children:[u.jsx(pye,{}),u.jsx(hye,{options:{mode:"billing"}}),u.jsxs("div",{className:"mt-4 flex gap-8 items-center",children:[u.jsxs(Ce,{disabled:!i||!s||c,variant:"submit",className:"rounded-full",children:[u.jsx(aa,{})," Add Payment Method"]}),e&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"text-xs text-gray-600",children:"Your existing payment method will be overwritten."}),u.jsx(Ce,{variant:"defaultOutline",type:"button",onClick:p,children:"Cancel"})]})]})]})}async function vye(e){const{data:t}=await Vt.get(`/Organization/${e}`);return t}function jc(e){return{queryKey:[e],queryFn:()=>vye(e),retry:!1,refetchInterval:1e4}}var yye="basil",b5="https://js.stripe.com",bye="".concat(b5,"/").concat(yye,"/stripe.js"),xye=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,wye=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;var Sye=function(t){return xye.test(t)||wye.test(t)},_ye=function(){for(var t=document.querySelectorAll('script[src^="'.concat(b5,'"]')),n=0;n<t.length;n++){var r=t[n];if(Sye(r.src))return r}return null},aD=function(t){var n="",r=document.createElement("script");r.src="".concat(bye).concat(n);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(r),r},sm=null,Fg=null,Vg=null,Cye=function(t){return function(n){t(new Error("Failed to load Stripe.js",{cause:n}))}},Eye=function(t,n){return function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))}},kye=function(t){return sm!==null?sm:(sm=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe){n(window.Stripe);return}try{var i=_ye();if(!(i&&t)){if(!i)i=aD(t);else if(i&&Vg!==null&&Fg!==null){var o;i.removeEventListener("load",Vg),i.removeEventListener("error",Fg),(o=i.parentNode)===null||o===void 0||o.removeChild(i),i=aD(t)}}Vg=Eye(n,r),Fg=Cye(r),i.addEventListener("load",Vg),i.addEventListener("error",Fg)}catch(s){r(s);return}}),sm.catch(function(n){return sm=null,Promise.reject(n)}))},lm,Rye=function(){return lm||(lm=kye(null).catch(function(t){return lm=null,Promise.reject(t)}),lm)};Promise.resolve().then(function(){return Rye()}).catch(function(e){console.warn(e)});async function jye(e){const{data:t}=await Vt.post("/StripeAccount/",e);return t}function Iye(){return vt({mutationFn:e=>jye(e)})}async function Tye(e){const{data:t}=await Vt.post("/Payment/",{organizationId:e.organizationId});return t}function Nye(){return vt({mutationFn:e=>Tye(e)})}function Aye(e){const{enabled:t,existingStripeId:n,organizationId:r}=e,{mutate:i}=Iye(),{mutate:o}=Nye(),[s,c]=x.useState(void 0),d=x.useCallback(f=>{c(f.clientSecret)},[]);return x.useEffect(()=>{},[i,t,n,o,d,r]),s}function x5({children:e}){const{organizationId:t}=tt({strict:!1}),{data:n}=Ut(jc(t)),r=Aye({organizationId:t,enabled:!!n,existingStripeId:n?.stripeId});return x.useMemo(()=>({clientSecret:r||"",appearance:{theme:"night"}}),[r]),console.error("No VITE_PUBLIC_STRIPE_KEY is configured for this environment."),u.jsx("div",{className:"mt-20 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:"Setting up your billing is currently disabled. Please check back again later."})}function Oye({onPaymentAdded:e,onSaveStateForBillingRedirect:t}){const{organizationId:n}=tt({strict:!1}),{data:r}=Ut(jc(n)),i=r?.billing,o=i?.paymentMethod;return u.jsxs(x5,{children:[u.jsx("div",{className:"mt-2 mb-6",children:!o&&"You currently have no payment method on file. Please fill out the secure form below."}),u.jsx(gye,{hasExistingBilling:!!i,onSaveStateForBillingRedirect:t,onPaymentAdded:e})]})}var Xo=(e=>(e.PASS="pass",e.FAIL="fail",e.PENDING="pending",e.ERROR="error",e))(Xo||{});function $ye(e){switch(e){case Xo.PASS:return"success";case Xo.FAIL:case Xo.ERROR:return"destructive";case Xo.PENDING:default:return"default"}}function Dye(e){switch(e){case Xo.PASS:return"READY";case Xo.FAIL:case Xo.ERROR:case Xo.PENDING:default:return e.toUpperCase()}}function Pye(e,t){const n=String(e).padStart(2,"0"),r=String(t%100).padStart(2,"0");return`${n}/${r}`}function w5(e){const{onSaveStateForBillingRedirect:t,onReplacingPaymentMethod:n}=e??{},{organizationId:r}=tt({strict:!1}),{update:i}=qy(r),{data:o,refetch:s}=Ut(jc(r)),d=o?.billing?.paymentMethod,[f,p]=x.useState(!1),h=x.useCallback(()=>{p(!f),n?.(!f)},[n,f]),v=x.useCallback(y=>{p(!1),n?.(!1),y&&s()},[n,s]);return o?.type==="ENTERPRISE"?u.jsxs("span",{children:["You are part of an enterprise organization! We don’t currently show your payment methods on this page. Want to explore your solution with Harper more? ",u.jsx(lc,{}),", we would love to talk!"]}):d&&!f?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mt-2",children:[d.brand?.toUpperCase()??"Card"," ending in ",d.last4??"••••",d.expMonth&&d.expYear?u.jsxs(u.Fragment,{children:[" (exp ",Pye(d.expMonth,d.expYear),")"]}):null,d.status?u.jsxs(u.Fragment,{children:[" — ",u.jsx(ra,{variant:$ye(d.status),children:Dye(d.status)})]}):null]}),i&&u.jsx("div",{className:"mt-2 mb-6",children:u.jsx(Ce,{variant:"defaultOutline",type:"button",onClick:h,children:"Replace Payment Method"})})]}):i?u.jsx(Oye,{onSaveStateForBillingRedirect:t,onPaymentAdded:v}):u.jsx("div",{children:"This org doesn't have a payment method, and you don't have access to add one. Please contact your administrator."})}function An(e){return e!==void 0&&e>0}function Mye({clusterId:e,isPending:t,onGoBackToDetails:n,onSaveStateForBillingRedirect:r,onSubmit:i,organizationId:o,selectedPlan:s}){const{data:c}=Ut(jc(o)),d=c?.billing,f=c?.type==="ENTERPRISE",p=f||d?.paymentMethod?.status===Xo.PASS,[h,v]=x.useState(!1),y=An(s?.planLimits?.expirationMonths)&&s.planLimits.expirationMonths<1e3&&s.planLimits.expirationMonths,b=u.jsx(u.Fragment,{children:u.jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-3 max-w-xl",children:[u.jsxs(Ce,{type:"button",variant:"defaultOutline",className:"rounded-full",disabled:t,onClick:n,children:[u.jsx(tc,{})," Back to Details"]}),u.jsxs(Ce,{disabled:t||!p||h,type:"submit",variant:"submit",className:"rounded-full",onClick:i,children:[e?"Edit Cluster":"Create New Cluster"," ",u.jsx(Co,{})]})]})});if(f)return u.jsxs(u.Fragment,{children:[u.jsxs("ul",{className:"list-disc ml-6",children:[u.jsx("li",{children:"Your organization’s enterprise agreement with Harper can adjust the retail price you see on this page."}),u.jsxs("li",{children:["Your account representative can work with you to sort out more precise details, and to help accomplish your objectives with this cluster. ",u.jsx(lc,{overEmail:!0}),", we are here to help."]})]}),b]});const S=y&&`, or ${La(y,"month","months")} elapse`;return u.jsxs(u.Fragment,{children:[u.jsxs("ul",{className:"list-disc ml-6 mb-6",children:[u.jsx("li",{children:"You will be billed for this cluster today, and will receive a license for the block of usage you've requested."}),e&&u.jsx("li",{children:"If you scale up, you'll be charged for the additional blocks you've purchased now, and your next auto renewal will be for all purchased blocks."}),e&&u.jsx("li",{children:"If you remove a region, that region's usage block will not be used anymore (because it is specific to that region)."}),u.jsxs("li",{children:["When that block is used up",S,", you will be automatically renewed."]}),u.jsx("li",{children:"While refunds are not available, we’d be happy to assist you with troubleshooting."}),u.jsxs("li",{children:["We would love to work with you to sort out more precise details, and to help accomplish your objectives with this cluster. ",u.jsx(lc,{overEmail:!0}),", we are here to help."]})]}),u.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"Payment method:"}),u.jsx(w5,{onSaveStateForBillingRedirect:r,onReplacingPaymentMethod:v}),b]})}function Cr({className:e}={}){const t=x.useMemo(()=>Ba("animate-pulse h-2.5 bg-gray-200 rounded-full dark:bg-gray-700",!e?.includes("mb-")&&"mb-4 ",!e?.includes("w-")&&"w-48 ",e),[e]);return u.jsx("div",{className:t})}function wC(e,[t,n]){return Math.min(n,Math.max(t,e))}var zye=[" ","Enter","ArrowUp","ArrowDown"],Lye=[" ","Enter"],cc="Select",[Hb,qb,Uye]=gp(cc),[Zd]=Di(cc,[Uye,Gd]),Gb=Gd(),[Fye,il]=Zd(cc),[Vye,Bye]=Zd(cc),S5=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:c,onValueChange:d,dir:f,name:p,autoComplete:h,disabled:v,required:y,form:b}=e,S=Gb(t),[C,E]=x.useState(null),[k,R]=x.useState(null),[I,A]=x.useState(!1),T=hc(f),[N,z]=No({prop:r,defaultProp:i??!1,onChange:o,caller:cc}),[L,K]=No({prop:s,defaultProp:c,onChange:d,caller:cc}),ee=x.useRef(null),Z=C?b||!!C.closest("form"):!0,[Y,B]=x.useState(new Set),W=Array.from(Y).map(P=>P.props.value).join(";");return u.jsx(aR,{...S,children:u.jsxs(Fye,{required:y,scope:t,trigger:C,onTriggerChange:E,valueNode:k,onValueNodeChange:R,valueNodeHasChildren:I,onValueNodeHasChildrenChange:A,contentId:Ii(),value:L,onValueChange:K,open:N,onOpenChange:z,dir:T,triggerPointerDownPosRef:ee,disabled:v,children:[u.jsx(Hb.Provider,{scope:t,children:u.jsx(Vye,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(P=>{B(G=>new Set(G).add(P))},[]),onNativeOptionRemove:x.useCallback(P=>{B(G=>{const U=new Set(G);return U.delete(P),U})},[]),children:n})}),Z?u.jsxs(G5,{"aria-hidden":!0,required:y,tabIndex:-1,name:p,autoComplete:h,value:L,onChange:P=>K(P.target.value),disabled:v,form:b,children:[L===void 0?u.jsx("option",{value:""}):null,Array.from(Y)]},W):null]})})};S5.displayName=cc;var _5="SelectTrigger",C5=x.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Gb(n),s=il(_5,n),c=s.disabled||r,d=ct(t,s.onTriggerChange),f=qb(n),p=x.useRef("touch"),[h,v,y]=Z5(S=>{const C=f().filter(R=>!R.disabled),E=C.find(R=>R.value===s.value),k=Y5(C,S,E);k!==void 0&&s.onValueChange(k.value)}),b=S=>{c||(s.onOpenChange(!0),y()),S&&(s.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return u.jsx(sR,{asChild:!0,...o,children:u.jsx(Be.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":K5(s.value)?"":void 0,...i,ref:d,onClick:Re(i.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&b(S)}),onPointerDown:Re(i.onPointerDown,S=>{p.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(b(S),S.preventDefault())}),onKeyDown:Re(i.onKeyDown,S=>{const C=h.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&v(S.key),!(C&&S.key===" ")&&zye.includes(S.key)&&(b(),S.preventDefault())})})})});C5.displayName=_5;var E5="SelectValue",k5=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s="",...c}=e,d=il(E5,n),{onValueNodeHasChildrenChange:f}=d,p=o!==void 0,h=ct(t,d.onValueNodeChange);return qn(()=>{f(p)},[f,p]),u.jsx(Be.span,{...c,ref:h,style:{pointerEvents:"none"},children:K5(d.value)?u.jsx(u.Fragment,{children:s}):o})});k5.displayName=E5;var Hye="SelectIcon",R5=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return u.jsx(Be.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});R5.displayName=Hye;var qye="SelectPortal",j5=e=>u.jsx(Lp,{asChild:!0,...e});j5.displayName=qye;var uc="SelectContent",I5=x.forwardRef((e,t)=>{const n=il(uc,e.__scopeSelect),[r,i]=x.useState();if(qn(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Rd.createPortal(u.jsx(T5,{scope:e.__scopeSelect,children:u.jsx(Hb.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),o):null}return u.jsx(N5,{...e,ref:t})});I5.displayName=uc;var So=10,[T5,ol]=Zd(uc),Gye="SelectContentImpl",Kye=Jl("SelectContent.RemoveScroll"),N5=x.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:c,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:v,collisionPadding:y,sticky:b,hideWhenDetached:S,avoidCollisions:C,...E}=e,k=il(uc,n),[R,I]=x.useState(null),[A,T]=x.useState(null),N=ct(t,V=>I(V)),[z,L]=x.useState(null),[K,ee]=x.useState(null),Z=qb(n),[Y,B]=x.useState(!1),W=x.useRef(!1);x.useEffect(()=>{if(R)return Zk(R)},[R]),Kk();const P=x.useCallback(V=>{const[ie,..._e]=Z().map(Ae=>Ae.ref.current),[Ie]=_e.slice(-1),He=document.activeElement;for(const Ae of V)if(Ae===He||(Ae?.scrollIntoView({block:"nearest"}),Ae===ie&&A&&(A.scrollTop=0),Ae===Ie&&A&&(A.scrollTop=A.scrollHeight),Ae?.focus(),document.activeElement!==He))return},[Z,A]),G=x.useCallback(()=>P([z,R]),[P,z,R]);x.useEffect(()=>{Y&&G()},[Y,G]);const{onOpenChange:U,triggerPointerDownPosRef:te}=k;x.useEffect(()=>{if(R){let V={x:0,y:0};const ie=Ie=>{V={x:Math.abs(Math.round(Ie.pageX)-(te.current?.x??0)),y:Math.abs(Math.round(Ie.pageY)-(te.current?.y??0))}},_e=Ie=>{V.x<=10&&V.y<=10?Ie.preventDefault():R.contains(Ie.target)||U(!1),document.removeEventListener("pointermove",ie),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",_e,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",_e,{capture:!0})}}},[R,U,te]),x.useEffect(()=>{const V=()=>U(!1);return window.addEventListener("blur",V),window.addEventListener("resize",V),()=>{window.removeEventListener("blur",V),window.removeEventListener("resize",V)}},[U]);const[$,M]=Z5(V=>{const ie=Z().filter(He=>!He.disabled),_e=ie.find(He=>He.ref.current===document.activeElement),Ie=Y5(ie,V,_e);Ie&&setTimeout(()=>Ie.ref.current.focus())}),F=x.useCallback((V,ie,_e)=>{const Ie=!W.current&&!_e;(k.value!==void 0&&k.value===ie||Ie)&&(L(V),Ie&&(W.current=!0))},[k.value]),O=x.useCallback(()=>R?.focus(),[R]),J=x.useCallback((V,ie,_e)=>{const Ie=!W.current&&!_e;(k.value!==void 0&&k.value===ie||Ie)&&ee(V)},[k.value]),de=r==="popper"?SC:A5,pe=de===SC?{side:c,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:v,collisionPadding:y,sticky:b,hideWhenDetached:S,avoidCollisions:C}:{};return u.jsx(T5,{scope:n,content:R,viewport:A,onViewportChange:T,itemRefCallback:F,selectedItem:z,onItemLeave:O,itemTextRefCallback:J,focusSelectedItem:G,selectedItemText:K,position:r,isPositioned:Y,searchRef:$,children:u.jsx($b,{as:Kye,allowPinchZoom:!0,children:u.jsx(Ab,{asChild:!0,trapped:k.open,onMountAutoFocus:V=>{V.preventDefault()},onUnmountAutoFocus:Re(i,V=>{k.trigger?.focus({preventScroll:!0}),V.preventDefault()}),children:u.jsx(Nd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:V=>V.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:u.jsx(de,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:V=>V.preventDefault(),...E,...pe,onPlaced:()=>B(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Re(E.onKeyDown,V=>{const ie=V.ctrlKey||V.altKey||V.metaKey;if(V.key==="Tab"&&V.preventDefault(),!ie&&V.key.length===1&&M(V.key),["ArrowUp","ArrowDown","Home","End"].includes(V.key)){let Ie=Z().filter(He=>!He.disabled).map(He=>He.ref.current);if(["ArrowUp","End"].includes(V.key)&&(Ie=Ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(V.key)){const He=V.target,Ae=Ie.indexOf(He);Ie=Ie.slice(Ae+1)}setTimeout(()=>P(Ie)),V.preventDefault()}})})})})})})});N5.displayName=Gye;var Zye="SelectItemAlignedPosition",A5=x.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=il(uc,n),s=ol(uc,n),[c,d]=x.useState(null),[f,p]=x.useState(null),h=ct(t,N=>p(N)),v=qb(n),y=x.useRef(!1),b=x.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:E,focusSelectedItem:k}=s,R=x.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&f&&S&&C&&E){const N=o.trigger.getBoundingClientRect(),z=f.getBoundingClientRect(),L=o.valueNode.getBoundingClientRect(),K=E.getBoundingClientRect();if(o.dir!=="rtl"){const He=K.left-z.left,Ae=L.left-He,Ye=N.left-Ae,jt=N.width+Ye,ln=Math.max(jt,z.width),Dn=window.innerWidth-So,Pn=wC(Ae,[So,Math.max(So,Dn-ln)]);c.style.minWidth=jt+"px",c.style.left=Pn+"px"}else{const He=z.right-K.right,Ae=window.innerWidth-L.right-He,Ye=window.innerWidth-N.right-Ae,jt=N.width+Ye,ln=Math.max(jt,z.width),Dn=window.innerWidth-So,Pn=wC(Ae,[So,Math.max(So,Dn-ln)]);c.style.minWidth=jt+"px",c.style.right=Pn+"px"}const ee=v(),Z=window.innerHeight-So*2,Y=S.scrollHeight,B=window.getComputedStyle(f),W=parseInt(B.borderTopWidth,10),P=parseInt(B.paddingTop,10),G=parseInt(B.borderBottomWidth,10),U=parseInt(B.paddingBottom,10),te=W+P+Y+U+G,$=Math.min(C.offsetHeight*5,te),M=window.getComputedStyle(S),F=parseInt(M.paddingTop,10),O=parseInt(M.paddingBottom,10),J=N.top+N.height/2-So,de=Z-J,pe=C.offsetHeight/2,V=C.offsetTop+pe,ie=W+P+V,_e=te-ie;if(ie<=J){const He=ee.length>0&&C===ee[ee.length-1].ref.current;c.style.bottom="0px";const Ae=f.clientHeight-S.offsetTop-S.offsetHeight,Ye=Math.max(de,pe+(He?O:0)+Ae+G),jt=ie+Ye;c.style.height=jt+"px"}else{const He=ee.length>0&&C===ee[0].ref.current;c.style.top="0px";const Ye=Math.max(J,W+S.offsetTop+(He?F:0)+pe)+_e;c.style.height=Ye+"px",S.scrollTop=ie-J+S.offsetTop}c.style.margin=`${So}px 0`,c.style.minHeight=$+"px",c.style.maxHeight=Z+"px",r?.(),requestAnimationFrame(()=>y.current=!0)}},[v,o.trigger,o.valueNode,c,f,S,C,E,o.dir,r]);qn(()=>R(),[R]);const[I,A]=x.useState();qn(()=>{f&&A(window.getComputedStyle(f).zIndex)},[f]);const T=x.useCallback(N=>{N&&b.current===!0&&(R(),k?.(),b.current=!1)},[R,k]);return u.jsx(Wye,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:T,children:u.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I},children:u.jsx(Be.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});A5.displayName=Zye;var Yye="SelectPopperPosition",SC=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=So,...o}=e,s=Gb(n);return u.jsx(lR,{...s,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}})});SC.displayName=Yye;var[Wye,SR]=Zd(uc,{}),_C="SelectViewport",O5=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=ol(_C,n),s=SR(_C,n),c=ct(t,o.onViewportChange),d=x.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),u.jsx(Hb.Slot,{scope:n,children:u.jsx(Be.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Re(i.onScroll,f=>{const p=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:v}=s;if(v?.current&&h){const y=Math.abs(d.current-p.scrollTop);if(y>0){const b=window.innerHeight-So*2,S=parseFloat(h.style.minHeight),C=parseFloat(h.style.height),E=Math.max(S,C);if(E<b){const k=E+y,R=Math.min(b,k),I=k-R;h.style.height=R+"px",h.style.bottom==="0px"&&(p.scrollTop=I>0?I:0,h.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});O5.displayName=_C;var $5="SelectGroup",[Xye,Qye]=Zd($5),D5=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ii();return u.jsx(Xye,{scope:n,id:i,children:u.jsx(Be.div,{role:"group","aria-labelledby":i,...r,ref:t})})});D5.displayName=$5;var P5="SelectLabel",M5=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Qye(P5,n);return u.jsx(Be.div,{id:i.id,...r,ref:t})});M5.displayName=P5;var fy="SelectItem",[Jye,z5]=Zd(fy),L5=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,c=il(fy,n),d=ol(fy,n),f=c.value===r,[p,h]=x.useState(o??""),[v,y]=x.useState(!1),b=ct(t,k=>d.itemRefCallback?.(k,r,i)),S=Ii(),C=x.useRef("touch"),E=()=>{i||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(Jye,{scope:n,value:r,disabled:i,textId:S,isSelected:f,onItemTextChange:x.useCallback(k=>{h(R=>R||(k?.textContent??"").trim())},[]),children:u.jsx(Hb.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:u.jsx(Be.div,{role:"option","aria-labelledby":S,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:b,onFocus:Re(s.onFocus,()=>y(!0)),onBlur:Re(s.onBlur,()=>y(!1)),onClick:Re(s.onClick,()=>{C.current!=="mouse"&&E()}),onPointerUp:Re(s.onPointerUp,()=>{C.current==="mouse"&&E()}),onPointerDown:Re(s.onPointerDown,k=>{C.current=k.pointerType}),onPointerMove:Re(s.onPointerMove,k=>{C.current=k.pointerType,i?d.onItemLeave?.():C.current==="mouse"&&k.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Re(s.onPointerLeave,k=>{k.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Re(s.onKeyDown,k=>{d.searchRef?.current!==""&&k.key===" "||(Lye.includes(k.key)&&E(),k.key===" "&&k.preventDefault())})})})})});L5.displayName=fy;var wm="SelectItemText",U5=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=il(wm,n),c=ol(wm,n),d=z5(wm,n),f=Bye(wm,n),[p,h]=x.useState(null),v=ct(t,E=>h(E),d.onItemTextChange,E=>c.itemTextRefCallback?.(E,d.value,d.disabled)),y=p?.textContent,b=x.useMemo(()=>u.jsx("option",{value:d.value,disabled:d.disabled,children:y},d.value),[d.disabled,d.value,y]),{onNativeOptionAdd:S,onNativeOptionRemove:C}=f;return qn(()=>(S(b),()=>C(b)),[S,C,b]),u.jsxs(u.Fragment,{children:[u.jsx(Be.span,{id:d.textId,...o,ref:v}),d.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Rd.createPortal(o.children,s.valueNode):null]})});U5.displayName=wm;var F5="SelectItemIndicator",V5=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return z5(F5,n).isSelected?u.jsx(Be.span,{"aria-hidden":!0,...r,ref:t}):null});V5.displayName=F5;var CC="SelectScrollUpButton",B5=x.forwardRef((e,t)=>{const n=ol(CC,e.__scopeSelect),r=SR(CC,e.__scopeSelect),[i,o]=x.useState(!1),s=ct(t,r.onScrollButtonChange);return qn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=d.scrollTop>0;o(f)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?u.jsx(q5,{...e,ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});B5.displayName=CC;var EC="SelectScrollDownButton",H5=x.forwardRef((e,t)=>{const n=ol(EC,e.__scopeSelect),r=SR(EC,e.__scopeSelect),[i,o]=x.useState(!1),s=ct(t,r.onScrollButtonChange);return qn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<f;o(p)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?u.jsx(q5,{...e,ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});H5.displayName=EC;var q5=x.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=ol("SelectScrollButton",n),s=x.useRef(null),c=qb(n),d=x.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return x.useEffect(()=>()=>d(),[d]),qn(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),u.jsx(Be.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Re(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Re(i.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Re(i.onPointerLeave,()=>{d()})})}),ebe="SelectSeparator",tbe=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return u.jsx(Be.div,{"aria-hidden":!0,...r,ref:t})});tbe.displayName=ebe;var kC="SelectArrow",nbe=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Gb(n),o=il(kC,n),s=ol(kC,n);return o.open&&s.position==="popper"?u.jsx(cR,{...i,...r,ref:t}):null});nbe.displayName=kC;var rbe="SelectBubbleInput",G5=x.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=x.useRef(null),o=ct(r,i),s=S1(t);return x.useEffect(()=>{const c=i.current;if(!c)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(s!==t&&p){const h=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(h)}},[s,t]),u.jsx(Be.select,{...n,style:{...v2,...n.style},ref:o,defaultValue:t})});G5.displayName=rbe;function K5(e){return e===""||e===void 0}function Z5(e){const t=fn(e),n=x.useRef(""),r=x.useRef(0),i=x.useCallback(s=>{const c=n.current+s;t(c),(function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),o=x.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function Y5(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=ibe(e,Math.max(o,0));i.length===1&&(s=s.filter(f=>f!==n));const d=s.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function ibe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var obe=S5,abe=C5,sbe=k5,lbe=R5,cbe=j5,ube=I5,dbe=O5,fbe=D5,mbe=M5,pbe=L5,hbe=U5,gbe=V5,vbe=B5,ybe=H5;function so({...e}){return u.jsx(obe,{"data-slot":"select",...e})}function Do({...e}){return u.jsx(fbe,{"data-slot":"select-group",...e})}function lo({...e}){return u.jsx(sbe,{"data-slot":"select-value",...e})}function co({className:e,children:t,...n}){return u.jsxs(abe,{"data-slot":"select-trigger",className:Le("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 flex h-9 w-fit items-center justify-between gap-2 rounded-md border bg-grey-700 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-[slot=select-value]:truncate *:data-[slot=select-value]:block *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[t,u.jsx(lbe,{asChild:!0,children:u.jsx(t2,{className:"opacity-50 size-4"})})]})}function uo({className:e,children:t,position:n="popper",...r}){return u.jsx(cbe,{children:u.jsxs(ube,{"data-slot":"select-content",className:Le("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-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[u.jsx(bbe,{}),u.jsx(dbe,{className:Le("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),u.jsx(xbe,{})]})})}function _R({className:e,...t}){return u.jsx(mbe,{"data-slot":"select-label",className:Le("px-2 py-1.5 text-sm font-medium",e),...t})}function vn({className:e,children:t,...n}){return u.jsxs(pbe,{"data-slot":"select-item",className:Le("focus:bg-grey-200 focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[u.jsx(hbe,{children:t}),u.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:u.jsx(gbe,{children:u.jsx(b1,{className:"size-4"})})})]})}function bbe({className:e,...t}){return u.jsx(vbe,{"data-slot":"select-scroll-up-button",className:Le("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(SW,{className:"size-4"})})}function xbe({className:e,...t}){return u.jsx(ybe,{"data-slot":"select-scroll-down-button",className:Le("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(t2,{className:"size-4"})})}const sD=new RegExp(/^\d+/);function wbe(e,t){const n=parseInt(e.match(sD)?.[0]||"0",10),r=parseInt(t.match(sD)?.[0]||"0",10);return n===r?0:n>r?1:-1}const W5=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],X5=["secs","mins","hrs"],my={bytes:1e3,secs:60};function Sbe(e,t,n){let r,i;switch(t){case"bytes":{r=W5,i=my.bytes;break}case"secs":{r=X5,i=my.secs;break}default:return e}const o=r.indexOf(n);if(o===-1)return e;const s=i**o;return e/s}function _be(e,t){let n,r;switch(e){case"bytes":n=W5,r=my.bytes;break;case"secs":n=X5,r=my.secs;break;default:return e}let i=0;for(;t>=r&&i<n.length-1;)t/=r,i++;return n[i]}function Aa(e,t=1){const n=e*t,r=_be("bytes",n),i=Sbe(n,"bytes",r);return`${new Intl.NumberFormat().format(Math.round(i))} ${r}`}function wv(e){return new Intl.NumberFormat().format(e)}const lD=["K","M","B","T","Qa","Qi","Sx","Sp","Oc","No","Dc"];function Yi(e){let n=e;if(Math.abs(n)<1e3)return String(Math.round(n));let r=-1;const i=10;do n/=1e3,++r;while(Math.round(Math.abs(n)*i)/i>=1e3&&r<lD.length-1);return`${wv(Math.round(n))} ${lD[r]}`}function Cbe({planLimits:e,resourcesPerInstance:t,selectedRegion:n}){const[r,i]=x.useState(!1),o=x.useCallback(()=>{i(!r)},[r,i]),s=An(e?.expirationMonths)&&e.expirationMonths<1e3&&e.expirationMonths,c=n?.purchasedBlockMultiplier??1,d=x.useMemo(()=>e?[An(e.totalReadCount)&&{label:"Total Reads",value:`${Yi(e.totalReadCount*c)} reads`},An(e.totalReadsBytes)&&{label:"Total Read Transfer",value:`${Aa(e.totalReadsBytes*c)}`},An(e.readsPerMinuteCount)&&{label:"Read Rate",value:`${Yi(e.readsPerMinuteCount*60*c)}/min`},An(e.readsPerMinuteBytes)&&{label:"Read Bandwidth",value:`${Aa(e.readsPerMinuteBytes*60*c)}/min`},An(e.totalWriteCount)&&{label:"Total Writes",value:`${Yi(e.totalWriteCount)} reads`},An(e.totalWritesBytes)&&{label:"Total Write Transfer",value:`${Aa(e.totalWritesBytes)}`},An(e.writesPerMinuteCount)&&{label:"Write Rate",value:`${Yi(e.writesPerMinuteCount*60)}/min`},An(e.writesPerMinuteBytes)&&{label:"Write Bandwidth",value:`${Aa(e.writesPerMinuteBytes*60)}/min`},An(e.totalRealTimeMessageDeliveries)&&{label:"Total Real-Time Messages",value:`${Yi(e.totalRealTimeMessageDeliveries*c)} messages`},An(e.totalRealTimeMessageDeliveryBytes)&&{label:"Total Real-Time Message Transfer",value:`${Aa(e.totalRealTimeMessageDeliveryBytes*c)}`},An(e.realTimeMessageDeliveriesPerMinute)&&{label:"Real-Time Message Rate",value:`${Yi(e.realTimeMessageDeliveriesPerMinute*60*c)}/min`},An(e.realTimeMessageDeliveryBytesPerMinute)&&{label:"Real-Time Message Bandwidth",value:`${Aa(e.realTimeMessageDeliveryBytesPerMinute*60*c)}/min`},An(e.tlsHandshakes)&&{label:"TLS Handshakes",value:`${Yi(e.tlsHandshakes*60*c)}`},An(e.applicationComputeHours)&&{label:"Application Compute Hours",value:`${Yi(e.applicationComputeHours*60*c)}`},t&&An(t.storageGb)&&{label:"Storage",value:`${Aa(t.storageGb*1e9)}`},s&&{label:"Expiration",value:La(s,"month","months")}].filter(sa):[],[s,e,t,c]);return e?An(e.totalReadCount)?u.jsxs(Oe,{className:"basis-full",children:[u.jsxs($e,{onClick:o,children:["Purchasing usage block for ",An(e.readsPerMinuteCount)?`${Yi(e.readsPerMinuteCount*c)} reads/min & `:"",Yi(e.totalReadCount*c)," total reads ",An(e.readsPerMinuteCount)?"in "+(n?.region??"")+" region":"per server",",",u.jsx("br",{className:"hidden sm:block"}),An(e.writesPerMinuteCount)?` ${Yi(e.writesPerMinuteCount)} writes/min & `:" ",Yi(e.totalWriteCount)," total writes",s&&`, for ${La(s,"month","months")}`,". Beta pricing subject to change",u.jsx("br",{className:"block sm:hidden"}),u.jsxs(Ce,{type:"button",variant:"link",className:"text-white",children:["Learn More ",r?u.jsx(QM,{}):u.jsx(Co,{})]})]}),u.jsx(Me,{children:u.jsxs("dl",{className:Le("divide-y divide-black overflow-hidden transition-[max-height] duration-200 ease-in",r?"max-h-fit":"max-h-0"),children:["This plan licenses Harper for the usage limits below, for the price listed above. The usage license expires ",s&&`in ${La(s,"month","months")} or `,"when any usage limit is reached. New usage blocks are automatically purchased/billed as blocks are consumed.",d.map((f,p)=>u.jsxs("div",{className:Le("px-4 py-1 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-3",p%2===0&&"bg-gray-700"),children:[u.jsx("dt",{className:"text-sm/6 font-medium text-gray-300",children:f.label}),u.jsx("dd",{className:"mt-1 text-sm/6 sm:col-span-2 sm:mt-0",children:f.value})]},f.label))]})}),u.jsx(De,{})]}):"This plan has no usage limits.":""}function Ebe({control:e,fieldArray:t,form:n,index:r,regionNameToLatencyToRegion:i,selectedPlan:o}){const s=x.useMemo(()=>Object.keys(i).sort(),[i]),c=n.watch("deploymentDescription")?.startsWith("Dedicated"),d=n.watch(`regionPlans.${r}.regionName`),f=n.watch(`regionPlans.${r}.latencyDescription`),p=x.useMemo(()=>Object.keys(i[d]||{}).sort(wbe).reverse(),[i,d]);x.useEffect(function(){if(d&&p?.length&&!p?.includes(f)){const y=f?.split(" ")[0].toLowerCase(),b=p.find(S=>y?S.split(" ")[0].toLowerCase()===y:!0)||p[0];n.setValue(`regionPlans.${r}.latencyDescription`,b),n.trigger()}},[p,n,r,f,d]);const h=x.useCallback(()=>{t?.remove(r),n.trigger()},[t,n,r]);return u.jsxs("div",{className:"md:col-span-6 col-span-3 p-4 rounded-md bg-accent gap-6 flex flex-wrap items-start",children:[u.jsx(Pe,{control:e,name:`regionPlans.${r}.regionName`,render:({field:v})=>u.jsxs(Oe,{className:"flex-1",children:[u.jsxs($e,{children:["Region ",t.fields.length>1?r+1:""]}),u.jsx(Me,{children:u.jsxs(so,{onValueChange:y=>{v.onChange(y),n.trigger()},...v,children:[u.jsx(co,{className:"w-full",children:u.jsx(lo,{placeholder:"Choose Region"})}),u.jsx(uo,{children:u.jsx(Do,{children:s.map(y=>u.jsx(vn,{value:y,children:y},y))})})]})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:e,name:`regionPlans.${r}.latencyDescription`,render:({field:v})=>u.jsxs(Oe,{className:"flex-1",children:[u.jsxs($e,{children:["Estimated ",c?"P95":"P90"," Latency, Distribution"]}),u.jsx(Me,{children:u.jsxs(so,{onValueChange:y=>{v.onChange(y),n.trigger()},...v,disabled:!p?.length,children:[u.jsx(co,{className:"w-full",children:u.jsx(lo,{placeholder:"Choose Latency Tier"})}),u.jsx(uo,{children:u.jsx(Do,{children:p.map(y=>u.jsx(vn,{value:y,children:y},y))})})]})}),u.jsx(De,{})]})}),t?.fields?.length&&t?.fields?.length>1&&u.jsx("div",{className:"flex-none mt-6",children:u.jsxs(Ce,{type:"button",variant:"destructiveOutline",size:"sm",onClick:h,children:[u.jsx(Ja,{})," ",u.jsx("span",{className:"sr-only",children:"Remove"})]})}),u.jsx(Cbe,{planLimits:o?.planLimits,resourcesPerInstance:o?.resourcesPerInstance,selectedRegion:i[d]?.[f]})]})}function kbe({form:e,regionLocations:t,regionNameToLatencyToRegion:n,selectedPlan:r,totalPrice:i}){const o=e.watch("regionPlans"),s=J2({control:e.control,name:"regionPlans"}),c=x.useMemo(()=>{const f=o.map(p=>n?.[p.regionName]?.[p.latencyDescription]?.region);return i?t?.find(p=>!f.includes(p.region)):null},[t,n,o,i]),d=x.useCallback(()=>{c&&(s.append({regionName:c.region,latencyDescription:c.latencyDescription}),e.trigger())},[e,c,s]);return t?.length?u.jsxs(u.Fragment,{children:[s.fields.map((f,p)=>u.jsx(Ebe,{control:e.control,fieldArray:s,form:e,index:p,regionNameToLatencyToRegion:n,selectedPlan:r},f.id)),c&&u.jsx("div",{className:"md:col-span-6 col-span-3",children:u.jsxs(Ce,{type:"button",variant:"positiveOutline",className:"rounded-full",onClick:d,children:[u.jsx(Mo,{}),"Add Additional Region Usage"]})})]}):u.jsx("div",{className:"md:col-span-6 col-span-3",children:u.jsx(Ov,{className:"mt-0 m-0",title:"No Regions Available",showReturnToHome:!1,error:{message:u.jsxs(u.Fragment,{children:["The deployment type you selected currently has no available regions. Please try a different deployment type, try again later, or ",u.jsx(lc,{}),"."]})}})})}const Q5=0,J5=65535;function Rbe({control:e,fieldArray:t,form:n,index:r}){const i=x.useCallback(()=>{t?.remove(r)},[t,r]);return u.jsxs("div",{className:"md:col-span-6 col-span-3 p-4 rounded-md bg-accent gap-6 flex flex-wrap items-start",children:[u.jsx(Pe,{control:e,name:`instances.${r}.secure`,render:({field:o})=>u.jsxs(Oe,{children:[u.jsxs($e,{children:["Instance ",t.fields.length>1?r+1:""]}),u.jsx(Me,{children:u.jsxs(so,{...o,onValueChange:s=>{o.onChange(s),n.trigger()},children:[u.jsx(co,{className:"w-full",children:u.jsx(lo,{placeholder:"https://"})}),u.jsx(uo,{children:u.jsxs(Do,{children:[u.jsx(vn,{value:"true",children:"https://"}),u.jsx(vn,{value:"false",children:"http://"})]})})]})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:e,name:`instances.${r}.fqdn`,render:({field:o})=>u.jsxs(Oe,{className:"flex-3",children:[u.jsx($e,{children:"Host Name"}),u.jsx(Me,{children:u.jsx(Ge,{...o,type:"text",autoCapitalize:"none",autoComplete:"off",autoCorrect:"off"})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:e,name:`instances.${r}.port`,render:({field:o})=>u.jsxs(Oe,{children:[u.jsx($e,{children:"Operations API Port"}),u.jsx(Me,{children:u.jsx(Ge,{...o,type:"number",min:Q5,max:J5,autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",placeholder:String(td),onChange:s=>{o.onChange(s.target.value?parseInt(s.target.value,10):void 0),n.trigger()}})}),u.jsx(De,{})]})}),t?.fields?.length&&t?.fields?.length>1&&u.jsx("div",{className:"flex-none mt-6",children:u.jsxs(Ce,{type:"button",variant:"destructiveOutline",size:"sm",onClick:i,children:[u.jsx(Ja,{})," ",u.jsx("span",{className:"sr-only",children:"Remove"})]})})]})}function jbe({form:e}){const t=J2({control:e.control,name:"instances"}),n=x.useCallback(()=>{t.append({secure:"true",fqdn:"",port:td})},[t]);return u.jsxs(u.Fragment,{children:[t.fields.map((r,i)=>u.jsx(Rbe,{control:e.control,fieldArray:t,form:e,index:i},r.id)),u.jsx("div",{className:"md:col-span-6 col-span-3",children:u.jsxs(Ce,{type:"button",variant:"positiveOutline",className:"rounded-full",onClick:n,children:[u.jsx(Mo,{}),"Add Instance"]})})]})}const cD=/(^$|^(?:localhost|(?: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}|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,})$)/i,py=En({clusterName:wt().nonempty("Please enter a cluster name.").max(255,"Cluster name cannot be longer than 255 characters long."),abbreviatedName:wt().max(20,"Must be at most 20 characters long.").regex(/^[a-zA-Z0-9-]*$/,"Can only contain letters, numbers and dashes").optional(),fqdn:wt().regex(cD,"Please enter a valid host name without the port or any path.").optional(),deploymentDescription:wt().nonempty("Please select a deployment tier."),performanceDescription:wt().nonempty("Please select a performance tier."),regionPlans:md(En({regionName:wt().nonempty("Please select a region."),latencyDescription:wt().nonempty("Please select a latency tier.")})).max(50,{error:"A maximum of 50 regions can be selected for each cluster. "}),instances:md(En({secure:Dd(["true","false"]),fqdn:wt().nonempty("Please enter the host name of your instance.").regex(cD,"Please enter a valid host name without the port or any path."),port:fk().min(Q5,"Positive thinking only, please.").max(J5,"That port number is too high.").optional()})).max(100,{error:"A maximum of 100 instances can be added to each cluster."}),skipToBilling:Vm().optional()}),uD={Colocated:"Shared infrastructure for optimized value",Dedicated:"Dedicated infrastructure for consistent performance","Self-Hosted":"Your own infrastructure"};function Ibe({calculatedNames:e,clusterId:t,deploymentToPerformanceToPlan:n,form:r,isPending:i,regionLocations:o,regionNameToLatencyToRegion:s,selectedDeployment:c,selectedPerformance:d,selectedPlan:f,totalPrice:p}){const{isDirty:h,isValid:v}=D1(),y=x.useMemo(()=>Object.keys(n[c]||{}).map(C=>{const E=C.slice(0,-1).split("(");if(E.length>1)return{performanceTier:C,name:E[0],description:E[1]};const k=C.split(" for ");return k.length>1?{performanceTier:C,name:k[0],description:"For "+k[1]}:{performanceTier:C,name:C,description:""}}),[n,c]),b=x.useMemo(()=>Object.keys(n).sort(),[n]);x.useEffect(function(){y?.length&&!y.find(E=>E.performanceTier===d)&&(r.setValue("performanceDescription",y[0].performanceTier),r.trigger())},[c,d,y,r]);const S=c==="Self-Hosted";return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"grid grid-cols-3 gap-6 text-white md:grid-cols-6",children:[u.jsx(Pe,{control:r.control,name:"clusterName",render:({field:C})=>u.jsxs(Oe,{className:"col-span-3 md:col-span-6",children:[u.jsx($e,{className:"pb-1",children:"Cluster Name"}),u.jsx(Me,{children:u.jsx(Ge,{autoFocus:!0,type:"text",maxLength:py.shape.clusterName.maxLength,autoCapitalize:"words",disabled:!!t,...C})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:r.control,name:"deploymentDescription",render:({field:C})=>u.jsxs(Oe,{className:"col-span-3",children:[u.jsx($e,{className:"pb-1",children:"Harper Deployment"}),u.jsx(x.Suspense,{fallback:u.jsx(Cr,{}),children:u.jsx(Me,{children:u.jsxs(so,{...C,disabled:!!t,onValueChange:E=>{C.onChange(E),r.trigger()},children:[u.jsx(co,{className:"w-full h-auto",children:u.jsx(lo,{placeholder:"Choose Tier"})}),u.jsx(uo,{children:u.jsx(Do,{children:b.map(E=>u.jsxs(vn,{value:E,children:[u.jsx("dt",{className:"text-left font-bold text-sm/6",children:E}),uD[E]&&u.jsx("dd",{className:"font-light",children:uD[E]})]},E))})})]})})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:r.control,name:"performanceDescription",render:({field:C})=>u.jsxs(Oe,{className:"col-span-3",children:[u.jsxs($e,{className:"pb-1",children:[c.startsWith("Self")?"Support":"Performance"," & Usage"]}),u.jsx(x.Suspense,{fallback:u.jsx(Cr,{}),children:u.jsx(Me,{children:u.jsxs(so,{...C,onValueChange:E=>{C.onChange(E),r.trigger()},disabled:!y?.length,children:[u.jsx(co,{className:"w-full h-auto",children:u.jsx(lo,{placeholder:"Choose Tier"})}),u.jsx(uo,{children:u.jsx(Do,{children:y.map(E=>u.jsxs(vn,{value:E.performanceTier,children:[u.jsx("dt",{className:"text-left font-bold text-sm/6",children:E.name}),E.description&&u.jsx("dd",{className:"font-light",children:E.description})]},E.name))})})]})})}),u.jsx(De,{})]})}),S?u.jsx(u.Fragment,{children:u.jsx(Pe,{control:r.control,name:"fqdn",render:({field:C})=>u.jsxs(Oe,{className:"md:col-span-6 col-span-3",children:[u.jsx($e,{className:"pb-1",children:"Optional Cluster Load Balancer Host Name"}),u.jsx(Me,{children:u.jsx(Ge,{...C,type:"text",autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",placeholder:"example.your-company.com",disabled:!!t})}),u.jsx(De,{})]})})}):u.jsxs(u.Fragment,{children:[u.jsx(Pe,{control:r.control,name:"abbreviatedName",render:({field:C})=>u.jsxs(Oe,{className:"col-span-3",children:[u.jsx($e,{className:"pb-1",children:"Host Name"}),u.jsx(Me,{children:u.jsx(Ge,{...C,type:"text",maxLength:py.shape.abbreviatedName.unwrap().maxLength,autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",placeholder:e.suggestedAbbreviatedName,disabled:!!t})}),u.jsx(De,{})]})}),u.jsxs(Oe,{className:"col-span-3 ",children:[u.jsx($e,{className:"pb-1",children:"Full Host Name"}),u.jsx(Me,{children:u.jsx("span",{children:e.fullHostName})}),u.jsx(De,{})]})]}),S?u.jsx(jbe,{form:r}):u.jsx(kbe,{form:r,regionLocations:o,regionNameToLatencyToRegion:s,selectedPlan:f,totalPrice:p})]}),u.jsx(er,{className:"mt-3 mb-12",children:u.jsxs(Ce,{type:"submit",variant:"submit",className:"rounded-full",disabled:i||!h||!v,children:[p>0?"Confirm Payment Details":t?"Edit Cluster":"Create New Cluster",u.jsx(Co,{})]})})]})}function eB(e){let{secure:t,fqdn:n,port:r}=e;return r||(r=td),n==="127.0.0.1"&&(n="localhost"),r===443&&t==="false"&&(t="true"),r===80&&t==="true"&&(t="false"),`${t==="true"?"https":"http"}://${n}${r===443||r===80?"":":"+r}`.toLowerCase()}function tB(e,t,n){const r=e.find(o=>(n?!!o.priceUsd:!o.priceUsd)&&o.deploymentType==="colocated")||e.find(o=>o.deploymentType==="colocated")||e[0],i=r?.allowedRegionIds;if(r){const o=i?t.filter(c=>i.includes(c.id)):t,s=o.find(c=>c.region==="US")||o[0];if(s)return{deploymentDescription:r.deploymentDescription,performanceDescription:r.performanceDescription,regionPlans:[{regionName:s.region,latencyDescription:s.latencyDescription}]}}return null}function Tbe(e,t,n){if(t&&n){const r=e.getValues();if(!r.deploymentDescription||!r.performanceDescription||!r.regionPlans.length){const i=tB(t,n);i&&(!r.deploymentDescription&&!r.performanceDescription&&(e.setValue("deploymentDescription",i.deploymentDescription),e.setValue("performanceDescription",i.performanceDescription)),r.regionPlans.length||e.setValue("regionPlans",i.regionPlans))}}}function Nbe({price:e}){const n=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).formatToParts(e||0);return u.jsx("span",{className:"text-4xl",children:n.map((r,i)=>u.jsx(Abe,{type:r.type,value:r.value},i))})}function Abe({type:e,value:t}){switch(e){case"currency":case"decimal":case"fraction":return u.jsx("sup",{className:"font-light text-xl",children:t});default:return t}}function RC(e){return(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1}function Obe(e,t){const n={};for(const r of e){const i=r[t];if(i!==void 0)if(Array.isArray(i))for(const o of i)n[o]||(n[o]=[]),n[o].push(r);else n[i]||(n[i]=[]),n[i].push(r)}return n}function Yd(e,t){const n={};for(const r of e){const i=r[t];if(i!==void 0)if(Array.isArray(i))for(const o of i)n[o]=r;else n[i]=r}return n}function jC(e,t,n){const r=Obe(e,t),i={};for(const o in r)i[o]=Yd(r[o],n);return i}function nB(e,t){if(t<=0)return"";if(e.length<=t)return e;const n=e.split("-");if(n.length===1)return n[0].slice(0,t);const r=[n[0],...n.slice(1).map(d=>d.charAt(0))],i=r.join("-");if(i.length<=t)return i;const o=r.slice(1).join("").length,s=r.length-1,c=t-o-s;if(c>0)return r[0]=r[0].slice(0,c),r.join("-");{const d=[];let f=0;t>0&&(d.push(n[0].charAt(0)),f=1);for(let p=1;p<r.length&&f+2<=t;p++)d.push(r[p]),f+=2;return d.join("-")}}function $be(e,t,n="-"){const r=t.split(n)[0];return e.findIndex(i=>i.startsWith(r))!==-1}function Kb(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function Dbe({alreadyUsingFree:e,clusterId:t,defaultValues:n,deploymentToPerformanceToPlan:r,organization:i,organizationId:o,planTypes:s,regionLocationsColocated:c,regionLocationsDedicated:d,setSavedClusterState:f,startOffOnBilling:p}){const h=bn(),v=mn(),y=kr(),{mutate:b,isPending:S}=Vve(),{mutate:C,isPending:E}=Hve(),[k,R]=x.useState(p),I=x.useMemo(()=>jC(c?.sort(RC("latencyDescription"))||[],"region","latencyDescription"),[c]),A=x.useMemo(()=>jC(d?.sort(RC("latencyDescription"))||[],"region","latencyDescription"),[d]),T=x.useCallback((V,ie)=>{const _e=new Set,Ie=r?.[V.deploymentDescription]?.[V.performanceDescription];if(V.deploymentDescription==="Self-Hosted")for(let Ae=0;Ae<V.instances.length;Ae++){const Ye=eB(V.instances[Ae]);_e.has(Ye)?ie.addIssue({code:"custom",path:[`instances.${Ae}.fqdn`],message:"Every instance url must be unique!"}):_e.add(Ye)}else{Ie?.priceUsd===0&&e&&ie.addIssue({code:"custom",path:["performanceDescription"],message:"Only one free cluster is allowed per organization."});const Ae=Ie?.deploymentDescription!=="Dedicated"?I:A;for(let Ye=0;Ye<V.regionPlans.length;Ye++){const jt=V.regionPlans[Ye],ln=Ae[jt.regionName]?.[jt.latencyDescription];_e.has(jt.regionName)?ie.addIssue({code:"custom",path:[`regionPlans.${Ye}.regionName`],message:"You can only select a region once!"}):_e.add(jt.regionName),Ie?.allowedRegionIds?.length&&ln?.id&&(Ie.allowedRegionIds.includes(ln.id)?Ye>=1&&ie.addIssue({code:"custom",path:[`regionPlans.${Ye}.regionName`],message:"You can only select one region with this performance tier!"}):$be(Ie.allowedRegionIds,ln.id)?ie.addIssue({code:"custom",path:[`regionPlans.${Ye}.latencyDescription`],message:"This latency is not available with the selected performance tier!"}):ie.addIssue({code:"custom",path:[`regionPlans.${Ye}.regionName`],message:"This region is not available with the selected performance tier!"}))}}},[e,I,A,r]),N=pn({mode:"onChange",resolver:wn(py.superRefine(T)),defaultValues:n}),[z,L]=x.useState(!0);x.useEffect(()=>{z&&n&&(f(null),L(!1))},[n,z,f]);const K=N.watch("clusterName"),ee=N.watch("abbreviatedName"),Z=N.watch("deploymentDescription"),Y=N.watch("performanceDescription"),B=N.watch("regionPlans"),W=N.watch("instances"),P=Z!=="Dedicated"?I:A,G=Z!=="Dedicated"?c:d;x.useEffect(function(){const ie=N.getValues(),_e=Z==="Self-Hosted";Z&&(_e?(ie.abbreviatedName&&N.setValue("abbreviatedName",""),ie.regionPlans.length&&N.setValue("regionPlans",[]),ie.instances.length||N.setValue("instances",[{secure:"true",fqdn:"",port:td}])):(ie.fqdn&&N.setValue("fqdn",""),ie.instances.length&&N.setValue("instances",[]),ie.regionPlans.length||Tbe(N,s,G)))},[N,s,G,Z]);const U=x.useMemo(()=>{const V=nB(Kb(K),py.shape.abbreviatedName.unwrap().maxLength);return{suggestedAbbreviatedName:V,fullHostName:`${ee||V}.${i.subdomain||"your-org"}.harperfabric.com`}},[K,ee,i]),te=x.useMemo(()=>r?.[Z]?.[Y],[r,Z,Y]);x.useEffect(function(){const ie=te?.allowedRegionIds;if(ie?.length&&B?.length===1){const _e=B[0],Ie=P?.[_e.regionName]?.[_e.latencyDescription];if(!ie.includes(Ie?.id)){const He=G?.filter(Ye=>ie.includes(Ye.id)),Ae=He?.find(Ye=>Ye.region==="US")||He?.[0];Ae&&(N.setValue("regionPlans.0.regionName",Ae.region),N.setValue("regionPlans.0.latencyDescription",Ae.latencyDescription),N.trigger())}}},[te,B,N,P,G]),x.useEffect(function(){if(!(Z==="Self-Hosted")&&Object.keys(P).length&&B.length)for(let _e=0;_e<B.length;_e++){const Ie=B[_e];P[Ie.regionName]||N.setValue(`regionPlans.${_e}.regionName`,"")}},[N,P,Z,B]);const $=te?.priceUsd?Z==="Self-Hosted"?W.length*te.priceUsd:B.reduce((V,ie)=>{const _e=P?.[ie.regionName]?.[ie.latencyDescription];return V+(_e?te.priceUsd*_e.instanceCount/2:0)},0):0,M=x.useCallback(({creating:V,deploymentDescription:ie})=>Ee.message(V?"Creating Cluster":"Updating Cluster",{description:u.jsx(Uve,{message:"This may take a little bit, hold tight!",lateMessage:"Still working on it... why don't you grab a coffee, and I'll let you know when it's done?",duration:ie==="Dedicated"?6e4:5e3}),duration:12e4}),[]),F=x.useCallback(({clusterId:V,creating:ie,toastId:_e,isSelfManaged:Ie})=>{y.invalidateQueries({queryKey:[o],refetchType:"active"}),ie||y.invalidateQueries({queryKey:[V],refetchType:"active"}),v.invalidate(),h(Ie?{to:`/${o}/${V}/instances`}:ie?{to:`/${o}/${V}/starting-up`}:{to:`/${o}/${V}/scaling`}),N.reset(),Ee.success(ie?"Cluster Created":"Cluster Updated",{id:_e,description:Ie?void 0:ie?"It is being provisioned now.":"The updates are being provisioned now.",duration:5e3})},[y,v,h,o,N]),O=x.useCallback(async()=>{const V=N.getValues(),ie=[],_e=r[V.deploymentDescription][V.performanceDescription],Ie=V.deploymentDescription==="Self-Hosted";if(Ie)for(const Ye of V.instances)ie.push({autoRenew:!0,instanceFqdn:Ye.fqdn,operationsApiPort:Ye.port||td,operationsApiSecure:Ye.secure==="true",planId:_e.id});else for(const Ye of V.regionPlans){const jt=P[Ye.regionName][Ye.latencyDescription];ie.push({autoRenew:!0,planId:_e.id,regionId:jt.id})}f(null);const He=M({creating:!t,deploymentDescription:V.deploymentDescription}),Ae=()=>Ee.dismiss(He);t?C({id:t,regionPlans:ie},{onSuccess:Ye=>F({clusterId:Ye.id,isSelfManaged:Ie,creating:!1,toastId:He}),onError:Ae}):b({abbreviatedName:Ie?void 0:V.abbreviatedName||U.suggestedAbbreviatedName,autoRenew:!0,fqdn:Ie&&V.fqdn||void 0,name:V.clusterName,organizationId:o,regionPlans:ie},{onSuccess:Ye=>F({clusterId:Ye.id,isSelfManaged:Ie,creating:!0,toastId:He}),onError:Ae})},[U.suggestedAbbreviatedName,t,r,N,F,M,o,P,f,C,b]),J=x.useCallback(()=>{if($>0){R(!0);return}return O()},[O,$]),de=x.useCallback(V=>{f(V?{clusterId:t,...N.getValues(),skipToBilling:!0}:null)},[t,N,f]),pe=x.useCallback(()=>{R(!1)},[]);return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"absolute top-3 right-12 text-right",children:[u.jsx("dt",{className:"font-light",children:"Total Price"}),u.jsx("dd",{className:"font-bold",children:u.jsx(Nbe,{price:$})})]}),u.jsx(hn,{...N,children:k?u.jsxs(u.Fragment,{children:[u.jsx("h1",{className:"text-lg leading-none text-white font-semibold mb-4",children:"Cluster Billing"}),u.jsx("p",{className:"text-muted-foreground text-sm mb-2",children:"Please confirm the following billing details:"}),u.jsx(Mye,{clusterId:t,isPending:S||E,onGoBackToDetails:pe,onSaveStateForBillingRedirect:de,onSubmit:O,organizationId:o,selectedPlan:te})]}):u.jsxs(u.Fragment,{children:[u.jsx("h1",{className:"text-lg leading-none text-white font-semibold mb-4",children:"Cluster Configuration"}),u.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"Configure your Harper cluster and define deployment plans."}),u.jsx("form",{onSubmit:N.handleSubmit(J),children:u.jsx(Ibe,{calculatedNames:U,clusterId:t,deploymentToPerformanceToPlan:r,form:N,isPending:S||E,regionLocations:G,regionNameToLatencyToRegion:P,selectedDeployment:Z,selectedPerformance:Y,selectedPlan:te,totalPrice:$})})]})})]})}function CR(e){try{return e==="null"||e==="undefined"||e===null||e===void 0?null:JSON.parse(e)}catch(t){return console.error("safeParse failed to parse value, returning null instead",t),null}}function Pbe(e,t){return CR(localStorage.getItem(e))??t}function Mbe(e,t){t==null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))}function Zb(e,t){const n=x.useState(Pbe(e,t)),[r]=n;return x.useEffect(()=>Mbe(e,r),[e,r]),n}var Kp=(e=>(e.SavedClusterState="SavedClusterState",e))(Kp||{});function ER(){const{organizationId:e,clusterId:t}=tt({strict:!1}),{create:n,update:r}=Gy(e),{organization:i,cluster:o}=Uy({strict:!1}),[s,c]=Zb(Kp.SavedClusterState,null),{data:d}=Ut(zve(e)),{data:f}=Ut(Q$({availableHosts:!0,organizationId:e})),{data:p}=Ut(Q$({organizationId:e})),h=x.useMemo(()=>{for(const S of i?.clusters??[])if(S.id!==o?.id&&d&&S.status!=="TERMINATED"&&S.plans)for(const C of S.plans){const E=d.find(k=>k.id===C.planId);if(E?.priceUsd===0&&!E.id.startsWith("self-hosted"))return!0}return!1},[o?.id,i?.clusters,d]),v=x.useMemo(()=>jC(d?.sort(RC("priceUsd"))||[],"deploymentDescription","performanceDescription"),[d]),y=x.useMemo(()=>{if(s)return{...s,clusterName:s.clusterName||"",fqdn:s.fqdn||"",regionPlans:s.regionPlans||[],instances:s.instances||[]};if(!d||!f||!p||t&&!o)return null;const S=d?.find(A=>A.id===o?.plans?.[0].planId),C=[],E=[],k=S?.deploymentDescription!=="Dedicated"?f:p,R=tB(d,k,h);let I=!1;if(o){if(o.plans){for(const A of o.plans)if(A.regionId){const T=k.find(N=>N.id===A.regionId);T&&C.push({regionName:T.region,latencyDescription:T.latencyDescription})}}if(!C.length&&o.instances)for(const A of o.instances)A.status!=="REMOVED"&&(I=!0,E.push({fqdn:A.instanceFqdn,port:A.operationsApiPort,secure:A.operationsApiSecure?"true":"false"}))}else R&&C.push(...R.regionPlans);return!I&&!C.length&&C.push({regionName:"",latencyDescription:""}),{autoRenew:o?.plans?.[0]?.autoRenew??!0,clusterName:o?.name??"",abbreviatedName:o?.abbreviatedName??"",deploymentDescription:S?.deploymentDescription??R?.deploymentDescription??"",performanceDescription:S?.performanceDescription??R?.performanceDescription??"",fqdn:I?o?.fqdn??"":"",instances:E,regionPlans:C}},[h,o,t,d,f,p,s]);return!y||!i||!d||!f||!p?u.jsx(Ug,{children:u.jsx(go,{centered:!0,text:"Loading..."})}):(o?.id?!r:!n)?u.jsx(Ug,{children:u.jsx(Ov,{title:"Not Allowed",error:{message:u.jsxs(u.Fragment,{children:["You do not have permission to ",o?.id?"update":"create"," clusters in this org."]})}})}):d.length===0?u.jsx(Ug,{children:u.jsx(Ov,{title:`Cluster ${t?"Modification":"Creation"} Not Currently Allowed`,error:{message:u.jsxs(u.Fragment,{children:["There are no available deployment types right now! Please try again later, or ",u.jsx(lc,{}),"."]})}})}):u.jsx(Ug,{children:u.jsx(Dbe,{alreadyUsingFree:h,clusterId:t,defaultValues:y,deploymentToPerformanceToPlan:v,organization:i,organizationId:e,planTypes:d,regionLocationsColocated:f,regionLocationsDedicated:p,setSavedClusterState:c,startOffOnBilling:s?.skipToBilling===!0})})}const IC={UPDATING:0,PROVISIONING:1,RUNNING:2,TERMINATED:3},Bg=IC.RUNNING;function zbe(e,t){if(e.status===t.status)return e.name.localeCompare(t.name);const n=e.status?IC[e.status]??Bg:Bg,r=t.status?IC[t.status]??Bg:Bg;return n-r}function rB(e,t){const n=t.toLowerCase();return r=>{for(const i of e){const o=r[i];if(o!=null)if(typeof o=="string"){if(o.toLowerCase().includes(n))return!0}else if(typeof o=="boolean"){if(o&&(n==="yes"||n==="true"||n==="1")||!o&&(n==="no"||n==="false"||n==="0"))return!0}else throw new Error("curryFilterByFuzzySearch has not implemented support for "+typeof o+" fields yet!")}return!1}}function Lbe(){const{organizationId:e}=tt({strict:!1}),{create:t}=Gy(e),{data:n,isSuccess:r}=fo(jc(e)),[i]=Zb(Kp.SavedClusterState,null),[o,s]=x.useState(""),c=x.useCallback(()=>s(""),[]),d=x.useCallback(h=>{s(h.currentTarget.value?.toLowerCase()||"")},[]),f=x.useMemo(()=>n?.clusters?.slice().filter(h=>h.status!=="TERMINATED").sort(zbe)||[],[n?.clusters]),p=x.useMemo(()=>f.filter(rB(["id","name"],o))||[],[o,f]);return n&&f.length===0&&t?u.jsx(ER,{}):i?u.jsx(Gl,{to:`/${e}/new-cluster`}):u.jsxs(u.Fragment,{children:[u.jsx(la,{children:r?u.jsxs("div",{className:"flex w-full justify-end gap-2",children:[u.jsx(Ge,{placeholder:"Filter by name",className:"inline-block w-48 md:w-64 bg-black border",value:o,onChange:d}),t&&u.jsx(We,{to:"new-cluster",children:u.jsxs(Ce,{variant:"positive",className:"w-full rounded-full md:w-44",accessKey:"n",children:[u.jsx(Mo,{})," ",u.jsxs("span",{children:[u.jsx("u",{children:"N"}),"ew Cluster"]})]})})]}):null}),u.jsx("section",{className:"mt-40 md:mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-12 mb-4",children:[p.map(h=>u.jsx("div",{className:"col-span-1 md:col-span-4 lg:col-span-3 2xl:col-span-2",children:u.jsx(Pve,{cluster:h})},h.id)),!p.length&&u.jsxs("div",{className:"col-span-1 md:col-span-12 text-center",children:[u.jsx("h2",{className:"my-4 text-xl",children:"No matches found."}),u.jsx(Ce,{variant:"outline",onClick:c,children:"Clear Filters"})]})]})})]})}function iB(){const e=URL.parse(location.href);return e?.hash?e.hash.startsWith("#/")?e.hash.slice(1):e.hash:"/"}function oB(){return"/#"+iB()}function Ube(){const{organizationId:e}=tt({strict:!1}),t=bn(),r=new URLSearchParams(window.location.search).get("setup_intent_client_secret"),{setup_intent_client_secret:i}=Er({strict:!1}),[o]=Zb(Kp.SavedClusterState,null),s=r||i,c=y5(),d=p5(e),f=x.useCallback(()=>{const p=o?o.clusterId?`../../${o.clusterId}/edit`:"../../new-cluster":"../";window.history.replaceState(null,"",oB()),t({search:void 0,to:p})},[t,o]);return x.useEffect(()=>{!c||!s||!d||!e||!f||(async function(){try{const{setupIntent:p}=await c.retrieveSetupIntent(s);switch(p?.status){case"succeeded":p.payment_method!==null?d(p.payment_method,f):(Ee.error("Failed to process payment method details. Please try another payment method."),f());break;case"processing":Ee.warning("Processing payment method. Please check back later."),f();break;case"requires_payment_method":Ee.error("Failed to process payment method details. Please try another payment method."),f();break;default:Ee.error("Failed to process payment method details. Please try another payment method."),f();break}}catch(p){console.error(p),Ee.error("Failed to process payment method details. Please try another payment method."),f()}})()},[s,f,e,d,c]),u.jsx(go,{centered:!0})}function Fbe(){return u.jsx(x5,{children:u.jsx(Ube,{})})}function vr({clusterId:e,instanceId:t,organizationId:n},r){return"/"+[n,e,t&&"instance",t,r].filter(sa).join("/")}const Tm="flex items-center p-2 rounded-lg group",hy={className:"text-white hover:bg-gray-700"},gy={className:"text-black bg-white pointer-events-none cursor-default"};function Vbe(){const{organizationId:e}=tt({strict:!1}),{update:t}=qy(e);return t?u.jsxs(u.Fragment,{children:[u.jsx(la,{}),u.jsx("div",{className:"mt-40 md:mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:u.jsxs("div",{className:"md:grid gap-4 md:grid-cols-12 min-h-[calc(100vh-theme(spacing.36))] mb-12",children:[u.jsxs("section",{className:"col-span-1 text-white md:col-span-4 lg:col-span-3 md:border-r-1 border-b md:border-b-0 md:pr-4 border-gray-700",children:[u.jsx(Bbe,{}),u.jsx(Hbe,{})]}),u.jsx("section",{className:"col-span-1 text-white md:col-span-8 lg:col-span-9",children:u.jsx(el,{})})]})})]}):u.jsx("div",{className:"mt-40 md:mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:"You don't have access to manage payments for this organization. Please contact your administrator."})}function Bbe(){const e=tt({strict:!1});return u.jsxs("div",{className:"hidden md:block",children:[u.jsxs("span",{className:Tm,children:[u.jsx(RX,{className:"inline-block"}),u.jsx("h3",{className:"ms-3 text-2xl font-extrabold dark:text-white",children:"Billing"})]}),u.jsxs("ul",{className:"border-t border-gray-700 pt-4 mt-4 space-y-2",children:[u.jsx("li",{children:u.jsxs(We,{to:vr(e,"billing"),className:Tm,activeOptions:{exact:!0},inactiveProps:hy,activeProps:gy,children:[u.jsx(i2,{className:"inline-block"})," ",u.jsx("span",{className:"ms-3",children:"Payment Method"})]})}),u.jsx("li",{children:u.jsxs(We,{to:vr(e,"billing/invoices"),className:Tm,inactiveProps:hy,activeProps:gy,children:[u.jsx(u2,{className:"inline-block"}),u.jsx("span",{className:"ms-3",children:"Invoices & Payments"})]})})]})]})}function Hbe(){const e=tt({strict:!1});return u.jsxs("ul",{className:"flex space-x-4 md:hidden py-2",children:[u.jsx("li",{children:u.jsxs(We,{to:vr(e,"billing"),className:Tm,activeOptions:{exact:!0},inactiveProps:hy,activeProps:gy,children:[u.jsx(i2,{className:"inline-block"})," ",u.jsx("span",{className:"ms-3",children:"Payment Method"})]})}),u.jsx("li",{children:u.jsxs(We,{to:vr(e,"billing/invoices"),className:Tm,inactiveProps:hy,activeProps:gy,children:[u.jsx(u2,{className:"inline-block"})," ",u.jsx("span",{className:"ms-3",children:"Invoices & Payments"})]})})]})}/**
|
|
489
|
-
* table-core
|
|
490
|
-
*
|
|
491
|
-
* Copyright (c) TanStack
|
|
492
|
-
*
|
|
493
|
-
* This source code is licensed under the MIT license found in the
|
|
494
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
495
|
-
*
|
|
496
|
-
* @license MIT
|
|
497
|
-
*/function Yb(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Ms(e,t){return typeof e=="function"?e(t):e}function $i(e,t){return n=>{t.setState(r=>({...r,[e]:Ms(n,r[e])}))}}function Wb(e){return e instanceof Function}function qbe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Gbe(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const s=t(o);s!=null&&s.length&&r(s)})};return r(e),n}function Qe(e,t,n){let r=[],i;return o=>{let s;n.key&&n.debug&&(s=Date.now());const c=e(o);if(!(c.length!==r.length||c.some((p,h)=>r[h]!==p)))return i;r=c;let f;if(n.key&&n.debug&&(f=Date.now()),i=t(...c),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const p=Math.round((Date.now()-s)*100)/100,h=Math.round((Date.now()-f)*100)/100,v=h/16,y=(b,S)=>{for(b=String(b);b.length<S;)b=" "+b;return b};console.info(`%c⏱ ${y(h,5)} /${y(p,5)} ms`,`
|
|
498
|
-
font-size: .6rem;
|
|
499
|
-
font-weight: bold;
|
|
500
|
-
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,n?.key)}return i}}function Je(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function Kbe(e,t,n,r){const i=()=>{var s;return(s=o.getValue())!=null?s:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:Qe(()=>[e,n,t,o],(s,c,d,f)=>({table:s,column:c,row:d,cell:f,getValue:f.getValue,renderValue:f.renderValue}),Je(e.options,"debugCells"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(o,n,t,e)},{}),o}function Zbe(e,t,n,r){var i,o;const c={...e._getDefaultColumnDef(),...t},d=c.accessorKey;let f=(i=(o=c.id)!=null?o:d?typeof String.prototype.replaceAll=="function"?d.replaceAll(".","_"):d.replace(/\./g,"_"):void 0)!=null?i:typeof c.header=="string"?c.header:void 0,p;if(c.accessorFn?p=c.accessorFn:d&&(d.includes(".")?p=v=>{let y=v;for(const S of d.split(".")){var b;y=(b=y)==null?void 0:b[S]}return y}:p=v=>v[c.accessorKey]),!f)throw new Error;let h={id:`${String(f)}`,accessorFn:p,parent:r,depth:n,columnDef:c,columns:[],getFlatColumns:Qe(()=>[!0],()=>{var v;return[h,...(v=h.columns)==null?void 0:v.flatMap(y=>y.getFlatColumns())]},Je(e.options,"debugColumns")),getLeafColumns:Qe(()=>[e._getOrderColumnsFn()],v=>{var y;if((y=h.columns)!=null&&y.length){let b=h.columns.flatMap(S=>S.getLeafColumns());return v(b)}return[h]},Je(e.options,"debugColumns"))};for(const v of e._features)v.createColumn==null||v.createColumn(h,e);return h}const xr="debugHeaders";function dD(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],c=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(c),s.push(d)};return c(o),s},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(o,e)}),o}const Ybe={createTable:e=>{e.getHeaderGroups=Qe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,s;const c=(o=r?.map(h=>n.find(v=>v.id===h)).filter(Boolean))!=null?o:[],d=(s=i?.map(h=>n.find(v=>v.id===h)).filter(Boolean))!=null?s:[],f=n.filter(h=>!(r!=null&&r.includes(h.id))&&!(i!=null&&i.includes(h.id)));return Hg(t,[...c,...f,...d],e)},Je(e.options,xr)),e.getCenterHeaderGroups=Qe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Hg(t,n,e,"center")),Je(e.options,xr)),e.getLeftHeaderGroups=Qe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(s=>n.find(c=>c.id===s)).filter(Boolean))!=null?i:[];return Hg(t,o,e,"left")},Je(e.options,xr)),e.getRightHeaderGroups=Qe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(s=>n.find(c=>c.id===s)).filter(Boolean))!=null?i:[];return Hg(t,o,e,"right")},Je(e.options,xr)),e.getFooterGroups=Qe(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Je(e.options,xr)),e.getLeftFooterGroups=Qe(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Je(e.options,xr)),e.getCenterFooterGroups=Qe(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Je(e.options,xr)),e.getRightFooterGroups=Qe(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Je(e.options,xr)),e.getFlatHeaders=Qe(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Je(e.options,xr)),e.getLeftFlatHeaders=Qe(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Je(e.options,xr)),e.getCenterFlatHeaders=Qe(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Je(e.options,xr)),e.getRightFlatHeaders=Qe(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Je(e.options,xr)),e.getCenterLeafHeaders=Qe(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Je(e.options,xr)),e.getLeftLeafHeaders=Qe(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Je(e.options,xr)),e.getRightLeafHeaders=Qe(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Je(e.options,xr)),e.getLeafHeaders=Qe(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,s,c,d,f;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(s=(c=n[0])==null?void 0:c.headers)!=null?s:[],...(d=(f=r[0])==null?void 0:f.headers)!=null?d:[]].map(p=>p.getLeafHeaders()).flat()},Je(e.options,xr))}};function Hg(e,t,n,r){var i,o;let s=0;const c=function(v,y){y===void 0&&(y=1),s=Math.max(s,y),v.filter(b=>b.getIsVisible()).forEach(b=>{var S;(S=b.columns)!=null&&S.length&&c(b.columns,y+1)},0)};c(e);let d=[];const f=(v,y)=>{const b={depth:y,id:[r,`${y}`].filter(Boolean).join("_"),headers:[]},S=[];v.forEach(C=>{const E=[...S].reverse()[0],k=C.column.depth===b.depth;let R,I=!1;if(k&&C.column.parent?R=C.column.parent:(R=C.column,I=!0),E&&E?.column===R)E.subHeaders.push(C);else{const A=dD(n,R,{id:[r,y,R.id,C?.id].filter(Boolean).join("_"),isPlaceholder:I,placeholderId:I?`${S.filter(T=>T.column===R).length}`:void 0,depth:y,index:S.length});A.subHeaders.push(C),S.push(A)}b.headers.push(C),C.headerGroup=b}),d.push(b),y>0&&f(S,y-1)},p=t.map((v,y)=>dD(n,v,{depth:s,index:y}));f(p,s-1),d.reverse();const h=v=>v.filter(b=>b.column.getIsVisible()).map(b=>{let S=0,C=0,E=[0];b.subHeaders&&b.subHeaders.length?(E=[],h(b.subHeaders).forEach(R=>{let{colSpan:I,rowSpan:A}=R;S+=I,E.push(A)})):S=1;const k=Math.min(...E);return C=C+k,b.colSpan=S,b.rowSpan=C,{colSpan:S,rowSpan:C}});return h((i=(o=d[0])==null?void 0:o.headers)!=null?i:[]),d}const Wbe=(e,t,n,r,i,o,s)=>{let c={id:t,index:r,original:n,depth:i,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(c._valuesCache.hasOwnProperty(d))return c._valuesCache[d];const f=e.getColumn(d);if(f!=null&&f.accessorFn)return c._valuesCache[d]=f.accessorFn(c.original,r),c._valuesCache[d]},getUniqueValues:d=>{if(c._uniqueValuesCache.hasOwnProperty(d))return c._uniqueValuesCache[d];const f=e.getColumn(d);if(f!=null&&f.accessorFn)return f.columnDef.getUniqueValues?(c._uniqueValuesCache[d]=f.columnDef.getUniqueValues(c.original,r),c._uniqueValuesCache[d]):(c._uniqueValuesCache[d]=[c.getValue(d)],c._uniqueValuesCache[d])},renderValue:d=>{var f;return(f=c.getValue(d))!=null?f:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Gbe(c.subRows,d=>d.subRows),getParentRow:()=>c.parentId?e.getRow(c.parentId,!0):void 0,getParentRows:()=>{let d=[],f=c;for(;;){const p=f.getParentRow();if(!p)break;d.push(p),f=p}return d.reverse()},getAllCells:Qe(()=>[e.getAllLeafColumns()],d=>d.map(f=>Kbe(e,c,f,f.id)),Je(e.options,"debugRows")),_getAllCellsByColumnId:Qe(()=>[c.getAllCells()],d=>d.reduce((f,p)=>(f[p.column.id]=p,f),{}),Je(e.options,"debugRows"))};for(let d=0;d<e._features.length;d++){const f=e._features[d];f==null||f.createRow==null||f.createRow(c,e)}return c},Xbe={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},aB=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};aB.autoRemove=e=>jo(e);const sB=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};sB.autoRemove=e=>jo(e);const lB=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};lB.autoRemove=e=>jo(e);const cB=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};cB.autoRemove=e=>jo(e);const uB=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});uB.autoRemove=e=>jo(e)||!(e!=null&&e.length);const dB=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});dB.autoRemove=e=>jo(e)||!(e!=null&&e.length);const fB=(e,t,n)=>e.getValue(t)===n;fB.autoRemove=e=>jo(e);const mB=(e,t,n)=>e.getValue(t)==n;mB.autoRemove=e=>jo(e);const kR=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};kR.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(i)?1/0:i;if(o>s){const c=o;o=s,s=c}return[o,s]};kR.autoRemove=e=>jo(e)||jo(e[0])&&jo(e[1]);const Oa={includesString:aB,includesStringSensitive:sB,equalsString:lB,arrIncludes:cB,arrIncludesAll:uB,arrIncludesSome:dB,equals:fB,weakEquals:mB,inNumberRange:kR};function jo(e){return e==null||e===""}const Qbe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:$i("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Oa.includesString:typeof r=="number"?Oa.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Oa.equals:Array.isArray(r)?Oa.arrIncludes:Oa.weakEquals},e.getFilterFn=()=>{var n,r;return Wb(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Oa[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(p=>p.id===e.id),s=Ms(n,o?o.value:void 0);if(fD(i,s,e)){var c;return(c=r?.filter(p=>p.id!==e.id))!=null?c:[]}const d={id:e.id,value:s};if(o){var f;return(f=r?.map(p=>p.id===e.id?d:p))!=null?f:[]}return r!=null&&r.length?[...r,d]:[d]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=Ms(t,i))==null?void 0:o.filter(s=>{const c=n.find(d=>d.id===s.id);if(c){const d=c.getFilterFn();if(fD(d,s.value,c))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function fD(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Jbe=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),exe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},txe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},nxe=(e,t,n)=>{let r,i;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r===void 0?s>=s&&(r=i=s):(r>s&&(r=s),i<s&&(i=s)))}),[r,i]},rxe=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},ixe=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!qbe(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,s)=>o-s);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},oxe=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),axe=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,sxe=(e,t)=>t.length,PS={sum:Jbe,min:exe,max:txe,extent:nxe,mean:rxe,median:ixe,unique:oxe,uniqueCount:axe,count:sxe},lxe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:$i("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return PS.sum;if(Object.prototype.toString.call(r)==="[object Date]")return PS.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Wb(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:PS[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function cxe(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(s=>s.id===o)).filter(Boolean),...r]}const uxe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:$i("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Qe(n=>[Nm(t,n)],n=>n.findIndex(r=>r.id===e.id),Je(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Nm(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=Nm(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Qe(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const s=[...t],c=[...i];for(;c.length&&s.length;){const d=s.shift(),f=c.findIndex(p=>p.id===d);f>-1&&o.push(c.splice(f,1)[0])}o=[...o,...c]}return cxe(o,n,r)},Je(e.options,"debugTable"))}},MS=()=>({left:[],right:[]}),dxe={getInitialState:e=>({columnPinning:MS(),...e}),getDefaultOptions:e=>({onColumnPinningChange:$i("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,s;if(n==="right"){var c,d;return{left:((c=i?.left)!=null?c:[]).filter(h=>!(r!=null&&r.includes(h))),right:[...((d=i?.right)!=null?d:[]).filter(h=>!(r!=null&&r.includes(h))),...r]}}if(n==="left"){var f,p;return{left:[...((f=i?.left)!=null?f:[]).filter(h=>!(r!=null&&r.includes(h))),...r],right:((p=i?.right)!=null?p:[]).filter(h=>!(r!=null&&r.includes(h)))}}return{left:((o=i?.left)!=null?o:[]).filter(h=>!(r!=null&&r.includes(h))),right:((s=i?.right)!=null?s:[]).filter(h=>!(r!=null&&r.includes(h)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,s;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(c=>c.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(c=>r?.includes(c)),s=n.some(c=>i?.includes(c));return o?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Qe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(s=>!o.includes(s.column.id))},Je(t.options,"debugRows")),e.getLeftVisibleCells=Qe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Je(t.options,"debugRows")),e.getRightVisibleCells=Qe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Je(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?MS():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:MS())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Qe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Je(e.options,"debugColumns")),e.getRightLeafColumns=Qe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Je(e.options,"debugColumns")),e.getCenterLeafColumns=Qe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Je(e.options,"debugColumns"))}};function fxe(e){return e||(typeof document<"u"?document:null)}const qg={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},zS=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),mxe={getDefaultColumnDef:()=>qg,getInitialState:e=>({columnSizing:{},columnSizingInfo:zS(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:$i("columnSizing",e),onColumnSizingInfoChange:$i("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:qg.minSize,(r=o??e.columnDef.size)!=null?r:qg.size),(i=e.columnDef.maxSize)!=null?i:qg.maxSize)},e.getStart=Qe(n=>[n,Nm(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Je(t.options,"debugColumns")),e.getAfter=Qe(n=>[n,Nm(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Je(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),LS(o)&&o.touches&&o.touches.length>1))return;const s=e.getSize(),c=e?e.getLeafHeaders().map(E=>[E.column.id,E.column.getSize()]):[[r.id,r.getSize()]],d=LS(o)?Math.round(o.touches[0].clientX):o.clientX,f={},p=(E,k)=>{typeof k=="number"&&(t.setColumnSizingInfo(R=>{var I,A;const T=t.options.columnResizeDirection==="rtl"?-1:1,N=(k-((I=R?.startOffset)!=null?I:0))*T,z=Math.max(N/((A=R?.startSize)!=null?A:0),-.999999);return R.columnSizingStart.forEach(L=>{let[K,ee]=L;f[K]=Math.round(Math.max(ee+ee*z,0)*100)/100}),{...R,deltaOffset:N,deltaPercentage:z}}),(t.options.columnResizeMode==="onChange"||E==="end")&&t.setColumnSizing(R=>({...R,...f})))},h=E=>p("move",E),v=E=>{p("end",E),t.setColumnSizingInfo(k=>({...k,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},y=fxe(n),b={moveHandler:E=>h(E.clientX),upHandler:E=>{y?.removeEventListener("mousemove",b.moveHandler),y?.removeEventListener("mouseup",b.upHandler),v(E.clientX)}},S={moveHandler:E=>(E.cancelable&&(E.preventDefault(),E.stopPropagation()),h(E.touches[0].clientX),!1),upHandler:E=>{var k;y?.removeEventListener("touchmove",S.moveHandler),y?.removeEventListener("touchend",S.upHandler),E.cancelable&&(E.preventDefault(),E.stopPropagation()),v((k=E.touches[0])==null?void 0:k.clientX)}},C=pxe()?{passive:!1}:!1;LS(o)?(y?.addEventListener("touchmove",S.moveHandler,C),y?.addEventListener("touchend",S.upHandler,C)):(y?.addEventListener("mousemove",b.moveHandler,C),y?.addEventListener("mouseup",b.upHandler,C)),t.setColumnSizingInfo(E=>({...E,startOffset:d,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:c,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?zS():(n=e.initialState.columnSizingInfo)!=null?n:zS())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Gg=null;function pxe(){if(typeof Gg=="boolean")return Gg;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Gg=e,Gg}function LS(e){return e.type==="touchstart"}const hxe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:$i("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Qe(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Je(t.options,"debugRows")),e.getVisibleCells=Qe(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Je(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Qe(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Je(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Nm(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const gxe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},vxe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:$i("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Oa.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Wb(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Oa[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},yxe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:$i("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const s=o.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(c=>{s[c]=!0}):s=r,n=(i=n)!=null?i:!o,!o&&n)return{...s,[e.id]:!0};if(o&&!n){const{[e.id]:c,...d}=s;return d}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},TC=0,NC=10,US=()=>({pageIndex:TC,pageSize:NC}),bxe={getInitialState:e=>({...e,pagination:{...US(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:$i("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>Ms(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?US():(i=e.initialState.pagination)!=null?i:US())},e.setPageIndex=r=>{e.setPagination(i=>{let o=Ms(r,i.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,s)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?TC:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:TC)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?NC:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:NC)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,Ms(r,i.pageSize)),s=i.pageSize*i.pageIndex,c=Math.floor(s/o);return{...i,pageIndex:c,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let s=Ms(r,(o=e.options.pageCount)!=null?o:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...i,pageCount:s}}),e.getPageOptions=Qe(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,s)=>s)),i},Je(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},FS=()=>({top:[],bottom:[]}),xxe={getInitialState:e=>({rowPinning:FS(),...e}),getDefaultOptions:e=>({onRowPinningChange:$i("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(d=>{let{id:f}=d;return f}):[],s=i?e.getParentRows().map(d=>{let{id:f}=d;return f}):[],c=new Set([...s,e.id,...o]);t.setRowPinning(d=>{var f,p;if(n==="bottom"){var h,v;return{top:((h=d?.top)!=null?h:[]).filter(S=>!(c!=null&&c.has(S))),bottom:[...((v=d?.bottom)!=null?v:[]).filter(S=>!(c!=null&&c.has(S))),...Array.from(c)]}}if(n==="top"){var y,b;return{top:[...((y=d?.top)!=null?y:[]).filter(S=>!(c!=null&&c.has(S))),...Array.from(c)],bottom:((b=d?.bottom)!=null?b:[]).filter(S=>!(c!=null&&c.has(S)))}}return{top:((f=d?.top)!=null?f:[]).filter(S=>!(c!=null&&c.has(S))),bottom:((p=d?.bottom)!=null?p:[]).filter(S=>!(c!=null&&c.has(S)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(c=>r?.includes(c)),s=n.some(c=>i?.includes(c));return o?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:c}=s;return c});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?FS():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:FS())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(s=>{const c=e.getRow(s,!0);return c.getIsAllParentsExpanded()?c:null}):(n??[]).map(s=>t.find(c=>c.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=Qe(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Je(e.options,"debugRows")),e.getBottomRows=Qe(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Je(e.options,"debugRows")),e.getCenterRows=Qe(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Je(e.options,"debugRows"))}},wxe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:$i("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{AC(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Qe(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?VS(e,n):{rows:[],flatRows:[],rowsById:{}},Je(e.options,"debugTable")),e.getFilteredSelectedRowModel=Qe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?VS(e,n):{rows:[],flatRows:[],rowsById:{}},Je(e.options,"debugTable")),e.getGroupedSelectedRowModel=Qe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?VS(e,n):{rows:[],flatRows:[],rowsById:{}},Je(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var s;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const c={...o};return AC(c,e.id,n,(s=r?.selectChildren)!=null?s:!0,t),c})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return RR(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return OC(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return OC(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},AC=(e,t,n,r,i)=>{var o;const s=i.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(c=>delete e[c]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=s.subRows)!=null&&o.length&&s.getCanSelectSubRows()&&s.subRows.forEach(c=>AC(e,c.id,n,r,i))};function VS(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(s,c){return s.map(d=>{var f;const p=RR(d,n);if(p&&(r.push(d),i[d.id]=d),(f=d.subRows)!=null&&f.length&&(d={...d,subRows:o(d.subRows)}),p)return d}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function RR(e,t){var n;return(n=t[e.id])!=null?n:!1}function OC(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(s=>{if(!(o&&!i)&&(s.getCanSelect()&&(RR(s,t)?o=!0:i=!1),s.subRows&&s.subRows.length)){const c=OC(s,t);c==="all"?o=!0:(c==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const $C=/([0-9]+)/gm,Sxe=(e,t,n)=>pB(Qs(e.getValue(n)).toLowerCase(),Qs(t.getValue(n)).toLowerCase()),_xe=(e,t,n)=>pB(Qs(e.getValue(n)),Qs(t.getValue(n))),Cxe=(e,t,n)=>jR(Qs(e.getValue(n)).toLowerCase(),Qs(t.getValue(n)).toLowerCase()),Exe=(e,t,n)=>jR(Qs(e.getValue(n)),Qs(t.getValue(n))),kxe=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},Rxe=(e,t,n)=>jR(e.getValue(n),t.getValue(n));function jR(e,t){return e===t?0:e>t?1:-1}function Qs(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function pB(e,t){const n=e.split($C).filter(Boolean),r=t.split($C).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),s=parseInt(i,10),c=parseInt(o,10),d=[s,c].sort();if(isNaN(d[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(d[1]))return isNaN(s)?-1:1;if(s>c)return 1;if(c>s)return-1}return n.length-r.length}const cm={alphanumeric:Sxe,alphanumericCaseSensitive:_xe,text:Cxe,textCaseSensitive:Exe,datetime:kxe,basic:Rxe},jxe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:$i("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return cm.datetime;if(typeof o=="string"&&(r=!0,o.split($C).length>1))return cm.alphanumeric}return r?cm.text:cm.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Wb(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:cm[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(s=>{const c=s?.find(y=>y.id===e.id),d=s?.findIndex(y=>y.id===e.id);let f=[],p,h=o?n:i==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?c?p="toggle":p="add":s!=null&&s.length&&d!==s.length-1?p="replace":c?p="toggle":p="replace",p==="toggle"&&(o||i||(p="remove")),p==="add"){var v;f=[...s,{id:e.id,desc:h}],f.splice(0,f.length-((v=t.options.maxMultiSortColCount)!=null?v:Number.MAX_SAFE_INTEGER))}else p==="toggle"?f=s.map(y=>y.id===e.id?{...y,desc:h}:y):p==="remove"?f=s.filter(y=>y.id!==e.id):f=[{id:e.id,desc:h}];return f})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:s==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Ixe=[Ybe,hxe,uxe,dxe,Xbe,Qbe,gxe,vxe,jxe,lxe,yxe,bxe,xxe,wxe,mxe];function Txe(e){var t,n;const r=[...Ixe,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((v,y)=>Object.assign(v,y.getDefaultOptions==null?void 0:y.getDefaultOptions(i)),{}),s=v=>i.options.mergeOptions?i.options.mergeOptions(o,v):{...o,...v};let d={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(v=>{var y;d=(y=v.getInitialState==null?void 0:v.getInitialState(d))!=null?y:d});const f=[];let p=!1;const h={_features:r,options:{...o,...e},initialState:d,_queue:v=>{f.push(v),p||(p=!0,Promise.resolve().then(()=>{for(;f.length;)f.shift()();p=!1}).catch(y=>setTimeout(()=>{throw y})))},reset:()=>{i.setState(i.initialState)},setOptions:v=>{const y=Ms(v,i.options);i.options=s(y)},getState:()=>i.options.state,setState:v=>{i.options.onStateChange==null||i.options.onStateChange(v)},_getRowId:(v,y,b)=>{var S;return(S=i.options.getRowId==null?void 0:i.options.getRowId(v,y,b))!=null?S:`${b?[b.id,y].join("."):y}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(v,y)=>{let b=(y?i.getPrePaginationRowModel():i.getRowModel()).rowsById[v];if(!b&&(b=i.getCoreRowModel().rowsById[v],!b))throw new Error;return b},_getDefaultColumnDef:Qe(()=>[i.options.defaultColumn],v=>{var y;return v=(y=v)!=null?y:{},{header:b=>{const S=b.header.column.columnDef;return S.accessorKey?S.accessorKey:S.accessorFn?S.id:null},cell:b=>{var S,C;return(S=(C=b.renderValue())==null||C.toString==null?void 0:C.toString())!=null?S:null},...i._features.reduce((b,S)=>Object.assign(b,S.getDefaultColumnDef==null?void 0:S.getDefaultColumnDef()),{}),...v}},Je(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:Qe(()=>[i._getColumnDefs()],v=>{const y=function(b,S,C){return C===void 0&&(C=0),b.map(E=>{const k=Zbe(i,E,C,S),R=E;return k.columns=R.columns?y(R.columns,k,C+1):[],k})};return y(v)},Je(e,"debugColumns")),getAllFlatColumns:Qe(()=>[i.getAllColumns()],v=>v.flatMap(y=>y.getFlatColumns()),Je(e,"debugColumns")),_getAllFlatColumnsById:Qe(()=>[i.getAllFlatColumns()],v=>v.reduce((y,b)=>(y[b.id]=b,y),{}),Je(e,"debugColumns")),getAllLeafColumns:Qe(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(v,y)=>{let b=v.flatMap(S=>S.getLeafColumns());return y(b)},Je(e,"debugColumns")),getColumn:v=>i._getAllFlatColumnsById()[v]};Object.assign(i,h);for(let v=0;v<i._features.length;v++){const y=i._features[v];y==null||y.createTable==null||y.createTable(i)}return i}function Xb(){return e=>Qe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,s){o===void 0&&(o=0);const c=[];for(let f=0;f<i.length;f++){const p=Wbe(e,e._getRowId(i[f],f,s),i[f],f,o,void 0,s?.id);if(n.flatRows.push(p),n.rowsById[p.id]=p,c.push(p),e.options.getSubRows){var d;p.originalSubRows=e.options.getSubRows(i[f],f),(d=p.originalSubRows)!=null&&d.length&&(p.subRows=r(p.originalSubRows,o+1,p))}}return c};return n.rows=r(t),n},Je(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Nxe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function Axe(e){return t=>Qe(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:s,flatRows:c,rowsById:d}=r;const f=i*o,p=f+i;s=s.slice(f,p);let h;t.options.paginateExpandedRows?h={rows:s,flatRows:c,rowsById:d}:h=Nxe({rows:s,flatRows:c,rowsById:d}),h.flatRows=[];const v=y=>{h.flatRows.push(y),y.subRows.length&&y.subRows.forEach(v)};return h.rows.forEach(v),h},Je(t.options,"debugTable"))}function Oxe(){return e=>Qe(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(d=>{var f;return(f=e.getColumn(d.id))==null?void 0:f.getCanSort()}),s={};o.forEach(d=>{const f=e.getColumn(d.id);f&&(s[d.id]={sortUndefined:f.columnDef.sortUndefined,invertSorting:f.columnDef.invertSorting,sortingFn:f.getSortingFn()})});const c=d=>{const f=d.map(p=>({...p}));return f.sort((p,h)=>{for(let y=0;y<o.length;y+=1){var v;const b=o[y],S=s[b.id],C=S.sortUndefined,E=(v=b?.desc)!=null?v:!1;let k=0;if(C){const R=p.getValue(b.id),I=h.getValue(b.id),A=R===void 0,T=I===void 0;if(A||T){if(C==="first")return A?-1:1;if(C==="last")return A?1:-1;k=A&&T?0:A?C:-C}}if(k===0&&(k=S.sortingFn(p,h,b.id)),k!==0)return E&&(k*=-1),S.invertSorting&&(k*=-1),k}return p.index-h.index}),f.forEach(p=>{var h;i.push(p),(h=p.subRows)!=null&&h.length&&(p.subRows=c(p.subRows))}),f};return{rows:c(n.rows),flatRows:i,rowsById:n.rowsById}},Je(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
501
|
-
* react-table
|
|
502
|
-
*
|
|
503
|
-
* Copyright (c) TanStack
|
|
504
|
-
*
|
|
505
|
-
* This source code is licensed under the MIT license found in the
|
|
506
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
507
|
-
*
|
|
508
|
-
* @license MIT
|
|
509
|
-
*/function dc(e,t){return e?$xe(e)?x.createElement(e,t):e:null}function $xe(e){return Dxe(e)||typeof e=="function"||Pxe(e)}function Dxe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Pxe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Qb(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=x.useState(()=>({current:Txe(t)})),[r,i]=x.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:s=>{i(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}function Jb({className:e,containerClassName:t,...n}){return u.jsx("div",{"data-slot":"table-container",className:Le("relative w-full overflow-x-auto",t),children:u.jsx("table",{"data-slot":"table",className:Le("w-full caption-bottom text-sm",e),...n})})}function Zp({className:e,...t}){return u.jsx("thead",{"data-slot":"table-header",className:Le("[&_tr]:border-b",e),...t})}function ex({className:e,...t}){return u.jsx("tbody",{"data-slot":"table-body",className:Le("[&_tr:last-child]:border-0",e),...t})}function Ni({className:e,...t}){return u.jsx("tr",{"data-slot":"table-row",className:Le("border-b border-grey-700 transition-colors",e),...t})}function IR({className:e,...t}){return u.jsx("th",{"data-slot":"table-head",className:Le("h-10 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function hB({header:e,onColumnClick:t,...n}){const r=x.useCallback(()=>{e.column.toggleSorting(e.column.getIsSorted()==="asc");const d=e.column.getIsSorted()===!1||e.column.getIsSorted()!=="asc";t?.(e.column.columnDef.accessorKey,d)},[e,t]),i=e.column.columnDef.enableSorting,o=e.column.columnDef.enableResizing,s=e.isPlaceholder?null:dc(e.column.columnDef.header,e.getContext()),c=x.useCallback(()=>{e.column.resetSize()},[e]);return u.jsx(IR,{...n,style:{width:`${e.getSize()}px`},className:i?"px-0":"px-2",children:u.jsxs("div",{className:"flex items-center justify-between",children:[i?u.jsxs(Ce,{type:"button",variant:"ghost",className:Le("rounded-none",!e.column.getIsSorted()||e.column.getIsSorted()==="asc"?"cursor-n-resize":"cursor-s-resize"),onClick:r,children:[s,e.column.getIsSorted()==="asc"?u.jsx(mW,{}):e.column.getIsSorted()==="desc"?u.jsx(QM,{}):u.jsx(dW,{className:"text-gray-600"})]}):s,o&&u.jsx(Ce,{type:"button",variant:"ghost",className:"cursor-col-resize",onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),onDoubleClick:c,style:{transform:e.column.getIsResizing()?`translateX(${e.getContext().table.getState().columnSizingInfo.deltaOffset}px)`:""},children:u.jsx(eX,{})})]})})}function Wa({className:e,...t}){return u.jsx("td",{"data-slot":"table-cell",className:Le("align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function Yp({columns:e,data:t,isFetching:n,onRowClick:r,onColumnClick:i,sortingState:o,children:s}){const c=Qb({data:t,columns:e,getCoreRowModel:Xb(),getSortedRowModel:Oxe(),initialState:{sorting:o}});return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center justify-end space-x-2 pb-4",children:[u.jsx("div",{className:"grow lg:hidden"}),s,u.jsx("div",{className:"grow hidden lg:visible"})]}),u.jsxs(Jb,{containerClassName:"rounded-md bg-black-dark",children:[u.jsx(Zp,{children:c.getHeaderGroups().map(d=>u.jsx(Ni,{className:"border-none",children:d.headers.map(f=>u.jsx(hB,{header:f,onColumnClick:i},f.id))},d.id))}),u.jsx(ex,{className:"bg-black border border-grey-700",children:c.getRowModel().rows?.length?c.getRowModel().rows.map(d=>u.jsx(Ni,{"data-state":d.getIsSelected()&&"selected",onClick:()=>r?.(d),className:Le("hover:bg-muted/10 data-[state=selected]:bg-muted",r&&"cursor-pointer"),children:d.getVisibleCells().map(f=>u.jsx(Wa,{className:"py-2 px-2 overflow-x-hidden max-w-32 text-ellipsis whitespace-nowrap",children:dc(f.column.columnDef.cell,f.getContext())},f.id))},d.id)):u.jsx(Ni,{children:u.jsx(Wa,{colSpan:e.length,className:"h-24 text-center",children:n?u.jsx("div",{children:u.jsx(go,{className:"m-12"})}):u.jsx("span",{children:"No results."})})})})]})]})}function Mxe(e){switch(e){case"paid":return"success";case"void":case"uncollectible":return"destructive";case"draft":case"open":default:return"default"}}function BS(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e)}function Zl(e,t){if(e<45)return"a few seconds ago";if(e<120)return"a minute ago";const n=Math.floor(e/60);if(n<60)return`${n} minutes ago`;if(n<120)return"an hour ago";const r=Math.floor(e/3600);return r>48?new Date(t).toLocaleString():`${r} hours ago`}const zxe=[{header:"Invoice Id",accessorKey:"id",enableSorting:!1},{header:"Status",accessorKey:"status",enableSorting:!1,cell:({cell:e})=>u.jsx(ra,{variant:Mxe(e.getValue()),children:e.getValue()})},{header:"Date",accessorKey:"periodStart",enableSorting:!1,cell:({cell:e})=>{const t=e.row.original.periodStart*1e3,n=e.row.original.periodEnd*1e3,r=(Date.now()-t)/1e3,i=(Date.now()-n)/1e3;return Math.abs(r-i)<1e3?Zl(r,t):[t?Zl(r,t):"-",n?Zl(i,n):"-"].join(" to ")}},{header:"Amount Due",accessorKey:"amountDue",enableSorting:!1,cell:({cell:e})=>BS(e.getValue()?e.getValue()/100:0)},{header:"Amount Paid",accessorKey:"amountPaid",enableSorting:!1,cell:({cell:e})=>BS(e.getValue()?e.getValue()/100:0)},{header:"Lines",accessorKey:"lines",enableSorting:!1,cell:({cell:e})=>{const t=e.getValue(),n=[];for(const r of t)n.push(`${r.quantity}x ${r.description} @ ${BS(r.amount/100)}`);return n.join(`
|
|
510
|
-
`)}}];function Ic(e){return x.useCallback(async()=>{const t=Ee.loading("Refreshing..."),n=Date.now();await e(),Date.now()-n<500&&await pp(500),Ee.dismiss(t),Ee.success("Refreshed!")},[e])}async function Lxe(e){const{data:t}=await Vt.get(`/Invoice/${e}`);return t}function Uxe(e,t){return{queryKey:[e,"invoices"],queryFn:()=>Lxe(e),retry:!1,enabled:!!e,refetchInterval:void 0}}function Fxe(){const{organizationId:e}=tt({strict:!1}),{data:t}=Ut(jc(e)),{data:n,refetch:r,isLoading:i,isFetching:o,isRefetching:s}=Ut(Uxe(t?.type!=="ENTERPRISE"&&t?.id)),c=Ic(r);return t?.type==="ENTERPRISE"?u.jsxs("span",{children:["You are part of an enterprise organization! We don’t currently show your invoices on this page. Want to explore your solution with Harper more? ",u.jsx(lc,{}),", we would love to talk!"]}):i?u.jsx(go,{centered:!0}):!n||!n.length?u.jsxs("span",{children:["Your invoices will be shown here once one is available! Want to explore your solution with Harper more? ",u.jsx(lc,{overEmail:!0}),", we would love to talk!"]}):u.jsx(Yp,{data:n,columns:zxe,children:u.jsxs(Ce,{variant:"defaultOutline",onClick:c,accessKey:"r",disabled:o||s,children:[u.jsx(Ha,{}),u.jsxs("span",{className:"hidden lg:inline-block",children:[u.jsx("u",{children:"R"}),"efresh"]})]})})}function Vxe(e){const t=it({getParentRoute:()=>e,path:"billing",component:Vbe}),n=it({getParentRoute:()=>t,path:"/",component:w5}),r=it({getParentRoute:()=>t,path:"invoices",component:Fxe}),i=it({getParentRoute:()=>t,path:"confirm",component:Fbe});return t.addChildren([n,r,i])}async function Bxe(e){const{data:t}=await Vt.get(`/OrganizationRole/${e}`);return t}function tx(e){return{queryKey:[e,"roles"],queryFn:()=>Bxe(e),retry:!1,refetchInterval:10*1e3}}const Hxe=Yb(),qxe=[{header:"Role Name",accessorKey:"roleName",enableSorting:!1},Hxe.display({header:"Users Assigned",enableSorting:!1,id:"userIds",cell:e=>!e.row.original.userIds||e.row.original.userIds.length===0?"No users assigned":e.row.original.userIds.length})],Gxe=Sr.object({roleName:Sr.string().nonempty({error:"Please enter a role name."}).regex(/^[a-zA-Z_]*$/,{error:"Role must contain only letters and underscores."}).max(30,{error:"Role name cannot be longer than 30 characters."}),updateOrganization:Sr.boolean(),deleteOrganization:Sr.boolean()});async function Kxe(e){const{data:t}=await Vt.post("/Role/",e);return t}function Zxe(){return vt({mutationFn:e=>Kxe(e)})}function Yxe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mD(Object(n),!0).forEach(function(r){Yxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wxe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Xxe(e,t){if(e==null)return{};var n=Wxe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Qxe(e,t){return Jxe(e)||e0e(e,t)||t0e(e,t)||n0e()}function Jxe(e){if(Array.isArray(e))return e}function e0e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),c;!(r=(c=s.next()).done)&&(n.push(c.value),!(t&&n.length===t));r=!0);}catch(d){i=!0,o=d}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function t0e(e,t){if(e){if(typeof e=="string")return hD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hD(e,t)}}function hD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
511
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r0e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gD(Object(n),!0).forEach(function(r){r0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i0e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(i,o){return o(i)},r)}}function Sm(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var s=arguments.length,c=new Array(s),d=0;d<s;d++)c[d]=arguments[d];return t.apply(n,[].concat(i,c))}}}function vy(e){return{}.toString.call(e).includes("Object")}function o0e(e){return!Object.keys(e).length}function rp(e){return typeof e=="function"}function a0e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s0e(e,t){return vy(t)||Hs("changeType"),Object.keys(t).some(function(n){return!a0e(e,n)})&&Hs("changeField"),t}function l0e(e){rp(e)||Hs("selectorType")}function c0e(e){rp(e)||vy(e)||Hs("handlerType"),vy(e)&&Object.values(e).some(function(t){return!rp(t)})&&Hs("handlersType")}function u0e(e){e||Hs("initialIsRequired"),vy(e)||Hs("initialType"),o0e(e)&&Hs("initialContent")}function d0e(e,t){throw new Error(e[t]||e.default)}var f0e={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Hs=Sm(d0e)(f0e),Kg={changes:s0e,selector:l0e,handler:c0e,initial:u0e};function m0e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Kg.initial(e),Kg.handler(t);var n={current:e},r=Sm(g0e)(n,t),i=Sm(h0e)(n),o=Sm(Kg.changes)(e),s=Sm(p0e)(n);function c(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(p){return p};return Kg.selector(f),f(n.current)}function d(f){i0e(r,i,o,s)(f)}return[c,d]}function p0e(e,t){return rp(t)?t(e.current):t}function h0e(e,t){return e.current=vD(vD({},e.current),t),t}function g0e(e,t,n){return rp(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var v0e={create:m0e},y0e={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function b0e(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var s=arguments.length,c=new Array(s),d=0;d<s;d++)c[d]=arguments[d];return t.apply(n,[].concat(i,c))}}}function x0e(e){return{}.toString.call(e).includes("Object")}function w0e(e){return e||yD("configIsRequired"),x0e(e)||yD("configType"),e.urls?(S0e(),{paths:{vs:e.urls.monacoBase}}):e}function S0e(){console.warn(gB.deprecation)}function _0e(e,t){throw new Error(e[t]||e.default)}var gB={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
512
|
-
You are using deprecated way of configuration.
|
|
513
|
-
|
|
514
|
-
Instead of using
|
|
515
|
-
monaco.config({ urls: { monacoBase: '...' } })
|
|
516
|
-
use
|
|
517
|
-
monaco.config({ paths: { vs: '...' } })
|
|
518
|
-
|
|
519
|
-
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
520
|
-
`},yD=b0e(_0e)(gB),C0e={config:w0e},E0e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduceRight(function(o,s){return s(o)},i)}};function vB(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],vB(e[n],t[n]))}),pD(pD({},e),t)}var k0e={type:"cancelation",msg:"operation is manually canceled"};function HS(e){var t=!1,n=new Promise(function(r,i){e.then(function(o){return t?i(k0e):r(o)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var R0e=v0e.create({config:y0e,isInitialized:!1,resolve:null,reject:null,monaco:null}),yB=Qxe(R0e,2),Wp=yB[0],nx=yB[1];function j0e(e){var t=C0e.config(e),n=t.monaco,r=Xxe(t,["monaco"]);nx(function(i){return{config:vB(i.config,r),monaco:n}})}function I0e(){var e=Wp(function(t){var n=t.monaco,r=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:r,resolve:i}});if(!e.isInitialized){if(nx({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),HS(qS);if(window.monaco&&window.monaco.editor)return bB(window.monaco),e.resolve(window.monaco),HS(qS);E0e(T0e,A0e)(O0e)}return HS(qS)}function T0e(e){return document.body.appendChild(e)}function N0e(e){var t=document.createElement("script");return e&&(t.src=e),t}function A0e(e){var t=Wp(function(r){var i=r.config,o=r.reject;return{config:i,reject:o}}),n=N0e("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function O0e(){var e=Wp(function(n){var r=n.config,i=n.resolve,o=n.reject;return{config:r,resolve:i,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){bB(n),e.resolve(n)},function(n){e.reject(n)})}function bB(e){Wp().monaco||nx({monaco:e})}function $0e(){return Wp(function(e){var t=e.monaco;return t})}var qS=new Promise(function(e,t){return nx({resolve:e,reject:t})}),xB={config:j0e,init:I0e,__getMonacoInstance:$0e},D0e={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},GS=D0e,P0e={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},M0e=P0e;function z0e({children:e}){return X.createElement("div",{style:M0e.container},e)}var L0e=z0e,U0e=L0e;function F0e({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:o,wrapperProps:s}){return X.createElement("section",{style:{...GS.wrapper,width:e,height:t},...s},!n&&X.createElement(U0e,null,r),X.createElement("div",{ref:i,style:{...GS.fullWidth,...!n&&GS.hide},className:o}))}var V0e=F0e,wB=x.memo(V0e);function B0e(e){x.useEffect(e,[])}var SB=B0e;function H0e(e,t,n=!0){let r=x.useRef(!0);x.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Ci=H0e;function Am(){}function Lu(e,t,n,r){return q0e(e,r)||G0e(e,t,n,r)}function q0e(e,t){return e.editor.getModel(_B(e,t))}function G0e(e,t,n,r){return e.editor.createModel(t,n,r?_B(e,r):void 0)}function _B(e,t){return e.Uri.parse(t)}function K0e({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:c=!1,keepCurrentModifiedModel:d=!1,theme:f="light",loading:p="Loading...",options:h={},height:v="100%",width:y="100%",className:b,wrapperProps:S={},beforeMount:C=Am,onMount:E=Am}){let[k,R]=x.useState(!1),[I,A]=x.useState(!0),T=x.useRef(null),N=x.useRef(null),z=x.useRef(null),L=x.useRef(E),K=x.useRef(C),ee=x.useRef(!1);SB(()=>{let W=xB.init();return W.then(P=>(N.current=P)&&A(!1)).catch(P=>P?.type!=="cancelation"&&console.error("Monaco initialization: error:",P)),()=>T.current?B():W.cancel()}),Ci(()=>{if(T.current&&N.current){let W=T.current.getOriginalEditor(),P=Lu(N.current,e||"",r||n||"text",o||"");P!==W.getModel()&&W.setModel(P)}},[o],k),Ci(()=>{if(T.current&&N.current){let W=T.current.getModifiedEditor(),P=Lu(N.current,t||"",i||n||"text",s||"");P!==W.getModel()&&W.setModel(P)}},[s],k),Ci(()=>{let W=T.current.getModifiedEditor();W.getOption(N.current.editor.EditorOption.readOnly)?W.setValue(t||""):t!==W.getValue()&&(W.executeEdits("",[{range:W.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),W.pushUndoStop())},[t],k),Ci(()=>{T.current?.getModel()?.original.setValue(e||"")},[e],k),Ci(()=>{let{original:W,modified:P}=T.current.getModel();N.current.editor.setModelLanguage(W,r||n||"text"),N.current.editor.setModelLanguage(P,i||n||"text")},[n,r,i],k),Ci(()=>{N.current?.editor.setTheme(f)},[f],k),Ci(()=>{T.current?.updateOptions(h)},[h],k);let Z=x.useCallback(()=>{if(!N.current)return;K.current(N.current);let W=Lu(N.current,e||"",r||n||"text",o||""),P=Lu(N.current,t||"",i||n||"text",s||"");T.current?.setModel({original:W,modified:P})},[n,t,i,e,r,o,s]),Y=x.useCallback(()=>{!ee.current&&z.current&&(T.current=N.current.editor.createDiffEditor(z.current,{automaticLayout:!0,...h}),Z(),N.current?.editor.setTheme(f),R(!0),ee.current=!0)},[h,f,Z]);x.useEffect(()=>{k&&L.current(T.current,N.current)},[k]),x.useEffect(()=>{!I&&!k&&Y()},[I,k,Y]);function B(){let W=T.current?.getModel();c||W?.original?.dispose(),d||W?.modified?.dispose(),T.current?.dispose()}return X.createElement(wB,{width:y,height:v,isEditorReady:k,loading:p,_ref:z,className:b,wrapperProps:S})}var Z0e=K0e;x.memo(Z0e);function Y0e(e){let t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current}var W0e=Y0e,Zg=new Map;function X0e({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:s="light",line:c,loading:d="Loading...",options:f={},overrideServices:p={},saveViewState:h=!0,keepCurrentModel:v=!1,width:y="100%",height:b="100%",className:S,wrapperProps:C={},beforeMount:E=Am,onMount:k=Am,onChange:R,onValidate:I=Am}){let[A,T]=x.useState(!1),[N,z]=x.useState(!0),L=x.useRef(null),K=x.useRef(null),ee=x.useRef(null),Z=x.useRef(k),Y=x.useRef(E),B=x.useRef(),W=x.useRef(r),P=W0e(o),G=x.useRef(!1),U=x.useRef(!1);SB(()=>{let M=xB.init();return M.then(F=>(L.current=F)&&z(!1)).catch(F=>F?.type!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>K.current?$():M.cancel()}),Ci(()=>{let M=Lu(L.current,e||r||"",t||i||"",o||n||"");M!==K.current?.getModel()&&(h&&Zg.set(P,K.current?.saveViewState()),K.current?.setModel(M),h&&K.current?.restoreViewState(Zg.get(o)))},[o],A),Ci(()=>{K.current?.updateOptions(f)},[f],A),Ci(()=>{!K.current||r===void 0||(K.current.getOption(L.current.editor.EditorOption.readOnly)?K.current.setValue(r):r!==K.current.getValue()&&(U.current=!0,K.current.executeEdits("",[{range:K.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),K.current.pushUndoStop(),U.current=!1))},[r],A),Ci(()=>{let M=K.current?.getModel();M&&i&&L.current?.editor.setModelLanguage(M,i)},[i],A),Ci(()=>{c!==void 0&&K.current?.revealLine(c)},[c],A),Ci(()=>{L.current?.editor.setTheme(s)},[s],A);let te=x.useCallback(()=>{if(!(!ee.current||!L.current)&&!G.current){Y.current(L.current);let M=o||n,F=Lu(L.current,r||e||"",t||i||"",M||"");K.current=L.current?.editor.create(ee.current,{model:F,automaticLayout:!0,...f},p),h&&K.current.restoreViewState(Zg.get(M)),L.current.editor.setTheme(s),c!==void 0&&K.current.revealLine(c),T(!0),G.current=!0}},[e,t,n,r,i,o,f,p,h,s,c]);x.useEffect(()=>{A&&Z.current(K.current,L.current)},[A]),x.useEffect(()=>{!N&&!A&&te()},[N,A,te]),W.current=r,x.useEffect(()=>{A&&R&&(B.current?.dispose(),B.current=K.current?.onDidChangeModelContent(M=>{U.current||R(K.current.getValue(),M)}))},[A,R]),x.useEffect(()=>{if(A){let M=L.current.editor.onDidChangeMarkers(F=>{let O=K.current.getModel()?.uri;if(O&&F.find(J=>J.path===O.path)){let J=L.current.editor.getModelMarkers({resource:O});I?.(J)}});return()=>{M?.dispose()}}return()=>{}},[A,I]);function $(){B.current?.dispose(),v?h&&Zg.set(o,K.current.saveViewState()):K.current.getModel()?.dispose(),K.current.dispose()}return X.createElement(wB,{width:y,height:b,isEditorReady:A,loading:d,_ref:ee,className:S,wrapperProps:C})}var Q0e=X0e,Xp=x.memo(Q0e),rx=Xp;const bD={roles:{create:!0,view:!0,update:!0,delete:!0},clusters:{create:!0,view:!0,update:!0,delete:!0,resources:[]}};function J0e({isModalOpen:e,onChangesSaved:t,setIsModalOpen:n}){const{organizationId:r}=tt({strict:!1}),[i,o]=x.useState(!0),[s,c]=x.useState(JSON.stringify(bD,null,2)),{mutate:d,isPending:f}=Zxe(),p=pn({resolver:wn(Gxe),defaultValues:{roleName:"",updateOrganization:!1,deleteOrganization:!1}}),h=x.useCallback(y=>{o(y.length===0)},[o]),v=x.useCallback(async y=>{const b={organizationId:r,name:y.roleName,update:y.updateOrganization,delete:y.deleteOrganization,...JSON.parse(s)};y&&i&&d(b,{onSuccess:()=>{p.reset(),t(),Ee.success("Organization role added successfully!")},onError:S=>{Ee.error(`Failed to add organization role: ${S.message}`)}})},[i,s,d,p,t,r]);return u.jsx(cr,{onOpenChange:n,open:e,children:u.jsxs(ur,{children:[u.jsx(tr,{children:"Add New Organization Role"}),u.jsx(mi,{children:"Set the new organization role permissions."}),u.jsx(hn,{...p,children:u.jsxs("form",{className:"grid grid-cols-2 gap-4 my-4",onSubmit:p.handleSubmit(v),children:[u.jsx(Pe,{control:p.control,name:"roleName",render:({field:y})=>u.jsxs(Oe,{className:"col-span-2",children:[u.jsx($e,{className:"pb-1",children:"Role Name"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",placeholder:"Developer",className:"",...y})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:p.control,name:"updateOrganization",render:({field:y})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Can Update Organization"}),u.jsx(Me,{children:u.jsx(Ge,{type:"checkbox",className:"w-6 ml-2",checked:y.value,onChange:b=>y.onChange(b.target.checked)})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:p.control,name:"deleteOrganization",render:({field:y})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Can Delete Organization"}),u.jsx(Me,{children:u.jsx(Ge,{type:"checkbox",className:"w-6 ml-2",checked:y.value,onChange:b=>y.onChange(b.target.checked)})}),u.jsx(De,{})]})}),u.jsx("div",{className:"col-span-2",children:u.jsx(Xp,{theme:"vs-dark",height:"300px",defaultLanguage:"json",onValidate:h,onChange:y=>{y&&c(y)},defaultValue:JSON.stringify(bD,null,2)})}),u.jsx(er,{className:"col-span-2",children:u.jsxs("div",{className:"flex justify-between w-full",children:[u.jsx(Ce,{variant:"destructiveOutline",className:"rounded-full",type:"button",onClick:()=>n(!1),disabled:f,children:"Cancel"}),u.jsx(Ce,{variant:"submit",className:"rounded-full",disabled:f||!i,children:"Save Changes"})]})})]})})]})})}async function ewe({roleId:e}){const{data:t}=await Vt.delete(`/Role/${e}`,{id:e,deleted:!0});return t}function twe(){return vt({mutationFn:({roleId:e})=>ewe({roleId:e})})}const nwe=Sr.object({roleName:Sr.string().nonempty({error:"Please enter a role name."}).regex(/^[a-zA-Z_]*$/,{error:"Role must contain only letters and underscores."}).max(30,{error:"Role name cannot be longer than 30 characters."}),updateOrganization:Sr.boolean(),deleteOrganization:Sr.boolean()});async function rwe({roleId:e,updatedRoleInfo:t}){const{data:n}=await Vt.put(`/Role/${e}`,t);return n}function iwe(){return vt({mutationFn:({roleId:e,updatedRoleInfo:t})=>rwe({roleId:e,updatedRoleInfo:t})})}function owe({organizationId:e,roleId:t}){return{queryKey:[e,"roles",t],queryFn:()=>awe(t),refetchInterval:10*1e3}}async function awe(e){const{data:t}=await Vt.get(`/Role/${e}`);return t}const swe=({onRoleDeleteClick:e,setIsConfirmingRoleDeletion:t,isRoleDeletionPending:n})=>u.jsxs(u.Fragment,{children:[u.jsx(tr,{children:"Confirm Role Deletion"}),u.jsx(mi,{children:"Are you sure you want to delete this role? This action cannot be undone."}),u.jsxs(er,{children:[u.jsx(Ce,{type:"button",variant:"defaultOutline",className:"rounded-full",onClick:()=>t(!1),children:"Cancel"}),u.jsx(Ce,{variant:"destructiveOutline",className:"rounded-full",onClick:e,disabled:n,children:n?"Deleting...":"Delete Role"})]})]});function lwe({data:e,isModalOpen:t,closeModal:n,roleDeleted:r}){const{data:i}=fo(owe({roleId:e.id,organizationId:e.organizationId})),o=mc(),s=o.user&&o.user?.roles?.[e.organizationId]?.role===e.roleName,{update:c,remove:d}=Ad(e.organizationId),{mutate:f,isPending:p}=iwe(),{mutate:h,isPending:v}=twe(),[y,b]=x.useState(!1),S=x.useCallback(()=>{h({roleId:e.id},{onSuccess:()=>{Ee.success("Role deleted successfully!"),r(),n()},onError:N=>{Ee.error("Error",{description:`Failed to delete role: ${N instanceof Error?N.message:String(N)}.`,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}})}})},[e.id,h,r,n]),[C,E]=x.useState(!0),[k,R]=x.useState(JSON.stringify({roles:{...i.organization.roles},clusters:{...i.organization.clusters}},null,2)),I=pn({resolver:wn(nwe),defaultValues:{roleName:i.role,updateOrganization:i?.organization.update||!1,deleteOrganization:i?.organization.delete||!1}}),A=x.useCallback(N=>{E(N.length===0)},[E]),T=x.useCallback(async N=>{if(!c)return;const z={...i};z.organizationId=e.organizationId,z.name=N.roleName,z.role=N.roleName,z.organization.roles=JSON.parse(k).roles,z.organization.clusters=JSON.parse(k).clusters,z.organization.update=N.updateOrganization,z.organization.delete=N.deleteOrganization,k&&C&&f({roleId:e.id,updatedRoleInfo:z},{onSuccess:()=>{Ee.success("Role updated successfully!"),n()},onError:L=>{Ee.error("Error",{description:`Failed to update role: ${L instanceof Error?L.message:String(L)}.`,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}})}})},[c,i,e.organizationId,e.id,k,C,f,n]);return u.jsx(cr,{onOpenChange:n,open:t,children:u.jsx(ur,{children:y?u.jsx(swe,{onRoleDeleteClick:S,setIsConfirmingRoleDeletion:b,isRoleDeletionPending:v}):u.jsxs(u.Fragment,{children:[u.jsxs(tr,{children:[s||!c?"View":"Edit",' Organization Role "',i.role,'"']}),u.jsx(hn,{...I,children:u.jsxs("form",{className:"grid grid-cols-2 gap-4 my-4",onSubmit:I.handleSubmit(T),children:[u.jsx(Pe,{control:I.control,name:"roleName",render:({field:N})=>u.jsxs(Oe,{className:"col-span-2",children:[u.jsx($e,{className:"pb-1",children:"Role Name"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",placeholder:"Developer",className:"",...N,disabled:s||!c,readOnly:s||!c})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:I.control,name:"updateOrganization",render:({field:N})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Can Update Organization"}),u.jsx(Me,{children:u.jsx(Ge,{type:"checkbox",className:"w-6 ml-2",disabled:s||!c,readOnly:s||!c,checked:N.value,onChange:z=>N.onChange(z.target.checked)})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:I.control,name:"deleteOrganization",render:({field:N})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Can Delete Organization"}),u.jsx(Me,{children:u.jsx(Ge,{type:"checkbox",className:"w-6 ml-2",disabled:s||!c,readOnly:s||!c,checked:N.value,onChange:z=>N.onChange(z.target.checked)})}),u.jsx(De,{})]})}),u.jsx("div",{className:"col-span-2",children:u.jsx(Xp,{theme:"vs-dark",height:"300px",defaultLanguage:"json",onValidate:A,onChange:N=>{N&&R(N)},options:s||!c?{readOnly:!0}:void 0,defaultValue:k})}),!s&&(d||c)&&u.jsx(er,{className:"col-span-2",children:u.jsxs("div",{className:"flex justify-between w-full",children:[d&&u.jsx(Ce,{type:"button",variant:"destructiveOutline",className:"rounded-full",onClick:()=>b(!0),disabled:p,children:"Delete Role"}),c&&u.jsx(Ce,{variant:"submit",className:"rounded-full",disabled:!C||p,children:"Save Changes"})]})})]})})]})})})}function CB(){const e=bn(),{organizationId:t,orgRoleId:n}=tt({strict:!1}),{create:r}=Ad(t),{data:i,refetch:o,isFetching:s,isRefetching:c}=fo(tx(t)),d=x.useMemo(()=>i&&i?.find(R=>R.id===n),[i,n]),f=!!n&&!!d,[p,h]=x.useState(!1),v=x.useCallback(R=>{const I=[n?"..":"",R].filter(Boolean);e({to:I.join("/")})},[n,e]),y=x.useCallback(()=>{o(),h(!1)},[o,h]),b=x.useCallback(()=>{h(!0)},[h]),S=x.useCallback(()=>{o(),h(!1)},[o,h]),C=x.useCallback(R=>{v(R.original.id)},[v]),E=x.useCallback(()=>{v(void 0)},[v]),k=Ic(o);return u.jsxs(u.Fragment,{children:[u.jsx(la,{}),u.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:u.jsxs(x.Suspense,{fallback:u.jsx(go,{className:"flex flex-col items-center justify-center h-full",text:"Loading..."}),children:[u.jsxs(Yp,{data:i,columns:qxe,onRowClick:C,children:[u.jsxs(Ce,{variant:"defaultOutline",onClick:k,accessKey:"r",disabled:s||c,children:[u.jsx(Ha,{}),u.jsxs("span",{className:"hidden lg:inline-block",children:[u.jsx("u",{children:"R"}),"efresh"]})]}),r&&u.jsxs(Ce,{variant:"positiveOutline",onClick:b,accessKey:"a",disabled:p,children:[u.jsx(Mo,{}),u.jsxs("span",{children:[u.jsx("u",{children:"A"}),"dd"]})]})]}),r&&u.jsx(J0e,{isModalOpen:p,onChangesSaved:S,setIsModalOpen:h}),f&&u.jsx(lwe,{roleDeleted:y,data:d,isModalOpen:f,closeModal:E})]})})]})}const cwe=Yb(),uwe=[{header:"User Id",accessorKey:"id",enableSorting:!1},{header:"Email",accessorKey:"email",enableSorting:!1},{header:"First Name",accessorKey:"firstname",enableSorting:!1},{header:"Last Name",accessorKey:"lastname",enableSorting:!1},cwe.display({header:"Roles",enableSorting:!1,id:"roles",cell:e=>e.row.original.roles?.map(t=>t.roleName)?.sort()?.join(", ")}),{header:"Status",accessorKey:"status",enableSorting:!1},{header:"Verified",accessorKey:"isVerified",enableSorting:!1}],dwe=Sr.object({email:Pd.max(80,{error:"Email cannot be longer than 80 characters."}),roleId:Sr.string().nonempty({error:"Please select a role."})});async function fwe(e){const{data:t}=await Vt.post("/OrganizationRole/",e);return t}function EB(){return vt({mutationFn:e=>fwe(e)})}Sr.object({email:Pd.max(80,{error:"Email cannot be longer than 80 characters."}),roleId:Sr.string().nonempty({error:"Please select a role."})});async function mwe(e){const{data:t}=await Vt.post("/UserInvite/",e);return t}function pwe(){return vt({mutationFn:e=>mwe(e)})}function hwe({isModalOpen:e,onChangesSaved:t,setIsModalOpen:n}){const{organizationId:r}=tt({strict:!1}),{data:i}=fo(tx(r)),[o,s]=x.useState(!1),c=pn({resolver:wn(dwe),defaultValues:{email:"",roleId:""}}),{mutate:d,isPending:f}=EB(),{mutate:p,isPending:h}=pwe(),v=x.useCallback(async y=>{y&&(o?p:d)(y,{onSuccess:()=>{const b=y.roleId;c.reset(),c.setValue("roleId",b),t(),Ee.success("User invited successfully!"),n(!1),s(!1)},onError:b=>{b?.status===404&&s(!0)}})},[d,c,p,t,n,o]);return u.jsx(cr,{onOpenChange:()=>{n(!1),s(!1),c.reset()},open:e,children:u.jsx(ur,{"aria-describedby":void 0,children:u.jsx(hn,{...c,children:u.jsxs("form",{onSubmit:c.handleSubmit(v),className:"grid gap-4 my-4",children:[u.jsx(Br,{children:u.jsx(tr,{children:o?"Invite User":"Add User"})}),u.jsx(Pe,{control:c.control,name:"email",render:({field:y})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Email"}),u.jsx(Me,{children:u.jsx(Ge,{type:"email",enterKeyHint:"next",autoComplete:"email",...y})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:c.control,name:"roleId",render:({field:y})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Roles"}),u.jsx(x.Suspense,{fallback:u.jsx(Cr,{}),children:u.jsx(Me,{children:u.jsxs(so,{...y,onValueChange:b=>y.onChange(b),children:[u.jsx(co,{className:"w-full",children:u.jsx(lo,{placeholder:"Choose Role"})}),u.jsx(uo,{children:u.jsxs(Do,{children:[u.jsx(_R,{children:"Role"}),i?.map(b=>u.jsx(vn,{value:b.id,children:b.roleName},b.id))]})})]})})}),u.jsx(De,{})]})}),o&&u.jsxs(mi,{className:"p-3 my-5 text-white rounded-md bg-amber-600 flex",children:[u.jsx(pX,{className:"inline-block size-12 pr-2"}),u.jsx("span",{children:"This person doesn’t have a Fabric account. Do you want to invite them?"})]}),u.jsx(er,{children:u.jsx("div",{className:"flex justify-between w-full",children:u.jsxs(Ce,{type:"submit",variant:"submit",className:"rounded-full",disabled:f||h,children:[u.jsx(aa,{})," ",o?"Invite User":"Add User"]})})})]})})})})}async function gwe({roleId:e,userId:t}){const{data:n}=await Vt.delete(`/OrganizationRole/role/${e}/user/${t}`);return n}function vwe(){return vt({mutationFn:({roleId:e,userId:t})=>gwe({roleId:e,userId:t})})}function kB(e){const[t,n]=x.useState(e||!1),r=x.useCallback(i=>{n(i.target.checked)},[]);return[t,r]}function ywe({data:e,readOnly:t,canRemove:n,orgRole:r,selectedRoles:i,setChangesMade:o}){const{mutate:s,isPending:c}=EB(),{mutate:d,isPending:f}=vwe(),p=!!i[r.roleName],[h,v]=x.useState(p),[y,b]=kB(p);return x.useEffect(()=>{y!==h&&(y?s({email:e.email,roleId:r.id},{onSuccess:()=>{v(y),o(!0),Ee.success("Role added successfully")}}):d({userId:e.id,roleId:r.id},{onSuccess:()=>{v(y),o(!0),Ee.success("Role removed successfully")}}))},[s,e.email,e.id,y,r.id,d,o,h]),u.jsxs(Xy,{className:"flex",children:[u.jsx(Ge,{type:"checkbox",className:"w-6",disabled:t||c||f||!n&&y,checked:y,onChange:b}),u.jsx("span",{className:"pl-4 pr-8 flex-1 py-2.5",children:r.roleName})]},r.id)}function bwe({closeModal:e,data:t,isModalOpen:n,onUserUpdated:r}){const{organizationId:i}=tt({strict:!1}),o=mc(),{update:s,remove:c}=Ad(i),d=o.user?.email===t.email,{data:f}=fo(tx(i)),p=x.useMemo(()=>t.roles?Yd(t.roles,"roleName"):{},[t]),[h,v]=x.useState(!1);return u.jsx(cr,{onOpenChange:h?r:e,open:n,children:u.jsxs(ur,{className:"sm:max-w-[750px]",children:[u.jsx(Br,{children:u.jsxs(tr,{children:[s?"Edit ":"View "," ",t.email," ",d?"(yourself)":""]})}),s&&u.jsxs(mi,{children:["To remove ",d?"your self":"this user"," from the organization, uncheck all of the boxes below."]}),f.map(y=>u.jsx(ywe,{readOnly:!s,canRemove:c,data:t,orgRole:y,selectedRoles:p,setChangesMade:v},y.id))]})})}function xwe(e,t){return e.email>t.email?1:-1}function RB(){const e=bn(),{organizationId:t,orgUserId:n}=tt({strict:!1}),{update:r}=Ad(t),{data:i,refetch:o,isFetching:s,isRefetching:c}=fo(tx(t)),d=x.useMemo(()=>{const T={};for(const N of i)if(N.users)for(const z of N.users)T[z.id]||(T[z.id]={...z,roles:[]}),T[z.id].roles.push(N);return Object.values(T).sort(xwe)},[i]),f=x.useMemo(()=>d?.find(T=>T.id===n),[d,n]),p=x.useCallback(T=>{const N=[n?"..":"",T].filter(Boolean);e({to:N.join("/")})},[n,e]),h=!!n&&!!f,[v,y]=x.useState(!1),[b]=x.useState({attribute:"email",descending:!1}),S=x.useMemo(()=>[{desc:b.descending,id:b.attribute}],[b]),C=x.useCallback(()=>{y(!0)},[y]),E=x.useCallback(()=>{o(),y(!1)},[o,y]),k=x.useCallback(T=>{p(T.original.id)},[p]),R=x.useCallback(()=>{p(void 0)},[p]),I=x.useCallback(()=>{o(),p(void 0)},[p,o]),A=Ic(o);return u.jsxs(u.Fragment,{children:[u.jsx(la,{}),u.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:u.jsxs(x.Suspense,{fallback:u.jsx(go,{className:"flex flex-col items-center justify-center h-full",text:"Loading..."}),children:[u.jsxs(Yp,{data:d,isFetching:s||c,columns:uwe,onRowClick:k,sortingState:S,children:[u.jsxs(Ce,{variant:"defaultOutline",onClick:A,accessKey:"r",disabled:s||c,children:[u.jsx(Ha,{})," ",u.jsxs("span",{className:"hidden lg:inline-block",children:[u.jsx("u",{children:"R"}),"efresh"]})]}),r&&u.jsxs(Ce,{variant:"positiveOutline",onClick:C,accessKey:"a",disabled:v,children:[u.jsx(Mo,{})," ",u.jsxs("span",{children:[u.jsx("u",{children:"A"}),"dd"]})]})]}),r&&u.jsx(hwe,{isModalOpen:v,onChangesSaved:E,setIsModalOpen:y}),h&&u.jsx(bwe,{closeModal:R,data:f,isModalOpen:h,onUserUpdated:I})]})})]})}function wwe({organizationRole:e,onDeleteOrgModal:t}){const{organizationId:n,organizationName:r,roleName:i}=e,{remove:o,update:s}=qy(n),c=s,{view:d}=Ad(n),f=x.useCallback(()=>{t(e)},[t,e]);return u.jsxs(ec,{className:"relative h-full justify-between",children:[u.jsxs(tl,{children:[u.jsxs(pc,{className:"flex items-center justify-between",children:[u.jsx("span",{className:"truncate",children:n}),o&&u.jsxs(Hp,{children:[u.jsx(qp,{className:"p-4 -m-4 -mr-6 hover:text-white",children:u.jsx(x1,{"aria-label":"Options"})}),u.jsxs(Gp,{children:[u.jsx(cy,{className:"text-gray-600 text-xs",children:"Options"}),u.jsx(uy,{}),u.jsx(We,{to:`${n}`,children:u.jsx(Mr,{children:"Clusters"})}),d&&u.jsx(We,{to:`${n}/roles`,children:u.jsx(Mr,{children:"Roles"})}),d&&u.jsx(We,{to:`${n}/users`,children:u.jsx(Mr,{children:"Users"})}),c&&u.jsx(We,{to:`${n}/billing`,children:u.jsx(Mr,{children:"Billing"})}),u.jsx(uy,{}),o&&u.jsx(Mr,{className:"focus:bg-red/70 focus:text-white",onClick:f,children:"Delete"})]})]})]}),u.jsx(nl,{children:u.jsx("h2",{children:r})})]}),u.jsxs(Qa,{className:"flex justify-between",children:[u.jsx(ra,{children:Ma(i)}),u.jsx(We,{to:n,className:"text-sm","aria-label":`View ${r}`,title:`View ${r}`,children:u.jsxs("span",{className:"py-2 transition-all duration-100 ease-in-out border-0 hover:border-b-2",children:["View ",u.jsx(Co,{className:"inline-block"})]})})]})]})}async function Swe(e){const{data:t}=await Vt.delete(`/Organization/${e}`);return t}function _we(){return vt({mutationFn:e=>Swe(e)})}async function Cwe(e){const{data:t}=await Vt.post("/Organization/",{...e});return t}function Ewe(){return vt({mutationFn:e=>Cwe(e)})}const Yg=En({name:wt().max(255,{error:"Name cannot be longer than 255 characters."}),subdomain:wt().max(62,{error:"The subdomain cannot be longer than 62 characters."}).regex(/^[a-zA-Z0-9-]*$/,{error:"Please only use letters, digits and dashes (-) in the subdomain."})});function kwe(){const{user:e}=mc(),t=bn(),n=pn({resolver:wn(Yg),defaultValues:{name:"",subdomain:""}}),{setFocus:r,watch:i}=n;x.useEffect(()=>{r("name")},[r]);const o=`${e?.firstname} ${e?.lastname} Org`,s=i("name")||o,c=i("subdomain"),d=x.useMemo(()=>{const y=nB(Kb(s),Yg.shape.subdomain.maxLength);return{suggestedSubdomain:y,fullHostName:`future-cluster-names.${c||y}.harperfabric.com`}},[s,c]),{mutate:f,isPending:p}=Ewe(),h=kr(),v=x.useCallback(async y=>{f({name:y.name||o,subdomain:y.subdomain||d.suggestedSubdomain},{onSuccess:b=>{h.invalidateQueries({queryKey:$y,refetchType:"active"}),lr.reloadUser(Bn),t({to:`/${b.id}`})}})},[d.suggestedSubdomain,h,f,o,t]);return u.jsx(u.Fragment,{children:u.jsx(hn,{...n,children:u.jsxs("form",{onSubmit:n.handleSubmit(v),className:"grid gap-6 text-white max-w-xl",children:[u.jsx(Pe,{control:n.control,name:"name",render:({field:y})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Name"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",maxLength:Yg.shape.name.maxLength,autoCapitalize:"words",placeholder:o,...y})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:n.control,name:"subdomain",render:({field:y})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Subdomain"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",maxLength:Yg.shape.subdomain.maxLength,autoCapitalize:"none",placeholder:d.suggestedSubdomain,...y})}),u.jsx(De,{})]})}),u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Full Host Name"}),u.jsx(Me,{children:u.jsx("span",{children:d.fullHostName})}),u.jsx(De,{})]}),u.jsx(er,{children:u.jsxs(Ce,{type:"submit",variant:"submit",className:"rounded-full",disabled:p,children:["Create New Organization ",u.jsx(Co,{})]})})]})})})}function jB(){return u.jsxs(u.Fragment,{children:[u.jsx(la,{}),u.jsx("section",{className:"mt-40 md:mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:u.jsx(kwe,{})})]})}function Rwe(){const e=kr(),{data:t}=fo(xK()),{mutate:n,isPending:r}=_we(),[i,o]=x.useState(!1),[s,c]=x.useState(null),[d,f]=x.useState(""),p=x.useCallback(()=>f(""),[]),h=x.useMemo(()=>{const C=t?.roles||{},E=Object.values(C);return Object.keys(C).map((R,I)=>({organizationId:R,organizationName:E[I].organizationName,roleName:E[I].role})).filter(rB(["organizationId","organizationName"],d)).sort((R,I)=>(R.organizationName||"")>(I.organizationName||"")?1:-1)||[]},[d,t?.roles]),v=x.useCallback(C=>{f(C.currentTarget.value?.toLowerCase()||"")},[]),y=x.useCallback(C=>{C?.organizationId&&n(C.organizationId,{onSuccess:()=>{Ee.success("Success",{description:"Organization successfully deleted.",duration:5e3,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}}),e.invalidateQueries({queryKey:[]}),o(!1)},onError:()=>o(!1)})},[n,e,o]),b=x.useCallback(C=>{c(C),o(!0)},[]),{createCluster:S}=Er({strict:!1});return h.length===1&&!d.length&&S?u.jsx(Gl,{to:`/${h[0].organizationId}/new-cluster`,replace:!0}):!h.length&&!d.length?u.jsx(jB,{}):u.jsxs(u.Fragment,{children:[u.jsx(la,{children:u.jsxs("div",{className:"flex w-full justify-end gap-2",children:[u.jsx(Ge,{placeholder:"Filter by name",className:"inline-block w-48 md:w-64 bg-black border",value:d,onChange:v}),u.jsx(We,{to:"/new-org",children:u.jsxs(Ce,{variant:"positive",className:"rounded-full w-44",accessKey:"n",children:[u.jsx(Mo,{})," ",u.jsxs("span",{children:[u.jsx("u",{children:"N"}),"ew Organization"]})]})})]})}),u.jsx("section",{className:"mt-40 md:mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-12",children:[h.map(C=>u.jsx("div",{className:"col-span-1 md:col-span-4 lg:col-span-3 2xl:col-span-2",children:u.jsx(wwe,{organizationRole:C,onDeleteOrgModal:b})},C.organizationId)),!h.length&&u.jsxs("div",{className:"col-span-1 md:col-span-12 text-center",children:[u.jsx("h2",{className:"my-4 text-xl",children:"No matches found."}),u.jsx(Ce,{variant:"outline",onClick:p,children:"Clear Filters"})]})]})}),s&&u.jsx(Pb,{typeOfThingBeingDeleted:"organization",nameOfThingBeingDeleted:s.organizationName,isModalOpen:i,setIsModalOpen:()=>o(!1),deletionConfirmed:()=>y(s),deletionPending:r})]})}function jwe(){const{isLoading:e}=fc(),{createCluster:t}=Er({strict:!1}),[,n]=Zb(Kp.SavedClusterState,null);return x.useEffect(()=>{t&&n(t)},[t,n]),e?u.jsx(go,{className:"fixed z-50 translate-1/2"}):u.jsxs(u.Fragment,{children:[u.jsx("header",{className:"fixed top-0 z-40 w-full h-20 p-4 bg-black-dark dark:bg-black-dark dark:border-b dark:border-black md:px-12",children:u.jsx(L2,{})}),u.jsx("main",{children:u.jsx(el,{})})]})}const Iwe=["/","/forgot-password","/reset-password","/sign-in","/sign-up","/verify-email"];function Twe(){const e=iB();return!Iwe.includes(e)&&{redirect:e}}const ix=it({getParentRoute:()=>Nb,id:"_dashboardLayout",component:jwe,beforeLoad:({context:e})=>{const t=e.authentication[Bn];if(t&&!t.isLoading&&!t.user)throw kd({to:"/sign-in",search:Twe()})}}),TR=it({getParentRoute:()=>ix,id:"_orgsLayout"});it({getParentRoute:()=>TR,path:"/",component:Rwe});it({getParentRoute:()=>TR,path:"/new-org",component:jB});const Tc=it({getParentRoute:()=>TR,path:"$organizationId",beforeLoad:async e=>({organization:await e.context.queryClient.ensureQueryData(jc(e.params.organizationId))})}),Nwe=it({getParentRoute:()=>Tc,path:"/roles",component:CB}),Awe=it({getParentRoute:()=>Tc,path:"/roles/$orgRoleId",component:CB}),Owe=it({getParentRoute:()=>Tc,path:"/users",component:RB}),$we=it({getParentRoute:()=>Tc,path:"/users/$orgUserId",component:RB});Vxe(Tc);const IB=it({getParentRoute:()=>Tc,id:"_clusterLayout"});it({getParentRoute:()=>IB,path:"/",component:Lbe});it({getParentRoute:()=>Tc,path:"/new-cluster",component:ER});it({getParentRoute:()=>Nc,path:"/edit",component:ER});function Dwe(){return u.jsx(el,{})}const Nc=it({getParentRoute:()=>IB,path:"$clusterId",component:Dwe,beforeLoad:async({context:e,params:t})=>({cluster:await e.queryClient.ensureQueryData(vc(t.clusterId))})});async function Pwe(e){await Vt.patch(`/ResetPasswordUpdater/${e}`)}async function TB(e){const{instanceClient:t,...n}=e,{data:r}=await t.post("/",{operation:"add_user",...n});return r}function Mwe(){return vt({mutationFn:TB})}async function NB({username:e,password:t,role:n,active:r,instanceClient:i}){const{data:o}=await i.post("/",{operation:"alter_user",username:e,password:t,role:n,active:r});return o}function zwe(){return vt({mutationFn:NB})}async function AB({username:e,instanceClient:t}){const{data:n}=await t.post("/",{operation:"drop_user",username:e});return n}function Lwe(){return vt({mutationFn:AB})}async function Uwe({clusterId:e,initialUsername:t,desiredUsername:n,newPassword:r,tempPassword:i,instanceClient:o}){if(!i)throw new Error("You may not have permission to set the password on this cluster.");try{const s=await Z_({username:t,password:i,instanceClient:o});return n===p_?await NB({username:n,password:r,instanceClient:o}):(await TB({username:n,password:r,role:"super_user",active:!0,instanceClient:o}),await AB({username:p_,instanceClient:o}),await Z_({username:n,password:r,instanceClient:o})),await Pwe(e),s}catch(s){throw await mp({instanceClient:o}),s}}function Fwe(){return vt({mutationFn:Uwe})}const Uu=En({username:Ek,role:wt().nonempty({error:"Please select a role."}),password:Tp.min(8,{error:"Password must be at least 8 characters long."}),confirmPassword:wt()}).refine(e=>e.password===e.confirmPassword,{error:"Passwords do not match.",path:["confirmPassword"]});function Vwe(){const{user:e}=mc(),{clusterId:t}=tt({strict:!1}),{data:n}=Ut(vc(t,!0)),r=bn(),i=x.useMemo(()=>c1(n),[n]),o=By(i),{redirect:s}=Er({strict:!1}),c=mn(),d=pn({resolver:wn(Uu),defaultValues:{confirmPassword:"",password:"",role:"super_user",username:e?.email??""}}),{setFocus:f,control:p,handleSubmit:h}=d;x.useEffect(()=>{f("password")},[f]);const v=n?.instances?.find(C=>C.tempPassword)?.tempPassword,{mutate:y,isPending:b}=Fwe(),S=x.useCallback(async C=>{if(!i){Ee.error("Cluster is not yet fully loaded, please wait a moment before trying to sign in.");return}y({instanceClient:o,clusterId:t,newPassword:C.password,tempPassword:v,initialUsername:p_,desiredUsername:C.username},{onSuccess:async E=>{Ee.success(E.message);const k=await rd({instanceClient:o});lr.setUserForEntity(n||null,k),c.invalidate(),await r({to:s?.startsWith("/")?s:t1})}})},[n,t,o,r,i,s,c,y,v]);return n&&!n.resetPassword?u.jsx(Gl,{to:"../sign-in",replace:!0}):u.jsxs(u.Fragment,{children:[u.jsx("nav",{className:"fixed top-20 w-full h-12 z-39 px-4 md:px-12 bg-grey-700 flex items-center",children:u.jsx(Ky,{})}),u.jsx("div",{className:"items-center justify-center flex mt-32 py-4 min-h-[calc(100vh-theme(spacing.32))]",children:u.jsxs("div",{className:"text-white w-xs",children:[u.jsx("h2",{className:"text-2xl font-light",children:"Create Admin User"}),u.jsx("p",{className:"text-muted-foreground",children:"You are ready to create your first user in your new cluster. These credentials belong to you alone, and you can create more users and roles once you create this first one."}),u.jsx(hn,{...d,children:u.jsxs("form",{onSubmit:h(S),className:"my-4",children:[u.jsx(Pe,{control:p,name:"username",render:({field:C})=>u.jsxs(Oe,{className:"my-4",children:[u.jsx($e,{children:"Username"}),u.jsx(Me,{children:u.jsx(Ge,{autoComplete:"username",type:"text",...C})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:p,name:"password",render:({field:C})=>u.jsxs(Oe,{className:"my-4",children:[u.jsx($e,{children:"Password"}),u.jsx(Me,{children:u.jsx(Ge,{type:"password",...C})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:p,name:"confirmPassword",render:({field:C})=>u.jsxs(Oe,{className:"my-4",children:[u.jsx($e,{children:"Confirm Password"}),u.jsx(Me,{children:u.jsx(Ge,{type:"password",...C})}),u.jsx(De,{})]})}),u.jsx(Ce,{disabled:b,type:"submit",variant:"submit",className:"w-full my-2 rounded-full",children:"Create Admin User"})]})}),u.jsxs("p",{className:"text-muted-foreground flex gap-2 align-middle",children:[u.jsx(aW,{size:36,className:"flex-none"}),u.jsx("span",{children:"These credentials will be used to sign into your cluster directly, providing you a secure connection from your browser to your cluster."})]})]})})]})}function Bwe({columns:e,data:t}){const n=Qb({data:t,columns:e,getCoreRowModel:Xb()});return u.jsx("div",{className:"bg-black-dark rounded-md",children:u.jsxs(Jb,{children:[u.jsx(Zp,{children:n.getHeaderGroups().map(r=>u.jsx(Ni,{className:"border-none",children:r.headers.map(i=>u.jsx(IR,{className:"p-4",style:{width:`${i.getSize()}%`},children:i.isPlaceholder?null:dc(i.column.columnDef.header,i.getContext())},i.id))},r.id))}),u.jsx(ex,{className:"bg-black",children:n.getRowModel().rows?.length?n.getRowModel().rows.map(r=>u.jsx(Ni,{"data-state":r.getIsSelected()&&"selected",className:"hover:bg-muted/10 data-[state=selected]:bg-muted",children:r.getVisibleCells().map(i=>u.jsx(Wa,{className:"p-4",style:{width:`${i.column.getSize()}%`},children:dc(i.column.columnDef.cell,i.getContext())},i.id))},r.id)):u.jsx(Ni,{children:u.jsx(Wa,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})}function Hwe(){return u.jsx("div",{className:"flex-col items-center justify-center px-16 space-y-3 text-center pt-30",children:u.jsx("p",{children:"No instances found."})})}function qwe({instance:e}){const{user:t,isLoading:n}=Xa(e.id),r=x.useMemo(()=>u1(e),[e]),i=By(r),o=x.useCallback(async()=>{await mp({instanceClient:i}),lr.setUserForEntity(e,null)},[e,i]);return n||!["CLONE_READY","RUNNING","UPDATED"].includes(e.status)?u.jsx(s2,{className:"animate-spin",color:"gray"}):t?u.jsxs("span",{className:"flex gap-4",children:[u.jsx(We,{to:`../instance/${e.id}${Js}`,className:"text-sm","aria-label":`Go to ${e.name} instance`,title:`Go to ${e.name} instance`,children:u.jsx(Ce,{variant:"positiveOutline",children:"View"})}),u.jsx(Ce,{variant:"destructiveOutline",className:"text-sm","aria-label":`Sign out from ${e.name} instance`,title:`Sign out from ${e.name} instance`,onClick:o,children:"Sign Out"})]}):u.jsx(We,{to:`../instance/${e.id}/sign-in`,className:"text-sm","aria-label":`Sign in to ${e.name} instance`,title:`Sign in to ${e.name} instance`,children:u.jsx(Ce,{variant:"positiveOutline",children:"Sign In"})})}function Gwe(){const{clusterId:e}=tt({strict:!1}),{data:t,isLoading:n}=Ut(vc(e,!0)),r=x.useMemo(()=>!!t?.plans?.[0]?.planId?.startsWith("self-hosted"),[t]),i=x.useMemo(()=>[{id:"instanceActions",size:1,minSize:1,cell:s=>u.jsx("div",{className:"flex justify-end",children:u.jsx(qwe,{instance:s.row.original})})},r&&{accessorKey:"instanceFqdn",size:90,header:"URL",cell:s=>eB({secure:s.row.original.operationsApiSecure?"true":"false",port:s.row.original.operationsApiPort,fqdn:s.row.original.instanceFqdn})},!r&&{accessorKey:"name",size:90,header:"Name"},!r&&{accessorKey:"status",header:"Status",size:1,minSize:1,cell:s=>{const c=s.getValue();return u.jsx(ra,{variant:Ave(c),children:Ma(c)})}},!r&&{accessorKey:"version",size:1,minSize:1,header:"Version"},!r&&{accessorKey:"storageGb",size:1,minSize:1,header:"Storage",cell:s=>{const c=s.getValue();return Aa(c,Math.pow(1024,3))}},!r&&{accessorKey:"cpuCores",size:1,minSize:1,header:"Cores/Threads",cell:s=>u.jsxs(u.Fragment,{children:[s.row.original.cpuCores," / ",s.row.original.threads]})},!r&&{accessorKey:"memoryMb",size:1,minSize:1,header:"Memory",cell:s=>{const c=s.getValue();return Aa(c,Math.pow(1024,2))}}].filter(sa),[r]),o=x.useMemo(()=>t?.instances?.filter(s=>s.status!=="REMOVED"&&s.status!=="TERMINATED")??[],[t]);return u.jsxs(u.Fragment,{children:[u.jsx(la,{}),u.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]",children:u.jsx(ec,{className:"p-0 mt-4 min-h-96",children:u.jsx(Qa,{className:"p-0 min-h-96",children:n?u.jsx(Cr,{}):o.length?u.jsx(Bwe,{data:o,columns:i}):u.jsx(Hwe,{})})})})]})}function Kwe(){const{clusterId:e}=tt({strict:!1}),{data:t,isLoading:n}=Ut(vc(e,2e3)),r=t?.status,i=x.useMemo(()=>r&&Qy.includes(r),[r]);return u.jsxs(u.Fragment,{children:[u.jsx(la,{}),u.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))] flex justify-center",children:n||!t?u.jsx(Cr,{}):u.jsxs("div",{className:"center w-2xl flex flex-col gap-4",children:[u.jsx("h1",{className:"text-xl text-center",children:"Here we go!"}),u.jsx(xR,{cluster:t,forceProgressBarVisible:!0}),i?u.jsxs(u.Fragment,{children:[u.jsx("p",{children:"All done! Your cluster finished updating, and is ready for interaction."}),u.jsx("div",{className:"text-center",children:u.jsx(bR,{cluster:t})})]}):u.jsx(u.Fragment,{children:u.jsxs("p",{children:["Your cluster is updating with the latest changes. This includes waiting several minutes to let traffic drain safely. ",u.jsx("span",{className:"text-muted-foreground",children:"We will let you know when we are ready for you to connect! In the meantime, may I suggest a cup of water, tea or perhaps a hot bean juice? ☕"})]})})]})})]})}function Zwe(){const{clusterId:e}=tt({strict:!1}),{data:t,isLoading:n}=Ut(vc(e,2e3)),r=t?.status,i=x.useMemo(()=>r&&Qy.includes(r),[r]);return u.jsxs(u.Fragment,{children:[u.jsx(la,{}),u.jsx("div",{className:"mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))] flex justify-center",children:n||!t?u.jsx(Cr,{}):u.jsxs("div",{className:"center max-w-2xl flex flex-col gap-4",children:[u.jsx("h1",{className:"text-xl text-center",children:"Here we go!"}),u.jsx(xR,{cluster:t,forceProgressBarVisible:!0}),i?u.jsxs(u.Fragment,{children:[u.jsxs("p",{children:["It's ready! Let's set up your secure, browser-to-cluster connection now. ",u.jsx("span",{className:"text-muted-foreground",children:"Did you know you connect straight to your cluster, providing a private secure connection?"})]}),u.jsx("div",{className:"text-center",children:u.jsx(bR,{cluster:t})})]}):u.jsx(u.Fragment,{children:u.jsxs("p",{children:["Your cluster is spinning up with the latest changes, including your own DNS records and private connections. Please wait while we get everything going. ",u.jsx("span",{className:"text-muted-foreground",children:"We will let you know when we are ready for you to connect! In the meantime, may I suggest a cup of water, tea or perhaps a hot bean juice? ☕"})]})})]})})]})}it({getParentRoute:()=>Nc,path:"instances",component:Gwe});it({getParentRoute:()=>Nc,path:"starting-up",component:Zwe});it({getParentRoute:()=>Nc,path:"scaling",component:Kwe});it({getParentRoute:()=>Nc,path:"sign-in",component:kk,beforeLoad:({context:e,location:t,params:n})=>{if(e.authentication[n.clusterId]?.user){const r=t?.search;throw kd({to:r?.redirect?.startsWith("/")?r.redirect:t1})}}});it({getParentRoute:()=>Nc,path:"instance/$instanceId/sign-in",component:kk,beforeLoad:({context:e,location:t,params:n})=>{if(e.authentication[n.instanceId||n.clusterId]?.user){const r=t?.search;throw kd({to:r?.redirect?.startsWith("/")?r.redirect:t1})}}});it({getParentRoute:()=>Nc,path:"finish-setup",component:Vwe});function Ywe(e){return it({getParentRoute:()=>e,path:"apis"}).lazy(()=>zp(()=>import("./index.lazy-C2OrP2F_.js"),__vite__mapDeps([0,1,2])).then(t=>t.route))}var[ox]=Di("Tooltip",[Gd]),ax=Gd(),OB="TooltipProvider",Wwe=700,DC="tooltip.open",[Xwe,NR]=ox(OB),$B=e=>{const{__scopeTooltip:t,delayDuration:n=Wwe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,s=x.useRef(!0),c=x.useRef(!1),d=x.useRef(0);return x.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),u.jsx(Xwe,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(d.current),s.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:x.useCallback(f=>{c.current=f},[]),disableHoverableContent:i,children:o})};$B.displayName=OB;var ip="Tooltip",[Qwe,Qp]=ox(ip),DB=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:s,delayDuration:c}=e,d=NR(ip,e.__scopeTooltip),f=ax(t),[p,h]=x.useState(null),v=Ii(),y=x.useRef(0),b=s??d.disableHoverableContent,S=c??d.delayDuration,C=x.useRef(!1),[E,k]=No({prop:r,defaultProp:i??!1,onChange:N=>{N?(d.onOpen(),document.dispatchEvent(new CustomEvent(DC))):d.onClose(),o?.(N)},caller:ip}),R=x.useMemo(()=>E?C.current?"delayed-open":"instant-open":"closed",[E]),I=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,C.current=!1,k(!0)},[k]),A=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,k(!1)},[k]),T=x.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{C.current=!0,k(!0),y.current=0},S)},[S,k]);return x.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),u.jsx(aR,{...f,children:u.jsx(Qwe,{scope:t,contentId:v,open:E,stateAttribute:R,trigger:p,onTriggerChange:h,onTriggerEnter:x.useCallback(()=>{d.isOpenDelayedRef.current?T():I()},[d.isOpenDelayedRef,T,I]),onTriggerLeave:x.useCallback(()=>{b?A():(window.clearTimeout(y.current),y.current=0)},[A,b]),onOpen:I,onClose:A,disableHoverableContent:b,children:n})})};DB.displayName=ip;var PC="TooltipTrigger",PB=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Qp(PC,n),o=NR(PC,n),s=ax(n),c=x.useRef(null),d=ct(t,c,i.onTriggerChange),f=x.useRef(!1),p=x.useRef(!1),h=x.useCallback(()=>f.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),u.jsx(sR,{asChild:!0,...s,children:u.jsx(Be.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:d,onPointerMove:Re(e.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),p.current=!0)}),onPointerLeave:Re(e.onPointerLeave,()=>{i.onTriggerLeave(),p.current=!1}),onPointerDown:Re(e.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Re(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:Re(e.onBlur,i.onClose),onClick:Re(e.onClick,i.onClose)})})});PB.displayName=PC;var AR="TooltipPortal",[Jwe,eSe]=ox(AR,{forceMount:void 0}),MB=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Qp(AR,t);return u.jsx(Jwe,{scope:t,forceMount:n,children:u.jsx(Gn,{present:n||o.open,children:u.jsx(Lp,{asChild:!0,container:i,children:r})})})};MB.displayName=AR;var bd="TooltipContent",zB=x.forwardRef((e,t)=>{const n=eSe(bd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=Qp(bd,e.__scopeTooltip);return u.jsx(Gn,{present:r||s.open,children:s.disableHoverableContent?u.jsx(LB,{side:i,...o,ref:t}):u.jsx(tSe,{side:i,...o,ref:t})})}),tSe=x.forwardRef((e,t)=>{const n=Qp(bd,e.__scopeTooltip),r=NR(bd,e.__scopeTooltip),i=x.useRef(null),o=ct(t,i),[s,c]=x.useState(null),{trigger:d,onClose:f}=n,p=i.current,{onPointerInTransitChange:h}=r,v=x.useCallback(()=>{c(null),h(!1)},[h]),y=x.useCallback((b,S)=>{const C=b.currentTarget,E={x:b.clientX,y:b.clientY},k=oSe(E,C.getBoundingClientRect()),R=aSe(E,k),I=sSe(S.getBoundingClientRect()),A=cSe([...R,...I]);c(A),h(!0)},[h]);return x.useEffect(()=>()=>v(),[v]),x.useEffect(()=>{if(d&&p){const b=C=>y(C,p),S=C=>y(C,d);return d.addEventListener("pointerleave",b),p.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",b),p.removeEventListener("pointerleave",S)}}},[d,p,y,v]),x.useEffect(()=>{if(s){const b=S=>{const C=S.target,E={x:S.clientX,y:S.clientY},k=d?.contains(C)||p?.contains(C),R=!lSe(E,s);k?v():R&&(v(),f())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[d,p,s,f,v]),u.jsx(LB,{...e,ref:o})}),[nSe,rSe]=ox(ip,{isInside:!1}),iSe=YY("TooltipContent"),LB=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,d=Qp(bd,n),f=ax(n),{onClose:p}=d;return x.useEffect(()=>(document.addEventListener(DC,p),()=>document.removeEventListener(DC,p)),[p]),x.useEffect(()=>{if(d.trigger){const h=v=>{v.target?.contains(d.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,p]),u.jsx(Nd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:u.jsxs(lR,{"data-state":d.stateAttribute,...f,...c,ref:t,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:[u.jsx(iSe,{children:r}),u.jsx(nSe,{scope:n,isInside:!0,children:u.jsx(b2,{id:d.contentId,role:"tooltip",children:i||r})})]})})});zB.displayName=bd;var UB="TooltipArrow",FB=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=ax(n);return rSe(UB,n).isInside?null:u.jsx(cR,{...i,...r,ref:t})});FB.displayName=UB;function oSe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function aSe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function sSe(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function lSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const c=t[o],d=t[s],f=c.x,p=c.y,h=d.x,v=d.y;p>r!=v>r&&n<(h-f)*(r-p)/(v-p)+f&&(i=!i)}return i}function cSe(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),uSe(t)}function uSe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var dSe=$B,fSe=DB,mSe=PB,pSe=MB,hSe=zB,gSe=FB;function vSe({delayDuration:e=0,...t}){return u.jsx(dSe,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function VB({...e}){return u.jsx(vSe,{children:u.jsx(fSe,{"data-slot":"tooltip",...e})})}function BB({...e}){return u.jsx(mSe,{"data-slot":"tooltip-trigger",...e})}function HB({className:e,sideOffset:t=0,arrowClassName:n,children:r,...i}){return u.jsx(pSe,{children:u.jsxs(hSe,{"data-slot":"tooltip-content",sideOffset:t,className:Le("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...i,children:[r,u.jsx(gSe,{className:Le("bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]",n)})]})})}async function ySe(e,t=3,n=1e3){let r=0;if(t<=0)throw new Error("retries must be greater than 0");let i;for(;r<t;)try{return await e()}catch(o){if(r++,i=o,r===t)break;await pp(n)}throw i}async function qB({operation:e,replicated:t,instanceClient:n}){const{data:r}=await n.post("/",{operation:e,service:e==="restart_service"?"http":void 0,replicated:t});return await pp(1e4),await ySe(()=>rd({instanceClient:n,timeout:3e3}),12,15e3),r}function bSe(){return vt({mutationFn:qB})}function xSe({onRestartedSuccessfully:e}={}){const{clusterId:t}=tt({strict:!1}),n=kr(),[r,i]=x.useState(!1);return{onRestartClick:x.useCallback(async()=>{if(!t)throw new Error("clusterId must be set in the route to invoke useRestartClusterClick");i(!0);let s=!1;const c={duration:6e4,action:{label:"Cancel",onClick:()=>{s=!0}}},d=Ee.loading("Restarting",{...c,description:u.jsx(np,{animated:!0,width:"0%"})}),p=(await U1(t))?.instances??[],h=p.filter(y=>y.status==="RUNNING").map(y=>Vl({id:y.id,operationsUrl:u1(y)})).reverse();let v=0;if(h.length)for(let y=0;y<h.length;y++){const b=h[y];if(!s){Ee.loading(`Restarting Instance ${y+1} of ${h.length}`,{...c,id:d,description:u.jsx(np,{animated:!0,width:(y===0?0:y/h.length*100)+"%"})});try{await rd({instanceClient:b}),await qB({operation:"restart",replicated:!1,instanceClient:b}),v+=1}catch{y+1!==h.length&&(Ee.loading(`Failed Restarting Instance ${y+1} of ${h.length}`,{...c,id:d,description:"We will carry on momentarily."}),await pp(3e3))}}}if(i(!1),n.invalidateQueries({queryKey:[t]}),s)Ee.error("Cancelled",{id:d,description:"The restart was partially cancelled.",duration:1e4,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}});else if(p.length===v)e?.(),Ee.success("Success",{id:d,description:"Cluster fully restarted!",duration:1e4,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}});else{const y=La(p.length,"instance","instances"),b=La(v,'"RUNNING" instance was','"RUNNING" instances were');Ee.error("Error",{id:d,description:`Failed to fully restart cluster.
|
|
521
|
-
`+([p.length===0&&"No instances were found within the cluster to restart.",v===0&&`No instances were in a "RUNNING" state of ${y}.`,p.length!==v&&`Only ${b} restarted of ${y}.`].filter(sa).shift()||""),duration:1e4,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}})}},[t,e,n]),isRestartPending:r}}function wSe({operation:e,instanceClient:t,onRestartedSuccessfully:n}){const{clusterId:r,instanceId:i}=tt({strict:!1}),o="Instance",{mutate:s,isPending:c}=bSe(),d=kr();return{onRestartClick:x.useCallback(()=>{const p=Ee.loading("Restarting",{description:`Restarting ${o.toLowerCase()}. This may take up to 60 seconds.`,duration:18e4,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}});s({operation:e,replicated:e==="restart_service"&&o==="Cluster",instanceClient:t},{onSuccess:()=>{d.invalidateQueries({queryKey:[r]}),d.invalidateQueries({queryKey:[i]}),Ee.dismiss(p),Ee.success("Success",{description:`${o} restarted!`,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}}),n?.()},onError:()=>{Ee.dismiss(p),Ee.error("Error",{description:`Failed to restart ${o.toLowerCase()}.`,action:{label:"Dismiss",onClick:()=>Ee.dismiss()}})}})},[r,t,i,n,e,d,s,o]),isRestartPending:c}}function GB({targetNoun:e,instanceClient:t,operation:n,variant:r,className:i,disabled:o}){const{onRestartClick:s,isRestartPending:c}=xSe(),{onRestartClick:d,isRestartPending:f}=wSe({operation:n,instanceClient:t});return u.jsxs(VB,{children:[u.jsx(BB,{asChild:!0,children:u.jsxs(Ce,{variant:r||"positiveOutline",className:Ba("mx-0 md:mx-4 rounded-full",i),onClick:e==="Cluster"&&n==="restart"?s:d,disabled:o||f||c,children:[u.jsx(NX,{}),u.jsxs("span",{className:"hidden md:inline-block",children:["Restart ",e]})]})}),u.jsx(HB,{children:n==="restart_service"?"Restarts all service threads to apply changes. No downtime expected. Performance may be briefly slower during restart.":"This fully restarts the Harper service and causes downtime."})]})}const KS="__root__",Al="importedApplications",ko="newApplication";function xD(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!r.includes(i)||e[i]!==t[i])return!1;return!0}function Sv(e,t){const[n,r]=x.useState(t),[i,o]=x.useState(e);return x.useEffect(()=>{xD(n,t)||(r(t),o(e))},[n,t,e]),xD(n,t)?[i,o]:[e,o]}const $u={};function yy(e,t,n){const r=x.useCallback(i=>t(i),[n]);x.useEffect(()=>($u[e]||($u[e]=[]),$u[e].push(r),function(){const o=$u[e].indexOf(r);o>=0&&$u[e].splice(o,1)}),[e,t,r])}function sx(e,t){const n=$u[e];if(n)for(const r of n)r(t)}function wD(e,t){return()=>sx(e,t)}function SD(e,t){return x.useCallback(()=>sx(e,t),[e,t])}function _D(e,t){return CR(sessionStorage.getItem(String(e)))??t}function SSe(e,t){t==null?sessionStorage.removeItem(String(e)):sessionStorage.setItem(String(e),JSON.stringify(t))}function Yu(e,t){const n=Sv(_D(e,t),[e]),[r,i]=n;return x.useEffect(()=>{SSe(e,r),sx(`Session:${e}`,r)},[e,r]),yy(`Session:${e}`,function(s){r!==s&&i(s)},[r,e,t]),x.useEffect(function(){const s=c=>{c.key===e&&i(_D(e,t))};return window.addEventListener("storage",s),()=>{window.removeEventListener("storage",s)}},[e,i,t]),n}function lx(e){const{instanceId:t,clusterId:n}=tt({strict:!1}),r=Bn,[i,o]=Yu(`EditorFileContent/${r}}/${e}`,void 0);return x.useMemo(()=>({content:e?i:void 0,setContent:o}),[e,i,o])}function zr(e){return!!e?.entries}const KB=x.createContext(null);function zi(){return x.useContext(KB)}function Wd(e,t){const[n,r]=x.useState(t);return yy(e,i=>r(i),[r]),n}function op(e,t){sx(e,t)}function Wg(e,t){return()=>op(e,t)}function ro(e,t){return x.useCallback(()=>op(e,t),[e,t])}function _Se({toggledSidebar:e,toggleSidebar:t}){const n=xn(),{openedEntryContents:r,openedEntry:i,isSavingFile:o,restrictPackageModification:s}=zi(),{content:c}=lx(i?.path),d=Od(),f=n.entityType==="instance"?"Instance":"Cluster",p=ro("ShowAddDirectoryOrFileModalType","file"),h=ro("ShowAddDirectoryOrFileModalType","directory"),v=ro("ShowRenameFileModal",!0),y=ro("ShowDeleteDirectoryOrFileModal",!0),b=ro("ShowRedeployApplicationModal",!0),S=SD("SaveFile",!0),C=SD("RevertChanges",!0),E=c===void 0||c===r;return u.jsxs("div",{className:"absolute top-0 right-0 left-0 backdrop-blur-sm bg-black-10 shadow-xl flex pr-4 md:pr-12",children:[u.jsxs(Ce,{variant:"ghost",className:(e?"toggled-sidebar-toggler":"hidden-sidebar-toggler")+" inline-flex text-sm md:hidden focus:outline-none focus:ring-2 text-white hover:text-grey focus:ring-gray-600 rounded-none",onClick:t,children:[u.jsxs("span",{className:"sr-only",children:[e?"Close":"Open"," sidebar"]}),e?u.jsx(SX,{}):u.jsx(xX,{})]}),i&&i?.path!==ko&&u.jsxs(u.Fragment,{children:[!zr(i)&&!i.package&&d&&u.jsxs(Ce,{variant:"default",className:"rounded-none",onClick:S,disabled:E||o,children:[u.jsx(aa,{}),u.jsxs("span",{className:"hidden lg:inline-block",children:[u.jsx("u",{children:"S"}),"ave"]})]}),!zr(i)&&!i.package&&d&&u.jsxs(Ce,{variant:"ghost",className:"rounded-none",onClick:v,disabled:!E||o,children:[u.jsx(c2,{}),u.jsxs("span",{className:"hidden lg:inline-block",children:[u.jsx("u",{children:"R"}),"ename"]})]}),!i.package&&d&&u.jsxs(Ce,{variant:"ghost",className:"rounded-none",onClick:p,children:[u.jsx(UW,{}),u.jsxs("span",{className:"hidden lg:inline-block",children:[u.jsx("u",{children:"N"}),"ew File"]})]}),!i.package&&d&&u.jsxs(Ce,{variant:"ghost",className:"rounded-none",onClick:h,children:[u.jsx(VW,{}),u.jsxs("span",{className:"hidden lg:inline-block",children:[u.jsx("u",{children:"A"}),"dd Directory"]})]}),!!i.package&&d&&!s&&u.jsxs(Ce,{variant:"ghost",className:"rounded-none",onClick:b,children:[u.jsx(w1,{}),u.jsxs("span",{children:["Redeploy ",u.jsx("u",{children:"P"}),"ackage"]})]}),u.jsx("div",{className:"grow"}),d&&u.jsx(GB,{targetNoun:f,instanceClient:n.instanceClient,operation:"restart_service",variant:"ghost",className:"rounded-none mx-0 md:mx-0",disabled:!E||o}),!zr(i)&&!i.package&&d&&u.jsxs(Ce,{variant:"ghost",className:"rounded-none",onClick:C,disabled:E||o,children:[u.jsx(GX,{}),u.jsx("span",{className:"hidden xl:inline-block",children:"Revert Changes"})]}),!s&&d&&u.jsxs(Ce,{variant:"destructiveGhost",className:"rounded-none",onClick:y,children:[u.jsx(Ja,{}),u.jsxs("span",{className:"hidden xl:inline-block",children:[u.jsx("u",{children:"D"}),"elete"]})]})]})]})}function CSe(e){return x.useCallback((t,n,r)=>{if(n!=="href")return t;if(t.startsWith("http"))return r.properties.target="_blank",t;{const i=oB().split("?")[0];switch(t){case"./apis":case"./config":case"./config/roles":case"./config/users":case"./databases":case"./logs":case"./status":return`${i}/${t.slice(2)}`}return`${i}?open=${e}/${t.slice(2)}`}},[e])}function ESe(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const kSe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,RSe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jSe={};function CD(e,t){return(jSe.jsx?RSe:kSe).test(e)}const ISe=/[ \t\n\f\r]/g;function TSe(e){return typeof e=="object"?e.type==="text"?ED(e.value):!1:ED(e)}function ED(e){return e.replace(ISe,"")===""}class Jp{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Jp.prototype.normal={};Jp.prototype.property={};Jp.prototype.space=void 0;function ZB(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Jp(n,r,t)}function MC(e){return e.toLowerCase()}class pi{constructor(t,n){this.attribute=n,this.property=t}}pi.prototype.attribute="";pi.prototype.booleanish=!1;pi.prototype.boolean=!1;pi.prototype.commaOrSpaceSeparated=!1;pi.prototype.commaSeparated=!1;pi.prototype.defined=!1;pi.prototype.mustUseProperty=!1;pi.prototype.number=!1;pi.prototype.overloadedBoolean=!1;pi.prototype.property="";pi.prototype.spaceSeparated=!1;pi.prototype.space=void 0;let NSe=0;const pt=Ac(),Vn=Ac(),zC=Ac(),ke=Ac(),Xt=Ac(),Wu=Ac(),Si=Ac();function Ac(){return 2**++NSe}const LC=Object.freeze(Object.defineProperty({__proto__:null,boolean:pt,booleanish:Vn,commaOrSpaceSeparated:Si,commaSeparated:Wu,number:ke,overloadedBoolean:zC,spaceSeparated:Xt},Symbol.toStringTag,{value:"Module"})),ZS=Object.keys(LC);class OR extends pi{constructor(t,n,r,i){let o=-1;if(super(t,n),kD(this,"space",i),typeof r=="number")for(;++o<ZS.length;){const s=ZS[o];kD(this,ZS[o],(r&LC[s])===LC[s])}}}OR.prototype.defined=!0;function kD(e,t,n){n&&(e[t]=n)}function Xd(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new OR(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[MC(r)]=r,n[MC(o.attribute)]=r}return new Jp(t,n,e.space)}const YB=Xd({properties:{ariaActiveDescendant:null,ariaAtomic:Vn,ariaAutoComplete:null,ariaBusy:Vn,ariaChecked:Vn,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:Xt,ariaCurrent:null,ariaDescribedBy:Xt,ariaDetails:null,ariaDisabled:Vn,ariaDropEffect:Xt,ariaErrorMessage:null,ariaExpanded:Vn,ariaFlowTo:Xt,ariaGrabbed:Vn,ariaHasPopup:null,ariaHidden:Vn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Xt,ariaLevel:ke,ariaLive:null,ariaModal:Vn,ariaMultiLine:Vn,ariaMultiSelectable:Vn,ariaOrientation:null,ariaOwns:Xt,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:Vn,ariaReadOnly:Vn,ariaRelevant:null,ariaRequired:Vn,ariaRoleDescription:Xt,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:Vn,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function WB(e,t){return t in e?e[t]:t}function XB(e,t){return WB(e,t.toLowerCase())}const ASe=Xd({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wu,acceptCharset:Xt,accessKey:Xt,action:null,allow:null,allowFullScreen:pt,allowPaymentRequest:pt,allowUserMedia:pt,alt:null,as:null,async:pt,autoCapitalize:null,autoComplete:Xt,autoFocus:pt,autoPlay:pt,blocking:Xt,capture:null,charSet:null,checked:pt,cite:null,className:Xt,cols:ke,colSpan:null,content:null,contentEditable:Vn,controls:pt,controlsList:Xt,coords:ke|Wu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pt,defer:pt,dir:null,dirName:null,disabled:pt,download:zC,draggable:Vn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pt,formTarget:null,headers:Xt,height:ke,hidden:zC,high:ke,href:null,hrefLang:null,htmlFor:Xt,httpEquiv:Xt,id:null,imageSizes:null,imageSrcSet:null,inert:pt,inputMode:null,integrity:null,is:null,isMap:pt,itemId:null,itemProp:Xt,itemRef:Xt,itemScope:pt,itemType:Xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pt,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:pt,muted:pt,name:null,nonce:null,noModule:pt,noValidate:pt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pt,optimum:ke,pattern:null,ping:Xt,placeholder:null,playsInline:pt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pt,referrerPolicy:null,rel:Xt,required:pt,reversed:pt,rows:ke,rowSpan:ke,sandbox:Xt,scope:null,scoped:pt,seamless:pt,selected:pt,shadowRootClonable:pt,shadowRootDelegatesFocus:pt,shadowRootMode:null,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:Vn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:pt,useMap:null,value:Vn,width:ke,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Xt,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pt,declare:pt,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:pt,noHref:pt,noShade:pt,noWrap:pt,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:Vn,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pt,disableRemotePlayback:pt,prefix:null,property:null,results:ke,security:null,unselectable:null},space:"html",transform:XB}),OSe=Xd({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Si,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:Xt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:pt,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Wu,g2:Wu,glyphName:Wu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:Si,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ke,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Si,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Si,rev:Si,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Si,requiredFeatures:Si,requiredFonts:Si,requiredFormats:Si,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:Si,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Si,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Si,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:WB}),QB=Xd({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),JB=Xd({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:XB}),eH=Xd({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$Se={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},DSe=/[A-Z]/g,RD=/-[a-z]/g,PSe=/^data[-\w.:]+$/i;function MSe(e,t){const n=MC(t);let r=t,i=pi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&PSe.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(RD,LSe);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!RD.test(o)){let s=o.replace(DSe,zSe);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=OR}return new i(r,t)}function zSe(e){return"-"+e.toLowerCase()}function LSe(e){return e.charAt(1).toUpperCase()}const USe=ZB([YB,ASe,QB,JB,eH],"html"),$R=ZB([YB,OSe,QB,JB,eH],"svg");function FSe(e){return e.join(" ").trim()}var Iu={},YS,jD;function VSe(){if(jD)return YS;jD=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
522
|
-
`,f="/",p="*",h="",v="comment",y="declaration";YS=function(S,C){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];C=C||{};var E=1,k=1;function R(Y){var B=Y.match(t);B&&(E+=B.length);var W=Y.lastIndexOf(d);k=~W?Y.length-W:k+Y.length}function I(){var Y={line:E,column:k};return function(B){return B.position=new A(Y),z(),B}}function A(Y){this.start=Y,this.end={line:E,column:k},this.source=C.source}A.prototype.content=S;function T(Y){var B=new Error(C.source+":"+E+":"+k+": "+Y);if(B.reason=Y,B.filename=C.source,B.line=E,B.column=k,B.source=S,!C.silent)throw B}function N(Y){var B=Y.exec(S);if(B){var W=B[0];return R(W),S=S.slice(W.length),B}}function z(){N(n)}function L(Y){var B;for(Y=Y||[];B=K();)B!==!1&&Y.push(B);return Y}function K(){var Y=I();if(!(f!=S.charAt(0)||p!=S.charAt(1))){for(var B=2;h!=S.charAt(B)&&(p!=S.charAt(B)||f!=S.charAt(B+1));)++B;if(B+=2,h===S.charAt(B-1))return T("End of comment missing");var W=S.slice(2,B-2);return k+=2,R(W),S=S.slice(B),k+=2,Y({type:v,comment:W})}}function ee(){var Y=I(),B=N(r);if(B){if(K(),!N(i))return T("property missing ':'");var W=N(o),P=Y({type:y,property:b(B[0].replace(e,h)),value:W?b(W[0].replace(e,h)):h});return N(s),P}}function Z(){var Y=[];L(Y);for(var B;B=ee();)B!==!1&&(Y.push(B),L(Y));return Y}return z(),Z()};function b(S){return S?S.replace(c,h):h}return YS}var ID;function BSe(){if(ID)return Iu;ID=1;var e=Iu&&Iu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.default=n;const t=e(VSe());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const s=(0,t.default)(r),c=typeof i=="function";return s.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?i(f,p,d):p&&(o=o||{},o[f]=p)}),o}return Iu}var um={},TD;function HSe(){if(TD)return um;TD=1,Object.defineProperty(um,"__esModule",{value:!0}),um.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(f){return!f||n.test(f)||e.test(f)},s=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),o(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(i,c):f=f.replace(r,c),f.replace(t,s))};return um.camelCase=d,um}var dm,ND;function qSe(){if(ND)return dm;ND=1;var e=dm&&dm.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(BSe()),n=HSe();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(c,d){c&&d&&(s[(0,n.camelCase)(c,o)]=d)}),s}return r.default=r,dm=r,dm}var GSe=qSe();const KSe=sp(GSe),tH=nH("end"),DR=nH("start");function nH(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ZSe(e){const t=DR(e),n=tH(e);if(t&&n)return{start:t,end:n}}function Om(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?AD(e.position):"start"in e||"end"in e?AD(e):"line"in e||"column"in e?UC(e):""}function UC(e){return OD(e&&e.line)+":"+OD(e&&e.column)}function AD(e){return UC(e&&e.start)+"-"+UC(e&&e.end)}function OD(e){return e&&typeof e=="number"?e:1}class Ir extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const c=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=c?c.line:void 0,this.name=Om(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ir.prototype.file="";Ir.prototype.name="";Ir.prototype.reason="";Ir.prototype.message="";Ir.prototype.stack="";Ir.prototype.column=void 0;Ir.prototype.line=void 0;Ir.prototype.ancestors=void 0;Ir.prototype.cause=void 0;Ir.prototype.fatal=void 0;Ir.prototype.place=void 0;Ir.prototype.ruleId=void 0;Ir.prototype.source=void 0;const PR={}.hasOwnProperty,YSe=new Map,WSe=/[A-Z]/g,XSe=new Set(["table","tbody","thead","tfoot","tr"]),QSe=new Set(["td","th"]),rH="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function JSe(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=s_e(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=a_e(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?$R:USe,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=iH(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function iH(e,t,n){if(t.type==="element")return e_e(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return t_e(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return r_e(e,t,n);if(t.type==="mdxjsEsm")return n_e(e,t);if(t.type==="root")return i_e(e,t,n);if(t.type==="text")return o_e(e,t)}function e_e(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=$R,e.schema=i),e.ancestors.push(t);const o=aH(e,t.tagName,!1),s=l_e(e,t);let c=zR(e,t);return XSe.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!TSe(d):!0})),oH(e,s,o,t),MR(s,c),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function t_e(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ap(e,t.position)}function n_e(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ap(e,t.position)}function r_e(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=$R,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:aH(e,t.name,!0),s=c_e(e,t),c=zR(e,t);return oH(e,s,o,t),MR(s,c),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function i_e(e,t,n){const r={};return MR(r,zR(e,t)),e.create(t,e.Fragment,r,n)}function o_e(e,t){return t.value}function oH(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function MR(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function a_e(e,t,n){return r;function r(i,o,s,c){const f=Array.isArray(s.children)?n:t;return c?f(o,s,c):f(o,s)}}function s_e(e,t){return n;function n(r,i,o,s){const c=Array.isArray(o.children),d=DR(r);return t(i,o,s,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function l_e(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&PR.call(t.properties,i)){const o=u_e(e,i,t.properties[i]);if(o){const[s,c]=o;e.tableCellAlignToStyle&&s==="align"&&typeof c=="string"&&QSe.has(t.tagName)?r=c:n[s]=c}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function c_e(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const c=s.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else ap(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else ap(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function zR(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:YSe;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const f=i.get(d)||0;s=d+"-"+f,i.set(d,f+1)}}const c=iH(e,o,s);c!==void 0&&n.push(c)}return n}function u_e(e,t,n){const r=MSe(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ESe(n):FSe(n)),r.property==="style"){let i=typeof n=="object"?n:d_e(e,String(n));return e.stylePropertyNameCase==="css"&&(i=f_e(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?$Se[r.property]||r.property:r.attribute,n]}}function d_e(e,t){try{return KSe(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ir("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=rH+"#cannot-parse-style-attribute",i}}function aH(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const c=CD(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}r=s}else r=CD(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return PR.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ap(e)}function ap(e,t){const n=new Ir("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=rH+"#cannot-handle-mdx-estrees-without-createevaluater",n}function f_e(e){const t={};let n;for(n in e)PR.call(e,n)&&(t[m_e(n)]=e[n]);return t}function m_e(e){let t=e.replace(WSe,p_e);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function p_e(e){return"-"+e.toLowerCase()}const WS={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},h_e={};function g_e(e,t){const n=h_e,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return sH(e,r,i)}function sH(e,t,n){if(v_e(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return $D(e.children,t,n)}return Array.isArray(e)?$D(e,t,n):""}function $D(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=sH(e[i],t,n);return r.join("")}function v_e(e){return!!(e&&typeof e=="object")}const DD=document.createElement("i");function LR(e){const t="&"+e+";";DD.innerHTML=t;const n=DD.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function oa(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function eo(e,t){return e.length>0?(oa(e,e.length,0,t),e):t}const PD={}.hasOwnProperty;function y_e(e){const t={};let n=-1;for(;++n<e.length;)b_e(t,e[n]);return t}function b_e(e,t){let n;for(n in t){const i=(PD.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){PD.call(i,s)||(i[s]=[]);const c=o[s];x_e(i[s],Array.isArray(c)?c:c?[c]:[])}}}function x_e(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);oa(e,0,0,r)}function lH(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Xu(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Zo=al(/[A-Za-z]/),ji=al(/[\dA-Za-z]/),w_e=al(/[#-'*+\--9=?A-Z^-~]/);function FC(e){return e!==null&&(e<32||e===127)}const VC=al(/\d/),S_e=al(/[\dA-Fa-f]/),__e=al(/[!-/:-@[-`{-~]/);function et(e){return e!==null&&e<-2}function fi(e){return e!==null&&(e<0||e===32)}function Mt(e){return e===-2||e===-1||e===32}const C_e=al(new RegExp("\\p{P}|\\p{S}","u")),E_e=al(/\s/);function al(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Qd(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&ji(e.charCodeAt(n+1))&&ji(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(s=String.fromCharCode(o,c),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Jt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(d){return Mt(d)?(e.enter(n),c(d)):t(d)}function c(d){return Mt(d)&&o++<i?(e.consume(d),c):(e.exit(n),t(d))}}const k_e={tokenize:R_e};function R_e(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Jt(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),o(c)}function o(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,s(c)}function s(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return et(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),s)}}const j_e={tokenize:I_e},MD={tokenize:T_e};function I_e(e){const t=this,n=[];let r=0,i,o,s;return c;function c(R){if(r<n.length){const I=n[r];return t.containerState=I[1],e.attempt(I[0].continuation,d,f)(R)}return f(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const I=t.events.length;let A=I,T;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){T=t.events[A][1].end;break}E(r);let N=I;for(;N<t.events.length;)t.events[N][1].end={...T},N++;return oa(t.events,A+1,0,t.events.slice(I)),t.events.length=N,f(R)}return c(R)}function f(R){if(r===n.length){if(!i)return v(R);if(i.currentConstruct&&i.currentConstruct.concrete)return b(R);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(MD,p,h)(R)}function p(R){return i&&k(),E(r),v(R)}function h(R){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(R)}function v(R){return t.containerState={},e.attempt(MD,y,b)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),v(R)}function b(R){if(R===null){i&&k(),E(0),e.consume(R);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),S(R)}function S(R){if(R===null){C(e.exit("chunkFlow"),!0),E(0),e.consume(R);return}return et(R)?(e.consume(R),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),S)}function C(R,I){const A=t.sliceStream(R);if(I&&A.push(null),R.previous=o,o&&(o.next=R),o=R,i.defineSkip(R.start),i.write(A),t.parser.lazy[R.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<s&&(!i.events[T][1].end||i.events[T][1].end.offset>s))return;const N=t.events.length;let z=N,L,K;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(L){K=t.events[z][1].end;break}L=!0}for(E(r),T=N;T<t.events.length;)t.events[T][1].end={...K},T++;oa(t.events,z+1,0,t.events.slice(N)),t.events.length=T}}function E(R){let I=n.length;for(;I-- >R;){const A=n[I];t.containerState=A[1],A[0].exit.call(t,e)}n.length=R}function k(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function T_e(e,t,n){return Jt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function zD(e){if(e===null||fi(e)||E_e(e))return 1;if(C_e(e))return 2}function UR(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const BC={name:"attention",resolveAll:N_e,tokenize:A_e};function N_e(e,t){let n=-1,r,i,o,s,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},v={...e[n][1].start};LD(h,-d),LD(v,d),s={type:d>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:d>1?"strong":"emphasis",start:{...s.start},end:{...c.end}},e[r][1].end={...s.start},e[n][1].start={...c.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=eo(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=eo(f,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),f=eo(f,UR(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=eo(f,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=eo(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,oa(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function A_e(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=zD(r);let o;return s;function s(d){return o=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===o)return e.consume(d),c;const f=e.exit("attentionSequence"),p=zD(d),h=!p||p===2&&i||n.includes(d),v=!i||i===2&&p||n.includes(r);return f._open=!!(o===42?h:h&&(i||!v)),f._close=!!(o===42?v:v&&(p||!h)),t(d)}}function LD(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const O_e={name:"autolink",tokenize:$_e};function $_e(e,t,n){let r=0;return i;function i(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return Zo(y)?(e.consume(y),s):y===64?n(y):f(y)}function s(y){return y===43||y===45||y===46||ji(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||ji(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||FC(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):w_e(y)?(e.consume(y),f):n(y)}function p(y){return ji(y)?h(y):n(y)}function h(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):v(y)}function v(y){if((y===45||ji(y))&&r++<63){const b=y===45?v:h;return e.consume(y),b}return n(y)}}const cx={partial:!0,tokenize:D_e};function D_e(e,t,n){return r;function r(o){return Mt(o)?Jt(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||et(o)?t(o):n(o)}}const cH={continuation:{tokenize:M_e},exit:z_e,name:"blockQuote",tokenize:P_e};function P_e(e,t,n){const r=this;return i;function i(s){if(s===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return Mt(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function M_e(e,t,n){const r=this;return i;function i(s){return Mt(s)?Jt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(cH,t,n)(s)}}function z_e(e){e.exit("blockQuote")}const uH={name:"characterEscape",tokenize:L_e};function L_e(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return __e(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const dH={name:"characterReference",tokenize:U_e};function U_e(e,t,n){const r=this;let i=0,o,s;return c;function c(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),d}function d(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,s=ji,p(h))}function f(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=S_e,p):(e.enter("characterReferenceValue"),o=7,s=VC,p(h))}function p(h){if(h===59&&i){const v=e.exit("characterReferenceValue");return s===ji&&!LR(r.sliceSerialize(v))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(h)&&i++<o?(e.consume(h),p):n(h)}}const UD={partial:!0,tokenize:V_e},FD={concrete:!0,name:"codeFenced",tokenize:F_e};function F_e(e,t,n){const r=this,i={partial:!0,tokenize:A};let o=0,s=0,c;return d;function d(T){return f(T)}function f(T){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,c=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(T)}function p(T){return T===c?(s++,e.consume(T),p):s<3?n(T):(e.exit("codeFencedFenceSequence"),Mt(T)?Jt(e,h,"whitespace")(T):h(T))}function h(T){return T===null||et(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(UD,S,I)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(T))}function v(T){return T===null||et(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(T)):Mt(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Jt(e,y,"whitespace")(T)):T===96&&T===c?n(T):(e.consume(T),v)}function y(T){return T===null||et(T)?h(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(T))}function b(T){return T===null||et(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(T)):T===96&&T===c?n(T):(e.consume(T),b)}function S(T){return e.attempt(i,I,C)(T)}function C(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),E}function E(T){return o>0&&Mt(T)?Jt(e,k,"linePrefix",o+1)(T):k(T)}function k(T){return T===null||et(T)?e.check(UD,S,I)(T):(e.enter("codeFlowValue"),R(T))}function R(T){return T===null||et(T)?(e.exit("codeFlowValue"),k(T)):(e.consume(T),R)}function I(T){return e.exit("codeFenced"),t(T)}function A(T,N,z){let L=0;return K;function K(W){return T.enter("lineEnding"),T.consume(W),T.exit("lineEnding"),ee}function ee(W){return T.enter("codeFencedFence"),Mt(W)?Jt(T,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):Z(W)}function Z(W){return W===c?(T.enter("codeFencedFenceSequence"),Y(W)):z(W)}function Y(W){return W===c?(L++,T.consume(W),Y):L>=s?(T.exit("codeFencedFenceSequence"),Mt(W)?Jt(T,B,"whitespace")(W):B(W)):z(W)}function B(W){return W===null||et(W)?(T.exit("codeFencedFence"),N(W)):z(W)}}}function V_e(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const XS={name:"codeIndented",tokenize:H_e},B_e={partial:!0,tokenize:q_e};function H_e(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),Jt(e,o,"linePrefix",5)(f)}function o(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?s(f):n(f)}function s(f){return f===null?d(f):et(f)?e.attempt(B_e,s,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||et(f)?(e.exit("codeFlowValue"),s(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function q_e(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):et(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Jt(e,o,"linePrefix",5)(s)}function o(s){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(s):et(s)?i(s):n(s)}}const G_e={name:"codeText",previous:Z_e,resolve:K_e,tokenize:Y_e};function K_e(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Z_e(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Y_e(e,t,n){let r=0,i,o;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),c(h)}function c(h){return h===96?(e.consume(h),r++,c):(e.exit("codeTextSequence"),d(h))}function d(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),d):h===96?(o=e.enter("codeTextSequence"),i=0,p(h)):et(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||et(h)?(e.exit("codeTextData"),d(h)):(e.consume(h),f)}function p(h){return h===96?(e.consume(h),i++,p):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(o.type="codeTextData",f(h))}}class W_e{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&fm(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),fm(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),fm(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);fm(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);fm(this.left,n.reverse())}}}function fm(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function fH(e){const t={};let n=-1,r,i,o,s,c,d,f;const p=new W_e(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,X_e(p,n)),n=t[n],f=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=p.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(p.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...p.get(i)[1].start},c=p.slice(i,n),c.unshift(r),p.splice(i,n-i+1,c))}}return oa(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function X_e(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const c=s.events,d=[],f={};let p,h,v=-1,y=n,b=0,S=0;const C=[S];for(;y;){for(;e.get(++i)[1]!==y;);o.push(i),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),h&&s.defineSkip(y.start),y._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(p),y._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=y,y=y.next}for(y=n;++v<c.length;)c[v][0]==="exit"&&c[v-1][0]==="enter"&&c[v][1].type===c[v-1][1].type&&c[v][1].start.line!==c[v][1].end.line&&(S=v+1,C.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(s.events=[],y?(y._tokenizer=void 0,y.previous=void 0):C.pop(),v=C.length;v--;){const E=c.slice(C[v],C[v+1]),k=o.pop();d.push([k,k+E.length-1]),e.splice(k,2,E)}for(d.reverse(),v=-1;++v<d.length;)f[b+d[v][0]]=b+d[v][1],b+=d[v][1]-d[v][0]-1;return f}const Q_e={resolve:eCe,tokenize:tCe},J_e={partial:!0,tokenize:nCe};function eCe(e){return fH(e),e}function tCe(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?o(c):et(c)?e.check(J_e,s,o)(c):(e.consume(c),i)}function o(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function s(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function nCe(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Jt(e,o,"linePrefix")}function o(s){if(s===null||et(s))return n(s);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function mH(e,t,n,r,i,o,s,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return h;function h(E){return E===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(E),e.exit(o),v):E===null||E===32||E===41||FC(E)?n(E):(e.enter(r),e.enter(s),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(E))}function v(E){return E===62?(e.enter(o),e.consume(E),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(E))}function y(E){return E===62?(e.exit("chunkString"),e.exit(c),v(E)):E===null||E===60||et(E)?n(E):(e.consume(E),E===92?b:y)}function b(E){return E===60||E===62||E===92?(e.consume(E),y):y(E)}function S(E){return!p&&(E===null||E===41||fi(E))?(e.exit("chunkString"),e.exit(c),e.exit(s),e.exit(r),t(E)):p<f&&E===40?(e.consume(E),p++,S):E===41?(e.consume(E),p--,S):E===null||E===32||E===40||FC(E)?n(E):(e.consume(E),E===92?C:S)}function C(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function pH(e,t,n,r,i,o){const s=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(i),e.consume(y),e.exit(i),e.enter(o),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in s.parser.constructs?n(y):y===93?(e.exit(o),e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):et(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===null||y===91||y===93||et(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Mt(y)),y===92?v:h)}function v(y){return y===91||y===92||y===93?(e.consume(y),c++,h):h(y)}}function hH(e,t,n,r,i,o){let s;return c;function c(v){return v===34||v===39||v===40?(e.enter(r),e.enter(i),e.consume(v),e.exit(i),s=v===40?41:v,d):n(v)}function d(v){return v===s?(e.enter(i),e.consume(v),e.exit(i),e.exit(r),t):(e.enter(o),f(v))}function f(v){return v===s?(e.exit(o),d(s)):v===null?n(v):et(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Jt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===s||v===null||et(v)?(e.exit("chunkString"),f(v)):(e.consume(v),v===92?h:p)}function h(v){return v===s||v===92?(e.consume(v),p):p(v)}}function $m(e,t){let n;return r;function r(i){return et(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Mt(i)?Jt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const rCe={name:"definition",tokenize:oCe},iCe={partial:!0,tokenize:aCe};function oCe(e,t,n){const r=this;let i;return o;function o(y){return e.enter("definition"),s(y)}function s(y){return pH.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return i=Xu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return fi(y)?$m(e,f)(y):f(y)}function f(y){return mH(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(iCe,h,h)(y)}function h(y){return Mt(y)?Jt(e,v,"whitespace")(y):v(y)}function v(y){return y===null||et(y)?(e.exit("definition"),r.parser.defined.push(i),t(y)):n(y)}}function aCe(e,t,n){return r;function r(c){return fi(c)?$m(e,i)(c):n(c)}function i(c){return hH(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return Mt(c)?Jt(e,s,"whitespace")(c):s(c)}function s(c){return c===null||et(c)?t(c):n(c)}}const sCe={name:"hardBreakEscape",tokenize:lCe};function lCe(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return et(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const cCe={name:"headingAtx",resolve:uCe,tokenize:dCe};function uCe(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},oa(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function dCe(e,t,n){let r=0;return i;function i(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),s(p)}function s(p){return p===35&&r++<6?(e.consume(p),s):p===null||fi(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||et(p)?(e.exit("atxHeading"),t(p)):Mt(p)?Jt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||fi(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const fCe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],VD=["pre","script","style","textarea"],mCe={concrete:!0,name:"htmlFlow",resolveTo:gCe,tokenize:vCe},pCe={partial:!0,tokenize:bCe},hCe={partial:!0,tokenize:yCe};function gCe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function vCe(e,t,n){const r=this;let i,o,s,c,d;return f;function f(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),h}function h(O){return O===33?(e.consume(O),v):O===47?(e.consume(O),o=!0,S):O===63?(e.consume(O),i=3,r.interrupt?t:$):Zo(O)?(e.consume(O),s=String.fromCharCode(O),C):n(O)}function v(O){return O===45?(e.consume(O),i=2,y):O===91?(e.consume(O),i=5,c=0,b):Zo(O)?(e.consume(O),i=4,r.interrupt?t:$):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:$):n(O)}function b(O){const J="CDATA[";return O===J.charCodeAt(c++)?(e.consume(O),c===J.length?r.interrupt?t:Z:b):n(O)}function S(O){return Zo(O)?(e.consume(O),s=String.fromCharCode(O),C):n(O)}function C(O){if(O===null||O===47||O===62||fi(O)){const J=O===47,de=s.toLowerCase();return!J&&!o&&VD.includes(de)?(i=1,r.interrupt?t(O):Z(O)):fCe.includes(s.toLowerCase())?(i=6,J?(e.consume(O),E):r.interrupt?t(O):Z(O)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):o?k(O):R(O))}return O===45||ji(O)?(e.consume(O),s+=String.fromCharCode(O),C):n(O)}function E(O){return O===62?(e.consume(O),r.interrupt?t:Z):n(O)}function k(O){return Mt(O)?(e.consume(O),k):K(O)}function R(O){return O===47?(e.consume(O),K):O===58||O===95||Zo(O)?(e.consume(O),I):Mt(O)?(e.consume(O),R):K(O)}function I(O){return O===45||O===46||O===58||O===95||ji(O)?(e.consume(O),I):A(O)}function A(O){return O===61?(e.consume(O),T):Mt(O)?(e.consume(O),A):R(O)}function T(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,N):Mt(O)?(e.consume(O),T):z(O)}function N(O){return O===d?(e.consume(O),d=null,L):O===null||et(O)?n(O):(e.consume(O),N)}function z(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||fi(O)?A(O):(e.consume(O),z)}function L(O){return O===47||O===62||Mt(O)?R(O):n(O)}function K(O){return O===62?(e.consume(O),ee):n(O)}function ee(O){return O===null||et(O)?Z(O):Mt(O)?(e.consume(O),ee):n(O)}function Z(O){return O===45&&i===2?(e.consume(O),P):O===60&&i===1?(e.consume(O),G):O===62&&i===4?(e.consume(O),M):O===63&&i===3?(e.consume(O),$):O===93&&i===5?(e.consume(O),te):et(O)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(pCe,F,Y)(O)):O===null||et(O)?(e.exit("htmlFlowData"),Y(O)):(e.consume(O),Z)}function Y(O){return e.check(hCe,B,F)(O)}function B(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),W}function W(O){return O===null||et(O)?Y(O):(e.enter("htmlFlowData"),Z(O))}function P(O){return O===45?(e.consume(O),$):Z(O)}function G(O){return O===47?(e.consume(O),s="",U):Z(O)}function U(O){if(O===62){const J=s.toLowerCase();return VD.includes(J)?(e.consume(O),M):Z(O)}return Zo(O)&&s.length<8?(e.consume(O),s+=String.fromCharCode(O),U):Z(O)}function te(O){return O===93?(e.consume(O),$):Z(O)}function $(O){return O===62?(e.consume(O),M):O===45&&i===2?(e.consume(O),$):Z(O)}function M(O){return O===null||et(O)?(e.exit("htmlFlowData"),F(O)):(e.consume(O),M)}function F(O){return e.exit("htmlFlow"),t(O)}}function yCe(e,t,n){const r=this;return i;function i(s){return et(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function bCe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(cx,t,n)}}const xCe={name:"htmlText",tokenize:wCe};function wCe(e,t,n){const r=this;let i,o,s;return c;function c($){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume($),d}function d($){return $===33?(e.consume($),f):$===47?(e.consume($),A):$===63?(e.consume($),R):Zo($)?(e.consume($),z):n($)}function f($){return $===45?(e.consume($),p):$===91?(e.consume($),o=0,b):Zo($)?(e.consume($),k):n($)}function p($){return $===45?(e.consume($),y):n($)}function h($){return $===null?n($):$===45?(e.consume($),v):et($)?(s=h,G($)):(e.consume($),h)}function v($){return $===45?(e.consume($),y):h($)}function y($){return $===62?P($):$===45?v($):h($)}function b($){const M="CDATA[";return $===M.charCodeAt(o++)?(e.consume($),o===M.length?S:b):n($)}function S($){return $===null?n($):$===93?(e.consume($),C):et($)?(s=S,G($)):(e.consume($),S)}function C($){return $===93?(e.consume($),E):S($)}function E($){return $===62?P($):$===93?(e.consume($),E):S($)}function k($){return $===null||$===62?P($):et($)?(s=k,G($)):(e.consume($),k)}function R($){return $===null?n($):$===63?(e.consume($),I):et($)?(s=R,G($)):(e.consume($),R)}function I($){return $===62?P($):R($)}function A($){return Zo($)?(e.consume($),T):n($)}function T($){return $===45||ji($)?(e.consume($),T):N($)}function N($){return et($)?(s=N,G($)):Mt($)?(e.consume($),N):P($)}function z($){return $===45||ji($)?(e.consume($),z):$===47||$===62||fi($)?L($):n($)}function L($){return $===47?(e.consume($),P):$===58||$===95||Zo($)?(e.consume($),K):et($)?(s=L,G($)):Mt($)?(e.consume($),L):P($)}function K($){return $===45||$===46||$===58||$===95||ji($)?(e.consume($),K):ee($)}function ee($){return $===61?(e.consume($),Z):et($)?(s=ee,G($)):Mt($)?(e.consume($),ee):L($)}function Z($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(e.consume($),i=$,Y):et($)?(s=Z,G($)):Mt($)?(e.consume($),Z):(e.consume($),B)}function Y($){return $===i?(e.consume($),i=void 0,W):$===null?n($):et($)?(s=Y,G($)):(e.consume($),Y)}function B($){return $===null||$===34||$===39||$===60||$===61||$===96?n($):$===47||$===62||fi($)?L($):(e.consume($),B)}function W($){return $===47||$===62||fi($)?L($):n($)}function P($){return $===62?(e.consume($),e.exit("htmlTextData"),e.exit("htmlText"),t):n($)}function G($){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),U}function U($){return Mt($)?Jt(e,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):te($)}function te($){return e.enter("htmlTextData"),s($)}}const FR={name:"labelEnd",resolveAll:ECe,resolveTo:kCe,tokenize:RCe},SCe={tokenize:jCe},_Ce={tokenize:ICe},CCe={tokenize:TCe};function ECe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&oa(e,0,e.length,n),e}function kCe(e,t){let n=e.length,r=0,i,o,s,c;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},p={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return c=[["enter",d,t],["enter",f,t]],c=eo(c,e.slice(o+1,o+r+3)),c=eo(c,[["enter",p,t]]),c=eo(c,UR(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),c=eo(c,[["exit",p,t],e[s-2],e[s-1],["exit",f,t]]),c=eo(c,e.slice(s+1)),c=eo(c,[["exit",d,t]]),oa(e,o,e.length,c),e}function RCe(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return c;function c(v){return o?o._inactive?h(v):(s=r.parser.defined.includes(Xu(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):n(v)}function d(v){return v===40?e.attempt(SCe,p,s?p:h)(v):v===91?e.attempt(_Ce,p,s?f:h)(v):s?p(v):h(v)}function f(v){return e.attempt(CCe,p,h)(v)}function p(v){return t(v)}function h(v){return o._balanced=!0,n(v)}}function jCe(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return fi(h)?$m(e,o)(h):o(h)}function o(h){return h===41?p(h):mH(e,s,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return fi(h)?$m(e,d)(h):p(h)}function c(h){return n(h)}function d(h){return h===34||h===39||h===40?hH(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):p(h)}function f(h){return fi(h)?$m(e,p)(h):p(h)}function p(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function ICe(e,t,n){const r=this;return i;function i(c){return pH.call(r,e,o,s,"reference","referenceMarker","referenceString")(c)}function o(c){return r.parser.defined.includes(Xu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function s(c){return n(c)}}function TCe(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const NCe={name:"labelStartImage",resolveAll:FR.resolveAll,tokenize:ACe};function ACe(e,t,n){const r=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),s):n(c)}function s(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const OCe={name:"labelStartLink",resolveAll:FR.resolveAll,tokenize:$Ce};function $Ce(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const QS={name:"lineEnding",tokenize:DCe};function DCe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Jt(e,t,"linePrefix")}}const _v={name:"thematicBreak",tokenize:PCe};function PCe(e,t,n){let r=0,i;return o;function o(f){return e.enter("thematicBreak"),s(f)}function s(f){return i=f,c(f)}function c(f){return f===i?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||et(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===i?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Mt(f)?Jt(e,c,"whitespace")(f):c(f))}}const ii={continuation:{tokenize:UCe},exit:VCe,name:"list",tokenize:LCe},MCe={partial:!0,tokenize:BCe},zCe={partial:!0,tokenize:FCe};function LCe(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return c;function c(y){const b=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:VC(y)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(_v,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return VC(y)&&++s<10?(e.consume(y),d):(!r.interrupt||s<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(cx,r.interrupt?n:p,e.attempt(MCe,v,h))}function p(y){return r.containerState.initialBlankLine=!0,o++,v(y)}function h(y){return Mt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),v):n(y)}function v(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function UCe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(cx,i,o);function i(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Jt(e,t,"listItemIndent",r.containerState.size+1)(c)}function o(c){return r.containerState.furtherBlankLines||!Mt(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(zCe,t,s)(c))}function s(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Jt(e,e.attempt(ii,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function FCe(e,t,n){const r=this;return Jt(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function VCe(e){e.exit(this.containerState.type)}function BCe(e,t,n){const r=this;return Jt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!Mt(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const BD={name:"setextUnderline",resolveTo:HCe,tokenize:qCe};function HCe(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function qCe(e,t,n){const r=this;let i;return o;function o(f){let p=r.events.length,h;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){h=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=f,s(f)):n(f)}function s(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===i?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Mt(f)?Jt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||et(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const GCe={tokenize:KCe};function KCe(e){const t=this,n=e.attempt(cx,r,e.attempt(this.parser.constructs.flowInitial,i,Jt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Q_e,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ZCe={resolveAll:vH()},YCe=gH("string"),WCe=gH("text");function gH(e){return{resolveAll:vH(e==="text"?XCe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,c);return s;function s(p){return f(p)?o(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),o(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const h=i[p];let v=-1;if(h)for(;++v<h.length;){const y=h[v];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function vH(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function XCe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,c=0,d;for(;o--;){const f=i[o];if(typeof f=="string"){for(s=f.length;f.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(f===-2)d=!0,c++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const QCe={42:ii,43:ii,45:ii,48:ii,49:ii,50:ii,51:ii,52:ii,53:ii,54:ii,55:ii,56:ii,57:ii,62:cH},JCe={91:rCe},e1e={[-2]:XS,[-1]:XS,32:XS},t1e={35:cCe,42:_v,45:[BD,_v],60:mCe,61:BD,95:_v,96:FD,126:FD},n1e={38:dH,92:uH},r1e={[-5]:QS,[-4]:QS,[-3]:QS,33:NCe,38:dH,42:BC,60:[O_e,xCe],91:OCe,92:[sCe,uH],93:FR,95:BC,96:G_e},i1e={null:[BC,ZCe]},o1e={null:[42,95]},a1e={null:[]},s1e=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:o1e,contentInitial:JCe,disable:a1e,document:QCe,flow:t1e,flowInitial:e1e,insideSpan:i1e,string:n1e,text:r1e},Symbol.toStringTag,{value:"Module"}));function l1e(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],c=[];const d={attempt:N(A),check:N(T),consume:k,enter:R,exit:I,interrupt:N(T,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:b,parser:e,previous:null,sliceSerialize:v,sliceStream:y,write:h};let p=t.tokenize.call(f,d);return t.resolveAll&&o.push(t),f;function h(ee){return s=eo(s,ee),C(),s[s.length-1]!==null?[]:(z(t,0),f.events=UR(o,f.events,f),f.events)}function v(ee,Z){return u1e(y(ee),Z)}function y(ee){return c1e(s,ee)}function b(){const{_bufferIndex:ee,_index:Z,line:Y,column:B,offset:W}=r;return{_bufferIndex:ee,_index:Z,line:Y,column:B,offset:W}}function S(ee){i[ee.line]=ee.column,K()}function C(){let ee;for(;r._index<s.length;){const Z=s[r._index];if(typeof Z=="string")for(ee=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ee&&r._bufferIndex<Z.length;)E(Z.charCodeAt(r._bufferIndex));else E(Z)}}function E(ee){p=p(ee)}function k(ee){et(ee)?(r.line++,r.column=1,r.offset+=ee===-3?2:1,K()):ee!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ee}function R(ee,Z){const Y=Z||{};return Y.type=ee,Y.start=b(),f.events.push(["enter",Y,f]),c.push(Y),Y}function I(ee){const Z=c.pop();return Z.end=b(),f.events.push(["exit",Z,f]),Z}function A(ee,Z){z(ee,Z.from)}function T(ee,Z){Z.restore()}function N(ee,Z){return Y;function Y(B,W,P){let G,U,te,$;return Array.isArray(B)?F(B):"tokenize"in B?F([B]):M(B);function M(pe){return V;function V(ie){const _e=ie!==null&&pe[ie],Ie=ie!==null&&pe.null,He=[...Array.isArray(_e)?_e:_e?[_e]:[],...Array.isArray(Ie)?Ie:Ie?[Ie]:[]];return F(He)(ie)}}function F(pe){return G=pe,U=0,pe.length===0?P:O(pe[U])}function O(pe){return V;function V(ie){return $=L(),te=pe,pe.partial||(f.currentConstruct=pe),pe.name&&f.parser.constructs.disable.null.includes(pe.name)?de():pe.tokenize.call(Z?Object.assign(Object.create(f),Z):f,d,J,de)(ie)}}function J(pe){return ee(te,$),W}function de(pe){return $.restore(),++U<G.length?O(G[U]):P}}}function z(ee,Z){ee.resolveAll&&!o.includes(ee)&&o.push(ee),ee.resolve&&oa(f.events,Z,f.events.length-Z,ee.resolve(f.events.slice(Z),f)),ee.resolveTo&&(f.events=ee.resolveTo(f.events,f))}function L(){const ee=b(),Z=f.previous,Y=f.currentConstruct,B=f.events.length,W=Array.from(c);return{from:B,restore:P};function P(){r=ee,f.previous=Z,f.currentConstruct=Y,f.events.length=B,c=W,K()}}function K(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function c1e(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const c=s[0];typeof c=="string"?s[0]=c.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function u1e(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
523
|
-
`;break}case-3:{s=`\r
|
|
524
|
-
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function d1e(e){const r={constructs:y_e([s1e,...(e||{}).extensions||[]]),content:i(k_e),defined:[],document:i(j_e),flow:i(GCe),lazy:{},string:i(YCe),text:i(WCe)};return r;function i(o){return s;function s(c){return l1e(r,o,c)}}}function f1e(e){for(;!fH(e););return e}const HD=/[\0\t\n\r]/g;function m1e(){let e=1,t="",n=!0,r;return i;function i(o,s,c){const d=[];let f,p,h,v,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),h=0,t="",n&&(o.charCodeAt(0)===65279&&h++,n=void 0);h<o.length;){if(HD.lastIndex=h,f=HD.exec(o),v=f&&f.index!==void 0?f.index:o.length,y=o.charCodeAt(v),!f){t=o.slice(h);break}if(y===10&&h===v&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),h<v&&(d.push(o.slice(h,v)),e+=v-h),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}h=v+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const p1e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function h1e(e){return e.replace(p1e,g1e)}function g1e(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return lH(n.slice(o?2:1),o?16:10)}return LR(n)||e}const yH={}.hasOwnProperty;function v1e(e,t,n){return typeof t!="string"&&(n=t,t=void 0),y1e(n)(f1e(d1e(n).document().write(m1e()(e,t,!0))))}function y1e(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Wt),autolinkProtocol:L,autolinkEmail:L,atxHeading:o(ln),blockQuote:o(Ie),characterEscape:L,characterReference:L,codeFenced:o(He),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(He,s),codeText:o(Ae,s),codeTextData:L,data:L,codeFlowValue:L,definition:o(Ye),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(jt),hardBreakEscape:o(Dn),hardBreakTrailing:o(Dn),htmlFlow:o(Pn,s),htmlFlowData:L,htmlText:o(Pn,s),htmlTextData:L,image:o(Gr),label:s,link:o(Wt),listItem:o(ae),listItemValue:v,listOrdered:o(q,h),listUnordered:o(q),paragraph:o(ue),reference:O,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ln),strong:o(xe),thematicBreak:o(Se)},exit:{atxHeading:d(),atxHeadingSequence:A,autolink:d(),autolinkEmail:_e,autolinkProtocol:ie,blockQuote:d(),characterEscapeValue:K,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:pe,characterReference:V,codeFenced:d(C),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:b,codeFlowValue:K,codeIndented:d(E),codeText:d(W),codeTextData:K,data:K,definition:d(),definitionDestinationString:I,definitionLabelString:k,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(Z),hardBreakTrailing:d(Z),htmlFlow:d(Y),htmlFlowData:K,htmlText:d(B),htmlTextData:K,image:d(G),label:te,labelText:U,lineEnding:ee,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:J,resourceDestinationString:$,resourceTitleString:M,resource:F,setextHeading:d(z),setextHeadingLineSequence:N,setextHeadingText:T,strong:d(),thematicBreak:d()}};bH(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ne){let ye={type:"root",children:[]};const Ne={stack:[ye],tokenStack:[],config:t,enter:c,exit:f,buffer:s,resume:p,data:n},Ke=[];let ot=-1;for(;++ot<ne.length;)if(ne[ot][1].type==="listOrdered"||ne[ot][1].type==="listUnordered")if(ne[ot][0]==="enter")Ke.push(ot);else{const Kt=Ke.pop();ot=i(ne,Kt,ot)}for(ot=-1;++ot<ne.length;){const Kt=t[ne[ot][0]];yH.call(Kt,ne[ot][1].type)&&Kt[ne[ot][1].type].call(Object.assign({sliceSerialize:ne[ot][2].sliceSerialize},Ne),ne[ot][1])}if(Ne.tokenStack.length>0){const Kt=Ne.tokenStack[Ne.tokenStack.length-1];(Kt[1]||qD).call(Ne,void 0,Kt[0])}for(ye.position={start:Is(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:Is(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},ot=-1;++ot<t.transforms.length;)ye=t.transforms[ot](ye)||ye;return ye}function i(ne,ye,Ne){let Ke=ye-1,ot=-1,Kt=!1,Mn,cn,Bt,In;for(;++Ke<=Ne;){const It=ne[Ke];switch(It[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{It[0]==="enter"?ot++:ot--,In=void 0;break}case"lineEndingBlank":{It[0]==="enter"&&(Mn&&!In&&!ot&&!Bt&&(Bt=Ke),In=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:In=void 0}if(!ot&&It[0]==="enter"&&It[1].type==="listItemPrefix"||ot===-1&&It[0]==="exit"&&(It[1].type==="listUnordered"||It[1].type==="listOrdered")){if(Mn){let Kr=Ke;for(cn=void 0;Kr--;){const bt=ne[Kr];if(bt[1].type==="lineEnding"||bt[1].type==="lineEndingBlank"){if(bt[0]==="exit")continue;cn&&(ne[cn][1].type="lineEndingBlank",Kt=!0),bt[1].type="lineEnding",cn=Kr}else if(!(bt[1].type==="linePrefix"||bt[1].type==="blockQuotePrefix"||bt[1].type==="blockQuotePrefixWhitespace"||bt[1].type==="blockQuoteMarker"||bt[1].type==="listItemIndent"))break}Bt&&(!cn||Bt<cn)&&(Mn._spread=!0),Mn.end=Object.assign({},cn?ne[cn][1].start:It[1].end),ne.splice(cn||Ke,0,["exit",Mn,It[2]]),Ke++,Ne++}if(It[1].type==="listItemPrefix"){const Kr={type:"listItem",_spread:!1,start:Object.assign({},It[1].start),end:void 0};Mn=Kr,ne.splice(Ke,0,["enter",Kr,It[2]]),Ke++,Ne++,Bt=void 0,In=!0}}}return ne[ye][1]._spread=Kt,Ne}function o(ne,ye){return Ne;function Ne(Ke){c.call(this,ne(Ke),Ke),ye&&ye.call(this,Ke)}}function s(){this.stack.push({type:"fragment",children:[]})}function c(ne,ye,Ne){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([ye,Ne||void 0]),ne.position={start:Is(ye.start),end:void 0}}function d(ne){return ye;function ye(Ne){ne&&ne.call(this,Ne),f.call(this,Ne)}}function f(ne,ye){const Ne=this.stack.pop(),Ke=this.tokenStack.pop();if(Ke)Ke[0].type!==ne.type&&(ye?ye.call(this,ne,Ke[0]):(Ke[1]||qD).call(this,ne,Ke[0]));else throw new Error("Cannot close `"+ne.type+"` ("+Om({start:ne.start,end:ne.end})+"): it’s not open");Ne.position.end=Is(ne.end)}function p(){return g_e(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function v(ne){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ne=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=ne}function b(){const ne=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=ne}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const ne=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const ne=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ne.replace(/(\r?\n|\r)$/g,"")}function k(ne){const ye=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=ye,Ne.identifier=Xu(this.sliceSerialize(ne)).toLowerCase()}function R(){const ne=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ne}function I(){const ne=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ne}function A(ne){const ye=this.stack[this.stack.length-1];if(!ye.depth){const Ne=this.sliceSerialize(ne).length;ye.depth=Ne}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function N(ne){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function L(ne){const Ne=this.stack[this.stack.length-1].children;let Ke=Ne[Ne.length-1];(!Ke||Ke.type!=="text")&&(Ke=ve(),Ke.position={start:Is(ne.start),end:void 0},Ne.push(Ke)),this.stack.push(Ke)}function K(ne){const ye=this.stack.pop();ye.value+=this.sliceSerialize(ne),ye.position.end=Is(ne.end)}function ee(ne){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ne=ye.children[ye.children.length-1];Ne.position.end=Is(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ye.type)&&(L.call(this,ne),K.call(this,ne))}function Z(){this.data.atHardBreak=!0}function Y(){const ne=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ne}function B(){const ne=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ne}function W(){const ne=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ne}function P(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=ye,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function G(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=ye,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function U(ne){const ye=this.sliceSerialize(ne),Ne=this.stack[this.stack.length-2];Ne.label=h1e(ye),Ne.identifier=Xu(ye).toLowerCase()}function te(){const ne=this.stack[this.stack.length-1],ye=this.resume(),Ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ne.type==="link"){const Ke=ne.children;Ne.children=Ke}else Ne.alt=ye}function $(){const ne=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ne}function M(){const ne=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ne}function F(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function J(ne){const ye=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=ye,Ne.identifier=Xu(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function de(ne){this.data.characterReferenceType=ne.type}function pe(ne){const ye=this.sliceSerialize(ne),Ne=this.data.characterReferenceType;let Ke;Ne?(Ke=lH(ye,Ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ke=LR(ye);const ot=this.stack[this.stack.length-1];ot.value+=Ke}function V(ne){const ye=this.stack.pop();ye.position.end=Is(ne.end)}function ie(ne){K.call(this,ne);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(ne)}function _e(ne){K.call(this,ne);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(ne)}function Ie(){return{type:"blockquote",children:[]}}function He(){return{type:"code",lang:null,meta:null,value:""}}function Ae(){return{type:"inlineCode",value:""}}function Ye(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function jt(){return{type:"emphasis",children:[]}}function ln(){return{type:"heading",depth:0,children:[]}}function Dn(){return{type:"break"}}function Pn(){return{type:"html",value:""}}function Gr(){return{type:"image",title:null,url:"",alt:null}}function Wt(){return{type:"link",title:null,url:"",children:[]}}function q(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function ae(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function ue(){return{type:"paragraph",children:[]}}function xe(){return{type:"strong",children:[]}}function ve(){return{type:"text",value:""}}function Se(){return{type:"thematicBreak"}}}function Is(e){return{line:e.line,column:e.column,offset:e.offset}}function bH(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?bH(e,r):b1e(e,r)}}function b1e(e,t){let n;for(n in t)if(yH.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function qD(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Om({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Om({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Om({start:t.start,end:t.end})+") is still open")}function x1e(e){const t=this;t.parser=n;function n(r){return v1e(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function w1e(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function S1e(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
525
|
-
`}]}function _1e(e,t){const n=t.value?t.value+`
|
|
526
|
-
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function C1e(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function E1e(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function k1e(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Qd(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function R1e(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function j1e(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function xH(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function I1e(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xH(e,t);const i={src:Qd(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function T1e(e,t){const n={src:Qd(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function N1e(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function A1e(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xH(e,t);const i={href:Qd(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function O1e(e,t){const n={href:Qd(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $1e(e,t,n){const r=e.all(t),i=n?D1e(n):wH(t),o={},s=[];if(typeof t.checked=="boolean"){const p=r[0];let h;p&&p.type==="element"&&p.tagName==="p"?h=p:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(i||c!==0||p.type!=="element"||p.tagName!=="p")&&s.push({type:"text",value:`
|
|
527
|
-
`}),p.type==="element"&&p.tagName==="p"&&!i?s.push(...p.children):s.push(p)}const d=r[r.length-1];d&&(i||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
|
|
528
|
-
`});const f={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,f),e.applyData(t,f)}function D1e(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=wH(n[r])}return t}function wH(e){const t=e.spread;return t??e.children.length>1}function P1e(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function M1e(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function z1e(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function L1e(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function U1e(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=DR(t.children[1]),d=tH(t.children[t.children.length-1]);c&&d&&(s.position={start:c,end:d}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function F1e(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,c=s?s.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const h=t.children[d],v={},y=s?s[d]:void 0;y&&(v.align=y);let b={type:"element",tagName:o,properties:v,children:[]};h&&(b.children=e.all(h),e.patch(h,b),b=e.applyData(h,b)),f.push(b)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function V1e(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const GD=9,KD=32;function B1e(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(ZD(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(ZD(t.slice(i),i>0,!1)),o.join("")}function ZD(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===GD||o===KD;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===GD||o===KD;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function H1e(e,t){const n={type:"text",value:B1e(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function q1e(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const G1e={blockquote:w1e,break:S1e,code:_1e,delete:C1e,emphasis:E1e,footnoteReference:k1e,heading:R1e,html:j1e,imageReference:I1e,image:T1e,inlineCode:N1e,linkReference:A1e,link:O1e,listItem:$1e,list:P1e,paragraph:M1e,root:z1e,strong:L1e,table:U1e,tableCell:V1e,tableRow:F1e,text:H1e,thematicBreak:q1e,toml:Xg,yaml:Xg,definition:Xg,footnoteDefinition:Xg};function Xg(){}const SH=-1,ux=0,Dm=1,by=2,VR=3,BR=4,HR=5,qR=6,_H=7,CH=8,YD=typeof self=="object"?self:globalThis,K1e=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case ux:case SH:return n(s,i);case Dm:{const c=n([],i);for(const d of s)c.push(r(d));return c}case by:{const c=n({},i);for(const[d,f]of s)c[r(d)]=r(f);return c}case VR:return n(new Date(s),i);case BR:{const{source:c,flags:d}=s;return n(new RegExp(c,d),i)}case HR:{const c=n(new Map,i);for(const[d,f]of s)c.set(r(d),r(f));return c}case qR:{const c=n(new Set,i);for(const d of s)c.add(r(d));return c}case _H:{const{name:c,message:d}=s;return n(new YD[c](d),i)}case CH:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:c}=new Uint8Array(s);return n(new DataView(c),s)}}return n(new YD[o](s),i)};return r},WD=e=>K1e(new Map,e)(0),Tu="",{toString:Z1e}={},{keys:Y1e}=Object,mm=e=>{const t=typeof e;if(t!=="object"||!e)return[ux,t];const n=Z1e.call(e).slice(8,-1);switch(n){case"Array":return[Dm,Tu];case"Object":return[by,Tu];case"Date":return[VR,Tu];case"RegExp":return[BR,Tu];case"Map":return[HR,Tu];case"Set":return[qR,Tu];case"DataView":return[Dm,n]}return n.includes("Array")?[Dm,n]:n.includes("Error")?[_H,n]:[by,n]},Qg=([e,t])=>e===ux&&(t==="function"||t==="symbol"),W1e=(e,t,n,r)=>{const i=(s,c)=>{const d=r.push(s)-1;return n.set(c,d),d},o=s=>{if(n.has(s))return n.get(s);let[c,d]=mm(s);switch(c){case ux:{let p=s;switch(d){case"bigint":c=CH,p=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return i([SH],s)}return i([c,p],s)}case Dm:{if(d){let v=s;return d==="DataView"?v=new Uint8Array(s.buffer):d==="ArrayBuffer"&&(v=new Uint8Array(s)),i([d,[...v]],s)}const p=[],h=i([c,p],s);for(const v of s)p.push(o(v));return h}case by:{if(d)switch(d){case"BigInt":return i([d,s.toString()],s);case"Boolean":case"Number":case"String":return i([d,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const p=[],h=i([c,p],s);for(const v of Y1e(s))(e||!Qg(mm(s[v])))&&p.push([o(v),o(s[v])]);return h}case VR:return i([c,s.toISOString()],s);case BR:{const{source:p,flags:h}=s;return i([c,{source:p,flags:h}],s)}case HR:{const p=[],h=i([c,p],s);for(const[v,y]of s)(e||!(Qg(mm(v))||Qg(mm(y))))&&p.push([o(v),o(y)]);return h}case qR:{const p=[],h=i([c,p],s);for(const v of s)(e||!Qg(mm(v)))&&p.push(o(v));return h}}const{message:f}=s;return i([c,{name:d,message:f}],s)};return o},XD=(e,{json:t,lossy:n}={})=>{const r=[];return W1e(!(t||n),!!t,new Map,r)(e),r},xy=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?WD(XD(e,t)):structuredClone(e):(e,t)=>WD(XD(e,t));function X1e(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Q1e(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function J1e(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||X1e,r=e.options.footnoteBackLabel||Q1e,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),h=String(f.identifier).toUpperCase(),v=Qd(h.toLowerCase());let y=0;const b=[],S=e.footnoteCounts.get(h);for(;S!==void 0&&++y<=S;){b.length>0&&b.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const C=p[p.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const k=C.children[C.children.length-1];k&&k.type==="text"?k.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...b)}else p.push(...b);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(p,!0)};e.patch(f,E),c.push(E)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...xy(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
529
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
530
|
-
`}]}}const EH=(function(e){if(e==null)return rEe;if(typeof e=="function")return dx(e);if(typeof e=="object")return Array.isArray(e)?eEe(e):tEe(e);if(typeof e=="string")return nEe(e);throw new Error("Expected function, string, or object as test")});function eEe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=EH(e[n]);return dx(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function tEe(e){const t=e;return dx(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function nEe(e){return dx(t);function t(n){return n&&n.type===e}}function dx(e){return t;function t(n,r,i){return!!(iEe(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function rEe(){return!0}function iEe(e){return e!==null&&typeof e=="object"&&"type"in e}const kH=[],oEe=!0,QD=!1,aEe="skip";function sEe(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=EH(i),s=r?-1:1;c(e,void 0,[])();function c(d,f,p){const h=d&&typeof d=="object"?d:{};if(typeof h.type=="string"){const y=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return v;function v(){let y=kH,b,S,C;if((!t||o(d,f,p[p.length-1]||void 0))&&(y=lEe(n(d,p)),y[0]===QD))return y;if("children"in d&&d.children){const E=d;if(E.children&&y[0]!==aEe)for(S=(r?E.children.length:-1)+s,C=p.concat(E);S>-1&&S<E.children.length;){const k=E.children[S];if(b=c(k,S,C)(),b[0]===QD)return b;S=typeof b[1]=="number"?b[1]:S+s}}return y}}}function lEe(e){return Array.isArray(e)?e:typeof e=="number"?[oEe,e]:e==null?kH:[e]}function RH(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),sEe(e,o,c,i);function c(d,f){const p=f[f.length-1],h=p?p.children.indexOf(d):void 0;return s(d,h,p)}}const HC={}.hasOwnProperty,cEe={};function uEe(e,t){const n=t||cEe,r=new Map,i=new Map,o=new Map,s={...G1e,...n.handlers},c={all:f,applyData:fEe,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:d,options:n,patch:dEe,wrap:pEe};return RH(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const h=p.type==="definition"?r:i,v=String(p.identifier).toUpperCase();h.has(v)||h.set(v,p)}}),c;function d(p,h){const v=p.type,y=c.handlers[v];if(HC.call(c.handlers,v)&&y)return y(c,p,h);if(c.options.passThrough&&c.options.passThrough.includes(v)){if("children"in p){const{children:S,...C}=p,E=xy(C);return E.children=c.all(p),E}return xy(p)}return(c.options.unknownHandler||mEe)(c,p,h)}function f(p){const h=[];if("children"in p){const v=p.children;let y=-1;for(;++y<v.length;){const b=c.one(v[y],p);if(b){if(y&&v[y-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=JD(b.value)),!Array.isArray(b)&&b.type==="element")){const S=b.children[0];S&&S.type==="text"&&(S.value=JD(S.value))}Array.isArray(b)?h.push(...b):h.push(b)}}}return h}}function dEe(e,t){e.position&&(t.position=ZSe(e))}function fEe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,xy(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function mEe(e,t){const n=t.data||{},r="value"in t&&!(HC.call(n,"hProperties")||HC.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function pEe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
531
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
532
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
533
|
-
`}),n}function JD(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function eP(e,t){const n=uEe(e,t),r=n.one(e,void 0),i=J1e(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
534
|
-
`},i),o}function hEe(e,t){return e&&"run"in e?async function(n,r){const i=eP(n,{file:r,...t});await e.run(i,r)}:function(n,r){return eP(n,{file:r,...e||t})}}function tP(e){if(e)throw e}var JS,nP;function gEe(){if(nP)return JS;nP=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},o=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),h=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!h)return!1;var v;for(v in f);return typeof v>"u"||e.call(f,v)},s=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return JS=function d(){var f,p,h,v,y,b,S=arguments[0],C=1,E=arguments.length,k=!1;for(typeof S=="boolean"&&(k=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<E;++C)if(f=arguments[C],f!=null)for(p in f)h=c(S,p),v=c(f,p),S!==v&&(k&&v&&(o(v)||(y=i(v)))?(y?(y=!1,b=h&&i(h)?h:[]):b=h&&o(h)?h:{},s(S,{name:p,newValue:d(k,b,v)})):typeof v<"u"&&s(S,{name:p,newValue:v}));return S},JS}var vEe=gEe();const e_=sp(vEe);function qC(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function yEe(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);c(null,...i);function c(d,...f){const p=e[++o];let h=-1;if(d){s(d);return}for(;++h<i.length;)(f[h]===null||f[h]===void 0)&&(f[h]=i[h]);i=f,p?bEe(p,c)(...f):s(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function bEe(e,t){let n;return r;function r(...s){const c=e.length>s.length;let d;c&&s.push(i);try{d=e.apply(this,s)}catch(f){const p=f;if(c&&n)throw p;return i(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(o,i):d instanceof Error?i(d):o(d))}function i(s,...c){n||(n=!0,t(s,...c))}function o(s){i(null,s)}}const Go={basename:xEe,dirname:wEe,extname:SEe,join:_Ee,sep:"/"};function xEe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');eh(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(r=i):(c=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function wEe(e){if(eh(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function SEe(e){eh(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const c=e.codePointAt(t);if(c===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),c===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function _Ee(...e){let t=-1,n;for(;++t<e.length;)eh(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":CEe(n)}function CEe(e){eh(e);const t=e.codePointAt(0)===47;let n=EEe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function EEe(e,t){let n="",r=0,i=-1,o=0,s=-1,c,d;for(;++s<=e.length;){if(s<e.length)c=e.codePointAt(s);else{if(c===47)break;c=47}if(c===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else c===46&&o>-1?o++:o=-1}return n}function eh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const kEe={cwd:REe};function REe(){return"/"}function GC(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function jEe(e){if(typeof e=="string")e=new URL(e);else if(!GC(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return IEe(e)}function IEe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const t_=["history","path","basename","stem","extname","dirname"];class jH{constructor(t){let n;t?GC(t)?n={path:t}:typeof t=="string"||TEe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":kEe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<t_.length;){const o=t_[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)t_.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Go.basename(this.path):void 0}set basename(t){r_(t,"basename"),n_(t,"basename"),this.path=Go.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Go.dirname(this.path):void 0}set dirname(t){rP(this.basename,"dirname"),this.path=Go.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Go.extname(this.path):void 0}set extname(t){if(n_(t,"extname"),rP(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Go.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){GC(t)&&(t=jEe(t)),r_(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Go.basename(this.path,this.extname):void 0}set stem(t){r_(t,"stem"),n_(t,"stem"),this.path=Go.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ir(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function n_(e,t){if(e&&e.includes(Go.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Go.sep+"`")}function r_(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function rP(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function TEe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NEe=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),AEe={}.hasOwnProperty;class GR extends NEe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=yEe()}copy(){const t=new GR;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(e_(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(a_("data",this.frozen),this.namespace[t]=n,this):AEe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(a_("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Jg(t),r=this.parser||this.Parser;return i_("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),i_("process",this.parser||this.Parser),o_("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const c=Jg(t),d=r.parse(c);r.run(d,c,function(p,h,v){if(p||!h||!v)return f(p);const y=h,b=r.stringify(y,v);DEe(b)?v.value=b:v.result=b,f(p,v)});function f(p,h){p||!h?s(p):o?o(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),i_("processSync",this.parser||this.Parser),o_("processSync",this.compiler||this.Compiler),this.process(t,i),oP("processSync","process",n),r;function i(o,s){n=!0,tP(o),r=s}}run(t,n,r){iP(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,c){const d=Jg(n);i.run(t,d,f);function f(p,h,v){const y=h||t;p?c(p):s?s(y):r(void 0,y,v)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),oP("runSync","run",r),i;function o(s,c){tP(s),i=c,r=!0}}stringify(t,n){this.freeze();const r=Jg(n),i=this.compiler||this.Compiler;return o_("stringify",i),iP(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(a_("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...h]=f;d(p,h)}else s(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function s(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(i.settings=e_(!0,i.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const h=f[p];o(h)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let h=-1,v=-1;for(;++h<r.length;)if(r[h][0]===f){v=h;break}if(v===-1)r.push([f,...p]);else if(p.length>0){let[y,...b]=p;const S=r[v][1];qC(S)&&qC(y)&&(y=e_(!0,S,y)),r[v]=[f,y,...b]}}}}const OEe=new GR().freeze();function i_(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function o_(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function a_(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function iP(e){if(!qC(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function oP(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jg(e){return $Ee(e)?e:new jH(e)}function $Ee(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function DEe(e){return typeof e=="string"||PEe(e)}function PEe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const MEe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",aP=[],sP={allowDangerousHtml:!0},zEe=/^(https?|ircs?|mailto|xmpp)$/i,LEe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function UEe(e){const t=FEe(e),n=VEe(e);return BEe(t.runSync(t.parse(n),n),e)}function FEe(e){const t=e.rehypePlugins||aP,n=e.remarkPlugins||aP,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...sP}:sP;return OEe().use(x1e).use(n).use(hEe,r).use(t)}function VEe(e){const t=e.children||"",n=new jH;return typeof t=="string"&&(n.value=t),n}function BEe(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||HEe;for(const p of LEe)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+MEe+p.id,void 0);return RH(e,f),JSe(e,{Fragment:u.Fragment,components:i,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function f(p,h,v){if(p.type==="raw"&&v&&typeof h=="number")return s?v.children.splice(h,1):v.children[h]={type:"text",value:p.value},h;if(p.type==="element"){let y;for(y in WS)if(Object.hasOwn(WS,y)&&Object.hasOwn(p.properties,y)){const b=p.properties[y],S=WS[y];(S===null||S.includes(p.tagName))&&(p.properties[y]=d(String(b||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):o?o.includes(p.tagName):!1;if(!y&&r&&typeof h=="number"&&(y=!r(p,h,v)),y&&v&&typeof h=="number")return c&&p.children?v.children.splice(h,1,...p.children):v.children.splice(h,1),h}}}function HEe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||zEe.test(e.slice(0,t))?e:""}var qEe="Separator",lP="horizontal",GEe=["horizontal","vertical"],IH=x.forwardRef((e,t)=>{const{decorative:n,orientation:r=lP,...i}=e,o=KEe(r)?r:lP,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return u.jsx(Be.div,{"data-orientation":o,...c,...i,ref:t})});IH.displayName=qEe;function KEe(e){return GEe.includes(e)}var ZEe=IH;function fx({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return u.jsx(ZEe,{"data-slot":"separator-root",decorative:n,orientation:t,className:Le("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}var mx="Tabs",[YEe]=Di(mx,[Kd]),TH=Kd(),[WEe,KR]=YEe(mx),NH=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:c,activationMode:d="automatic",...f}=e,p=hc(c),[h,v]=No({prop:r,onChange:i,defaultProp:o??"",caller:mx});return u.jsx(WEe,{scope:n,baseId:Ii(),value:h,onValueChange:v,orientation:s,dir:p,activationMode:d,children:u.jsx(Be.div,{dir:p,"data-orientation":s,...f,ref:t})})});NH.displayName=mx;var AH="TabsList",OH=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=KR(AH,n),s=TH(n);return u.jsx(uR,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:r,children:u.jsx(Be.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});OH.displayName=AH;var $H="TabsTrigger",DH=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=KR($H,n),c=TH(n),d=zH(s.baseId,r),f=LH(s.baseId,r),p=r===s.value;return u.jsx(dR,{asChild:!0,...c,focusable:!i,active:p,children:u.jsx(Be.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:d,...o,ref:t,onMouseDown:Re(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?s.onValueChange(r):h.preventDefault()}),onKeyDown:Re(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&s.onValueChange(r)}),onFocus:Re(e.onFocus,()=>{const h=s.activationMode!=="manual";!p&&!i&&h&&s.onValueChange(r)})})})});DH.displayName=$H;var PH="TabsContent",MH=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,c=KR(PH,n),d=zH(c.baseId,r),f=LH(c.baseId,r),p=r===c.value,h=x.useRef(p);return x.useEffect(()=>{const v=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(v)},[]),u.jsx(Gn,{present:i||p,children:({present:v})=>u.jsx(Be.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!v,id:f,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:v&&o})})});MH.displayName=PH;function zH(e,t){return`${e}-trigger-${t}`}function LH(e,t){return`${e}-content-${t}`}var XEe=NH,QEe=OH,JEe=DH,eke=MH;function KC({className:e,...t}){return u.jsx(XEe,{"data-slot":"tabs",className:Le("flex flex-col gap-2",e),...t})}function ZC({className:e,...t}){return u.jsx(QEe,{"data-slot":"tabs-list",className:Le("text-muted-foreground inline-flex w-fit items-center justify-center rounded-full bg-gray-950 p-1",e),...t})}function Os({className:e,...t}){return u.jsx(JEe,{"data-slot":"tabs-trigger",className:Le("data-[state=active]:text-white data-[state=active]:bg-gray-600 dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring focus-visible:ring-[3px] focus-visible:outline-1 text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 border rounded-full border-transparent px-2 py-1 font-medium whitespace-nowrap transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function $s({className:e,...t}){return u.jsx(eke,{"data-slot":"tabs-content",className:Le("flex-1 outline-none",e),...t})}function UH(e,t,n){for(const r of e)if(r[t]===n)return r}const tke=Fy("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function FH({className:e,variant:t,...n}){return u.jsx("div",{"data-slot":"alert",role:"alert",className:Le(tke({variant:t}),e),...n})}function VH({className:e,...t}){return u.jsx("div",{"data-slot":"alert-description",className:Le("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function nke(e,t){const{user:n}=Xa();return x.useMemo(()=>{const r=Kb(e);return[{title:"Install Harper CLI",code:"npm install -g harperdb"},{title:"Clone Template",code:`git clone https://github.com/HarperFast/application-template.git ${r}
|
|
535
|
-
cd ${r}`},{title:"Start Local Harper Instance",code:"npm run dev",alert:"You will be prompted to configure your instance"},{title:"Make Changes!",code:"pico schema.graphql"},{title:"Configure your .env file",code:`npm run login ${n?.username}@${t}`,note:"Your credentials are your own! Remember to exclude the .env file from source control."},{title:"Deploy Application",code:"npm run deploy"}]},[e,t,n?.username])}function rke({defaultApplicationName:e,formState:t,watch:n}){const r=Hy(),i=n("applicationName")||e,o=nke(i,r.instanceClient.defaults.baseURL),s=m5(...o.map(c=>c.code));return u.jsxs(u.Fragment,{children:[u.jsxs(tl,{children:[u.jsx(nl,{children:"Deploy with Harper CLI"}),u.jsx(pc,{children:"Follow these steps to deploy your application using the Harper CLI"})]}),u.jsxs(Qa,{className:"space-y-6",children:[o.map((c,d)=>u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"w-6 h-6 rounded-full bg-primary text-primary-foreground flex items-center justify-center shrink-0",children:d+1}),u.jsx("h3",{children:c.title})]}),u.jsxs("div",{className:"ml-8",children:[u.jsxs("div",{className:"bg-black rounded-lg p-4 flex items-center justify-between group",children:[u.jsx("code",{className:"text-sm whitespace-pre truncate max-w-[calc(100vw-theme(spacing.48))]",children:c.code}),u.jsx(Ce,{type:"button",variant:"default",size:"sm",onClick:s[d],children:u.jsx(r2,{className:"w-4 h-4"})})]}),c.note&&u.jsx("p",{className:"text-muted-foreground text-sm mt-2",children:c.note}),c.alert&&u.jsxs(FH,{className:"mt-2",children:[u.jsx(f2,{className:"w-4 h-4"}),u.jsx(VH,{children:c.alert})]})]}),u.jsx(fx,{className:"bg-black"})]},c.title)),i&&u.jsxs("div",{className:"bg-accent rounded-lg p-4",children:[u.jsxs("p",{className:"text-sm",children:[u.jsx("strong",{children:"Application Name:"})," ",i]}),u.jsx("p",{className:"text-muted-foreground text-sm mt-2",children:"Your application will be deployed with this name"})]}),u.jsxs(Ce,{className:"w-full",variant:"secondary",disabled:!t.isValid,children:[u.jsx(b1,{className:"w-4 h-4 mr-2"}),"I Have Completed These Steps"]})]})]})}function ike({control:e,defaultApplicationName:t}){return u.jsxs(u.Fragment,{children:[u.jsxs(tl,{children:[u.jsx(nl,{children:"Application Name"}),u.jsx(pc,{children:"Choose a name for your new API application"})]}),u.jsx(Qa,{children:u.jsxs("div",{className:"space-y-2",children:[u.jsx(Pe,{control:e,name:"applicationName",render:({field:n})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Name"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",autoCapitalize:"words",autoComplete:"off",autoFocus:!0,placeholder:t,...n})}),u.jsx(De,{})]})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"Use lowercase letters, numbers, underscores, and hyphens"})]})})]})}function oke({control:e,formState:t,isImportingApplication:n,setValue:r,watch:i}){const o=i("contents.source"),s=x.useCallback(c=>{r("contents.source",c)},[r]);return u.jsxs(u.Fragment,{children:[u.jsxs(tl,{children:[u.jsx(nl,{children:"Import Existing Application"}),u.jsx(pc,{children:"Import from Git, NPM, or a tarball URL"})]}),u.jsxs(Qa,{className:"space-y-6",children:[u.jsxs(KC,{value:o,onValueChange:s,children:[u.jsxs(ZC,{className:"grid w-full grid-cols-3",children:[u.jsxs(Os,{value:"git",children:[u.jsx(o2,{className:"w-4 h-4 mr-2"}),"Git"]}),u.jsxs(Os,{value:"npm",children:[u.jsx(w1,{className:"w-4 h-4 mr-2"}),"NPM"]}),u.jsxs(Os,{value:"tarball",children:[u.jsx(sX,{className:"w-4 h-4 mr-2"}),"Tarball"]})]}),u.jsx($s,{value:"git",className:"space-y-4 mt-4",children:u.jsx("div",{className:"space-y-2",children:u.jsx(Pe,{control:e,name:"contents.ref",render:({field:c})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Git Repository URL"}),u.jsx(Me,{children:u.jsx(Ge,{type:"url",autoCapitalize:"none",autoComplete:"off",autoFocus:!0,...c})}),u.jsx(De,{})]})})})}),u.jsx($s,{value:"npm",className:"space-y-4 mt-4",children:u.jsx("div",{className:"space-y-2",children:u.jsx(Pe,{control:e,name:"contents.ref",render:({field:c})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"NPM Package Reference"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",autoCapitalize:"none",autoComplete:"off",autoFocus:!0,...c})}),u.jsx(De,{})]})})})}),u.jsx($s,{value:"tarball",className:"space-y-4 mt-4",children:u.jsx("div",{className:"space-y-2",children:u.jsx(Pe,{control:e,name:"contents.ref",render:({field:c})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Tarball URL"}),u.jsx(Me,{children:u.jsx(Ge,{type:"url",autoCapitalize:"none",autoComplete:"off",autoFocus:!0,...c})}),u.jsx(De,{})]})})})})]}),u.jsx(Pe,{control:e,name:"contents.installCommand",render:({field:c})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Install Command"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",autoCapitalize:"none",autoComplete:"off",placeholder:"npm install",...c})}),u.jsx(De,{})]})}),u.jsx($e,{children:"Authorization"}),u.jsx(Pe,{control:e,name:"contents.requiresAuth",render:({field:c})=>u.jsxs(KC,{className:"w-full pt-2 pb-0 mb-0",value:String(c.value),onValueChange:d=>c.onChange(d==="true"),children:[u.jsxs(ZC,{className:"grid w-full grid-cols-2",children:[u.jsx(Os,{value:"false",children:"Public Access"}),u.jsx(Os,{value:"true",children:"Requires Auth"})]}),u.jsx($s,{value:"false",className:"space-y-4 mt-4"}),u.jsx($s,{value:"true",className:"space-y-4 mt-4",children:u.jsx(FH,{children:u.jsx(VH,{children:u.jsxs("span",{children:["Certificate management isn't supported by this website yet, but you can ",u.jsx(We,{className:"inline-block underline hover:text-white",to:"https://docs.harperdb.io/docs/developers/security/certificate-management",target:"_blank",children:"use your operations API"})," to add them in the meantime."]})})})})]})}),u.jsx(fx,{className:"bg-black"}),u.jsxs(Ce,{className:"w-full",disabled:!t.isValid||n,children:[u.jsx(d2,{className:"w-4 h-4 mr-2"}),"Import Application"]})]})]})}const ZR=[{id:"harper",name:"Web + REST ORM",description:"Define your entities in schema.graphql, add your HTML/CSS/JS in web, and you're cooking!",tags:["Harper","ORM","REST","GraphQL"],githubUrl:"https://github.com/HarperFast/application-template/tree/fabric"},{id:"harper-ts",name:"TypeScript",description:"The same Web + REST ORM from the first template, but with TypeScript sprinkled in.",tags:["Harper","TypeScript","GraphQL"],githubUrl:"https://github.com/HarperFast/application-template/tree/fabric-typescript"}],ake=En({type:Hm("template"),id:wt("Please select a template.")}),ske={type:"template",id:ZR[0].id},lke=En({type:Hm("import"),source:Dd(["git","npm","tarball"]),ref:wt().nonempty("Please enter a URL or package reference."),installCommand:wt(),requiresAuth:Hm(!1)}),cke={type:"import",source:"git",ref:"",requiresAuth:!1,installCommand:""},uke=En({type:Hm("cli")}),dke={type:"cli"},fke=En({applicationName:wt().trim().max(75,{error:"Application name cannot be longer than 75 characters."}).regex(/^[a-zA-Z0-9-_]*$/,{error:"Can only contain letters, numbers, dashes and underscores."}),contents:sF("type",[ake,lke,uke])});var YR="Radio",[mke,BH]=Di(YR),[pke,hke]=mke(YR),HH=x.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:s,value:c="on",onCheck:d,form:f,...p}=e,[h,v]=x.useState(null),y=ct(t,C=>v(C)),b=x.useRef(!1),S=h?f||!!h.closest("form"):!0;return u.jsxs(pke,{scope:n,checked:i,disabled:s,children:[u.jsx(Be.button,{type:"button",role:"radio","aria-checked":i,"data-state":ZH(i),"data-disabled":s?"":void 0,disabled:s,value:c,...p,ref:y,onClick:Re(e.onClick,C=>{i||d?.(),S&&(b.current=C.isPropagationStopped(),b.current||C.stopPropagation())})}),S&&u.jsx(KH,{control:h,bubbles:!b.current,name:r,value:c,checked:i,required:o,disabled:s,form:f,style:{transform:"translateX(-100%)"}})]})});HH.displayName=YR;var qH="RadioIndicator",GH=x.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=hke(qH,n);return u.jsx(Gn,{present:r||o.checked,children:u.jsx(Be.span,{"data-state":ZH(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t})})});GH.displayName=qH;var gke="RadioBubbleInput",KH=x.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const s=x.useRef(null),c=ct(s,o),d=S1(n),f=gV(t);return x.useEffect(()=>{const p=s.current;if(!p)return;const h=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(h,"checked").set;if(d!==n&&y){const b=new Event("click",{bubbles:r});y.call(p,n),p.dispatchEvent(b)}},[d,n,r]),u.jsx(Be.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:c,style:{...i.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});KH.displayName=gke;function ZH(e){return e?"checked":"unchecked"}var vke=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],px="RadioGroup",[yke]=Di(px,[Kd,BH]),YH=Kd(),WH=BH(),[bke,xke]=yke(px),XH=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:s=!1,disabled:c=!1,orientation:d,dir:f,loop:p=!0,onValueChange:h,...v}=e,y=YH(n),b=hc(f),[S,C]=No({prop:o,defaultProp:i??null,onChange:h,caller:px});return u.jsx(bke,{scope:n,name:r,required:s,disabled:c,value:S,onValueChange:C,children:u.jsx(uR,{asChild:!0,...y,orientation:d,dir:b,loop:p,children:u.jsx(Be.div,{role:"radiogroup","aria-required":s,"aria-orientation":d,"data-disabled":c?"":void 0,dir:b,...v,ref:t})})})});XH.displayName=px;var QH="RadioGroupItem",JH=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=xke(QH,n),s=o.disabled||r,c=YH(n),d=WH(n),f=x.useRef(null),p=ct(t,f),h=o.value===i.value,v=x.useRef(!1);return x.useEffect(()=>{const y=S=>{vke.includes(S.key)&&(v.current=!0)},b=()=>v.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",b)}},[]),u.jsx(dR,{asChild:!0,...c,focusable:!s,active:h,children:u.jsx(HH,{disabled:s,required:o.required,checked:h,...d,...i,name:o.name,ref:p,onCheck:()=>o.onValueChange(i.value),onKeyDown:Re(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:Re(i.onFocus,()=>{v.current&&f.current?.click()})})})});JH.displayName=QH;var wke="RadioGroupIndicator",e8=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=WH(n);return u.jsx(GH,{...i,...r,ref:t})});e8.displayName=wke;var Ske=XH,_ke=JH,Cke=e8;function Eke({className:e,...t}){return u.jsx(Ske,{"data-slot":"radio-group",className:Le("grid gap-3",e),...t})}function kke({className:e,...t}){return u.jsx(_ke,{"data-slot":"radio-group-item",className:Le("border-input text-primary 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 dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:u.jsx(Cke,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:u.jsx(n2,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function t8(e){e.stopPropagation()}function Rke({control:e,formState:t,isCreatingFromTemplate:n}){return u.jsxs(u.Fragment,{children:[u.jsxs(tl,{children:[u.jsx(nl,{children:"Choose a Template"}),u.jsx(pc,{children:"Start with a pre-configured template for common use cases"})]}),u.jsxs(Qa,{children:[u.jsx(Pe,{control:e,name:"contents.id",render:({field:r})=>u.jsx(Eke,{value:r.value,onValueChange:r.onChange,children:u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:ZR.map(i=>u.jsxs("div",{className:"relative",children:[u.jsx(kke,{value:i.id,id:i.id,className:"peer sr-only"}),u.jsxs(Xy,{htmlFor:i.id,className:"flex flex-col gap-3 p-4 border-2 rounded-lg cursor-pointer hover:bg-accent peer-data-[state=checked]:border-green peer-data-[state=checked]:bg-primary/5",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[u.jsx("span",{children:i.name}),u.jsx("a",{href:i.githubUrl,target:"_blank",rel:"noopener noreferrer",onClick:t8,className:"text-muted-foreground hover:text-white transition-colors -m-4 p-4",children:u.jsx(o2,{className:"w-4 h-4"})})]}),u.jsx("p",{className:"text-muted-foreground text-sm",children:i.description})]}),u.jsx("div",{className:"flex flex-wrap gap-2",children:i.tags.map(o=>u.jsx(ra,{variant:"outline",children:o},o))})]})]},i.id))})})}),u.jsx(fx,{className:"my-6 bg-black"}),u.jsxs(Ce,{className:"w-full",disabled:!t.isValid||n,children:[u.jsx(d2,{className:"w-4 h-4 mr-2"}),"Create from Template"]})]})]})}function jke(e){const t=Hy(),{reloadRootEntries:n,setFocusedItem:r,setExpandedItems:i,setSelectedItems:o}=zi(),s=x.useCallback(({project:c})=>{const d=Ee.loading("Looking for application...",{description:"This may take a bit.",duration:3e5});e(!0),n().then(f=>{const p=f?.entries||[];for(const h of p)if(h.name.toLowerCase()===c.toLowerCase()){r(h.name),o([h.name]),i([h.name]),e(!1),Ee.success("Imported successfully",{description:`${c} is now available in your ${t.entityType}!`,id:d,duration:5e3});return}Ee.warning("Deployment Not Detected",{description:`I searched for ${c} but did not find it in the ${t.entityType} yet. Do you see it on the left? Did you use a different name, perhaps?`,id:d,duration:1e4}),e(!1)})},[t,e,n,r,i,o]);return x.useMemo(()=>({checkCLI:s}),[s])}async function Ike({instanceClient:e,project:t,template:n,entityType:r}){const{data:i}=await e.post("/",{operation:"add_component",project:t,template:n,replicated:r==="cluster"});return i}function Tke(){return vt({mutationFn:Ike})}function Nke(e){const{mutate:t,isPending:n}=Tke(),r=Hy(),{reloadRootEntries:i,setFocusedItem:o,setExpandedItems:s,setSelectedItems:c}=zi(),d=x.useCallback(({contents:f,project:p})=>{const h=Ee.loading("Creating from template...",{description:"This may take a bit.",duration:3e5}),v=UH(ZR,"id",f.id);if(!v)return Ee.error("Template Not Found",{description:"Please select a template",duration:1e4,id:h});t({project:p,template:v.githubUrl,...r},{onSuccess:()=>{Ee.success("Created successfully!",{description:`${p} will be available once you restart your ${r.entityType}!`,id:h,duration:5e3}),e(!0),i(),o(p),c([p]),s([p])}})},[t,r,e,i,o,s,c]);return x.useMemo(()=>({isCreatingFromTemplate:n,createFromTemplate:d}),[n,d])}async function Ake({applicationName:e,applicationUrl:t,installCommand:n,entityType:r,instanceClient:i}){const{data:o}=await i.post("/",{operation:"deploy_component",package:t,project:e,replicated:r==="cluster",install_command:n||void 0,restart:"rolling"},{timeout:3e5});return o}function n8(){return vt({mutationFn:Ake})}function Oke(e){const{mutate:t,isPending:n}=n8(),r=kr(),i=xn(),{reloadRootEntries:o,setFocusedItem:s,setExpandedItems:c,setSelectedItems:d}=zi(),f=x.useCallback(({contents:p,project:h})=>{const v=Ee.loading("Importing application...",{description:"This may take a bit.",duration:3e5});t({applicationName:h,applicationUrl:p.ref,installCommand:p.installCommand,...i},{onSuccess:()=>{Ee.success("Imported successfully",{description:`${h} will be available once you restart your ${i.entityType}!`,id:v,duration:5e3}),e(!0),r.invalidateQueries({queryKey:[i.entityId]}),o(),s(h),d([h]),c([h])},onError:()=>{Ee.dismiss(v)}})},[t,r,i,e,o,s,c,d]);return x.useMemo(()=>({isImportingApplication:n,importApplication:f}),[n,f])}function $ke(){const{rootEntries:e}=zi(),{organization:t,instance:n,cluster:r}=Uy({strict:!1}),i=x.useMemo(()=>{const N=Kb(r?.name||n?.name||t?.name||"");if(N==="")return N;let z=N,L=1;for(;UH(e,"name",z);)L+=1,z=`${N}-${L}`;return z},[e,r,n,t]),o=x.useCallback((N,z)=>{!N.applicationName&&!i&&z.addIssue({code:"custom",path:["applicationName"],message:"Please name your application!"})},[i]),s=pn({resolver:wn(fke.superRefine(o)),defaultValues:{applicationName:"",contents:{...cke,...dke,...ske}}}),{watch:c,handleSubmit:d,control:f,setValue:p,formState:h,trigger:v}=s,[y,b]=x.useState(!1),{isCreatingFromTemplate:S,createFromTemplate:C}=Nke(b),{isImportingApplication:E,importApplication:k}=Oke(b),{checkCLI:R}=jke(b),I=x.useCallback(N=>{const z=N.applicationName||i;switch(N.contents.type){case"template":{C({contents:N.contents,project:z});break}case"import":{k({contents:N.contents,project:z});break}case"cli":{R({contents:N.contents,project:z});break}}},[R,C,i,k]),A=c("contents.type"),T=x.useCallback(N=>{const z=h.isValid;p("contents.type",N),z||v()},[p,h,v]);return u.jsxs("div",{className:"mx-auto max-w-4xl mt-6",children:[u.jsxs("div",{className:"text-center",children:[u.jsx("h1",{className:"text-4xl pt-4 pb-2",children:"Bootstrap New API Application"}),u.jsx("p",{className:"text-muted-foreground",children:"Create a new application from templates, import existing code, or deploy with Harper CLI"})]}),u.jsx(hn,{...s,children:u.jsx("form",{onSubmit:d(I),className:"flex flex-col gap-4 p-4",children:u.jsxs("fieldset",{disabled:E||S||y,children:[u.jsx(ec,{className:"bg-black-dark",children:u.jsx(ike,{control:f,defaultApplicationName:i})}),u.jsx(ec,{className:"bg-black-dark mt-4 pt-0",children:u.jsxs(KC,{defaultValue:A,onValueChange:T,children:[u.jsxs(ZC,{className:"w-full grid grid-cols-3 mt-0",children:[u.jsxs(Os,{value:"template",children:[u.jsx(vW,{}),u.jsx("span",{className:"hidden sm:inline-block",children:"Templates"})]}),u.jsxs(Os,{value:"import",children:[u.jsx(XW,{}),"Import"]}),u.jsxs(Os,{value:"cli",children:[u.jsx(f2,{}),u.jsx("span",{className:"hidden md:inline-block",children:"Harper"})," CLI"]})]}),u.jsx(fx,{className:"bg-black mx-6 mt-1"}),u.jsx($s,{value:"template",className:"space-y-4",children:u.jsx(Rke,{control:f,formState:h,isCreatingFromTemplate:S})}),u.jsx($s,{value:"import",className:"space-y-4",children:u.jsx(oke,{control:f,formState:h,isImportingApplication:E,setValue:p,watch:c})}),u.jsx($s,{value:"cli",className:"space-y-4",children:u.jsx(rke,{defaultApplicationName:i,formState:h,watch:c})})]})})]})})})]})}function r8(e){const t=(e||"")?.split(".");return t.length>1?t.slice(-1)[0]:""}const Dke={js:"javascript",cjs:"javascript",jsx:"javascript",yaml:"yaml",ts:"typescript",tsx:"typescript",json:"json",md:"markdown",html:"html",css:"css",graphql:"graphql",mjs:"javascript"};function Pke(){const e=xn(),{openedEntryContents:t,openedEntry:n,restrictPackageModification:r,isSavingFile:i,saveFile:o}=zi(),{content:s,setContent:c}=lx(!!n&&!n.package&&n.path),d=x.useCallback(C=>{c(C!==t?C:void 0)},[t,c]),f=Od(),[p,h]=x.useState(null),v=r8(n?.path),y=Dke[v]||"plaintext",b=x.useCallback((C,E)=>{h([C,E])},[]);if(x.useEffect(()=>{if(!p||!f||n?.package||r)return;const[C,E]=p,k=[C.addAction({id:"new-file",label:"New File",keybindings:[E.KeyMod.WinCtrl|E.KeyMod.Alt|E.KeyCode.KeyN],run:Wg("ShowAddDirectoryOrFileModalType","file")}),C.addAction({id:"rename-file",label:"Rename File",keybindings:[E.KeyMod.WinCtrl|E.KeyMod.Alt|E.KeyCode.KeyR],run:Wg("ShowRenameFileModal",!0)}),C.addAction({id:"new-directory",label:"New Directory",keybindings:[E.KeyMod.WinCtrl|E.KeyMod.Alt|E.KeyMod.Shift|E.KeyCode.KeyN],run:Wg("ShowAddDirectoryOrFileModalType","directory")}),C.addAction({id:"save-file",label:"Save Changes",keybindings:[E.KeyMod.CtrlCmd|E.KeyCode.KeyS],run:wD("SaveFile",!0)}),C.addAction({id:"revert-file",label:"Revert File",run:wD("RevertChanges",!0)}),C.addAction({id:"delete-file",label:"Delete File",run:Wg("ShowDeleteDirectoryOrFileModal",!0)})];return()=>{for(const R of k)R?.dispose()}},[p,f,n,r]),yy("SaveFile",()=>{n&&!i&&s!==void 0&&o({...e,file:n.path.split("/").slice(1).join("/"),payload:s,project:n.project},n.path)},[n,e,s]),yy("RevertChanges",()=>{if(t!==void 0&&p){const[C]=p;d(void 0),C.setValue(t)}},[t,p]),!n)return null;const S=i||!!n.package||!f;return u.jsx(Xp,{className:"w-full min-h-full h-80",language:y,theme:"vs-dark",value:s??t,onMount:b,onChange:S?void 0:d,options:{automaticLayout:!0,minimap:{enabled:!1},readOnly:S,padding:{top:48}}})}function Mke(){const{openedEntry:e,openedEntryContents:t}=zi(),n=CSe(e?.project);return e?.path===ko?u.jsx($ke,{}):zr(e)?u.jsx("div",{className:"directoryReadMe max-w-3xl",children:u.jsx(UEe,{urlTransform:n,children:t})}):u.jsx(Pke,{})}async function i8({file:e,payload:t,project:n,entityType:r,instanceClient:i}){const{data:o}=await i.post("/",{operation:"set_component_file",file:e,payload:t,project:n,replicated:r==="cluster"});return o}function o8(){return vt({mutationFn:i8})}function zke(){const e=Wd("ShowAddDirectoryOrFileModalType",!1),t=ro("ShowAddDirectoryOrFileModalType",!1),{openedEntry:n,reloadRootEntries:r,setFocusedItem:i,setSelectedItems:o,setExpandedItems:s}=zi(),c=xn(),{mutate:d,isPending:f}=o8(),p=Sr.object({name:Sr.string().nonempty({error:"Please enter a valid name."}).regex(/^[a-zA-Z0-9_\- .]*$/,{error:"Names can only contain letters, numbers, underscores, hyphens, periods, and spaces."}).max(50,{error:"Names cannot be longer than 50 characters."}).trim()}),h=pn({resolver:wn(p),defaultValues:{name:""}}),v=x.useCallback(b=>{if(!n)return;const S=n.path.split("/"),C=(zr(n)?S.slice(1):S.slice(1,-1)).join("/");d({file:`${C}/${b.name}`,project:n.project,payload:e==="directory"?void 0:"",...c},{onSuccess:()=>{r(),t(),h.reset();const E=[n.project,C,b.name].filter(sa).join("/");i(E),o([E]),e==="directory"&&s(k=>[...k,E])}})},[d,h,t,c,n,r,s,i,o,e]),y=x.useCallback(()=>{t(),h.reset()},[t,h]);return u.jsx(cr,{onOpenChange:t,open:!!e,children:u.jsx(ur,{"aria-describedby":void 0,className:"text-white",children:u.jsx(hn,{...h,children:u.jsxs("form",{onSubmit:h.handleSubmit(v),children:[u.jsxs(Br,{children:[u.jsxs(tr,{children:["Add ",e]}),u.jsxs(mi,{children:["Enter the name of the ",e," you want to add:"]})]}),u.jsx(Pe,{control:h.control,name:"name",render:({field:b})=>u.jsxs(Oe,{className:"my-2",children:[u.jsx($e,{children:"Name"}),u.jsx(Me,{children:u.jsx(Ge,{disabled:f,type:"text",autoComplete:"off",autoCapitalize:"off",...b})}),u.jsx(De,{})]})}),u.jsx(er,{children:u.jsxs("div",{className:"flex justify-between w-full",children:[u.jsxs(Ce,{type:"button",variant:"destructiveOutline",className:"rounded-full",onClick:y,children:[u.jsx(Vy,{})," Cancel"]}),u.jsxs(Ce,{variant:"positiveOutline",type:"submit",className:"rounded-full",disabled:f,children:[u.jsx(Mo,{})," Add ",e]})]})})]})})})})}async function a8({file:e,project:t,entityType:n,instanceClient:r}){const{data:i}=await r.post("/",{operation:"drop_component",file:e||void 0,project:t,replicated:n==="cluster"});return i}function Lke(){return vt({mutationFn:a8})}function Uke(){const e=Wd("ShowDeleteDirectoryOrFileModal",!1),t=xn(),{openedEntry:n,reloadRootEntries:r,setFocusedItem:i,setSelectedItems:o}=zi(),s=zr(n),c=!!n?.package,d=c?"Remove":"Delete",f=c?"Imported Application":s?"Directory":"File",{mutate:p,isPending:h,isSuccess:v}=Lke(),y=v?`${d}d`:h?`${d.slice(0,-1)}ing`:d,b=x.useCallback(()=>{n&&p({file:n.package?void 0:`${n.path.split("/").slice(1).join("/")}`,project:n.project,...t},{onSuccess:()=>{op("ShowDeleteDirectoryOrFileModal",!1);const E=!n.package&&n.path.split("/").slice(0,-1).join("/");i(E||void 0),o(E?[E]:[]),r()}})},[p,t,n,r,i,o]),S=x.useCallback(E=>{E.preventDefault(),b()},[b]),C=ro("ShowDeleteDirectoryOrFileModal",!1);return u.jsx(cr,{onOpenChange:C,open:e,children:u.jsxs(ur,{"aria-describedby":void 0,className:"text-white",children:[u.jsxs(Br,{children:[u.jsxs(tr,{children:[d," ",f]}),u.jsxs(mi,{children:["Are you sure you want to ",d.toLowerCase()," this ",f.toLowerCase(),"?"]}),!c&&u.jsx(mi,{children:n?.path})]}),u.jsxs("div",{className:"flex w-full gap-4",children:[u.jsxs(Ce,{variant:"ghostOutline",className:"w-full rounded-full",onClick:C,children:[u.jsx(Vy,{})," Cancel"]}),u.jsxs(Ce,{variant:"destructiveOutline",type:"button",className:"w-full rounded-full",disabled:h,autoFocus:!0,onClick:S,children:[u.jsx(Ja,{})," ",y," ",f,h?"...":""]})]})]})})}function Fke(){const e=Wd("ShowRedeployApplicationModal",!1),t=kr(),n=xn(),{openedEntry:r}=zi(),i=r?.package,{mutate:o,isPending:s}=n8(),c=x.useCallback((b,S)=>{if(!r)return;const C=r.package,E=Ee.loading("Redeploying...");o({applicationName:r.project,applicationUrl:b,installCommand:S,...n},{onSuccess:()=>{Ee.success(`Application ${r.project} redeployed successfully`,{id:E}),t.invalidateQueries({queryKey:[n.entityId,"get_components"],refetchType:"active"}),op("ShowRedeployApplicationModal",!1)},onError:()=>{r.package=C,Ee.dismiss(E)}})},[o,r,n,t]),d=pn({defaultValues:{applicationUrl:i,installCommand:""}}),{control:f,handleSubmit:p,reset:h}=d,v=({applicationUrl:b,installCommand:S})=>{b&&c(b,S)},y=x.useCallback(()=>{op("ShowRedeployApplicationModal",!1),h({applicationUrl:i})},[h,i]);return u.jsx(cr,{onOpenChange:y,open:e,children:u.jsxs(ur,{"aria-describedby":void 0,className:"text-white",children:[u.jsxs(Br,{children:[u.jsx(tr,{children:"Redeploy Package"}),u.jsx(mi,{children:" Redeploy this package?"})]}),u.jsx("div",{children:u.jsx(hn,{...d,children:u.jsxs("form",{className:"flex flex-col w-full gap-4",onSubmit:p(v),children:[u.jsx(Pe,{control:f,name:"applicationUrl",render:({field:b})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Package Reference"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",autoFocus:!0,...b})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:f,name:"installCommand",render:({field:b})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Install Command"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",placeholder:"npm install",...b})}),u.jsx(De,{})]})}),u.jsxs(Ce,{variant:"positiveOutline",type:"submit",className:"w-full rounded-full",disabled:s,children:[u.jsx(Ha,{})," Redeploy Application"]}),u.jsxs(Ce,{type:"button",variant:"default",className:"w-full rounded-full",onClick:y,disabled:s,children:[u.jsx(Vy,{})," Cancel"]})]})})})]})})}async function s8({instanceClient:e,file:t,project:n}){const{data:r}=await e.post("/",{operation:"get_component_file",file:t,project:n});return{file:t,project:n,...r}}function Vke(e){return{queryKey:l8(e),queryFn:()=>s8(e),enabled:!!e.file&&!!e.project,retry:!1}}function l8(e){return[e.entityId,"get_component_file",e.file,e.project]}function c8(){const{reloadRootEntries:e,setFocusedItem:t,setSelectedItems:n}=zi(),r=xn();return x.useCallback(async i=>{let o=!1;const s=i.filter(y=>y.from!==y.to);if(s.length===0)return;const c=`Renaming ${La(s.length,"File","Files")}`,d={duration:6e4,action:{label:"Cancel",onClick:()=>{o=!0}}};d.id=Ee.loading(c,{...d,description:u.jsx(np,{animated:!0,width:"0%"})});const p=s.length*3;let h=0;function v(){h+=1,Ee.loading(c,{...d,description:u.jsx(np,{animated:!0,width:(h===0?0:h/p*100)+"%"})})}for(const y of s){const b=y.from.split("/"),S=b.shift(),C=b.join("/"),E=y.to.split("/"),k=E.shift(),R=E.join("/"),I=await s8({...r,file:C,project:S});if(o||(v(),await i8({...r,file:R,project:k,payload:I.message}),o)||(v(),await a8({...r,file:C,project:S}),o))break;v()}h>=p?Ee.success(`Renamed ${La(s.length,"File","Files")}`,{id:d.id,description:"All done!",duration:3e3,action:{label:"OK!",onClick:()=>{}}}):Ee.warning("Rename Cancelled",{id:d.id,description:`${h} of ${p} steps completed.`,duration:1e4,action:{label:"Gotcha",onClick:()=>{}}}),e(),n(y=>{const b=y.slice();for(const S of s){const C=y.indexOf(S.from);C>=0?b.splice(C,1,S.to):b.push(S.to)}return b}),t(y=>{for(const b of s)if(y===b.from)return b.to;return y})},[r,e,t,n])}function WR(...e){return e.flat(1).join("/")}function Bke(e){return WR(e.split("/").slice(0,-1))}function u8(e,t){return WR(Bke(e),t)}function Hke(){const e=Wd("ShowRenameFileModal",!1),t=ro("ShowRenameFileModal",!1),{openedEntry:n}=zi(),r=Sr.object({name:Sr.string().nonempty({error:"Please enter a valid name."}).regex(/^[a-zA-Z0-9_\- .]*$/,{error:"Names can only contain letters, numbers, underscores, hyphens, periods, and spaces."}).max(50,{error:"Names cannot be longer than 50 characters."}).trim().refine(p=>p!==n?.name,{error:"Please enter a new name.",path:["name"]})}),[i,o]=x.useState(!1),s=c8(),c=pn({resolver:wn(r)});x.useEffect(()=>{n?.name&&c.reset({name:n?.name})},[c,n?.name]);const d=x.useCallback(async p=>{n&&(o(!0),await s([{from:n.path,to:u8(n.path,p.name)}]),t(),c.reset(),o(!1))},[c,t,n,s,o]),f=x.useCallback(()=>{t(),c.reset()},[t,c]);return u.jsx(cr,{onOpenChange:t,open:e,children:u.jsx(ur,{"aria-describedby":void 0,className:"text-white",children:u.jsx(hn,{...c,children:u.jsxs("form",{onSubmit:c.handleSubmit(d),children:[u.jsxs(Br,{children:[u.jsx(tr,{children:"Rename File"}),u.jsx(mi,{children:n?.path})]}),u.jsx(Pe,{control:c.control,name:"name",render:({field:p})=>u.jsxs(Oe,{className:"my-2",children:[u.jsx($e,{children:"Name"}),u.jsx(Me,{children:u.jsx(Ge,{disabled:i,type:"text",autoComplete:"off",autoCapitalize:"off",...p})}),u.jsx(De,{})]})}),u.jsx(er,{children:u.jsxs("div",{className:"flex justify-between w-full",children:[u.jsxs(Ce,{type:"button",variant:"destructiveOutline",className:"rounded-full",onClick:f,children:[u.jsx(Vy,{})," Cancel"]}),u.jsxs(Ce,{variant:"positiveOutline",type:"submit",className:"rounded-full",disabled:i||!c.formState.isDirty||!c.formState.isValid,children:[u.jsx(c2,{})," Rename"]})]})})]})})})})}function qke(e,t=!1){const[n,r]=Yu(e,t),i=x.useCallback(c=>{c?.preventDefault?.(),r(d=>!d)},[r]),o=x.useCallback(c=>{c?.preventDefault?.(),r(!0)},[r]),s=x.useCallback(c=>{c?.preventDefault?.(),r(!1)},[r]);return x.useMemo(()=>({toggled:n,setToggled:r,toggle:i,toggleOn:o,toggleOff:s}),[i,r,s,o,n])}function Gke(e){return e.split("/").pop()}var Fa;(function(e){e.DoubleClickItemToExpand="double-click-item-to-expand",e.ClickItemToExpand="click-item-to-expand",e.ClickArrowToExpand="click-arrow-to-expand"})(Fa||(Fa={}));var wy=function(){return wy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},wy.apply(this,arguments)},Kke=function(e,t){return{mode:e.mode,createInteractiveElementProps:function(n,r,i,o){return wy(wy({},t.createInteractiveElementProps(n,r,i,o)),e.createInteractiveElementProps(n,r,i,o))}}},xd=function(e){return e.ctrlKey||navigator.platform.toUpperCase().indexOf("MAC")>=0&&e.metaKey},Zke=(function(){function e(t){this.mode=Fa.DoubleClickItemToExpand,this.environment=t}return e.prototype.createInteractiveElementProps=function(t,n,r,i){var o=this;return{onClick:function(s){var c=s.detail===0;r.focusItem(),s.shiftKey&&!c?r.selectUpTo(!xd(s)):xd(s)&&!c?i.isSelected?r.unselectItem():r.addToSelectedItems():r.selectItem()},onDoubleClick:function(){r.focusItem(),r.selectItem(),t.isFolder&&r.toggleExpandedState(),(!t.isFolder||o.environment.canInvokePrimaryActionOnItemContainer)&&r.primaryAction()},onFocus:function(){r.focusItem()},onDragStart:function(s){s.dataTransfer.dropEffect="move",r.startDragging()},onDragOver:function(s){s.preventDefault()},draggable:i.canDrag&&!i.isRenaming,tabIndex:i.isRenaming?void 0:i.isFocused?0:-1}},e})(),Yke=(function(){function e(t){this.mode=Fa.ClickItemToExpand,this.environment=t}return e.prototype.createInteractiveElementProps=function(t,n,r,i){var o=this;return{onClick:function(s){var c=s.detail===0;r.focusItem(),s.shiftKey&&!c?r.selectUpTo(!xd(s)):xd(s)&&!c?i.isSelected?r.unselectItem():r.addToSelectedItems():(t.isFolder&&r.toggleExpandedState(),r.selectItem(),(!t.isFolder||o.environment.canInvokePrimaryActionOnItemContainer)&&r.primaryAction())},onFocus:function(){r.focusItem()},onDragStart:function(s){s.dataTransfer.dropEffect="move",r.startDragging()},onDragOver:function(s){s.preventDefault()},draggable:i.canDrag&&!i.isRenaming,tabIndex:i.isRenaming?void 0:i.isFocused?0:-1}},e})(),Wke=(function(){function e(t){this.mode=Fa.ClickItemToExpand,this.environment=t}return e.prototype.createInteractiveElementProps=function(t,n,r,i){var o=this;return{onClick:function(s){var c=s.detail===0;r.focusItem(),s.shiftKey&&!c?r.selectUpTo(!xd(s)):xd(s)&&!c?i.isSelected?r.unselectItem():r.addToSelectedItems():(r.selectItem(),(!t.isFolder||o.environment.canInvokePrimaryActionOnItemContainer)&&r.primaryAction())},onFocus:function(){r.focusItem()},onDragStart:function(s){s.dataTransfer.dropEffect="move",r.startDragging()},onDragOver:function(s){s.preventDefault()},draggable:i.canDrag&&!i.isRenaming,tabIndex:i.isRenaming?void 0:i.isFocused?0:-1}},e})(),cP=function(e,t){switch(e){case Fa.DoubleClickItemToExpand:return new Zke(t);case Fa.ClickItemToExpand:return new Yke(t);case Fa.ClickArrowToExpand:return new Wke(t);default:throw Error("Unknown interaction mode ".concat(e))}},d8=x.createContext(null),Xke=function(){return x.useContext(d8)},Qke=function(e){var t=e.children,n=Yt(),r=n.defaultInteractionMode,i=x.useMemo(function(){var o;return r&&typeof r!="string"?r.extends?Kke(r,cP(r.extends,n)):r:cP((o=r)!==null&&o!==void 0?o:Fa.ClickItemToExpand,n)},[]);return x.createElement(d8.Provider,{value:i},t)},f8=function(){var e=Yt();return x.useCallback(function(t,n){if(t.targetType==="between-items"){if(!e.canReorderItems)return!1}else if(t.targetType==="root"){if(!e.canDropOnFolder)return!1}else{var r=e.items[t.targetItem];if(!r||!e.canDropOnFolder&&r.isFolder||!e.canDropOnNonFolder&&!r.isFolder||n.some(function(i){return i.index===t.targetItem}))return!1}return!(e.canDropAt&&(!n||!e.canDropAt(n,t)))},[e])},m8=function(){var e=Yt();return x.useCallback(function(t,n){for(var r=e.linearItems[n],i=r[t].depth,o=t;r[o]&&r[o].depth!==i-1;o-=1);var s=r[o];return s||(s={item:e.trees[n].rootItem,depth:0},o=0),{parent:s,parentLinearIndex:o}},[e.linearItems,e.trees])},Jke=function(){var e=Yt(),t=m8(),n=f8(),r=x.useCallback(function(i,o,s){var c=t(o,i),d=c.parent,f=c.parentLinearIndex;return s.some(function(p){return p.index===d.item})?!0:d.depth===0?!1:r(i,f,s)},[t]);return x.useCallback(function(i,o){for(var s,c,d,f,p=e.linearItems[i],h=[],v=-1,y=0;y<p.length;y++){var b=p[y],S=b.item,C=b.depth;if(!(v!==-1&&C>v)){v=-1;var E=t(y,i).parent,k=e.items[E.item].children.indexOf(S);if(r(i,y,o)){v=C+1;continue}var R={targetType:"item",parentItem:E.item,targetItem:S,linearIndex:y,depth:C,treeId:i},I={targetType:"between-items",parentItem:E.item,linePosition:"top",childIndex:k,depth:C,treeId:i,linearIndex:y},A={targetType:"between-items",parentItem:E.item,linePosition:"bottom",linearIndex:y+1,childIndex:k+1,depth:C,treeId:i},T=(c=(s=p[y-1])===null||s===void 0?void 0:s.depth)!==null&&c!==void 0?c:-1,N=(f=(d=p[y+1])===null||d===void 0?void 0:d.depth)!==null&&f!==void 0?f:-1,z=C===T,L=C===N-1;!z&&n(I,o)&&h.push(I),n(R,o)&&h.push(R),!L&&n(A,o)&&h.push(A)}}return h},[n,e.items,e.linearItems,t,r])},ev=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Sy=function(e,t,n){var r=x.useRef();x.useEffect(function(){if(!r.current)r.current=ev([],n,!0),e();else{var i=r.current.some(function(o,s){return o!==n[s]});i&&(r.current=ev([],n,!0),e())}},ev(ev([],t,!0),n,!0))},_y=function(){return _y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},_y.apply(this,arguments)},p8=function(e,t){return e.map(function(n){return[n,t(n)]}).reduce(function(n,r){var i,o=r[0],s=r[1];return _y(_y({},n),(i={},i[o]=s,i))},{})},io=function(){return typeof document<"u"?document:void 0};function Jd(e){e===void 0&&(e=!1);var t=x.useRef(new Array);return x.useEffect(function(){if(e)return function(){};var n=t.current;return function(){return n.forEach(function(r){return cancelAnimationFrame(r)})}},[e,t]),x.useCallback(function(n){var r=requestAnimationFrame(function(){t.current.splice(t.current.indexOf(r),1),n()});t.current.push(r)},[t])}var Cy=function(e){var t=x.useRef(e);return t.current=e,t},oo=function(e){var t=Cy(e);return x.useCallback((function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.current.apply(t,n)}),[t])},h8=function(){var e=Yt();return oo(function(t,n){return n.map(function(r){return[r,e.linearItems[t].findIndex(function(i){return i.item===r.index})]}).sort(function(r,i){r[0];var o=r[1];i[0];var s=i[1];return o-s}).map(function(r){var i=r[0];return i})})},eRe=function(e){var t,n=(t=io())===null||t===void 0?void 0:t.querySelector('[data-rct-tree="'.concat(e,'"] [data-rct-item-container="true"]'));if(n){var r=getComputedStyle(n);return n.offsetHeight+Math.max(parseFloat(r.marginTop),parseFloat(r.marginBottom))}return 5},g8=function(e,t){return e.clientX<=t.left||e.clientX>=t.right||e.clientY<=t.top||e.clientY>=t.bottom},tRe=(function(){function e(t,n,r,i,o,s){this.env=t,this.e=n,this.treeId=r,this.linearIndex=i.linearIndex,this.offset=i.offset,this.indentation=i.indentation,this.targetItem=this.env.linearItems[this.treeId][this.linearIndex],this.getParentOfLinearItem=s,this.draggingItems=o}return e.prototype.getEmptyTreeDragPosition=function(){return{targetType:"root",treeId:this.treeId,depth:0,linearIndex:0,targetItem:this.env.trees[this.treeId].rootItem}},e.prototype.maybeRedirectToParent=function(){var t=!this.env.canReorderItems&&!this.env.canDropOnNonFolder&&!this.env.items[this.targetItem.item].isFolder;if(t){var n=this.getParentOfLinearItem(this.linearIndex,this.treeId),r=n.parentLinearIndex,i=n.parent;this.targetItem=i,this.linearIndex=r}},e.prototype.maybeReparentUpwards=function(){var t,n;if(this.indentation!==void 0){var r=this.env.linearItems[this.treeId],i=r[this.linearIndex].depth,o=i-((n=(t=r[this.linearIndex+1])===null||t===void 0?void 0:t.depth)!==null&&n!==void 0?n:0),s=this.offset==="bottom"&&o>0;if(s){for(var c=Math.max(i-o,this.indentation),d={parentLinearIndex:this.linearIndex,parent:this.targetItem},f,p=i;p>=c;p-=1)f=d,d=this.getParentOfLinearItem(d.parentLinearIndex,this.treeId);if(this.indentation!==r[this.linearIndex].depth&&f){var h=this.env.items[d.parent.item].children.indexOf(f.parent.item)+1;if(!(this.draggingItems&&this.isDescendant(this.treeId,d.parentLinearIndex+1,this.draggingItems)))return{targetType:"between-items",treeId:this.treeId,parentItem:d.parent.item,depth:c,linearIndex:this.linearIndex+1,childIndex:h,linePosition:"bottom"}}}}},e.prototype.maybeRedirectInsideOpenFolder=function(){var t=this.env.linearItems[this.treeId][this.linearIndex+1],n=!this.env.canDropBelowOpenFolders&&t&&this.targetItem.depth===t.depth-1&&this.offset==="bottom";n&&(this.targetItem=t,this.linearIndex+=1,this.offset="top")},e.prototype.maybeMapToBottomOffset=function(){var t=this.env.linearItems[this.treeId][this.linearIndex-1];if(!(!t||t?.depth===void 0)){var n=t.depth-this.targetItem.depth;this.offset==="top"&&(n===0||n>0&&this.indentation!==void 0)&&(this.offset="bottom",this.linearIndex-=1,this.targetItem=this.env.linearItems[this.treeId][this.linearIndex])}},e.prototype.canDropAtCurrentTarget=function(){var t=this,n,r=this.env.items[this.targetItem.item];return!(!this.offset&&!this.env.canDropOnNonFolder&&!r.isFolder||!this.offset&&!this.env.canDropOnFolder&&r.isFolder||this.offset&&!this.env.canReorderItems||!((n=this.draggingItems)===null||n===void 0)&&n.some(function(i){return i.index===t.targetItem.item}))},e.prototype.getDraggingPosition=function(){if(this.env.linearItems[this.treeId].length===0)return this.getEmptyTreeDragPosition();if(!(!this.draggingItems||this.linearIndex<0||this.linearIndex>=this.env.linearItems[this.treeId].length)){this.maybeRedirectToParent(),this.maybeRedirectInsideOpenFolder(),this.maybeMapToBottomOffset();var t=this.maybeReparentUpwards();if(t)return t;if(this.areDraggingItemsDescendantOfTarget()||!this.canDropAtCurrentTarget())return"invalid";var n=this.getParentOfLinearItem(this.linearIndex,this.treeId).parent,r=this.env.items[n.item].children.indexOf(this.targetItem.item)+(this.offset==="top"?0:1);return this.offset?{targetType:"between-items",treeId:this.treeId,parentItem:n.item,depth:this.targetItem.depth,linearIndex:this.linearIndex+(this.offset==="top"?0:1),childIndex:r,linePosition:this.offset}:{targetType:"item",treeId:this.treeId,parentItem:n.item,targetItem:this.targetItem.item,depth:this.targetItem.depth,linearIndex:this.linearIndex}}},e.prototype.isDescendant=function(t,n,r){var i=this.getParentOfLinearItem(n,t),o=i.parentLinearIndex,s=i.parent;return r.some(function(c){return c.index===s.item})?!0:s.depth===0?!1:this.isDescendant(t,o,r)},e.prototype.areDraggingItemsDescendantOfTarget=function(){return this.draggingItems&&this.isDescendant(this.treeId,this.linearIndex,this.draggingItems)},e})(),nRe=function(){var e=x.useRef("initial"),t=x.useState(void 0),n=t[0],r=t[1],i=x.useRef(0),o=Yt(),s=m8(),c=oo(function(v,y,b){if(!b)return!1;var S=b.offset,C=b.linearIndex,E="".concat(y,"__").concat(C,"__").concat(S??"","__").concat(b.indentation);return E!==e.current?(e.current=E,!0):!1}),d=oo(function(v,y,b){if(b.current){var S=b.current.getBoundingClientRect();if(!g8(v,S)){var C=(v.clientY-S.top)/i.current,E=o.linearItems[y],k=Math.min(Math.max(0,Math.floor(C)),E.length-1);if(E.length===0)return{linearIndex:0,offset:"bottom",indentation:0};var R=E[k],I=o.items[R.item],A=o.renderDepthOffset?Math.max(Math.floor((v.clientX-S.left)/o.renderDepthOffset),0):void 0,T,N=o.canReorderItems?I?.isFolder&&o.canDropOnFolder||o.canDropOnNonFolder?.2:.5:0;return C-.5>=E.length-1?T="bottom":C%1<N?T="top":C%1>1-N&&(T="bottom"),{linearIndex:k,offset:T,indentation:A}}}}),f=oo(function(v,y,b){var S=d(v,y,b);if(c(v,y,S))return!n||!o.canDragAndDrop||!S||v.clientX<0||v.clientY<0?"invalid":new tRe(o,v,y,S,n,s).getDraggingPosition()}),p=oo(function(v,y){r(y),e.current="initial",i.current=eRe(v)}),h=oo(function(){r(void 0),e.current="initial",i.current=0});return{initiateDraggingPosition:p,resetDraggingPosition:h,draggingItems:n,getDraggingPosition:f,itemHeight:i}},v8=x.createContext(null),ua=function(){return x.useContext(v8)},rRe=function(e){var t=e.children,n=Yt(),r=x.useState(!1),i=r[0],o=r[1],s=x.useState({}),c=s[0],d=s[1],f=x.useState(0),p=f[0],h=f[1],v=x.useState(),y=v[0],b=v[1],S=Jke(),C=Jd(),E=h8(),k=nRe(),R=k.initiateDraggingPosition,I=k.resetDraggingPosition,A=k.draggingItems,T=k.getDraggingPosition,N=k.itemHeight,z=x.useCallback(function(F,O){var J;if(n.activeTreeId&&(!((J=n.viewState[n.activeTreeId])===null||J===void 0)&&J.focusedItem)&&n.linearItems&&O){var de=n.viewState[n.activeTreeId].focusedItem,pe=S(n.activeTreeId,O),V=pe.findIndex(function(ie){return ie.targetType==="item"?ie.targetItem===de:ie.targetType==="between-items"?n.items[ie.parentItem].children[ie.childIndex]===de:!1});h(V?Math.min(V+1,pe.length-1):0)}else h(0)},[n.activeTreeId,n.items,n.linearItems,n.viewState,S]),L=oo(function(){o(!1),d({}),h(0),b(void 0),I()});Sy(function(){n.activeTreeId&&n.linearItems[n.activeTreeId]&&c[n.activeTreeId]&&z(c[n.activeTreeId],A)},[A,n.activeTreeId,n.linearItems,z,c],[n.activeTreeId]),Sy(function(){i&&n.activeTreeId&&b(c[n.activeTreeId][p])},[p,n.activeTreeId,i,c],[p,n.activeTreeId]);var K=f8(),ee=function(F){var O;A&&!K(F,A)||(b(F),n.setActiveTree(F.treeId),A&&n.activeTreeId!==F.treeId&&((O=n.onSelectItems)===null||O===void 0||O.call(n,A.map(function(J){return J.index}),F.treeId)))},Z=oo(function(F,O,J){if(A){var de=T(F,O,J);if(de){if(de==="invalid"){b(void 0);return}ee(de)}}}),Y=oo(function(F,O){O.current&&g8(F,O.current.getBoundingClientRect())&&b(void 0)}),B=oo(function(){!A||!y||!n.onDrop||(n.onDrop(A,y),C(function(){var F;(F=n.onFocusItem)===null||F===void 0||F.call(n,A[0],y.treeId),L()}))}),W=x.useCallback(function(F,O){var J=p8(n.treeIds,function(de){return S(de,F)});R(O,F),d(J),n.activeTreeId&&z(J[n.activeTreeId],F)},[n.activeTreeId,n.treeIds,S,R,z]),P=x.useCallback(function(){var F,O,J;if(n.canDragAndDrop&&n.activeTreeId){var de=(O=(F=n.viewState[n.activeTreeId])===null||F===void 0?void 0:F.selectedItems)!==null&&O!==void 0?O:[(J=n.viewState[n.activeTreeId])===null||J===void 0?void 0:J.focusedItem];if(de.length===0||de[0]===void 0)return;var pe=E(n.activeTreeId,de.map(function(V){return n.items[V]}));if(n.canDrag&&!n.canDrag(pe))return;W(pe,n.activeTreeId),setTimeout(function(){o(!0)})}},[n,E,W]),G=x.useCallback(function(){L()},[L]),U=x.useCallback(function(){B(),L()},[B,L]),te=x.useCallback(function(){h(function(F){return Math.max(0,F-1)})},[]),$=x.useCallback(function(){n.activeTreeId&&h(function(F){return Math.min(c[n.activeTreeId].length-1,F+1)})},[n.activeTreeId,c]),M=x.useMemo(function(){return{onStartDraggingItems:W,startProgrammaticDrag:P,abortProgrammaticDrag:G,completeProgrammaticDrag:U,programmaticDragUp:te,programmaticDragDown:$,draggingItems:A,draggingPosition:y,itemHeight:N.current,isProgrammaticallyDragging:i,onDragOverTreeHandler:Z,onDragLeaveContainerHandler:Y,viableDragPositions:c}},[G,U,A,y,i,N,Z,Y,W,$,te,P,c]);return x.useEffect(function(){return window.addEventListener("dragend",L),window.addEventListener("drop",B),function(){window.removeEventListener("dragend",L),window.removeEventListener("drop",B)}},[B,L]),x.createElement(v8.Provider,{value:M},t)},Pm=function(){return Pm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Pm.apply(this,arguments)},iRe=function(e,t){var n=Yt(),r=ua();x.useImperativeHandle(e,function(){return Pm(Pm(Pm({},t),n),{treeEnvironmentContext:n,dragAndDropContext:r})})},y8=function(e,t,n){return t===void 0&&(t=50),n===void 0&&(n=1e4),new Promise(function(r){e()&&r();var i,o=setInterval(function(){e()&&i()},t),s=setTimeout(function(){i()},n);i=function(){clearInterval(o),clearTimeout(s),r()}})},YC=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function c(p){try{f(r.next(p))}catch(h){s(h)}}function d(p){try{f(r.throw(p))}catch(h){s(h)}}function f(p){p.done?o(p.value):i(p.value).then(c,d)}f((r=r.apply(e,t||[])).next())})},WC=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(f){return function(p){return d([f,p])}}function d(f){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,f[0]&&(n=0)),n;)try{if(r=1,i&&(o=f[0]&2?i.return:f[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,f[1])).done)return o;switch(i=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,i=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){n.label=f[1];break}if(f[0]===6&&n.label<o[1]){n.label=o[1],o=f;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(f);break}o[2]&&n.ops.pop(),n.trys.pop();continue}f=t.call(e,n)}catch(p){f=[6,p],i=0}finally{r=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},uP=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},b8=x.createContext(null),oRe=function(){return x.useContext(b8)},x8=function(e,t,n){return YC(void 0,void 0,void 0,function(){var r,i,o,s,c,d,f;return WC(this,function(p){for(r=function(h){y8(function(){var v;return!!(!((v=t.current)===null||v===void 0)&&v[h])}).then(function(){var v,y=(v=t.current)===null||v===void 0?void 0:v[h];y?.isFolder&&(n(y),x8(h,t,n))})},i=0,o=(f=(d=(c=t.current)===null||c===void 0?void 0:c[e])===null||d===void 0?void 0:d.children)!==null&&f!==void 0?f:[];i<o.length;i++)s=o[i],r(s);return[2]})})},aRe=x.forwardRef(function(e,t){var n=Yt(),r=n.onCollapseItem,i=n.items,o=n.trees,s=n.viewState,c=n.onExpandItem,d=n.onFocusItem,f=n.setActiveTree,p=n.onRenameItem,h=n.onSelectItems,v=n.onPrimaryAction,y=n.linearItems,b=ua(),S=b.abortProgrammaticDrag,C=b.completeProgrammaticDrag,E=b.programmaticDragDown,k=b.programmaticDragUp,R=b.startProgrammaticDrag,I=Cy(i),A=x.useCallback(function($,M){r?.(i[$],M)},[i,r]),T=x.useCallback(function($,M){c?.(i[$],M)},[i,c]),N=x.useCallback(function($,M,F){F===void 0&&(F=!0),d?.(i[$],M,F)},[i,d]),z=x.useCallback(function($,M){M===void 0&&(M=!0),f($,M)},[f]),L=x.useCallback(function($){var M=y[$],F=M.findIndex(function(de){var pe,V=de.item;return V===((pe=s[$])===null||pe===void 0?void 0:pe.focusedItem)}),O=F!==void 0?Math.min(M.length-1,F+1):0,J=i[M[O].item];d?.(J,$)},[i,y,d,s]),K=x.useCallback(function($){var M=y[$],F=M.findIndex(function(de){var pe,V=de.item;return V===((pe=s[$])===null||pe===void 0?void 0:pe.focusedItem)}),O=F!==void 0?Math.max(0,F-1):0,J=i[M[O].item];d?.(J,$)},[i,y,d,s]),ee=x.useCallback(function($,M,F){p?.(i[$],M,F)},[i,p]),Z=x.useCallback(function($,M){h?.($,M)},[h]),Y=x.useCallback(function($,M){var F,O;!((O=(F=s[M])===null||F===void 0?void 0:F.expandedItems)===null||O===void 0)&&O.includes($)?r?.(i[$],M):c?.(i[$],M)},[i,r,c,s]),B=x.useCallback(function($,M){var F,O,J,de,pe;!((O=(F=s[M])===null||F===void 0?void 0:F.selectedItems)===null||O===void 0)&&O.includes($)?h?.((de=(J=s[M].selectedItems)===null||J===void 0?void 0:J.filter(function(V){return V!==$}))!==null&&de!==void 0?de:[],M):h?.(uP(uP([],(pe=s[M].selectedItems)!==null&&pe!==void 0?pe:[],!0),[$],!1),M)},[h,s]),W=x.useCallback(function($,M){v?.(i[$],M)},[i,v]),P=x.useCallback(function($,M){return YC(void 0,void 0,void 0,function(){var F,O;return WC(this,function(J){switch(J.label){case 0:return F=M[0],O=M.slice(1),[4,y8(function(){var de;return!!(!((de=I.current)===null||de===void 0)&&de[F])}).then(function(){var de=I.current[F];return de?(c?.(de,$),O.length>0?P($,O):Promise.resolve()):Promise.resolve()})];case 1:return J.sent(),[2]}})})},[I,c]),G=x.useCallback(function($){return YC(void 0,void 0,void 0,function(){return WC(this,function(M){switch(M.label){case 0:return[4,x8(o[$].rootItem,I,function(F){return c?.(F,$)})];case 1:return M.sent(),[2]}})})},[I,c,o]),U=x.useCallback(function($){for(var M,F,O=0,J=(F=(M=s[$])===null||M===void 0?void 0:M.expandedItems)!==null&&F!==void 0?F:[];O<J.length;O++){var de=J[O];r?.(i[de],$)}},[i,r,s]),te=x.useMemo(function(){return{collapseItem:A,expandItem:T,focusItem:N,focusTree:z,moveFocusDown:L,moveFocusUp:K,renameItem:ee,selectItems:Z,toggleItemExpandedState:Y,toggleItemSelectStatus:B,invokePrimaryAction:W,expandAll:G,expandSubsequently:P,collapseAll:U,abortProgrammaticDrag:S,completeProgrammaticDrag:C,moveProgrammaticDragPositionDown:E,moveProgrammaticDragPositionUp:k,startProgrammaticDrag:R}},[A,T,N,z,L,K,ee,Z,Y,B,W,G,P,U,S,C,E,k,R]);return iRe(t,te),x.createElement(b8.Provider,{value:te},e.children)}),sRe=function(e){var t,n,r,i;if(e)if(e.scrollIntoViewIfNeeded)e.scrollIntoViewIfNeeded();else{var o=e.getBoundingClientRect(),s=o.top>=0&&o.left>=0&&o.bottom<=(window.innerHeight||!!(!((n=(t=io())===null||t===void 0?void 0:t.documentElement)===null||n===void 0)&&n.clientHeight))&&o.right<=(window.innerWidth||!!(!((i=(r=io())===null||r===void 0?void 0:r.documentElement)===null||i===void 0)&&i.clientWidth));s||e.scrollIntoView()}},oi=function(){return oi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},oi.apply(this,arguments)},Ts=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(n){return!!n}).join(" ")},lRe=function(e,t){return{renderItemTitle:function(n){var r=n.title,i=n.context,o=n.info;if(!o.isSearching||!i.isSearchMatching)return r;var s=r.toLowerCase().indexOf(o.search.toLowerCase());return X.createElement(X.Fragment,null,s>0&&X.createElement("span",null,r.slice(0,s)),X.createElement("span",{className:"rct-tree-item-search-highlight"},r.slice(s,s+o.search.length)),s+o.search.length<r.length&&X.createElement("span",null,r.slice(s+o.search.length,r.length)))},renderItemArrow:function(n){var r=n.item,i=n.context;return X.createElement("div",oi({className:Ts(r.isFolder&&"rct-tree-item-arrow-isFolder",i.isExpanded&&"rct-tree-item-arrow-expanded","rct-tree-item-arrow")},i.arrowProps),r.isFolder&&(i.isExpanded?X.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 16 16",enableBackground:"new 0 0 16 16",xmlSpace:"preserve"},X.createElement("g",null,X.createElement("g",null,X.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z",className:"rct-tree-item-arrow-path"})))):X.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 16 16",enableBackground:"new 0 0 16 16",xmlSpace:"preserve"},X.createElement("g",null,X.createElement("g",null,X.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z",className:"rct-tree-item-arrow-path"}))))))},renderItem:function(n){var r=n.item,i=n.depth,o=n.children,s=n.title,c=n.context,d=n.arrow,f=c.isRenaming?"div":"button",p=c.isRenaming?void 0:"button";return X.createElement("li",oi({},c.itemContainerWithChildrenProps,{className:Ts("rct-tree-item-li",r.isFolder&&"rct-tree-item-li-isFolder",c.isSelected&&"rct-tree-item-li-selected",c.isExpanded&&"rct-tree-item-li-expanded",c.isFocused&&"rct-tree-item-li-focused",c.isDraggingOver&&"rct-tree-item-li-dragging-over",c.isSearchMatching&&"rct-tree-item-li-search-match")}),X.createElement("div",oi({},c.itemContainerWithoutChildrenProps,{style:{"--depthOffset":"".concat((i+1)*e,"px")},className:Ts("rct-tree-item-title-container",r.isFolder&&"rct-tree-item-title-container-isFolder",c.isSelected&&"rct-tree-item-title-container-selected",c.isExpanded&&"rct-tree-item-title-container-expanded",c.isFocused&&"rct-tree-item-title-container-focused",c.isDraggingOver&&"rct-tree-item-title-container-dragging-over",c.isSearchMatching&&"rct-tree-item-title-container-search-match")}),d,X.createElement(f,oi({type:p},c.interactiveElementProps,{className:Ts("rct-tree-item-button",r.isFolder&&"rct-tree-item-button-isFolder",c.isSelected&&"rct-tree-item-button-selected",c.isExpanded&&"rct-tree-item-button-expanded",c.isFocused&&"rct-tree-item-button-focused",c.isDraggingOver&&"rct-tree-item-button-dragging-over",c.isSearchMatching&&"rct-tree-item-button-search-match")}),s)),o)},renderRenameInput:function(n){var r=n.inputProps,i=n.inputRef,o=n.submitButtonProps,s=n.submitButtonRef,c=n.formProps;return X.createElement("form",oi({},c,{className:"rct-tree-item-renaming-form"}),X.createElement("input",oi({},r,{ref:i,className:"rct-tree-item-renaming-input"})),X.createElement("input",oi({},o,{ref:s,type:"submit",className:"rct-tree-item-renaming-submit-button",value:"🗸"})))},renderTreeContainer:function(n){var r=n.children,i=n.containerProps,o=n.info;return X.createElement("div",{className:Ts("rct-tree-root",o.isFocused&&"rct-tree-root-focus",o.isRenaming&&"rct-tree-root-renaming",o.areItemsSelected&&"rct-tree-root-itemsselected",t)},X.createElement("div",oi({},i,{style:oi({minHeight:"30px"},i.style)}),r))},renderItemsContainer:function(n){var r=n.children,i=n.containerProps;return X.createElement("ul",oi({},i,{className:"rct-tree-items-container"}),r)},renderDragBetweenLine:function(n){var r=n.draggingPosition,i=n.lineProps;return X.createElement("div",oi({},i,{style:{left:"".concat(r.depth*e,"px")},className:Ts("rct-tree-drag-between-line",r.targetType==="between-items"&&r.linePosition==="top"&&"rct-tree-drag-between-line-top",r.targetType==="between-items"&&r.linePosition==="bottom"&&"rct-tree-drag-between-line-bottom")}))},renderSearchInput:function(n){var r=n.inputProps;return X.createElement("div",{className:Ts("rct-tree-search-input-container")},X.createElement("span",{className:"rct-tree-input-icon"}),X.createElement("input",oi({},r,{className:Ts("rct-tree-search-input")})))},renderLiveDescriptorContainer:function(n){var r=n.tree,i=n.children;return X.createElement("div",{id:"rct-livedescription-".concat(r.treeId),style:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}},i)},renderDepthOffset:e}},cRe=function(e){var t=e.renderItem,n=e.renderItemTitle,r=e.renderItemArrow,i=e.renderRenameInput,o=e.renderItemsContainer,s=e.renderTreeContainer,c=e.renderDragBetweenLine,d=e.renderSearchInput,f=e.renderLiveDescriptorContainer,p=e.renderDepthOffset,h=x.useMemo(function(){return lRe(p??10)},[p]),v={renderItem:t,renderItemTitle:n,renderItemArrow:r,renderRenameInput:i,renderItemsContainer:o,renderTreeContainer:s,renderDragBetweenLine:c,renderSearchInput:d,renderLiveDescriptorContainer:f,renderDepthOffset:p},y=Object.entries(h).reduce(function(b,S){var C=S[0],E=S[1],k=C;return v[k]?b[k]=v[k]:b[k]=E,b},{});return y.renderItem.displayName="RenderItem",y.renderItemTitle.displayName="RenderItemTitle",y.renderItemArrow.displayName="RenderItemArrow",y.renderRenameInput.displayName="RenderRenameInput",y.renderItemsContainer.displayName="RenderItemsContainer",y.renderTreeContainer.displayName="RenderTreeContainer",y.renderDragBetweenLine.displayName="RenderDragBetweenLine",y.renderSearchInput.displayName="RenderSearchInput",y},XR=function(e,t,n,r){var i,o,s;r===void 0&&(r=0);for(var c=[],d=0,f=(o=(i=n[e])===null||i===void 0?void 0:i.children)!==null&&o!==void 0?o:[];d<f.length;d++){var p=f[d],h=n[p];c.push({item:p,depth:r}),h&&h.isFolder&&h.children&&(!((s=t.expandedItems)===null||s===void 0)&&s.includes(p))&&c.push.apply(c,XR(p,t,n,r+1))}return c},Ol=function(){return Ol=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ol.apply(this,arguments)},uRe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},dRe=function(e){var t=e.onExpandItem,n=e.onCollapseItem,r=e.onDrop,i=uRe(e,["onExpandItem","onCollapseItem","onDrop"]),o=x.useState({}),s=o[0],c=o[1],d=x.useState(),f=d[0],p=d[1],h=x.useMemo(function(){return Object.keys(s)},[s]),v=i.onFocusItem,y=i.autoFocus,b=i.onRegisterTree,S=i.onUnregisterTree,C=i.items,E=i.viewState,k=Cy(v),R=Cy(E),I=x.useMemo(function(){return p8(h,function(B){var W;return XR(s[B].rootItem,(W=E[B])!==null&&W!==void 0?W:{},C)})},[s,C,h,E]),A=x.useCallback(function(B,W,P){var G,U,te,$,M,F,O,J,de;if(P===void 0&&(P=!0),(y??!0)&&P){var pe=(U=(G=io())===null||G===void 0?void 0:G.querySelector('[data-rct-tree="'.concat(W,'"] [data-rct-item-id="').concat(B.index,'"]')))!==null&&U!==void 0?U:(te=io())===null||te===void 0?void 0:te.querySelector('[data-rct-tree="'.concat(W,'"] [data-rct-item-id]'));((F=(M=($=io())===null||$===void 0?void 0:$.activeElement)===null||M===void 0?void 0:M.attributes.getNamedItem("data-rct-search-input"))===null||F===void 0?void 0:F.value)!=="true"?(O=pe?.focus)===null||O===void 0||O.call(pe):sRe(pe)}((J=R.current[W])===null||J===void 0?void 0:J.focusedItem)!==B.index&&((de=k.current)===null||de===void 0||de.call(k,B,W))},[y,k,R]),T=x.useCallback(function(B){c(function(W){var P;return Ol(Ol({},W),(P={},P[B.treeId]=B,P))}),b?.(B)},[b]),N=x.useCallback(function(B){S?.(s[B]),delete s[B],c(s)},[S,s]),z=x.useCallback(function(B,W){n?.(B,W),c(function(P){return P})},[n]),L=x.useCallback(function(B,W){t?.(B,W),c(function(P){return P})},[t]),K=x.useCallback(function(B,W){r?.(B,W),c(function(P){return P})},[r]),ee=x.useCallback(function(B){var W,P,G=(W=io())===null||W===void 0?void 0:W.querySelector('[data-rct-tree="'.concat(B,'"] [data-rct-item-focus="true"]'));(P=G?.focus)===null||P===void 0||P.call(G)},[]),Z=x.useCallback(function(B,W){W===void 0&&(W=!0);var P=function(U){var te,$;W&&(y??!0)&&U&&!(!(($=(te=io())===null||te===void 0?void 0:te.querySelector('[data-rct-tree="'.concat(U,'"]')))===null||$===void 0)&&$.contains(document.activeElement))&&ee(U)};if(typeof B=="function")p(function(U){var te=B(U);return te!==U&&P(te),te});else{var G=B;p(G),P(G)}},[y,ee]),Y=cRe(i);return Ol(Ol(Ol({},Y),i),{onFocusItem:A,registerTree:T,unregisterTree:N,onExpandItem:L,onCollapseItem:z,onDrop:K,setActiveTree:Z,treeIds:h,trees:s,activeTreeId:f,linearItems:I})},w8=x.createContext(null),Yt=function(){return x.useContext(w8)},fRe=x.forwardRef(function(e,t){var n=dRe(e),r=e.viewState,i=e.onFocusItem;return x.useEffect(function(){for(var o,s,c,d=0,f=Object.keys(n.trees);d<f.length;d++){var p=f[d],h=(s=(o=e.items[n.trees[p].rootItem])===null||o===void 0?void 0:o.children)===null||s===void 0?void 0:s[0],v=h&&e.items[h];!(!((c=r[p])===null||c===void 0)&&c.focusedItem)&&n.trees[p]&&v&&i?.(v,p,!1)}},[n.trees,i,e.items,r]),x.createElement(w8.Provider,{value:n},x.createElement(Qke,null,x.createElement(rRe,null,x.createElement(aRe,{ref:t},e.children))))}),mRe=function(e){var t,n=e.treeId,r=ua(),i=r.draggingPosition,o=r.itemHeight,s=qr().renderers,c=i&&i.targetType==="between-items"&&i.treeId===n;if(!c)return null;var d={onDragOver:function(f){return f.preventDefault()}};return x.createElement("div",{style:{position:"absolute",left:"0",right:"0",top:"".concat(((t=i?.linearIndex)!==null&&t!==void 0?t:0)*o,"px")}},s.renderDragBetweenLine({draggingPosition:i,lineProps:d}))},wd=function(e,t,n){var r=oo(n);x.useEffect(function(){return e?(e.addEventListener(t,r),function(){return e.removeEventListener(t,r)}):function(){}},[e,r,t])},pRe=function(e,t,n){var r=x.useState(!1),i=r[0],o=r[1],s=x.useRef(!1),c=Jd();return wd(e,"focusin",function(){i||(o(!0),t?.()),s.current&&(s.current=!1)}),wd(e,"focusout",function(){s.current=!0,c(function(){s.current&&!e?.contains(document.activeElement)&&(n?.(),s.current=!1,o(!1))})}),i},tv=function(e,t,n){wd(io(),"keydown",function(r){n&&n&&e.toLowerCase()===r.key.toLowerCase()&&t(r)})},dP={expandSiblings:["control+*"],moveFocusToFirstItem:["home"],moveFocusToLastItem:["end"],primaryAction:["enter"],renameItem:["f2"],abortRenameItem:["escape"],toggleSelectItem:["control+ "],abortSearch:["escape","enter"],startSearch:[],selectAll:["control+a"],startProgrammaticDnd:["control+shift+d"],completeProgrammaticDnd:["enter"],abortProgrammaticDnd:["escape"]},Ey=function(){return Ey=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ey.apply(this,arguments)},S8=function(){var e=Yt();return x.useMemo(function(){return e.keyboardBindings?Ey(Ey({},dP),e.keyboardBindings):dP},[e.keyboardBindings])},hRe=["input","textarea"],Xi=function(e,t,n,r){r===void 0&&(r=!1);var i=x.useRef([]),o=S8(),s=Jd(),c=x.useMemo(function(){return o[e].map(function(d){return d.split("+")})},[e,o]);wd(io(),"keydown",function(d){var f;if(n!==!1&&!((hRe.includes((f=d.target.tagName)===null||f===void 0?void 0:f.toLowerCase())||d.target.isContentEditable)&&!r)&&!i.current.includes(d.key)){i.current.push(d.key);var p=i.current.map(function(v){return v.toLowerCase()}),h=c.map(function(v){return p.map(function(y){return v.includes(y.toLowerCase())}).reduce(function(y,b){return y&&b},!0)}).reduce(function(v,y){return v||y},!1);h&&(i.current.length>1||!/^[a-zA-Z\s]$/.test(d.key))&&d.preventDefault()}}),wd(io(),"keyup",function(d){if(n!==!1){var f=i.current.map(function(h){return h.toLowerCase()}),p=c.map(function(h){return h.map(function(v){return f.includes(v.toLowerCase())}).reduce(function(v,y){return v&&y},!0)}).reduce(function(h,v){return h||v},!1);p&&s(function(){return t(d)}),i.current=i.current.filter(function(h){return h!==d.key})}})},th=function(){var e,t=qr().treeId,n=Yt().viewState;return(e=n[t])!==null&&e!==void 0?e:{}},hx=function(e){return Yt().linearItems[e]},gRe=function(){var e=qr().treeId,t=Yt(),n=t.onFocusItem,r=t.items,i=hx(e),o=th();return oo(function(s){var c,d=(c=i.findIndex(function(v){return v.item===o.focusedItem}))!==null&&c!==void 0?c:0,f=s(d,i),p=Math.max(0,Math.min(i.length-1,f)),h=r[i[p].item];return n?.(h,e),h})},fP=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},vRe=function(e){var t=x.useRef({target:e,previous:void 0});return t.current.target!==e&&(t.current.previous=t.current.target,t.current.target=e),t.current.previous},_8=function(e){var t=th(),n=qr().treeId,r=hx(n),i=Yt().onSelectItems,o=vRe(t.focusedItem);return x.useCallback(function(s,c){var d,f;c===void 0&&(c=!1);var p=s.index,h=function(C,E){var k=fP(fP([],c?[]:C,!0),E.filter(function(R){return c||!C.includes(R)}),!0);i?.(k,n)};if(t&&t.selectedItems&&t.selectedItems.length>0){var v=t.focusedItem===p?o:t.focusedItem,y=e==="last-focus"?r.findIndex(function(C){return v===C.item}):r.findIndex(function(C){var E;return(E=t.selectedItems)===null||E===void 0?void 0:E.includes(C.item)}),b=r.findIndex(function(C){return C.item===p});if(y<b){var S=r.slice(y,b+1).map(function(C){var E=C.item;return E});h((d=t.selectedItems)!==null&&d!==void 0?d:[],S)}else{var S=r.slice(b,y+1).map(function(E){var k=E.item;return k});h((f=t.selectedItems)!==null&&f!==void 0?f:[],S)}}else i?.([p],n)},[t,i,n,e,r,o])},mP=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},yRe=function(){var e,t=Yt(),n=qr(),r=n.treeId,i=n.setRenamingItem,o=n.setSearch,s=n.renamingItem,c=hx(r),d=ua(),f=th(),p=gRe(),h=_8("first-selected"),v=t.activeTreeId===r,y=!!s,b=t.disableArrowKeys,S=!b&&v&&!y;tv("arrowdown",function(C){if(C.preventDefault(),d.isProgrammaticallyDragging)d.programmaticDragDown();else{var E=p(function(k){return k+1});C.shiftKey&&h(E)}},S),tv("arrowup",function(C){if(C.preventDefault(),d.isProgrammaticallyDragging)d.programmaticDragUp();else{var E=p(function(k){return k-1});C.shiftKey&&h(E)}},S),Xi("moveFocusToFirstItem",function(C){C.preventDefault(),p(function(){return 0})},v&&!d.isProgrammaticallyDragging&&!y),Xi("moveFocusToLastItem",function(C){C.preventDefault(),p(function(E,k){return k.length-1})},v&&!d.isProgrammaticallyDragging&&!y),tv("arrowright",function(C){C.preventDefault(),p(function(E,k){var R,I,A=t.items[k[E].item];if(A.isFolder){if(!((R=f.expandedItems)===null||R===void 0)&&R.includes(A.index))return E+1;(I=t.onExpandItem)===null||I===void 0||I.call(t,A,r)}return E})},S&&!d.isProgrammaticallyDragging),tv("arrowleft",function(C){C.preventDefault(),p(function(E,k){var R,I,A=t.items[k[E].item],T=k[E].depth;if(A.isFolder&&(!((R=f.expandedItems)===null||R===void 0)&&R.includes(A.index)))(I=t.onCollapseItem)===null||I===void 0||I.call(t,A,r);else if(T>0){var N=E;for(N;k[N].depth!==T-1;N-=1);return N}return E})},S&&!d.isProgrammaticallyDragging),Xi("primaryAction",function(C){var E,k;C.preventDefault(),f.focusedItem!==void 0&&((E=t.onSelectItems)===null||E===void 0||E.call(t,[f.focusedItem],r),(k=t.onPrimaryAction)===null||k===void 0||k.call(t,t.items[f.focusedItem],r))},v&&!d.isProgrammaticallyDragging&&!y),Xi("toggleSelectItem",function(C){var E,k,R;C.preventDefault(),C.stopPropagation(),f.focusedItem!==void 0&&(f.selectedItems&&f.selectedItems.includes(f.focusedItem)?(E=t.onSelectItems)===null||E===void 0||E.call(t,f.selectedItems.filter(function(I){return I!==f.focusedItem}),r):(k=t.onSelectItems)===null||k===void 0||k.call(t,mP(mP([],(R=f.selectedItems)!==null&&R!==void 0?R:[],!0),[f.focusedItem],!1),r))},v&&!d.isProgrammaticallyDragging&&!y),Xi("selectAll",function(C){var E;C.preventDefault(),(E=t.onSelectItems)===null||E===void 0||E.call(t,c.map(function(k){var R=k.item;return R}),r)},v&&!d.isProgrammaticallyDragging&&!y),Xi("renameItem",function(C){var E;if(f.focusedItem!==void 0){C.preventDefault();var k=t.items[f.focusedItem];k.canRename!==!1&&((E=t.onStartRenamingItem)===null||E===void 0||E.call(t,k,r),i(k.index))}},v&&((e=t.canRename)!==null&&e!==void 0?e:!0)&&!y),Xi("startSearch",function(C){var E,k;C.preventDefault(),o(""),(k=(E=document.querySelector('[data-rct-search-input="true"]'))===null||E===void 0?void 0:E.focus)===null||k===void 0||k.call(E)},v&&!d.isProgrammaticallyDragging&&!y),Xi("startProgrammaticDnd",function(C){C.preventDefault(),d.startProgrammaticDrag()},v&&!y),Xi("completeProgrammaticDnd",function(C){C.preventDefault(),d.completeProgrammaticDrag()},v&&d.isProgrammaticallyDragging&&!y),Xi("abortProgrammaticDnd",function(C){C.preventDefault(),d.abortProgrammaticDrag()},v&&d.isProgrammaticallyDragging&&!y)},C8=function(e,t,n){return n.toLowerCase().includes(e.toLowerCase())},bRe=function(){var e=Yt(),t=e.doesSearchMatchItem,n=e.items,r=e.getItemTitle,i=e.onFocusItem,o=qr(),s=o.search,c=o.treeId,d=hx(c),f=Jd();Sy(function(){s&&s.length>0&&f(function(){var p=d.find(function(h){var v=h.item;return(t??C8)(s,n[v],r(n[v]))});p&&i?.(n[p.item],c)})},[t,r,d,n,i,s,c,f],[s])},XC=function(){return XC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},XC.apply(this,arguments)},xRe=function(e){var t,n=e.containerRef,r=qr(),i=r.search,o=r.setSearch,s=r.treeId,c=r.renderers,d=r.renamingItem,f=Yt();th();var p=f.activeTreeId===s,h=Jd();bRe();var v=function(){var y,b,S;if(o(null),!((y=f.autoFocus)!==null&&y!==void 0)||y){var C=(b=io())===null||b===void 0?void 0:b.querySelector('[data-rct-tree="'.concat(s,'"] [data-rct-item-focus="true"]'));(S=C?.focus)===null||S===void 0||S.call(C)}};return Xi("abortSearch",function(){h(function(){v()})},p&&i!==null,!0),wd(n,"keydown",function(y){var b,S,C=y.key.charCodeAt(0);(!((b=f.canSearch)!==null&&b!==void 0)||b)&&(!((S=f.canSearchByStartingTyping)!==null&&S!==void 0)||S)&&p&&i===null&&!d&&!y.ctrlKey&&!y.shiftKey&&!y.altKey&&!y.metaKey&&(C>=48&&C<=57||C>=97&&C<=122)&&o("")}),!(!((t=f.canSearch)!==null&&t!==void 0)||t)||i===null?null:c.renderSearchInput({inputProps:XC({value:i,onChange:function(y){return o(y.target.value)},onBlur:function(){v()},ref:function(y){var b;(b=y?.focus)===null||b===void 0||b.call(y)},"aria-label":"Search for items"},{"data-rct-search-input":"true"})})},wRe={introduction:`
|
|
536
|
-
<p>Accessibility guide for tree {treeLabel}.</p>
|
|
537
|
-
<p>
|
|
538
|
-
Navigate the tree with the arrow keys. Common tree hotkeys apply. Further keybindings are available:
|
|
539
|
-
</p>
|
|
540
|
-
<ul>
|
|
541
|
-
<li>{keybinding:primaryAction} to execute primary action on focused item</li>
|
|
542
|
-
<li>{keybinding:renameItem} to start renaming the focused item</li>
|
|
543
|
-
<li>{keybinding:abortRenameItem} to abort renaming an item</li>
|
|
544
|
-
<li>{keybinding:startProgrammaticDnd} to start dragging selected items</li>
|
|
545
|
-
</ul>
|
|
546
|
-
`,renamingItem:`
|
|
547
|
-
<p>Renaming the item {renamingItem}.</p>
|
|
548
|
-
<p>Use the keybinding {keybinding:abortRenameItem} to abort renaming.</p>
|
|
549
|
-
`,searching:`
|
|
550
|
-
<p>Searching</p>
|
|
551
|
-
`,programmaticallyDragging:`
|
|
552
|
-
<p>Dragging items {dragItems}.</p>
|
|
553
|
-
<p>Press the arrow keys to move the drag target.</p>
|
|
554
|
-
<p>Press {keybinding:completeProgrammaticDnd} to drop or {keybinding:abortProgrammaticDnd} to abort.</p>
|
|
555
|
-
`,programmaticallyDraggingTarget:`
|
|
556
|
-
<p>Drop target is {dropTarget}.</p>
|
|
557
|
-
`},pm=function(e,t,n,r,i){var o=function(s){return t.getItemTitle(t.items[s])};return e.replace(/({[^\s}]+)}/g,function(s){var c,d,f,p=s.slice(1,-1);switch(p){case"treeLabel":return(c=r.treeLabel)!==null&&c!==void 0?c:"";case"renamingItem":return r.renamingItem?o(r.renamingItem):"None";case"dragItems":return(f=(d=n.draggingItems)===null||d===void 0?void 0:d.map(function(y){return t.getItemTitle(y)}).join(", "))!==null&&f!==void 0?f:"None";case"dropTarget":{if(!n.draggingPosition)return"None";if(n.draggingPosition.targetType==="item"||n.draggingPosition.targetType==="root")return"within ".concat(o(n.draggingPosition.targetItem));var h=t.items[n.draggingPosition.parentItem],v=t.getItemTitle(h);return n.draggingPosition.childIndex===0?"within ".concat(v," at the start"):"within ".concat(v," after ").concat(o(h.children[n.draggingPosition.childIndex-1]))}default:if(p.startsWith("keybinding:"))return i[p.slice(11)][0];throw Error("Unknown live descriptor variable {".concat(p,"}"))}})},hm=function(e){var t=e.children,n=e.live;return x.createElement("div",{"aria-live":n,dangerouslySetInnerHTML:{__html:t}})},SRe=function(){var e=Yt(),t=qr(),n=ua(),r=S8(),i=x.useMemo(function(){var s;return(s=e.liveDescriptors)!==null&&s!==void 0?s:wRe},[e.liveDescriptors]),o=t.renderers.renderLiveDescriptorContainer;return t.treeInformation.isRenaming?x.createElement(o,{tree:t},x.createElement(hm,{live:"polite"},pm(i.renamingItem,e,n,t,r))):t.treeInformation.isSearching?x.createElement(o,{tree:t},x.createElement(hm,{live:"polite"},pm(i.searching,e,n,t,r))):t.treeInformation.isProgrammaticallyDragging?x.createElement(o,{tree:t},x.createElement(hm,{live:"polite"},pm(i.programmaticallyDragging,e,n,t,r)),x.createElement(hm,{live:"assertive"},pm(i.programmaticallyDraggingTarget,e,n,t,r))):x.createElement(o,{tree:t},x.createElement(hm,{live:"off"},pm(i.introduction,e,n,t,r)))},_Re=function(){var e,t=Yt();return!((e=t.showLiveDescription)!==null&&e!==void 0)||e?x.createElement(SRe,null):null},QC=function(){return QC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},QC.apply(this,arguments)},CRe=function(){var e=qr(),t=e.treeId,n=e.rootItem,r=e.renderers,i=e.treeInformation,o=Yt(),s=x.useRef(),c=ua();yRe(),pRe(s.current,function(){o.setActiveTree(t)},function(){o.setActiveTree(function(h){return h===t?void 0:h})});var d=o.items[n].children,f=x.createElement(x.Fragment,null,x.createElement(_Re,null),x.createElement(k8,{depth:0,parentId:n},d??[]),x.createElement(mRe,{treeId:t}),x.createElement(xRe,{containerRef:s.current})),p=QC({onDragOver:function(h){h.preventDefault(),c.onDragOverTreeHandler(h,t,s)},onDragLeave:function(h){c.onDragLeaveContainerHandler(h,s)},onMouseDown:function(){return c.abortProgrammaticDrag()},ref:s,style:{position:"relative"},role:"tree","aria-label":i.treeLabelledBy?void 0:i.treeLabel,"aria-labelledby":i.treeLabelledBy},{"data-rct-tree":t});return r.renderTreeContainer({children:f,info:i,containerProps:p})},ERe=function(e,t,n){var r,i=Yt(),o=ua(),s=(r=i.viewState[e.treeId])===null||r===void 0?void 0:r.selectedItems;return x.useMemo(function(){var c,d;return{isFocused:i.activeTreeId===e.treeId,isRenaming:!!t,areItemsSelected:((c=s?.length)!==null&&c!==void 0?c:0)>0,isSearching:n!==null,search:n,isProgrammaticallyDragging:(d=o.isProgrammaticallyDragging)!==null&&d!==void 0?d:!1,treeId:e.treeId,rootItem:e.rootItem,treeLabel:e.treeLabel,treeLabelledBy:e.treeLabelledBy}},[i.activeTreeId,e.treeId,e.rootItem,e.treeLabel,e.treeLabelledBy,t,s?.length,n,o.isProgrammaticallyDragging])},Mm=function(){return Mm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Mm.apply(this,arguments)},kRe=function(e,t){var n=Yt(),r=qr(),i=ua();x.useImperativeHandle(e,function(){return Mm(Mm(Mm({},t),{treeEnvironmentContext:n,dragAndDropContext:i,treeContext:r}),r.treeInformation)})},RRe=x.createContext(null),jRe=x.forwardRef(function(e,t){Yt();var n=qr();ua();var r=oRe(),i=x.useMemo(function(){return{abortRenamingItem:function(){n.setRenamingItem(null)},abortSearch:function(){n.setSearch(null)},collapseItem:function(o){r.collapseItem(o,n.treeId)},completeRenamingItem:function(){},expandItem:function(o){r.expandItem(o,n.treeId)},focusItem:function(o,s){s===void 0&&(s=!0),r.focusItem(o,n.treeId,s)},focusTree:function(o){o===void 0&&(o=!0),r.focusTree(n.treeId,o)},invokePrimaryAction:function(o){r.invokePrimaryAction(o,n.treeId)},moveFocusDown:function(){r.moveFocusDown(n.treeId)},moveFocusUp:function(){r.moveFocusUp(n.treeId)},renameItem:function(o,s){r.renameItem(o,s,n.treeId)},selectItems:function(o){r.selectItems(o,n.treeId)},setSearch:function(o){n.setSearch(o)},startRenamingItem:function(o){n.setRenamingItem(o)},stopRenamingItem:function(){n.setRenamingItem(null)},toggleItemExpandedState:function(o){r.toggleItemExpandedState(o,n.treeId)},toggleItemSelectStatus:function(o){r.toggleItemSelectStatus(o,n.treeId)},expandAll:function(){r.expandAll(n.treeId)},collapseAll:function(){r.collapseAll(n.treeId)},expandSubsequently:function(o){return r.expandSubsequently(n.treeId,o)}}},[r,n]);return kRe(t,i),x.createElement(RRe.Provider,{value:i},e.children)}),ky=function(){return ky=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ky.apply(this,arguments)},E8=x.createContext(null),qr=function(){return x.useContext(E8)},IRe=x.forwardRef(function(e,t){var n,r=Yt(),i=x.useMemo(function(){return ky(ky({},r),e)},[e,r]),o=x.useState(null),s=o[0],c=o[1],d=x.useState(null),f=d[0],p=d[1],h=r.items[e.rootItem],v=r.viewState[e.treeId];x.useEffect(function(){return r.registerTree({treeId:e.treeId,rootItem:e.rootItem}),function(){return r.unregisterTree(e.treeId)}},[e.treeId,e.rootItem]);var y=ERe(e,f,s),b=x.useMemo(function(){return{treeId:e.treeId,rootItem:e.rootItem,treeLabel:e.treeLabel,treeLabelledBy:e.treeLabelledBy,getItemsLinearly:function(){return XR(e.rootItem,v??{},r.items)},treeInformation:y,search:s,setSearch:c,renamingItem:f,setRenamingItem:p,renderers:i}},[r.items,e.rootItem,e.treeId,e.treeLabel,e.treeLabelledBy,f,i,s,y,v]);return h===void 0?((n=r.onMissingItems)===null||n===void 0||n.call(r,[e.rootItem]),null):x.createElement(E8.Provider,{value:b},x.createElement(jRe,{ref:t},x.createElement(CRe,null)))}),k8=function(e){for(var t=qr(),n=t.renderers,r=t.treeInformation,i=[],o=0,s=e.children;o<s.length;o++){var c=s[o];i.push(X.createElement(ARe,{key:c,itemIndex:c,depth:e.depth}))}if(i.length===0)return null;var d={role:e.depth!==0?"group":void 0};return n.renderItemsContainer({children:i,info:r,containerProps:d,depth:e.depth,parentId:e.parentId})},As=function(){return As=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},As.apply(this,arguments)},pP=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},TRe=function(e){var t,n,r,i,o=qr(),s=o.treeId,c=o.search,d=o.renamingItem,f=o.setRenamingItem,p=Yt(),h=Xke(),v=ua(),y=_8("last-focus"),b=e&&p.getItemTitle(e),S=h8(),C=x.useMemo(function(){var I;return c===null||c.length===0||!e||!b?!1:((I=p.doesSearchMatchItem)!==null&&I!==void 0?I:C8)(c,e,b)},[c,e,b,p.doesSearchMatchItem]),E=e&&((n=(t=p.viewState[s])===null||t===void 0?void 0:t.selectedItems)===null||n===void 0?void 0:n.includes(e.index)),k=e&&((i=(r=p.viewState[s])===null||r===void 0?void 0:r.expandedItems)===null||i===void 0?void 0:i.includes(e.index)),R=e&&d===e.index;return x.useMemo(function(){var I,A,T,N,z,L,K,ee,Z;if(e){var Y=p.viewState[s],B=((A=(I=Y?.selectedItems)===null||I===void 0?void 0:I.map(function(V){return p.items[V]}))!==null&&A!==void 0?A:Y?.focusedItem?[p.items[Y?.focusedItem]]:[]).filter(function(V){return!!V}),W=!!B.find(function(V){return V.index===e.index}),P=B&&((N=(T=p.canDrag)===null||T===void 0?void 0:T.call(p,B))!==null&&N!==void 0?N:!0)&&B.map(function(V){var ie;return(ie=V.canMove)!==null&&ie!==void 0?ie:!0}).reduce(function(V,ie){return V&&ie},!0),G=((L=(z=p.canDrag)===null||z===void 0?void 0:z.call(p,[e]))!==null&&L!==void 0?L:!0)&&((K=e.canMove)!==null&&K!==void 0?K:!0),U=p.canDragAndDrop&&(W&&P||!W&&G),te=p.canDragAndDrop&&!!(!((Z=(ee=v.viableDragPositions)===null||ee===void 0?void 0:ee[s])===null||Z===void 0)&&Z.find(function(V){return V.targetType==="item"&&V.targetItem===e.index})),$={primaryAction:function(){var V;(V=p.onPrimaryAction)===null||V===void 0||V.call(p,p.items[e.index],s)},collapseItem:function(){var V;(V=p.onCollapseItem)===null||V===void 0||V.call(p,e,s)},expandItem:function(){var V;(V=p.onExpandItem)===null||V===void 0||V.call(p,e,s)},toggleExpandedState:function(){var V,ie;k?(V=p.onCollapseItem)===null||V===void 0||V.call(p,e,s):(ie=p.onExpandItem)===null||ie===void 0||ie.call(p,e,s)},selectItem:function(){var V;(V=p.onSelectItems)===null||V===void 0||V.call(p,[e.index],s)},addToSelectedItems:function(){var V,ie;(V=p.onSelectItems)===null||V===void 0||V.call(p,pP(pP([],(ie=Y?.selectedItems)!==null&&ie!==void 0?ie:[],!0),[e.index],!1),s)},unselectItem:function(){var V,ie,_e;(V=p.onSelectItems)===null||V===void 0||V.call(p,(_e=(ie=Y?.selectedItems)===null||ie===void 0?void 0:ie.filter(function(Ie){return Ie!==e.index}))!==null&&_e!==void 0?_e:[],s)},selectUpTo:function(V){y(e,V)},startRenamingItem:function(){f(e.index)},stopRenamingItem:function(){f(null)},focusItem:function(V){var ie;V===void 0&&(V=!0),(ie=p.onFocusItem)===null||ie===void 0||ie.call(p,e,s,V)},startDragging:function(){var V,ie,_e=(V=Y?.selectedItems)!==null&&V!==void 0?V:[];if(_e.includes(e.index)||(_e=[e.index],(ie=p.onSelectItems)===null||ie===void 0||ie.call(p,_e,s)),U){var Ie=S(s,_e.map(function(He){return p.items[He]}));v.onStartDraggingItems(Ie,s)}}},M={isSelected:E,isExpanded:k,isFocused:Y?.focusedItem===e.index,isRenaming:R,isDraggingOver:v.draggingPosition&&v.draggingPosition.targetType==="item"&&v.draggingPosition.targetItem===e.index&&v.draggingPosition.treeId===s,isDraggingOverParent:!1,isSearchMatching:C,canDrag:U,canDropOn:te},F=As(As({},h.createInteractiveElementProps(e,s,$,M,Y)),{"data-rct-item-interactive":!0,"data-rct-item-focus":M.isFocused?"true":"false","data-rct-item-id":e.index}),O=As({},{"data-rct-item-container":"true"}),J={role:"treeitem","aria-selected":M.isSelected,"aria-expanded":e.isFolder?M.isExpanded?"true":"false":void 0},de={onClick:function(){e.isFolder&&$.toggleExpandedState(),$.selectItem()},onFocus:function(){$.focusItem()},onDragOver:function(V){V.preventDefault()},"aria-hidden":!0,tabIndex:-1},pe=Y?Object.entries(Y).reduce(function(V,ie){var _e=ie[0],Ie=ie[1];return V[_e]=Array.isArray(Ie)?Ie.includes(e.index):Ie===e.index,V},{}):{};return As(As(As({},$),M),{interactiveElementProps:F,itemContainerWithChildrenProps:J,itemContainerWithoutChildrenProps:O,arrowProps:de,viewStateFlags:pe})}},[e,p,s,v,E,k,R,C,h,y,f,S])},NRe=function(e){var t=qr(),n=t.renderers,r=t.treeInformation,i=t.setRenamingItem,o=t.treeId,s=Yt(),c=x.useRef(null),d=x.useRef(null),f=s.items[e.itemIndex],p=x.useState(s.getItemTitle(f)),h=p[0],v=p[1],y=Jd(!0),b=function(){var R;(R=s.onAbortRenamingItem)===null||R===void 0||R.call(s,f,r.treeId),i(null),y(function(){s.setActiveTree(o)})},S=function(){var R;(R=s.onRenameItem)===null||R===void 0||R.call(s,f,h,r.treeId),i(null),y(function(){s.setActiveTree(o)})};Sy(function(){var R,I,A,T;s.setActiveTree(o),(!((R=s.autoFocus)!==null&&R!==void 0)||R)&&((I=c.current)===null||I===void 0||I.select(),(T=(A=c.current)===null||A===void 0?void 0:A.focus)===null||T===void 0||T.call(A))},[s,o],[]),Xi("abortRenameItem",function(){b()},!0,!0);var C={value:h,onChange:function(R){v(R.target.value)},onBlur:function(R){(!R.relatedTarget||R.relatedTarget!==d.current)&&b()},"aria-label":"New item name",tabIndex:0},E={onClick:function(R){R.stopPropagation(),S()}},k={onSubmit:function(R){R.preventDefault(),S()}};return n.renderRenameInput({item:f,inputRef:c,submitButtonProps:E,submitButtonRef:d,formProps:k,inputProps:C})},ARe=function(e){var t,n,r,i,o=x.useState(!1),s=o[0],c=o[1],d=qr(),f=d.renderers,p=d.treeInformation,h=d.renamingItem,v=Yt(),y=th(),b=v.items[e.itemIndex],S=x.useMemo(function(){var T;return(T=y.expandedItems)===null||T===void 0?void 0:T.includes(e.itemIndex)},[e.itemIndex,y.expandedItems]),C=TRe(b);if(b===void 0||C===void 0)return s||(c(!0),(t=v.onMissingItems)===null||t===void 0||t.call(v,[e.itemIndex])),null;var E=(r=(n=v.shouldRenderChildren)===null||n===void 0?void 0:n.call(v,b,C))!==null&&r!==void 0?r:b.isFolder&&S,k=b.children&&E&&X.createElement(k8,{depth:e.depth+1,parentId:e.itemIndex},b.children),R=v.getItemTitle(b),I=h===e.itemIndex?X.createElement(NRe,{itemIndex:e.itemIndex}):f.renderItemTitle({info:p,context:C,title:R,item:b}),A=f.renderItemArrow({info:p,context:C,item:v.items[e.itemIndex]});return(i=f.renderItem({item:v.items[e.itemIndex],depth:e.depth,title:I,arrow:A,context:C,info:p,children:k}))!==null&&i!==void 0?i:null};function ORe(e){const t={},n=[],r=[],i=[];for(const o of e)zr(o)?o.package?r.push(o.path):n.push(o.path):i.push(o.path),R8(t,o);return t[KS]={index:KS,isFolder:!0,children:[ko,Al,...n,...i],data:void 0,canMove:!1,canRename:!1},t[Al]={index:Al,isFolder:!0,children:r,data:{name:"Imported Applications",path:Al,package:Al,project:"",entries:[]},canMove:!1,canRename:!1},t[ko]={index:ko,isFolder:!1,data:{name:"New Application",path:ko,project:""},canMove:!1,canRename:!1},{items:t,rootId:KS}}function R8(e,t){const n=t.path;if(zr(t)){const r=t,i=[],o=[];for(const s of r.entries)zr(s)?i.push(s.path):o.push(s.path);e[n]={index:n,isFolder:!0,children:[...i,...o],data:t,canMove:!1,canRename:!1};for(const s of r.entries)R8(e,s)}else e[n]={index:n,isFolder:!1,data:t,canMove:!t.package,canRename:!t.package}}function $Re(e){const t=e.data;return t&&"name"in t?t.name:"root"}const Cn="w-6 ";function DRe({opened:e,pkg:t}){return t?e?u.jsx("i",{className:Cn+"fas fa-box-open text-orange-600"}):u.jsx("i",{className:Cn+"fas fa-box text-orange-600"}):e?u.jsx("i",{className:Cn+"fas fa-folder-open text-orange-400"}):u.jsx("i",{className:Cn+"fas fa-folder text-orange-400"})}function PRe({extension:e}){switch(e){case"js":return u.jsx("i",{className:Cn+"filetype-js fab fa-js text-yellow"});case"jsx":return u.jsx("i",{className:Cn+"filetype-jsx fab fa-js text-yellow"});case"cjs":return u.jsx("i",{className:Cn+"filetype-cjs fab fa-js text-yellow"});case"yaml":return u.jsx("i",{className:Cn+"filetype-yaml fas fa-file"});case"css":return u.jsx("i",{className:Cn+"filetype-css fas fa-file text-blue"});case"html":return u.jsx("i",{className:Cn+"filetype-unknown far fa-file-alt"});case"json":return u.jsx("i",{className:Cn+"filetype-json fas fa-cog"});case"ts":return u.jsx("i",{className:Cn+"filetype-ts fas fa-file text-blue"});case"tsx":return u.jsx("i",{className:Cn+"filetype-tsx fas fa-file text-blue"});case"png":return u.jsx("i",{className:Cn+"filetype-png fas fa-image"});case"jpg":return u.jsx("i",{className:Cn+"filetype-jpg fas fa-image"});case"jpeg":return u.jsx("i",{className:Cn+"filetype-jpeg fas fa-image"});case"gif":return u.jsx("i",{className:Cn+"filetype-gif fas fa-image"});case"svg":return u.jsx("i",{className:Cn+"filetype-svg fas fa-file-svg"});case"vue":return u.jsx("i",{className:Cn+"filetype-vue fab fa-vuejs text-green"});default:return u.jsx("i",{className:Cn+"filetype-unknown far fa-file-alt"})}}function MRe(){return u.jsx("i",{className:Cn+"fas fa-lock text-gray-400 ml-2"})}function zRe(){return u.jsx("i",{className:Cn+"fas fa-plus text-green"})}function LRe({title:e,item:t,context:n}){const{content:r}=lx(t.data?.path);return u.jsxs(u.Fragment,{children:[t.data?.path===ko?u.jsx(zRe,{}):zr(t.data)?u.jsx(DRe,{opened:n.isExpanded,pkg:!!t.data?.package||t.data.path===Al}):u.jsx(PRe,{extension:r8(e)}),u.jsxs("span",{className:"text-nowrap",children:[e,r?"*":""]}),t.data?.package&&u.jsx(MRe,{})]})}function URe(){const{rootEntries:e,openedEntry:t,setOpenedEntry:n,focusedItem:r,setFocusedItem:i,expandedItems:o,setExpandedItems:s,selectedItems:c,setSelectedItems:d}=zi(),{items:f,rootId:p}=x.useMemo(()=>ORe(e),[e]);x.useEffect(function(){if(t?.path!==r&&r){const C=f[r]?.data;C&&n(C)}},[r,f,t?.path,n]);const h=c8(),v=x.useCallback((b,S)=>{switch(S.targetType){case"item":if(f[S.targetItem]?.data?.package)Ee.error("Read-Only Imported Application",{description:'To make changes to an application, please click the "Redeploy" button and update the reference.'});else return h(b.map(C=>({from:C.index,to:WR(S.targetItem,Gke(C.index))})));break;default:Ee.error(`${S.targetType} drop not yet supported`);break}},[f,h]),y=x.useCallback((b,S)=>{if(b.data)return h([{from:b.data.path,to:u8(b.data.path,S)}])},[h]);return u.jsx("div",{className:"h-full overflow-auto pr-1.5",children:u.jsx(fRe,{canDragAndDrop:!0,canDropOnFolder:!0,canDropOnNonFolder:!1,canReorderItems:!1,canSearch:!0,getItemTitle:$Re,items:f,onDrop:v,onRenameItem:y,renderItemTitle:LRe,viewState:{applicationsTree:{focusedItem:r,expandedItems:o,selectedItems:c}},onFocusItem:b=>i(b.index),onExpandItem:b=>s([...o,b.index]),onCollapseItem:b=>s(o.filter(S=>S!==b.index)),onSelectItems:b=>d(b),children:u.jsx(IRe,{treeId:"applicationsTree",rootItem:p,treeLabel:"Applications file tree"})})})}function FRe(e,t,n){const r=t,i=t.replace(":9925","");return r&&(e=e.replaceAll("http://localhost:9926",i)),n.project&&(e=e.replaceAll("Your New Harper Fabric App",n.project)),e}function VRe({entityId:e,instanceClient:t}){return{queryKey:[e,"get_components"],queryFn:async()=>{const{data:n}=await t.post("/",{operation:"get_components"});return n},retry:!1}}function j8(e,t,n,r=[]){const i=[];for(const o of e){const s=n(o,r);i.push(s);const c=o,d=c[t];d&&(s[t]=j8(d,t,n,[...r,c]))}return i}function BRe({children:e}){const t=bn(),[n,r]=x.useState(void 0),[i,o]=x.useState(void 0),{setContent:s}=lx(n?.path),c=xn(),d=kr(),{open:f}=Er({strict:!1}),p=x.useCallback(async()=>d.fetchQuery({queryKey:[c.entityId,"get_components"],networkMode:"online"}),[d,c]),{data:h}=fo(VRe(c)),v=x.useMemo(()=>h?j8(h.entries,"entries",(P,G)=>{const U=zr(P)&&P.entries.find(te=>te.name.toLowerCase()==="readme.md");return{name:P.name,path:[...G.map(te=>te.name),P.name].join("/"),project:(G[0]||P)?.name,package:(G[0]||P)?.package,overviewEntry:U&&!zr(U)&&{name:U.name,path:[...G.map(te=>te.name),P.name,U.name].join("/"),project:(G[0]||P)?.name,package:(G[0]||P)?.package}||void 0}}):[],[h]),y=v.filter(P=>!P.package&&P.path!==ko).map(P=>P.name);let b=y[0],S=y.slice(0,1);b||(b=ko,S=[ko]);const[C,E]=Yu(`FileFocused/${c.entityId}`,b),[k,R]=Yu(`FolderOpened/${c.entityId}`,y),[I,A]=Yu(`FileSelected/${c.entityId}`,S);x.useEffect(()=>{if(f?.length){const P=f.split("/");R(G=>{const U=new Set(G);for(let te=1;te<P.length;te++)U.add(P.slice(0,te).join("/"));return[...U]}),A([f]),E(f),t({search:void 0})}},[t,f,R,E,A]);const T=n&&(zr(n)?n.overviewEntry?.path:n.path)||"",N=n&&(zr(n)?n.overviewEntry?.project:n.project)||"",z=n&&(zr(n)?!!n.overviewEntry?.path:!1)||!1,L=l8({file:T?.split("/").slice(1).join("/"),project:N,...c}),{data:K}=Ut(Vke({file:T?.split("/").slice(1).join("/"),project:N,...c}));x.useEffect(function(){const G=K?.project+"/"+K?.file;let U=K?.message;if(G===T&&U!==void 0){const te=c.instanceClient.defaults.baseURL;z&&te&&K&&(U=FRe(U,te,K)),o(U)}else o(void 0)},[K,T,z,c]);const{mutate:ee,isPending:Z}=o8(),Y=x.useCallback((P,G)=>{ee(P,{onSuccess:()=>{n?.path===G&&P.payload!==void 0&&(s(void 0),o(P.payload||void 0),d.setQueryData(L,{...K,message:P.payload}))},onError:U=>{console.error("Error saving file:",U)}})},[L,K,n?.path,d,ee,s]),B=x.useMemo(()=>n?n.package?.includes("github.com/HarperDB/status-check-fabric")||n.package?.includes("github.com/HarperFast/status-check-fabric")||n.path===Al||n.path===ko:!1,[n]),W=x.useMemo(()=>({rootEntries:v,reloadRootEntries:p,focusedItem:C,setFocusedItem:E,expandedItems:k,setExpandedItems:R,selectedItems:I,setSelectedItems:A,restrictPackageModification:B,openedEntry:n,setOpenedEntry:r,openedEntryContents:i,setOpenedEntryContents:o,saveFile:Y,isSavingFile:Z}),[v,p,C,E,k,R,I,A,B,n,r,i,o,Y,Z]);return u.jsx(KB.Provider,{value:W,children:e})}function HRe(){const{toggle:e,toggled:t}=qke("ApplicationsSidebarOpened",!0);return u.jsxs(BRe,{children:[u.jsx("aside",{id:"file-explorer-sidebar",className:Ba("pt-[calc(theme(spacing.32))] w-56 fixed top-0 left-0 bottom-0 z-30","bg-black-dark shadow shadow-black","transition-transform -translate-x-full",t?"translate-x-0":"md:translate-x-0"),"aria-label":"Sidebar",children:u.jsx(URe,{})}),u.jsxs("div",{className:Ba("overflow-y-auto overflow-x-hidden fixed bottom-0 right-0 left-0 md:left-56 transition-[left] h-[calc(100vh-theme(spacing.32))]",t&&"sm:left-56"),children:[u.jsx(Mke,{}),u.jsx(_Se,{toggledSidebar:t,toggleSidebar:e})]}),u.jsx(zke,{}),u.jsx(Uke,{}),u.jsx(Fke,{}),u.jsx(Hke,{})]})}function qRe(e){return[it({getParentRoute:()=>e,path:"/",component:HRe})]}const Qu="flex items-center p-2 rounded-lg group",Ju={className:"text-white hover:bg-gray-700"},ed={className:"text-black bg-white pointer-events-none cursor-default"};function GRe(){return u.jsxs("div",{className:"md:grid gap-4 md:grid-cols-12 min-h-[calc(100vh-theme(spacing.36))]",children:[u.jsxs("section",{className:"col-span-1 text-white md:col-span-4 lg:col-span-3 md:border-r-1 border-b md:border-b-0 md:pr-4 border-gray-700",children:[u.jsx(KRe,{}),u.jsx(ZRe,{})]}),u.jsx("section",{className:"col-span-1 text-white md:col-span-8 lg:col-span-9 md:pt-4",children:u.jsx(x.Suspense,{fallback:u.jsx(go,{className:"flex flex-col items-center justify-center h-full",text:"Loading..."}),children:u.jsx(el,{})})})]})}function KRe(){const e=tt({strict:!1});return u.jsxs("div",{className:"hidden md:block pl-4 pt-4",children:[u.jsxs(We,{to:vr(e,"config"),className:Qu,activeOptions:{exact:!0},inactiveProps:Ju,activeProps:ed,children:[u.jsx(e2,{className:"inline-block"})," ",u.jsx("span",{className:"ms-3",children:"Overview"})]}),u.jsxs("ul",{className:"border-t border-gray-700 pt-4 mt-4 space-y-2",children:[u.jsx("li",{children:u.jsxs(We,{to:vr(e,"config/users"),className:Qu,inactiveProps:Ju,activeProps:ed,children:[u.jsx(m2,{className:"inline-block"})," ",u.jsx("span",{className:"ms-3",children:"Users"})]})}),u.jsx("li",{children:u.jsxs(We,{to:vr(e,"config/roles"),className:Qu,inactiveProps:Ju,activeProps:ed,children:[u.jsx(a2,{className:"inline-block"})," ",u.jsx("span",{className:"ms-3",children:"Roles"})]})})]})]})}function ZRe(){const e=tt({strict:!1});return u.jsxs("ul",{className:"flex space-x-4 md:hidden py-2 px-4",children:[u.jsx("li",{children:u.jsxs(We,{to:vr(e,"config"),className:Qu,activeOptions:{exact:!0},inactiveProps:Ju,activeProps:ed,children:[u.jsx(e2,{className:"inline-block"})," ",u.jsx("span",{className:"ms-3",children:"Overview"})]})}),u.jsx("li",{children:u.jsxs(We,{to:vr(e,"config/users"),className:Qu,inactiveProps:Ju,activeProps:ed,children:[u.jsx(m2,{className:"inline-block"})," ",u.jsx("span",{className:"ms-3",children:"Users"})]})}),u.jsx("li",{children:u.jsxs(We,{to:vr(e,"config/roles"),className:Qu,inactiveProps:Ju,activeProps:ed,children:[u.jsx(a2,{className:"inline-block"})," ",u.jsx("span",{className:"ms-3",children:"Roles"})]})})]})}async function YRe({clusterId:e,instanceId:t}){return null}function WRe(e){return{queryKey:[e.clusterId,e.instanceId],queryFn:()=>YRe(e),retry:!1}}const XRe=({loadingRegistration:e,registrationInfo:t})=>u.jsxs(u.Fragment,{children:[u.jsx("dt",{className:"font-bold text-sm/6",children:"Harper Version"}),u.jsx("dd",{className:"text-sm/6 sm:mt-2",children:e?u.jsx(Cr,{className:"w-10"}):t?.version||"Unknown"})]});function QRe({entityId:e,instanceClient:t}){return{queryKey:[e,"get_configuration"],queryFn:async()=>{const{data:n}=await t.post("/",{operation:"get_configuration"});return n}}}function QR({entityId:e,instanceClient:t}){return{queryKey:[e,"registration_info"],staleTime:6e4,queryFn:async()=>{const{data:n}=await t.post("/",{operation:"registration_info"});return n}}}function JRe({entityId:e,instanceClient:t}){return{queryKey:[e,"get_usage_licenses"],enabled:!Fu,queryFn:async()=>{try{const{data:n}=await t.post("/",{operation:"get_usage_licenses"});return n}catch(n){return console.error(n),null}}}}const eje=({children:e})=>u.jsx(u.Fragment,{children:e});function tje(){const{clusterId:e,instanceId:t}=tt({strict:!1}),{instance:n}=Uy({strict:!1}),r="Instance",i=xn(),{data:o,isLoading:s}=Ut(WRe({clusterId:e,instanceId:t})),{data:c}=Ut(JRe(i));o?.cluster,o?.instance;const{data:d,isLoading:f}=Ut(QR(i)),{data:p,isLoading:h}=Ut(QRe(i));return x.useMemo(()=>{if(e&&!t)return[];if(c&&n?.licenses){const v=Yd(c,"id");return n.licenses.filter(y=>!v[y.id])}return[]},[e,t,c,n]),u.jsxs("div",{className:"h-full flex flex-col",children:[u.jsx(eje,{children:u.jsxs("dl",{className:"grid grid-cols-1 sm:grid-cols-3",children:[u.jsx("div",{className:"px-4 pb-4 sm:col-span-2 sm:px-0",children:u.jsx(XRe,{loadingRegistration:f,registrationInfo:d})}),u.jsx("div",{className:"px-4 pb-4 text-right sm:col-span-1 sm:px-0",children:u.jsx(GB,{targetNoun:r,instanceClient:i.instanceClient,operation:"restart"})})]})}),u.jsx("h3",{className:"flex-none font-bold text-sm/6",children:"Instance Config (read only)"}),!t&&u.jsx("p",{className:"text-muted-foreground italic text-sm mb-2",children:"You are viewing the config for one instance in your cluster, based on what the load balancer selected for you."}),u.jsx("div",{className:"grow",children:h?u.jsxs(u.Fragment,{children:[u.jsx(Cr,{className:"w-full"}),u.jsx(Cr,{className:"w-full"}),u.jsx(Cr,{className:"w-1/2"})]}):u.jsx(rx,{className:"w-full min-h-full h-96",language:"json",theme:"vs-dark",options:{readOnly:!0,scrollBeyondLastLine:!1},value:JSON.stringify(p,null,4)})})]})}const nv=Yb(),nje=[{header:"Role",accessorKey:"role",enableSorting:!1},nv.display({header:"Created",enableSorting:!1,id:"__createdtime__",cell:e=>Zl((Date.now()-e.row.original.__createdtime__)/1e3,e.row.original.__createdtime__)}),nv.display({header:"Updated",id:"__updatedtime__",enableSorting:!1,cell:e=>Zl((Date.now()-e.row.original.__updatedtime__)/1e3,e.row.original.__updatedtime__)}),nv.display({header:"Super User",id:"super_user",enableSorting:!1,cell:e=>e.row.original.permission.super_user?"Yes":"No"}),nv.display({header:"Structure User",id:"structure_user",enableSorting:!1,cell:e=>e.row.original.permission.structure_user?"Yes":"No"})];async function rje(e){const{role:t,super_user:n,structure_user:r,instanceClient:i}=e,{data:o}=await i.post("/",{operation:"add_role",role:t,permission:{super_user:n,structure_user:r}});return o}function ije(){return vt({mutationFn:rje})}const oje=En({role:wt().nonempty({error:"Please enter a role."}).regex(/^[a-zA-Z_]*$/,{error:"Role must contain only letters and underscores."}).max(30,{error:"Role cannot be longer than 30 characters."}),super_user:Vm(),structure_user:Vm()});function aje({isModalOpen:e,onChangesSaved:t,setIsModalOpen:n}){const r=pn({resolver:wn(oje),defaultValues:{role:"",super_user:!1,structure_user:!1}}),i=xn(),{mutate:o,isPending:s}=ije(),c=x.useCallback(async f=>{f&&o({role:f.role,super_user:f.super_user,structure_user:f.structure_user,...i},{onSuccess:()=>{r.reset(),t(f.role),Ee.success("Role added successfully!"),n(!1)}})},[o,r,i,t,n]),d=x.useCallback(()=>{r.reset(),n(!1)},[r,n]);return u.jsx(cr,{onOpenChange:n,open:e,children:u.jsx(ur,{"aria-describedby":void 0,children:u.jsx(hn,{...r,children:u.jsxs("form",{onSubmit:r.handleSubmit(c),className:"grid gap-4 my-4 md:grid-cols-2",children:[u.jsxs(Br,{className:"md:col-span-2",children:[u.jsx(tr,{children:"Add New Role"}),u.jsx(mi,{children:"After adding the role, you will be able to edit the per-table permissions."})]}),u.jsx(Pe,{control:r.control,name:"role",render:({field:f})=>u.jsxs(Oe,{className:"md:col-span-2",children:[u.jsx($e,{className:"pb-1",children:"Name"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",...f})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:r.control,name:"super_user",render:({field:f})=>u.jsxs(Oe,{className:"flex",children:[u.jsx(Me,{children:u.jsx(Ge,{type:"checkbox",className:"w-6",checked:f.value,onChange:p=>f.onChange(p.target.checked)})}),u.jsx($e,{className:"pl-4 pr-8 flex-1 py-2.5",children:"Super User"}),u.jsx(De,{})]})}),u.jsx(Pe,{control:r.control,name:"structure_user",render:({field:f})=>u.jsxs(Oe,{className:"flex",children:[u.jsx(Me,{children:u.jsx(Ge,{type:"checkbox",className:"w-6",checked:f.value,onChange:p=>f.onChange(p.target.checked)})}),u.jsx($e,{className:"pl-4 pr-8 flex-1 py-2.5",children:"Structure User"}),u.jsx(De,{})]})}),u.jsx(er,{className:"md:col-span-2",children:u.jsxs("div",{className:"flex justify-between w-full",children:[u.jsx(Ce,{variant:"destructiveOutline",type:"button",className:"rounded-full",onClick:d,disabled:s,children:"Cancel"}),u.jsxs(Ce,{type:"submit",variant:"submit",className:"rounded-full",disabled:s,children:[u.jsx(aa,{})," Add Role"]})]})})]})})})})}function JR({entityId:e,instanceClient:t}){return{queryKey:[e,"list_roles"],queryFn:()=>sje({instanceClient:t}),refetchInterval:1e4}}async function sje({instanceClient:e}){const{data:t}=await e.post("/",{operation:"list_roles"});return t}function lje({instanceDatabaseMap:e,currentRolePermissions:t,version:n,showAttributes:r}){const i={...t};if(t.super_user||t.structure_user||t.cluster_user)return t;const[o,s,c]=n.split(".").map(f=>parseInt(f,10)),d=n!=="2.0.000"&&o<=2&&s<=1&&c<=2;for(const f in e){i[f]={tables:{}};for(const p in e[f]){const v=e[f][p].attributes.map(y=>y.attribute).sort();if(d){const y=t&&t[f]&&t[f].tables[p];i[f].tables[p]=cje(y,v,r)}else{const y=t&&t[f]&&t[f].tables[p];i[f].tables[p]=uje(y,v,r)}}}return i}function cje(e,t,n){const r=e&&Yd(e.attribute_restrictions,"attribute_name");return{read:e?e.read:!0,insert:e?e.insert:!0,update:e?e.update:!0,delete:e?e.delete:!0,attribute_restrictions:t.filter(()=>n).map(i=>{const o=r?.[i];return{attribute_name:i,read:o?o.read:e?e.read:!0,insert:o?o.insert:e?e.insert:!0,update:o?o.update:e?e.update:!0,delete:o?o.delete:e?e.delete:!0}})}}function uje(e,t,n){const r=e&&Yd(e.attribute_permissions||[],"attribute_name");return{read:e?e.read:!1,insert:e?e.insert:!1,update:e?e.update:!1,delete:e?e.delete:!1,attribute_permissions:n?t.map(i=>{const o=r?.[i];return{attribute_name:i,read:o?o.read:e?.attribute_permissions?.length?!1:e?.read||!1,insert:o?o.insert:e?.attribute_permissions?.length?!1:e?.insert||!1,update:o?o.update:e?.attribute_permissions?.length?!1:e?.update||!1}}):null}}async function dje({id:e,permission:t,instanceClient:n}){const{data:r}=await n.post("/",{operation:"alter_role",id:e,permission:t});return r}function fje(){return vt({mutationFn:dje})}async function mje({id:e,instanceClient:t}){const{data:n}=await t.post("/",{operation:"drop_role",id:e});return n}function pje(){return vt({mutationFn:mje})}function I8({entityId:e,instanceClient:t}){return{queryKey:[e,"describe_all"],queryFn:async({signal:n})=>{const{data:r}=await t.post("/",{operation:"describe_all"},{signal:n});return r},staleTime:60*1e3,retry:!1}}function hje({data:e,instanceId:t,clusterId:n,isModalOpen:r,closeModal:i,onSelectRole:o,onChangesSaved:s}){const{role:c,permission:d}=e,[f,p]=x.useState(JSON.stringify(d,null,2)),h=xn(),[v,y]=x.useState(!0),{data:b}=Ut(I8(h)),{data:S}=Ut(QR(h)),E=Xa().user?.role?.role===e.role,[k,R]=kB(f?.includes("attribute_name")),{mutate:I,isPending:A}=fje(),{mutate:T}=pje(),N=x.useCallback(Y=>{y(Y.length===0)},[y]),z=x.useMemo(()=>JSON.stringify(b&&S&&lje({instanceDatabaseMap:b,currentRolePermissions:f&&CR(f)||d,version:S.version,showAttributes:k}),null,2),[d,b,S,k,f]);x.useEffect(()=>{p(z)},[z]);const L=x.useCallback(Y=>{if(Y){const B=JSON.parse(Y);if(B.super_user||B.structure_user||B.cluster_user)for(const W in B)(W!=="super_user"&&W!=="structure_user"&&W!=="cluster_user"||B[W]===!1)&&delete B[W];I({id:e.id,permission:B,...h},{onSuccess:()=>{Ee.success("Role updated successfully!"),o(void 0),s()}})}},[I,e.id,h,s,o]),K=x.useCallback(()=>{T({id:e.id,...h},{onSuccess:()=>{Ee.success("Role deleted successfully!"),o(void 0),s()}})},[e.id,T,h,s,o]),ee=x.useCallback(()=>{f&&v&&L(f)},[f,L,v]),Z=x.useCallback(()=>{K()},[K]);return u.jsx(cr,{onOpenChange:i,open:r,children:u.jsxs(ur,{className:"sm:max-w-[750px]",children:[u.jsxs(tr,{children:[E?"View":"Edit",' Role "',c,'"']}),u.jsx(mi,{children:E?"You can view your own role, but you cannot edit it. Please assign yourself a different role to edit this role.":"Edit the role's permissions in JSON format or remove the role entirely."}),z?u.jsx(Xp,{theme:"vs-dark",height:"400px",defaultLanguage:"json",value:f,options:E?{readOnly:!0}:void 0,onValidate:N,onChange:p,defaultValue:z}):u.jsx(Cr,{}),u.jsx(er,{children:!E&&u.jsxs("div",{className:"flex justify-between w-full",children:[u.jsx(Ce,{type:"button",variant:"destructiveOutline",className:"rounded-full",onClick:Z,disabled:A,children:"Delete Role"}),u.jsx("div",{className:"grow"}),u.jsxs(Xy,{className:"flex",children:[u.jsx(Ge,{type:"checkbox",className:"w-6",checked:k,onChange:R}),u.jsx("span",{className:"pl-4 pr-8 flex-1 py-2.5",children:"Pick Attributes"})]}),u.jsx(Ce,{variant:"submit",className:"rounded-full",onClick:ee,disabled:A||!v,children:"Save Changes"})]})})]})})}function hP(){const e=bn(),{clusterId:t,instanceId:n,roleId:r}=tt({strict:!1}),i=xn(),{data:o,refetch:s,isFetching:c,isRefetching:d}=fo(JR(i)),f=x.useMemo(()=>o?.find(R=>R.id===r),[o,r]),p=x.useCallback(R=>{const I=[r?"..":"",R].filter(Boolean);e({to:I.join("/")})},[r,e]),h=!!r&&!!f,[v,y]=x.useState(!1),b=x.useCallback(()=>{y(!0)},[y]),S=x.useCallback(R=>{s(),y(!1),p(R)},[p,s]),C=x.useCallback(R=>{p(R.original.role)},[p]),E=x.useCallback(()=>{p(void 0)},[p]),k=Ic(s);return u.jsxs(x.Suspense,{fallback:u.jsx(go,{className:"flex flex-col items-center justify-center h-full",text:"Loading..."}),children:[u.jsxs(Yp,{columns:nje,data:o,isFetching:c,onRowClick:C,children:[u.jsxs(Ce,{variant:"defaultOutline",onClick:k,accessKey:"r",disabled:c||d,children:[u.jsx(Ha,{}),u.jsxs("span",{className:"hidden lg:inline-block",children:[u.jsx("u",{children:"R"}),"efresh"]})]}),u.jsxs(Ce,{variant:"positiveOutline",onClick:b,accessKey:"a",disabled:v,children:[u.jsx(Mo,{}),u.jsxs("span",{children:[u.jsx("u",{children:"A"}),"dd"]})]})]}),u.jsx(aje,{isModalOpen:v,onChangesSaved:S,setIsModalOpen:y}),h&&u.jsx(hje,{instanceId:n,clusterId:t,isModalOpen:h,closeModal:E,data:f,onSelectRole:p,onChangesSaved:()=>s()})]})}const gP=Yb(),gje=[{header:"Username",accessorKey:"username",enableSorting:!1},gP.display({header:"Role",enableSorting:!1,id:"role",cell:e=>e.row.original.role.role}),{header:"Active",accessorKey:"active",enableSorting:!1},gP.display({header:"Created",enableSorting:!1,id:"__createdtime__",cell:e=>Zl((Date.now()-e.row.original.__createdtime__)/1e3,e.row.original.__createdtime__)}),{header:"Updated",accessorKey:"__updatedtime__",enableSorting:!1,cell:e=>Zl((Date.now()-e.row.original.__updatedtime__)/1e3,e.row.original.__updatedtime__)}];function vje({isModalOpen:e,onChangesSaved:t,setIsModalOpen:n}){const r=xn(),{data:i}=fo(JR(r)),o=pn({resolver:wn(Uu),defaultValues:{username:"",role:"",password:"",confirmPassword:""}}),{mutate:s,isPending:c}=Mwe(),d=x.useCallback(async f=>{f&&s({active:!0,password:f.password,role:f.role,username:f.username,...r},{onSuccess:()=>{const p=f.role;o.reset(),o.setValue("role",p),t(),Ee.success("User added successfully!"),n(!1)}})},[s,o,r,t,n]);return u.jsx(cr,{onOpenChange:n,open:e,children:u.jsx(ur,{"aria-describedby":void 0,children:u.jsx(hn,{...o,children:u.jsxs("form",{onSubmit:o.handleSubmit(d),className:"grid gap-4 my-4",children:[u.jsx(Br,{children:u.jsx(tr,{children:"Add New User"})}),u.jsx(Pe,{control:o.control,name:"username",render:({field:f})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Username"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",enterKeyHint:"next",autoComplete:"username",...f})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:o.control,name:"password",render:({field:f})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Password"}),u.jsx(Me,{children:u.jsx(Ge,{type:"password",enterKeyHint:"next",autoComplete:"new-password",...f})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:o.control,name:"confirmPassword",render:({field:f})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Confirm Password"}),u.jsx(Me,{children:u.jsx(Ge,{type:"password",enterKeyHint:"next",autoComplete:"new-password",...f})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:o.control,name:"role",render:({field:f})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Role"}),u.jsx(x.Suspense,{fallback:u.jsx(Cr,{}),children:u.jsx(Me,{children:u.jsxs(so,{...f,onValueChange:p=>f.onChange(p),children:[u.jsx(co,{className:"w-full",children:u.jsx(lo,{placeholder:"Choose Role"})}),u.jsx(uo,{children:u.jsxs(Do,{children:[u.jsx(_R,{children:"Role"}),i?.map(p=>u.jsx(vn,{value:p.id,children:p.role},p.id))]})})]})})}),u.jsx(De,{})]})}),u.jsx(er,{children:u.jsx("div",{className:"flex justify-between w-full",children:u.jsxs(Ce,{type:"submit",variant:"submit",className:"rounded-full",disabled:c,children:[u.jsx(aa,{})," Add User"]})})})]})})})})}const yje=En({username:Uu.shape.username,role:Uu.shape.role,newPassword:Uu.shape.password.or(Zv()).optional(),confirmPassword:Uu.shape.confirmPassword}).refine(e=>!e.newPassword||e.newPassword.length>=8,{error:"Password must be at least 8 characters long.",path:["password"]}).refine(e=>!e.newPassword||e.newPassword===e.confirmPassword,{error:"Passwords do not match.",path:["confirmPassword"]});function bje({data:e,onUserUpdated:t}){const n=xn(),{data:r}=fo(JR(n)),{mutate:i,isPending:o}=zwe(),s=pn({resolver:wn(yje),defaultValues:{username:e.username,role:e.role.role,newPassword:"",confirmPassword:""}}),c=x.useCallback(d=>{const f={username:e.username,role:d.role,...n};d.newPassword&&(f.password=d.newPassword),i(f,{onSuccess:()=>{s.reset(),Ee.success("User edited successfully!"),t()}})},[s,i,e.username,n,t]);return u.jsx(hn,{...s,children:u.jsxs("form",{onSubmit:s.handleSubmit(c),className:"grid gap-4 my-4",children:[u.jsx(Br,{children:u.jsx(tr,{children:"Edit User"})}),u.jsx(Pe,{control:s.control,name:"username",render:({field:d})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Username"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",enterKeyHint:"next",autoComplete:"username",disabled:!0,readOnly:!0,...d})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:s.control,name:"newPassword",render:({field:d})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Change Password"}),u.jsx(Me,{children:u.jsx(Ge,{type:"password",enterKeyHint:"next",autoComplete:"new-password",...d})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:s.control,name:"confirmPassword",render:({field:d})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Confirm Password"}),u.jsx(Me,{children:u.jsx(Ge,{type:"password",enterKeyHint:"next",autoComplete:"new-password",...d})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:s.control,name:"role",render:({field:d})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Role"}),u.jsx(x.Suspense,{fallback:u.jsx(Cr,{}),children:u.jsx(Me,{children:u.jsxs(so,{...d,onValueChange:f=>d.onChange(f),children:[u.jsx(co,{className:"w-full",children:u.jsx(lo,{placeholder:"Choose Role"})}),u.jsx(uo,{children:u.jsxs(Do,{children:[u.jsx(_R,{children:"Role"}),r?.map(f=>u.jsx(vn,{value:f.id,children:f.role},f.id))]})})]})})}),u.jsx(De,{})]})}),u.jsx(er,{children:u.jsx("div",{className:"flex justify-between w-full",children:u.jsxs(Ce,{variant:"submit",className:"rounded-full",disabled:o,children:[u.jsx(aa,{})," Save Changes"]})})})]})})}const xje=En({username:Ek,confirmUsernameForDeletion:wt().nonempty({error:"Please type the username again to confirm deletion."}).toLowerCase()}).refine(e=>e.username===e.confirmUsernameForDeletion,{error:"Username does not match.",path:["confirmUsernameForDeletion"]});function wje({data:e,onUserDeleted:t}){const{mutate:n,isPending:r}=Lwe(),i=pn({resolver:wn(xje),defaultValues:{username:e.username,confirmUsernameForDeletion:""}}),o=Hy(),s=x.useCallback(()=>{n({username:e.username,...o},{onSuccess:()=>{i.reset(),Ee.success("User deleted successfully!"),t()}})},[e.username,i,n,o,t]);return u.jsx(hn,{...i,children:u.jsxs("form",{onSubmit:i.handleSubmit(s),className:"grid gap-4 my-4",children:[u.jsx(Pe,{control:i.control,name:"confirmUsernameForDeletion",render:({field:c})=>u.jsxs(Oe,{children:[u.jsx($e,{className:"pb-1",children:"Confirm Username"}),u.jsx(Me,{children:u.jsx(Ge,{type:"text",enterKeyHint:"next",autoComplete:"username",...c})}),u.jsx(De,{})]})}),u.jsx(er,{children:u.jsx("div",{className:"flex justify-between w-full",children:u.jsxs(Ce,{variant:"destructive",className:"rounded-full",disabled:r||!i.formState.isValid,children:[u.jsx(Ja,{})," Delete User"]})})})]})})}function Sje({closeModal:e,clusterId:t,instanceId:n,data:r,isModalOpen:i,onUserDeleted:o,onUserUpdated:s}){const f=!(Xa().user?.username===r.username);return u.jsx(cr,{onOpenChange:e,open:i,children:u.jsxs(ur,{className:"sm:max-w-[750px]",children:[u.jsx(bje,{data:r,onUserUpdated:s}),f&&u.jsx(wje,{data:r,onUserDeleted:o})]})})}function _je({entityId:e,instanceClient:t}){return{queryKey:[e,"list_users"],queryFn:()=>Cje({instanceClient:t}),refetchInterval:1e4}}async function Cje({instanceClient:e}){const{data:t}=await e.post("/",{operation:"list_users"});return t}function vP(){const e=bn(),{instanceId:t,clusterId:n,username:r}=tt({strict:!1}),i=xn(),{data:o,refetch:s,isFetching:c,isRefetching:d}=fo(_je(i)),f=x.useMemo(()=>o?.find(N=>N.username===r),[o,r]),p=x.useCallback(N=>{const z=[r?"..":"",N].filter(Boolean);e({to:z.join("/")})},[r,e]),h=!!r&&!!f,[v,y]=x.useState(!1),[b]=x.useState({attribute:"username",descending:!1}),S=x.useMemo(()=>[{desc:b.descending,id:b.attribute}],[b]),C=x.useCallback(()=>{y(!0)},[y]),E=x.useCallback(()=>{s(),y(!1)},[s,y]),k=x.useCallback(N=>{p(N.original.username)},[p]),R=x.useCallback(()=>{p(void 0)},[p]),I=x.useCallback(()=>{s(),p(void 0)},[p,s]),A=x.useCallback(()=>{s(),p(void 0)},[p,s]),T=Ic(s);return u.jsxs(x.Suspense,{fallback:u.jsx(go,{className:"flex flex-col items-center justify-center h-full",text:"Loading..."}),children:[u.jsxs(Yp,{data:o,isFetching:c||d,columns:gje,onRowClick:k,sortingState:S,children:[u.jsxs(Ce,{variant:"defaultOutline",onClick:T,accessKey:"r",disabled:c||d,children:[u.jsx(Ha,{})," ",u.jsxs("span",{className:"hidden lg:inline-block",children:[u.jsx("u",{children:"R"}),"efresh"]})]}),u.jsxs(Ce,{variant:"positiveOutline",onClick:C,accessKey:"a",disabled:v,children:[u.jsx(Mo,{})," ",u.jsxs("span",{children:[u.jsx("u",{children:"A"}),"dd"]})]})]}),u.jsx(vje,{isModalOpen:v,onChangesSaved:E,setIsModalOpen:y}),h&&u.jsx(Sje,{instanceId:t,clusterId:n,closeModal:R,data:f,isModalOpen:h,onUserDeleted:A,onUserUpdated:I})]})}function Eje(e){const t=it({getParentRoute:()=>e,path:"config",component:GRe}),n=it({getParentRoute:()=>t,path:"/",component:tje}),r=it({getParentRoute:()=>t,path:"roles",component:hP}),i=it({getParentRoute:()=>t,path:"roles/$roleId",component:hP}),o=it({getParentRoute:()=>t,path:"users",component:vP}),s=it({getParentRoute:()=>t,path:"users/$username",component:vP});return t.addChildren([n,r,i,o,s])}function JC({clusterId:e,databaseName:t,instanceId:n,organizationId:r,tableName:i}){const o=["databases",t,i].filter(sa).join("/");return vr({organizationId:r,instanceId:n,clusterId:e},o)}function kje(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var ej="ScrollArea",[T8]=Di(ej),[Rje,vo]=T8(ej),N8=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...s}=e,[c,d]=x.useState(null),[f,p]=x.useState(null),[h,v]=x.useState(null),[y,b]=x.useState(null),[S,C]=x.useState(null),[E,k]=x.useState(0),[R,I]=x.useState(0),[A,T]=x.useState(!1),[N,z]=x.useState(!1),L=ct(t,ee=>d(ee)),K=hc(i);return u.jsx(Rje,{scope:n,type:r,dir:K,scrollHideDelay:o,scrollArea:c,viewport:f,onViewportChange:p,content:h,onContentChange:v,scrollbarX:y,onScrollbarXChange:b,scrollbarXEnabled:A,onScrollbarXEnabledChange:T,scrollbarY:S,onScrollbarYChange:C,scrollbarYEnabled:N,onScrollbarYEnabledChange:z,onCornerWidthChange:k,onCornerHeightChange:I,children:u.jsx(Be.div,{dir:K,...s,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":R+"px",...e.style}})})});N8.displayName=ej;var A8="ScrollAreaViewport",O8=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,s=vo(A8,n),c=x.useRef(null),d=ct(t,c,s.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),u.jsx(Be.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});O8.displayName=A8;var da="ScrollAreaScrollbar",$8=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=vo(da,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,c=e.orientation==="horizontal";return x.useEffect(()=>(c?o(!0):s(!0),()=>{c?o(!1):s(!1)}),[c,o,s]),i.type==="hover"?u.jsx(jje,{...r,ref:t,forceMount:n}):i.type==="scroll"?u.jsx(Ije,{...r,ref:t,forceMount:n}):i.type==="auto"?u.jsx(D8,{...r,ref:t,forceMount:n}):i.type==="always"?u.jsx(tj,{...r,ref:t}):null});$8.displayName=da;var jje=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=vo(da,e.__scopeScrollArea),[o,s]=x.useState(!1);return x.useEffect(()=>{const c=i.scrollArea;let d=0;if(c){const f=()=>{window.clearTimeout(d),s(!0)},p=()=>{d=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return c.addEventListener("pointerenter",f),c.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",f),c.removeEventListener("pointerleave",p)}}},[i.scrollArea,i.scrollHideDelay]),u.jsx(Gn,{present:n||o,children:u.jsx(D8,{"data-state":o?"visible":"hidden",...r,ref:t})})}),Ije=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=vo(da,e.__scopeScrollArea),o=e.orientation==="horizontal",s=vx(()=>d("SCROLL_END"),100),[c,d]=kje("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(c==="idle"){const f=window.setTimeout(()=>d("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[c,i.scrollHideDelay,d]),x.useEffect(()=>{const f=i.viewport,p=o?"scrollLeft":"scrollTop";if(f){let h=f[p];const v=()=>{const y=f[p];h!==y&&(d("SCROLL"),s()),h=y};return f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[i.viewport,o,d,s]),u.jsx(Gn,{present:n||c!=="hidden",children:u.jsx(tj,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Re(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Re(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),D8=x.forwardRef((e,t)=>{const n=vo(da,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,s]=x.useState(!1),c=e.orientation==="horizontal",d=vx(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;s(c?f:p)}},10);return Sd(n.viewport,d),Sd(n.content,d),u.jsx(Gn,{present:r||o,children:u.jsx(tj,{"data-state":o?"visible":"hidden",...i,ref:t})})}),tj=x.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=vo(da,e.__scopeScrollArea),o=x.useRef(null),s=x.useRef(0),[c,d]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=U8(c.viewport,c.content),p={...r,sizes:c,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:v=>o.current=v,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:v=>s.current=v};function h(v,y){return Dje(v,s.current,c,y)}return n==="horizontal"?u.jsx(Tje,{...p,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const v=i.viewport.scrollLeft,y=yP(v,c,i.dir);o.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:v=>{i.viewport&&(i.viewport.scrollLeft=v)},onDragScroll:v=>{i.viewport&&(i.viewport.scrollLeft=h(v,i.dir))}}):n==="vertical"?u.jsx(Nje,{...p,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const v=i.viewport.scrollTop,y=yP(v,c);o.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:v=>{i.viewport&&(i.viewport.scrollTop=v)},onDragScroll:v=>{i.viewport&&(i.viewport.scrollTop=h(v))}}):null}),Tje=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=vo(da,e.__scopeScrollArea),[s,c]=x.useState(),d=x.useRef(null),f=ct(t,d,o.onScrollbarXChange);return x.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),u.jsx(M8,{"data-orientation":"horizontal",...i,ref:f,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":gx(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,h)=>{if(o.viewport){const v=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(v),V8(v,h)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:jy(s.paddingLeft),paddingEnd:jy(s.paddingRight)}})}})}),Nje=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=vo(da,e.__scopeScrollArea),[s,c]=x.useState(),d=x.useRef(null),f=ct(t,d,o.onScrollbarYChange);return x.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),u.jsx(M8,{"data-orientation":"vertical",...i,ref:f,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":gx(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,h)=>{if(o.viewport){const v=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(v),V8(v,h)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:jy(s.paddingTop),paddingEnd:jy(s.paddingBottom)}})}})}),[Aje,P8]=T8(da),M8=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:p,onResize:h,...v}=e,y=vo(da,n),[b,S]=x.useState(null),C=ct(t,L=>S(L)),E=x.useRef(null),k=x.useRef(""),R=y.viewport,I=r.content-r.viewport,A=fn(p),T=fn(d),N=vx(h,10);function z(L){if(E.current){const K=L.clientX-E.current.left,ee=L.clientY-E.current.top;f({x:K,y:ee})}}return x.useEffect(()=>{const L=K=>{const ee=K.target;b?.contains(ee)&&A(K,I)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[R,b,I,A]),x.useEffect(T,[r,T]),Sd(b,N),Sd(y.content,N),u.jsx(Aje,{scope:n,scrollbar:b,hasThumb:i,onThumbChange:fn(o),onThumbPointerUp:fn(s),onThumbPositionChange:T,onThumbPointerDown:fn(c),children:u.jsx(Be.div,{...v,ref:C,style:{position:"absolute",...v.style},onPointerDown:Re(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),E.current=b.getBoundingClientRect(),k.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),z(L))}),onPointerMove:Re(e.onPointerMove,z),onPointerUp:Re(e.onPointerUp,L=>{const K=L.target;K.hasPointerCapture(L.pointerId)&&K.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=k.current,y.viewport&&(y.viewport.style.scrollBehavior=""),E.current=null})})})}),Ry="ScrollAreaThumb",z8=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=P8(Ry,e.__scopeScrollArea);return u.jsx(Gn,{present:n||i.hasThumb,children:u.jsx(Oje,{ref:t,...r})})}),Oje=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=vo(Ry,n),s=P8(Ry,n),{onThumbPositionChange:c}=s,d=ct(t,h=>s.onThumbChange(h)),f=x.useRef(void 0),p=vx(()=>{f.current&&(f.current(),f.current=void 0)},100);return x.useEffect(()=>{const h=o.viewport;if(h){const v=()=>{if(p(),!f.current){const y=Pje(h,c);f.current=y,c()}};return c(),h.addEventListener("scroll",v),()=>h.removeEventListener("scroll",v)}},[o.viewport,p,c]),u.jsx(Be.div,{"data-state":s.hasThumb?"visible":"hidden",...i,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Re(e.onPointerDownCapture,h=>{const y=h.target.getBoundingClientRect(),b=h.clientX-y.left,S=h.clientY-y.top;s.onThumbPointerDown({x:b,y:S})}),onPointerUp:Re(e.onPointerUp,s.onThumbPointerUp)})});z8.displayName=Ry;var nj="ScrollAreaCorner",L8=x.forwardRef((e,t)=>{const n=vo(nj,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?u.jsx($je,{...e,ref:t}):null});L8.displayName=nj;var $je=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=vo(nj,n),[o,s]=x.useState(0),[c,d]=x.useState(0),f=!!(o&&c);return Sd(i.scrollbarX,()=>{const p=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(p),d(p)}),Sd(i.scrollbarY,()=>{const p=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(p),s(p)}),f?u.jsx(Be.div,{...r,ref:t,style:{width:o,height:c,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function jy(e){return e?parseInt(e,10):0}function U8(e,t){const n=e/t;return isNaN(n)?0:n}function gx(e){const t=U8(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Dje(e,t,n,r="ltr"){const i=gx(n),o=i/2,s=t||o,c=i-s,d=n.scrollbar.paddingStart+s,f=n.scrollbar.size-n.scrollbar.paddingEnd-c,p=n.content-n.viewport,h=r==="ltr"?[0,p]:[p*-1,0];return F8([d,f],h)(e)}function yP(e,t,n="ltr"){const r=gx(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,s=t.content-t.viewport,c=o-r,d=n==="ltr"?[0,s]:[s*-1,0],f=wC(e,d);return F8([0,s],[0,c])(f)}function F8(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function V8(e,t){return e>0&&e<t}var Pje=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){const o={left:e.scrollLeft,top:e.scrollTop},s=n.left!==o.left,c=n.top!==o.top;(s||c)&&t(),n=o,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function vx(e,t){const n=fn(e),r=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),x.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Sd(e,t){const n=fn(t);qn(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var Mje=N8,zje=O8,Lje=L8;function Uje({className:e,children:t,...n}){return u.jsxs(Mje,{"data-slot":"scroll-area",className:Le("relative",e),...n,children:[u.jsx(zje,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),u.jsx(Fje,{}),u.jsx(Lje,{})]})}function Fje({className:e,orientation:t="vertical",...n}){return u.jsx($8,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Le("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:u.jsx(z8,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}async function Vje({databaseName:e,tableName:t,primaryKey:n,replicated:r,instanceClient:i}){const{data:o}=await i.post("/",{operation:"create_table",database:e,table:t,primary_key:n,replicated:r});return o}function Bje(){return vt({mutationFn:Vje})}const s_=/^[\x20-\x2E|\x30-\x5F|\x61-\x7E]*$/,rv=En({databaseName:wt().regex(s_,{error:"Database name cannot include backticks or forward slashes."}).max(75,{error:"Database name cannot be longer than 75 characters."}),tableName:wt().nonempty({error:"Table name is required."}).regex(s_,{error:"Table name cannot include backticks or forward slashes."}).max(250,{error:"Table name cannot be longer than 250 characters."}),primaryKey:wt().regex(s_,{error:"Primary key cannot include backticks or forward slashes."}).max(250,{error:"Primary key cannot be longer than 250 characters."})});function Hje({databaseName:e,onSelectTable:t}){const n=kr(),r=xn(),i=mn(),[o,s]=x.useState(!1),c=pn({resolver:wn(rv),defaultValues:{databaseName:e||"",tableName:"",primaryKey:""}}),{mutate:d}=Bje(),f=async p=>{const h=p.databaseName||"data",v=p.tableName;d({databaseName:h,tableName:v,primaryKey:p.primaryKey||"id",...r,replicated:r.entityType==="cluster"},{onSuccess:async()=>{await n.invalidateQueries({queryKey:[r.entityId,"describe_all"],refetchType:"all"}),Ee.success(`Table ${v} created successfully`),s(!1),c.reset(),t(h,v),await i.invalidate()}})};return u.jsxs(cr,{open:o,onOpenChange:s,children:[u.jsx(rV,{asChild:!0,children:u.jsx("div",{className:"sticky bottom-0 py-4 bg-black/70 backdrop-blur-xs",children:u.jsxs(Ce,{variant:"positiveOutline",className:"w-full rounded-full",size:"lg",accessKey:"t",children:[u.jsx(Mo,{}),u.jsxs("span",{children:["Create a ",u.jsx("u",{children:"T"}),"able"]})]})})}),u.jsxs(ur,{className:"sm:max-w-[425px]",children:[u.jsxs(Br,{children:[u.jsx(tr,{children:"Create a New Table"}),u.jsx(mi,{children:"What would you like to create?"})]}),u.jsx(hn,{...c,children:u.jsxs("form",{onSubmit:c.handleSubmit(f),className:"grid gap-6 text-white",children:[u.jsx(Pe,{control:c.control,name:"tableName",render:({field:p})=>u.jsxs(Oe,{className:"",children:[u.jsx($e,{className:"pb-1",children:"Table Name"}),u.jsx(Me,{children:u.jsx(Ge,{...p,type:"text",maxLength:rv.shape.tableName.maxLength,autoFocus:!0,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off"})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:c.control,name:"primaryKey",render:({field:p})=>u.jsxs(Oe,{className:"",children:[u.jsx($e,{className:"pb-1",children:"Primary Key"}),u.jsx(Me,{children:u.jsx(Ge,{...p,placeholder:"id",type:"text",maxLength:rv.shape.primaryKey.maxLength,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off"})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:c.control,name:"databaseName",render:({field:p})=>u.jsxs(Oe,{className:"",children:[u.jsx($e,{className:"pb-1",children:"Database Name"}),u.jsx(Me,{children:u.jsx(Ge,{...p,type:"text",placeholder:"data",maxLength:rv.shape.databaseName.maxLength,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off"})}),u.jsx(De,{})]})}),u.jsx(er,{children:u.jsxs(Ce,{type:"submit",variant:"submit",className:"rounded-full",children:[u.jsx(zX,{}),"Create New Table"]})})]})})]})]})}function qje({instanceDatabaseMap:e}){const t=mn(),n=!e,r=tt({strict:!1}),i=bn(),o=Od(),{databaseNames:s,tableNames:c}=x.useMemo(()=>{const p=Object.keys(e||{}).sort(),h=r.databaseName?Object.keys(e?.[r.databaseName]||[]).sort():[];return{databaseNames:p,tableNames:h}},[e,r.databaseName]),d=x.useCallback(p=>{const h=p?Object.keys(e?.[p]||[]).sort():[];r.databaseName?i({to:JC({...r,databaseName:p,tableName:h[0]})}):t.invalidate()},[e,r,t,i]),f=x.useCallback((p,h)=>{i({to:JC({...r,databaseName:p,tableName:h})})},[i,r]);return u.jsxs("div",{className:"pl-3",children:[u.jsx("h1",{className:"pt-3 pb-3 text-3xl",children:"Databases"}),n?u.jsx(Cr,{className:"w-full h-9 m-0 rounded-md bg-gray-700"}):u.jsx("div",{className:"flex space-x-2",children:u.jsxs(so,{name:"databaseSelect",value:r.databaseName||"",disabled:s.length===0,onValueChange:d,children:[u.jsx(co,{className:"w-full",children:u.jsx(lo,{placeholder:"Select a Database"})}),u.jsx(uo,{children:u.jsx(Do,{children:s.map(p=>u.jsx(vn,{value:p,children:p},p))})})]})}),n?u.jsx(Cr,{className:"w-full min-h-80 rounded-md bg-gray-700 mb-0"}):u.jsxs(Uje,{className:"border rounded-md min-h-80 border-grey-700 mt-4",children:[c.length===0&&r.databaseName?.length?u.jsxs("div",{className:"w-full h-full text-center",children:[u.jsx("p",{className:"py-6",children:"No tables found in this database."}),o&&u.jsx("p",{children:'Tap "Create a Table" below!'})]}):c.length===0&&!r.databaseName?.length?u.jsxs("p",{className:"pt-2 text-sm text-center",children:["Please ",s.length===0?"create":"select"," a table."]}):"",u.jsx("ul",{children:c.map(p=>u.jsx("li",{className:"flex items-center p-2 border-b hover:bg-grey-700/80 border-grey-700",children:u.jsxs(Ce,{onClick:()=>f(r.databaseName,p),size:"lg",className:"items-center justify-between w-full bg-transparent border-none shadow-none hover:bg-transparent",children:[p,u.jsx("span",{children:r.tableName===p&&u.jsx(Co,{})})]})},p))})]}),o&&u.jsx(Hje,{databaseName:r.databaseName,onSelectTable:f})]})}function Gje(e){if(!e)return{dataTableColumns:[],hashAttribute:""};const{hash_attribute:t,attributes:n}=e,r=[],i=[],o=[],s=[];for(let c=n.length-1;c>=0;c--){const{attribute:d,type:f,is_primary_key:p,indexed:h}=n[c],v={header:d,accessorKey:d,enableSorting:!!(p||h),enableColumnFilter:!!(p||h),size:Kje(f)};p?r.push(v):d==="__createdtime__"||d==="__updatedtime__"?s.push(v):v.enableSorting?i.push(v):o.push(v)}return{dataTableColumns:[...r,...i,...o,...s],hashAttribute:t}}function Kje(e){switch(e){case"Id":case"ID":return 1;case"Boolean":return 1;case"Int":case"Long":case"Float":case"BigInt":return 1;case"Date":case"String":default:return Math.round(window.innerWidth*.1)}}function Zje({isAddTableRecordsPending:e,isModalOpen:t,onSaveChanges:n,instanceTable:r,setIsModalOpen:i}){const[o,s]=x.useState(!0),[c,d]=x.useState(),f=x.useCallback(()=>{c&&o&&n(JSON.parse(c))},[c,n,o]),[p,h]=x.useState(!1),v=x.useCallback(b=>{h(!0),s(b.length===0)},[s]),y=x.useMemo(()=>{const b={};for(const S of r.attributes)S.is_primary_key||S.attribute==="__createdtime__"||S.attribute==="__updatedtime__"||(b[S.attribute]=Yje(S.type));return JSON.stringify(b,null,4)},[r]);return u.jsx(cr,{onOpenChange:i,open:t,children:u.jsxs(ur,{"aria-describedby":void 0,onEscapeKeyDown:b=>{p&&b.preventDefault()},children:[u.jsx(Br,{children:u.jsxs(tr,{children:["Add New ",r.name]})}),r?.hash_attribute&&u.jsxs("div",{className:"text-sm text-gray-500",children:["The primary key for this table is ",u.jsxs("strong",{children:["“",r.hash_attribute,"”"]}),", and will auto-generate. You may manually add it if you want to specify its value."]}),u.jsx(rx,{className:"w-full h-96",language:"json",theme:"vs-dark",value:y,onValidate:v,onChange:b=>{d(b)}}),u.jsxs("div",{className:"text-sm text-gray-500",children:[u.jsx("strong",{children:"You may paste in an array"})," if you want to add more than one record at a time."]}),u.jsx(er,{children:u.jsx("div",{className:"flex justify-between w-full",children:u.jsxs(Ce,{variant:"submit",className:"rounded-full",onClick:f,accessKey:"s",disabled:!o||e,children:[u.jsx(aa,{})," ",u.jsxs("span",{children:[u.jsx("u",{children:"S"}),"ave Changes"]})]})})})]})})}function Yje(e){switch(e){case"Date":return new Date().toISOString();case"Id":case"ID":case"String":return"";case"Boolean":return!1;case"Int":case"Long":case"Float":case"BigInt":return 0;default:return null}}async function Wje({databaseName:e,replicated:t,instanceClient:n}){const{data:r}=await n.post("/",{operation:"drop_database",database:e,replicated:t});return r}function Xje(){return vt({mutationFn:Wje})}function Qje({databaseName:e,onDeleted:t}){const n=Wd("ShowDeleteDatabase",!1),r=ro("ShowDeleteDatabase",!1),i=Od(),o=kr(),s=xn(),c=mn(),{mutate:d,isPending:f}=Xje(),p=x.useCallback(()=>{d({databaseName:e,...s,replicated:s.entityType==="cluster"},{onSuccess:async()=>{r(),await o.invalidateQueries({queryKey:[s.entityId,"describe_all"],refetchType:"all"}),await c.invalidate(),Ee.success(`Database ${e} dropped successfully`),t("database")}})},[r,e,d,s,t,o,c]);return!i||!e?u.jsx(u.Fragment,{}):u.jsx(Pb,{typeOfThingBeingDeleted:"database",nameOfThingBeingDeleted:e,transitiveVerb:"Drop",presentParticiple:"Dropping",isModalOpen:n,setIsModalOpen:r,deletionConfirmed:p,deletionPending:f})}async function Jje({databaseName:e,tableName:t,replicated:n,instanceClient:r}){const{data:i}=await r.post("/",{operation:"drop_table",database:e,table:t,replicated:n});return i}function eIe(){return vt({mutationFn:Jje})}function tIe({databaseName:e,tableName:t,onDeleted:n}){const r=Wd("ShowDeleteTable",!1),i=ro("ShowDeleteTable",!1),o=Od(),s=kr(),c=xn(),d=mn(),{mutate:f,isPending:p}=eIe(),h=x.useCallback(()=>{f({databaseName:e,tableName:t,...c,replicated:c.entityType==="cluster"},{onSuccess:async()=>{i(),await s.invalidateQueries({queryKey:[c.entityId,"describe_all"],refetchType:"all"}),await d.invalidate(),Ee.success(`Table ${t} dropped successfully`),n("table")}})},[i,e,f,c,n,s,d,t]);return!o||!e?u.jsx(u.Fragment,{}):u.jsx(Pb,{typeOfThingBeingDeleted:"table",nameOfThingBeingDeleted:`${e} > ${t}`,transitiveVerb:"Drop",presentParticiple:"Dropping",isModalOpen:r,setIsModalOpen:i,deletionConfirmed:h,deletionPending:p})}function nIe({canEditRecords:e,canDeleteRecords:t,setIsModalOpen:n,isModalOpen:r,hashAttribute:i,data:o,onSaveChanges:s,onDeleteRecord:c,isUpdateTableRecordsPending:d,isDeleteTableRecordsPending:f}){const[p,h]=x.useState(!0),[v,y]=x.useState(!1),[b,S]=x.useState(),C=x.useMemo(()=>{const k=o?.map(({__createdtime__:R,__updatedtime__:I,...A})=>A);return JSON.stringify(k,null,4)},[o]),E=x.useCallback(k=>{y(!0),h(k.length===0)},[h]);return u.jsx(cr,{onOpenChange:n,open:r,children:u.jsxs(ur,{"aria-describedby":void 0,onEscapeKeyDown:e?k=>{v&&k.preventDefault()}:void 0,children:[u.jsx(Br,{children:u.jsxs(tr,{children:[e?"Edit":"View"," Row"]})}),o?u.jsx(rx,{className:"w-full h-96",language:"json",theme:"vs-dark",options:e?void 0:{readOnly:!0},value:C,onValidate:E,onChange:k=>{S(k)}}):u.jsx(go,{}),u.jsx(er,{children:u.jsxs("div",{className:"flex justify-between w-full",children:[t&&u.jsxs(Ce,{variant:"destructive",className:"rounded-full",onClick:()=>{const k=o[0]?.[i];k&&c([k])},disabled:f,children:[u.jsx(Ja,{})," Delete Row"]}),e&&u.jsxs(Ce,{variant:"submit",className:"rounded-full",accessKey:"s",onClick:()=>{b&&p&&s(JSON.parse(b))},disabled:!p||d,children:[u.jsx(aa,{})," ",u.jsxs("span",{children:[u.jsx("u",{children:"S"}),"ave Changes"]})]})]})})]})})}async function rIe(e){const{database:t,table:n,fileData:r,instanceClient:i}=e,{data:o}=await i.post("/",{operation:"csv_data_load",database:t,action:"insert",table:n,data:r});return o}function iIe(){return vt({mutationFn:rIe})}const oIe=En({fileData:wt(),database:wt(),table:wt()});function aIe({setIsModalOpen:e,isModalOpen:t,onSaveChanges:n,database:r,table:i}){const[o,s]=x.useState(null),c=xn(),{mutate:d,isPending:f}=iIe(),p=y=>{if(!y.target.files)return;const b=y.target.files[0];if(b){const S=new FileReader;S.onload=C=>{const E=C.target?.result;typeof E=="string"&&(s(b),h.setValue("fileData",E))},S.readAsText(b)}},h=pn({resolver:wn(oIe),defaultValues:{database:r,table:i,fileData:""}}),v=y=>{d({fileData:y.fileData,database:r,table:i,...c},{onSuccess:({message:b})=>{h.reset(),s(null),n(b)}})};return u.jsx(cr,{onOpenChange:()=>{e(!1),h.reset()},open:t,children:u.jsxs(ur,{children:[u.jsxs(Br,{children:[u.jsx(tr,{children:"Import CSV"}),u.jsx(mi,{children:"Upload a CSV file to import data into the table."})]}),u.jsx(hn,{...h,children:u.jsxs("form",{onSubmit:h.handleSubmit(v),children:[u.jsx("div",{className:"w-full",children:u.jsx(Pe,{control:h.control,name:"fileData",render:({field:y})=>u.jsxs(Oe,{className:"relative",children:[u.jsx($e,{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-grey border-dashed rounded-lg cursor-pointer bg-grey-700 hover:bg-grey-700/80",children:u.jsx(Me,{children:u.jsxs("div",{children:[u.jsxs("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[u.jsx(IW,{className:"text-white",size:48}),u.jsx("p",{className:"mb-2 text-sm text-white",children:o?o.name:u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop a CSV File"]})})]}),u.jsx(Ge,{id:"dropzone-file",type:"file",className:"opacity-0 w-full h-full absolute left-0 top-0 cursor-pointer",accept:".csv",name:y.name,ref:y.ref,onBlur:y.onBlur,disabled:y.disabled,onChange:p})]})})}),u.jsx(De,{})]})})}),u.jsx(er,{className:"mt-4",children:u.jsxs(Ce,{variant:"submit",className:"rounded-full",accessKey:"u",disabled:!o||f,children:[u.jsx(aa,{}),u.jsxs("span",{children:[u.jsx("u",{children:"U"}),"pload CSV"]})]})})]})})]})})}async function sIe({databaseName:e,tableName:t,hashValues:n,instanceClient:r}){const{data:i}=await r.post("/",{operation:"delete",database:e,table:t,hash_values:n});return i}function lIe(){return vt({mutationFn:sIe})}async function cIe({databaseName:e,tableName:t,records:n,instanceClient:r}){const{data:i}=await r.post("/",{operation:"insert",database:e,table:t,records:n});return i}function uIe(){return vt({mutationFn:cIe})}async function dIe(e){const{databaseName:t,tableName:n,records:r,instanceClient:i}=e,{data:o}=await i.post("/",{operation:"update",database:t,table:n,records:r});return o}function fIe(){return vt({mutationFn:dIe})}function mIe({databaseName:e,tableName:t,entityId:n,instanceClient:r}){return{queryKey:[n,"describe_table",e,t],queryFn:async({signal:i})=>{const{data:o}=await r.post("/",{operation:"describe_table",database:e,table:t},{signal:i});return o},staleTime:60*1e3,enabled:!!e&&!!t,retry:!1}}const pIe=["1","bet","k","ok","si","tru","true","yes","yup"];function hIe(e){const t=e.toLowerCase().trim();return pIe.includes(t)}function bP(e){return!isNaN(e)&&!isNaN(parseFloat(e))}function gIe(e){if(e.startsWith("0.")&&bP(e))return!0;const t=e.toUpperCase().includes("E");return!(e!=="0"&&e.startsWith("0"))&&!t&&bP(e)}const xP={true:!0,TRUE:!0,false:!1,FALSE:!1,undefined:null,null:null,NULL:null,NaN:NaN},vIe=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/;function yIe(e){return e==null||e===""||typeof e!="string"?e:xP[e]!==void 0?xP[e]:gIe(e)?Number(e):vIe.test(e)?new Date(e):e}function bIe({enabled:e,entityId:t,instanceClient:n,databaseName:r,tableName:i,conditions:o,sort:s,pageIndex:c,pageSize:d,onlyIfCached:f}){return{enabled:e&&!!o,queryKey:[t,"search_by_conditions",r,i,o,s.attribute||"default",s.descending||!1,c||0,d||0,f],staleTime:6e4,retry:!1,queryFn:({signal:p})=>n.post("/",{operation:"search_by_conditions",get_attributes:["*"],database:r,table:i,conditions:o,sort:s.attribute.length?s:void 0,offset:c*d,limit:d,onlyIfCached:f,noCacheStore:f},{timeout:0,signal:p})}}function xIe(e,t,n){return t.split(/ & /).map(i=>wIe(e,i,n))}function wIe(e,t,n){t.startsWith(e)&&(t=t.substring(e.length));const{comparator:r,value:i}=_Ie(t);switch(n?.type){case"ID":case"String":return{search_attribute:e,search_type:r,search_value:i};case"Int":case"BigInt":case"Long":case"Float":{const o=n.type.includes("Int")?parseInt(i,10):parseFloat(i);if(isNaN(o))throw new Error(`${i} does not appear to be a valid number.`);return{search_attribute:e,search_type:r,search_value:o}}case"Date":{const o=new Date(i).toISOString();return{search_attribute:e,search_type:r,search_value:o}}case"Boolean":return{search_attribute:e,search_type:r,search_value:hIe(i)};case"Blob":case"Bytes":return{search_attribute:e,search_type:r,search_value:i};case"Any":default:return{search_attribute:e,search_type:r,search_value:yIe(i)}}}const wP={"=== ":"equals","== ":"eq","equals ":"equals","equal ":"equals","eq ":"eq","!== ":"not_equal","!= ":"ne","notequals ":"not_equal","notequal ":"not_equal","ne ":"ne"},SIe={">":"greater_than",g:"greater_than",gt:"greater_than","=gt":"greater_than",greater:"greater_than",greaterthan:"greater_than",">=":"greater_than_equal",ge:"greater_than_equal","=ge":"greater_than_equal",gte:"greater_than_equal",greaterorequal:"greater_than_equal",greaterthanequal:"greater_than_equal",greaterthanorequal:"greater_than_equal","<":"less_than",l:"less_than",lt:"less_than","=lt":"less_than",less:"less_than",lessthan:"less_than","<=":"less_than_equal",lte:"less_than_equal",le:"less_than_equal","=le":"less_than_equal",lessorequal:"less_than_equal",lessthanequal:"less_than_equal",lessthanorequal:"less_than_equal"};function _Ie(e){const t=e.toLowerCase(),n=t.match(/^([>=<a-z_ ]+)([\d._TZ-]+)$/);if(n){const r=n[1].replace(/[_ ]+/g,"").replace(/^([a-z]+)=$/g,"$1"),i=n[2],o=SIe[r];if(o)return{comparator:o,value:i}}for(const r in wP)if(t.startsWith(r))return{comparator:wP[r],value:e.slice(r.length)};return t.endsWith("*")?{comparator:"starts_with",value:e.slice(0,-1)}:{comparator:"equals",value:e}}function CIe({enabled:e,entityId:t,instanceClient:n,databaseName:r,tableName:i,ids:o}){return{queryKey:[t,"search_by_id",r,i,o],queryFn:({signal:s})=>n.post("/",{get_attributes:["*"],ids:o,noCacheStore:!0,onlyIfCached:!0,operation:"search_by_id",database:r,table:i},{signal:s}),enabled:e&&!!o?.length,retry:!1}}function EIe({enabled:e,entityId:t,instanceClient:n,databaseName:r,tableName:i,searchAttribute:o,sort:s,pageIndex:c,pageSize:d,onlyIfCached:f}){return{enabled:e,queryKey:[t,"search_by_value",r,i,o,s.attribute||"default",s.descending||!1,c||0,d||0,f],retry:!1,staleTime:6e4,queryFn:({signal:p})=>{const h=s.attribute.length&&!(s.attribute===o&&!s.descending);return n.post("/",{operation:"search_by_value",get_attributes:["*"],database:r,table:i,search_attribute:o,search_value:"*",sort:h?s:void 0,offset:c*d,limit:d,onlyIfCached:f,noCacheStore:f},{timeout:0,signal:p})}}}function e1(e=!1){const[t,n]=x.useState(e),r=x.useCallback(s=>{s?.preventDefault?.(),n(c=>!c)},[]),i=x.useCallback(s=>{s?.preventDefault?.(),n(!0)},[]),o=x.useCallback(s=>{s?.preventDefault?.(),n(!1)},[]);return x.useMemo(()=>({toggled:t,setToggled:n,toggle:r,toggleOn:i,toggleOff:o}),[r,n,o,i,t])}const kIe=bk(wt(),wt());function RIe({applyFilters:e,columnFiltersForm:t,headerGroups:n}){const r=x.useCallback(i=>{if(i.key==="Enter")return i.preventDefault(),e(),!1},[e]);return u.jsx(Zp,{children:u.jsx(hn,{...t,children:n.map(i=>u.jsx(Ni,{className:"border-none",children:i.headers.map(o=>u.jsx(Wa,{style:{width:`${o.column.getSize()}px`},children:o.column.columnDef.enableColumnFilter&&u.jsx(Pe,{control:t.control,name:o.id,render:({field:s})=>u.jsxs(Oe,{className:"border-r-1 border-r-black",children:[u.jsx(Me,{children:u.jsx(Ge,{...s,type:"text",autoCapitalize:"none",autoComplete:"off",className:"rounded-none",onKeyDown:r,value:s.value??""})}),u.jsx(De,{})]})})},o.id))},i.id))})})}function jIe({columns:e,columnVisibility:t,setColumnVisibility:n}){const r=x.useMemo(()=>e.map(i=>i.header).filter(sa),[e]);return u.jsxs(Hp,{children:[u.jsx(qp,{asChild:!0,children:u.jsxs(Ce,{variant:"ghost",children:[u.jsx(NW,{className:"inline-block "}),"Columns"]})}),u.jsx(Gp,{children:r.map(i=>u.jsx(IIe,{columnHeader:i,columnVisibility:t,setColumnVisibility:n},i))})]})}function IIe({columnHeader:e,columnVisibility:t,setColumnVisibility:n}){const{toggled:r,toggle:i}=e1(t[e]??!0);return x.useEffect(()=>{t[e]!==r&&n({...t,[e]:r})},[e,t,r,n]),u.jsx(Nve,{checked:r,onClick:i,children:e},e)}function TIe({className:e}){return u.jsx(s2,{className:Ba("animate-spin",e)})}function NIe({applyFilters:e,columns:t,columnVisibility:n,columnFiltersForm:r,data:i,isFetching:o,onColumnClick:s,onRowClick:c,pageIndex:d,pageSize:f,setPageIndex:p,setPageSize:h,filtersToggled:v,totalPages:y,totalRecords:b}){const S=Qb({data:i||[],columns:t,manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onEnd",pageCount:y,defaultColumn:{minSize:1},state:{columnVisibility:n},rowCount:b,getCoreRowModel:Xb(),getPaginationRowModel:Axe()}),C=x.useCallback(()=>{p(d-1)},[d,p]),E=x.useCallback(()=>{p(d+1)},[d,p]);return u.jsxs(u.Fragment,{children:[u.jsxs(Jb,{containerClassName:"rounded-md bg-black-dark grow max-h-[calc(100vh-128px-16px-112px-80px)]",children:[u.jsx(Zp,{children:S.getHeaderGroups().map(k=>u.jsx(Ni,{className:"border-none",children:k.headers.map(R=>u.jsx(hB,{header:R,onColumnClick:s},R.id))},k.id))}),v&&u.jsx(RIe,{applyFilters:e,columnFiltersForm:r,headerGroups:S.getHeaderGroups()}),u.jsx(ex,{className:"bg-black border border-grey-700",children:S.getRowModel().rows?.length?S.getRowModel().rows.map(k=>u.jsx(Ni,{"data-state":k.getIsSelected()&&"selected",onClick:()=>c?.(k),className:Le("hover:bg-muted/10 data-[state=selected]:bg-muted",c&&"cursor-pointer"),children:k.getVisibleCells().map(R=>u.jsx(Wa,{style:{width:`${R.column.getSize()}px`},className:"px-2 py-2 overflow-x-hidden max-w-32 text-ellipsis whitespace-nowrap",children:R.getValue()=="[object Object]"?JSON.stringify(R.getValue()):dc(R.column.columnDef.cell,R.getContext())},R.id))},k.id)):u.jsx(Ni,{children:u.jsx(Wa,{colSpan:t.length,className:"h-24 text-center",children:o||i===void 0?u.jsx(TIe,{className:"opacity-50 inline-block"}):u.jsx("span",{children:"No results."})})})})]}),u.jsxs("div",{className:"flex items-center justify-end py-4 space-x-2 pr-4",children:[u.jsxs(Ce,{variant:"defaultOutline",size:"sm",onClick:C,className:"select-none",disabled:d===0,children:[u.jsx(tc,{}),"Previous"]}),u.jsx("div",{className:"grow"}),u.jsxs("div",{className:"text-center",children:[u.jsx("dt",{className:"font-medium text-gray-500 text-sm/6 dark:text-gray-400",children:"Records"}),u.jsx("dd",{className:"font-semibold tracking-tight",children:b===void 0?u.jsx(Cr,{}):wv(b)})]}),b!==void 0&&b>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{children:u.jsxs(so,{defaultValue:f.toString(),onValueChange:k=>{h(Number(k))},children:[u.jsx(co,{className:"h-10 w-[80px]",children:u.jsx(lo,{})}),u.jsx(uo,{side:"top",children:[20,50,100,250].map(k=>u.jsx(vn,{value:`${k}`,children:k},k))})]})}),y!==void 0&&y>1&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"text-center",children:[u.jsx("dt",{className:"font-medium text-gray-500 text-sm/6 dark:text-gray-400",children:"Pages"}),u.jsx("dd",{className:"font-semibold tracking-tight",children:wv(y)})]}),u.jsxs("div",{className:"text-center",children:[u.jsx("dt",{className:"font-medium text-gray-500 text-sm/6 dark:text-gray-400",children:"Page"}),u.jsx("dd",{className:"font-semibold tracking-tight",children:wv(d+1)})]})]})]}),u.jsx("div",{className:"grow"}),u.jsxs(Ce,{variant:"defaultOutline",size:"sm",onClick:E,className:"select-none",disabled:y===void 0||d===y-1,children:["Next",u.jsx(Co,{})]})]})]})}function AIe({instanceDatabaseMap:e,databaseName:t,tableName:n}){const r=tt({strict:!1}),i=bn(),o=xn(),{clusterId:s,instanceId:c}=r,{toggled:d,toggle:f}=e1(!0),p=qw(c??s,t,n,"insert"),h=qw(c??s,t,n,"update"),v=qw(c??s,t,n,"delete"),y=Od(),{data:b,refetch:S}=Ut(mIe({...o,databaseName:t,tableName:n})),C=x.useMemo(()=>Yd(b?.attributes??[],"attribute"),[b]),[E,k]=Sv(null,r),[R,I]=x.useState(!1),A=x.useMemo(()=>(t?Object.keys(e?.[t]||[]).sort():[]).length===1,[e,t]),{toggled:T,toggleOn:N,toggleOff:z}=e1(!1),L=pn({resolver:wn(kIe)}),{reset:K}=L,ee=L.watch(),[Z,Y]=x.useState(null),B=x.useCallback(()=>{const bt=[];for(const dr in ee)if(ee[dr]?.length)try{bt.push(...xIe(dr,ee[dr],C[dr]))}catch(ts){Ee.error(String(ts))}Y(bt.length?bt:null),K({...ee})},[C,K,ee]),W=x.useCallback(()=>{K({},{keepValues:!1,keepDirtyValues:!1,keepDefaultValues:!1}),K(),Y(null),z()},[z,K]),{dataTableColumns:P,hashAttribute:G}=Gje(b),[U,te]=x.useState(!1),[$,M]=x.useState(!1),[F,O]=Sv({attribute:G,descending:!1},r),[J,de]=Sv(0,[t,n]),[pe,V]=x.useState(20),ie=b?.record_count,_e=b?.record_count?Math.ceil(b.record_count/pe):0,Ie=T&&!!Z,{data:He,refetch:Ae,isFetching:Ye}=Ut(EIe({...o,enabled:!Ie&&!!G,databaseName:t,tableName:n,searchAttribute:G,sort:F,pageSize:pe,pageIndex:J,onlyIfCached:d})),{data:jt}=Ut(bIe({...o,enabled:Ie,databaseName:t,tableName:n,conditions:Z,sort:F,pageSize:pe,pageIndex:J,onlyIfCached:d})),ln=Ie?jt:He,{data:Dn}=Ut(CIe({...o,enabled:R,databaseName:t,tableName:n,ids:E})),{mutate:Pn,isPending:Gr}=uIe(),{mutate:Wt,isPending:q}=fIe(),{mutate:ae,isPending:ue}=lIe(),xe=bt=>{Pn({...o,databaseName:t,tableName:n,records:Array.isArray(bt)?bt:[bt]},{onSuccess:()=>{S(),Ae(),te(!1),Ee.success("Record added successfully")}})},ve=bt=>{Wt({...o,databaseName:t,tableName:n,records:bt},{onSuccess:()=>{S(),Ae(),I(!1),Ee.success("Record updated successfully")}})},Se=bt=>{ae({...o,databaseName:t,tableName:n,hashValues:bt},{onSuccess:()=>{S(),Ae(),I(!1),Ee.success("Record deleted successfully")}})},ne=x.useCallback(async()=>{await S(),await Ae()},[S,Ae]),ye=x.useCallback(bt=>{ne(),M(!1),Ee.success(`${bt}. Please wait a few moments then refresh the table.`)},[ne]),Ne=bt=>{k([bt.original[G]]),I(!R)},Ke=(bt,dr)=>{O({attribute:bt,descending:!dr})},ot=Ic(ne),Kt=x.useCallback(()=>{te(!0)},[te]),Mn=x.useCallback(()=>{M(!0)},[M]),cn=x.useCallback(bt=>void i({to:bt==="table"?"../":"../../"}),[i]),[Bt,In]=Yu(`ColumnDisplayed/${t}}/${n}`,{}),It=ro("ShowDeleteTable",!0),Kr=ro("ShowDeleteDatabase",!0);return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between space-y-3 md:space-y-0 md:space-x-3 pt-15 pb-4 pr-4",children:[u.jsxs("div",{className:"flex space-x-2",children:[p&&u.jsxs(Ce,{variant:"positiveOutline",onClick:Kt,disabled:U||Gr,accessKey:"n",children:[u.jsx(Mo,{}),u.jsxs("span",{children:["Add ",u.jsx("u",{children:"N"}),"ew Record(s)"]})]}),p&&u.jsxs(Ce,{variant:"positiveOutline",onClick:Mn,disabled:$||Gr,accessKey:"c",children:[u.jsx(oX,{}),u.jsxs("span",{children:["Import ",u.jsx("u",{children:"C"}),"SV"]})]})]}),u.jsxs("div",{className:"flex space-x-2",children:[T&&Z&&u.jsxs(Ce,{variant:"ghost",onClick:W,accessKey:"f",children:[u.jsx(eO,{className:"inline-block "}),u.jsxs("span",{children:["Clear ",u.jsx("u",{children:"F"}),"ilters"]})]}),T&&L.formState.isDirty&&u.jsxs(Ce,{variant:"default",onClick:B,children:[u.jsx(HW,{className:"inline-block "}),"Apply Filters"]}),T&&!Z&&u.jsxs(Ce,{variant:"ghost",onClick:z,accessKey:"f",children:[u.jsx(eO,{className:"inline-block "}),u.jsxs("span",{children:["Hide ",u.jsx("u",{children:"F"}),"ilters"]})]}),!T&&u.jsxs(Ce,{variant:"ghost",onClick:N,accessKey:"f",children:[u.jsx(KW,{className:"inline-block "}),u.jsxs("span",{children:["Show ",u.jsx("u",{children:"F"}),"ilters"]})]}),u.jsx(Ce,{variant:"defaultOutline",onClick:ot,disabled:Ye,children:u.jsx(Ha,{})}),u.jsx(jIe,{columns:P,columnVisibility:Bt,setColumnVisibility:In}),u.jsxs(Hp,{children:[u.jsx(qp,{disabled:!e,children:u.jsx(x1,{"aria-label":"Table options",color:e?"white":"gray"})}),u.jsxs(Gp,{side:"bottom",align:"end",children:[u.jsxs(Mr,{className:"focus:bg-primary/70 focus:text-white",onClick:f,children:[d?u.jsx(CW,{className:"text-green"}):u.jsx(n2,{}),"Only If Cached",u.jsx(We,{to:"https://docs.harperdb.io/docs/developers/applications/caching#cache-control-header",target:"_blank",rel:"noopener noreferrer",onClick:t8,children:u.jsx(zW,{})})]}),y&&!A&&u.jsxs(Mr,{className:"focus:bg-red/70 focus:text-white",onClick:It,children:[u.jsx(Ja,{className:"inline-block "}),"Drop Table"]}),y&&u.jsxs(Mr,{className:"focus:bg-red/70 focus:text-white",onClick:Kr,children:[u.jsx(FX,{}),"Drop Database"]})]})]})]})]}),u.jsx(NIe,{data:ln?.data,isFetching:Ye,filtersToggled:T,columns:P,columnVisibility:Bt,onRowClick:Ne,onColumnClick:Ke,totalPages:_e,totalRecords:ie,pageIndex:J,pageSize:pe,columnFiltersForm:L,applyFilters:B,setPageIndex:de,setPageSize:V}),p&&b&&u.jsx(Zje,{instanceTable:b,setIsModalOpen:te,isModalOpen:U,onSaveChanges:xe,isAddTableRecordsPending:Gr}),u.jsx(nIe,{canEditRecords:h,canDeleteRecords:v,setIsModalOpen:I,isModalOpen:R,hashAttribute:G,data:Dn?.data,onSaveChanges:ve,onDeleteRecord:Se,isUpdateTableRecordsPending:q,isDeleteTableRecordsPending:ue}),u.jsx(Qje,{databaseName:t,onDeleted:cn}),u.jsx(tIe,{databaseName:t,tableName:n,onDeleted:cn}),u.jsx(aIe,{isModalOpen:$,setIsModalOpen:M,onSaveChanges:ye,database:t,table:n})]})}function OIe(){const e=tt({strict:!1}),t=xn(),{data:n}=Ut(I8(t));let r,i;if(n){e.databaseName||(r=Object.keys(n).sort()[0]);const o=e.databaseName??r;!e.tableName&&o&&n[o]&&(i=Object.keys(n[o]).sort()[0])}return r||i?u.jsx(Gl,{to:JC({...e,databaseName:r??e.databaseName,tableName:i}),replace:!0}):u.jsxs("main",{className:"grid grid-cols-1 gap-4 md:grid-cols-12 min-h-[calc(100vh-theme(spacing.36))]",children:[u.jsx("section",{className:"col-span-1 text-white md:col-span-4 lg:col-span-3",children:u.jsx(qje,{instanceDatabaseMap:n})}),u.jsx("section",{className:"col-span-1 text-white md:col-span-8 lg:col-span-9 flex flex-col",children:e.databaseName&&e.tableName&&u.jsx(AIe,{instanceDatabaseMap:n,databaseName:e.databaseName,tableName:e.tableName})})]})}function $Ie(e){return it({getParentRoute:()=>e,path:"/databases/{-$databaseName}/{-$tableName}",component:OIe})}function SP(e,t){const n=_P(e),r=_P(t);return!n||!r?!1:PIe(r,n)>=0}function _P(e){if(typeof e!="string")return null;const[t]=e.split("+",1).concat(""),n=t.indexOf("-"),r=n===-1?t:t.slice(0,n),i=n===-1?"":t.slice(n+1),o=r.split(".");if(o.length===0)return null;const s=l_(o[0]),c=l_(o[1]??"0"),d=l_(o[2]??"0");if(s==null||c==null||d==null)return null;const f=i?i.split(".").map(p=>DIe(p)?Number(p):p):[];return{major:s,minor:c,patch:d,pre:f}}function l_(e){return e==null||e===""||!/^\d+$/.test(e)?null:Number(e)}function DIe(e){return/^\d+$/.test(e)}function PIe(e,t){if(e.major!==t.major)return e.major<t.major?-1:1;if(e.minor!==t.minor)return e.minor<t.minor?-1:1;if(e.patch!==t.patch)return e.patch<t.patch?-1:1;const n=e.pre.length>0,r=t.pre.length>0;if(!n&&!r)return 0;if(!n&&r)return 1;if(n&&!r)return-1;const i=Math.min(e.pre.length,t.pre.length);for(let o=0;o<i;o++){const s=e.pre[o],c=t.pre[o],d=typeof s=="number",f=typeof c=="number";if(d&&f){if(s!==c)return s<c?-1:1;continue}if(d&&!f)return-1;if(!d&&f)return 1;if(s!==c)return String(s)<String(c)?-1:1}return e.pre.length!==t.pre.length?e.pre.length<t.pre.length?-1:1:0}const B8={className:"text-white"};function MIe(){const e=xJ(),t=tt({strict:!1}),{version:n}=Ly({strict:!1}),r=SP("4.7.0-beta.7",n),i=SP("4.6.0",n),o=x.useMemo(()=>[{to:vr(t),activeOptions:{exact:!0},name:"Applications",shortName:"Apps",icon:u.jsx(w1,{className:"inline-block"})},{to:vr(t,"databases"),icon:u.jsx(DW,{className:"inline-block"}),name:"Databases"},e&&r&&{to:vr(t,"apis"),name:"APIs",icon:u.jsx($X,{className:"inline-block"})},e&&i&&{to:vr(t,"status"),icon:u.jsx(YW,{className:"inline-block"}),name:"Status"},e&&{to:vr(t,"logs"),icon:u.jsx(vX,{className:"inline-block"}),name:"Logs"},e&&{to:vr(t,"config"),icon:u.jsx(PX,{className:"inline-block"}),name:"Config"}].filter(sa),[e,t,r,i]);return u.jsxs(u.Fragment,{children:[u.jsx(zIe,{links:o}),u.jsx(LIe,{links:o})]})}function zIe({links:e}){return u.jsxs("div",{className:"hidden md:flex items-center justify-between h-full text-sm text-white",children:[u.jsx(Ky,{}),u.jsx("div",{className:"flex space-x-2",children:e.map(({shortName:t,...n})=>u.jsxs(We,{className:"p-2 text-center text-gray-400 hover:text-white",activeProps:B8,...n,children:[n.icon,u.jsx("span",{className:"hidden xl:inline-block ml-1",children:n.name}),t&&u.jsxs("span",{className:"visible xl:hidden ml-1",children:[" ",t]})]},n.to))})]})}function LIe({links:e}){return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"flex md:hidden items-center justify-between p-2 text-white",children:[u.jsx(Ky,{}),u.jsxs(Hp,{children:[u.jsx(qp,{asChild:!0,children:u.jsx(Ce,{variant:"ghost",className:"p-0",children:u.jsx(l2,{className:"h-8 w-8"})})}),u.jsxs(Gp,{children:[u.jsx(cy,{children:"Instance Menu"}),u.jsx(uy,{}),e.map(t=>u.jsx(Mr,{asChild:!0,children:u.jsx(We,{to:t.to,activeProps:B8,children:t.name})},t.to))]})]})]})})}function UIe(){return u.jsxs(u.Fragment,{children:[u.jsx("nav",{className:"fixed top-20 w-full z-39 md:px-12 md:py-1 bg-grey-700",children:u.jsx(MIe,{})}),u.jsx("div",{className:"mt-32 min-h-[calc(100vh-theme(spacing.32))]",children:u.jsx(el,{})})]})}function FIe(e){return it({getParentRoute:()=>ix,id:"_instanceLayout",component:UIe,loader:async({context:t,params:n})=>{const r=z2(n);return t.queryClient.ensureQueryData(QR(r))}})}function H8(e){switch(e){case"warn":return"warning";case"notify":return"success";case"info":case"debug":case"trace":case void 0:case"stdout":return"secondary";case"stderr":case"error":return"destructive";default:return e}}function VIe({columns:e,data:t,onRowClick:n}){const r=Qb({data:t,columns:e,getCoreRowModel:Xb()});return u.jsx("div",{className:"rounded-md bg-black-dark logsTable",children:u.jsxs(Jb,{className:"text-xs",children:[u.jsx(Zp,{children:r.getHeaderGroups().map(i=>u.jsx(Ni,{className:"border-none",children:i.headers.map(o=>u.jsx(IR,{className:"p-4 max-w-96",children:o.isPlaceholder?null:dc(o.column.columnDef.header,o.getContext())},o.id))},i.id))}),u.jsx(ex,{className:"bg-black",children:r.getRowModel().rows?.length?r.getRowModel().rows.map(i=>u.jsx(Ni,{"data-state":i.getIsSelected()&&"selected",className:Le("hover:bg-muted/10 data-[state=selected]:bg-muted max-w-full",n&&"cursor-pointer"),onClick:()=>n?.(i),children:i.getVisibleCells().map(o=>u.jsx(Wa,{className:"p-1",children:dc(o.column.columnDef.cell,o.getContext())},o.id))},i.id)):u.jsx(Ni,{children:u.jsx(Wa,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})}const CP=["secondary","default","warning","outline","success","destructive"];let EP=0;const c_=new Map,q8=e=>{if(c_.has(e))return c_.get(e);EP++;const t=EP%CP.length,n=CP[t];return c_.set(e,n),n};function BIe(e){try{JSON.parse(e)}catch{return!1}return!0}function HIe({setIsModalOpen:e,isModalOpen:t,data:n}){const r=n?q8(n.node):"default";return u.jsx(cr,{onOpenChange:e,open:t,children:u.jsxs(ur,{"aria-describedby":void 0,children:[u.jsx(Br,{children:u.jsx(tr,{children:"Edit Row"})}),n?u.jsxs("div",{className:"flex flex-col gap-3 text-white",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"inline-block pr-2",children:"Level:"}),u.jsx(ra,{variant:H8(n.level),children:Ma(n.level)})]}),u.jsxs("div",{children:[u.jsx("h3",{children:"Timestamp:"}),u.jsx("p",{className:"text-sm",children:n.timestamp})]}),u.jsxs("div",{children:[u.jsx("h3",{children:"Thread:"}),u.jsx("p",{className:"text-sm",children:n.thread})]}),u.jsxs("div",{children:[u.jsx("h3",{children:"Node:"}),u.jsx(ra,{variant:r,children:n.node})]}),u.jsxs("div",{children:[u.jsx("h3",{children:"Tags:"}),u.jsx("p",{className:"text-sm",children:n.tags&&n.tags.length>0?u.jsx("span",{children:n.tags}):"N/A"})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-bold",children:"Message"}),u.jsx(rx,{className:"w-full h-72",language:BIe(n.message)?"json":"text",theme:"vs-dark",value:n.message,options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1}})]})]}):u.jsx(go,{}),u.jsx(er,{children:u.jsxs("div",{className:"flex justify-between w-full",children:[u.jsxs(Ce,{type:"button",variant:"destructive",className:"rounded-full",children:[u.jsx(Ja,{})," Delete Row"]}),u.jsxs(Ce,{variant:"submit",className:"rounded-full",children:[u.jsx(aa,{})," Save Changes"]})]})})]})})}function qIe({entityId:e,instanceClient:t,logFilters:n,replicated:r,isAutoRefreshEnabled:i}){return{queryKey:[e,"read_log",n.limit,n.level,n.from,n.until,r],queryFn:async()=>{const{data:o}=await t.post("/",{operation:"read_log",start:0,replicated:r,limit:n.limit?parseInt(n.limit,10):void 0,level:n.level!=="undefined"?n.level:void 0,from:n.from?new Date(n.from).toISOString():void 0,until:n.until?new Date(n.until).toISOString():void 0,order:"desc"});return o},retry:!1,refetchInterval:i?5e3:!1}}const GIe=En({limit:wt().optional(),level:Dd(["notify","error","warn","info","debug","trace","undefined"]).optional(),from:wt().or(Zv()).optional(),until:wt().or(Zv()).optional()});function KIe({form:e,resetFilters:t,submitFilters:n}){return u.jsx("div",{children:u.jsx(hn,{...e,children:u.jsxs("form",{onSubmit:e.handleSubmit(n),className:"flex-col space-y-5",children:[u.jsx(Pe,{control:e.control,name:"limit",render:({field:r})=>u.jsxs(Oe,{children:[u.jsx($e,{children:"Log Limit:"}),u.jsxs(so,{onValueChange:r.onChange,value:r.value,children:[u.jsx(co,{className:"w-full",children:u.jsx(lo,{placeholder:"Select log limit"})}),u.jsx(uo,{children:u.jsxs(Do,{children:[u.jsx(vn,{value:"1000",children:"1000"}),u.jsx(vn,{value:"500",children:"500"}),u.jsx(vn,{value:"250",children:"250"}),u.jsx(vn,{value:"100",children:"100"}),u.jsx(vn,{value:"10",children:"10"})]})})]}),u.jsx(De,{})]})}),u.jsx(Pe,{control:e.control,name:"level",render:({field:r})=>u.jsxs(Oe,{children:[u.jsx($e,{children:"Log Level:"}),u.jsxs(so,{onValueChange:r.onChange,value:r.value,children:[u.jsx(co,{className:"w-full",children:u.jsx(lo,{placeholder:"Select log level"})}),u.jsx(uo,{children:u.jsxs(Do,{children:[u.jsx(vn,{value:"undefined",children:"All"}),u.jsx(vn,{value:"notify",children:"Notify"}),u.jsx(vn,{value:"error",children:"Error"}),u.jsx(vn,{value:"warn",children:"Warn"}),u.jsx(vn,{value:"info",children:"Info"}),u.jsx(vn,{value:"debug",children:"Debug"}),u.jsx(vn,{value:"trace",children:"Trace"})]})})]}),u.jsx(De,{})]})}),u.jsx(Pe,{control:e.control,name:"from",render:({field:r})=>u.jsxs(Oe,{children:[u.jsx($e,{children:"Start Date:"}),u.jsx(Me,{children:u.jsx(Ge,{type:"datetime-local",value:r.value,onChange:r.onChange})}),u.jsx(De,{})]})}),u.jsx(Pe,{control:e.control,name:"until",render:({field:r})=>u.jsxs(Oe,{children:[u.jsx($e,{children:"End Date:"}),u.jsx(Me,{children:u.jsx(Ge,{type:"datetime-local",value:r.value,onChange:r.onChange})}),u.jsx(De,{})]})}),u.jsxs("div",{className:"flex items-center justify-between space-x-2 mt-2",children:[u.jsx(Ce,{type:"submit",variant:"positiveOutline",className:"grow",children:"Apply Filters"}),u.jsx(Ce,{type:"reset",variant:"destructiveOutline",onClick:()=>t(),children:"Clear Filters"})]})]})})})}const ZIe=Fy(`inline-flex
|
|
558
|
-
items-center
|
|
559
|
-
justify-center
|
|
560
|
-
gap-2
|
|
561
|
-
whitespace-nowrap
|
|
562
|
-
rounded-lg
|
|
563
|
-
text-sm
|
|
564
|
-
transition-[color,box-shadow]
|
|
565
|
-
disabled:pointer-events-none
|
|
566
|
-
disabled:opacity-50
|
|
567
|
-
[&_svg]:pointer-events-none
|
|
568
|
-
[&_svg:not([class*='size-'])]:size-4
|
|
569
|
-
[&_svg]:shrink-0
|
|
570
|
-
ring-ring/10
|
|
571
|
-
dark:ring-ring/20
|
|
572
|
-
dark:outline-ring/40
|
|
573
|
-
outline-ring/50
|
|
574
|
-
focus-visible:ring-1
|
|
575
|
-
focus-visible:outline-1
|
|
576
|
-
focus-visible:ring-purple-200
|
|
577
|
-
aria-invalid:focus-visible:ring-0`,{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",outline:"border bg-default border-primary border-2 text-white shadow-xs hover:-translate-y-1 transition duration-200 hover:bg-grey-700/40"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});var G8="Toggle",K8=x.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...o}=e,[s,c]=No({prop:n,onChange:i,defaultProp:r??!1,caller:G8});return u.jsx(Be.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:Re(e.onClick,()=>{e.disabled||c(!s)})})});K8.displayName=G8;var YIe=K8;function WIe({className:e,variant:t,size:n,...r}){return u.jsx(YIe,{"data-slot":"toggle",className:Le(ZIe({variant:t,size:n,className:e})),...r})}const u_={limit:"100",level:"undefined",from:"",until:""},XIe=[{accessorKey:"level",header:"Status",cell:({row:e})=>{const{level:t}=e.original;return u.jsx(ra,{variant:H8(t),children:Ma(t)})}},{accessorKey:"timestamp",header:"Date",cell:({row:e})=>{const{timestamp:t}=e.original;return u.jsx("span",{children:new Date(t).toLocaleDateString()})}},{accessorKey:"time",header:"Time",cell:({row:e})=>{const{timestamp:t}=e.original;return u.jsx("span",{children:new Date(t).toLocaleTimeString()})}},{accessorKey:"thread",header:"Thread"},{accessorKey:"node",header:"Node",cell:({row:e})=>{const{node:t}=e.original,n=q8(t);return u.jsx(u.Fragment,{children:t?u.jsxs(VB,{children:[u.jsx(BB,{asChild:!0,children:u.jsxs(ra,{variant:n,children:[t.split(".")[0],"..."]})}),u.jsx(HB,{className:"bg-grey-700",arrowClassName:"bg-grey-700 fill-grey-700",children:t})]}):null})}},{accessorKey:"tags",header:"Tags"},{accessorKey:"message",header:"Message",cell:({row:e})=>{const{message:t}=e.original;return e.getIsSelected(),u.jsx("pre",{children:u.jsx("code",{children:t})})}}],QIe=(e,t)=>{if(!e&&!t||!e||!t)return!0;const n=new Date(e),r=new Date(t);return n<=r};function JIe(){const[e,t]=x.useState(u_),[n,r]=x.useState(!1),[i,o]=x.useState(),[s,c]=x.useState(!1),d=xn(),{data:f,isLoading:p,refetch:h,isFetching:v}=Ut(qIe({logFilters:e,...d,replicated:d.entityType==="cluster",isAutoRefreshEnabled:s})),y=pn({resolver:wn(GIe),defaultValues:u_,mode:"onChange"}),b=k=>{o(k.original),r(!0)},S=async k=>{if(!QIe(k.from,k.until)){y.setError("from",{type:"onChange",message:"Start date must be before end date"}),y.setError("until",{type:"onChange",message:"End date must be after start date"});return}t(k)},C=async()=>{y.reset(),t(u_)},E=Ic(h);return u.jsxs("div",{className:"grid grid-cols-1 gap-4 text-white md:grid-cols-12",children:[u.jsxs("section",{className:"col-span-1 md:col-span-4 lg:col-span-3 px-2 pt-4 md:pt-12",children:[u.jsx(KIe,{form:y,resetFilters:C,submitFilters:S}),u.jsxs("div",{className:"flex items-center justify-between space-x-2 mt-2",children:[u.jsxs(Ce,{variant:"defaultOutline",onClick:E,disabled:v||p||s,className:"grow",children:[u.jsx(Ha,{}),"Refresh"]}),u.jsxs(WIe,{variant:"outline","aria-label":"Toggle Auto Refresh",onPressedChange:c,children:[u.jsx(Ha,{}),"Auto Refresh ",s?"On":"Off"]})]})]}),u.jsx("section",{className:"col-span-1 md:col-span-8 lg:col-span-9",children:p?u.jsx("div",{children:"Loading..."}):u.jsx("div",{children:u.jsx(VIe,{columns:XIe,data:f||[],onRowClick:b})})}),u.jsx(HIe,{isModalOpen:n,setIsModalOpen:r,data:i})]})}function eTe(e){return it({getParentRoute:()=>e,path:"logs",component:JIe})}function tTe(e){return it({getParentRoute:()=>e,path:"status",component:DM(async()=>zp(()=>import("./index-DgL-lCXW.js"),__vite__mapDeps([3,1])),"StatusIndex")})}function nTe(e){const t=FIe(),n=[eTe(t),...qRe(t),Ywe(t),tTe(t),Eje(t),$Ie(t)];return t.addChildren(n)}it({getParentRoute:()=>ix,path:"profile",component:DM(async()=>zp(()=>import("./index-D1uPa1Br.js"),[]),"ProfileIndex")});const rTe=Nb.addChildren([...kme,ix.addChildren([nTe()])]);function iTe({routeTree:e=rTe,authentication:t}){const n=kK();return sY({routeTree:e,history:n,defaultNotFoundComponent:YX,defaultErrorComponent:Ov,defaultPreload:WX()?!1:"intent",trailingSlash:"never",defaultPreloadStaleTime:0,scrollRestoration:!0,context:{queryClient:$v,authentication:t||{}}})}function oTe(){const e=fY(),t=iTe({authentication:e});return u.jsxs(u.Fragment,{children:[u.jsx(uY,{router:t,context:{authentication:e}}),!1]})}const aTe=({...e})=>u.jsx(_Q,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground font-medium",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground font-medium"}},...e});var sTe=function(){return null};function lTe(){return Pie(),ime(),u.jsxs(u.Fragment,{children:[u.jsxs(sK,{client:$v,children:[u.jsx(oTe,{}),u.jsx(sTe,{buttonPosition:"bottom-right"})]}),u.jsx(aTe,{richColors:!0})]})}var d_={exports:{}},gm={},f_={exports:{}},m_={};/**
|
|
578
|
-
* @license React
|
|
579
|
-
* scheduler.production.js
|
|
580
|
-
*
|
|
581
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
582
|
-
*
|
|
583
|
-
* This source code is licensed under the MIT license found in the
|
|
584
|
-
* LICENSE file in the root directory of this source tree.
|
|
585
|
-
*/var kP;function cTe(){return kP||(kP=1,(function(e){function t(P,G){var U=P.length;P.push(G);e:for(;0<U;){var te=U-1>>>1,$=P[te];if(0<i($,G))P[te]=G,P[U]=$,U=te;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var G=P[0],U=P.pop();if(U!==G){P[0]=U;e:for(var te=0,$=P.length,M=$>>>1;te<M;){var F=2*(te+1)-1,O=P[F],J=F+1,de=P[J];if(0>i(O,U))J<$&&0>i(de,O)?(P[te]=de,P[J]=U,te=J):(P[te]=O,P[F]=U,te=F);else if(J<$&&0>i(de,U))P[te]=de,P[J]=U,te=J;else break e}}return G}function i(P,G){var U=P.sortIndex-G.sortIndex;return U!==0?U:P.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,c=s.now();e.unstable_now=function(){return s.now()-c}}var d=[],f=[],p=1,h=null,v=3,y=!1,b=!1,S=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function I(P){for(var G=n(f);G!==null;){if(G.callback===null)r(f);else if(G.startTime<=P)r(f),G.sortIndex=G.expirationTime,t(d,G);else break;G=n(f)}}function A(P){if(S=!1,I(P),!b)if(n(d)!==null)b=!0,T||(T=!0,Z());else{var G=n(f);G!==null&&W(A,G.startTime-P)}}var T=!1,N=-1,z=5,L=-1;function K(){return C?!0:!(e.unstable_now()-L<z)}function ee(){if(C=!1,T){var P=e.unstable_now();L=P;var G=!0;try{e:{b=!1,S&&(S=!1,k(N),N=-1),y=!0;var U=v;try{t:{for(I(P),h=n(d);h!==null&&!(h.expirationTime>P&&K());){var te=h.callback;if(typeof te=="function"){h.callback=null,v=h.priorityLevel;var $=te(h.expirationTime<=P);if(P=e.unstable_now(),typeof $=="function"){h.callback=$,I(P),G=!0;break t}h===n(d)&&r(d),I(P)}else r(d);h=n(d)}if(h!==null)G=!0;else{var M=n(f);M!==null&&W(A,M.startTime-P),G=!1}}break e}finally{h=null,v=U,y=!1}G=void 0}}finally{G?Z():T=!1}}}var Z;if(typeof R=="function")Z=function(){R(ee)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,B=Y.port2;Y.port1.onmessage=ee,Z=function(){B.postMessage(null)}}else Z=function(){E(ee,0)};function W(P,G){N=E(function(){P(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(P){switch(v){case 1:case 2:case 3:var G=3;break;default:G=v}var U=v;v=G;try{return P()}finally{v=U}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(P,G){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var U=v;v=P;try{return G()}finally{v=U}},e.unstable_scheduleCallback=function(P,G,U){var te=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?te+U:te):U=te,P){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=U+$,P={id:p++,callback:G,priorityLevel:P,startTime:U,expirationTime:$,sortIndex:-1},U>te?(P.sortIndex=U,t(f,P),n(d)===null&&P===n(f)&&(S?(k(N),N=-1):S=!0,W(A,U-te))):(P.sortIndex=$,t(d,P),b||y||(b=!0,T||(T=!0,Z()))),P},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(P){var G=v;return function(){var U=v;v=G;try{return P.apply(this,arguments)}finally{v=U}}}})(m_)),m_}var RP;function uTe(){return RP||(RP=1,f_.exports=cTe()),f_.exports}/**
|
|
586
|
-
* @license React
|
|
587
|
-
* react-dom-client.production.js
|
|
588
|
-
*
|
|
589
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
590
|
-
*
|
|
591
|
-
* This source code is licensed under the MIT license found in the
|
|
592
|
-
* LICENSE file in the root directory of this source tree.
|
|
593
|
-
*/var jP;function dTe(){if(jP)return gm;jP=1;var e=uTe(),t=fp(),n=$M();function r(a){var l="https://react.dev/errors/"+a;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)l+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var l=a,m=a;if(a.alternate)for(;l.return;)l=l.return;else{a=l;do l=a,(l.flags&4098)!==0&&(m=l.return),a=l.return;while(a)}return l.tag===3?m:null}function s(a){if(a.tag===13){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function c(a){if(a.tag===31){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function d(a){if(o(a)!==a)throw Error(r(188))}function f(a){var l=a.alternate;if(!l){if(l=o(a),l===null)throw Error(r(188));return l!==a?null:a}for(var m=a,g=l;;){var w=m.return;if(w===null)break;var _=w.alternate;if(_===null){if(g=w.return,g!==null){m=g;continue}break}if(w.child===_.child){for(_=w.child;_;){if(_===m)return d(w),a;if(_===g)return d(w),l;_=_.sibling}throw Error(r(188))}if(m.return!==g.return)m=w,g=_;else{for(var j=!1,D=w.child;D;){if(D===m){j=!0,m=w,g=_;break}if(D===g){j=!0,g=w,m=_;break}D=D.sibling}if(!j){for(D=_.child;D;){if(D===m){j=!0,m=_,g=w;break}if(D===g){j=!0,g=_,m=w;break}D=D.sibling}if(!j)throw Error(r(189))}}if(m.alternate!==g)throw Error(r(190))}if(m.tag!==3)throw Error(r(188));return m.stateNode.current===m?a:l}function p(a){var l=a.tag;if(l===5||l===26||l===27||l===6)return a;for(a=a.child;a!==null;){if(l=p(a),l!==null)return l;a=a.sibling}return null}var h=Object.assign,v=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),R=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function Z(a){return a===null||typeof a!="object"?null:(a=ee&&a[ee]||a["@@iterator"],typeof a=="function"?a:null)}var Y=Symbol.for("react.client.reference");function B(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===Y?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case E:return"Profiler";case C:return"StrictMode";case A:return"Suspense";case T:return"SuspenseList";case L:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case b:return"Portal";case R:return a.displayName||"Context";case k:return(a._context.displayName||"Context")+".Consumer";case I:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case N:return l=a.displayName||null,l!==null?l:B(a.type)||"Memo";case z:l=a._payload,a=a._init;try{return B(a(l))}catch{}}return null}var W=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},te=[],$=-1;function M(a){return{current:a}}function F(a){0>$||(a.current=te[$],te[$]=null,$--)}function O(a,l){$++,te[$]=a.current,a.current=l}var J=M(null),de=M(null),pe=M(null),V=M(null);function ie(a,l){switch(O(pe,l),O(de,a),O(J,null),l.nodeType){case 9:case 11:a=(a=l.documentElement)&&(a=a.namespaceURI)?vN(a):0;break;default:if(a=l.tagName,l=l.namespaceURI)l=vN(l),a=yN(l,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}F(J),O(J,a)}function _e(){F(J),F(de),F(pe)}function Ie(a){a.memoizedState!==null&&O(V,a);var l=J.current,m=yN(l,a.type);l!==m&&(O(de,a),O(J,m))}function He(a){de.current===a&&(F(J),F(de)),V.current===a&&(F(V),Uf._currentValue=U)}var Ae,Ye;function jt(a){if(Ae===void 0)try{throw Error()}catch(m){var l=m.stack.trim().match(/\n( *(at )?)/);Ae=l&&l[1]||"",Ye=-1<m.stack.indexOf(`
|
|
594
|
-
at`)?" (<anonymous>)":-1<m.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
595
|
-
`+Ae+a+Ye}var ln=!1;function Dn(a,l){if(!a||ln)return"";ln=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(l){var be=function(){throw Error()};if(Object.defineProperty(be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(be,[])}catch(me){var ce=me}Reflect.construct(a,[],be)}else{try{be.call()}catch(me){ce=me}a.call(be.prototype)}}else{try{throw Error()}catch(me){ce=me}(be=a())&&typeof be.catch=="function"&&be.catch(function(){})}}catch(me){if(me&&ce&&typeof me.stack=="string")return[me.stack,ce.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=g.DetermineComponentFrameRoot(),j=_[0],D=_[1];if(j&&D){var H=j.split(`
|
|
596
|
-
`),le=D.split(`
|
|
597
|
-
`);for(w=g=0;g<H.length&&!H[g].includes("DetermineComponentFrameRoot");)g++;for(;w<le.length&&!le[w].includes("DetermineComponentFrameRoot");)w++;if(g===H.length||w===le.length)for(g=H.length-1,w=le.length-1;1<=g&&0<=w&&H[g]!==le[w];)w--;for(;1<=g&&0<=w;g--,w--)if(H[g]!==le[w]){if(g!==1||w!==1)do if(g--,w--,0>w||H[g]!==le[w]){var he=`
|
|
598
|
-
`+H[g].replace(" at new "," at ");return a.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",a.displayName)),he}while(1<=g&&0<=w);break}}}finally{ln=!1,Error.prepareStackTrace=m}return(m=a?a.displayName||a.name:"")?jt(m):""}function Pn(a,l){switch(a.tag){case 26:case 27:case 5:return jt(a.type);case 16:return jt("Lazy");case 13:return a.child!==l&&l!==null?jt("Suspense Fallback"):jt("Suspense");case 19:return jt("SuspenseList");case 0:case 15:return Dn(a.type,!1);case 11:return Dn(a.type.render,!1);case 1:return Dn(a.type,!0);case 31:return jt("Activity");default:return""}}function Gr(a){try{var l="",m=null;do l+=Pn(a,m),m=a,a=a.return;while(a);return l}catch(g){return`
|
|
599
|
-
Error generating stack: `+g.message+`
|
|
600
|
-
`+g.stack}}var Wt=Object.prototype.hasOwnProperty,q=e.unstable_scheduleCallback,ae=e.unstable_cancelCallback,ue=e.unstable_shouldYield,xe=e.unstable_requestPaint,ve=e.unstable_now,Se=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,ye=e.unstable_UserBlockingPriority,Ne=e.unstable_NormalPriority,Ke=e.unstable_LowPriority,ot=e.unstable_IdlePriority,Kt=e.log,Mn=e.unstable_setDisableYieldValue,cn=null,Bt=null;function In(a){if(typeof Kt=="function"&&Mn(a),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(cn,a)}catch{}}var It=Math.clz32?Math.clz32:dr,Kr=Math.log,bt=Math.LN2;function dr(a){return a>>>=0,a===0?32:31-(Kr(a)/bt|0)|0}var ts=256,Oc=262144,sl=4194304;function Lo(a){var l=a&42;if(l!==0)return l;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function rt(a,l,m){var g=a.pendingLanes;if(g===0)return 0;var w=0,_=a.suspendedLanes,j=a.pingedLanes;a=a.warmLanes;var D=g&134217727;return D!==0?(g=D&~_,g!==0?w=Lo(g):(j&=D,j!==0?w=Lo(j):m||(m=D&~a,m!==0&&(w=Lo(m))))):(D=g&~_,D!==0?w=Lo(D):j!==0?w=Lo(j):m||(m=g&~a,m!==0&&(w=Lo(m)))),w===0?0:l!==0&&l!==w&&(l&_)===0&&(_=w&-w,m=l&-l,_>=m||_===32&&(m&4194048)!==0)?l:w}function un(a,l){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&l)===0}function nr(a,l){switch(a){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 yr(){var a=sl;return sl<<=1,(sl&62914560)===0&&(sl=4194304),a}function ns(a){for(var l=[],m=0;31>m;m++)l.push(a);return l}function gn(a,l){a.pendingLanes|=l,l!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Zr(a,l,m,g,w,_){var j=a.pendingLanes;a.pendingLanes=m,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=m,a.entangledLanes&=m,a.errorRecoveryDisabledLanes&=m,a.shellSuspendCounter=0;var D=a.entanglements,H=a.expirationTimes,le=a.hiddenUpdates;for(m=j&~m;0<m;){var he=31-It(m),be=1<<he;D[he]=0,H[he]=-1;var ce=le[he];if(ce!==null)for(le[he]=null,he=0;he<ce.length;he++){var me=ce[he];me!==null&&(me.lane&=-536870913)}m&=~be}g!==0&&ll(a,g,0),_!==0&&w===0&&a.tag!==0&&(a.suspendedLanes|=_&~(j&~l))}function ll(a,l,m){a.pendingLanes|=l,a.suspendedLanes&=~l;var g=31-It(l);a.entangledLanes|=l,a.entanglements[g]=a.entanglements[g]|1073741824|m&261930}function Yr(a,l){var m=a.entangledLanes|=l;for(a=a.entanglements;m;){var g=31-It(m),w=1<<g;w&l|a[g]&l&&(a[g]|=l),m&=~w}}function Wr(a,l){var m=l&-l;return m=(m&42)!==0?1:$c(m),(m&(a.suspendedLanes|l))!==0?0:m}function $c(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function yo(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function yx(){var a=G.p;return a!==0?a:(a=window.event,a===void 0?32:FN(a.type))}function rj(a,l){var m=G.p;try{return G.p=a,l()}finally{G.p=m}}var rs=Math.random().toString(36).slice(2),fr="__reactFiber$"+rs,Xr="__reactProps$"+rs,Dc="__reactContainer$"+rs,bx="__reactEvents$"+rs,Z8="__reactListeners$"+rs,Y8="__reactHandles$"+rs,ij="__reactResources$"+rs,ef="__reactMarker$"+rs;function xx(a){delete a[fr],delete a[Xr],delete a[bx],delete a[Z8],delete a[Y8]}function Pc(a){var l=a[fr];if(l)return l;for(var m=a.parentNode;m;){if(l=m[Dc]||m[fr]){if(m=l.alternate,l.child!==null||m!==null&&m.child!==null)for(a=EN(a);a!==null;){if(m=a[fr])return m;a=EN(a)}return l}a=m,m=a.parentNode}return null}function Mc(a){if(a=a[fr]||a[Dc]){var l=a.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return a}return null}function tf(a){var l=a.tag;if(l===5||l===26||l===27||l===6)return a.stateNode;throw Error(r(33))}function zc(a){var l=a[ij];return l||(l=a[ij]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function rr(a){a[ef]=!0}var oj=new Set,aj={};function cl(a,l){Lc(a,l),Lc(a+"Capture",l)}function Lc(a,l){for(aj[a]=l,a=0;a<l.length;a++)oj.add(l[a])}var W8=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]*$"),sj={},lj={};function X8(a){return Wt.call(lj,a)?!0:Wt.call(sj,a)?!1:W8.test(a)?lj[a]=!0:(sj[a]=!0,!1)}function nh(a,l,m){if(X8(l))if(m===null)a.removeAttribute(l);else{switch(typeof m){case"undefined":case"function":case"symbol":a.removeAttribute(l);return;case"boolean":var g=l.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){a.removeAttribute(l);return}}a.setAttribute(l,""+m)}}function rh(a,l,m){if(m===null)a.removeAttribute(l);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(l);return}a.setAttribute(l,""+m)}}function fa(a,l,m,g){if(g===null)a.removeAttribute(m);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(m);return}a.setAttributeNS(l,m,""+g)}}function Li(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function cj(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Q8(a,l,m){var g=Object.getOwnPropertyDescriptor(a.constructor.prototype,l);if(!a.hasOwnProperty(l)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var w=g.get,_=g.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return w.call(this)},set:function(j){m=""+j,_.call(this,j)}}),Object.defineProperty(a,l,{enumerable:g.enumerable}),{getValue:function(){return m},setValue:function(j){m=""+j},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function wx(a){if(!a._valueTracker){var l=cj(a)?"checked":"value";a._valueTracker=Q8(a,l,""+a[l])}}function uj(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var m=l.getValue(),g="";return a&&(g=cj(a)?a.checked?"true":"false":a.value),a=g,a!==m?(l.setValue(a),!0):!1}function ih(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var J8=/[\n"\\]/g;function Ui(a){return a.replace(J8,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Sx(a,l,m,g,w,_,j,D){a.name="",j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?a.type=j:a.removeAttribute("type"),l!=null?j==="number"?(l===0&&a.value===""||a.value!=l)&&(a.value=""+Li(l)):a.value!==""+Li(l)&&(a.value=""+Li(l)):j!=="submit"&&j!=="reset"||a.removeAttribute("value"),l!=null?_x(a,j,Li(l)):m!=null?_x(a,j,Li(m)):g!=null&&a.removeAttribute("value"),w==null&&_!=null&&(a.defaultChecked=!!_),w!=null&&(a.checked=w&&typeof w!="function"&&typeof w!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?a.name=""+Li(D):a.removeAttribute("name")}function dj(a,l,m,g,w,_,j,D){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(a.type=_),l!=null||m!=null){if(!(_!=="submit"&&_!=="reset"||l!=null)){wx(a);return}m=m!=null?""+Li(m):"",l=l!=null?""+Li(l):m,D||l===a.value||(a.value=l),a.defaultValue=l}g=g??w,g=typeof g!="function"&&typeof g!="symbol"&&!!g,a.checked=D?a.checked:!!g,a.defaultChecked=!!g,j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(a.name=j),wx(a)}function _x(a,l,m){l==="number"&&ih(a.ownerDocument)===a||a.defaultValue===""+m||(a.defaultValue=""+m)}function Uc(a,l,m,g){if(a=a.options,l){l={};for(var w=0;w<m.length;w++)l["$"+m[w]]=!0;for(m=0;m<a.length;m++)w=l.hasOwnProperty("$"+a[m].value),a[m].selected!==w&&(a[m].selected=w),w&&g&&(a[m].defaultSelected=!0)}else{for(m=""+Li(m),l=null,w=0;w<a.length;w++){if(a[w].value===m){a[w].selected=!0,g&&(a[w].defaultSelected=!0);return}l!==null||a[w].disabled||(l=a[w])}l!==null&&(l.selected=!0)}}function fj(a,l,m){if(l!=null&&(l=""+Li(l),l!==a.value&&(a.value=l),m==null)){a.defaultValue!==l&&(a.defaultValue=l);return}a.defaultValue=m!=null?""+Li(m):""}function mj(a,l,m,g){if(l==null){if(g!=null){if(m!=null)throw Error(r(92));if(W(g)){if(1<g.length)throw Error(r(93));g=g[0]}m=g}m==null&&(m=""),l=m}m=Li(l),a.defaultValue=m,g=a.textContent,g===m&&g!==""&&g!==null&&(a.value=g),wx(a)}function Fc(a,l){if(l){var m=a.firstChild;if(m&&m===a.lastChild&&m.nodeType===3){m.nodeValue=l;return}}a.textContent=l}var e9=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 pj(a,l,m){var g=l.indexOf("--")===0;m==null||typeof m=="boolean"||m===""?g?a.setProperty(l,""):l==="float"?a.cssFloat="":a[l]="":g?a.setProperty(l,m):typeof m!="number"||m===0||e9.has(l)?l==="float"?a.cssFloat=m:a[l]=(""+m).trim():a[l]=m+"px"}function hj(a,l,m){if(l!=null&&typeof l!="object")throw Error(r(62));if(a=a.style,m!=null){for(var g in m)!m.hasOwnProperty(g)||l!=null&&l.hasOwnProperty(g)||(g.indexOf("--")===0?a.setProperty(g,""):g==="float"?a.cssFloat="":a[g]="");for(var w in l)g=l[w],l.hasOwnProperty(w)&&m[w]!==g&&pj(a,w,g)}else for(var _ in l)l.hasOwnProperty(_)&&pj(a,_,l[_])}function Cx(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var t9=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"]]),n9=/^[\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 oh(a){return n9.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ma(){}var Ex=null;function kx(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Vc=null,Bc=null;function gj(a){var l=Mc(a);if(l&&(a=l.stateNode)){var m=a[Xr]||null;e:switch(a=l.stateNode,l.type){case"input":if(Sx(a,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name),l=m.name,m.type==="radio"&&l!=null){for(m=a;m.parentNode;)m=m.parentNode;for(m=m.querySelectorAll('input[name="'+Ui(""+l)+'"][type="radio"]'),l=0;l<m.length;l++){var g=m[l];if(g!==a&&g.form===a.form){var w=g[Xr]||null;if(!w)throw Error(r(90));Sx(g,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(l=0;l<m.length;l++)g=m[l],g.form===a.form&&uj(g)}break e;case"textarea":fj(a,m.value,m.defaultValue);break e;case"select":l=m.value,l!=null&&Uc(a,!!m.multiple,l,!1)}}}var Rx=!1;function vj(a,l,m){if(Rx)return a(l,m);Rx=!0;try{var g=a(l);return g}finally{if(Rx=!1,(Vc!==null||Bc!==null)&&(Gh(),Vc&&(l=Vc,a=Bc,Bc=Vc=null,gj(l),a)))for(l=0;l<a.length;l++)gj(a[l])}}function nf(a,l){var m=a.stateNode;if(m===null)return null;var g=m[Xr]||null;if(g===null)return null;m=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(a=a.type,g=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!g;break e;default:a=!1}if(a)return null;if(m&&typeof m!="function")throw Error(r(231,l,typeof m));return m}var pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jx=!1;if(pa)try{var rf={};Object.defineProperty(rf,"passive",{get:function(){jx=!0}}),window.addEventListener("test",rf,rf),window.removeEventListener("test",rf,rf)}catch{jx=!1}var is=null,Ix=null,ah=null;function yj(){if(ah)return ah;var a,l=Ix,m=l.length,g,w="value"in is?is.value:is.textContent,_=w.length;for(a=0;a<m&&l[a]===w[a];a++);var j=m-a;for(g=1;g<=j&&l[m-g]===w[_-g];g++);return ah=w.slice(a,1<g?1-g:void 0)}function sh(a){var l=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&l===13&&(a=13)):a=l,a===10&&(a=13),32<=a||a===13?a:0}function lh(){return!0}function bj(){return!1}function Qr(a){function l(m,g,w,_,j){this._reactName=m,this._targetInst=w,this.type=g,this.nativeEvent=_,this.target=j,this.currentTarget=null;for(var D in a)a.hasOwnProperty(D)&&(m=a[D],this[D]=m?m(_):_[D]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?lh:bj,this.isPropagationStopped=bj,this}return h(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var m=this.nativeEvent;m&&(m.preventDefault?m.preventDefault():typeof m.returnValue!="unknown"&&(m.returnValue=!1),this.isDefaultPrevented=lh)},stopPropagation:function(){var m=this.nativeEvent;m&&(m.stopPropagation?m.stopPropagation():typeof m.cancelBubble!="unknown"&&(m.cancelBubble=!0),this.isPropagationStopped=lh)},persist:function(){},isPersistent:lh}),l}var ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ch=Qr(ul),of=h({},ul,{view:0,detail:0}),r9=Qr(of),Tx,Nx,af,uh=h({},of,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ox,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==af&&(af&&a.type==="mousemove"?(Tx=a.screenX-af.screenX,Nx=a.screenY-af.screenY):Nx=Tx=0,af=a),Tx)},movementY:function(a){return"movementY"in a?a.movementY:Nx}}),xj=Qr(uh),i9=h({},uh,{dataTransfer:0}),o9=Qr(i9),a9=h({},of,{relatedTarget:0}),Ax=Qr(a9),s9=h({},ul,{animationName:0,elapsedTime:0,pseudoElement:0}),l9=Qr(s9),c9=h({},ul,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),u9=Qr(c9),d9=h({},ul,{data:0}),wj=Qr(d9),f9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},m9={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"},p9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function h9(a){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(a):(a=p9[a])?!!l[a]:!1}function Ox(){return h9}var g9=h({},of,{key:function(a){if(a.key){var l=f9[a.key]||a.key;if(l!=="Unidentified")return l}return a.type==="keypress"?(a=sh(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?m9[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ox,charCode:function(a){return a.type==="keypress"?sh(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?sh(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),v9=Qr(g9),y9=h({},uh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sj=Qr(y9),b9=h({},of,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ox}),x9=Qr(b9),w9=h({},ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),S9=Qr(w9),_9=h({},uh,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),C9=Qr(_9),E9=h({},ul,{newState:0,oldState:0}),k9=Qr(E9),R9=[9,13,27,32],$x=pa&&"CompositionEvent"in window,sf=null;pa&&"documentMode"in document&&(sf=document.documentMode);var j9=pa&&"TextEvent"in window&&!sf,_j=pa&&(!$x||sf&&8<sf&&11>=sf),Cj=" ",Ej=!1;function kj(a,l){switch(a){case"keyup":return R9.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rj(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Hc=!1;function I9(a,l){switch(a){case"compositionend":return Rj(l);case"keypress":return l.which!==32?null:(Ej=!0,Cj);case"textInput":return a=l.data,a===Cj&&Ej?null:a;default:return null}}function T9(a,l){if(Hc)return a==="compositionend"||!$x&&kj(a,l)?(a=yj(),ah=Ix=is=null,Hc=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return _j&&l.locale!=="ko"?null:l.data;default:return null}}var N9={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 jj(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l==="input"?!!N9[a.type]:l==="textarea"}function Ij(a,l,m,g){Vc?Bc?Bc.push(g):Bc=[g]:Vc=g,l=Jh(l,"onChange"),0<l.length&&(m=new ch("onChange","change",null,m,g),a.push({event:m,listeners:l}))}var lf=null,cf=null;function A9(a){dN(a,0)}function dh(a){var l=tf(a);if(uj(l))return a}function Tj(a,l){if(a==="change")return l}var Nj=!1;if(pa){var Dx;if(pa){var Px="oninput"in document;if(!Px){var Aj=document.createElement("div");Aj.setAttribute("oninput","return;"),Px=typeof Aj.oninput=="function"}Dx=Px}else Dx=!1;Nj=Dx&&(!document.documentMode||9<document.documentMode)}function Oj(){lf&&(lf.detachEvent("onpropertychange",$j),cf=lf=null)}function $j(a){if(a.propertyName==="value"&&dh(cf)){var l=[];Ij(l,cf,a,kx(a)),vj(A9,l)}}function O9(a,l,m){a==="focusin"?(Oj(),lf=l,cf=m,lf.attachEvent("onpropertychange",$j)):a==="focusout"&&Oj()}function $9(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return dh(cf)}function D9(a,l){if(a==="click")return dh(l)}function P9(a,l){if(a==="input"||a==="change")return dh(l)}function M9(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var hi=typeof Object.is=="function"?Object.is:M9;function uf(a,l){if(hi(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;var m=Object.keys(a),g=Object.keys(l);if(m.length!==g.length)return!1;for(g=0;g<m.length;g++){var w=m[g];if(!Wt.call(l,w)||!hi(a[w],l[w]))return!1}return!0}function Dj(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Pj(a,l){var m=Dj(a);a=0;for(var g;m;){if(m.nodeType===3){if(g=a+m.textContent.length,a<=l&&g>=l)return{node:m,offset:l-a};a=g}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=Dj(m)}}function Mj(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?Mj(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function zj(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var l=ih(a.document);l instanceof a.HTMLIFrameElement;){try{var m=typeof l.contentWindow.location.href=="string"}catch{m=!1}if(m)a=l.contentWindow;else break;l=ih(a.document)}return l}function Mx(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}var z9=pa&&"documentMode"in document&&11>=document.documentMode,qc=null,zx=null,df=null,Lx=!1;function Lj(a,l,m){var g=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;Lx||qc==null||qc!==ih(g)||(g=qc,"selectionStart"in g&&Mx(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),df&&uf(df,g)||(df=g,g=Jh(zx,"onSelect"),0<g.length&&(l=new ch("onSelect","select",null,l,m),a.push({event:l,listeners:g}),l.target=qc)))}function dl(a,l){var m={};return m[a.toLowerCase()]=l.toLowerCase(),m["Webkit"+a]="webkit"+l,m["Moz"+a]="moz"+l,m}var Gc={animationend:dl("Animation","AnimationEnd"),animationiteration:dl("Animation","AnimationIteration"),animationstart:dl("Animation","AnimationStart"),transitionrun:dl("Transition","TransitionRun"),transitionstart:dl("Transition","TransitionStart"),transitioncancel:dl("Transition","TransitionCancel"),transitionend:dl("Transition","TransitionEnd")},Ux={},Uj={};pa&&(Uj=document.createElement("div").style,"AnimationEvent"in window||(delete Gc.animationend.animation,delete Gc.animationiteration.animation,delete Gc.animationstart.animation),"TransitionEvent"in window||delete Gc.transitionend.transition);function fl(a){if(Ux[a])return Ux[a];if(!Gc[a])return a;var l=Gc[a],m;for(m in l)if(l.hasOwnProperty(m)&&m in Uj)return Ux[a]=l[m];return a}var Fj=fl("animationend"),Vj=fl("animationiteration"),Bj=fl("animationstart"),L9=fl("transitionrun"),U9=fl("transitionstart"),F9=fl("transitioncancel"),Hj=fl("transitionend"),qj=new Map,Fx="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(" ");Fx.push("scrollEnd");function bo(a,l){qj.set(a,l),cl(l,[a])}var fh=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Fi=[],Kc=0,Vx=0;function mh(){for(var a=Kc,l=Vx=Kc=0;l<a;){var m=Fi[l];Fi[l++]=null;var g=Fi[l];Fi[l++]=null;var w=Fi[l];Fi[l++]=null;var _=Fi[l];if(Fi[l++]=null,g!==null&&w!==null){var j=g.pending;j===null?w.next=w:(w.next=j.next,j.next=w),g.pending=w}_!==0&&Gj(m,w,_)}}function ph(a,l,m,g){Fi[Kc++]=a,Fi[Kc++]=l,Fi[Kc++]=m,Fi[Kc++]=g,Vx|=g,a.lanes|=g,a=a.alternate,a!==null&&(a.lanes|=g)}function Bx(a,l,m,g){return ph(a,l,m,g),hh(a)}function ml(a,l){return ph(a,null,null,l),hh(a)}function Gj(a,l,m){a.lanes|=m;var g=a.alternate;g!==null&&(g.lanes|=m);for(var w=!1,_=a.return;_!==null;)_.childLanes|=m,g=_.alternate,g!==null&&(g.childLanes|=m),_.tag===22&&(a=_.stateNode,a===null||a._visibility&1||(w=!0)),a=_,_=_.return;return a.tag===3?(_=a.stateNode,w&&l!==null&&(w=31-It(m),a=_.hiddenUpdates,g=a[w],g===null?a[w]=[l]:g.push(l),l.lane=m|536870912),_):null}function hh(a){if(50<Of)throw Of=0,Q0=null,Error(r(185));for(var l=a.return;l!==null;)a=l,l=a.return;return a.tag===3?a.stateNode:null}var Zc={};function V9(a,l,m,g){this.tag=a,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gi(a,l,m,g){return new V9(a,l,m,g)}function Hx(a){return a=a.prototype,!(!a||!a.isReactComponent)}function ha(a,l){var m=a.alternate;return m===null?(m=gi(a.tag,l,a.key,a.mode),m.elementType=a.elementType,m.type=a.type,m.stateNode=a.stateNode,m.alternate=a,a.alternate=m):(m.pendingProps=l,m.type=a.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=a.flags&65011712,m.childLanes=a.childLanes,m.lanes=a.lanes,m.child=a.child,m.memoizedProps=a.memoizedProps,m.memoizedState=a.memoizedState,m.updateQueue=a.updateQueue,l=a.dependencies,m.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},m.sibling=a.sibling,m.index=a.index,m.ref=a.ref,m.refCleanup=a.refCleanup,m}function Kj(a,l){a.flags&=65011714;var m=a.alternate;return m===null?(a.childLanes=0,a.lanes=l,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=m.childLanes,a.lanes=m.lanes,a.child=m.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=m.memoizedProps,a.memoizedState=m.memoizedState,a.updateQueue=m.updateQueue,a.type=m.type,l=m.dependencies,a.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),a}function gh(a,l,m,g,w,_){var j=0;if(g=a,typeof a=="function")Hx(a)&&(j=1);else if(typeof a=="string")j=Kq(a,m,J.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case L:return a=gi(31,m,l,w),a.elementType=L,a.lanes=_,a;case S:return pl(m.children,w,_,l);case C:j=8,w|=24;break;case E:return a=gi(12,m,l,w|2),a.elementType=E,a.lanes=_,a;case A:return a=gi(13,m,l,w),a.elementType=A,a.lanes=_,a;case T:return a=gi(19,m,l,w),a.elementType=T,a.lanes=_,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case R:j=10;break e;case k:j=9;break e;case I:j=11;break e;case N:j=14;break e;case z:j=16,g=null;break e}j=29,m=Error(r(130,a===null?"null":typeof a,"")),g=null}return l=gi(j,m,l,w),l.elementType=a,l.type=g,l.lanes=_,l}function pl(a,l,m,g){return a=gi(7,a,g,l),a.lanes=m,a}function qx(a,l,m){return a=gi(6,a,null,l),a.lanes=m,a}function Zj(a){var l=gi(18,null,null,0);return l.stateNode=a,l}function Gx(a,l,m){return l=gi(4,a.children!==null?a.children:[],a.key,l),l.lanes=m,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}var Yj=new WeakMap;function Vi(a,l){if(typeof a=="object"&&a!==null){var m=Yj.get(a);return m!==void 0?m:(l={value:a,source:l,stack:Gr(l)},Yj.set(a,l),l)}return{value:a,source:l,stack:Gr(l)}}var Yc=[],Wc=0,vh=null,ff=0,Bi=[],Hi=0,os=null,Uo=1,Fo="";function ga(a,l){Yc[Wc++]=ff,Yc[Wc++]=vh,vh=a,ff=l}function Wj(a,l,m){Bi[Hi++]=Uo,Bi[Hi++]=Fo,Bi[Hi++]=os,os=a;var g=Uo;a=Fo;var w=32-It(g)-1;g&=~(1<<w),m+=1;var _=32-It(l)+w;if(30<_){var j=w-w%5;_=(g&(1<<j)-1).toString(32),g>>=j,w-=j,Uo=1<<32-It(l)+w|m<<w|g,Fo=_+a}else Uo=1<<_|m<<w|g,Fo=a}function Kx(a){a.return!==null&&(ga(a,1),Wj(a,1,0))}function Zx(a){for(;a===vh;)vh=Yc[--Wc],Yc[Wc]=null,ff=Yc[--Wc],Yc[Wc]=null;for(;a===os;)os=Bi[--Hi],Bi[Hi]=null,Fo=Bi[--Hi],Bi[Hi]=null,Uo=Bi[--Hi],Bi[Hi]=null}function Xj(a,l){Bi[Hi++]=Uo,Bi[Hi++]=Fo,Bi[Hi++]=os,Uo=l.id,Fo=l.overflow,os=a}var mr=null,tn=null,Tt=!1,as=null,qi=!1,Yx=Error(r(519));function ss(a){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw mf(Vi(l,a)),Yx}function Qj(a){var l=a.stateNode,m=a.type,g=a.memoizedProps;switch(l[fr]=a,l[Xr]=g,m){case"dialog":_t("cancel",l),_t("close",l);break;case"iframe":case"object":case"embed":_t("load",l);break;case"video":case"audio":for(m=0;m<Df.length;m++)_t(Df[m],l);break;case"source":_t("error",l);break;case"img":case"image":case"link":_t("error",l),_t("load",l);break;case"details":_t("toggle",l);break;case"input":_t("invalid",l),dj(l,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0);break;case"select":_t("invalid",l);break;case"textarea":_t("invalid",l),mj(l,g.value,g.defaultValue,g.children)}m=g.children,typeof m!="string"&&typeof m!="number"&&typeof m!="bigint"||l.textContent===""+m||g.suppressHydrationWarning===!0||hN(l.textContent,m)?(g.popover!=null&&(_t("beforetoggle",l),_t("toggle",l)),g.onScroll!=null&&_t("scroll",l),g.onScrollEnd!=null&&_t("scrollend",l),g.onClick!=null&&(l.onclick=ma),l=!0):l=!1,l||ss(a,!0)}function Jj(a){for(mr=a.return;mr;)switch(mr.tag){case 5:case 31:case 13:qi=!1;return;case 27:case 3:qi=!0;return;default:mr=mr.return}}function Xc(a){if(a!==mr)return!1;if(!Tt)return Jj(a),Tt=!0,!1;var l=a.tag,m;if((m=l!==3&&l!==27)&&((m=l===5)&&(m=a.type,m=!(m!=="form"&&m!=="button")||mw(a.type,a.memoizedProps)),m=!m),m&&tn&&ss(a),Jj(a),l===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));tn=CN(a)}else if(l===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));tn=CN(a)}else l===27?(l=tn,ws(a.type)?(a=yw,yw=null,tn=a):tn=l):tn=mr?Ki(a.stateNode.nextSibling):null;return!0}function hl(){tn=mr=null,Tt=!1}function Wx(){var a=as;return a!==null&&(ni===null?ni=a:ni.push.apply(ni,a),as=null),a}function mf(a){as===null?as=[a]:as.push(a)}var Xx=M(null),gl=null,va=null;function ls(a,l,m){O(Xx,l._currentValue),l._currentValue=m}function ya(a){a._currentValue=Xx.current,F(Xx)}function Qx(a,l,m){for(;a!==null;){var g=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),a===m)break;a=a.return}}function Jx(a,l,m,g){var w=a.child;for(w!==null&&(w.return=a);w!==null;){var _=w.dependencies;if(_!==null){var j=w.child;_=_.firstContext;e:for(;_!==null;){var D=_;_=w;for(var H=0;H<l.length;H++)if(D.context===l[H]){_.lanes|=m,D=_.alternate,D!==null&&(D.lanes|=m),Qx(_.return,m,a),g||(j=null);break e}_=D.next}}else if(w.tag===18){if(j=w.return,j===null)throw Error(r(341));j.lanes|=m,_=j.alternate,_!==null&&(_.lanes|=m),Qx(j,m,a),j=null}else j=w.child;if(j!==null)j.return=w;else for(j=w;j!==null;){if(j===a){j=null;break}if(w=j.sibling,w!==null){w.return=j.return,j=w;break}j=j.return}w=j}}function Qc(a,l,m,g){a=null;for(var w=l,_=!1;w!==null;){if(!_){if((w.flags&524288)!==0)_=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var j=w.alternate;if(j===null)throw Error(r(387));if(j=j.memoizedProps,j!==null){var D=w.type;hi(w.pendingProps.value,j.value)||(a!==null?a.push(D):a=[D])}}else if(w===V.current){if(j=w.alternate,j===null)throw Error(r(387));j.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(a!==null?a.push(Uf):a=[Uf])}w=w.return}a!==null&&Jx(l,a,m,g),l.flags|=262144}function yh(a){for(a=a.firstContext;a!==null;){if(!hi(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function vl(a){gl=a,va=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function pr(a){return eI(gl,a)}function bh(a,l){return gl===null&&vl(a),eI(a,l)}function eI(a,l){var m=l._currentValue;if(l={context:l,memoizedValue:m,next:null},va===null){if(a===null)throw Error(r(308));va=l,a.dependencies={lanes:0,firstContext:l},a.flags|=524288}else va=va.next=l;return m}var B9=typeof AbortController<"u"?AbortController:function(){var a=[],l=this.signal={aborted:!1,addEventListener:function(m,g){a.push(g)}};this.abort=function(){l.aborted=!0,a.forEach(function(m){return m()})}},H9=e.unstable_scheduleCallback,q9=e.unstable_NormalPriority,zn={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function e0(){return{controller:new B9,data:new Map,refCount:0}}function pf(a){a.refCount--,a.refCount===0&&H9(q9,function(){a.controller.abort()})}var hf=null,t0=0,Jc=0,eu=null;function G9(a,l){if(hf===null){var m=hf=[];t0=0,Jc=iw(),eu={status:"pending",value:void 0,then:function(g){m.push(g)}}}return t0++,l.then(tI,tI),l}function tI(){if(--t0===0&&hf!==null){eu!==null&&(eu.status="fulfilled");var a=hf;hf=null,Jc=0,eu=null;for(var l=0;l<a.length;l++)(0,a[l])()}}function K9(a,l){var m=[],g={status:"pending",value:null,reason:null,then:function(w){m.push(w)}};return a.then(function(){g.status="fulfilled",g.value=l;for(var w=0;w<m.length;w++)(0,m[w])(l)},function(w){for(g.status="rejected",g.reason=w,w=0;w<m.length;w++)(0,m[w])(void 0)}),g}var nI=P.S;P.S=function(a,l){LT=ve(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&G9(a,l),nI!==null&&nI(a,l)};var yl=M(null);function n0(){var a=yl.current;return a!==null?a:Zt.pooledCache}function xh(a,l){l===null?O(yl,yl.current):O(yl,l.pool)}function rI(){var a=n0();return a===null?null:{parent:zn._currentValue,pool:a}}var tu=Error(r(460)),r0=Error(r(474)),wh=Error(r(542)),Sh={then:function(){}};function iI(a){return a=a.status,a==="fulfilled"||a==="rejected"}function oI(a,l,m){switch(m=a[m],m===void 0?a.push(l):m!==l&&(l.then(ma,ma),l=m),l.status){case"fulfilled":return l.value;case"rejected":throw a=l.reason,sI(a),a;default:if(typeof l.status=="string")l.then(ma,ma);else{if(a=Zt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=l,a.status="pending",a.then(function(g){if(l.status==="pending"){var w=l;w.status="fulfilled",w.value=g}},function(g){if(l.status==="pending"){var w=l;w.status="rejected",w.reason=g}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw a=l.reason,sI(a),a}throw xl=l,tu}}function bl(a){try{var l=a._init;return l(a._payload)}catch(m){throw m!==null&&typeof m=="object"&&typeof m.then=="function"?(xl=m,tu):m}}var xl=null;function aI(){if(xl===null)throw Error(r(459));var a=xl;return xl=null,a}function sI(a){if(a===tu||a===wh)throw Error(r(483))}var nu=null,gf=0;function _h(a){var l=gf;return gf+=1,nu===null&&(nu=[]),oI(nu,a,l)}function vf(a,l){l=l.props.ref,a.ref=l!==void 0?l:null}function Ch(a,l){throw l.$$typeof===v?Error(r(525)):(a=Object.prototype.toString.call(l),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":a)))}function lI(a){function l(re,Q){if(a){var se=re.deletions;se===null?(re.deletions=[Q],re.flags|=16):se.push(Q)}}function m(re,Q){if(!a)return null;for(;Q!==null;)l(re,Q),Q=Q.sibling;return null}function g(re){for(var Q=new Map;re!==null;)re.key!==null?Q.set(re.key,re):Q.set(re.index,re),re=re.sibling;return Q}function w(re,Q){return re=ha(re,Q),re.index=0,re.sibling=null,re}function _(re,Q,se){return re.index=se,a?(se=re.alternate,se!==null?(se=se.index,se<Q?(re.flags|=67108866,Q):se):(re.flags|=67108866,Q)):(re.flags|=1048576,Q)}function j(re){return a&&re.alternate===null&&(re.flags|=67108866),re}function D(re,Q,se,ge){return Q===null||Q.tag!==6?(Q=qx(se,re.mode,ge),Q.return=re,Q):(Q=w(Q,se),Q.return=re,Q)}function H(re,Q,se,ge){var Ze=se.type;return Ze===S?he(re,Q,se.props.children,ge,se.key):Q!==null&&(Q.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===z&&bl(Ze)===Q.type)?(Q=w(Q,se.props),vf(Q,se),Q.return=re,Q):(Q=gh(se.type,se.key,se.props,null,re.mode,ge),vf(Q,se),Q.return=re,Q)}function le(re,Q,se,ge){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==se.containerInfo||Q.stateNode.implementation!==se.implementation?(Q=Gx(se,re.mode,ge),Q.return=re,Q):(Q=w(Q,se.children||[]),Q.return=re,Q)}function he(re,Q,se,ge,Ze){return Q===null||Q.tag!==7?(Q=pl(se,re.mode,ge,Ze),Q.return=re,Q):(Q=w(Q,se),Q.return=re,Q)}function be(re,Q,se){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=qx(""+Q,re.mode,se),Q.return=re,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case y:return se=gh(Q.type,Q.key,Q.props,null,re.mode,se),vf(se,Q),se.return=re,se;case b:return Q=Gx(Q,re.mode,se),Q.return=re,Q;case z:return Q=bl(Q),be(re,Q,se)}if(W(Q)||Z(Q))return Q=pl(Q,re.mode,se,null),Q.return=re,Q;if(typeof Q.then=="function")return be(re,_h(Q),se);if(Q.$$typeof===R)return be(re,bh(re,Q),se);Ch(re,Q)}return null}function ce(re,Q,se,ge){var Ze=Q!==null?Q.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Ze!==null?null:D(re,Q,""+se,ge);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case y:return se.key===Ze?H(re,Q,se,ge):null;case b:return se.key===Ze?le(re,Q,se,ge):null;case z:return se=bl(se),ce(re,Q,se,ge)}if(W(se)||Z(se))return Ze!==null?null:he(re,Q,se,ge,null);if(typeof se.then=="function")return ce(re,Q,_h(se),ge);if(se.$$typeof===R)return ce(re,Q,bh(re,se),ge);Ch(re,se)}return null}function me(re,Q,se,ge,Ze){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return re=re.get(se)||null,D(Q,re,""+ge,Ze);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case y:return re=re.get(ge.key===null?se:ge.key)||null,H(Q,re,ge,Ze);case b:return re=re.get(ge.key===null?se:ge.key)||null,le(Q,re,ge,Ze);case z:return ge=bl(ge),me(re,Q,se,ge,Ze)}if(W(ge)||Z(ge))return re=re.get(se)||null,he(Q,re,ge,Ze,null);if(typeof ge.then=="function")return me(re,Q,se,_h(ge),Ze);if(ge.$$typeof===R)return me(re,Q,se,bh(Q,ge),Ze);Ch(Q,ge)}return null}function ze(re,Q,se,ge){for(var Ze=null,At=null,qe=Q,mt=Q=0,kt=null;qe!==null&&mt<se.length;mt++){qe.index>mt?(kt=qe,qe=null):kt=qe.sibling;var Ot=ce(re,qe,se[mt],ge);if(Ot===null){qe===null&&(qe=kt);break}a&&qe&&Ot.alternate===null&&l(re,qe),Q=_(Ot,Q,mt),At===null?Ze=Ot:At.sibling=Ot,At=Ot,qe=kt}if(mt===se.length)return m(re,qe),Tt&&ga(re,mt),Ze;if(qe===null){for(;mt<se.length;mt++)qe=be(re,se[mt],ge),qe!==null&&(Q=_(qe,Q,mt),At===null?Ze=qe:At.sibling=qe,At=qe);return Tt&&ga(re,mt),Ze}for(qe=g(qe);mt<se.length;mt++)kt=me(qe,re,mt,se[mt],ge),kt!==null&&(a&&kt.alternate!==null&&qe.delete(kt.key===null?mt:kt.key),Q=_(kt,Q,mt),At===null?Ze=kt:At.sibling=kt,At=kt);return a&&qe.forEach(function(ks){return l(re,ks)}),Tt&&ga(re,mt),Ze}function Xe(re,Q,se,ge){if(se==null)throw Error(r(151));for(var Ze=null,At=null,qe=Q,mt=Q=0,kt=null,Ot=se.next();qe!==null&&!Ot.done;mt++,Ot=se.next()){qe.index>mt?(kt=qe,qe=null):kt=qe.sibling;var ks=ce(re,qe,Ot.value,ge);if(ks===null){qe===null&&(qe=kt);break}a&&qe&&ks.alternate===null&&l(re,qe),Q=_(ks,Q,mt),At===null?Ze=ks:At.sibling=ks,At=ks,qe=kt}if(Ot.done)return m(re,qe),Tt&&ga(re,mt),Ze;if(qe===null){for(;!Ot.done;mt++,Ot=se.next())Ot=be(re,Ot.value,ge),Ot!==null&&(Q=_(Ot,Q,mt),At===null?Ze=Ot:At.sibling=Ot,At=Ot);return Tt&&ga(re,mt),Ze}for(qe=g(qe);!Ot.done;mt++,Ot=se.next())Ot=me(qe,re,mt,Ot.value,ge),Ot!==null&&(a&&Ot.alternate!==null&&qe.delete(Ot.key===null?mt:Ot.key),Q=_(Ot,Q,mt),At===null?Ze=Ot:At.sibling=Ot,At=Ot);return a&&qe.forEach(function(iG){return l(re,iG)}),Tt&&ga(re,mt),Ze}function Gt(re,Q,se,ge){if(typeof se=="object"&&se!==null&&se.type===S&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case y:e:{for(var Ze=se.key;Q!==null;){if(Q.key===Ze){if(Ze=se.type,Ze===S){if(Q.tag===7){m(re,Q.sibling),ge=w(Q,se.props.children),ge.return=re,re=ge;break e}}else if(Q.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===z&&bl(Ze)===Q.type){m(re,Q.sibling),ge=w(Q,se.props),vf(ge,se),ge.return=re,re=ge;break e}m(re,Q);break}else l(re,Q);Q=Q.sibling}se.type===S?(ge=pl(se.props.children,re.mode,ge,se.key),ge.return=re,re=ge):(ge=gh(se.type,se.key,se.props,null,re.mode,ge),vf(ge,se),ge.return=re,re=ge)}return j(re);case b:e:{for(Ze=se.key;Q!==null;){if(Q.key===Ze)if(Q.tag===4&&Q.stateNode.containerInfo===se.containerInfo&&Q.stateNode.implementation===se.implementation){m(re,Q.sibling),ge=w(Q,se.children||[]),ge.return=re,re=ge;break e}else{m(re,Q);break}else l(re,Q);Q=Q.sibling}ge=Gx(se,re.mode,ge),ge.return=re,re=ge}return j(re);case z:return se=bl(se),Gt(re,Q,se,ge)}if(W(se))return ze(re,Q,se,ge);if(Z(se)){if(Ze=Z(se),typeof Ze!="function")throw Error(r(150));return se=Ze.call(se),Xe(re,Q,se,ge)}if(typeof se.then=="function")return Gt(re,Q,_h(se),ge);if(se.$$typeof===R)return Gt(re,Q,bh(re,se),ge);Ch(re,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,Q!==null&&Q.tag===6?(m(re,Q.sibling),ge=w(Q,se),ge.return=re,re=ge):(m(re,Q),ge=qx(se,re.mode,ge),ge.return=re,re=ge),j(re)):m(re,Q)}return function(re,Q,se,ge){try{gf=0;var Ze=Gt(re,Q,se,ge);return nu=null,Ze}catch(qe){if(qe===tu||qe===wh)throw qe;var At=gi(29,qe,null,re.mode);return At.lanes=ge,At.return=re,At}finally{}}}var wl=lI(!0),cI=lI(!1),cs=!1;function i0(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function o0(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function us(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function ds(a,l,m){var g=a.updateQueue;if(g===null)return null;if(g=g.shared,(Dt&2)!==0){var w=g.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),g.pending=l,l=hh(a),Gj(a,null,m),l}return ph(a,g,l,m),hh(a)}function yf(a,l,m){if(l=l.updateQueue,l!==null&&(l=l.shared,(m&4194048)!==0)){var g=l.lanes;g&=a.pendingLanes,m|=g,l.lanes=m,Yr(a,m)}}function a0(a,l){var m=a.updateQueue,g=a.alternate;if(g!==null&&(g=g.updateQueue,m===g)){var w=null,_=null;if(m=m.firstBaseUpdate,m!==null){do{var j={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};_===null?w=_=j:_=_.next=j,m=m.next}while(m!==null);_===null?w=_=l:_=_.next=l}else w=_=l;m={baseState:g.baseState,firstBaseUpdate:w,lastBaseUpdate:_,shared:g.shared,callbacks:g.callbacks},a.updateQueue=m;return}a=m.lastBaseUpdate,a===null?m.firstBaseUpdate=l:a.next=l,m.lastBaseUpdate=l}var s0=!1;function bf(){if(s0){var a=eu;if(a!==null)throw a}}function xf(a,l,m,g){s0=!1;var w=a.updateQueue;cs=!1;var _=w.firstBaseUpdate,j=w.lastBaseUpdate,D=w.shared.pending;if(D!==null){w.shared.pending=null;var H=D,le=H.next;H.next=null,j===null?_=le:j.next=le,j=H;var he=a.alternate;he!==null&&(he=he.updateQueue,D=he.lastBaseUpdate,D!==j&&(D===null?he.firstBaseUpdate=le:D.next=le,he.lastBaseUpdate=H))}if(_!==null){var be=w.baseState;j=0,he=le=H=null,D=_;do{var ce=D.lane&-536870913,me=ce!==D.lane;if(me?(Et&ce)===ce:(g&ce)===ce){ce!==0&&ce===Jc&&(s0=!0),he!==null&&(he=he.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var ze=a,Xe=D;ce=l;var Gt=m;switch(Xe.tag){case 1:if(ze=Xe.payload,typeof ze=="function"){be=ze.call(Gt,be,ce);break e}be=ze;break e;case 3:ze.flags=ze.flags&-65537|128;case 0:if(ze=Xe.payload,ce=typeof ze=="function"?ze.call(Gt,be,ce):ze,ce==null)break e;be=h({},be,ce);break e;case 2:cs=!0}}ce=D.callback,ce!==null&&(a.flags|=64,me&&(a.flags|=8192),me=w.callbacks,me===null?w.callbacks=[ce]:me.push(ce))}else me={lane:ce,tag:D.tag,payload:D.payload,callback:D.callback,next:null},he===null?(le=he=me,H=be):he=he.next=me,j|=ce;if(D=D.next,D===null){if(D=w.shared.pending,D===null)break;me=D,D=me.next,me.next=null,w.lastBaseUpdate=me,w.shared.pending=null}}while(!0);he===null&&(H=be),w.baseState=H,w.firstBaseUpdate=le,w.lastBaseUpdate=he,_===null&&(w.shared.lanes=0),gs|=j,a.lanes=j,a.memoizedState=be}}function uI(a,l){if(typeof a!="function")throw Error(r(191,a));a.call(l)}function dI(a,l){var m=a.callbacks;if(m!==null)for(a.callbacks=null,a=0;a<m.length;a++)uI(m[a],l)}var ru=M(null),Eh=M(0);function fI(a,l){a=Ra,O(Eh,a),O(ru,l),Ra=a|l.baseLanes}function l0(){O(Eh,Ra),O(ru,ru.current)}function c0(){Ra=Eh.current,F(ru),F(Eh)}var vi=M(null),Gi=null;function fs(a){var l=a.alternate;O(Tn,Tn.current&1),O(vi,a),Gi===null&&(l===null||ru.current!==null||l.memoizedState!==null)&&(Gi=a)}function u0(a){O(Tn,Tn.current),O(vi,a),Gi===null&&(Gi=a)}function mI(a){a.tag===22?(O(Tn,Tn.current),O(vi,a),Gi===null&&(Gi=a)):ms()}function ms(){O(Tn,Tn.current),O(vi,vi.current)}function yi(a){F(vi),Gi===a&&(Gi=null),F(Tn)}var Tn=M(0);function kh(a){for(var l=a;l!==null;){if(l.tag===13){var m=l.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||gw(m)||vw(m)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var ba=0,ut=null,Ht=null,Ln=null,Rh=!1,iu=!1,Sl=!1,jh=0,wf=0,ou=null,Z9=0;function Sn(){throw Error(r(321))}function d0(a,l){if(l===null)return!1;for(var m=0;m<l.length&&m<a.length;m++)if(!hi(a[m],l[m]))return!1;return!0}function f0(a,l,m,g,w,_){return ba=_,ut=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,P.H=a===null||a.memoizedState===null?WI:R0,Sl=!1,_=m(g,w),Sl=!1,iu&&(_=hI(l,m,g,w)),pI(a),_}function pI(a){P.H=Cf;var l=Ht!==null&&Ht.next!==null;if(ba=0,Ln=Ht=ut=null,Rh=!1,wf=0,ou=null,l)throw Error(r(300));a===null||Un||(a=a.dependencies,a!==null&&yh(a)&&(Un=!0))}function hI(a,l,m,g){ut=a;var w=0;do{if(iu&&(ou=null),wf=0,iu=!1,25<=w)throw Error(r(301));if(w+=1,Ln=Ht=null,a.updateQueue!=null){var _=a.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}P.H=XI,_=l(m,g)}while(iu);return _}function Y9(){var a=P.H,l=a.useState()[0];return l=typeof l.then=="function"?Sf(l):l,a=a.useState()[0],(Ht!==null?Ht.memoizedState:null)!==a&&(ut.flags|=1024),l}function m0(){var a=jh!==0;return jh=0,a}function p0(a,l,m){l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~m}function h0(a){if(Rh){for(a=a.memoizedState;a!==null;){var l=a.queue;l!==null&&(l.pending=null),a=a.next}Rh=!1}ba=0,Ln=Ht=ut=null,iu=!1,wf=jh=0,ou=null}function Tr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ln===null?ut.memoizedState=Ln=a:Ln=Ln.next=a,Ln}function Nn(){if(Ht===null){var a=ut.alternate;a=a!==null?a.memoizedState:null}else a=Ht.next;var l=Ln===null?ut.memoizedState:Ln.next;if(l!==null)Ln=l,Ht=a;else{if(a===null)throw ut.alternate===null?Error(r(467)):Error(r(310));Ht=a,a={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},Ln===null?ut.memoizedState=Ln=a:Ln=Ln.next=a}return Ln}function Ih(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Sf(a){var l=wf;return wf+=1,ou===null&&(ou=[]),a=oI(ou,a,l),l=ut,(Ln===null?l.memoizedState:Ln.next)===null&&(l=l.alternate,P.H=l===null||l.memoizedState===null?WI:R0),a}function Th(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Sf(a);if(a.$$typeof===R)return pr(a)}throw Error(r(438,String(a)))}function g0(a){var l=null,m=ut.updateQueue;if(m!==null&&(l=m.memoCache),l==null){var g=ut.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(l={data:g.data.map(function(w){return w.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),m===null&&(m=Ih(),ut.updateQueue=m),m.memoCache=l,m=l.data[l.index],m===void 0)for(m=l.data[l.index]=Array(a),g=0;g<a;g++)m[g]=K;return l.index++,m}function xa(a,l){return typeof l=="function"?l(a):l}function Nh(a){var l=Nn();return v0(l,Ht,a)}function v0(a,l,m){var g=a.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=m;var w=a.baseQueue,_=g.pending;if(_!==null){if(w!==null){var j=w.next;w.next=_.next,_.next=j}l.baseQueue=w=_,g.pending=null}if(_=a.baseState,w===null)a.memoizedState=_;else{l=w.next;var D=j=null,H=null,le=l,he=!1;do{var be=le.lane&-536870913;if(be!==le.lane?(Et&be)===be:(ba&be)===be){var ce=le.revertLane;if(ce===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),be===Jc&&(he=!0);else if((ba&ce)===ce){le=le.next,ce===Jc&&(he=!0);continue}else be={lane:0,revertLane:le.revertLane,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},H===null?(D=H=be,j=_):H=H.next=be,ut.lanes|=ce,gs|=ce;be=le.action,Sl&&m(_,be),_=le.hasEagerState?le.eagerState:m(_,be)}else ce={lane:be,revertLane:le.revertLane,gesture:le.gesture,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},H===null?(D=H=ce,j=_):H=H.next=ce,ut.lanes|=be,gs|=be;le=le.next}while(le!==null&&le!==l);if(H===null?j=_:H.next=D,!hi(_,a.memoizedState)&&(Un=!0,he&&(m=eu,m!==null)))throw m;a.memoizedState=_,a.baseState=j,a.baseQueue=H,g.lastRenderedState=_}return w===null&&(g.lanes=0),[a.memoizedState,g.dispatch]}function y0(a){var l=Nn(),m=l.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=a;var g=m.dispatch,w=m.pending,_=l.memoizedState;if(w!==null){m.pending=null;var j=w=w.next;do _=a(_,j.action),j=j.next;while(j!==w);hi(_,l.memoizedState)||(Un=!0),l.memoizedState=_,l.baseQueue===null&&(l.baseState=_),m.lastRenderedState=_}return[_,g]}function gI(a,l,m){var g=ut,w=Nn(),_=Tt;if(_){if(m===void 0)throw Error(r(407));m=m()}else m=l();var j=!hi((Ht||w).memoizedState,m);if(j&&(w.memoizedState=m,Un=!0),w=w.queue,w0(bI.bind(null,g,w,a),[a]),w.getSnapshot!==l||j||Ln!==null&&Ln.memoizedState.tag&1){if(g.flags|=2048,au(9,{destroy:void 0},yI.bind(null,g,w,m,l),null),Zt===null)throw Error(r(349));_||(ba&127)!==0||vI(g,l,m)}return m}function vI(a,l,m){a.flags|=16384,a={getSnapshot:l,value:m},l=ut.updateQueue,l===null?(l=Ih(),ut.updateQueue=l,l.stores=[a]):(m=l.stores,m===null?l.stores=[a]:m.push(a))}function yI(a,l,m,g){l.value=m,l.getSnapshot=g,xI(l)&&wI(a)}function bI(a,l,m){return m(function(){xI(l)&&wI(a)})}function xI(a){var l=a.getSnapshot;a=a.value;try{var m=l();return!hi(a,m)}catch{return!0}}function wI(a){var l=ml(a,2);l!==null&&ri(l,a,2)}function b0(a){var l=Tr();if(typeof a=="function"){var m=a;if(a=m(),Sl){In(!0);try{m()}finally{In(!1)}}}return l.memoizedState=l.baseState=a,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:a},l}function SI(a,l,m,g){return a.baseState=m,v0(a,Ht,typeof g=="function"?g:xa)}function W9(a,l,m,g,w){if($h(a))throw Error(r(485));if(a=l.action,a!==null){var _={payload:w,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(j){_.listeners.push(j)}};P.T!==null?m(!0):_.isTransition=!1,g(_),m=l.pending,m===null?(_.next=l.pending=_,_I(l,_)):(_.next=m.next,l.pending=m.next=_)}}function _I(a,l){var m=l.action,g=l.payload,w=a.state;if(l.isTransition){var _=P.T,j={};P.T=j;try{var D=m(w,g),H=P.S;H!==null&&H(j,D),CI(a,l,D)}catch(le){x0(a,l,le)}finally{_!==null&&j.types!==null&&(_.types=j.types),P.T=_}}else try{_=m(w,g),CI(a,l,_)}catch(le){x0(a,l,le)}}function CI(a,l,m){m!==null&&typeof m=="object"&&typeof m.then=="function"?m.then(function(g){EI(a,l,g)},function(g){return x0(a,l,g)}):EI(a,l,m)}function EI(a,l,m){l.status="fulfilled",l.value=m,kI(l),a.state=m,l=a.pending,l!==null&&(m=l.next,m===l?a.pending=null:(m=m.next,l.next=m,_I(a,m)))}function x0(a,l,m){var g=a.pending;if(a.pending=null,g!==null){g=g.next;do l.status="rejected",l.reason=m,kI(l),l=l.next;while(l!==g)}a.action=null}function kI(a){a=a.listeners;for(var l=0;l<a.length;l++)(0,a[l])()}function RI(a,l){return l}function jI(a,l){if(Tt){var m=Zt.formState;if(m!==null){e:{var g=ut;if(Tt){if(tn){t:{for(var w=tn,_=qi;w.nodeType!==8;){if(!_){w=null;break t}if(w=Ki(w.nextSibling),w===null){w=null;break t}}_=w.data,w=_==="F!"||_==="F"?w:null}if(w){tn=Ki(w.nextSibling),g=w.data==="F!";break e}}ss(g)}g=!1}g&&(l=m[0])}}return m=Tr(),m.memoizedState=m.baseState=l,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:RI,lastRenderedState:l},m.queue=g,m=KI.bind(null,ut,g),g.dispatch=m,g=b0(!1),_=k0.bind(null,ut,!1,g.queue),g=Tr(),w={state:l,dispatch:null,action:a,pending:null},g.queue=w,m=W9.bind(null,ut,w,_,m),w.dispatch=m,g.memoizedState=a,[l,m,!1]}function II(a){var l=Nn();return TI(l,Ht,a)}function TI(a,l,m){if(l=v0(a,l,RI)[0],a=Nh(xa)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var g=Sf(l)}catch(j){throw j===tu?wh:j}else g=l;l=Nn();var w=l.queue,_=w.dispatch;return m!==l.memoizedState&&(ut.flags|=2048,au(9,{destroy:void 0},X9.bind(null,w,m),null)),[g,_,a]}function X9(a,l){a.action=l}function NI(a){var l=Nn(),m=Ht;if(m!==null)return TI(l,m,a);Nn(),l=l.memoizedState,m=Nn();var g=m.queue.dispatch;return m.memoizedState=a,[l,g,!1]}function au(a,l,m,g){return a={tag:a,create:m,deps:g,inst:l,next:null},l=ut.updateQueue,l===null&&(l=Ih(),ut.updateQueue=l),m=l.lastEffect,m===null?l.lastEffect=a.next=a:(g=m.next,m.next=a,a.next=g,l.lastEffect=a),a}function AI(){return Nn().memoizedState}function Ah(a,l,m,g){var w=Tr();ut.flags|=a,w.memoizedState=au(1|l,{destroy:void 0},m,g===void 0?null:g)}function Oh(a,l,m,g){var w=Nn();g=g===void 0?null:g;var _=w.memoizedState.inst;Ht!==null&&g!==null&&d0(g,Ht.memoizedState.deps)?w.memoizedState=au(l,_,m,g):(ut.flags|=a,w.memoizedState=au(1|l,_,m,g))}function OI(a,l){Ah(8390656,8,a,l)}function w0(a,l){Oh(2048,8,a,l)}function Q9(a){ut.flags|=4;var l=ut.updateQueue;if(l===null)l=Ih(),ut.updateQueue=l,l.events=[a];else{var m=l.events;m===null?l.events=[a]:m.push(a)}}function $I(a){var l=Nn().memoizedState;return Q9({ref:l,nextImpl:a}),function(){if((Dt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function DI(a,l){return Oh(4,2,a,l)}function PI(a,l){return Oh(4,4,a,l)}function MI(a,l){if(typeof l=="function"){a=a();var m=l(a);return function(){typeof m=="function"?m():l(null)}}if(l!=null)return a=a(),l.current=a,function(){l.current=null}}function zI(a,l,m){m=m!=null?m.concat([a]):null,Oh(4,4,MI.bind(null,l,a),m)}function S0(){}function LI(a,l){var m=Nn();l=l===void 0?null:l;var g=m.memoizedState;return l!==null&&d0(l,g[1])?g[0]:(m.memoizedState=[a,l],a)}function UI(a,l){var m=Nn();l=l===void 0?null:l;var g=m.memoizedState;if(l!==null&&d0(l,g[1]))return g[0];if(g=a(),Sl){In(!0);try{a()}finally{In(!1)}}return m.memoizedState=[g,l],g}function _0(a,l,m){return m===void 0||(ba&1073741824)!==0&&(Et&261930)===0?a.memoizedState=l:(a.memoizedState=m,a=FT(),ut.lanes|=a,gs|=a,m)}function FI(a,l,m,g){return hi(m,l)?m:ru.current!==null?(a=_0(a,m,g),hi(a,l)||(Un=!0),a):(ba&42)===0||(ba&1073741824)!==0&&(Et&261930)===0?(Un=!0,a.memoizedState=m):(a=FT(),ut.lanes|=a,gs|=a,l)}function VI(a,l,m,g,w){var _=G.p;G.p=_!==0&&8>_?_:8;var j=P.T,D={};P.T=D,k0(a,!1,l,m);try{var H=w(),le=P.S;if(le!==null&&le(D,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var he=K9(H,g);_f(a,l,he,wi(a))}else _f(a,l,g,wi(a))}catch(be){_f(a,l,{then:function(){},status:"rejected",reason:be},wi())}finally{G.p=_,j!==null&&D.types!==null&&(j.types=D.types),P.T=j}}function J9(){}function C0(a,l,m,g){if(a.tag!==5)throw Error(r(476));var w=BI(a).queue;VI(a,w,l,U,m===null?J9:function(){return HI(a),m(g)})}function BI(a){var l=a.memoizedState;if(l!==null)return l;l={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:U},next:null};var m={};return l.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:m},next:null},a.memoizedState=l,a=a.alternate,a!==null&&(a.memoizedState=l),l}function HI(a){var l=BI(a);l.next===null&&(l=a.alternate.memoizedState),_f(a,l.next.queue,{},wi())}function E0(){return pr(Uf)}function qI(){return Nn().memoizedState}function GI(){return Nn().memoizedState}function eq(a){for(var l=a.return;l!==null;){switch(l.tag){case 24:case 3:var m=wi();a=us(m);var g=ds(l,a,m);g!==null&&(ri(g,l,m),yf(g,l,m)),l={cache:e0()},a.payload=l;return}l=l.return}}function tq(a,l,m){var g=wi();m={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},$h(a)?ZI(l,m):(m=Bx(a,l,m,g),m!==null&&(ri(m,a,g),YI(m,l,g)))}function KI(a,l,m){var g=wi();_f(a,l,m,g)}function _f(a,l,m,g){var w={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if($h(a))ZI(l,w);else{var _=a.alternate;if(a.lanes===0&&(_===null||_.lanes===0)&&(_=l.lastRenderedReducer,_!==null))try{var j=l.lastRenderedState,D=_(j,m);if(w.hasEagerState=!0,w.eagerState=D,hi(D,j))return ph(a,l,w,0),Zt===null&&mh(),!1}catch{}finally{}if(m=Bx(a,l,w,g),m!==null)return ri(m,a,g),YI(m,l,g),!0}return!1}function k0(a,l,m,g){if(g={lane:2,revertLane:iw(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},$h(a)){if(l)throw Error(r(479))}else l=Bx(a,m,g,2),l!==null&&ri(l,a,2)}function $h(a){var l=a.alternate;return a===ut||l!==null&&l===ut}function ZI(a,l){iu=Rh=!0;var m=a.pending;m===null?l.next=l:(l.next=m.next,m.next=l),a.pending=l}function YI(a,l,m){if((m&4194048)!==0){var g=l.lanes;g&=a.pendingLanes,m|=g,l.lanes=m,Yr(a,m)}}var Cf={readContext:pr,use:Th,useCallback:Sn,useContext:Sn,useEffect:Sn,useImperativeHandle:Sn,useLayoutEffect:Sn,useInsertionEffect:Sn,useMemo:Sn,useReducer:Sn,useRef:Sn,useState:Sn,useDebugValue:Sn,useDeferredValue:Sn,useTransition:Sn,useSyncExternalStore:Sn,useId:Sn,useHostTransitionStatus:Sn,useFormState:Sn,useActionState:Sn,useOptimistic:Sn,useMemoCache:Sn,useCacheRefresh:Sn};Cf.useEffectEvent=Sn;var WI={readContext:pr,use:Th,useCallback:function(a,l){return Tr().memoizedState=[a,l===void 0?null:l],a},useContext:pr,useEffect:OI,useImperativeHandle:function(a,l,m){m=m!=null?m.concat([a]):null,Ah(4194308,4,MI.bind(null,l,a),m)},useLayoutEffect:function(a,l){return Ah(4194308,4,a,l)},useInsertionEffect:function(a,l){Ah(4,2,a,l)},useMemo:function(a,l){var m=Tr();l=l===void 0?null:l;var g=a();if(Sl){In(!0);try{a()}finally{In(!1)}}return m.memoizedState=[g,l],g},useReducer:function(a,l,m){var g=Tr();if(m!==void 0){var w=m(l);if(Sl){In(!0);try{m(l)}finally{In(!1)}}}else w=l;return g.memoizedState=g.baseState=w,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:w},g.queue=a,a=a.dispatch=tq.bind(null,ut,a),[g.memoizedState,a]},useRef:function(a){var l=Tr();return a={current:a},l.memoizedState=a},useState:function(a){a=b0(a);var l=a.queue,m=KI.bind(null,ut,l);return l.dispatch=m,[a.memoizedState,m]},useDebugValue:S0,useDeferredValue:function(a,l){var m=Tr();return _0(m,a,l)},useTransition:function(){var a=b0(!1);return a=VI.bind(null,ut,a.queue,!0,!1),Tr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,l,m){var g=ut,w=Tr();if(Tt){if(m===void 0)throw Error(r(407));m=m()}else{if(m=l(),Zt===null)throw Error(r(349));(Et&127)!==0||vI(g,l,m)}w.memoizedState=m;var _={value:m,getSnapshot:l};return w.queue=_,OI(bI.bind(null,g,_,a),[a]),g.flags|=2048,au(9,{destroy:void 0},yI.bind(null,g,_,m,l),null),m},useId:function(){var a=Tr(),l=Zt.identifierPrefix;if(Tt){var m=Fo,g=Uo;m=(g&~(1<<32-It(g)-1)).toString(32)+m,l="_"+l+"R_"+m,m=jh++,0<m&&(l+="H"+m.toString(32)),l+="_"}else m=Z9++,l="_"+l+"r_"+m.toString(32)+"_";return a.memoizedState=l},useHostTransitionStatus:E0,useFormState:jI,useActionState:jI,useOptimistic:function(a){var l=Tr();l.memoizedState=l.baseState=a;var m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=m,l=k0.bind(null,ut,!0,m),m.dispatch=l,[a,l]},useMemoCache:g0,useCacheRefresh:function(){return Tr().memoizedState=eq.bind(null,ut)},useEffectEvent:function(a){var l=Tr(),m={impl:a};return l.memoizedState=m,function(){if((Dt&2)!==0)throw Error(r(440));return m.impl.apply(void 0,arguments)}}},R0={readContext:pr,use:Th,useCallback:LI,useContext:pr,useEffect:w0,useImperativeHandle:zI,useInsertionEffect:DI,useLayoutEffect:PI,useMemo:UI,useReducer:Nh,useRef:AI,useState:function(){return Nh(xa)},useDebugValue:S0,useDeferredValue:function(a,l){var m=Nn();return FI(m,Ht.memoizedState,a,l)},useTransition:function(){var a=Nh(xa)[0],l=Nn().memoizedState;return[typeof a=="boolean"?a:Sf(a),l]},useSyncExternalStore:gI,useId:qI,useHostTransitionStatus:E0,useFormState:II,useActionState:II,useOptimistic:function(a,l){var m=Nn();return SI(m,Ht,a,l)},useMemoCache:g0,useCacheRefresh:GI};R0.useEffectEvent=$I;var XI={readContext:pr,use:Th,useCallback:LI,useContext:pr,useEffect:w0,useImperativeHandle:zI,useInsertionEffect:DI,useLayoutEffect:PI,useMemo:UI,useReducer:y0,useRef:AI,useState:function(){return y0(xa)},useDebugValue:S0,useDeferredValue:function(a,l){var m=Nn();return Ht===null?_0(m,a,l):FI(m,Ht.memoizedState,a,l)},useTransition:function(){var a=y0(xa)[0],l=Nn().memoizedState;return[typeof a=="boolean"?a:Sf(a),l]},useSyncExternalStore:gI,useId:qI,useHostTransitionStatus:E0,useFormState:NI,useActionState:NI,useOptimistic:function(a,l){var m=Nn();return Ht!==null?SI(m,Ht,a,l):(m.baseState=a,[a,m.queue.dispatch])},useMemoCache:g0,useCacheRefresh:GI};XI.useEffectEvent=$I;function j0(a,l,m,g){l=a.memoizedState,m=m(g,l),m=m==null?l:h({},l,m),a.memoizedState=m,a.lanes===0&&(a.updateQueue.baseState=m)}var I0={enqueueSetState:function(a,l,m){a=a._reactInternals;var g=wi(),w=us(g);w.payload=l,m!=null&&(w.callback=m),l=ds(a,w,g),l!==null&&(ri(l,a,g),yf(l,a,g))},enqueueReplaceState:function(a,l,m){a=a._reactInternals;var g=wi(),w=us(g);w.tag=1,w.payload=l,m!=null&&(w.callback=m),l=ds(a,w,g),l!==null&&(ri(l,a,g),yf(l,a,g))},enqueueForceUpdate:function(a,l){a=a._reactInternals;var m=wi(),g=us(m);g.tag=2,l!=null&&(g.callback=l),l=ds(a,g,m),l!==null&&(ri(l,a,m),yf(l,a,m))}};function QI(a,l,m,g,w,_,j){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(g,_,j):l.prototype&&l.prototype.isPureReactComponent?!uf(m,g)||!uf(w,_):!0}function JI(a,l,m,g){a=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(m,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(m,g),l.state!==a&&I0.enqueueReplaceState(l,l.state,null)}function _l(a,l){var m=l;if("ref"in l){m={};for(var g in l)g!=="ref"&&(m[g]=l[g])}if(a=a.defaultProps){m===l&&(m=h({},m));for(var w in a)m[w]===void 0&&(m[w]=a[w])}return m}function eT(a){fh(a)}function tT(a){console.error(a)}function nT(a){fh(a)}function Dh(a,l){try{var m=a.onUncaughtError;m(l.value,{componentStack:l.stack})}catch(g){setTimeout(function(){throw g})}}function rT(a,l,m){try{var g=a.onCaughtError;g(m.value,{componentStack:m.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function T0(a,l,m){return m=us(m),m.tag=3,m.payload={element:null},m.callback=function(){Dh(a,l)},m}function iT(a){return a=us(a),a.tag=3,a}function oT(a,l,m,g){var w=m.type.getDerivedStateFromError;if(typeof w=="function"){var _=g.value;a.payload=function(){return w(_)},a.callback=function(){rT(l,m,g)}}var j=m.stateNode;j!==null&&typeof j.componentDidCatch=="function"&&(a.callback=function(){rT(l,m,g),typeof w!="function"&&(vs===null?vs=new Set([this]):vs.add(this));var D=g.stack;this.componentDidCatch(g.value,{componentStack:D!==null?D:""})})}function nq(a,l,m,g,w){if(m.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(l=m.alternate,l!==null&&Qc(l,m,w,!0),m=vi.current,m!==null){switch(m.tag){case 31:case 13:return Gi===null?Kh():m.alternate===null&&_n===0&&(_n=3),m.flags&=-257,m.flags|=65536,m.lanes=w,g===Sh?m.flags|=16384:(l=m.updateQueue,l===null?m.updateQueue=new Set([g]):l.add(g),tw(a,g,w)),!1;case 22:return m.flags|=65536,g===Sh?m.flags|=16384:(l=m.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([g])},m.updateQueue=l):(m=l.retryQueue,m===null?l.retryQueue=new Set([g]):m.add(g)),tw(a,g,w)),!1}throw Error(r(435,m.tag))}return tw(a,g,w),Kh(),!1}if(Tt)return l=vi.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=w,g!==Yx&&(a=Error(r(422),{cause:g}),mf(Vi(a,m)))):(g!==Yx&&(l=Error(r(423),{cause:g}),mf(Vi(l,m))),a=a.current.alternate,a.flags|=65536,w&=-w,a.lanes|=w,g=Vi(g,m),w=T0(a.stateNode,g,w),a0(a,w),_n!==4&&(_n=2)),!1;var _=Error(r(520),{cause:g});if(_=Vi(_,m),Af===null?Af=[_]:Af.push(_),_n!==4&&(_n=2),l===null)return!0;g=Vi(g,m),m=l;do{switch(m.tag){case 3:return m.flags|=65536,a=w&-w,m.lanes|=a,a=T0(m.stateNode,g,a),a0(m,a),!1;case 1:if(l=m.type,_=m.stateNode,(m.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(vs===null||!vs.has(_))))return m.flags|=65536,w&=-w,m.lanes|=w,w=iT(w),oT(w,a,m,g),a0(m,w),!1}m=m.return}while(m!==null);return!1}var N0=Error(r(461)),Un=!1;function hr(a,l,m,g){l.child=a===null?cI(l,null,m,g):wl(l,a.child,m,g)}function aT(a,l,m,g,w){m=m.render;var _=l.ref;if("ref"in g){var j={};for(var D in g)D!=="ref"&&(j[D]=g[D])}else j=g;return vl(l),g=f0(a,l,m,j,_,w),D=m0(),a!==null&&!Un?(p0(a,l,w),wa(a,l,w)):(Tt&&D&&Kx(l),l.flags|=1,hr(a,l,g,w),l.child)}function sT(a,l,m,g,w){if(a===null){var _=m.type;return typeof _=="function"&&!Hx(_)&&_.defaultProps===void 0&&m.compare===null?(l.tag=15,l.type=_,lT(a,l,_,g,w)):(a=gh(m.type,null,g,l,l.mode,w),a.ref=l.ref,a.return=l,l.child=a)}if(_=a.child,!L0(a,w)){var j=_.memoizedProps;if(m=m.compare,m=m!==null?m:uf,m(j,g)&&a.ref===l.ref)return wa(a,l,w)}return l.flags|=1,a=ha(_,g),a.ref=l.ref,a.return=l,l.child=a}function lT(a,l,m,g,w){if(a!==null){var _=a.memoizedProps;if(uf(_,g)&&a.ref===l.ref)if(Un=!1,l.pendingProps=g=_,L0(a,w))(a.flags&131072)!==0&&(Un=!0);else return l.lanes=a.lanes,wa(a,l,w)}return A0(a,l,m,g,w)}function cT(a,l,m,g){var w=g.children,_=a!==null?a.memoizedState:null;if(a===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((l.flags&128)!==0){if(_=_!==null?_.baseLanes|m:m,a!==null){for(g=l.child=a.child,w=0;g!==null;)w=w|g.lanes|g.childLanes,g=g.sibling;g=w&~_}else g=0,l.child=null;return uT(a,l,_,m,g)}if((m&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},a!==null&&xh(l,_!==null?_.cachePool:null),_!==null?fI(l,_):l0(),mI(l);else return g=l.lanes=536870912,uT(a,l,_!==null?_.baseLanes|m:m,m,g)}else _!==null?(xh(l,_.cachePool),fI(l,_),ms(),l.memoizedState=null):(a!==null&&xh(l,null),l0(),ms());return hr(a,l,w,m),l.child}function Ef(a,l){return a!==null&&a.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function uT(a,l,m,g,w){var _=n0();return _=_===null?null:{parent:zn._currentValue,pool:_},l.memoizedState={baseLanes:m,cachePool:_},a!==null&&xh(l,null),l0(),mI(l),a!==null&&Qc(a,l,g,!0),l.childLanes=w,null}function Ph(a,l){return l=zh({mode:l.mode,children:l.children},a.mode),l.ref=a.ref,a.child=l,l.return=a,l}function dT(a,l,m){return wl(l,a.child,null,m),a=Ph(l,l.pendingProps),a.flags|=2,yi(l),l.memoizedState=null,a}function rq(a,l,m){var g=l.pendingProps,w=(l.flags&128)!==0;if(l.flags&=-129,a===null){if(Tt){if(g.mode==="hidden")return a=Ph(l,g),l.lanes=536870912,Ef(null,a);if(u0(l),(a=tn)?(a=_N(a,qi),a=a!==null&&a.data==="&"?a:null,a!==null&&(l.memoizedState={dehydrated:a,treeContext:os!==null?{id:Uo,overflow:Fo}:null,retryLane:536870912,hydrationErrors:null},m=Zj(a),m.return=l,l.child=m,mr=l,tn=null)):a=null,a===null)throw ss(l);return l.lanes=536870912,null}return Ph(l,g)}var _=a.memoizedState;if(_!==null){var j=_.dehydrated;if(u0(l),w)if(l.flags&256)l.flags&=-257,l=dT(a,l,m);else if(l.memoizedState!==null)l.child=a.child,l.flags|=128,l=null;else throw Error(r(558));else if(Un||Qc(a,l,m,!1),w=(m&a.childLanes)!==0,Un||w){if(g=Zt,g!==null&&(j=Wr(g,m),j!==0&&j!==_.retryLane))throw _.retryLane=j,ml(a,j),ri(g,a,j),N0;Kh(),l=dT(a,l,m)}else a=_.treeContext,tn=Ki(j.nextSibling),mr=l,Tt=!0,as=null,qi=!1,a!==null&&Xj(l,a),l=Ph(l,g),l.flags|=4096;return l}return a=ha(a.child,{mode:g.mode,children:g.children}),a.ref=l.ref,l.child=a,a.return=l,a}function Mh(a,l){var m=l.ref;if(m===null)a!==null&&a.ref!==null&&(l.flags|=4194816);else{if(typeof m!="function"&&typeof m!="object")throw Error(r(284));(a===null||a.ref!==m)&&(l.flags|=4194816)}}function A0(a,l,m,g,w){return vl(l),m=f0(a,l,m,g,void 0,w),g=m0(),a!==null&&!Un?(p0(a,l,w),wa(a,l,w)):(Tt&&g&&Kx(l),l.flags|=1,hr(a,l,m,w),l.child)}function fT(a,l,m,g,w,_){return vl(l),l.updateQueue=null,m=hI(l,g,m,w),pI(a),g=m0(),a!==null&&!Un?(p0(a,l,_),wa(a,l,_)):(Tt&&g&&Kx(l),l.flags|=1,hr(a,l,m,_),l.child)}function mT(a,l,m,g,w){if(vl(l),l.stateNode===null){var _=Zc,j=m.contextType;typeof j=="object"&&j!==null&&(_=pr(j)),_=new m(g,_),l.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=I0,l.stateNode=_,_._reactInternals=l,_=l.stateNode,_.props=g,_.state=l.memoizedState,_.refs={},i0(l),j=m.contextType,_.context=typeof j=="object"&&j!==null?pr(j):Zc,_.state=l.memoizedState,j=m.getDerivedStateFromProps,typeof j=="function"&&(j0(l,m,j,g),_.state=l.memoizedState),typeof m.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(j=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),j!==_.state&&I0.enqueueReplaceState(_,_.state,null),xf(l,g,_,w),bf(),_.state=l.memoizedState),typeof _.componentDidMount=="function"&&(l.flags|=4194308),g=!0}else if(a===null){_=l.stateNode;var D=l.memoizedProps,H=_l(m,D);_.props=H;var le=_.context,he=m.contextType;j=Zc,typeof he=="object"&&he!==null&&(j=pr(he));var be=m.getDerivedStateFromProps;he=typeof be=="function"||typeof _.getSnapshotBeforeUpdate=="function",D=l.pendingProps!==D,he||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(D||le!==j)&&JI(l,_,g,j),cs=!1;var ce=l.memoizedState;_.state=ce,xf(l,g,_,w),bf(),le=l.memoizedState,D||ce!==le||cs?(typeof be=="function"&&(j0(l,m,be,g),le=l.memoizedState),(H=cs||QI(l,m,H,g,ce,le,j))?(he||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(l.flags|=4194308)):(typeof _.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=le),_.props=g,_.state=le,_.context=j,g=H):(typeof _.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{_=l.stateNode,o0(a,l),j=l.memoizedProps,he=_l(m,j),_.props=he,be=l.pendingProps,ce=_.context,le=m.contextType,H=Zc,typeof le=="object"&&le!==null&&(H=pr(le)),D=m.getDerivedStateFromProps,(le=typeof D=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(j!==be||ce!==H)&&JI(l,_,g,H),cs=!1,ce=l.memoizedState,_.state=ce,xf(l,g,_,w),bf();var me=l.memoizedState;j!==be||ce!==me||cs||a!==null&&a.dependencies!==null&&yh(a.dependencies)?(typeof D=="function"&&(j0(l,m,D,g),me=l.memoizedState),(he=cs||QI(l,m,he,g,ce,me,H)||a!==null&&a.dependencies!==null&&yh(a.dependencies))?(le||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(g,me,H),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(g,me,H)),typeof _.componentDidUpdate=="function"&&(l.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof _.componentDidUpdate!="function"||j===a.memoizedProps&&ce===a.memoizedState||(l.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||j===a.memoizedProps&&ce===a.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=me),_.props=g,_.state=me,_.context=H,g=he):(typeof _.componentDidUpdate!="function"||j===a.memoizedProps&&ce===a.memoizedState||(l.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||j===a.memoizedProps&&ce===a.memoizedState||(l.flags|=1024),g=!1)}return _=g,Mh(a,l),g=(l.flags&128)!==0,_||g?(_=l.stateNode,m=g&&typeof m.getDerivedStateFromError!="function"?null:_.render(),l.flags|=1,a!==null&&g?(l.child=wl(l,a.child,null,w),l.child=wl(l,null,m,w)):hr(a,l,m,w),l.memoizedState=_.state,a=l.child):a=wa(a,l,w),a}function pT(a,l,m,g){return hl(),l.flags|=256,hr(a,l,m,g),l.child}var O0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $0(a){return{baseLanes:a,cachePool:rI()}}function D0(a,l,m){return a=a!==null?a.childLanes&~m:0,l&&(a|=xi),a}function hT(a,l,m){var g=l.pendingProps,w=!1,_=(l.flags&128)!==0,j;if((j=_)||(j=a!==null&&a.memoizedState===null?!1:(Tn.current&2)!==0),j&&(w=!0,l.flags&=-129),j=(l.flags&32)!==0,l.flags&=-33,a===null){if(Tt){if(w?fs(l):ms(),(a=tn)?(a=_N(a,qi),a=a!==null&&a.data!=="&"?a:null,a!==null&&(l.memoizedState={dehydrated:a,treeContext:os!==null?{id:Uo,overflow:Fo}:null,retryLane:536870912,hydrationErrors:null},m=Zj(a),m.return=l,l.child=m,mr=l,tn=null)):a=null,a===null)throw ss(l);return vw(a)?l.lanes=32:l.lanes=536870912,null}var D=g.children;return g=g.fallback,w?(ms(),w=l.mode,D=zh({mode:"hidden",children:D},w),g=pl(g,w,m,null),D.return=l,g.return=l,D.sibling=g,l.child=D,g=l.child,g.memoizedState=$0(m),g.childLanes=D0(a,j,m),l.memoizedState=O0,Ef(null,g)):(fs(l),P0(l,D))}var H=a.memoizedState;if(H!==null&&(D=H.dehydrated,D!==null)){if(_)l.flags&256?(fs(l),l.flags&=-257,l=M0(a,l,m)):l.memoizedState!==null?(ms(),l.child=a.child,l.flags|=128,l=null):(ms(),D=g.fallback,w=l.mode,g=zh({mode:"visible",children:g.children},w),D=pl(D,w,m,null),D.flags|=2,g.return=l,D.return=l,g.sibling=D,l.child=g,wl(l,a.child,null,m),g=l.child,g.memoizedState=$0(m),g.childLanes=D0(a,j,m),l.memoizedState=O0,l=Ef(null,g));else if(fs(l),vw(D)){if(j=D.nextSibling&&D.nextSibling.dataset,j)var le=j.dgst;j=le,g=Error(r(419)),g.stack="",g.digest=j,mf({value:g,source:null,stack:null}),l=M0(a,l,m)}else if(Un||Qc(a,l,m,!1),j=(m&a.childLanes)!==0,Un||j){if(j=Zt,j!==null&&(g=Wr(j,m),g!==0&&g!==H.retryLane))throw H.retryLane=g,ml(a,g),ri(j,a,g),N0;gw(D)||Kh(),l=M0(a,l,m)}else gw(D)?(l.flags|=192,l.child=a.child,l=null):(a=H.treeContext,tn=Ki(D.nextSibling),mr=l,Tt=!0,as=null,qi=!1,a!==null&&Xj(l,a),l=P0(l,g.children),l.flags|=4096);return l}return w?(ms(),D=g.fallback,w=l.mode,H=a.child,le=H.sibling,g=ha(H,{mode:"hidden",children:g.children}),g.subtreeFlags=H.subtreeFlags&65011712,le!==null?D=ha(le,D):(D=pl(D,w,m,null),D.flags|=2),D.return=l,g.return=l,g.sibling=D,l.child=g,Ef(null,g),g=l.child,D=a.child.memoizedState,D===null?D=$0(m):(w=D.cachePool,w!==null?(H=zn._currentValue,w=w.parent!==H?{parent:H,pool:H}:w):w=rI(),D={baseLanes:D.baseLanes|m,cachePool:w}),g.memoizedState=D,g.childLanes=D0(a,j,m),l.memoizedState=O0,Ef(a.child,g)):(fs(l),m=a.child,a=m.sibling,m=ha(m,{mode:"visible",children:g.children}),m.return=l,m.sibling=null,a!==null&&(j=l.deletions,j===null?(l.deletions=[a],l.flags|=16):j.push(a)),l.child=m,l.memoizedState=null,m)}function P0(a,l){return l=zh({mode:"visible",children:l},a.mode),l.return=a,a.child=l}function zh(a,l){return a=gi(22,a,null,l),a.lanes=0,a}function M0(a,l,m){return wl(l,a.child,null,m),a=P0(l,l.pendingProps.children),a.flags|=2,l.memoizedState=null,a}function gT(a,l,m){a.lanes|=l;var g=a.alternate;g!==null&&(g.lanes|=l),Qx(a.return,l,m)}function z0(a,l,m,g,w,_){var j=a.memoizedState;j===null?a.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:m,tailMode:w,treeForkCount:_}:(j.isBackwards=l,j.rendering=null,j.renderingStartTime=0,j.last=g,j.tail=m,j.tailMode=w,j.treeForkCount=_)}function vT(a,l,m){var g=l.pendingProps,w=g.revealOrder,_=g.tail;g=g.children;var j=Tn.current,D=(j&2)!==0;if(D?(j=j&1|2,l.flags|=128):j&=1,O(Tn,j),hr(a,l,g,m),g=Tt?ff:0,!D&&a!==null&&(a.flags&128)!==0)e:for(a=l.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&gT(a,m,l);else if(a.tag===19)gT(a,m,l);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break e;for(;a.sibling===null;){if(a.return===null||a.return===l)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(w){case"forwards":for(m=l.child,w=null;m!==null;)a=m.alternate,a!==null&&kh(a)===null&&(w=m),m=m.sibling;m=w,m===null?(w=l.child,l.child=null):(w=m.sibling,m.sibling=null),z0(l,!1,w,m,_,g);break;case"backwards":case"unstable_legacy-backwards":for(m=null,w=l.child,l.child=null;w!==null;){if(a=w.alternate,a!==null&&kh(a)===null){l.child=w;break}a=w.sibling,w.sibling=m,m=w,w=a}z0(l,!0,m,null,_,g);break;case"together":z0(l,!1,null,null,void 0,g);break;default:l.memoizedState=null}return l.child}function wa(a,l,m){if(a!==null&&(l.dependencies=a.dependencies),gs|=l.lanes,(m&l.childLanes)===0)if(a!==null){if(Qc(a,l,m,!1),(m&l.childLanes)===0)return null}else return null;if(a!==null&&l.child!==a.child)throw Error(r(153));if(l.child!==null){for(a=l.child,m=ha(a,a.pendingProps),l.child=m,m.return=l;a.sibling!==null;)a=a.sibling,m=m.sibling=ha(a,a.pendingProps),m.return=l;m.sibling=null}return l.child}function L0(a,l){return(a.lanes&l)!==0?!0:(a=a.dependencies,!!(a!==null&&yh(a)))}function iq(a,l,m){switch(l.tag){case 3:ie(l,l.stateNode.containerInfo),ls(l,zn,a.memoizedState.cache),hl();break;case 27:case 5:Ie(l);break;case 4:ie(l,l.stateNode.containerInfo);break;case 10:ls(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,u0(l),null;break;case 13:var g=l.memoizedState;if(g!==null)return g.dehydrated!==null?(fs(l),l.flags|=128,null):(m&l.child.childLanes)!==0?hT(a,l,m):(fs(l),a=wa(a,l,m),a!==null?a.sibling:null);fs(l);break;case 19:var w=(a.flags&128)!==0;if(g=(m&l.childLanes)!==0,g||(Qc(a,l,m,!1),g=(m&l.childLanes)!==0),w){if(g)return vT(a,l,m);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),O(Tn,Tn.current),g)break;return null;case 22:return l.lanes=0,cT(a,l,m,l.pendingProps);case 24:ls(l,zn,a.memoizedState.cache)}return wa(a,l,m)}function yT(a,l,m){if(a!==null)if(a.memoizedProps!==l.pendingProps)Un=!0;else{if(!L0(a,m)&&(l.flags&128)===0)return Un=!1,iq(a,l,m);Un=(a.flags&131072)!==0}else Un=!1,Tt&&(l.flags&1048576)!==0&&Wj(l,ff,l.index);switch(l.lanes=0,l.tag){case 16:e:{var g=l.pendingProps;if(a=bl(l.elementType),l.type=a,typeof a=="function")Hx(a)?(g=_l(a,g),l.tag=1,l=mT(null,l,a,g,m)):(l.tag=0,l=A0(null,l,a,g,m));else{if(a!=null){var w=a.$$typeof;if(w===I){l.tag=11,l=aT(null,l,a,g,m);break e}else if(w===N){l.tag=14,l=sT(null,l,a,g,m);break e}}throw l=B(a)||a,Error(r(306,l,""))}}return l;case 0:return A0(a,l,l.type,l.pendingProps,m);case 1:return g=l.type,w=_l(g,l.pendingProps),mT(a,l,g,w,m);case 3:e:{if(ie(l,l.stateNode.containerInfo),a===null)throw Error(r(387));g=l.pendingProps;var _=l.memoizedState;w=_.element,o0(a,l),xf(l,g,null,m);var j=l.memoizedState;if(g=j.cache,ls(l,zn,g),g!==_.cache&&Jx(l,[zn],m,!0),bf(),g=j.element,_.isDehydrated)if(_={element:g,isDehydrated:!1,cache:j.cache},l.updateQueue.baseState=_,l.memoizedState=_,l.flags&256){l=pT(a,l,g,m);break e}else if(g!==w){w=Vi(Error(r(424)),l),mf(w),l=pT(a,l,g,m);break e}else{switch(a=l.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(tn=Ki(a.firstChild),mr=l,Tt=!0,as=null,qi=!0,m=cI(l,null,g,m),l.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling}else{if(hl(),g===w){l=wa(a,l,m);break e}hr(a,l,g,m)}l=l.child}return l;case 26:return Mh(a,l),a===null?(m=IN(l.type,null,l.pendingProps,null))?l.memoizedState=m:Tt||(m=l.type,a=l.pendingProps,g=eg(pe.current).createElement(m),g[fr]=l,g[Xr]=a,gr(g,m,a),rr(g),l.stateNode=g):l.memoizedState=IN(l.type,a.memoizedProps,l.pendingProps,a.memoizedState),null;case 27:return Ie(l),a===null&&Tt&&(g=l.stateNode=kN(l.type,l.pendingProps,pe.current),mr=l,qi=!0,w=tn,ws(l.type)?(yw=w,tn=Ki(g.firstChild)):tn=w),hr(a,l,l.pendingProps.children,m),Mh(a,l),a===null&&(l.flags|=4194304),l.child;case 5:return a===null&&Tt&&((w=g=tn)&&(g=$q(g,l.type,l.pendingProps,qi),g!==null?(l.stateNode=g,mr=l,tn=Ki(g.firstChild),qi=!1,w=!0):w=!1),w||ss(l)),Ie(l),w=l.type,_=l.pendingProps,j=a!==null?a.memoizedProps:null,g=_.children,mw(w,_)?g=null:j!==null&&mw(w,j)&&(l.flags|=32),l.memoizedState!==null&&(w=f0(a,l,Y9,null,null,m),Uf._currentValue=w),Mh(a,l),hr(a,l,g,m),l.child;case 6:return a===null&&Tt&&((a=m=tn)&&(m=Dq(m,l.pendingProps,qi),m!==null?(l.stateNode=m,mr=l,tn=null,a=!0):a=!1),a||ss(l)),null;case 13:return hT(a,l,m);case 4:return ie(l,l.stateNode.containerInfo),g=l.pendingProps,a===null?l.child=wl(l,null,g,m):hr(a,l,g,m),l.child;case 11:return aT(a,l,l.type,l.pendingProps,m);case 7:return hr(a,l,l.pendingProps,m),l.child;case 8:return hr(a,l,l.pendingProps.children,m),l.child;case 12:return hr(a,l,l.pendingProps.children,m),l.child;case 10:return g=l.pendingProps,ls(l,l.type,g.value),hr(a,l,g.children,m),l.child;case 9:return w=l.type._context,g=l.pendingProps.children,vl(l),w=pr(w),g=g(w),l.flags|=1,hr(a,l,g,m),l.child;case 14:return sT(a,l,l.type,l.pendingProps,m);case 15:return lT(a,l,l.type,l.pendingProps,m);case 19:return vT(a,l,m);case 31:return rq(a,l,m);case 22:return cT(a,l,m,l.pendingProps);case 24:return vl(l),g=pr(zn),a===null?(w=n0(),w===null&&(w=Zt,_=e0(),w.pooledCache=_,_.refCount++,_!==null&&(w.pooledCacheLanes|=m),w=_),l.memoizedState={parent:g,cache:w},i0(l),ls(l,zn,w)):((a.lanes&m)!==0&&(o0(a,l),xf(l,null,null,m),bf()),w=a.memoizedState,_=l.memoizedState,w.parent!==g?(w={parent:g,cache:g},l.memoizedState=w,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=w),ls(l,zn,g)):(g=_.cache,ls(l,zn,g),g!==w.cache&&Jx(l,[zn],m,!0))),hr(a,l,l.pendingProps.children,m),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Sa(a){a.flags|=4}function U0(a,l,m,g,w){if((l=(a.mode&32)!==0)&&(l=!1),l){if(a.flags|=16777216,(w&335544128)===w)if(a.stateNode.complete)a.flags|=8192;else if(qT())a.flags|=8192;else throw xl=Sh,r0}else a.flags&=-16777217}function bT(a,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!$N(l))if(qT())a.flags|=8192;else throw xl=Sh,r0}function Lh(a,l){l!==null&&(a.flags|=4),a.flags&16384&&(l=a.tag!==22?yr():536870912,a.lanes|=l,uu|=l)}function kf(a,l){if(!Tt)switch(a.tailMode){case"hidden":l=a.tail;for(var m=null;l!==null;)l.alternate!==null&&(m=l),l=l.sibling;m===null?a.tail=null:m.sibling=null;break;case"collapsed":m=a.tail;for(var g=null;m!==null;)m.alternate!==null&&(g=m),m=m.sibling;g===null?l||a.tail===null?a.tail=null:a.tail.sibling=null:g.sibling=null}}function nn(a){var l=a.alternate!==null&&a.alternate.child===a.child,m=0,g=0;if(l)for(var w=a.child;w!==null;)m|=w.lanes|w.childLanes,g|=w.subtreeFlags&65011712,g|=w.flags&65011712,w.return=a,w=w.sibling;else for(w=a.child;w!==null;)m|=w.lanes|w.childLanes,g|=w.subtreeFlags,g|=w.flags,w.return=a,w=w.sibling;return a.subtreeFlags|=g,a.childLanes=m,l}function oq(a,l,m){var g=l.pendingProps;switch(Zx(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nn(l),null;case 1:return nn(l),null;case 3:return m=l.stateNode,g=null,a!==null&&(g=a.memoizedState.cache),l.memoizedState.cache!==g&&(l.flags|=2048),ya(zn),_e(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(a===null||a.child===null)&&(Xc(l)?Sa(l):a===null||a.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Wx())),nn(l),null;case 26:var w=l.type,_=l.memoizedState;return a===null?(Sa(l),_!==null?(nn(l),bT(l,_)):(nn(l),U0(l,w,null,g,m))):_?_!==a.memoizedState?(Sa(l),nn(l),bT(l,_)):(nn(l),l.flags&=-16777217):(a=a.memoizedProps,a!==g&&Sa(l),nn(l),U0(l,w,a,g,m)),null;case 27:if(He(l),m=pe.current,w=l.type,a!==null&&l.stateNode!=null)a.memoizedProps!==g&&Sa(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return nn(l),null}a=J.current,Xc(l)?Qj(l):(a=kN(w,g,m),l.stateNode=a,Sa(l))}return nn(l),null;case 5:if(He(l),w=l.type,a!==null&&l.stateNode!=null)a.memoizedProps!==g&&Sa(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return nn(l),null}if(_=J.current,Xc(l))Qj(l);else{var j=eg(pe.current);switch(_){case 1:_=j.createElementNS("http://www.w3.org/2000/svg",w);break;case 2:_=j.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;default:switch(w){case"svg":_=j.createElementNS("http://www.w3.org/2000/svg",w);break;case"math":_=j.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;case"script":_=j.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof g.is=="string"?j.createElement("select",{is:g.is}):j.createElement("select"),g.multiple?_.multiple=!0:g.size&&(_.size=g.size);break;default:_=typeof g.is=="string"?j.createElement(w,{is:g.is}):j.createElement(w)}}_[fr]=l,_[Xr]=g;e:for(j=l.child;j!==null;){if(j.tag===5||j.tag===6)_.appendChild(j.stateNode);else if(j.tag!==4&&j.tag!==27&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===l)break e;for(;j.sibling===null;){if(j.return===null||j.return===l)break e;j=j.return}j.sibling.return=j.return,j=j.sibling}l.stateNode=_;e:switch(gr(_,w,g),w){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Sa(l)}}return nn(l),U0(l,l.type,a===null?null:a.memoizedProps,l.pendingProps,m),null;case 6:if(a&&l.stateNode!=null)a.memoizedProps!==g&&Sa(l);else{if(typeof g!="string"&&l.stateNode===null)throw Error(r(166));if(a=pe.current,Xc(l)){if(a=l.stateNode,m=l.memoizedProps,g=null,w=mr,w!==null)switch(w.tag){case 27:case 5:g=w.memoizedProps}a[fr]=l,a=!!(a.nodeValue===m||g!==null&&g.suppressHydrationWarning===!0||hN(a.nodeValue,m)),a||ss(l,!0)}else a=eg(a).createTextNode(g),a[fr]=l,l.stateNode=a}return nn(l),null;case 31:if(m=l.memoizedState,a===null||a.memoizedState!==null){if(g=Xc(l),m!==null){if(a===null){if(!g)throw Error(r(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[fr]=l}else hl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;nn(l),a=!1}else m=Wx(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=m),a=!0;if(!a)return l.flags&256?(yi(l),l):(yi(l),null);if((l.flags&128)!==0)throw Error(r(558))}return nn(l),null;case 13:if(g=l.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(w=Xc(l),g!==null&&g.dehydrated!==null){if(a===null){if(!w)throw Error(r(318));if(w=l.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[fr]=l}else hl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;nn(l),w=!1}else w=Wx(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=w),w=!0;if(!w)return l.flags&256?(yi(l),l):(yi(l),null)}return yi(l),(l.flags&128)!==0?(l.lanes=m,l):(m=g!==null,a=a!==null&&a.memoizedState!==null,m&&(g=l.child,w=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(w=g.alternate.memoizedState.cachePool.pool),_=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(_=g.memoizedState.cachePool.pool),_!==w&&(g.flags|=2048)),m!==a&&m&&(l.child.flags|=8192),Lh(l,l.updateQueue),nn(l),null);case 4:return _e(),a===null&&lw(l.stateNode.containerInfo),nn(l),null;case 10:return ya(l.type),nn(l),null;case 19:if(F(Tn),g=l.memoizedState,g===null)return nn(l),null;if(w=(l.flags&128)!==0,_=g.rendering,_===null)if(w)kf(g,!1);else{if(_n!==0||a!==null&&(a.flags&128)!==0)for(a=l.child;a!==null;){if(_=kh(a),_!==null){for(l.flags|=128,kf(g,!1),a=_.updateQueue,l.updateQueue=a,Lh(l,a),l.subtreeFlags=0,a=m,m=l.child;m!==null;)Kj(m,a),m=m.sibling;return O(Tn,Tn.current&1|2),Tt&&ga(l,g.treeForkCount),l.child}a=a.sibling}g.tail!==null&&ve()>Hh&&(l.flags|=128,w=!0,kf(g,!1),l.lanes=4194304)}else{if(!w)if(a=kh(_),a!==null){if(l.flags|=128,w=!0,a=a.updateQueue,l.updateQueue=a,Lh(l,a),kf(g,!0),g.tail===null&&g.tailMode==="hidden"&&!_.alternate&&!Tt)return nn(l),null}else 2*ve()-g.renderingStartTime>Hh&&m!==536870912&&(l.flags|=128,w=!0,kf(g,!1),l.lanes=4194304);g.isBackwards?(_.sibling=l.child,l.child=_):(a=g.last,a!==null?a.sibling=_:l.child=_,g.last=_)}return g.tail!==null?(a=g.tail,g.rendering=a,g.tail=a.sibling,g.renderingStartTime=ve(),a.sibling=null,m=Tn.current,O(Tn,w?m&1|2:m&1),Tt&&ga(l,g.treeForkCount),a):(nn(l),null);case 22:case 23:return yi(l),c0(),g=l.memoizedState!==null,a!==null?a.memoizedState!==null!==g&&(l.flags|=8192):g&&(l.flags|=8192),g?(m&536870912)!==0&&(l.flags&128)===0&&(nn(l),l.subtreeFlags&6&&(l.flags|=8192)):nn(l),m=l.updateQueue,m!==null&&Lh(l,m.retryQueue),m=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),g=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==m&&(l.flags|=2048),a!==null&&F(yl),null;case 24:return m=null,a!==null&&(m=a.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),ya(zn),nn(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function aq(a,l){switch(Zx(l),l.tag){case 1:return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return ya(zn),_e(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 26:case 27:case 5:return He(l),null;case 31:if(l.memoizedState!==null){if(yi(l),l.alternate===null)throw Error(r(340));hl()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 13:if(yi(l),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));hl()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return F(Tn),null;case 4:return _e(),null;case 10:return ya(l.type),null;case 22:case 23:return yi(l),c0(),a!==null&&F(yl),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 24:return ya(zn),null;case 25:return null;default:return null}}function xT(a,l){switch(Zx(l),l.tag){case 3:ya(zn),_e();break;case 26:case 27:case 5:He(l);break;case 4:_e();break;case 31:l.memoizedState!==null&&yi(l);break;case 13:yi(l);break;case 19:F(Tn);break;case 10:ya(l.type);break;case 22:case 23:yi(l),c0(),a!==null&&F(yl);break;case 24:ya(zn)}}function Rf(a,l){try{var m=l.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var w=g.next;m=w;do{if((m.tag&a)===a){g=void 0;var _=m.create,j=m.inst;g=_(),j.destroy=g}m=m.next}while(m!==w)}}catch(D){Lt(l,l.return,D)}}function ps(a,l,m){try{var g=l.updateQueue,w=g!==null?g.lastEffect:null;if(w!==null){var _=w.next;g=_;do{if((g.tag&a)===a){var j=g.inst,D=j.destroy;if(D!==void 0){j.destroy=void 0,w=l;var H=m,le=D;try{le()}catch(he){Lt(w,H,he)}}}g=g.next}while(g!==_)}}catch(he){Lt(l,l.return,he)}}function wT(a){var l=a.updateQueue;if(l!==null){var m=a.stateNode;try{dI(l,m)}catch(g){Lt(a,a.return,g)}}}function ST(a,l,m){m.props=_l(a.type,a.memoizedProps),m.state=a.memoizedState;try{m.componentWillUnmount()}catch(g){Lt(a,l,g)}}function jf(a,l){try{var m=a.ref;if(m!==null){switch(a.tag){case 26:case 27:case 5:var g=a.stateNode;break;case 30:g=a.stateNode;break;default:g=a.stateNode}typeof m=="function"?a.refCleanup=m(g):m.current=g}}catch(w){Lt(a,l,w)}}function Vo(a,l){var m=a.ref,g=a.refCleanup;if(m!==null)if(typeof g=="function")try{g()}catch(w){Lt(a,l,w)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(w){Lt(a,l,w)}else m.current=null}function _T(a){var l=a.type,m=a.memoizedProps,g=a.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":m.autoFocus&&g.focus();break e;case"img":m.src?g.src=m.src:m.srcSet&&(g.srcset=m.srcSet)}}catch(w){Lt(a,a.return,w)}}function F0(a,l,m){try{var g=a.stateNode;jq(g,a.type,m,l),g[Xr]=l}catch(w){Lt(a,a.return,w)}}function CT(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&ws(a.type)||a.tag===4}function V0(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||CT(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&ws(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function B0(a,l,m){var g=a.tag;if(g===5||g===6)a=a.stateNode,l?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(a,l):(l=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,l.appendChild(a),m=m._reactRootContainer,m!=null||l.onclick!==null||(l.onclick=ma));else if(g!==4&&(g===27&&ws(a.type)&&(m=a.stateNode,l=null),a=a.child,a!==null))for(B0(a,l,m),a=a.sibling;a!==null;)B0(a,l,m),a=a.sibling}function Uh(a,l,m){var g=a.tag;if(g===5||g===6)a=a.stateNode,l?m.insertBefore(a,l):m.appendChild(a);else if(g!==4&&(g===27&&ws(a.type)&&(m=a.stateNode),a=a.child,a!==null))for(Uh(a,l,m),a=a.sibling;a!==null;)Uh(a,l,m),a=a.sibling}function ET(a){var l=a.stateNode,m=a.memoizedProps;try{for(var g=a.type,w=l.attributes;w.length;)l.removeAttributeNode(w[0]);gr(l,g,m),l[fr]=a,l[Xr]=m}catch(_){Lt(a,a.return,_)}}var _a=!1,Fn=!1,H0=!1,kT=typeof WeakSet=="function"?WeakSet:Set,ir=null;function sq(a,l){if(a=a.containerInfo,dw=sg,a=zj(a),Mx(a)){if("selectionStart"in a)var m={start:a.selectionStart,end:a.selectionEnd};else e:{m=(m=a.ownerDocument)&&m.defaultView||window;var g=m.getSelection&&m.getSelection();if(g&&g.rangeCount!==0){m=g.anchorNode;var w=g.anchorOffset,_=g.focusNode;g=g.focusOffset;try{m.nodeType,_.nodeType}catch{m=null;break e}var j=0,D=-1,H=-1,le=0,he=0,be=a,ce=null;t:for(;;){for(var me;be!==m||w!==0&&be.nodeType!==3||(D=j+w),be!==_||g!==0&&be.nodeType!==3||(H=j+g),be.nodeType===3&&(j+=be.nodeValue.length),(me=be.firstChild)!==null;)ce=be,be=me;for(;;){if(be===a)break t;if(ce===m&&++le===w&&(D=j),ce===_&&++he===g&&(H=j),(me=be.nextSibling)!==null)break;be=ce,ce=be.parentNode}be=me}m=D===-1||H===-1?null:{start:D,end:H}}else m=null}m=m||{start:0,end:0}}else m=null;for(fw={focusedElem:a,selectionRange:m},sg=!1,ir=l;ir!==null;)if(l=ir,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,ir=a;else for(;ir!==null;){switch(l=ir,_=l.alternate,a=l.flags,l.tag){case 0:if((a&4)!==0&&(a=l.updateQueue,a=a!==null?a.events:null,a!==null))for(m=0;m<a.length;m++)w=a[m],w.ref.impl=w.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&_!==null){a=void 0,m=l,w=_.memoizedProps,_=_.memoizedState,g=m.stateNode;try{var ze=_l(m.type,w);a=g.getSnapshotBeforeUpdate(ze,_),g.__reactInternalSnapshotBeforeUpdate=a}catch(Xe){Lt(m,m.return,Xe)}}break;case 3:if((a&1024)!==0){if(a=l.stateNode.containerInfo,m=a.nodeType,m===9)hw(a);else if(m===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":hw(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=l.sibling,a!==null){a.return=l.return,ir=a;break}ir=l.return}}function RT(a,l,m){var g=m.flags;switch(m.tag){case 0:case 11:case 15:Ea(a,m),g&4&&Rf(5,m);break;case 1:if(Ea(a,m),g&4)if(a=m.stateNode,l===null)try{a.componentDidMount()}catch(j){Lt(m,m.return,j)}else{var w=_l(m.type,l.memoizedProps);l=l.memoizedState;try{a.componentDidUpdate(w,l,a.__reactInternalSnapshotBeforeUpdate)}catch(j){Lt(m,m.return,j)}}g&64&&wT(m),g&512&&jf(m,m.return);break;case 3:if(Ea(a,m),g&64&&(a=m.updateQueue,a!==null)){if(l=null,m.child!==null)switch(m.child.tag){case 27:case 5:l=m.child.stateNode;break;case 1:l=m.child.stateNode}try{dI(a,l)}catch(j){Lt(m,m.return,j)}}break;case 27:l===null&&g&4&&ET(m);case 26:case 5:Ea(a,m),l===null&&g&4&&_T(m),g&512&&jf(m,m.return);break;case 12:Ea(a,m);break;case 31:Ea(a,m),g&4&&TT(a,m);break;case 13:Ea(a,m),g&4&&NT(a,m),g&64&&(a=m.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(m=gq.bind(null,m),Pq(a,m))));break;case 22:if(g=m.memoizedState!==null||_a,!g){l=l!==null&&l.memoizedState!==null||Fn,w=_a;var _=Fn;_a=g,(Fn=l)&&!_?ka(a,m,(m.subtreeFlags&8772)!==0):Ea(a,m),_a=w,Fn=_}break;case 30:break;default:Ea(a,m)}}function jT(a){var l=a.alternate;l!==null&&(a.alternate=null,jT(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&xx(l)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var dn=null,Jr=!1;function Ca(a,l,m){for(m=m.child;m!==null;)IT(a,l,m),m=m.sibling}function IT(a,l,m){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(cn,m)}catch{}switch(m.tag){case 26:Fn||Vo(m,l),Ca(a,l,m),m.memoizedState?m.memoizedState.count--:m.stateNode&&(m=m.stateNode,m.parentNode.removeChild(m));break;case 27:Fn||Vo(m,l);var g=dn,w=Jr;ws(m.type)&&(dn=m.stateNode,Jr=!1),Ca(a,l,m),Mf(m.stateNode),dn=g,Jr=w;break;case 5:Fn||Vo(m,l);case 6:if(g=dn,w=Jr,dn=null,Ca(a,l,m),dn=g,Jr=w,dn!==null)if(Jr)try{(dn.nodeType===9?dn.body:dn.nodeName==="HTML"?dn.ownerDocument.body:dn).removeChild(m.stateNode)}catch(_){Lt(m,l,_)}else try{dn.removeChild(m.stateNode)}catch(_){Lt(m,l,_)}break;case 18:dn!==null&&(Jr?(a=dn,wN(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,m.stateNode),yu(a)):wN(dn,m.stateNode));break;case 4:g=dn,w=Jr,dn=m.stateNode.containerInfo,Jr=!0,Ca(a,l,m),dn=g,Jr=w;break;case 0:case 11:case 14:case 15:ps(2,m,l),Fn||ps(4,m,l),Ca(a,l,m);break;case 1:Fn||(Vo(m,l),g=m.stateNode,typeof g.componentWillUnmount=="function"&&ST(m,l,g)),Ca(a,l,m);break;case 21:Ca(a,l,m);break;case 22:Fn=(g=Fn)||m.memoizedState!==null,Ca(a,l,m),Fn=g;break;default:Ca(a,l,m)}}function TT(a,l){if(l.memoizedState===null&&(a=l.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{yu(a)}catch(m){Lt(l,l.return,m)}}}function NT(a,l){if(l.memoizedState===null&&(a=l.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{yu(a)}catch(m){Lt(l,l.return,m)}}function lq(a){switch(a.tag){case 31:case 13:case 19:var l=a.stateNode;return l===null&&(l=a.stateNode=new kT),l;case 22:return a=a.stateNode,l=a._retryCache,l===null&&(l=a._retryCache=new kT),l;default:throw Error(r(435,a.tag))}}function Fh(a,l){var m=lq(a);l.forEach(function(g){if(!m.has(g)){m.add(g);var w=vq.bind(null,a,g);g.then(w,w)}})}function ei(a,l){var m=l.deletions;if(m!==null)for(var g=0;g<m.length;g++){var w=m[g],_=a,j=l,D=j;e:for(;D!==null;){switch(D.tag){case 27:if(ws(D.type)){dn=D.stateNode,Jr=!1;break e}break;case 5:dn=D.stateNode,Jr=!1;break e;case 3:case 4:dn=D.stateNode.containerInfo,Jr=!0;break e}D=D.return}if(dn===null)throw Error(r(160));IT(_,j,w),dn=null,Jr=!1,_=w.alternate,_!==null&&(_.return=null),w.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)AT(l,a),l=l.sibling}var xo=null;function AT(a,l){var m=a.alternate,g=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:ei(l,a),ti(a),g&4&&(ps(3,a,a.return),Rf(3,a),ps(5,a,a.return));break;case 1:ei(l,a),ti(a),g&512&&(Fn||m===null||Vo(m,m.return)),g&64&&_a&&(a=a.updateQueue,a!==null&&(g=a.callbacks,g!==null&&(m=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=m===null?g:m.concat(g))));break;case 26:var w=xo;if(ei(l,a),ti(a),g&512&&(Fn||m===null||Vo(m,m.return)),g&4){var _=m!==null?m.memoizedState:null;if(g=a.memoizedState,m===null)if(g===null)if(a.stateNode===null){e:{g=a.type,m=a.memoizedProps,w=w.ownerDocument||w;t:switch(g){case"title":_=w.getElementsByTagName("title")[0],(!_||_[ef]||_[fr]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=w.createElement(g),w.head.insertBefore(_,w.querySelector("head > title"))),gr(_,g,m),_[fr]=a,rr(_),g=_;break e;case"link":var j=AN("link","href",w).get(g+(m.href||""));if(j){for(var D=0;D<j.length;D++)if(_=j[D],_.getAttribute("href")===(m.href==null||m.href===""?null:m.href)&&_.getAttribute("rel")===(m.rel==null?null:m.rel)&&_.getAttribute("title")===(m.title==null?null:m.title)&&_.getAttribute("crossorigin")===(m.crossOrigin==null?null:m.crossOrigin)){j.splice(D,1);break t}}_=w.createElement(g),gr(_,g,m),w.head.appendChild(_);break;case"meta":if(j=AN("meta","content",w).get(g+(m.content||""))){for(D=0;D<j.length;D++)if(_=j[D],_.getAttribute("content")===(m.content==null?null:""+m.content)&&_.getAttribute("name")===(m.name==null?null:m.name)&&_.getAttribute("property")===(m.property==null?null:m.property)&&_.getAttribute("http-equiv")===(m.httpEquiv==null?null:m.httpEquiv)&&_.getAttribute("charset")===(m.charSet==null?null:m.charSet)){j.splice(D,1);break t}}_=w.createElement(g),gr(_,g,m),w.head.appendChild(_);break;default:throw Error(r(468,g))}_[fr]=a,rr(_),g=_}a.stateNode=g}else ON(w,a.type,a.stateNode);else a.stateNode=NN(w,g,a.memoizedProps);else _!==g?(_===null?m.stateNode!==null&&(m=m.stateNode,m.parentNode.removeChild(m)):_.count--,g===null?ON(w,a.type,a.stateNode):NN(w,g,a.memoizedProps)):g===null&&a.stateNode!==null&&F0(a,a.memoizedProps,m.memoizedProps)}break;case 27:ei(l,a),ti(a),g&512&&(Fn||m===null||Vo(m,m.return)),m!==null&&g&4&&F0(a,a.memoizedProps,m.memoizedProps);break;case 5:if(ei(l,a),ti(a),g&512&&(Fn||m===null||Vo(m,m.return)),a.flags&32){w=a.stateNode;try{Fc(w,"")}catch(ze){Lt(a,a.return,ze)}}g&4&&a.stateNode!=null&&(w=a.memoizedProps,F0(a,w,m!==null?m.memoizedProps:w)),g&1024&&(H0=!0);break;case 6:if(ei(l,a),ti(a),g&4){if(a.stateNode===null)throw Error(r(162));g=a.memoizedProps,m=a.stateNode;try{m.nodeValue=g}catch(ze){Lt(a,a.return,ze)}}break;case 3:if(rg=null,w=xo,xo=tg(l.containerInfo),ei(l,a),xo=w,ti(a),g&4&&m!==null&&m.memoizedState.isDehydrated)try{yu(l.containerInfo)}catch(ze){Lt(a,a.return,ze)}H0&&(H0=!1,OT(a));break;case 4:g=xo,xo=tg(a.stateNode.containerInfo),ei(l,a),ti(a),xo=g;break;case 12:ei(l,a),ti(a);break;case 31:ei(l,a),ti(a),g&4&&(g=a.updateQueue,g!==null&&(a.updateQueue=null,Fh(a,g)));break;case 13:ei(l,a),ti(a),a.child.flags&8192&&a.memoizedState!==null!=(m!==null&&m.memoizedState!==null)&&(Bh=ve()),g&4&&(g=a.updateQueue,g!==null&&(a.updateQueue=null,Fh(a,g)));break;case 22:w=a.memoizedState!==null;var H=m!==null&&m.memoizedState!==null,le=_a,he=Fn;if(_a=le||w,Fn=he||H,ei(l,a),Fn=he,_a=le,ti(a),g&8192)e:for(l=a.stateNode,l._visibility=w?l._visibility&-2:l._visibility|1,w&&(m===null||H||_a||Fn||Cl(a)),m=null,l=a;;){if(l.tag===5||l.tag===26){if(m===null){H=m=l;try{if(_=H.stateNode,w)j=_.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none";else{D=H.stateNode;var be=H.memoizedProps.style,ce=be!=null&&be.hasOwnProperty("display")?be.display:null;D.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(ze){Lt(H,H.return,ze)}}}else if(l.tag===6){if(m===null){H=l;try{H.stateNode.nodeValue=w?"":H.memoizedProps}catch(ze){Lt(H,H.return,ze)}}}else if(l.tag===18){if(m===null){H=l;try{var me=H.stateNode;w?SN(me,!0):SN(H.stateNode,!1)}catch(ze){Lt(H,H.return,ze)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===a)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break e;for(;l.sibling===null;){if(l.return===null||l.return===a)break e;m===l&&(m=null),l=l.return}m===l&&(m=null),l.sibling.return=l.return,l=l.sibling}g&4&&(g=a.updateQueue,g!==null&&(m=g.retryQueue,m!==null&&(g.retryQueue=null,Fh(a,m))));break;case 19:ei(l,a),ti(a),g&4&&(g=a.updateQueue,g!==null&&(a.updateQueue=null,Fh(a,g)));break;case 30:break;case 21:break;default:ei(l,a),ti(a)}}function ti(a){var l=a.flags;if(l&2){try{for(var m,g=a.return;g!==null;){if(CT(g)){m=g;break}g=g.return}if(m==null)throw Error(r(160));switch(m.tag){case 27:var w=m.stateNode,_=V0(a);Uh(a,_,w);break;case 5:var j=m.stateNode;m.flags&32&&(Fc(j,""),m.flags&=-33);var D=V0(a);Uh(a,D,j);break;case 3:case 4:var H=m.stateNode.containerInfo,le=V0(a);B0(a,le,H);break;default:throw Error(r(161))}}catch(he){Lt(a,a.return,he)}a.flags&=-3}l&4096&&(a.flags&=-4097)}function OT(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var l=a;OT(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),a=a.sibling}}function Ea(a,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)RT(a,l.alternate,l),l=l.sibling}function Cl(a){for(a=a.child;a!==null;){var l=a;switch(l.tag){case 0:case 11:case 14:case 15:ps(4,l,l.return),Cl(l);break;case 1:Vo(l,l.return);var m=l.stateNode;typeof m.componentWillUnmount=="function"&&ST(l,l.return,m),Cl(l);break;case 27:Mf(l.stateNode);case 26:case 5:Vo(l,l.return),Cl(l);break;case 22:l.memoizedState===null&&Cl(l);break;case 30:Cl(l);break;default:Cl(l)}a=a.sibling}}function ka(a,l,m){for(m=m&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var g=l.alternate,w=a,_=l,j=_.flags;switch(_.tag){case 0:case 11:case 15:ka(w,_,m),Rf(4,_);break;case 1:if(ka(w,_,m),g=_,w=g.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(le){Lt(g,g.return,le)}if(g=_,w=g.updateQueue,w!==null){var D=g.stateNode;try{var H=w.shared.hiddenCallbacks;if(H!==null)for(w.shared.hiddenCallbacks=null,w=0;w<H.length;w++)uI(H[w],D)}catch(le){Lt(g,g.return,le)}}m&&j&64&&wT(_),jf(_,_.return);break;case 27:ET(_);case 26:case 5:ka(w,_,m),m&&g===null&&j&4&&_T(_),jf(_,_.return);break;case 12:ka(w,_,m);break;case 31:ka(w,_,m),m&&j&4&&TT(w,_);break;case 13:ka(w,_,m),m&&j&4&&NT(w,_);break;case 22:_.memoizedState===null&&ka(w,_,m),jf(_,_.return);break;case 30:break;default:ka(w,_,m)}l=l.sibling}}function q0(a,l){var m=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),a=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),a!==m&&(a!=null&&a.refCount++,m!=null&&pf(m))}function G0(a,l){a=null,l.alternate!==null&&(a=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==a&&(l.refCount++,a!=null&&pf(a))}function wo(a,l,m,g){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)$T(a,l,m,g),l=l.sibling}function $T(a,l,m,g){var w=l.flags;switch(l.tag){case 0:case 11:case 15:wo(a,l,m,g),w&2048&&Rf(9,l);break;case 1:wo(a,l,m,g);break;case 3:wo(a,l,m,g),w&2048&&(a=null,l.alternate!==null&&(a=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==a&&(l.refCount++,a!=null&&pf(a)));break;case 12:if(w&2048){wo(a,l,m,g),a=l.stateNode;try{var _=l.memoizedProps,j=_.id,D=_.onPostCommit;typeof D=="function"&&D(j,l.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(H){Lt(l,l.return,H)}}else wo(a,l,m,g);break;case 31:wo(a,l,m,g);break;case 13:wo(a,l,m,g);break;case 23:break;case 22:_=l.stateNode,j=l.alternate,l.memoizedState!==null?_._visibility&2?wo(a,l,m,g):If(a,l):_._visibility&2?wo(a,l,m,g):(_._visibility|=2,su(a,l,m,g,(l.subtreeFlags&10256)!==0||!1)),w&2048&&q0(j,l);break;case 24:wo(a,l,m,g),w&2048&&G0(l.alternate,l);break;default:wo(a,l,m,g)}}function su(a,l,m,g,w){for(w=w&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var _=a,j=l,D=m,H=g,le=j.flags;switch(j.tag){case 0:case 11:case 15:su(_,j,D,H,w),Rf(8,j);break;case 23:break;case 22:var he=j.stateNode;j.memoizedState!==null?he._visibility&2?su(_,j,D,H,w):If(_,j):(he._visibility|=2,su(_,j,D,H,w)),w&&le&2048&&q0(j.alternate,j);break;case 24:su(_,j,D,H,w),w&&le&2048&&G0(j.alternate,j);break;default:su(_,j,D,H,w)}l=l.sibling}}function If(a,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var m=a,g=l,w=g.flags;switch(g.tag){case 22:If(m,g),w&2048&&q0(g.alternate,g);break;case 24:If(m,g),w&2048&&G0(g.alternate,g);break;default:If(m,g)}l=l.sibling}}var Tf=8192;function lu(a,l,m){if(a.subtreeFlags&Tf)for(a=a.child;a!==null;)DT(a,l,m),a=a.sibling}function DT(a,l,m){switch(a.tag){case 26:lu(a,l,m),a.flags&Tf&&a.memoizedState!==null&&Zq(m,xo,a.memoizedState,a.memoizedProps);break;case 5:lu(a,l,m);break;case 3:case 4:var g=xo;xo=tg(a.stateNode.containerInfo),lu(a,l,m),xo=g;break;case 22:a.memoizedState===null&&(g=a.alternate,g!==null&&g.memoizedState!==null?(g=Tf,Tf=16777216,lu(a,l,m),Tf=g):lu(a,l,m));break;default:lu(a,l,m)}}function PT(a){var l=a.alternate;if(l!==null&&(a=l.child,a!==null)){l.child=null;do l=a.sibling,a.sibling=null,a=l;while(a!==null)}}function Nf(a){var l=a.deletions;if((a.flags&16)!==0){if(l!==null)for(var m=0;m<l.length;m++){var g=l[m];ir=g,zT(g,a)}PT(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)MT(a),a=a.sibling}function MT(a){switch(a.tag){case 0:case 11:case 15:Nf(a),a.flags&2048&&ps(9,a,a.return);break;case 3:Nf(a);break;case 12:Nf(a);break;case 22:var l=a.stateNode;a.memoizedState!==null&&l._visibility&2&&(a.return===null||a.return.tag!==13)?(l._visibility&=-3,Vh(a)):Nf(a);break;default:Nf(a)}}function Vh(a){var l=a.deletions;if((a.flags&16)!==0){if(l!==null)for(var m=0;m<l.length;m++){var g=l[m];ir=g,zT(g,a)}PT(a)}for(a=a.child;a!==null;){switch(l=a,l.tag){case 0:case 11:case 15:ps(8,l,l.return),Vh(l);break;case 22:m=l.stateNode,m._visibility&2&&(m._visibility&=-3,Vh(l));break;default:Vh(l)}a=a.sibling}}function zT(a,l){for(;ir!==null;){var m=ir;switch(m.tag){case 0:case 11:case 15:ps(8,m,l);break;case 23:case 22:if(m.memoizedState!==null&&m.memoizedState.cachePool!==null){var g=m.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:pf(m.memoizedState.cache)}if(g=m.child,g!==null)g.return=m,ir=g;else e:for(m=a;ir!==null;){g=ir;var w=g.sibling,_=g.return;if(jT(g),g===m){ir=null;break e}if(w!==null){w.return=_,ir=w;break e}ir=_}}}var cq={getCacheForType:function(a){var l=pr(zn),m=l.data.get(a);return m===void 0&&(m=a(),l.data.set(a,m)),m},cacheSignal:function(){return pr(zn).controller.signal}},uq=typeof WeakMap=="function"?WeakMap:Map,Dt=0,Zt=null,St=null,Et=0,zt=0,bi=null,hs=!1,cu=!1,K0=!1,Ra=0,_n=0,gs=0,El=0,Z0=0,xi=0,uu=0,Af=null,ni=null,Y0=!1,Bh=0,LT=0,Hh=1/0,qh=null,vs=null,Yn=0,ys=null,du=null,ja=0,W0=0,X0=null,UT=null,Of=0,Q0=null;function wi(){return(Dt&2)!==0&&Et!==0?Et&-Et:P.T!==null?iw():yx()}function FT(){if(xi===0)if((Et&536870912)===0||Tt){var a=Oc;Oc<<=1,(Oc&3932160)===0&&(Oc=262144),xi=a}else xi=536870912;return a=vi.current,a!==null&&(a.flags|=32),xi}function ri(a,l,m){(a===Zt&&(zt===2||zt===9)||a.cancelPendingCommit!==null)&&(fu(a,0),bs(a,Et,xi,!1)),gn(a,m),((Dt&2)===0||a!==Zt)&&(a===Zt&&((Dt&2)===0&&(El|=m),_n===4&&bs(a,Et,xi,!1)),Bo(a))}function VT(a,l,m){if((Dt&6)!==0)throw Error(r(327));var g=!m&&(l&127)===0&&(l&a.expiredLanes)===0||un(a,l),w=g?mq(a,l):ew(a,l,!0),_=g;do{if(w===0){cu&&!g&&bs(a,l,0,!1);break}else{if(m=a.current.alternate,_&&!dq(m)){w=ew(a,l,!1),_=!1;continue}if(w===2){if(_=l,a.errorRecoveryDisabledLanes&_)var j=0;else j=a.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){l=j;e:{var D=a;w=Af;var H=D.current.memoizedState.isDehydrated;if(H&&(fu(D,j).flags|=256),j=ew(D,j,!1),j!==2){if(K0&&!H){D.errorRecoveryDisabledLanes|=_,El|=_,w=4;break e}_=ni,ni=w,_!==null&&(ni===null?ni=_:ni.push.apply(ni,_))}w=j}if(_=!1,w!==2)continue}}if(w===1){fu(a,0),bs(a,l,0,!0);break}e:{switch(g=a,_=w,_){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:bs(g,l,xi,!hs);break e;case 2:ni=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(w=Bh+300-ve(),10<w)){if(bs(g,l,xi,!hs),rt(g,0,!0)!==0)break e;ja=l,g.timeoutHandle=bN(BT.bind(null,g,m,ni,qh,Y0,l,xi,El,uu,hs,_,"Throttled",-0,0),w);break e}BT(g,m,ni,qh,Y0,l,xi,El,uu,hs,_,null,-0,0)}}break}while(!0);Bo(a)}function BT(a,l,m,g,w,_,j,D,H,le,he,be,ce,me){if(a.timeoutHandle=-1,be=l.subtreeFlags,be&8192||(be&16785408)===16785408){be={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ma},DT(l,_,be);var ze=(_&62914560)===_?Bh-ve():(_&4194048)===_?LT-ve():0;if(ze=Yq(be,ze),ze!==null){ja=_,a.cancelPendingCommit=ze(XT.bind(null,a,l,_,m,g,w,j,D,H,he,be,null,ce,me)),bs(a,_,j,!le);return}}XT(a,l,_,m,g,w,j,D,H)}function dq(a){for(var l=a;;){var m=l.tag;if((m===0||m===11||m===15)&&l.flags&16384&&(m=l.updateQueue,m!==null&&(m=m.stores,m!==null)))for(var g=0;g<m.length;g++){var w=m[g],_=w.getSnapshot;w=w.value;try{if(!hi(_(),w))return!1}catch{return!1}}if(m=l.child,l.subtreeFlags&16384&&m!==null)m.return=l,l=m;else{if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function bs(a,l,m,g){l&=~Z0,l&=~El,a.suspendedLanes|=l,a.pingedLanes&=~l,g&&(a.warmLanes|=l),g=a.expirationTimes;for(var w=l;0<w;){var _=31-It(w),j=1<<_;g[_]=-1,w&=~j}m!==0&&ll(a,m,l)}function Gh(){return(Dt&6)===0?($f(0),!1):!0}function J0(){if(St!==null){if(zt===0)var a=St.return;else a=St,va=gl=null,h0(a),nu=null,gf=0,a=St;for(;a!==null;)xT(a.alternate,a),a=a.return;St=null}}function fu(a,l){var m=a.timeoutHandle;m!==-1&&(a.timeoutHandle=-1,Nq(m)),m=a.cancelPendingCommit,m!==null&&(a.cancelPendingCommit=null,m()),ja=0,J0(),Zt=a,St=m=ha(a.current,null),Et=l,zt=0,bi=null,hs=!1,cu=un(a,l),K0=!1,uu=xi=Z0=El=gs=_n=0,ni=Af=null,Y0=!1,(l&8)!==0&&(l|=l&32);var g=a.entangledLanes;if(g!==0)for(a=a.entanglements,g&=l;0<g;){var w=31-It(g),_=1<<w;l|=a[w],g&=~_}return Ra=l,mh(),m}function HT(a,l){ut=null,P.H=Cf,l===tu||l===wh?(l=aI(),zt=3):l===r0?(l=aI(),zt=4):zt=l===N0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,bi=l,St===null&&(_n=1,Dh(a,Vi(l,a.current)))}function qT(){var a=vi.current;return a===null?!0:(Et&4194048)===Et?Gi===null:(Et&62914560)===Et||(Et&536870912)!==0?a===Gi:!1}function GT(){var a=P.H;return P.H=Cf,a===null?Cf:a}function KT(){var a=P.A;return P.A=cq,a}function Kh(){_n=4,hs||(Et&4194048)!==Et&&vi.current!==null||(cu=!0),(gs&134217727)===0&&(El&134217727)===0||Zt===null||bs(Zt,Et,xi,!1)}function ew(a,l,m){var g=Dt;Dt|=2;var w=GT(),_=KT();(Zt!==a||Et!==l)&&(qh=null,fu(a,l)),l=!1;var j=_n;e:do try{if(zt!==0&&St!==null){var D=St,H=bi;switch(zt){case 8:J0(),j=6;break e;case 3:case 2:case 9:case 6:vi.current===null&&(l=!0);var le=zt;if(zt=0,bi=null,mu(a,D,H,le),m&&cu){j=0;break e}break;default:le=zt,zt=0,bi=null,mu(a,D,H,le)}}fq(),j=_n;break}catch(he){HT(a,he)}while(!0);return l&&a.shellSuspendCounter++,va=gl=null,Dt=g,P.H=w,P.A=_,St===null&&(Zt=null,Et=0,mh()),j}function fq(){for(;St!==null;)ZT(St)}function mq(a,l){var m=Dt;Dt|=2;var g=GT(),w=KT();Zt!==a||Et!==l?(qh=null,Hh=ve()+500,fu(a,l)):cu=un(a,l);e:do try{if(zt!==0&&St!==null){l=St;var _=bi;t:switch(zt){case 1:zt=0,bi=null,mu(a,l,_,1);break;case 2:case 9:if(iI(_)){zt=0,bi=null,YT(l);break}l=function(){zt!==2&&zt!==9||Zt!==a||(zt=7),Bo(a)},_.then(l,l);break e;case 3:zt=7;break e;case 4:zt=5;break e;case 7:iI(_)?(zt=0,bi=null,YT(l)):(zt=0,bi=null,mu(a,l,_,7));break;case 5:var j=null;switch(St.tag){case 26:j=St.memoizedState;case 5:case 27:var D=St;if(j?$N(j):D.stateNode.complete){zt=0,bi=null;var H=D.sibling;if(H!==null)St=H;else{var le=D.return;le!==null?(St=le,Zh(le)):St=null}break t}}zt=0,bi=null,mu(a,l,_,5);break;case 6:zt=0,bi=null,mu(a,l,_,6);break;case 8:J0(),_n=6;break e;default:throw Error(r(462))}}pq();break}catch(he){HT(a,he)}while(!0);return va=gl=null,P.H=g,P.A=w,Dt=m,St!==null?0:(Zt=null,Et=0,mh(),_n)}function pq(){for(;St!==null&&!ue();)ZT(St)}function ZT(a){var l=yT(a.alternate,a,Ra);a.memoizedProps=a.pendingProps,l===null?Zh(a):St=l}function YT(a){var l=a,m=l.alternate;switch(l.tag){case 15:case 0:l=fT(m,l,l.pendingProps,l.type,void 0,Et);break;case 11:l=fT(m,l,l.pendingProps,l.type.render,l.ref,Et);break;case 5:h0(l);default:xT(m,l),l=St=Kj(l,Ra),l=yT(m,l,Ra)}a.memoizedProps=a.pendingProps,l===null?Zh(a):St=l}function mu(a,l,m,g){va=gl=null,h0(l),nu=null,gf=0;var w=l.return;try{if(nq(a,w,l,m,Et)){_n=1,Dh(a,Vi(m,a.current)),St=null;return}}catch(_){if(w!==null)throw St=w,_;_n=1,Dh(a,Vi(m,a.current)),St=null;return}l.flags&32768?(Tt||g===1?a=!0:cu||(Et&536870912)!==0?a=!1:(hs=a=!0,(g===2||g===9||g===3||g===6)&&(g=vi.current,g!==null&&g.tag===13&&(g.flags|=16384))),WT(l,a)):Zh(l)}function Zh(a){var l=a;do{if((l.flags&32768)!==0){WT(l,hs);return}a=l.return;var m=oq(l.alternate,l,Ra);if(m!==null){St=m;return}if(l=l.sibling,l!==null){St=l;return}St=l=a}while(l!==null);_n===0&&(_n=5)}function WT(a,l){do{var m=aq(a.alternate,a);if(m!==null){m.flags&=32767,St=m;return}if(m=a.return,m!==null&&(m.flags|=32768,m.subtreeFlags=0,m.deletions=null),!l&&(a=a.sibling,a!==null)){St=a;return}St=a=m}while(a!==null);_n=6,St=null}function XT(a,l,m,g,w,_,j,D,H){a.cancelPendingCommit=null;do Yh();while(Yn!==0);if((Dt&6)!==0)throw Error(r(327));if(l!==null){if(l===a.current)throw Error(r(177));if(_=l.lanes|l.childLanes,_|=Vx,Zr(a,m,_,j,D,H),a===Zt&&(St=Zt=null,Et=0),du=l,ys=a,ja=m,W0=_,X0=w,UT=g,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,yq(Ne,function(){return nN(),null})):(a.callbackNode=null,a.callbackPriority=0),g=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||g){g=P.T,P.T=null,w=G.p,G.p=2,j=Dt,Dt|=4;try{sq(a,l,m)}finally{Dt=j,G.p=w,P.T=g}}Yn=1,QT(),JT(),eN()}}function QT(){if(Yn===1){Yn=0;var a=ys,l=du,m=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||m){m=P.T,P.T=null;var g=G.p;G.p=2;var w=Dt;Dt|=4;try{AT(l,a);var _=fw,j=zj(a.containerInfo),D=_.focusedElem,H=_.selectionRange;if(j!==D&&D&&D.ownerDocument&&Mj(D.ownerDocument.documentElement,D)){if(H!==null&&Mx(D)){var le=H.start,he=H.end;if(he===void 0&&(he=le),"selectionStart"in D)D.selectionStart=le,D.selectionEnd=Math.min(he,D.value.length);else{var be=D.ownerDocument||document,ce=be&&be.defaultView||window;if(ce.getSelection){var me=ce.getSelection(),ze=D.textContent.length,Xe=Math.min(H.start,ze),Gt=H.end===void 0?Xe:Math.min(H.end,ze);!me.extend&&Xe>Gt&&(j=Gt,Gt=Xe,Xe=j);var re=Pj(D,Xe),Q=Pj(D,Gt);if(re&&Q&&(me.rangeCount!==1||me.anchorNode!==re.node||me.anchorOffset!==re.offset||me.focusNode!==Q.node||me.focusOffset!==Q.offset)){var se=be.createRange();se.setStart(re.node,re.offset),me.removeAllRanges(),Xe>Gt?(me.addRange(se),me.extend(Q.node,Q.offset)):(se.setEnd(Q.node,Q.offset),me.addRange(se))}}}}for(be=[],me=D;me=me.parentNode;)me.nodeType===1&&be.push({element:me,left:me.scrollLeft,top:me.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<be.length;D++){var ge=be[D];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}sg=!!dw,fw=dw=null}finally{Dt=w,G.p=g,P.T=m}}a.current=l,Yn=2}}function JT(){if(Yn===2){Yn=0;var a=ys,l=du,m=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||m){m=P.T,P.T=null;var g=G.p;G.p=2;var w=Dt;Dt|=4;try{RT(a,l.alternate,l)}finally{Dt=w,G.p=g,P.T=m}}Yn=3}}function eN(){if(Yn===4||Yn===3){Yn=0,xe();var a=ys,l=du,m=ja,g=UT;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Yn=5:(Yn=0,du=ys=null,tN(a,a.pendingLanes));var w=a.pendingLanes;if(w===0&&(vs=null),yo(m),l=l.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(cn,l,void 0,(l.current.flags&128)===128)}catch{}if(g!==null){l=P.T,w=G.p,G.p=2,P.T=null;try{for(var _=a.onRecoverableError,j=0;j<g.length;j++){var D=g[j];_(D.value,{componentStack:D.stack})}}finally{P.T=l,G.p=w}}(ja&3)!==0&&Yh(),Bo(a),w=a.pendingLanes,(m&261930)!==0&&(w&42)!==0?a===Q0?Of++:(Of=0,Q0=a):Of=0,$f(0)}}function tN(a,l){(a.pooledCacheLanes&=l)===0&&(l=a.pooledCache,l!=null&&(a.pooledCache=null,pf(l)))}function Yh(){return QT(),JT(),eN(),nN()}function nN(){if(Yn!==5)return!1;var a=ys,l=W0;W0=0;var m=yo(ja),g=P.T,w=G.p;try{G.p=32>m?32:m,P.T=null,m=X0,X0=null;var _=ys,j=ja;if(Yn=0,du=ys=null,ja=0,(Dt&6)!==0)throw Error(r(331));var D=Dt;if(Dt|=4,MT(_.current),$T(_,_.current,j,m),Dt=D,$f(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(cn,_)}catch{}return!0}finally{G.p=w,P.T=g,tN(a,l)}}function rN(a,l,m){l=Vi(m,l),l=T0(a.stateNode,l,2),a=ds(a,l,2),a!==null&&(gn(a,2),Bo(a))}function Lt(a,l,m){if(a.tag===3)rN(a,a,m);else for(;l!==null;){if(l.tag===3){rN(l,a,m);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(vs===null||!vs.has(g))){a=Vi(m,a),m=iT(2),g=ds(l,m,2),g!==null&&(oT(m,g,l,a),gn(g,2),Bo(g));break}}l=l.return}}function tw(a,l,m){var g=a.pingCache;if(g===null){g=a.pingCache=new uq;var w=new Set;g.set(l,w)}else w=g.get(l),w===void 0&&(w=new Set,g.set(l,w));w.has(m)||(K0=!0,w.add(m),a=hq.bind(null,a,l,m),l.then(a,a))}function hq(a,l,m){var g=a.pingCache;g!==null&&g.delete(l),a.pingedLanes|=a.suspendedLanes&m,a.warmLanes&=~m,Zt===a&&(Et&m)===m&&(_n===4||_n===3&&(Et&62914560)===Et&&300>ve()-Bh?(Dt&2)===0&&fu(a,0):Z0|=m,uu===Et&&(uu=0)),Bo(a)}function iN(a,l){l===0&&(l=yr()),a=ml(a,l),a!==null&&(gn(a,l),Bo(a))}function gq(a){var l=a.memoizedState,m=0;l!==null&&(m=l.retryLane),iN(a,m)}function vq(a,l){var m=0;switch(a.tag){case 31:case 13:var g=a.stateNode,w=a.memoizedState;w!==null&&(m=w.retryLane);break;case 19:g=a.stateNode;break;case 22:g=a.stateNode._retryCache;break;default:throw Error(r(314))}g!==null&&g.delete(l),iN(a,m)}function yq(a,l){return q(a,l)}var Wh=null,pu=null,nw=!1,Xh=!1,rw=!1,xs=0;function Bo(a){a!==pu&&a.next===null&&(pu===null?Wh=pu=a:pu=pu.next=a),Xh=!0,nw||(nw=!0,xq())}function $f(a,l){if(!rw&&Xh){rw=!0;do for(var m=!1,g=Wh;g!==null;){if(a!==0){var w=g.pendingLanes;if(w===0)var _=0;else{var j=g.suspendedLanes,D=g.pingedLanes;_=(1<<31-It(42|a)+1)-1,_&=w&~(j&~D),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(m=!0,lN(g,_))}else _=Et,_=rt(g,g===Zt?_:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(_&3)===0||un(g,_)||(m=!0,lN(g,_));g=g.next}while(m);rw=!1}}function bq(){oN()}function oN(){Xh=nw=!1;var a=0;xs!==0&&Tq()&&(a=xs);for(var l=ve(),m=null,g=Wh;g!==null;){var w=g.next,_=aN(g,l);_===0?(g.next=null,m===null?Wh=w:m.next=w,w===null&&(pu=m)):(m=g,(a!==0||(_&3)!==0)&&(Xh=!0)),g=w}Yn!==0&&Yn!==5||$f(a),xs!==0&&(xs=0)}function aN(a,l){for(var m=a.suspendedLanes,g=a.pingedLanes,w=a.expirationTimes,_=a.pendingLanes&-62914561;0<_;){var j=31-It(_),D=1<<j,H=w[j];H===-1?((D&m)===0||(D&g)!==0)&&(w[j]=nr(D,l)):H<=l&&(a.expiredLanes|=D),_&=~D}if(l=Zt,m=Et,m=rt(a,a===l?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),g=a.callbackNode,m===0||a===l&&(zt===2||zt===9)||a.cancelPendingCommit!==null)return g!==null&&g!==null&&ae(g),a.callbackNode=null,a.callbackPriority=0;if((m&3)===0||un(a,m)){if(l=m&-m,l===a.callbackPriority)return l;switch(g!==null&&ae(g),yo(m)){case 2:case 8:m=ye;break;case 32:m=Ne;break;case 268435456:m=ot;break;default:m=Ne}return g=sN.bind(null,a),m=q(m,g),a.callbackPriority=l,a.callbackNode=m,l}return g!==null&&g!==null&&ae(g),a.callbackPriority=2,a.callbackNode=null,2}function sN(a,l){if(Yn!==0&&Yn!==5)return a.callbackNode=null,a.callbackPriority=0,null;var m=a.callbackNode;if(Yh()&&a.callbackNode!==m)return null;var g=Et;return g=rt(a,a===Zt?g:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),g===0?null:(VT(a,g,l),aN(a,ve()),a.callbackNode!=null&&a.callbackNode===m?sN.bind(null,a):null)}function lN(a,l){if(Yh())return null;VT(a,l,!0)}function xq(){Aq(function(){(Dt&6)!==0?q(ne,bq):oN()})}function iw(){if(xs===0){var a=Jc;a===0&&(a=ts,ts<<=1,(ts&261888)===0&&(ts=256)),xs=a}return xs}function cN(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:oh(""+a)}function uN(a,l){var m=l.ownerDocument.createElement("input");return m.name=l.name,m.value=l.value,a.id&&m.setAttribute("form",a.id),l.parentNode.insertBefore(m,l),a=new FormData(a),m.parentNode.removeChild(m),a}function wq(a,l,m,g,w){if(l==="submit"&&m&&m.stateNode===w){var _=cN((w[Xr]||null).action),j=g.submitter;j&&(l=(l=j[Xr]||null)?cN(l.formAction):j.getAttribute("formAction"),l!==null&&(_=l,j=null));var D=new ch("action","action",null,g,w);a.push({event:D,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(xs!==0){var H=j?uN(w,j):new FormData(w);C0(m,{pending:!0,data:H,method:w.method,action:_},null,H)}}else typeof _=="function"&&(D.preventDefault(),H=j?uN(w,j):new FormData(w),C0(m,{pending:!0,data:H,method:w.method,action:_},_,H))},currentTarget:w}]})}}for(var ow=0;ow<Fx.length;ow++){var aw=Fx[ow],Sq=aw.toLowerCase(),_q=aw[0].toUpperCase()+aw.slice(1);bo(Sq,"on"+_q)}bo(Fj,"onAnimationEnd"),bo(Vj,"onAnimationIteration"),bo(Bj,"onAnimationStart"),bo("dblclick","onDoubleClick"),bo("focusin","onFocus"),bo("focusout","onBlur"),bo(L9,"onTransitionRun"),bo(U9,"onTransitionStart"),bo(F9,"onTransitionCancel"),bo(Hj,"onTransitionEnd"),Lc("onMouseEnter",["mouseout","mouseover"]),Lc("onMouseLeave",["mouseout","mouseover"]),Lc("onPointerEnter",["pointerout","pointerover"]),Lc("onPointerLeave",["pointerout","pointerover"]),cl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),cl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),cl("onBeforeInput",["compositionend","keypress","textInput","paste"]),cl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),cl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),cl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Df="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(" "),Cq=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Df));function dN(a,l){l=(l&4)!==0;for(var m=0;m<a.length;m++){var g=a[m],w=g.event;g=g.listeners;e:{var _=void 0;if(l)for(var j=g.length-1;0<=j;j--){var D=g[j],H=D.instance,le=D.currentTarget;if(D=D.listener,H!==_&&w.isPropagationStopped())break e;_=D,w.currentTarget=le;try{_(w)}catch(he){fh(he)}w.currentTarget=null,_=H}else for(j=0;j<g.length;j++){if(D=g[j],H=D.instance,le=D.currentTarget,D=D.listener,H!==_&&w.isPropagationStopped())break e;_=D,w.currentTarget=le;try{_(w)}catch(he){fh(he)}w.currentTarget=null,_=H}}}}function _t(a,l){var m=l[bx];m===void 0&&(m=l[bx]=new Set);var g=a+"__bubble";m.has(g)||(fN(l,a,2,!1),m.add(g))}function sw(a,l,m){var g=0;l&&(g|=4),fN(m,a,g,l)}var Qh="_reactListening"+Math.random().toString(36).slice(2);function lw(a){if(!a[Qh]){a[Qh]=!0,oj.forEach(function(m){m!=="selectionchange"&&(Cq.has(m)||sw(m,!1,a),sw(m,!0,a))});var l=a.nodeType===9?a:a.ownerDocument;l===null||l[Qh]||(l[Qh]=!0,sw("selectionchange",!1,l))}}function fN(a,l,m,g){switch(FN(l)){case 2:var w=Qq;break;case 8:w=Jq;break;default:w=_w}m=w.bind(null,l,m,a),w=void 0,!jx||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),g?w!==void 0?a.addEventListener(l,m,{capture:!0,passive:w}):a.addEventListener(l,m,!0):w!==void 0?a.addEventListener(l,m,{passive:w}):a.addEventListener(l,m,!1)}function cw(a,l,m,g,w){var _=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var j=g.tag;if(j===3||j===4){var D=g.stateNode.containerInfo;if(D===w)break;if(j===4)for(j=g.return;j!==null;){var H=j.tag;if((H===3||H===4)&&j.stateNode.containerInfo===w)return;j=j.return}for(;D!==null;){if(j=Pc(D),j===null)return;if(H=j.tag,H===5||H===6||H===26||H===27){g=_=j;continue e}D=D.parentNode}}g=g.return}vj(function(){var le=_,he=kx(m),be=[];e:{var ce=qj.get(a);if(ce!==void 0){var me=ch,ze=a;switch(a){case"keypress":if(sh(m)===0)break e;case"keydown":case"keyup":me=v9;break;case"focusin":ze="focus",me=Ax;break;case"focusout":ze="blur",me=Ax;break;case"beforeblur":case"afterblur":me=Ax;break;case"click":if(m.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=xj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=o9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=x9;break;case Fj:case Vj:case Bj:me=l9;break;case Hj:me=S9;break;case"scroll":case"scrollend":me=r9;break;case"wheel":me=C9;break;case"copy":case"cut":case"paste":me=u9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=Sj;break;case"toggle":case"beforetoggle":me=k9}var Xe=(l&4)!==0,Gt=!Xe&&(a==="scroll"||a==="scrollend"),re=Xe?ce!==null?ce+"Capture":null:ce;Xe=[];for(var Q=le,se;Q!==null;){var ge=Q;if(se=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||se===null||re===null||(ge=nf(Q,re),ge!=null&&Xe.push(Pf(Q,ge,se))),Gt)break;Q=Q.return}0<Xe.length&&(ce=new me(ce,ze,null,m,he),be.push({event:ce,listeners:Xe}))}}if((l&7)===0){e:{if(ce=a==="mouseover"||a==="pointerover",me=a==="mouseout"||a==="pointerout",ce&&m!==Ex&&(ze=m.relatedTarget||m.fromElement)&&(Pc(ze)||ze[Dc]))break e;if((me||ce)&&(ce=he.window===he?he:(ce=he.ownerDocument)?ce.defaultView||ce.parentWindow:window,me?(ze=m.relatedTarget||m.toElement,me=le,ze=ze?Pc(ze):null,ze!==null&&(Gt=o(ze),Xe=ze.tag,ze!==Gt||Xe!==5&&Xe!==27&&Xe!==6)&&(ze=null)):(me=null,ze=le),me!==ze)){if(Xe=xj,ge="onMouseLeave",re="onMouseEnter",Q="mouse",(a==="pointerout"||a==="pointerover")&&(Xe=Sj,ge="onPointerLeave",re="onPointerEnter",Q="pointer"),Gt=me==null?ce:tf(me),se=ze==null?ce:tf(ze),ce=new Xe(ge,Q+"leave",me,m,he),ce.target=Gt,ce.relatedTarget=se,ge=null,Pc(he)===le&&(Xe=new Xe(re,Q+"enter",ze,m,he),Xe.target=se,Xe.relatedTarget=Gt,ge=Xe),Gt=ge,me&&ze)t:{for(Xe=Eq,re=me,Q=ze,se=0,ge=re;ge;ge=Xe(ge))se++;ge=0;for(var Ze=Q;Ze;Ze=Xe(Ze))ge++;for(;0<se-ge;)re=Xe(re),se--;for(;0<ge-se;)Q=Xe(Q),ge--;for(;se--;){if(re===Q||Q!==null&&re===Q.alternate){Xe=re;break t}re=Xe(re),Q=Xe(Q)}Xe=null}else Xe=null;me!==null&&mN(be,ce,me,Xe,!1),ze!==null&&Gt!==null&&mN(be,Gt,ze,Xe,!0)}}e:{if(ce=le?tf(le):window,me=ce.nodeName&&ce.nodeName.toLowerCase(),me==="select"||me==="input"&&ce.type==="file")var At=Tj;else if(jj(ce))if(Nj)At=P9;else{At=$9;var qe=O9}else me=ce.nodeName,!me||me.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?le&&Cx(le.elementType)&&(At=Tj):At=D9;if(At&&(At=At(a,le))){Ij(be,At,m,he);break e}qe&&qe(a,ce,le),a==="focusout"&&le&&ce.type==="number"&&le.memoizedProps.value!=null&&_x(ce,"number",ce.value)}switch(qe=le?tf(le):window,a){case"focusin":(jj(qe)||qe.contentEditable==="true")&&(qc=qe,zx=le,df=null);break;case"focusout":df=zx=qc=null;break;case"mousedown":Lx=!0;break;case"contextmenu":case"mouseup":case"dragend":Lx=!1,Lj(be,m,he);break;case"selectionchange":if(z9)break;case"keydown":case"keyup":Lj(be,m,he)}var mt;if($x)e:{switch(a){case"compositionstart":var kt="onCompositionStart";break e;case"compositionend":kt="onCompositionEnd";break e;case"compositionupdate":kt="onCompositionUpdate";break e}kt=void 0}else Hc?kj(a,m)&&(kt="onCompositionEnd"):a==="keydown"&&m.keyCode===229&&(kt="onCompositionStart");kt&&(_j&&m.locale!=="ko"&&(Hc||kt!=="onCompositionStart"?kt==="onCompositionEnd"&&Hc&&(mt=yj()):(is=he,Ix="value"in is?is.value:is.textContent,Hc=!0)),qe=Jh(le,kt),0<qe.length&&(kt=new wj(kt,a,null,m,he),be.push({event:kt,listeners:qe}),mt?kt.data=mt:(mt=Rj(m),mt!==null&&(kt.data=mt)))),(mt=j9?I9(a,m):T9(a,m))&&(kt=Jh(le,"onBeforeInput"),0<kt.length&&(qe=new wj("onBeforeInput","beforeinput",null,m,he),be.push({event:qe,listeners:kt}),qe.data=mt)),wq(be,a,le,m,he)}dN(be,l)})}function Pf(a,l,m){return{instance:a,listener:l,currentTarget:m}}function Jh(a,l){for(var m=l+"Capture",g=[];a!==null;){var w=a,_=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||_===null||(w=nf(a,m),w!=null&&g.unshift(Pf(a,w,_)),w=nf(a,l),w!=null&&g.push(Pf(a,w,_))),a.tag===3)return g;a=a.return}return[]}function Eq(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function mN(a,l,m,g,w){for(var _=l._reactName,j=[];m!==null&&m!==g;){var D=m,H=D.alternate,le=D.stateNode;if(D=D.tag,H!==null&&H===g)break;D!==5&&D!==26&&D!==27||le===null||(H=le,w?(le=nf(m,_),le!=null&&j.unshift(Pf(m,le,H))):w||(le=nf(m,_),le!=null&&j.push(Pf(m,le,H)))),m=m.return}j.length!==0&&a.push({event:l,listeners:j})}var kq=/\r\n?/g,Rq=/\u0000|\uFFFD/g;function pN(a){return(typeof a=="string"?a:""+a).replace(kq,`
|
|
601
|
-
`).replace(Rq,"")}function hN(a,l){return l=pN(l),pN(a)===l}function qt(a,l,m,g,w,_){switch(m){case"children":typeof g=="string"?l==="body"||l==="textarea"&&g===""||Fc(a,g):(typeof g=="number"||typeof g=="bigint")&&l!=="body"&&Fc(a,""+g);break;case"className":rh(a,"class",g);break;case"tabIndex":rh(a,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":rh(a,m,g);break;case"style":hj(a,g,_);break;case"data":if(l!=="object"){rh(a,"data",g);break}case"src":case"href":if(g===""&&(l!=="a"||m!=="href")){a.removeAttribute(m);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){a.removeAttribute(m);break}g=oh(""+g),a.setAttribute(m,g);break;case"action":case"formAction":if(typeof g=="function"){a.setAttribute(m,"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 _=="function"&&(m==="formAction"?(l!=="input"&&qt(a,l,"name",w.name,w,null),qt(a,l,"formEncType",w.formEncType,w,null),qt(a,l,"formMethod",w.formMethod,w,null),qt(a,l,"formTarget",w.formTarget,w,null)):(qt(a,l,"encType",w.encType,w,null),qt(a,l,"method",w.method,w,null),qt(a,l,"target",w.target,w,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){a.removeAttribute(m);break}g=oh(""+g),a.setAttribute(m,g);break;case"onClick":g!=null&&(a.onclick=ma);break;case"onScroll":g!=null&&_t("scroll",a);break;case"onScrollEnd":g!=null&&_t("scrollend",a);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(m=g.__html,m!=null){if(w.children!=null)throw Error(r(60));a.innerHTML=m}}break;case"multiple":a.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":a.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){a.removeAttribute("xlink:href");break}m=oh(""+g),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",m);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?a.setAttribute(m,""+g):a.removeAttribute(m);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":g&&typeof g!="function"&&typeof g!="symbol"?a.setAttribute(m,""):a.removeAttribute(m);break;case"capture":case"download":g===!0?a.setAttribute(m,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?a.setAttribute(m,g):a.removeAttribute(m);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?a.setAttribute(m,g):a.removeAttribute(m);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?a.removeAttribute(m):a.setAttribute(m,g);break;case"popover":_t("beforetoggle",a),_t("toggle",a),nh(a,"popover",g);break;case"xlinkActuate":fa(a,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":fa(a,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":fa(a,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":fa(a,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":fa(a,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":fa(a,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":fa(a,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":fa(a,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":fa(a,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":nh(a,"is",g);break;case"innerText":case"textContent":break;default:(!(2<m.length)||m[0]!=="o"&&m[0]!=="O"||m[1]!=="n"&&m[1]!=="N")&&(m=t9.get(m)||m,nh(a,m,g))}}function uw(a,l,m,g,w,_){switch(m){case"style":hj(a,g,_);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(m=g.__html,m!=null){if(w.children!=null)throw Error(r(60));a.innerHTML=m}}break;case"children":typeof g=="string"?Fc(a,g):(typeof g=="number"||typeof g=="bigint")&&Fc(a,""+g);break;case"onScroll":g!=null&&_t("scroll",a);break;case"onScrollEnd":g!=null&&_t("scrollend",a);break;case"onClick":g!=null&&(a.onclick=ma);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!aj.hasOwnProperty(m))e:{if(m[0]==="o"&&m[1]==="n"&&(w=m.endsWith("Capture"),l=m.slice(2,w?m.length-7:void 0),_=a[Xr]||null,_=_!=null?_[m]:null,typeof _=="function"&&a.removeEventListener(l,_,w),typeof g=="function")){typeof _!="function"&&_!==null&&(m in a?a[m]=null:a.hasAttribute(m)&&a.removeAttribute(m)),a.addEventListener(l,g,w);break e}m in a?a[m]=g:g===!0?a.setAttribute(m,""):nh(a,m,g)}}}function gr(a,l,m){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_t("error",a),_t("load",a);var g=!1,w=!1,_;for(_ in m)if(m.hasOwnProperty(_)){var j=m[_];if(j!=null)switch(_){case"src":g=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:qt(a,l,_,j,m,null)}}w&&qt(a,l,"srcSet",m.srcSet,m,null),g&&qt(a,l,"src",m.src,m,null);return;case"input":_t("invalid",a);var D=_=j=w=null,H=null,le=null;for(g in m)if(m.hasOwnProperty(g)){var he=m[g];if(he!=null)switch(g){case"name":w=he;break;case"type":j=he;break;case"checked":H=he;break;case"defaultChecked":le=he;break;case"value":_=he;break;case"defaultValue":D=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,l));break;default:qt(a,l,g,he,m,null)}}dj(a,_,D,H,le,j,w,!1);return;case"select":_t("invalid",a),g=j=_=null;for(w in m)if(m.hasOwnProperty(w)&&(D=m[w],D!=null))switch(w){case"value":_=D;break;case"defaultValue":j=D;break;case"multiple":g=D;default:qt(a,l,w,D,m,null)}l=_,m=j,a.multiple=!!g,l!=null?Uc(a,!!g,l,!1):m!=null&&Uc(a,!!g,m,!0);return;case"textarea":_t("invalid",a),_=w=g=null;for(j in m)if(m.hasOwnProperty(j)&&(D=m[j],D!=null))switch(j){case"value":g=D;break;case"defaultValue":w=D;break;case"children":_=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(91));break;default:qt(a,l,j,D,m,null)}mj(a,g,w,_);return;case"option":for(H in m)if(m.hasOwnProperty(H)&&(g=m[H],g!=null))switch(H){case"selected":a.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:qt(a,l,H,g,m,null)}return;case"dialog":_t("beforetoggle",a),_t("toggle",a),_t("cancel",a),_t("close",a);break;case"iframe":case"object":_t("load",a);break;case"video":case"audio":for(g=0;g<Df.length;g++)_t(Df[g],a);break;case"image":_t("error",a),_t("load",a);break;case"details":_t("toggle",a);break;case"embed":case"source":case"link":_t("error",a),_t("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(le in m)if(m.hasOwnProperty(le)&&(g=m[le],g!=null))switch(le){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:qt(a,l,le,g,m,null)}return;default:if(Cx(l)){for(he in m)m.hasOwnProperty(he)&&(g=m[he],g!==void 0&&uw(a,l,he,g,m,void 0));return}}for(D in m)m.hasOwnProperty(D)&&(g=m[D],g!=null&&qt(a,l,D,g,m,null))}function jq(a,l,m,g){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,_=null,j=null,D=null,H=null,le=null,he=null;for(me in m){var be=m[me];if(m.hasOwnProperty(me)&&be!=null)switch(me){case"checked":break;case"value":break;case"defaultValue":H=be;default:g.hasOwnProperty(me)||qt(a,l,me,null,g,be)}}for(var ce in g){var me=g[ce];if(be=m[ce],g.hasOwnProperty(ce)&&(me!=null||be!=null))switch(ce){case"type":_=me;break;case"name":w=me;break;case"checked":le=me;break;case"defaultChecked":he=me;break;case"value":j=me;break;case"defaultValue":D=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,l));break;default:me!==be&&qt(a,l,ce,me,g,be)}}Sx(a,j,D,H,le,he,_,w);return;case"select":me=j=D=ce=null;for(_ in m)if(H=m[_],m.hasOwnProperty(_)&&H!=null)switch(_){case"value":break;case"multiple":me=H;default:g.hasOwnProperty(_)||qt(a,l,_,null,g,H)}for(w in g)if(_=g[w],H=m[w],g.hasOwnProperty(w)&&(_!=null||H!=null))switch(w){case"value":ce=_;break;case"defaultValue":D=_;break;case"multiple":j=_;default:_!==H&&qt(a,l,w,_,g,H)}l=D,m=j,g=me,ce!=null?Uc(a,!!m,ce,!1):!!g!=!!m&&(l!=null?Uc(a,!!m,l,!0):Uc(a,!!m,m?[]:"",!1));return;case"textarea":me=ce=null;for(D in m)if(w=m[D],m.hasOwnProperty(D)&&w!=null&&!g.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:qt(a,l,D,null,g,w)}for(j in g)if(w=g[j],_=m[j],g.hasOwnProperty(j)&&(w!=null||_!=null))switch(j){case"value":ce=w;break;case"defaultValue":me=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:w!==_&&qt(a,l,j,w,g,_)}fj(a,ce,me);return;case"option":for(var ze in m)if(ce=m[ze],m.hasOwnProperty(ze)&&ce!=null&&!g.hasOwnProperty(ze))switch(ze){case"selected":a.selected=!1;break;default:qt(a,l,ze,null,g,ce)}for(H in g)if(ce=g[H],me=m[H],g.hasOwnProperty(H)&&ce!==me&&(ce!=null||me!=null))switch(H){case"selected":a.selected=ce&&typeof ce!="function"&&typeof ce!="symbol";break;default:qt(a,l,H,ce,g,me)}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 Xe in m)ce=m[Xe],m.hasOwnProperty(Xe)&&ce!=null&&!g.hasOwnProperty(Xe)&&qt(a,l,Xe,null,g,ce);for(le in g)if(ce=g[le],me=m[le],g.hasOwnProperty(le)&&ce!==me&&(ce!=null||me!=null))switch(le){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,l));break;default:qt(a,l,le,ce,g,me)}return;default:if(Cx(l)){for(var Gt in m)ce=m[Gt],m.hasOwnProperty(Gt)&&ce!==void 0&&!g.hasOwnProperty(Gt)&&uw(a,l,Gt,void 0,g,ce);for(he in g)ce=g[he],me=m[he],!g.hasOwnProperty(he)||ce===me||ce===void 0&&me===void 0||uw(a,l,he,ce,g,me);return}}for(var re in m)ce=m[re],m.hasOwnProperty(re)&&ce!=null&&!g.hasOwnProperty(re)&&qt(a,l,re,null,g,ce);for(be in g)ce=g[be],me=m[be],!g.hasOwnProperty(be)||ce===me||ce==null&&me==null||qt(a,l,be,ce,g,me)}function gN(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Iq(){if(typeof performance.getEntriesByType=="function"){for(var a=0,l=0,m=performance.getEntriesByType("resource"),g=0;g<m.length;g++){var w=m[g],_=w.transferSize,j=w.initiatorType,D=w.duration;if(_&&D&&gN(j)){for(j=0,D=w.responseEnd,g+=1;g<m.length;g++){var H=m[g],le=H.startTime;if(le>D)break;var he=H.transferSize,be=H.initiatorType;he&&gN(be)&&(H=H.responseEnd,j+=he*(H<D?1:(D-le)/(H-le)))}if(--g,l+=8*(_+j)/(w.duration/1e3),a++,10<a)break}}if(0<a)return l/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var dw=null,fw=null;function eg(a){return a.nodeType===9?a:a.ownerDocument}function vN(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function yN(a,l){if(a===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&l==="foreignObject"?0:a}function mw(a,l){return a==="textarea"||a==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var pw=null;function Tq(){var a=window.event;return a&&a.type==="popstate"?a===pw?!1:(pw=a,!0):(pw=null,!1)}var bN=typeof setTimeout=="function"?setTimeout:void 0,Nq=typeof clearTimeout=="function"?clearTimeout:void 0,xN=typeof Promise=="function"?Promise:void 0,Aq=typeof queueMicrotask=="function"?queueMicrotask:typeof xN<"u"?function(a){return xN.resolve(null).then(a).catch(Oq)}:bN;function Oq(a){setTimeout(function(){throw a})}function ws(a){return a==="head"}function wN(a,l){var m=l,g=0;do{var w=m.nextSibling;if(a.removeChild(m),w&&w.nodeType===8)if(m=w.data,m==="/$"||m==="/&"){if(g===0){a.removeChild(w),yu(l);return}g--}else if(m==="$"||m==="$?"||m==="$~"||m==="$!"||m==="&")g++;else if(m==="html")Mf(a.ownerDocument.documentElement);else if(m==="head"){m=a.ownerDocument.head,Mf(m);for(var _=m.firstChild;_;){var j=_.nextSibling,D=_.nodeName;_[ef]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&_.rel.toLowerCase()==="stylesheet"||m.removeChild(_),_=j}}else m==="body"&&Mf(a.ownerDocument.body);m=w}while(m);yu(l)}function SN(a,l){var m=a;a=0;do{var g=m.nextSibling;if(m.nodeType===1?l?(m._stashedDisplay=m.style.display,m.style.display="none"):(m.style.display=m._stashedDisplay||"",m.getAttribute("style")===""&&m.removeAttribute("style")):m.nodeType===3&&(l?(m._stashedText=m.nodeValue,m.nodeValue=""):m.nodeValue=m._stashedText||""),g&&g.nodeType===8)if(m=g.data,m==="/$"){if(a===0)break;a--}else m!=="$"&&m!=="$?"&&m!=="$~"&&m!=="$!"||a++;m=g}while(m)}function hw(a){var l=a.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var m=l;switch(l=l.nextSibling,m.nodeName){case"HTML":case"HEAD":case"BODY":hw(m),xx(m);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(m.rel.toLowerCase()==="stylesheet")continue}a.removeChild(m)}}function $q(a,l,m,g){for(;a.nodeType===1;){var w=m;if(a.nodeName.toLowerCase()!==l.toLowerCase()){if(!g&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(g){if(!a[ef])switch(l){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(_=a.getAttribute("rel"),_==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(_!==w.rel||a.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||a.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||a.getAttribute("title")!==(w.title==null?null:w.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(_=a.getAttribute("src"),(_!==(w.src==null?null:w.src)||a.getAttribute("type")!==(w.type==null?null:w.type)||a.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&_&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(l==="input"&&a.type==="hidden"){var _=w.name==null?null:""+w.name;if(w.type==="hidden"&&a.getAttribute("name")===_)return a}else return a;if(a=Ki(a.nextSibling),a===null)break}return null}function Dq(a,l,m){if(l==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!m||(a=Ki(a.nextSibling),a===null))return null;return a}function _N(a,l){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!l||(a=Ki(a.nextSibling),a===null))return null;return a}function gw(a){return a.data==="$?"||a.data==="$~"}function vw(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function Pq(a,l){var m=a.ownerDocument;if(a.data==="$~")a._reactRetry=l;else if(a.data!=="$?"||m.readyState!=="loading")l();else{var g=function(){l(),m.removeEventListener("DOMContentLoaded",g)};m.addEventListener("DOMContentLoaded",g),a._reactRetry=g}}function Ki(a){for(;a!=null;a=a.nextSibling){var l=a.nodeType;if(l===1||l===3)break;if(l===8){if(l=a.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return a}var yw=null;function CN(a){a=a.nextSibling;for(var l=0;a;){if(a.nodeType===8){var m=a.data;if(m==="/$"||m==="/&"){if(l===0)return Ki(a.nextSibling);l--}else m!=="$"&&m!=="$!"&&m!=="$?"&&m!=="$~"&&m!=="&"||l++}a=a.nextSibling}return null}function EN(a){a=a.previousSibling;for(var l=0;a;){if(a.nodeType===8){var m=a.data;if(m==="$"||m==="$!"||m==="$?"||m==="$~"||m==="&"){if(l===0)return a;l--}else m!=="/$"&&m!=="/&"||l++}a=a.previousSibling}return null}function kN(a,l,m){switch(l=eg(m),a){case"html":if(a=l.documentElement,!a)throw Error(r(452));return a;case"head":if(a=l.head,!a)throw Error(r(453));return a;case"body":if(a=l.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Mf(a){for(var l=a.attributes;l.length;)a.removeAttributeNode(l[0]);xx(a)}var Zi=new Map,RN=new Set;function tg(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ia=G.d;G.d={f:Mq,r:zq,D:Lq,C:Uq,L:Fq,m:Vq,X:Hq,S:Bq,M:qq};function Mq(){var a=Ia.f(),l=Gh();return a||l}function zq(a){var l=Mc(a);l!==null&&l.tag===5&&l.type==="form"?HI(l):Ia.r(a)}var hu=typeof document>"u"?null:document;function jN(a,l,m){var g=hu;if(g&&typeof l=="string"&&l){var w=Ui(l);w='link[rel="'+a+'"][href="'+w+'"]',typeof m=="string"&&(w+='[crossorigin="'+m+'"]'),RN.has(w)||(RN.add(w),a={rel:a,crossOrigin:m,href:l},g.querySelector(w)===null&&(l=g.createElement("link"),gr(l,"link",a),rr(l),g.head.appendChild(l)))}}function Lq(a){Ia.D(a),jN("dns-prefetch",a,null)}function Uq(a,l){Ia.C(a,l),jN("preconnect",a,l)}function Fq(a,l,m){Ia.L(a,l,m);var g=hu;if(g&&a&&l){var w='link[rel="preload"][as="'+Ui(l)+'"]';l==="image"&&m&&m.imageSrcSet?(w+='[imagesrcset="'+Ui(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(w+='[imagesizes="'+Ui(m.imageSizes)+'"]')):w+='[href="'+Ui(a)+'"]';var _=w;switch(l){case"style":_=gu(a);break;case"script":_=vu(a)}Zi.has(_)||(a=h({rel:"preload",href:l==="image"&&m&&m.imageSrcSet?void 0:a,as:l},m),Zi.set(_,a),g.querySelector(w)!==null||l==="style"&&g.querySelector(zf(_))||l==="script"&&g.querySelector(Lf(_))||(l=g.createElement("link"),gr(l,"link",a),rr(l),g.head.appendChild(l)))}}function Vq(a,l){Ia.m(a,l);var m=hu;if(m&&a){var g=l&&typeof l.as=="string"?l.as:"script",w='link[rel="modulepreload"][as="'+Ui(g)+'"][href="'+Ui(a)+'"]',_=w;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=vu(a)}if(!Zi.has(_)&&(a=h({rel:"modulepreload",href:a},l),Zi.set(_,a),m.querySelector(w)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(Lf(_)))return}g=m.createElement("link"),gr(g,"link",a),rr(g),m.head.appendChild(g)}}}function Bq(a,l,m){Ia.S(a,l,m);var g=hu;if(g&&a){var w=zc(g).hoistableStyles,_=gu(a);l=l||"default";var j=w.get(_);if(!j){var D={loading:0,preload:null};if(j=g.querySelector(zf(_)))D.loading=5;else{a=h({rel:"stylesheet",href:a,"data-precedence":l},m),(m=Zi.get(_))&&bw(a,m);var H=j=g.createElement("link");rr(H),gr(H,"link",a),H._p=new Promise(function(le,he){H.onload=le,H.onerror=he}),H.addEventListener("load",function(){D.loading|=1}),H.addEventListener("error",function(){D.loading|=2}),D.loading|=4,ng(j,l,g)}j={type:"stylesheet",instance:j,count:1,state:D},w.set(_,j)}}}function Hq(a,l){Ia.X(a,l);var m=hu;if(m&&a){var g=zc(m).hoistableScripts,w=vu(a),_=g.get(w);_||(_=m.querySelector(Lf(w)),_||(a=h({src:a,async:!0},l),(l=Zi.get(w))&&xw(a,l),_=m.createElement("script"),rr(_),gr(_,"link",a),m.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},g.set(w,_))}}function qq(a,l){Ia.M(a,l);var m=hu;if(m&&a){var g=zc(m).hoistableScripts,w=vu(a),_=g.get(w);_||(_=m.querySelector(Lf(w)),_||(a=h({src:a,async:!0,type:"module"},l),(l=Zi.get(w))&&xw(a,l),_=m.createElement("script"),rr(_),gr(_,"link",a),m.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},g.set(w,_))}}function IN(a,l,m,g){var w=(w=pe.current)?tg(w):null;if(!w)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(l=gu(m.href),m=zc(w).hoistableStyles,g=m.get(l),g||(g={type:"style",instance:null,count:0,state:null},m.set(l,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){a=gu(m.href);var _=zc(w).hoistableStyles,j=_.get(a);if(j||(w=w.ownerDocument||w,j={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(a,j),(_=w.querySelector(zf(a)))&&!_._p&&(j.instance=_,j.state.loading=5),Zi.has(a)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},Zi.set(a,m),_||Gq(w,a,m,j.state))),l&&g===null)throw Error(r(528,""));return j}if(l&&g!==null)throw Error(r(529,""));return null;case"script":return l=m.async,m=m.src,typeof m=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=vu(m),m=zc(w).hoistableScripts,g=m.get(l),g||(g={type:"script",instance:null,count:0,state:null},m.set(l,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function gu(a){return'href="'+Ui(a)+'"'}function zf(a){return'link[rel="stylesheet"]['+a+"]"}function TN(a){return h({},a,{"data-precedence":a.precedence,precedence:null})}function Gq(a,l,m,g){a.querySelector('link[rel="preload"][as="style"]['+l+"]")?g.loading=1:(l=a.createElement("link"),g.preload=l,l.addEventListener("load",function(){return g.loading|=1}),l.addEventListener("error",function(){return g.loading|=2}),gr(l,"link",m),rr(l),a.head.appendChild(l))}function vu(a){return'[src="'+Ui(a)+'"]'}function Lf(a){return"script[async]"+a}function NN(a,l,m){if(l.count++,l.instance===null)switch(l.type){case"style":var g=a.querySelector('style[data-href~="'+Ui(m.href)+'"]');if(g)return l.instance=g,rr(g),g;var w=h({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return g=(a.ownerDocument||a).createElement("style"),rr(g),gr(g,"style",w),ng(g,m.precedence,a),l.instance=g;case"stylesheet":w=gu(m.href);var _=a.querySelector(zf(w));if(_)return l.state.loading|=4,l.instance=_,rr(_),_;g=TN(m),(w=Zi.get(w))&&bw(g,w),_=(a.ownerDocument||a).createElement("link"),rr(_);var j=_;return j._p=new Promise(function(D,H){j.onload=D,j.onerror=H}),gr(_,"link",g),l.state.loading|=4,ng(_,m.precedence,a),l.instance=_;case"script":return _=vu(m.src),(w=a.querySelector(Lf(_)))?(l.instance=w,rr(w),w):(g=m,(w=Zi.get(_))&&(g=h({},m),xw(g,w)),a=a.ownerDocument||a,w=a.createElement("script"),rr(w),gr(w,"link",g),a.head.appendChild(w),l.instance=w);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(g=l.instance,l.state.loading|=4,ng(g,m.precedence,a));return l.instance}function ng(a,l,m){for(var g=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=g.length?g[g.length-1]:null,_=w,j=0;j<g.length;j++){var D=g[j];if(D.dataset.precedence===l)_=D;else if(_!==w)break}_?_.parentNode.insertBefore(a,_.nextSibling):(l=m.nodeType===9?m.head:m,l.insertBefore(a,l.firstChild))}function bw(a,l){a.crossOrigin==null&&(a.crossOrigin=l.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=l.referrerPolicy),a.title==null&&(a.title=l.title)}function xw(a,l){a.crossOrigin==null&&(a.crossOrigin=l.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=l.referrerPolicy),a.integrity==null&&(a.integrity=l.integrity)}var rg=null;function AN(a,l,m){if(rg===null){var g=new Map,w=rg=new Map;w.set(m,g)}else w=rg,g=w.get(m),g||(g=new Map,w.set(m,g));if(g.has(a))return g;for(g.set(a,null),m=m.getElementsByTagName(a),w=0;w<m.length;w++){var _=m[w];if(!(_[ef]||_[fr]||a==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var j=_.getAttribute(l)||"";j=a+j;var D=g.get(j);D?D.push(_):g.set(j,[_])}}return g}function ON(a,l,m){a=a.ownerDocument||a,a.head.insertBefore(m,l==="title"?a.querySelector("head > title"):null)}function Kq(a,l,m){if(m===1||l.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return a=l.disabled,typeof l.precedence=="string"&&a==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function $N(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function Zq(a,l,m,g){if(m.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var w=gu(g.href),_=l.querySelector(zf(w));if(_){l=_._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(a.count++,a=ig.bind(a),l.then(a,a)),m.state.loading|=4,m.instance=_,rr(_);return}_=l.ownerDocument||l,g=TN(g),(w=Zi.get(w))&&bw(g,w),_=_.createElement("link"),rr(_);var j=_;j._p=new Promise(function(D,H){j.onload=D,j.onerror=H}),gr(_,"link",g),m.instance=_}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(m,l),(l=m.state.preload)&&(m.state.loading&3)===0&&(a.count++,m=ig.bind(a),l.addEventListener("load",m),l.addEventListener("error",m))}}var ww=0;function Yq(a,l){return a.stylesheets&&a.count===0&&ag(a,a.stylesheets),0<a.count||0<a.imgCount?function(m){var g=setTimeout(function(){if(a.stylesheets&&ag(a,a.stylesheets),a.unsuspend){var _=a.unsuspend;a.unsuspend=null,_()}},6e4+l);0<a.imgBytes&&ww===0&&(ww=62500*Iq());var w=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&ag(a,a.stylesheets),a.unsuspend)){var _=a.unsuspend;a.unsuspend=null,_()}},(a.imgBytes>ww?50:800)+l);return a.unsuspend=m,function(){a.unsuspend=null,clearTimeout(g),clearTimeout(w)}}:null}function ig(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ag(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var og=null;function ag(a,l){a.stylesheets=null,a.unsuspend!==null&&(a.count++,og=new Map,l.forEach(Wq,a),og=null,ig.call(a))}function Wq(a,l){if(!(l.state.loading&4)){var m=og.get(a);if(m)var g=m.get(null);else{m=new Map,og.set(a,m);for(var w=a.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<w.length;_++){var j=w[_];(j.nodeName==="LINK"||j.getAttribute("media")!=="not all")&&(m.set(j.dataset.precedence,j),g=j)}g&&m.set(null,g)}w=l.instance,j=w.getAttribute("data-precedence"),_=m.get(j)||g,_===g&&m.set(null,w),m.set(j,w),this.count++,g=ig.bind(this),w.addEventListener("load",g),w.addEventListener("error",g),_?_.parentNode.insertBefore(w,_.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(w,a.firstChild)),l.state.loading|=4}}var Uf={$$typeof:R,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function Xq(a,l,m,g,w,_,j,D,H){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ns(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ns(0),this.hiddenUpdates=ns(null),this.identifierPrefix=g,this.onUncaughtError=w,this.onCaughtError=_,this.onRecoverableError=j,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function DN(a,l,m,g,w,_,j,D,H,le,he,be){return a=new Xq(a,l,m,j,H,le,he,be,D),l=1,_===!0&&(l|=24),_=gi(3,null,null,l),a.current=_,_.stateNode=a,l=e0(),l.refCount++,a.pooledCache=l,l.refCount++,_.memoizedState={element:g,isDehydrated:m,cache:l},i0(_),a}function PN(a){return a?(a=Zc,a):Zc}function MN(a,l,m,g,w,_){w=PN(w),g.context===null?g.context=w:g.pendingContext=w,g=us(l),g.payload={element:m},_=_===void 0?null:_,_!==null&&(g.callback=_),m=ds(a,g,l),m!==null&&(ri(m,a,l),yf(m,a,l))}function zN(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var m=a.retryLane;a.retryLane=m!==0&&m<l?m:l}}function Sw(a,l){zN(a,l),(a=a.alternate)&&zN(a,l)}function LN(a){if(a.tag===13||a.tag===31){var l=ml(a,67108864);l!==null&&ri(l,a,67108864),Sw(a,67108864)}}function UN(a){if(a.tag===13||a.tag===31){var l=wi();l=$c(l);var m=ml(a,l);m!==null&&ri(m,a,l),Sw(a,l)}}var sg=!0;function Qq(a,l,m,g){var w=P.T;P.T=null;var _=G.p;try{G.p=2,_w(a,l,m,g)}finally{G.p=_,P.T=w}}function Jq(a,l,m,g){var w=P.T;P.T=null;var _=G.p;try{G.p=8,_w(a,l,m,g)}finally{G.p=_,P.T=w}}function _w(a,l,m,g){if(sg){var w=Cw(g);if(w===null)cw(a,l,g,lg,m),VN(a,g);else if(tG(w,a,l,m,g))g.stopPropagation();else if(VN(a,g),l&4&&-1<eG.indexOf(a)){for(;w!==null;){var _=Mc(w);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var j=Lo(_.pendingLanes);if(j!==0){var D=_;for(D.pendingLanes|=2,D.entangledLanes|=2;j;){var H=1<<31-It(j);D.entanglements[1]|=H,j&=~H}Bo(_),(Dt&6)===0&&(Hh=ve()+500,$f(0))}}break;case 31:case 13:D=ml(_,2),D!==null&&ri(D,_,2),Gh(),Sw(_,2)}if(_=Cw(g),_===null&&cw(a,l,g,lg,m),_===w)break;w=_}w!==null&&g.stopPropagation()}else cw(a,l,g,null,m)}}function Cw(a){return a=kx(a),Ew(a)}var lg=null;function Ew(a){if(lg=null,a=Pc(a),a!==null){var l=o(a);if(l===null)a=null;else{var m=l.tag;if(m===13){if(a=s(l),a!==null)return a;a=null}else if(m===31){if(a=c(l),a!==null)return a;a=null}else if(m===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null)}}return lg=a,null}function FN(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Se()){case ne:return 2;case ye:return 8;case Ne:case Ke:return 32;case ot:return 268435456;default:return 32}default:return 32}}var kw=!1,Ss=null,_s=null,Cs=null,Ff=new Map,Vf=new Map,Es=[],eG="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 VN(a,l){switch(a){case"focusin":case"focusout":Ss=null;break;case"dragenter":case"dragleave":_s=null;break;case"mouseover":case"mouseout":Cs=null;break;case"pointerover":case"pointerout":Ff.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vf.delete(l.pointerId)}}function Bf(a,l,m,g,w,_){return a===null||a.nativeEvent!==_?(a={blockedOn:l,domEventName:m,eventSystemFlags:g,nativeEvent:_,targetContainers:[w]},l!==null&&(l=Mc(l),l!==null&&LN(l)),a):(a.eventSystemFlags|=g,l=a.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),a)}function tG(a,l,m,g,w){switch(l){case"focusin":return Ss=Bf(Ss,a,l,m,g,w),!0;case"dragenter":return _s=Bf(_s,a,l,m,g,w),!0;case"mouseover":return Cs=Bf(Cs,a,l,m,g,w),!0;case"pointerover":var _=w.pointerId;return Ff.set(_,Bf(Ff.get(_)||null,a,l,m,g,w)),!0;case"gotpointercapture":return _=w.pointerId,Vf.set(_,Bf(Vf.get(_)||null,a,l,m,g,w)),!0}return!1}function BN(a){var l=Pc(a.target);if(l!==null){var m=o(l);if(m!==null){if(l=m.tag,l===13){if(l=s(m),l!==null){a.blockedOn=l,rj(a.priority,function(){UN(m)});return}}else if(l===31){if(l=c(m),l!==null){a.blockedOn=l,rj(a.priority,function(){UN(m)});return}}else if(l===3&&m.stateNode.current.memoizedState.isDehydrated){a.blockedOn=m.tag===3?m.stateNode.containerInfo:null;return}}}a.blockedOn=null}function cg(a){if(a.blockedOn!==null)return!1;for(var l=a.targetContainers;0<l.length;){var m=Cw(a.nativeEvent);if(m===null){m=a.nativeEvent;var g=new m.constructor(m.type,m);Ex=g,m.target.dispatchEvent(g),Ex=null}else return l=Mc(m),l!==null&&LN(l),a.blockedOn=m,!1;l.shift()}return!0}function HN(a,l,m){cg(a)&&m.delete(l)}function nG(){kw=!1,Ss!==null&&cg(Ss)&&(Ss=null),_s!==null&&cg(_s)&&(_s=null),Cs!==null&&cg(Cs)&&(Cs=null),Ff.forEach(HN),Vf.forEach(HN)}function ug(a,l){a.blockedOn===l&&(a.blockedOn=null,kw||(kw=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,nG)))}var dg=null;function qN(a){dg!==a&&(dg=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){dg===a&&(dg=null);for(var l=0;l<a.length;l+=3){var m=a[l],g=a[l+1],w=a[l+2];if(typeof g!="function"){if(Ew(g||m)===null)continue;break}var _=Mc(m);_!==null&&(a.splice(l,3),l-=3,C0(_,{pending:!0,data:w,method:m.method,action:g},g,w))}}))}function yu(a){function l(H){return ug(H,a)}Ss!==null&&ug(Ss,a),_s!==null&&ug(_s,a),Cs!==null&&ug(Cs,a),Ff.forEach(l),Vf.forEach(l);for(var m=0;m<Es.length;m++){var g=Es[m];g.blockedOn===a&&(g.blockedOn=null)}for(;0<Es.length&&(m=Es[0],m.blockedOn===null);)BN(m),m.blockedOn===null&&Es.shift();if(m=(a.ownerDocument||a).$$reactFormReplay,m!=null)for(g=0;g<m.length;g+=3){var w=m[g],_=m[g+1],j=w[Xr]||null;if(typeof _=="function")j||qN(m);else if(j){var D=null;if(_&&_.hasAttribute("formAction")){if(w=_,j=_[Xr]||null)D=j.formAction;else if(Ew(w)!==null)continue}else D=j.action;typeof D=="function"?m[g+1]=D:(m.splice(g,3),g-=3),qN(m)}}}function GN(){function a(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(j){return w=j})},focusReset:"manual",scroll:"manual"})}function l(){w!==null&&(w(),w=null),g||setTimeout(m,20)}function m(){if(!g&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var g=!1,w=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(m,100),function(){g=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),w!==null&&(w(),w=null)}}}function Rw(a){this._internalRoot=a}fg.prototype.render=Rw.prototype.render=function(a){var l=this._internalRoot;if(l===null)throw Error(r(409));var m=l.current,g=wi();MN(m,g,a,l,null,null)},fg.prototype.unmount=Rw.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var l=a.containerInfo;MN(a.current,2,null,a,null,null),Gh(),l[Dc]=null}};function fg(a){this._internalRoot=a}fg.prototype.unstable_scheduleHydration=function(a){if(a){var l=yx();a={blockedOn:null,target:a,priority:l};for(var m=0;m<Es.length&&l!==0&&l<Es[m].priority;m++);Es.splice(m,0,a),m===0&&BN(a)}};var KN=t.version;if(KN!=="19.2.0")throw Error(r(527,KN,"19.2.0"));G.findDOMNode=function(a){var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=f(l),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var rG={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mg.isDisabled&&mg.supportsFiber)try{cn=mg.inject(rG),Bt=mg}catch{}}return gm.createRoot=function(a,l){if(!i(a))throw Error(r(299));var m=!1,g="",w=eT,_=tT,j=nT;return l!=null&&(l.unstable_strictMode===!0&&(m=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(w=l.onUncaughtError),l.onCaughtError!==void 0&&(_=l.onCaughtError),l.onRecoverableError!==void 0&&(j=l.onRecoverableError)),l=DN(a,1,!1,null,null,m,g,null,w,_,j,GN),a[Dc]=l.current,lw(a),new Rw(l)},gm.hydrateRoot=function(a,l,m){if(!i(a))throw Error(r(299));var g=!1,w="",_=eT,j=tT,D=nT,H=null;return m!=null&&(m.unstable_strictMode===!0&&(g=!0),m.identifierPrefix!==void 0&&(w=m.identifierPrefix),m.onUncaughtError!==void 0&&(_=m.onUncaughtError),m.onCaughtError!==void 0&&(j=m.onCaughtError),m.onRecoverableError!==void 0&&(D=m.onRecoverableError),m.formState!==void 0&&(H=m.formState)),l=DN(a,1,!0,l,m??null,g,w,H,_,j,D,GN),l.context=PN(null),m=l.current,g=wi(),g=$c(g),w=us(g),w.callback=null,ds(m,w,g),m=g,l.current.lanes=m,gn(l,m),Bo(l),a[Dc]=l.current,lw(a),new fg(l)},gm.version="19.2.0",gm}var IP;function fTe(){if(IP)return d_.exports;IP=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),d_.exports=dTe(),d_.exports}var mTe=fTe();mTe.createRoot(document.getElementById("root"),{onUncaughtError:(e,t)=>{gv(),console.error("Uncaught error:",e,t)},onCaughtError:(e,t)=>{gv(),console.error("Caught error:",e,t)},onRecoverableError:(e,t)=>{gv(),console.warn("Recoverable error:",e,t)}}).render(u.jsx(x.StrictMode,{children:u.jsx(lTe,{})}));export{wt as $,Fk as A,Ose as B,vS as C,Hle as D,st as E,qk as F,h6 as G,GTe as H,HTe as I,qTe as J,KTe as K,jae as L,no as M,Rt as N,_r as O,Oce as P,Rr as Q,gt as R,Cce as S,Eb as T,Pp as U,C6 as V,vd as W,Vd as X,vt as Y,Vt as Z,En as _,FTe as a,Rd as a$,mn as a0,bn as a1,mc as a2,pn as a3,wn as a4,x as a5,lr as a6,Bn as a7,Ee as a8,vJ as a9,u1 as aA,rd as aB,qB as aC,pp as aD,La as aE,sa as aF,sp as aG,pTe as aH,fp as aI,X as aJ,YTe as aK,Ko as aL,rn as aM,g1 as aN,tt as aO,Ut as aP,QRe as aQ,QR as aR,go as aS,SP as aT,Ov as aU,Mo as aV,DTe as aW,Zl as aX,Aa as aY,Le as aZ,LM as a_,u as aa,hn as ab,Pe as ac,Oe as ad,$e as ae,Me as af,Ge as ag,De as ah,Ce as ai,aa as aj,m6 as ak,Bie as al,Cc as am,$t as an,Jn as ao,ho as ap,oc as aq,ft as ar,UF as as,yb as at,$Te as au,xn as av,kr as aw,np as ax,U1 as ay,Vl as az,wb as b,mM as b0,_be as b1,Sbe as b2,Xy as b3,so as b4,co as b5,lo as b6,uo as b7,Do as b8,vn as b9,fo as ba,Cr as bb,ace as c,PTe as d,VTe as e,zce as f,yce as g,UTe as h,vce as i,zTe as j,LTe as k,kn as l,i3 as m,xb as n,Zs as o,Hk as p,yn as q,Mce as r,l3 as s,sr as t,BTe as u,dde as v,fde as w,Ft as x,Jo as y,MTe as z};
|