web_plsql 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/frontend/assets/main-Co9Kke3j.js +147 -0
- package/dist/frontend/assets/main-Co9Kke3j.js.br +0 -0
- package/dist/frontend/assets/main-Co9Kke3j.js.gz +0 -0
- package/dist/frontend/index.html +5 -12
- package/dist/frontend/index.html.br +0 -0
- package/dist/frontend/index.html.gz +0 -0
- package/dist/index.d.mts +21 -7
- package/dist/index.mjs +240 -78
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -8
- package/dist/frontend/assets/main-DurwHchn.js +0 -147
- package/dist/frontend/assets/main-DurwHchn.js.br +0 -0
- package/dist/frontend/assets/main-DurwHchn.js.gz +0 -0
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var n=Object.freeze({status:`aborted`});function r(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var i=Symbol(`zod_brand`),a=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},o=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},s={};function c(e){return e&&Object.assign(s,e),s}var l=t({BIGINT_FORMAT_RANGES:()=>be,Class:()=>He,NUMBER_FORMAT_RANGES:()=>ye,aborted:()=>Oe,allowsEval:()=>ce,assert:()=>m,assertEqual:()=>u,assertIs:()=>f,assertNever:()=>p,assertNotEqual:()=>d,assignProp:()=>T,base64ToUint8Array:()=>Ie,base64urlToUint8Array:()=>Re,cached:()=>v,captureStackTrace:()=>oe,cleanEnum:()=>Fe,cleanRegex:()=>b,clone:()=>ge,cloneDef:()=>ee,createTransparentProxy:()=>_e,defineLazy:()=>C,esc:()=>ie,escapeRegex:()=>he,extend:()=>Ce,finalizeIssue:()=>je,floatSafeRemainder:()=>x,getElementAtPath:()=>te,getEnumValues:()=>h,getLengthableOrigin:()=>Ne,getParsedType:()=>fe,getSizableOrigin:()=>Me,hexToUint8Array:()=>Be,isObject:()=>se,isPlainObject:()=>le,issue:()=>Pe,joinValues:()=>g,jsonStringifyReplacer:()=>_,merge:()=>Te,mergeDefs:()=>E,normalizeParams:()=>D,nullish:()=>y,numKeys:()=>de,objectClone:()=>w,omit:()=>Se,optionalKeys:()=>ve,parsedType:()=>k,partial:()=>Ee,pick:()=>xe,prefixIssues:()=>ke,primitiveTypes:()=>me,promiseAllObject:()=>ne,propertyKeyTypes:()=>pe,randomString:()=>re,required:()=>De,safeExtend:()=>we,shallowClone:()=>ue,slugify:()=>ae,stringifyPrimitive:()=>O,uint8ArrayToBase64:()=>Le,uint8ArrayToBase64url:()=>ze,uint8ArrayToHex:()=>Ve,unwrapMessage:()=>Ae});function u(e){return e}function d(e){return e}function f(e){}function p(e){throw Error(`Unexpected value in exhaustive check`)}function m(e){}function h(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function g(e,t=`|`){return e.map(e=>O(e)).join(t)}function _(e,t){return typeof t==`bigint`?t.toString():t}function v(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function y(e){return e==null}function b(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function x(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var S=Symbol(`evaluating`);function C(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==S)return r===void 0&&(r=S,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function w(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function T(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function E(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function ee(e){return E(e._zod.def)}function te(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function ne(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function re(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function ie(e){return JSON.stringify(e)}function ae(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var oe=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function se(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ce=v(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function le(e){if(se(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(se(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function ue(e){return le(e)?{...e}:Array.isArray(e)?[...e]:e}function de(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var fe=e=>{let 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 Error(`Unknown data type: ${t}`)}},pe=new Set([`string`,`number`,`symbol`]),me=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function he(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ge(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function D(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw 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 _e(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function O(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ve(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ye={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},be={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function xe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return ge(e,E(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return T(this,`shape`,e),e},checks:[]}))}function Se(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return ge(e,E(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return T(this,`shape`,r),r},checks:[]}))}function Ce(e,t){if(!le(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ge(e,E(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return T(this,`shape`,n),n}}))}function we(e,t){if(!le(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return ge(e,E(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return T(this,`shape`,n),n}}))}function Te(e,t){return ge(e,E(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return T(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Ee(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return ge(t,E(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return T(this,`shape`,i),i},checks:[]}))}function De(e,t,n){return ge(t,E(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return T(this,`shape`,i),i}}))}function Oe(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 ke(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ae(e){return typeof e==`string`?e:e?.message}function je(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Ae(e.inst?._zod.def?.error?.(e))??Ae(t?.error?.(e))??Ae(n.customError?.(e))??Ae(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Me(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function Ne(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function k(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Pe(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Fe(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Ie(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Le(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Re(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return Ie(t+`=`.repeat((4-t.length%4)%4))}function ze(e){return Le(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function Be(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function Ve(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var He=class{constructor(...e){}},Ue=(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,_,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},We=r(`$ZodError`,Ue),Ge=r(`$ZodError`,Ue,{Parent:Error});function Ke(e,t=e=>e.message){let n={},r=[];for(let 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 qe(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}function Je(e,t=e=>e.message){let n={errors:[]},r=(e,i=[])=>{var a,o;for(let s of e.issues)if(s.code===`invalid_union`&&s.errors.length)s.errors.map(e=>r({issues:e},s.path));else if(s.code===`invalid_key`)r({issues:s.issues},s.path);else if(s.code===`invalid_element`)r({issues:s.issues},s.path);else{let e=[...i,...s.path];if(e.length===0){n.errors.push(t(s));continue}let r=n,c=0;for(;c<e.length;){let n=e[c],i=c===e.length-1;typeof n==`string`?(r.properties??={},(a=r.properties)[n]??(a[n]={errors:[]}),r=r.properties[n]):(r.items??=[],(o=r.items)[n]??(o[n]={errors:[]}),r=r.items[n]),i&&r.errors.push(t(s)),c++}}};return r(e),n}function Ye(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Xe(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${Ye(e.path)}`);return t.join(`
|
|
2
|
-
`)}var Ze=e=>(t,n,r,i)=>{let o=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new a;if(s.issues.length){let t=new(i?.Err??e)(s.issues.map(e=>je(e,o,c())));throw oe(t,i?.callee),t}return s.value},Qe=Ze(Ge),$e=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>je(e,a,c())));throw oe(t,i?.callee),t}return o.value},et=$e(Ge),tt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new a;return o.issues.length?{success:!1,error:new(e??We)(o.issues.map(e=>je(e,i,c())))}:{success:!0,data:o.value}},nt=tt(Ge),rt=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>je(e,i,c())))}:{success:!0,data:a.value}},it=rt(Ge),at=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ze(e)(t,n,i)},ot=at(Ge),st=e=>(t,n,r)=>Ze(e)(t,n,r),ct=st(Ge),lt=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return $e(e)(t,n,i)},ut=lt(Ge),dt=e=>async(t,n,r)=>$e(e)(t,n,r),ft=dt(Ge),pt=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return tt(e)(t,n,i)},mt=pt(Ge),ht=e=>(t,n,r)=>tt(e)(t,n,r),gt=ht(Ge),_t=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return rt(e)(t,n,i)},vt=_t(Ge),yt=e=>async(t,n,r)=>rt(e)(t,n,r),bt=yt(Ge),xt=t({base64:()=>Jt,base64url:()=>Yt,bigint:()=>on,boolean:()=>ln,browserEmail:()=>Bt,cidrv4:()=>Kt,cidrv6:()=>qt,cuid:()=>St,cuid2:()=>Ct,date:()=>en,datetime:()=>rn,domain:()=>Zt,duration:()=>Ot,e164:()=>Qt,email:()=>Ft,emoji:()=>Ht,extendedDuration:()=>kt,guid:()=>At,hex:()=>mn,hostname:()=>Xt,html5Email:()=>It,idnEmail:()=>zt,integer:()=>sn,ipv4:()=>Ut,ipv6:()=>Wt,ksuid:()=>Et,lowercase:()=>fn,mac:()=>Gt,md5_base64:()=>vn,md5_base64url:()=>yn,md5_hex:()=>_n,nanoid:()=>Dt,null:()=>un,number:()=>cn,rfc5322Email:()=>Lt,sha1_base64:()=>xn,sha1_base64url:()=>Sn,sha1_hex:()=>bn,sha256_base64:()=>wn,sha256_base64url:()=>Tn,sha256_hex:()=>Cn,sha384_base64:()=>Dn,sha384_base64url:()=>On,sha384_hex:()=>En,sha512_base64:()=>An,sha512_base64url:()=>jn,sha512_hex:()=>kn,string:()=>an,time:()=>nn,ulid:()=>wt,undefined:()=>dn,unicodeEmail:()=>Rt,uppercase:()=>pn,uuid:()=>jt,uuid4:()=>Mt,uuid6:()=>Nt,uuid7:()=>Pt,xid:()=>Tt}),St=/^[cC][^\s-]{8,}$/,Ct=/^[0-9a-z]+$/,wt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Tt=/^[0-9a-vA-V]{20}$/,Et=/^[A-Za-z0-9]{27}$/,Dt=/^[a-zA-Z0-9_-]{21}$/,Ot=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kt=/^[-+]?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)?)??$/,At=/^([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})$/,jt=e=>e?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)$/,Mt=jt(4),Nt=jt(6),Pt=jt(7),Ft=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,It=/^[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])?)*$/,Lt=/^(([^<>()\[\]\\.,;:\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,}))$/,Rt=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,zt=Rt,Bt=/^[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])?)*$/,Vt=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Ht(){return new RegExp(Vt,`u`)}var Ut=/^(?:(?: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])$/,Wt=/^(([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}|:))$/,Gt=e=>{let t=he(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Kt=/^((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])$/,qt=/^(([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])$/,Jt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Yt=/^[A-Za-z0-9_-]*$/,Xt=/^(?=.{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])?)*\.?$/,Zt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Qt=/^\+[1-9]\d{6,14}$/,$t=`(?:(?:\\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])))`,en=RegExp(`^${$t}$`);function tn(e){let 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 nn(e){return RegExp(`^${tn(e)}$`)}function rn(e){let t=tn({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${$t}T(?:${r})$`)}var an=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},on=/^-?\d+n?$/,sn=/^-?\d+$/,cn=/^-?\d+(?:\.\d+)?$/,ln=/^(?:true|false)$/i,un=/^null$/i,dn=/^undefined$/i,fn=/^[^A-Z]*$/,pn=/^[^a-z]*$/,mn=/^[0-9a-fA-F]*$/;function hn(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function gn(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var _n=/^[0-9a-fA-F]{32}$/,vn=hn(22,`==`),yn=gn(22),bn=/^[0-9a-fA-F]{40}$/,xn=hn(27,`=`),Sn=gn(27),Cn=/^[0-9a-fA-F]{64}$/,wn=hn(43,`=`),Tn=gn(43),En=/^[0-9a-fA-F]{96}$/,Dn=hn(64,``),On=gn(64),kn=/^[0-9a-fA-F]{128}$/,An=hn(86,`==`),jn=gn(86),A=r(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Mn={number:`number`,bigint:`bigint`,object:`date`},Nn=r(`$ZodCheckLessThan`,(e,t)=>{A.init(e,t);let n=Mn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.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:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Pn=r(`$ZodCheckGreaterThan`,(e,t)=>{A.init(e,t);let n=Mn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.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:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fn=r(`$ZodCheckMultipleOf`,(e,t)=>{A.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):x(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})}}),In=r(`$ZodCheckNumberFormat`,(e,t)=>{A.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ye[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=sn)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Ln=r(`$ZodCheckBigIntFormat`,(e,t)=>{A.init(e,t);let[n,r]=be[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Rn=r(`$ZodCheckMaxSize`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!y(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Me(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zn=r(`$ZodCheckMinSize`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!y(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Me(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Bn=r(`$ZodCheckSizeEquals`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!y(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Me(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Vn=r(`$ZodCheckMaxLength`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!y(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Ne(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Hn=r(`$ZodCheckMinLength`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!y(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Ne(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Un=r(`$ZodCheckLengthEquals`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!y(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Ne(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Wn=r(`$ZodCheckStringFormat`,(e,t)=>{var n,r;A.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Gn=r(`$ZodCheckRegex`,(e,t)=>{Wn.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})}}),Kn=r(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=fn,Wn.init(e,t)}),qn=r(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=pn,Wn.init(e,t)}),Jn=r(`$ZodCheckIncludes`,(e,t)=>{A.init(e,t);let n=he(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Yn=r(`$ZodCheckStartsWith`,(e,t)=>{A.init(e,t);let n=RegExp(`^${he(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Xn=r(`$ZodCheckEndsWith`,(e,t)=>{A.init(e,t);let n=RegExp(`.*${he(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Zn(e,t,n){e.issues.length&&t.issues.push(...ke(n,e.issues))}var Qn=r(`$ZodCheckProperty`,(e,t)=>{A.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Zn(n,e,t.property));Zn(n,e,t.property)}}),$n=r(`$ZodCheckMimeType`,(e,t)=>{A.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._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})}}),er=r(`$ZodCheckOverwrite`,(e,t)=>{A.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),tr=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
3
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
4
|
-
`))}},nr={major:4,minor:3,patch:6},j=r(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=nr;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Oe(e),i;for(let o of t){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,s=o._zod.check(e);if(s instanceof Promise&&n?.async===!1)throw new a;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(r||=Oe(e,t))});else{if(e.issues.length===t)continue;r||=Oe(e,t)}}return i?i.then(()=>e):e},n=(n,i,o)=>{if(Oe(n))return n.aborted=!0,n;let s=t(i,r,o);if(s instanceof Promise){if(o.async===!1)throw new a;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(i,o)=>{if(o.skipChecks)return e._zod.parse(i,o);if(o.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,o)):n(t,i,o)}let s=e._zod.parse(i,o);if(s instanceof Promise){if(o.async===!1)throw new a;return s.then(e=>t(e,r,o))}return t(s,r,o)}}C(e,`~standard`,()=>({validate:t=>{try{let n=nt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return it(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),rr=r(`$ZodString`,(e,t)=>{j.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??an(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}}),M=r(`$ZodStringFormat`,(e,t)=>{Wn.init(e,t),rr.init(e,t)}),ir=r(`$ZodGUID`,(e,t)=>{t.pattern??=At,M.init(e,t)}),ar=r(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=jt(e)}else t.pattern??=jt();M.init(e,t)}),or=r(`$ZodEmail`,(e,t)=>{t.pattern??=Ft,M.init(e,t)}),sr=r(`$ZodURL`,(e,t)=>{M.init(e,t),e._zod.check=n=>{try{let 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:t.hostname.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})}}}),cr=r(`$ZodEmoji`,(e,t)=>{t.pattern??=Ht(),M.init(e,t)}),lr=r(`$ZodNanoID`,(e,t)=>{t.pattern??=Dt,M.init(e,t)}),ur=r(`$ZodCUID`,(e,t)=>{t.pattern??=St,M.init(e,t)}),dr=r(`$ZodCUID2`,(e,t)=>{t.pattern??=Ct,M.init(e,t)}),fr=r(`$ZodULID`,(e,t)=>{t.pattern??=wt,M.init(e,t)}),pr=r(`$ZodXID`,(e,t)=>{t.pattern??=Tt,M.init(e,t)}),mr=r(`$ZodKSUID`,(e,t)=>{t.pattern??=Et,M.init(e,t)}),hr=r(`$ZodISODateTime`,(e,t)=>{t.pattern??=rn(t),M.init(e,t)}),gr=r(`$ZodISODate`,(e,t)=>{t.pattern??=en,M.init(e,t)}),_r=r(`$ZodISOTime`,(e,t)=>{t.pattern??=nn(t),M.init(e,t)}),vr=r(`$ZodISODuration`,(e,t)=>{t.pattern??=Ot,M.init(e,t)}),yr=r(`$ZodIPv4`,(e,t)=>{t.pattern??=Ut,M.init(e,t),e._zod.bag.format=`ipv4`}),br=r(`$ZodIPv6`,(e,t)=>{t.pattern??=Wt,M.init(e,t),e._zod.bag.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})}}}),xr=r(`$ZodMAC`,(e,t)=>{t.pattern??=Gt(t.delimiter),M.init(e,t),e._zod.bag.format=`mac`}),Sr=r(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Kt,M.init(e,t)}),Cr=r(`$ZodCIDRv6`,(e,t)=>{t.pattern??=qt,M.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function wr(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Tr=r(`$ZodBase64`,(e,t)=>{t.pattern??=Jt,M.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{wr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Er(e){if(!Yt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return wr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Dr=r(`$ZodBase64URL`,(e,t)=>{t.pattern??=Yt,M.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Er(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Or=r(`$ZodE164`,(e,t)=>{t.pattern??=Qt,M.init(e,t)});function kr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Ar=r(`$ZodJWT`,(e,t)=>{M.init(e,t),e._zod.check=n=>{kr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),jr=r(`$ZodCustomStringFormat`,(e,t)=>{M.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})}}),Mr=r(`$ZodNumber`,(e,t)=>{j.init(e,t),e._zod.pattern=e._zod.bag.pattern??cn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=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,...a?{received:a}:{}}),n}}),Nr=r(`$ZodNumberFormat`,(e,t)=>{In.init(e,t),Mr.init(e,t)}),Pr=r(`$ZodBoolean`,(e,t)=>{j.init(e,t),e._zod.pattern=ln,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Fr=r(`$ZodBigInt`,(e,t)=>{j.init(e,t),e._zod.pattern=on,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}}),Ir=r(`$ZodBigIntFormat`,(e,t)=>{Ln.init(e,t),Fr.init(e,t)}),Lr=r(`$ZodSymbol`,(e,t)=>{j.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),Rr=r(`$ZodUndefined`,(e,t)=>{j.init(e,t),e._zod.pattern=dn,e._zod.values=new Set([void 0]),e._zod.optin=`optional`,e._zod.optout=`optional`,e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),zr=r(`$ZodNull`,(e,t)=>{j.init(e,t),e._zod.pattern=un,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Br=r(`$ZodAny`,(e,t)=>{j.init(e,t),e._zod.parse=e=>e}),Vr=r(`$ZodUnknown`,(e,t)=>{j.init(e,t),e._zod.parse=e=>e}),Hr=r(`$ZodNever`,(e,t)=>{j.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),Ur=r(`$ZodVoid`,(e,t)=>{j.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),Wr=r(`$ZodDate`,(e,t)=>{j.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}});function Gr(e,t,n){e.issues.length&&t.issues.push(...ke(n,e.issues)),t.value[n]=e.value}var Kr=r(`$ZodArray`,(e,t)=>{j.init(e,t),e._zod.parse=(n,r)=>{let 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);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Gr(t,n,e))):Gr(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function qr(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...ke(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Jr(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=ve(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Yr(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>qr(e,n,i,t,u))):qr(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Xr=r(`$ZodObject`,(e,t)=>{if(j.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=v(()=>Jr(t));C(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=se,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>qr(n,t,e,s,r))):qr(i,t,e,s,r)}return i?Yr(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Zr=r(`$ZodObjectJIT`,(e,t)=>{Xr.init(e,t);let n=e._zod.parse,r=v(()=>Jr(t)),i=e=>{let t=new tr([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=ie(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=ie(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
5
|
-
if (${n}.issues.length) {
|
|
6
|
-
if (${o} in input) {
|
|
7
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
8
|
-
...iss,
|
|
9
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
10
|
-
})));
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if (${n}.value === undefined) {
|
|
15
|
-
if (${o} in input) {
|
|
16
|
-
newResult[${o}] = undefined;
|
|
17
|
-
}
|
|
18
|
-
} else {
|
|
19
|
-
newResult[${o}] = ${n}.value;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
`):t.write(`
|
|
23
|
-
if (${n}.issues.length) {
|
|
24
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
25
|
-
...iss,
|
|
26
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
27
|
-
})));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (${n}.value === undefined) {
|
|
31
|
-
if (${o} in input) {
|
|
32
|
-
newResult[${o}] = undefined;
|
|
33
|
-
}
|
|
34
|
-
} else {
|
|
35
|
-
newResult[${o}] = ${n}.value;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=se,c=!s.jitless,l=c&&ce.value,u=t.catchall,d;e._zod.parse=(s,f)=>{d??=r.value;let p=s.value;return o(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),s=a(s,f),u?Yr([],p,s,f,d,e):s):n(s,f):(s.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),s)}});function Qr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Oe(e));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(e=>e.issues.map(e=>je(e,r,c())))}),t)}var $r=r(`$ZodUnion`,(e,t)=>{j.init(e,t),C(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),C(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),C(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),C(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>b(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>Qr(t,i,e,a)):Qr(s,i,e,a)}});function ei(e,t,n,r){let i=e.filter(e=>e.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>je(e,r,c())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1}),t)}var ti=r(`$ZodXor`,(e,t)=>{$r.init(e,t),t.inclusive=!1;let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);t instanceof Promise?(s.push(t),o=!0):s.push(t)}return o?Promise.all(s).then(t=>ei(t,i,e,a)):ei(s,i,e,a)}}),ni=r(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,$r.init(e,t);let n=e._zod.parse;C(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=v(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!se(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),ri=r(`$ZodIntersection`,(e,t)=>{j.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ai(e,t,n)):ai(e,i,a)}});function ii(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(le(e)&&le(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=ii(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ii(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ai(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),Oe(e))return e;let o=ii(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var oi=r(`$ZodTuple`,(e,t)=>{j.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:`tuple`,code:`invalid_type`}),r;r.value=[];let o=[],s=[...n].reverse().findIndex(e=>e._zod.optin!==`optional`),c=s===-1?0:n.length-s;if(!t.rest){let t=a.length>n.length,i=a.length<c-1;if(t||i)return r.issues.push({...t?{code:`too_big`,maximum:n.length,inclusive:!0}:{code:`too_small`,minimum:n.length},input:a,inst:e,origin:`array`}),r}let l=-1;for(let e of n){if(l++,l>=a.length&&l>=c)continue;let t=e._zod.run({value:a[l],issues:[]},i);t instanceof Promise?o.push(t.then(e=>si(e,r,l))):si(t,r,l)}if(t.rest){let e=a.slice(n.length);for(let n of e){l++;let e=t.rest._zod.run({value:n,issues:[]},i);e instanceof Promise?o.push(e.then(e=>si(e,r,l))):si(e,r,l)}}return o.length?Promise.all(o).then(()=>r):r}});function si(e,t,n){e.issues.length&&t.issues.push(...ke(n,e.issues)),t.value[n]=e.value}var ci=r(`$ZodRecord`,(e,t)=>{j.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!le(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...ke(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...ke(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&cn.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>je(e,r,c())),input:o,path:[o],inst:e});continue}let l=t.valueType._zod.run({value:i[o],issues:[]},r);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&n.issues.push(...ke(o,e.issues)),n.value[s.value]=e.value})):(l.issues.length&&n.issues.push(...ke(o,l.issues)),n.value[s.value]=l.value)}}return a.length?Promise.all(a).then(()=>n):n}}),li=r(`$ZodMap`,(e,t)=>{j.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:`map`,code:`invalid_type`,input:i,inst:e}),n;let a=[];n.value=new Map;for(let[o,s]of i){let c=t.keyType._zod.run({value:o,issues:[]},r),l=t.valueType._zod.run({value:s,issues:[]},r);c instanceof Promise||l instanceof Promise?a.push(Promise.all([c,l]).then(([t,a])=>{ui(t,a,n,o,i,e,r)})):ui(c,l,n,o,i,e,r)}return a.length?Promise.all(a).then(()=>n):n}});function ui(e,t,n,r,i,a,o){e.issues.length&&(pe.has(typeof r)?n.issues.push(...ke(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>je(e,o,c()))})),t.issues.length&&(pe.has(typeof r)?n.issues.push(...ke(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>je(e,o,c()))})),n.value.set(e.value,t.value)}var di=r(`$ZodSet`,(e,t)=>{j.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:`set`,code:`invalid_type`}),n;let a=[];n.value=new Set;for(let e of i){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?a.push(i.then(e=>fi(e,n))):fi(i,n)}return a.length?Promise.all(a).then(()=>n):n}});function fi(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var pi=r(`$ZodEnum`,(e,t)=>{j.init(e,t);let n=h(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>pe.has(typeof e)).map(e=>typeof e==`string`?he(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),mi=r(`$ZodLiteral`,(e,t)=>{if(j.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?he(e):e?he(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),hi=r(`$ZodFile`,(e,t)=>{j.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),gi=r(`$ZodTransform`,(e,t)=>{j.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new o(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new a;return n.value=i,n}});function _i(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var vi=r(`$ZodOptional`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,C(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),C(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${b(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>_i(t,e.value)):_i(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),yi=r(`$ZodExactOptional`,(e,t)=>{vi.init(e,t),C(e._zod,`values`,()=>t.innerType._zod.values),C(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),bi=r(`$ZodNullable`,(e,t)=>{j.init(e,t),C(e._zod,`optin`,()=>t.innerType._zod.optin),C(e._zod,`optout`,()=>t.innerType._zod.optout),C(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${b(e.source)}|null)$`):void 0}),C(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),xi=r(`$ZodDefault`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,C(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Si(e,t)):Si(r,t)}});function Si(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Ci=r(`$ZodPrefault`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,C(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),wi=r(`$ZodNonOptional`,(e,t)=>{j.init(e,t),C(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Ti(t,e)):Ti(i,e)}});function Ti(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Ei=r(`$ZodSuccess`,(e,t)=>{j.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new o(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),Di=r(`$ZodCatch`,(e,t)=>{j.init(e,t),C(e._zod,`optin`,()=>t.innerType._zod.optin),C(e._zod,`optout`,()=>t.innerType._zod.optout),C(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>je(e,n,c()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>je(e,n,c()))},input:e.value}),e.issues=[]),e)}}),Oi=r(`$ZodNaN`,(e,t)=>{j.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),ki=r(`$ZodPipe`,(e,t)=>{j.init(e,t),C(e._zod,`values`,()=>t.in._zod.values),C(e._zod,`optin`,()=>t.in._zod.optin),C(e._zod,`optout`,()=>t.out._zod.optout),C(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ai(e,t.in,n)):Ai(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ai(e,t.out,n)):Ai(r,t.out,n)}});function Ai(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ji=r(`$ZodCodec`,(e,t)=>{j.init(e,t),C(e._zod,`values`,()=>t.in._zod.values),C(e._zod,`optin`,()=>t.in._zod.optin),C(e._zod,`optout`,()=>t.out._zod.optout),C(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Mi(e,t,n)):Mi(r,t,n)}else{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Mi(e,t,n)):Mi(r,t,n)}}});function Mi(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>Ni(e,r,t.out,n)):Ni(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>Ni(e,r,t.in,n)):Ni(e,r,t.in,n)}}function Ni(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}var Pi=r(`$ZodReadonly`,(e,t)=>{j.init(e,t),C(e._zod,`propValues`,()=>t.innerType._zod.propValues),C(e._zod,`values`,()=>t.innerType._zod.values),C(e._zod,`optin`,()=>t.innerType?._zod?.optin),C(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Fi):Fi(r)}});function Fi(e){return e.value=Object.freeze(e.value),e}var Ii=r(`$ZodTemplateLiteral`,(e,t)=>{j.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=t.startsWith(`^`)?1:0,i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||me.has(typeof e))n.push(he(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),Li=r(`$ZodFunction`,(e,t)=>(j.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return function(...n){let r=e._def.input?Qe(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?Qe(e._def.output,i):i}},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return async function(...n){let r=e._def.input?await et(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await et(e._def.output,i):i}},e._zod.parse=(t,n)=>typeof t.value==`function`?(e._def.output&&e._def.output._zod.def.type===`promise`?t.value=e.implementAsync(t.value):t.value=e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new oi({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),Ri=r(`$ZodPromise`,(e,t)=>{j.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),zi=r(`$ZodLazy`,(e,t)=>{j.init(e,t),C(e._zod,`innerType`,()=>t.getter()),C(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),C(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),C(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),C(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Bi=r(`$ZodCustom`,(e,t)=>{A.init(e,t),j.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Vi(t,n,r,e));Vi(i,n,r,e)}});function Vi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Pe(e))}}var Hi=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={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:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${O(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${g(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}};function Ui(){return{localeError:Hi()}}var Wi=()=>{let 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(t){return e[t]??null}let 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`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${O(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}};function Gi(){return{localeError:Wi()}}function Ki(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}var qi=()=>{let 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(t){return e[t]??null}let n={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:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${O(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=Ki(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=Ki(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}};function Ji(){return{localeError:qi()}}var Yi=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let 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:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${O(e.values[0])}`:`Невалидна опция: очаквано едно от ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}};function Xi(){return{localeError:Yi()}}var Zi=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${O(e.values[0])}`:`Opció invàlida: s'esperava una de ${g(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}};function Qi(){return{localeError:Zi()}}var $i=()=>{let 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(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${O(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${g(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}};function ea(){return{localeError:$i()}}var ta=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${O(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}};function na(){return{localeError:ta()}}var ra=()=>{let 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(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${O(e.values[0])}`:`Ungültige Option: erwartet eine von ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}};function ia(){return{localeError:ra()}}var aa=()=>{let 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`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let 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`,mac:`MAC 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`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input);return`Invalid input: expected ${t}, received ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${O(e.values[0])}`:`Invalid option: expected one of ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function oa(){return{localeError:aa()}}var sa=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let 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`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${O(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}};function ca(){return{localeError:sa()}}var la=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`,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`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${O(e.values[0])}`:`Opción inválida: se esperaba una de ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}};function ua(){return{localeError:la()}}var da=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let 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-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: میبایست instanceof ${e.expected} میبود، ${i} دریافت شد`:`ورودی نامعتبر: میبایست ${t} میبود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: میبایست ${O(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${g(e.values,`|`)} میبود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${g(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}};function fa(){return{localeError:da()}}var pa=()=>{let 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(t){return e[t]??null}let n={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`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${O(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${g(e.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 ma(){return{localeError:pa()}}var ha=()=>{let 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(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`nombre`,array:`tableau`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${O(e.values[0])} attendu`:`Option invalide : une valeur parmi ${g(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Trop grand : ${e.origin??`valeur`} doit ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`élément(s)`}`:`Trop grand : ${e.origin??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Trop petit : ${e.origin} doit ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${g(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}};function ga(){return{localeError:ha()}}var _a=()=>{let 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(t){return e[t]??null}let n={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`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${O(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${g(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}};function va(){return{localeError:_a()}}var ya=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},jwt:{label:`JWT`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=k(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${O(t.values[0])}`;let e=t.values.map(e=>O(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${g(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}};function ba(){return{localeError:ya()}}var xa=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${O(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}};function Sa(){return{localeError:xa()}}function Ca(e,t,n){return Math.abs(e)===1?t:n}function wa(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}var Ta=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let 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:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${O(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=Ca(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${wa(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${wa(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=Ca(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${wa(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${wa(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${g(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${wa(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${wa(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}};function Ea(){return{localeError:Ta()}}var Da=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${O(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}};function Oa(){return{localeError:Da()}}var ka=()=>{let 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(t){return e[t]??null}let 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`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${O(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}};function Aa(){return{localeError:ka()}}var ja=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${O(e.values[0])}`:`Opzione non valida: atteso uno tra ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}};function Ma(){return{localeError:ja()}}var Na=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let 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:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${O(e.values[0])}が期待されました`:`無効な選択: ${g(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${g(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}};function Pa(){return{localeError:Na()}}var Fa=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let 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:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`სტრინგი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${O(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${g(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი სტრინგი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი სტრინგი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}};function Ia(){return{localeError:Fa()}}var La=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let 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:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${O(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${g(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}};function Ra(){return{localeError:La()}}function za(){return Ra()}var Ba=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let 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:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${O(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${g(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${g(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}};function Va(){return{localeError:Ba()}}var Ha=e=>e.charAt(0).toUpperCase()+e.slice(1);function Ua(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}var Wa=()=>{let 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(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let 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`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${O(e.values[0])}`:`Privalo būti vienas iš ${g(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,Ua(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${Ha(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${Ha(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,Ua(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${Ha(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${Ha(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:return`${Ha(r[e.origin]??e.origin??e.origin??`reikšmė`)} turi klaidingą įvestį`;default:return`Klaidinga įvestis`}}};function Ga(){return{localeError:Wa()}}var Ka=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let 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:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${O(e.values[0])}`:`Грешана опција: се очекува една ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}};function qa(){return{localeError:Ka()}}var Ja=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${O(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${g(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}};function Ya(){return{localeError:Ja()}}var Xa=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${O(e.values[0])}`:`Ongeldige optie: verwacht één van ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}};function Za(){return{localeError:Xa()}}var Qa=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${O(e.values[0])}`:`Ugyldig valg: forventet en av ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}};function $a(){return{localeError:Qa()}}var eo=()=>{let 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(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${O(e.values[0])}`:`Fâsit tercih: mûteberler ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}};function to(){return{localeError:eo()}}var no=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={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:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${O(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${g(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}};function ro(){return{localeError:no()}}var io=()=>{let 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(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${O(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}};function ao(){return{localeError:io()}}var oo=()=>{let e={string:{unit:`caracteres`,verb:`ter`},file:{unit:`bytes`,verb:`ter`},array:{unit:`itens`,verb:`ter`},set:{unit:`itens`,verb:`ter`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`número`,null:`nulo`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipo inválido: esperado instanceof ${e.expected}, recebido ${i}`:`Tipo inválido: esperado ${t}, recebido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: esperado ${O(e.values[0])}`:`Opção inválida: esperada uma das ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Muito grande: esperado que ${e.origin??`valor`} tivesse ${n}${e.maximum.toString()} ${r.unit??`elementos`}`:`Muito grande: esperado que ${e.origin??`valor`} fosse ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${r.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Chave${e.keys.length>1?`s`:``} desconhecida${e.keys.length>1?`s`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Chave inválida em ${e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido em ${e.origin}`;default:return`Campo inválido`}}};function so(){return{localeError:oo()}}function co(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}var lo=()=>{let 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(t){return e[t]??null}let n={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:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${O(e.values[0])}`:`Неверный вариант: ожидалось одно из ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=co(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=co(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}};function uo(){return{localeError:lo()}}var fo=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${O(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}};function po(){return{localeError:fo()}}var mo=()=>{let 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(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${O(e.values[0])}`:`Ogiltigt val: förväntade en av ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}};function ho(){return{localeError:mo()}}var go=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${O(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${g(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}};function _o(){return{localeError:go()}}var vo=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let 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:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${O(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${g(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}};function yo(){return{localeError:vo()}}var bo=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let 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`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${O(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}};function xo(){return{localeError:bo()}}var So=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let 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:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${O(e.values[0])}`:`Неправильна опція: очікується одне з ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}};function Co(){return{localeError:So()}}function wo(){return Co()}var To=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={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:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${O(e.values[0])} متوقع تھا`:`غلط آپشن: ${g(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${g(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}};function Eo(){return{localeError:To()}}var Do=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,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 sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${O(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}};function Oo(){return{localeError:Do()}}var ko=()=>{let 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(t){return e[t]??null}let n={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`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${O(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.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 ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${g(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.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 ${e.origin}`;default:return`Đầu vào không hợp lệ`}}};function Ao(){return{localeError:ko()}}var jo=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let 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:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${O(e.values[0])}`:`无效选项:期望以下之一 ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${g(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}};function Mo(){return{localeError:jo()}}var No=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={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:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${O(e.values[0])}`:`無效的選項:預期為以下其中之一 ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${g(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}};function Po(){return{localeError:No()}}var Fo=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={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é`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=k(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${O(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${g(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${g(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}};function Io(){return{localeError:Fo()}}var Lo=t({ar:()=>Ui,az:()=>Gi,be:()=>Ji,bg:()=>Xi,ca:()=>Qi,cs:()=>ea,da:()=>na,de:()=>ia,en:()=>oa,eo:()=>ca,es:()=>ua,fa:()=>fa,fi:()=>ma,fr:()=>ga,frCA:()=>va,he:()=>ba,hu:()=>Sa,hy:()=>Ea,id:()=>Oa,is:()=>Aa,it:()=>Ma,ja:()=>Pa,ka:()=>Ia,kh:()=>za,km:()=>Ra,ko:()=>Va,lt:()=>Ga,mk:()=>qa,ms:()=>Ya,nl:()=>Za,no:()=>$a,ota:()=>to,pl:()=>ao,ps:()=>ro,pt:()=>so,ru:()=>uo,sl:()=>po,sv:()=>ho,ta:()=>_o,th:()=>yo,tr:()=>xo,ua:()=>wo,uk:()=>Co,ur:()=>Eo,uz:()=>Oo,vi:()=>Ao,yo:()=>Io,zhCN:()=>Mo,zhTW:()=>Po}),Ro,zo=Symbol(`ZodOutput`),Bo=Symbol(`ZodInput`),Vo=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ho(){return new Vo}(Ro=globalThis).__zod_globalRegistry??(Ro.__zod_globalRegistry=Ho());var Uo=globalThis.__zod_globalRegistry;function Wo(e,t){return new e({type:`string`,...D(t)})}function Go(e,t){return new e({type:`string`,coerce:!0,...D(t)})}function Ko(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...D(t)})}function qo(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...D(t)})}function Jo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...D(t)})}function Yo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...D(t)})}function Xo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...D(t)})}function Zo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...D(t)})}function Qo(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...D(t)})}function $o(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...D(t)})}function es(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...D(t)})}function ts(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...D(t)})}function ns(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...D(t)})}function rs(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...D(t)})}function is(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...D(t)})}function as(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...D(t)})}function os(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...D(t)})}function ss(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...D(t)})}function cs(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...D(t)})}function ls(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...D(t)})}function us(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...D(t)})}function ds(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...D(t)})}function fs(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...D(t)})}function ps(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...D(t)})}function ms(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...D(t)})}var hs={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function gs(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...D(t)})}function _s(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...D(t)})}function vs(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...D(t)})}function ys(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...D(t)})}function bs(e,t){return new e({type:`number`,checks:[],...D(t)})}function xs(e,t){return new e({type:`number`,coerce:!0,checks:[],...D(t)})}function Ss(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...D(t)})}function Cs(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...D(t)})}function ws(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...D(t)})}function Ts(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...D(t)})}function Es(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...D(t)})}function Ds(e,t){return new e({type:`boolean`,...D(t)})}function Os(e,t){return new e({type:`boolean`,coerce:!0,...D(t)})}function ks(e,t){return new e({type:`bigint`,...D(t)})}function As(e,t){return new e({type:`bigint`,coerce:!0,...D(t)})}function js(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...D(t)})}function Ms(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...D(t)})}function Ns(e,t){return new e({type:`symbol`,...D(t)})}function Ps(e,t){return new e({type:`undefined`,...D(t)})}function Fs(e,t){return new e({type:`null`,...D(t)})}function Is(e){return new e({type:`any`})}function Ls(e){return new e({type:`unknown`})}function Rs(e,t){return new e({type:`never`,...D(t)})}function zs(e,t){return new e({type:`void`,...D(t)})}function Bs(e,t){return new e({type:`date`,...D(t)})}function Vs(e,t){return new e({type:`date`,coerce:!0,...D(t)})}function Hs(e,t){return new e({type:`nan`,...D(t)})}function Us(e,t){return new Nn({check:`less_than`,...D(t),value:e,inclusive:!1})}function Ws(e,t){return new Nn({check:`less_than`,...D(t),value:e,inclusive:!0})}function Gs(e,t){return new Pn({check:`greater_than`,...D(t),value:e,inclusive:!1})}function Ks(e,t){return new Pn({check:`greater_than`,...D(t),value:e,inclusive:!0})}function qs(e){return Gs(0,e)}function Js(e){return Us(0,e)}function Ys(e){return Ws(0,e)}function Xs(e){return Ks(0,e)}function Zs(e,t){return new Fn({check:`multiple_of`,...D(t),value:e})}function Qs(e,t){return new Rn({check:`max_size`,...D(t),maximum:e})}function $s(e,t){return new zn({check:`min_size`,...D(t),minimum:e})}function ec(e,t){return new Bn({check:`size_equals`,...D(t),size:e})}function tc(e,t){return new Vn({check:`max_length`,...D(t),maximum:e})}function nc(e,t){return new Hn({check:`min_length`,...D(t),minimum:e})}function rc(e,t){return new Un({check:`length_equals`,...D(t),length:e})}function ic(e,t){return new Gn({check:`string_format`,format:`regex`,...D(t),pattern:e})}function ac(e){return new Kn({check:`string_format`,format:`lowercase`,...D(e)})}function oc(e){return new qn({check:`string_format`,format:`uppercase`,...D(e)})}function sc(e,t){return new Jn({check:`string_format`,format:`includes`,...D(t),includes:e})}function cc(e,t){return new Yn({check:`string_format`,format:`starts_with`,...D(t),prefix:e})}function lc(e,t){return new Xn({check:`string_format`,format:`ends_with`,...D(t),suffix:e})}function uc(e,t,n){return new Qn({check:`property`,property:e,schema:t,...D(n)})}function dc(e,t){return new $n({check:`mime_type`,mime:e,...D(t)})}function fc(e){return new er({check:`overwrite`,tx:e})}function pc(e){return fc(t=>t.normalize(e))}function mc(){return fc(e=>e.trim())}function hc(){return fc(e=>e.toLowerCase())}function gc(){return fc(e=>e.toUpperCase())}function _c(){return fc(e=>ae(e))}function vc(e,t,n){return new e({type:`array`,element:t,...D(n)})}function yc(e,t,n){return new e({type:`union`,options:t,...D(n)})}function bc(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...D(n)})}function xc(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...D(r)})}function Sc(e,t,n){return new e({type:`intersection`,left:t,right:n})}function Cc(e,t,n,r){let i=n instanceof j;return new e({type:`tuple`,items:t,rest:i?n:null,...D(i?r:n)})}function wc(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...D(r)})}function Tc(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...D(r)})}function Ec(e,t,n){return new e({type:`set`,valueType:t,...D(n)})}function Dc(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...D(n)})}function Oc(e,t,n){return new e({type:`enum`,entries:t,...D(n)})}function kc(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...D(n)})}function Ac(e,t){return new e({type:`file`,...D(t)})}function jc(e,t){return new e({type:`transform`,transform:t})}function Mc(e,t){return new e({type:`optional`,innerType:t})}function Nc(e,t){return new e({type:`nullable`,innerType:t})}function Pc(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():ue(n)}})}function Fc(e,t,n){return new e({type:`nonoptional`,innerType:t,...D(n)})}function Ic(e,t){return new e({type:`success`,innerType:t})}function Lc(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:()=>n})}function Rc(e,t,n){return new e({type:`pipe`,in:t,out:n})}function zc(e,t){return new e({type:`readonly`,innerType:t})}function Bc(e,t,n){return new e({type:`template_literal`,parts:t,...D(n)})}function Vc(e,t){return new e({type:`lazy`,getter:t})}function Hc(e,t){return new e({type:`promise`,innerType:t})}function Uc(e,t,n){let r=D(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Wc(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...D(n)})}function Gc(e){let t=Kc(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Pe(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(Pe(r))}},e(n.value,n)));return t}function Kc(e,t){let n=new A({check:`custom`,...D(t)});return n._zod.check=e,n}function qc(e){let t=new A({check:`describe`});return t._zod.onattach=[t=>{let n=Uo.get(t)??{};Uo.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function Jc(e){let t=new A({check:`meta`});return t._zod.onattach=[t=>{let n=Uo.get(t)??{};Uo.add(t,{...n,...e})}],t._zod.check=()=>{},t}function Yc(e,t){let n=D(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??ji,c=e.Boolean??Pr,l=new s({type:`pipe`,in:new(e.String??rr)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:o.has(r)?!1:(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l}function Xc(e,t,n,r={}){let i=D(r),a={...D(r),check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}function Zc(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Uo,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function N(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,N(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&el(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Qc(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
39
|
-
|
|
40
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function $c(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:nl(t,`input`,e.processors),output:nl(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function el(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return el(r.element,n);if(r.type===`set`)return el(r.valueType,n);if(r.type===`lazy`)return el(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return el(r.innerType,n);if(r.type===`intersection`)return el(r.left,n)||el(r.right,n);if(r.type===`record`||r.type===`map`)return el(r.keyType,n)||el(r.valueType,n);if(r.type===`pipe`)return el(r.in,n)||el(r.out,n);if(r.type===`object`){for(let e in r.shape)if(el(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(el(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(el(e,n))return!0;return!!(r.rest&&el(r.rest,n))}return!1}var tl=(e,t={})=>n=>{let r=Zc({...n,processors:t});return N(e,r),Qc(r,e),$c(r,e)},nl=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Zc({...i??{},target:a,io:t,processors:n});return N(e,o),Qc(o,e),$c(o,e)},rl={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},il=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=rl[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},al=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},ol=(e,t,n,r)=>{n.type=`boolean`},sl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},cl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},ll=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},ul=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},dl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},fl=(e,t,n,r)=>{n.not={}},pl=(e,t,n,r)=>{},ml=(e,t,n,r)=>{},hl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},gl=(e,t,n,r)=>{let i=e._zod.def,a=h(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},_l=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},vl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},yl=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},bl=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},xl=(e,t,n,r)=>{n.type=`boolean`},Sl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Cl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},wl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Tl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},El=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},Dl=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=N(a.element,t,{...r,path:[...r.path,`items`]})},Ol=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=N(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=N(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},kl=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>N(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Al=(e,t,n,r)=>{let i=e._zod.def,a=N(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=N(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},jl=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>N(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?N(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},Ml=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=N(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=N(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=N(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Nl=(e,t,n,r)=>{let i=e._zod.def,a=N(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Pl=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Fl=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Il=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ll=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Rl=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;N(a,t,r);let o=t.seen.get(e);o.ref=a},zl=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Bl=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Vl=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Hl=(e,t,n,r)=>{let i=e._zod.innerType;N(i,t,r);let a=t.seen.get(e);a.ref=i},Ul={string:il,number:al,boolean:ol,bigint:sl,symbol:cl,null:ll,undefined:ul,void:dl,never:fl,any:pl,unknown:ml,date:hl,enum:gl,literal:_l,nan:vl,template_literal:yl,file:bl,success:xl,custom:Sl,function:Cl,transform:wl,map:Tl,set:El,array:Dl,object:Ol,union:kl,intersection:Al,tuple:jl,record:Ml,nullable:Nl,nonoptional:Pl,default:Fl,prefault:Il,catch:Ll,pipe:Rl,readonly:zl,promise:Bl,optional:Vl,lazy:Hl};function Wl(e,t){if(`_idmap`in e){let n=e,r=Zc({...t,processors:Ul}),i={};for(let e of n._idmap.entries()){let[t,n]=e;N(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Qc(r,n),a[t]=$c(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=Zc({...t,processors:Ul});return N(e,n),Qc(n,e),$c(n,e)}var Gl=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=Zc({processors:Ul,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return N(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),Qc(this.ctx,e);let{"~standard":n,...r}=$c(this.ctx,e);return r}},Kl=t({}),ql=t({$ZodAny:()=>Br,$ZodArray:()=>Kr,$ZodAsyncError:()=>a,$ZodBase64:()=>Tr,$ZodBase64URL:()=>Dr,$ZodBigInt:()=>Fr,$ZodBigIntFormat:()=>Ir,$ZodBoolean:()=>Pr,$ZodCIDRv4:()=>Sr,$ZodCIDRv6:()=>Cr,$ZodCUID:()=>ur,$ZodCUID2:()=>dr,$ZodCatch:()=>Di,$ZodCheck:()=>A,$ZodCheckBigIntFormat:()=>Ln,$ZodCheckEndsWith:()=>Xn,$ZodCheckGreaterThan:()=>Pn,$ZodCheckIncludes:()=>Jn,$ZodCheckLengthEquals:()=>Un,$ZodCheckLessThan:()=>Nn,$ZodCheckLowerCase:()=>Kn,$ZodCheckMaxLength:()=>Vn,$ZodCheckMaxSize:()=>Rn,$ZodCheckMimeType:()=>$n,$ZodCheckMinLength:()=>Hn,$ZodCheckMinSize:()=>zn,$ZodCheckMultipleOf:()=>Fn,$ZodCheckNumberFormat:()=>In,$ZodCheckOverwrite:()=>er,$ZodCheckProperty:()=>Qn,$ZodCheckRegex:()=>Gn,$ZodCheckSizeEquals:()=>Bn,$ZodCheckStartsWith:()=>Yn,$ZodCheckStringFormat:()=>Wn,$ZodCheckUpperCase:()=>qn,$ZodCodec:()=>ji,$ZodCustom:()=>Bi,$ZodCustomStringFormat:()=>jr,$ZodDate:()=>Wr,$ZodDefault:()=>xi,$ZodDiscriminatedUnion:()=>ni,$ZodE164:()=>Or,$ZodEmail:()=>or,$ZodEmoji:()=>cr,$ZodEncodeError:()=>o,$ZodEnum:()=>pi,$ZodError:()=>We,$ZodExactOptional:()=>yi,$ZodFile:()=>hi,$ZodFunction:()=>Li,$ZodGUID:()=>ir,$ZodIPv4:()=>yr,$ZodIPv6:()=>br,$ZodISODate:()=>gr,$ZodISODateTime:()=>hr,$ZodISODuration:()=>vr,$ZodISOTime:()=>_r,$ZodIntersection:()=>ri,$ZodJWT:()=>Ar,$ZodKSUID:()=>mr,$ZodLazy:()=>zi,$ZodLiteral:()=>mi,$ZodMAC:()=>xr,$ZodMap:()=>li,$ZodNaN:()=>Oi,$ZodNanoID:()=>lr,$ZodNever:()=>Hr,$ZodNonOptional:()=>wi,$ZodNull:()=>zr,$ZodNullable:()=>bi,$ZodNumber:()=>Mr,$ZodNumberFormat:()=>Nr,$ZodObject:()=>Xr,$ZodObjectJIT:()=>Zr,$ZodOptional:()=>vi,$ZodPipe:()=>ki,$ZodPrefault:()=>Ci,$ZodPromise:()=>Ri,$ZodReadonly:()=>Pi,$ZodRealError:()=>Ge,$ZodRecord:()=>ci,$ZodRegistry:()=>Vo,$ZodSet:()=>di,$ZodString:()=>rr,$ZodStringFormat:()=>M,$ZodSuccess:()=>Ei,$ZodSymbol:()=>Lr,$ZodTemplateLiteral:()=>Ii,$ZodTransform:()=>gi,$ZodTuple:()=>oi,$ZodType:()=>j,$ZodULID:()=>fr,$ZodURL:()=>sr,$ZodUUID:()=>ar,$ZodUndefined:()=>Rr,$ZodUnion:()=>$r,$ZodUnknown:()=>Vr,$ZodVoid:()=>Ur,$ZodXID:()=>pr,$ZodXor:()=>ti,$brand:()=>i,$constructor:()=>r,$input:()=>Bo,$output:()=>zo,Doc:()=>tr,JSONSchema:()=>Kl,JSONSchemaGenerator:()=>Gl,NEVER:()=>n,TimePrecision:()=>hs,_any:()=>Is,_array:()=>vc,_base64:()=>ds,_base64url:()=>fs,_bigint:()=>ks,_boolean:()=>Ds,_catch:()=>Lc,_check:()=>Kc,_cidrv4:()=>ls,_cidrv6:()=>us,_coercedBigint:()=>As,_coercedBoolean:()=>Os,_coercedDate:()=>Vs,_coercedNumber:()=>xs,_coercedString:()=>Go,_cuid:()=>ts,_cuid2:()=>ns,_custom:()=>Uc,_date:()=>Bs,_decode:()=>st,_decodeAsync:()=>dt,_default:()=>Pc,_discriminatedUnion:()=>xc,_e164:()=>ps,_email:()=>Ko,_emoji:()=>$o,_encode:()=>at,_encodeAsync:()=>lt,_endsWith:()=>lc,_enum:()=>Dc,_file:()=>Ac,_float32:()=>Cs,_float64:()=>ws,_gt:()=>Gs,_gte:()=>Ks,_guid:()=>qo,_includes:()=>sc,_int:()=>Ss,_int32:()=>Ts,_int64:()=>js,_intersection:()=>Sc,_ipv4:()=>os,_ipv6:()=>ss,_isoDate:()=>_s,_isoDateTime:()=>gs,_isoDuration:()=>ys,_isoTime:()=>vs,_jwt:()=>ms,_ksuid:()=>as,_lazy:()=>Vc,_length:()=>rc,_literal:()=>kc,_lowercase:()=>ac,_lt:()=>Us,_lte:()=>Ws,_mac:()=>cs,_map:()=>Tc,_max:()=>Ws,_maxLength:()=>tc,_maxSize:()=>Qs,_mime:()=>dc,_min:()=>Ks,_minLength:()=>nc,_minSize:()=>$s,_multipleOf:()=>Zs,_nan:()=>Hs,_nanoid:()=>es,_nativeEnum:()=>Oc,_negative:()=>Js,_never:()=>Rs,_nonnegative:()=>Xs,_nonoptional:()=>Fc,_nonpositive:()=>Ys,_normalize:()=>pc,_null:()=>Fs,_nullable:()=>Nc,_number:()=>bs,_optional:()=>Mc,_overwrite:()=>fc,_parse:()=>Ze,_parseAsync:()=>$e,_pipe:()=>Rc,_positive:()=>qs,_promise:()=>Hc,_property:()=>uc,_readonly:()=>zc,_record:()=>wc,_refine:()=>Wc,_regex:()=>ic,_safeDecode:()=>ht,_safeDecodeAsync:()=>yt,_safeEncode:()=>pt,_safeEncodeAsync:()=>_t,_safeParse:()=>tt,_safeParseAsync:()=>rt,_set:()=>Ec,_size:()=>ec,_slugify:()=>_c,_startsWith:()=>cc,_string:()=>Wo,_stringFormat:()=>Xc,_stringbool:()=>Yc,_success:()=>Ic,_superRefine:()=>Gc,_symbol:()=>Ns,_templateLiteral:()=>Bc,_toLowerCase:()=>hc,_toUpperCase:()=>gc,_transform:()=>jc,_trim:()=>mc,_tuple:()=>Cc,_uint32:()=>Es,_uint64:()=>Ms,_ulid:()=>rs,_undefined:()=>Ps,_union:()=>yc,_unknown:()=>Ls,_uppercase:()=>oc,_url:()=>Qo,_uuid:()=>Jo,_uuidv4:()=>Yo,_uuidv6:()=>Xo,_uuidv7:()=>Zo,_void:()=>zs,_xid:()=>is,_xor:()=>bc,clone:()=>ge,config:()=>c,createStandardJSONSchemaMethod:()=>nl,createToJSONSchemaMethod:()=>tl,decode:()=>ct,decodeAsync:()=>ft,describe:()=>qc,encode:()=>ot,encodeAsync:()=>ut,extractDefs:()=>Qc,finalize:()=>$c,flattenError:()=>Ke,formatError:()=>qe,globalConfig:()=>s,globalRegistry:()=>Uo,initializeContext:()=>Zc,isValidBase64:()=>wr,isValidBase64URL:()=>Er,isValidJWT:()=>kr,locales:()=>Lo,meta:()=>Jc,parse:()=>Qe,parseAsync:()=>et,prettifyError:()=>Xe,process:()=>N,regexes:()=>xt,registry:()=>Ho,safeDecode:()=>gt,safeDecodeAsync:()=>bt,safeEncode:()=>mt,safeEncodeAsync:()=>vt,safeParse:()=>nt,safeParseAsync:()=>it,toDotPath:()=>Ye,toJSONSchema:()=>Wl,treeifyError:()=>Je,util:()=>l,version:()=>nr}),Jl=t({endsWith:()=>lc,gt:()=>Gs,gte:()=>Ks,includes:()=>sc,length:()=>rc,lowercase:()=>ac,lt:()=>Us,lte:()=>Ws,maxLength:()=>tc,maxSize:()=>Qs,mime:()=>dc,minLength:()=>nc,minSize:()=>$s,multipleOf:()=>Zs,negative:()=>Js,nonnegative:()=>Xs,nonpositive:()=>Ys,normalize:()=>pc,overwrite:()=>fc,positive:()=>qs,property:()=>uc,regex:()=>ic,size:()=>ec,slugify:()=>_c,startsWith:()=>cc,toLowerCase:()=>hc,toUpperCase:()=>gc,trim:()=>mc,uppercase:()=>oc}),Yl=t({ZodISODate:()=>Ql,ZodISODateTime:()=>Xl,ZodISODuration:()=>nu,ZodISOTime:()=>eu,date:()=>$l,datetime:()=>Zl,duration:()=>ru,time:()=>tu}),Xl=r(`ZodISODateTime`,(e,t)=>{hr.init(e,t),I.init(e,t)});function Zl(e){return gs(Xl,e)}var Ql=r(`ZodISODate`,(e,t)=>{gr.init(e,t),I.init(e,t)});function $l(e){return _s(Ql,e)}var eu=r(`ZodISOTime`,(e,t)=>{_r.init(e,t),I.init(e,t)});function tu(e){return vs(eu,e)}var nu=r(`ZodISODuration`,(e,t)=>{vr.init(e,t),I.init(e,t)});function ru(e){return ys(nu,e)}var iu=(e,t)=>{We.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>qe(e,t)},flatten:{value:t=>Ke(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,_,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,_,2)}},isEmpty:{get(){return e.issues.length===0}}})},au=r(`ZodError`,iu),ou=r(`ZodError`,iu,{Parent:Error}),su=Ze(ou),cu=$e(ou),lu=tt(ou),uu=rt(ou),du=at(ou),fu=st(ou),pu=lt(ou),mu=dt(ou),hu=pt(ou),gu=ht(ou),_u=_t(ou),vu=yt(ou),yu=t({ZodAny:()=>Ld,ZodArray:()=>qd,ZodBase64:()=>id,ZodBase64URL:()=>od,ZodBigInt:()=>Ed,ZodBigIntFormat:()=>Od,ZodBoolean:()=>wd,ZodCIDRv4:()=>ed,ZodCIDRv6:()=>nd,ZodCUID:()=>Ru,ZodCUID2:()=>Bu,ZodCatch:()=>Hf,ZodCodec:()=>Jf,ZodCustom:()=>op,ZodCustomStringFormat:()=>fd,ZodDate:()=>Gd,ZodDefault:()=>Pf,ZodDiscriminatedUnion:()=>rf,ZodE164:()=>cd,ZodEmail:()=>Su,ZodEmoji:()=>Pu,ZodEnum:()=>vf,ZodExactOptional:()=>kf,ZodFile:()=>Cf,ZodFunction:()=>ip,ZodGUID:()=>wu,ZodIPv4:()=>Ju,ZodIPv6:()=>Qu,ZodIntersection:()=>of,ZodJWT:()=>ud,ZodKSUID:()=>Ku,ZodLazy:()=>ep,ZodLiteral:()=>xf,ZodMAC:()=>Xu,ZodMap:()=>mf,ZodNaN:()=>Wf,ZodNanoID:()=>Iu,ZodNever:()=>Vd,ZodNonOptional:()=>Rf,ZodNull:()=>Fd,ZodNullable:()=>jf,ZodNumber:()=>_d,ZodNumberFormat:()=>vd,ZodObject:()=>Xd,ZodOptional:()=>Df,ZodPipe:()=>Kf,ZodPrefault:()=>If,ZodPromise:()=>np,ZodReadonly:()=>Xf,ZodRecord:()=>uf,ZodSet:()=>gf,ZodString:()=>xu,ZodStringFormat:()=>I,ZodSuccess:()=>Bf,ZodSymbol:()=>jd,ZodTemplateLiteral:()=>Qf,ZodTransform:()=>Tf,ZodTuple:()=>cf,ZodType:()=>P,ZodULID:()=>Hu,ZodURL:()=>ju,ZodUUID:()=>Eu,ZodUndefined:()=>Nd,ZodUnion:()=>$d,ZodUnknown:()=>zd,ZodVoid:()=>Ud,ZodXID:()=>Wu,ZodXor:()=>tf,_ZodString:()=>bu,_default:()=>Ff,_function:()=>ap,any:()=>Rd,array:()=>Jd,base64:()=>ad,base64url:()=>sd,bigint:()=>Dd,boolean:()=>Td,catch:()=>Uf,check:()=>sp,cidrv4:()=>td,cidrv6:()=>rd,codec:()=>Yf,cuid:()=>zu,cuid2:()=>Vu,custom:()=>cp,date:()=>Kd,describe:()=>dp,discriminatedUnion:()=>af,e164:()=>ld,email:()=>Cu,emoji:()=>Fu,enum:()=>yf,exactOptional:()=>Af,file:()=>wf,float32:()=>bd,float64:()=>xd,function:()=>ap,guid:()=>Tu,hash:()=>gd,hex:()=>hd,hostname:()=>md,httpUrl:()=>Nu,instanceof:()=>pp,int:()=>yd,int32:()=>Sd,int64:()=>kd,intersection:()=>sf,ipv4:()=>Yu,ipv6:()=>$u,json:()=>hp,jwt:()=>dd,keyof:()=>Yd,ksuid:()=>qu,lazy:()=>tp,literal:()=>Sf,looseObject:()=>Qd,looseRecord:()=>pf,mac:()=>Zu,map:()=>hf,meta:()=>fp,nan:()=>Gf,nanoid:()=>Lu,nativeEnum:()=>bf,never:()=>Hd,nonoptional:()=>zf,null:()=>Id,nullable:()=>Mf,nullish:()=>Nf,number:()=>L,object:()=>Zd,optional:()=>Of,partialRecord:()=>ff,pipe:()=>qf,prefault:()=>Lf,preprocess:()=>gp,promise:()=>rp,readonly:()=>Zf,record:()=>df,refine:()=>lp,set:()=>_f,strictObject:()=>R,string:()=>F,stringFormat:()=>pd,stringbool:()=>mp,success:()=>Vf,superRefine:()=>up,symbol:()=>Md,templateLiteral:()=>$f,transform:()=>Ef,tuple:()=>lf,uint32:()=>Cd,uint64:()=>Ad,ulid:()=>Uu,undefined:()=>Pd,union:()=>ef,unknown:()=>Bd,url:()=>Mu,uuid:()=>Du,uuidv4:()=>Ou,uuidv6:()=>ku,uuidv7:()=>Au,void:()=>Wd,xid:()=>Gu,xor:()=>nf}),P=r(`ZodType`,(e,t)=>(j.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:nl(e,`input`),output:nl(e,`output`)}}),e.toJSONSchema=tl(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(E(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>ge(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>su(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>lu(e,t,n),e.parseAsync=async(t,n)=>cu(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>uu(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>du(e,t,n),e.decode=(t,n)=>fu(e,t,n),e.encodeAsync=async(t,n)=>pu(e,t,n),e.decodeAsync=async(t,n)=>mu(e,t,n),e.safeEncode=(t,n)=>hu(e,t,n),e.safeDecode=(t,n)=>gu(e,t,n),e.safeEncodeAsync=async(t,n)=>_u(e,t,n),e.safeDecodeAsync=async(t,n)=>vu(e,t,n),e.refine=(t,n)=>e.check(lp(t,n)),e.superRefine=t=>e.check(up(t)),e.overwrite=t=>e.check(fc(t)),e.optional=()=>Of(e),e.exactOptional=()=>Af(e),e.nullable=()=>Mf(e),e.nullish=()=>Of(Mf(e)),e.nonoptional=t=>zf(e,t),e.array=()=>Jd(e),e.or=t=>ef([e,t]),e.and=t=>sf(e,t),e.transform=t=>qf(e,Ef(t)),e.default=t=>Ff(e,t),e.prefault=t=>Lf(e,t),e.catch=t=>Uf(e,t),e.pipe=t=>qf(e,t),e.readonly=()=>Zf(e),e.describe=t=>{let n=e.clone();return Uo.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return Uo.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return Uo.get(e);let n=e.clone();return Uo.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),bu=r(`_ZodString`,(e,t)=>{rr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>il(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ic(...t)),e.includes=(...t)=>e.check(sc(...t)),e.startsWith=(...t)=>e.check(cc(...t)),e.endsWith=(...t)=>e.check(lc(...t)),e.min=(...t)=>e.check(nc(...t)),e.max=(...t)=>e.check(tc(...t)),e.length=(...t)=>e.check(rc(...t)),e.nonempty=(...t)=>e.check(nc(1,...t)),e.lowercase=t=>e.check(ac(t)),e.uppercase=t=>e.check(oc(t)),e.trim=()=>e.check(mc()),e.normalize=(...t)=>e.check(pc(...t)),e.toLowerCase=()=>e.check(hc()),e.toUpperCase=()=>e.check(gc()),e.slugify=()=>e.check(_c())}),xu=r(`ZodString`,(e,t)=>{rr.init(e,t),bu.init(e,t),e.email=t=>e.check(Ko(Su,t)),e.url=t=>e.check(Qo(ju,t)),e.jwt=t=>e.check(ms(ud,t)),e.emoji=t=>e.check($o(Pu,t)),e.guid=t=>e.check(qo(wu,t)),e.uuid=t=>e.check(Jo(Eu,t)),e.uuidv4=t=>e.check(Yo(Eu,t)),e.uuidv6=t=>e.check(Xo(Eu,t)),e.uuidv7=t=>e.check(Zo(Eu,t)),e.nanoid=t=>e.check(es(Iu,t)),e.guid=t=>e.check(qo(wu,t)),e.cuid=t=>e.check(ts(Ru,t)),e.cuid2=t=>e.check(ns(Bu,t)),e.ulid=t=>e.check(rs(Hu,t)),e.base64=t=>e.check(ds(id,t)),e.base64url=t=>e.check(fs(od,t)),e.xid=t=>e.check(is(Wu,t)),e.ksuid=t=>e.check(as(Ku,t)),e.ipv4=t=>e.check(os(Ju,t)),e.ipv6=t=>e.check(ss(Qu,t)),e.cidrv4=t=>e.check(ls(ed,t)),e.cidrv6=t=>e.check(us(nd,t)),e.e164=t=>e.check(ps(cd,t)),e.datetime=t=>e.check(Zl(t)),e.date=t=>e.check($l(t)),e.time=t=>e.check(tu(t)),e.duration=t=>e.check(ru(t))});function F(e){return Wo(xu,e)}var I=r(`ZodStringFormat`,(e,t)=>{M.init(e,t),bu.init(e,t)}),Su=r(`ZodEmail`,(e,t)=>{or.init(e,t),I.init(e,t)});function Cu(e){return Ko(Su,e)}var wu=r(`ZodGUID`,(e,t)=>{ir.init(e,t),I.init(e,t)});function Tu(e){return qo(wu,e)}var Eu=r(`ZodUUID`,(e,t)=>{ar.init(e,t),I.init(e,t)});function Du(e){return Jo(Eu,e)}function Ou(e){return Yo(Eu,e)}function ku(e){return Xo(Eu,e)}function Au(e){return Zo(Eu,e)}var ju=r(`ZodURL`,(e,t)=>{sr.init(e,t),I.init(e,t)});function Mu(e){return Qo(ju,e)}function Nu(e){return Qo(ju,{protocol:/^https?$/,hostname:Zt,...D(e)})}var Pu=r(`ZodEmoji`,(e,t)=>{cr.init(e,t),I.init(e,t)});function Fu(e){return $o(Pu,e)}var Iu=r(`ZodNanoID`,(e,t)=>{lr.init(e,t),I.init(e,t)});function Lu(e){return es(Iu,e)}var Ru=r(`ZodCUID`,(e,t)=>{ur.init(e,t),I.init(e,t)});function zu(e){return ts(Ru,e)}var Bu=r(`ZodCUID2`,(e,t)=>{dr.init(e,t),I.init(e,t)});function Vu(e){return ns(Bu,e)}var Hu=r(`ZodULID`,(e,t)=>{fr.init(e,t),I.init(e,t)});function Uu(e){return rs(Hu,e)}var Wu=r(`ZodXID`,(e,t)=>{pr.init(e,t),I.init(e,t)});function Gu(e){return is(Wu,e)}var Ku=r(`ZodKSUID`,(e,t)=>{mr.init(e,t),I.init(e,t)});function qu(e){return as(Ku,e)}var Ju=r(`ZodIPv4`,(e,t)=>{yr.init(e,t),I.init(e,t)});function Yu(e){return os(Ju,e)}var Xu=r(`ZodMAC`,(e,t)=>{xr.init(e,t),I.init(e,t)});function Zu(e){return cs(Xu,e)}var Qu=r(`ZodIPv6`,(e,t)=>{br.init(e,t),I.init(e,t)});function $u(e){return ss(Qu,e)}var ed=r(`ZodCIDRv4`,(e,t)=>{Sr.init(e,t),I.init(e,t)});function td(e){return ls(ed,e)}var nd=r(`ZodCIDRv6`,(e,t)=>{Cr.init(e,t),I.init(e,t)});function rd(e){return us(nd,e)}var id=r(`ZodBase64`,(e,t)=>{Tr.init(e,t),I.init(e,t)});function ad(e){return ds(id,e)}var od=r(`ZodBase64URL`,(e,t)=>{Dr.init(e,t),I.init(e,t)});function sd(e){return fs(od,e)}var cd=r(`ZodE164`,(e,t)=>{Or.init(e,t),I.init(e,t)});function ld(e){return ps(cd,e)}var ud=r(`ZodJWT`,(e,t)=>{Ar.init(e,t),I.init(e,t)});function dd(e){return ms(ud,e)}var fd=r(`ZodCustomStringFormat`,(e,t)=>{jr.init(e,t),I.init(e,t)});function pd(e,t,n={}){return Xc(fd,e,t,n)}function md(e){return Xc(fd,`hostname`,Xt,e)}function hd(e){return Xc(fd,`hex`,mn,e)}function gd(e,t){let n=`${e}_${t?.enc??`hex`}`,r=xt[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return Xc(fd,n,r,t)}var _d=r(`ZodNumber`,(e,t)=>{Mr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>al(e,t,n,r),e.gt=(t,n)=>e.check(Gs(t,n)),e.gte=(t,n)=>e.check(Ks(t,n)),e.min=(t,n)=>e.check(Ks(t,n)),e.lt=(t,n)=>e.check(Us(t,n)),e.lte=(t,n)=>e.check(Ws(t,n)),e.max=(t,n)=>e.check(Ws(t,n)),e.int=t=>e.check(yd(t)),e.safe=t=>e.check(yd(t)),e.positive=t=>e.check(Gs(0,t)),e.nonnegative=t=>e.check(Ks(0,t)),e.negative=t=>e.check(Us(0,t)),e.nonpositive=t=>e.check(Ws(0,t)),e.multipleOf=(t,n)=>e.check(Zs(t,n)),e.step=(t,n)=>e.check(Zs(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function L(e){return bs(_d,e)}var vd=r(`ZodNumberFormat`,(e,t)=>{Nr.init(e,t),_d.init(e,t)});function yd(e){return Ss(vd,e)}function bd(e){return Cs(vd,e)}function xd(e){return ws(vd,e)}function Sd(e){return Ts(vd,e)}function Cd(e){return Es(vd,e)}var wd=r(`ZodBoolean`,(e,t)=>{Pr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ol(e,t,n,r)});function Td(e){return Ds(wd,e)}var Ed=r(`ZodBigInt`,(e,t)=>{Fr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sl(e,t,n,r),e.gte=(t,n)=>e.check(Ks(t,n)),e.min=(t,n)=>e.check(Ks(t,n)),e.gt=(t,n)=>e.check(Gs(t,n)),e.gte=(t,n)=>e.check(Ks(t,n)),e.min=(t,n)=>e.check(Ks(t,n)),e.lt=(t,n)=>e.check(Us(t,n)),e.lte=(t,n)=>e.check(Ws(t,n)),e.max=(t,n)=>e.check(Ws(t,n)),e.positive=t=>e.check(Gs(BigInt(0),t)),e.negative=t=>e.check(Us(BigInt(0),t)),e.nonpositive=t=>e.check(Ws(BigInt(0),t)),e.nonnegative=t=>e.check(Ks(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(Zs(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Dd(e){return ks(Ed,e)}var Od=r(`ZodBigIntFormat`,(e,t)=>{Ir.init(e,t),Ed.init(e,t)});function kd(e){return js(Od,e)}function Ad(e){return Ms(Od,e)}var jd=r(`ZodSymbol`,(e,t)=>{Lr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cl(e,t,n,r)});function Md(e){return Ns(jd,e)}var Nd=r(`ZodUndefined`,(e,t)=>{Rr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ul(e,t,n,r)});function Pd(e){return Ps(Nd,e)}var Fd=r(`ZodNull`,(e,t)=>{zr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ll(e,t,n,r)});function Id(e){return Fs(Fd,e)}var Ld=r(`ZodAny`,(e,t)=>{Br.init(e,t),P.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Rd(){return Is(Ld)}var zd=r(`ZodUnknown`,(e,t)=>{Vr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Bd(){return Ls(zd)}var Vd=r(`ZodNever`,(e,t)=>{Hr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fl(e,t,n,r)});function Hd(e){return Rs(Vd,e)}var Ud=r(`ZodVoid`,(e,t)=>{Ur.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dl(e,t,n,r)});function Wd(e){return zs(Ud,e)}var Gd=r(`ZodDate`,(e,t)=>{Wr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hl(e,t,n,r),e.min=(t,n)=>e.check(Ks(t,n)),e.max=(t,n)=>e.check(Ws(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Kd(e){return Bs(Gd,e)}var qd=r(`ZodArray`,(e,t)=>{Kr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dl(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(nc(t,n)),e.nonempty=t=>e.check(nc(1,t)),e.max=(t,n)=>e.check(tc(t,n)),e.length=(t,n)=>e.check(rc(t,n)),e.unwrap=()=>e.element});function Jd(e,t){return vc(qd,e,t)}function Yd(e){let t=e._zod.def.shape;return yf(Object.keys(t))}var Xd=r(`ZodObject`,(e,t)=>{Zr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ol(e,t,n,r),C(e,`shape`,()=>t.shape),e.keyof=()=>yf(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Bd()}),e.loose=()=>e.clone({...e._zod.def,catchall:Bd()}),e.strict=()=>e.clone({...e._zod.def,catchall:Hd()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Ce(e,t),e.safeExtend=t=>we(e,t),e.merge=t=>Te(e,t),e.pick=t=>xe(e,t),e.omit=t=>Se(e,t),e.partial=(...t)=>Ee(Df,e,t[0]),e.required=(...t)=>De(Rf,e,t[0])});function Zd(e,t){return new Xd({type:`object`,shape:e??{},...D(t)})}function R(e,t){return new Xd({type:`object`,shape:e,catchall:Hd(),...D(t)})}function Qd(e,t){return new Xd({type:`object`,shape:e,catchall:Bd(),...D(t)})}var $d=r(`ZodUnion`,(e,t)=>{$r.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kl(e,t,n,r),e.options=t.options});function ef(e,t){return new $d({type:`union`,options:e,...D(t)})}var tf=r(`ZodXor`,(e,t)=>{$d.init(e,t),ti.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kl(e,t,n,r),e.options=t.options});function nf(e,t){return new tf({type:`union`,options:e,inclusive:!1,...D(t)})}var rf=r(`ZodDiscriminatedUnion`,(e,t)=>{$d.init(e,t),ni.init(e,t)});function af(e,t,n){return new rf({type:`union`,options:t,discriminator:e,...D(n)})}var of=r(`ZodIntersection`,(e,t)=>{ri.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Al(e,t,n,r)});function sf(e,t){return new of({type:`intersection`,left:e,right:t})}var cf=r(`ZodTuple`,(e,t)=>{oi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jl(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function lf(e,t,n){let r=t instanceof j;return new cf({type:`tuple`,items:e,rest:r?t:null,...D(r?n:t)})}var uf=r(`ZodRecord`,(e,t)=>{ci.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ml(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function df(e,t,n){return new uf({type:`record`,keyType:e,valueType:t,...D(n)})}function ff(e,t,n){let r=ge(e);return r._zod.values=void 0,new uf({type:`record`,keyType:r,valueType:t,...D(n)})}function pf(e,t,n){return new uf({type:`record`,keyType:e,valueType:t,mode:`loose`,...D(n)})}var mf=r(`ZodMap`,(e,t)=>{li.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tl(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check($s(...t)),e.nonempty=t=>e.check($s(1,t)),e.max=(...t)=>e.check(Qs(...t)),e.size=(...t)=>e.check(ec(...t))});function hf(e,t,n){return new mf({type:`map`,keyType:e,valueType:t,...D(n)})}var gf=r(`ZodSet`,(e,t)=>{di.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>El(e,t,n,r),e.min=(...t)=>e.check($s(...t)),e.nonempty=t=>e.check($s(1,t)),e.max=(...t)=>e.check(Qs(...t)),e.size=(...t)=>e.check(ec(...t))});function _f(e,t){return new gf({type:`set`,valueType:e,...D(t)})}var vf=r(`ZodEnum`,(e,t)=>{pi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gl(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new vf({...t,checks:[],...D(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new vf({...t,checks:[],...D(r),entries:i})}});function yf(e,t){return new vf({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...D(t)})}function bf(e,t){return new vf({type:`enum`,entries:e,...D(t)})}var xf=r(`ZodLiteral`,(e,t)=>{mi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_l(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Sf(e,t){return new xf({type:`literal`,values:Array.isArray(e)?e:[e],...D(t)})}var Cf=r(`ZodFile`,(e,t)=>{hi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bl(e,t,n,r),e.min=(t,n)=>e.check($s(t,n)),e.max=(t,n)=>e.check(Qs(t,n)),e.mime=(t,n)=>e.check(dc(Array.isArray(t)?t:[t],n))});function wf(e){return Ac(Cf,e)}var Tf=r(`ZodTransform`,(e,t)=>{gi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wl(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new o(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Pe(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Pe(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ef(e){return new Tf({type:`transform`,transform:e})}var Df=r(`ZodOptional`,(e,t)=>{vi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Of(e){return new Df({type:`optional`,innerType:e})}var kf=r(`ZodExactOptional`,(e,t)=>{yi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Af(e){return new kf({type:`optional`,innerType:e})}var jf=r(`ZodNullable`,(e,t)=>{bi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Mf(e){return new jf({type:`nullable`,innerType:e})}function Nf(e){return Of(Mf(e))}var Pf=r(`ZodDefault`,(e,t)=>{xi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ff(e,t){return new Pf({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ue(t)}})}var If=r(`ZodPrefault`,(e,t)=>{Ci.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Il(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Lf(e,t){return new If({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ue(t)}})}var Rf=r(`ZodNonOptional`,(e,t)=>{wi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zf(e,t){return new Rf({type:`nonoptional`,innerType:e,...D(t)})}var Bf=r(`ZodSuccess`,(e,t)=>{Ei.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Vf(e){return new Bf({type:`success`,innerType:e})}var Hf=r(`ZodCatch`,(e,t)=>{Di.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ll(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Uf(e,t){return new Hf({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Wf=r(`ZodNaN`,(e,t)=>{Oi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vl(e,t,n,r)});function Gf(e){return Hs(Wf,e)}var Kf=r(`ZodPipe`,(e,t)=>{ki.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rl(e,t,n,r),e.in=t.in,e.out=t.out});function qf(e,t){return new Kf({type:`pipe`,in:e,out:t})}var Jf=r(`ZodCodec`,(e,t)=>{Kf.init(e,t),ji.init(e,t)});function Yf(e,t,n){return new Jf({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}var Xf=r(`ZodReadonly`,(e,t)=>{Pi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Zf(e){return new Xf({type:`readonly`,innerType:e})}var Qf=r(`ZodTemplateLiteral`,(e,t)=>{Ii.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yl(e,t,n,r)});function $f(e,t){return new Qf({type:`template_literal`,parts:e,...D(t)})}var ep=r(`ZodLazy`,(e,t)=>{zi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hl(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function tp(e){return new ep({type:`lazy`,getter:e})}var np=r(`ZodPromise`,(e,t)=>{Ri.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rp(e){return new np({type:`promise`,innerType:e})}var ip=r(`ZodFunction`,(e,t)=>{Li.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cl(e,t,n,r)});function ap(e){return new ip({type:`function`,input:Array.isArray(e?.input)?lf(e?.input):e?.input??Jd(Bd()),output:e?.output??Bd()})}var op=r(`ZodCustom`,(e,t)=>{Bi.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sl(e,t,n,r)});function sp(e){let t=new A({check:`custom`});return t._zod.check=e,t}function cp(e,t){return Uc(op,e??(()=>!0),t)}function lp(e,t={}){return Wc(op,e,t)}function up(e){return Gc(e)}var dp=qc,fp=Jc;function pp(e,t={}){let n=new op({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...D(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var mp=(...e)=>Yc({Codec:Jf,Boolean:wd,String:xu},...e);function hp(e){let t=tp(()=>ef([F(e),L(),Td(),Id(),Jd(t),df(F(),t)]));return t}function gp(e,t){return qf(Ef(e),t)}var _p={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 vp(e){c({customError:e})}function yp(){return c().customError}var bp;(function(e){})(bp||={});var z={...yu,...Jl,iso:Yl},xp=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`));function Sp(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function Cp(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function wp(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return z.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return z.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=Tp(Cp(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return z.null();if(n.length===0)return z.never();if(n.length===1)return z.literal(n[0]);if(n.every(e=>typeof e==`string`))return z.enum(n);let r=n.map(e=>z.literal(e));return r.length<2?r[0]:z.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return z.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>wp({...e,type:n},t));return r.length===0?z.never():r.length===1?r[0]:z.union(r)}if(!n)return z.any();let r;switch(n){case`string`:{let t=z.string();if(e.format){let n=e.format;n===`email`?t=t.check(z.email()):n===`uri`||n===`uri-reference`?t=t.check(z.url()):n===`uuid`||n===`guid`?t=t.check(z.uuid()):n===`date-time`?t=t.check(z.iso.datetime()):n===`date`?t=t.check(z.iso.date()):n===`time`?t=t.check(z.iso.time()):n===`duration`?t=t.check(z.iso.duration()):n===`ipv4`?t=t.check(z.ipv4()):n===`ipv6`?t=t.check(z.ipv6()):n===`mac`?t=t.check(z.mac()):n===`cidr`?t=t.check(z.cidrv4()):n===`cidr-v6`?t=t.check(z.cidrv6()):n===`base64`?t=t.check(z.base64()):n===`base64url`?t=t.check(z.base64url()):n===`e164`?t=t.check(z.e164()):n===`jwt`?t=t.check(z.jwt()):n===`emoji`?t=t.check(z.emoji()):n===`nanoid`?t=t.check(z.nanoid()):n===`cuid`?t=t.check(z.cuid()):n===`cuid2`?t=t.check(z.cuid2()):n===`ulid`?t=t.check(z.ulid()):n===`xid`?t=t.check(z.xid()):n===`ksuid`&&(t=t.check(z.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?z.number().int():z.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=z.boolean();break;case`null`:r=z.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=Tp(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=Tp(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?Tp(e.additionalProperties,t):z.any();if(Object.keys(n).length===0){r=z.record(i,a);break}let o=z.object(n).passthrough(),s=z.looseRecord(i,a);r=z.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=Tp(i[e],t),r=z.string().regex(new RegExp(e));o.push(z.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(z.object(n).passthrough()),s.push(...o),s.length===0)r=z.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=z.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=z.intersection(e,s[t]);r=e}break}let o=z.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall(Tp(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>Tp(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?Tp(i,t):void 0;r=o?z.tuple(a).rest(o):z.tuple(a),typeof e.minItems==`number`&&(r=r.check(z.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(z.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>Tp(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?Tp(e.additionalItems,t):void 0;r=a?z.tuple(n).rest(a):z.tuple(n),typeof e.minItems==`number`&&(r=r.check(z.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(z.maxLength(e.maxItems)))}else if(i!==void 0){let n=Tp(i,t),a=z.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=z.array(z.any());break}default:throw Error(`Unsupported type: ${n}`)}return e.description&&(r=r.describe(e.description)),e.default!==void 0&&(r=r.default(e.default)),r}function Tp(e,t){if(typeof e==`boolean`)return e?z.any():z.never();let n=wp(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>Tp(e,t)),a=z.union(i);n=r?z.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>Tp(e,t)),a=z.xor(i);n=r?z.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:z.any();else{let i=r?n:Tp(e.allOf[0],t),a=r?0:1;for(let n=a;n<e.allOf.length;n++)i=z.intersection(i,Tp(e.allOf[n],t));n=i}e.nullable===!0&&t.version===`openapi-3.0`&&(n=z.nullable(n)),e.readOnly===!0&&(n=z.readonly(n));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))xp.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),n}function Ep(e,t){return typeof e==`boolean`?e?z.any():z.never():Tp(e,{version:Sp(e,t?.defaultTarget),defs:e.$defs||e.definitions||{},refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Uo})}var Dp=t({bigint:()=>jp,boolean:()=>Ap,date:()=>Mp,number:()=>kp,string:()=>Op});function Op(e){return Go(xu,e)}function kp(e){return xs(_d,e)}function Ap(e){return Os(wd,e)}function jp(e){return As(Ed,e)}function Mp(e){return Vs(Gd,e)}var Np=t({$brand:()=>i,$input:()=>Bo,$output:()=>zo,NEVER:()=>n,TimePrecision:()=>hs,ZodAny:()=>Ld,ZodArray:()=>qd,ZodBase64:()=>id,ZodBase64URL:()=>od,ZodBigInt:()=>Ed,ZodBigIntFormat:()=>Od,ZodBoolean:()=>wd,ZodCIDRv4:()=>ed,ZodCIDRv6:()=>nd,ZodCUID:()=>Ru,ZodCUID2:()=>Bu,ZodCatch:()=>Hf,ZodCodec:()=>Jf,ZodCustom:()=>op,ZodCustomStringFormat:()=>fd,ZodDate:()=>Gd,ZodDefault:()=>Pf,ZodDiscriminatedUnion:()=>rf,ZodE164:()=>cd,ZodEmail:()=>Su,ZodEmoji:()=>Pu,ZodEnum:()=>vf,ZodError:()=>au,ZodExactOptional:()=>kf,ZodFile:()=>Cf,ZodFirstPartyTypeKind:()=>bp,ZodFunction:()=>ip,ZodGUID:()=>wu,ZodIPv4:()=>Ju,ZodIPv6:()=>Qu,ZodISODate:()=>Ql,ZodISODateTime:()=>Xl,ZodISODuration:()=>nu,ZodISOTime:()=>eu,ZodIntersection:()=>of,ZodIssueCode:()=>_p,ZodJWT:()=>ud,ZodKSUID:()=>Ku,ZodLazy:()=>ep,ZodLiteral:()=>xf,ZodMAC:()=>Xu,ZodMap:()=>mf,ZodNaN:()=>Wf,ZodNanoID:()=>Iu,ZodNever:()=>Vd,ZodNonOptional:()=>Rf,ZodNull:()=>Fd,ZodNullable:()=>jf,ZodNumber:()=>_d,ZodNumberFormat:()=>vd,ZodObject:()=>Xd,ZodOptional:()=>Df,ZodPipe:()=>Kf,ZodPrefault:()=>If,ZodPromise:()=>np,ZodReadonly:()=>Xf,ZodRealError:()=>ou,ZodRecord:()=>uf,ZodSet:()=>gf,ZodString:()=>xu,ZodStringFormat:()=>I,ZodSuccess:()=>Bf,ZodSymbol:()=>jd,ZodTemplateLiteral:()=>Qf,ZodTransform:()=>Tf,ZodTuple:()=>cf,ZodType:()=>P,ZodULID:()=>Hu,ZodURL:()=>ju,ZodUUID:()=>Eu,ZodUndefined:()=>Nd,ZodUnion:()=>$d,ZodUnknown:()=>zd,ZodVoid:()=>Ud,ZodXID:()=>Wu,ZodXor:()=>tf,_ZodString:()=>bu,_default:()=>Ff,_function:()=>ap,any:()=>Rd,array:()=>Jd,base64:()=>ad,base64url:()=>sd,bigint:()=>Dd,boolean:()=>Td,catch:()=>Uf,check:()=>sp,cidrv4:()=>td,cidrv6:()=>rd,clone:()=>ge,codec:()=>Yf,coerce:()=>Dp,config:()=>c,core:()=>ql,cuid:()=>zu,cuid2:()=>Vu,custom:()=>cp,date:()=>Kd,decode:()=>fu,decodeAsync:()=>mu,describe:()=>dp,discriminatedUnion:()=>af,e164:()=>ld,email:()=>Cu,emoji:()=>Fu,encode:()=>du,encodeAsync:()=>pu,endsWith:()=>lc,enum:()=>yf,exactOptional:()=>Af,file:()=>wf,flattenError:()=>Ke,float32:()=>bd,float64:()=>xd,formatError:()=>qe,fromJSONSchema:()=>Ep,function:()=>ap,getErrorMap:()=>yp,globalRegistry:()=>Uo,gt:()=>Gs,gte:()=>Ks,guid:()=>Tu,hash:()=>gd,hex:()=>hd,hostname:()=>md,httpUrl:()=>Nu,includes:()=>sc,instanceof:()=>pp,int:()=>yd,int32:()=>Sd,int64:()=>kd,intersection:()=>sf,ipv4:()=>Yu,ipv6:()=>$u,iso:()=>Yl,json:()=>hp,jwt:()=>dd,keyof:()=>Yd,ksuid:()=>qu,lazy:()=>tp,length:()=>rc,literal:()=>Sf,locales:()=>Lo,looseObject:()=>Qd,looseRecord:()=>pf,lowercase:()=>ac,lt:()=>Us,lte:()=>Ws,mac:()=>Zu,map:()=>hf,maxLength:()=>tc,maxSize:()=>Qs,meta:()=>fp,mime:()=>dc,minLength:()=>nc,minSize:()=>$s,multipleOf:()=>Zs,nan:()=>Gf,nanoid:()=>Lu,nativeEnum:()=>bf,negative:()=>Js,never:()=>Hd,nonnegative:()=>Xs,nonoptional:()=>zf,nonpositive:()=>Ys,normalize:()=>pc,null:()=>Id,nullable:()=>Mf,nullish:()=>Nf,number:()=>L,object:()=>Zd,optional:()=>Of,overwrite:()=>fc,parse:()=>su,parseAsync:()=>cu,partialRecord:()=>ff,pipe:()=>qf,positive:()=>qs,prefault:()=>Lf,preprocess:()=>gp,prettifyError:()=>Xe,promise:()=>rp,property:()=>uc,readonly:()=>Zf,record:()=>df,refine:()=>lp,regex:()=>ic,regexes:()=>xt,registry:()=>Ho,safeDecode:()=>gu,safeDecodeAsync:()=>vu,safeEncode:()=>hu,safeEncodeAsync:()=>_u,safeParse:()=>lu,safeParseAsync:()=>uu,set:()=>_f,setErrorMap:()=>vp,size:()=>ec,slugify:()=>_c,startsWith:()=>cc,strictObject:()=>R,string:()=>F,stringFormat:()=>pd,stringbool:()=>mp,success:()=>Vf,superRefine:()=>up,symbol:()=>Md,templateLiteral:()=>$f,toJSONSchema:()=>Wl,toLowerCase:()=>hc,toUpperCase:()=>gc,transform:()=>Ef,treeifyError:()=>Je,trim:()=>mc,tuple:()=>lf,uint32:()=>Cd,uint64:()=>Ad,ulid:()=>Uu,undefined:()=>Pd,union:()=>ef,unknown:()=>Bd,uppercase:()=>oc,url:()=>Mu,util:()=>l,uuid:()=>Du,uuidv4:()=>Ou,uuidv6:()=>ku,uuidv7:()=>Au,void:()=>Wd,xid:()=>Gu,xor:()=>nf});c(oa());var Pp=Np,Fp=Pp.strictObject({route:Pp.string(),directoryPath:Pp.string(),spaFallback:Pp.boolean().optional()}),Ip=ef([Sf(`error`),Sf(`info`),Sf(`warning`)]),Lp=R({timestamp:F(),type:Ip,message:F(),req:R({method:F().optional(),url:F().optional(),ip:F().optional(),userAgent:F().optional()}).optional(),details:R({fullMessage:F().optional(),sql:F().optional(),bind:Bd().optional(),environment:df(F(),F()).optional()}).optional()}),Rp=R({size:L(),hits:L(),misses:L()}),zp=R({procedureName:Rp,argument:Rp}),Bp=R({totalRequests:L(),totalTimeouts:L(),totalRequestsEnqueued:L().optional(),totalRequestsDequeued:L().optional(),totalRequestsFailed:L().optional()}),Vp=R({name:F(),connectionsInUse:L(),connectionsOpen:L(),stats:Bp.nullable(),cache:zp.optional()}),Hp=R({requestCount:L(),errorCount:L(),avgResponseTime:L(),minResponseTime:L(),maxResponseTime:L(),maxRequestsPerSecond:L()}),Up=R({timestamp:L(),requests:L(),errors:L(),durationMin:L(),durationMax:L(),durationAvg:L(),durationP95:L(),durationP99:L(),system:R({cpu:L(),heapUsed:L(),heapTotal:L(),rss:L(),external:L()}),pools:Jd(R({name:F(),connectionsInUse:L(),connectionsOpen:L(),cache:zp.optional()}))}),Wp=R({route:F(),user:F().optional(),password:F().optional(),connectString:F().optional(),defaultPage:F().optional(),pathAlias:F().optional(),pathAliasProcedure:F().optional(),documentTable:F().optional(),exclusionList:Jd(F()).optional(),requestValidationFunction:F().optional(),transactionMode:Bd().optional(),errorStyle:F().optional(),directoryPath:F().optional(),hasAuth:Td().optional(),hasTransactionMode:Td().optional(),hasCgi:Td().optional()}),Gp=R({port:L(),adminRoute:F().optional(),adminUser:F().optional(),adminPassword:F().optional(),loggerFilename:F(),uploadFileSizeLimit:L().optional(),routePlSql:Jd(Wp),routeStatic:Jd(Fp)}),Kp=R({nodeVersion:F(),platform:F(),arch:F(),cpuCores:L().optional(),memory:R({rss:L(),heapTotal:L(),heapUsed:L(),external:L(),totalMemory:L().optional(),rssMax:L().optional(),heapTotalMax:L().optional(),heapUsedMax:L().optional(),externalMax:L().optional()}),cpu:R({user:L(),system:L(),max:L().optional(),userMax:L().optional(),systemMax:L().optional()})}),qp=R({version:F(),status:yf([`running`,`paused`,`stopped`]),uptime:L(),startTime:F(),intervalMs:L().optional(),metrics:Hp,history:Jd(Up).optional(),pools:Jd(Vp),system:Kp,config:Gp.partial().nullable().optional()}),Jp=ef([Jd(F()),R({message:F()})]),Yp=R({id:F(),timestamp:F(),source:F(),url:F(),method:F(),status:F(),duration:L(),procedure:F().optional(),parameters:df(F(),Rd()).optional(),uploads:Jd(Rd()).optional(),downloads:R({fileType:F(),fileSize:L()}).optional(),html:F().optional(),cookies:df(F(),F()).optional(),headers:df(F(),F()).optional(),cgi:df(F(),F()).optional(),error:F().optional()});function Xp(e,t,n){let r=t.safeParse(e);if(!r.success)throw Error(`Validation failed for ${n}: ${r.error.message}`);return r.data}async function Zp(e,t,n=2,r=500){for(let i=0;i<=n;i++)try{return await fetch(e,t)}catch(e){if(i===n)throw e;await new Promise(e=>setTimeout(e,r))}throw Error(`Unreachable`)}var Qp={async getStatus(e=!1,t=!1){let n=await Zp(`api/status?history=${e}&config=${t}`);if(!n.ok)throw Error(`GET api/status failed: ${n.statusText}`);return Xp(await n.json(),qp,`api/status`)},async getStatsHistory(e=100){let t=await Zp(`api/stats/history?${new URLSearchParams({limit:e.toString()}).toString()}`);if(!t.ok)throw Error(`GET api/stats/history failed: ${t.statusText}`);return Xp(await t.json(),Jd(Up),`api/stats/history`)},async getErrorLogs(e=100,t=``){let n=await Zp(`api/logs/error?${new URLSearchParams({limit:e.toString(),filter:t}).toString()}`);if(!n.ok)throw Error(`GET api/logs/error failed: ${n.statusText}`);return Xp(await n.json(),Jd(Lp),`api/logs/error`)},async getAccessLogs(e=100,t=``){let n=await Zp(`api/logs/access?${new URLSearchParams({limit:e.toString(),filter:t}).toString()}`);if(!n.ok)throw Error(`GET api/logs/access failed: ${n.statusText}`);return Xp(await n.json(),Jp,`api/logs/access`)},async getTraceLogs(e=100,t=``){let n=await Zp(`api/trace/logs?${new URLSearchParams({limit:e.toString(),filter:t}).toString()}`);if(!n.ok)throw Error(`GET api/trace/logs failed: ${n.statusText}`);return Xp(await n.json(),Jd(Yp),`api/trace/logs`)},async getTraceStatus(){let e=await Zp(`api/trace/status`);if(!e.ok)throw Error(`GET api/trace/status failed: ${e.statusText}`);return await e.json()},async toggleTrace(e){let t=await Zp(`api/trace/toggle`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:e})});if(!t.ok)throw Error(`POST api/trace/toggle failed: ${t.statusText}`);return await t.json()},async clearTraces(){let e=await Zp(`api/trace/clear`,{method:`POST`});if(!e.ok)throw Error(`POST api/trace/clear failed: ${e.statusText}`)},async post(e,t={}){let n=await Zp(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(`POST ${e} failed: ${n.statusText}`)}};function $p(e){return e+.5|0}var em=(e,t,n)=>Math.max(Math.min(e,n),t);function tm(e){return em($p(e*2.55),0,255)}function nm(e){return em($p(e*255),0,255)}function rm(e){return em($p(e/2.55)/100,0,1)}function im(e){return em($p(e*100),0,100)}var am={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},om=[...`0123456789ABCDEF`],sm=e=>om[e&15],cm=e=>om[(e&240)>>4]+om[e&15],lm=e=>(e&240)>>4==(e&15),um=e=>lm(e.r)&&lm(e.g)&&lm(e.b)&&lm(e.a);function dm(e){var t=e.length,n;return e[0]===`#`&&(t===4||t===5?n={r:255&am[e[1]]*17,g:255&am[e[2]]*17,b:255&am[e[3]]*17,a:t===5?am[e[4]]*17:255}:(t===7||t===9)&&(n={r:am[e[1]]<<4|am[e[2]],g:am[e[3]]<<4|am[e[4]],b:am[e[5]]<<4|am[e[6]],a:t===9?am[e[7]]<<4|am[e[8]]:255})),n}var fm=(e,t)=>e<255?t(e):``;function pm(e){var t=um(e)?sm:cm;return e?`#`+t(e.r)+t(e.g)+t(e.b)+fm(e.a,t):void 0}var mm=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function hm(e,t,n){let r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function gm(e,t,n){let r=(r,i=(r+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function _m(e,t,n){let r=hm(e,1,.5),i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function vm(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function ym(e){let t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s,c,l;return i!==a&&(l=i-a,c=o>.5?l/(2-i-a):l/(i+a),s=vm(t,n,r,l,i),s=s*60+.5),[s|0,c||0,o]}function bm(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(nm)}function xm(e,t,n){return bm(hm,e,t,n)}function Sm(e,t,n){return bm(_m,e,t,n)}function Cm(e,t,n){return bm(gm,e,t,n)}function wm(e){return(e%360+360)%360}function Tm(e){let t=mm.exec(e),n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?tm(+t[5]):nm(+t[5]));let i=wm(+t[2]),a=t[3]/100,o=t[4]/100;return r=t[1]===`hwb`?Sm(i,a,o):t[1]===`hsv`?Cm(i,a,o):xm(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function Em(e,t){var n=ym(e);n[0]=wm(n[0]+t),n=xm(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Dm(e){if(!e)return;let t=ym(e),n=t[0],r=im(t[1]),i=im(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${rm(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}var Om={x:`dark`,Z:`light`,Y:`re`,X:`blu`,W:`gr`,V:`medium`,U:`slate`,A:`ee`,T:`ol`,S:`or`,B:`ra`,C:`lateg`,D:`ights`,R:`in`,Q:`turquois`,E:`hi`,P:`ro`,O:`al`,N:`le`,M:`de`,L:`yello`,F:`en`,K:`ch`,G:`arks`,H:`ea`,I:`ightg`,J:`wh`},km={OiceXe:`f0f8ff`,antiquewEte:`faebd7`,aqua:`ffff`,aquamarRe:`7fffd4`,azuY:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`0`,blanKedOmond:`ffebcd`,Xe:`ff`,XeviTet:`8a2be2`,bPwn:`a52a2a`,burlywood:`deb887`,caMtXe:`5f9ea0`,KartYuse:`7fff00`,KocTate:`d2691e`,cSO:`ff7f50`,cSnflowerXe:`6495ed`,cSnsilk:`fff8dc`,crimson:`dc143c`,cyan:`ffff`,xXe:`8b`,xcyan:`8b8b`,xgTMnPd:`b8860b`,xWay:`a9a9a9`,xgYF:`6400`,xgYy:`a9a9a9`,xkhaki:`bdb76b`,xmagFta:`8b008b`,xTivegYF:`556b2f`,xSange:`ff8c00`,xScEd:`9932cc`,xYd:`8b0000`,xsOmon:`e9967a`,xsHgYF:`8fbc8f`,xUXe:`483d8b`,xUWay:`2f4f4f`,xUgYy:`2f4f4f`,xQe:`ced1`,xviTet:`9400d3`,dAppRk:`ff1493`,dApskyXe:`bfff`,dimWay:`696969`,dimgYy:`696969`,dodgerXe:`1e90ff`,fiYbrick:`b22222`,flSOwEte:`fffaf0`,foYstWAn:`228b22`,fuKsia:`ff00ff`,gaRsbSo:`dcdcdc`,ghostwEte:`f8f8ff`,gTd:`ffd700`,gTMnPd:`daa520`,Way:`808080`,gYF:`8000`,gYFLw:`adff2f`,gYy:`808080`,honeyMw:`f0fff0`,hotpRk:`ff69b4`,RdianYd:`cd5c5c`,Rdigo:`4b0082`,ivSy:`fffff0`,khaki:`f0e68c`,lavFMr:`e6e6fa`,lavFMrXsh:`fff0f5`,lawngYF:`7cfc00`,NmoncEffon:`fffacd`,ZXe:`add8e6`,ZcSO:`f08080`,Zcyan:`e0ffff`,ZgTMnPdLw:`fafad2`,ZWay:`d3d3d3`,ZgYF:`90ee90`,ZgYy:`d3d3d3`,ZpRk:`ffb6c1`,ZsOmon:`ffa07a`,ZsHgYF:`20b2aa`,ZskyXe:`87cefa`,ZUWay:`778899`,ZUgYy:`778899`,ZstAlXe:`b0c4de`,ZLw:`ffffe0`,lime:`ff00`,limegYF:`32cd32`,lRF:`faf0e6`,magFta:`ff00ff`,maPon:`800000`,VaquamarRe:`66cdaa`,VXe:`cd`,VScEd:`ba55d3`,VpurpN:`9370db`,VsHgYF:`3cb371`,VUXe:`7b68ee`,VsprRggYF:`fa9a`,VQe:`48d1cc`,VviTetYd:`c71585`,midnightXe:`191970`,mRtcYam:`f5fffa`,mistyPse:`ffe4e1`,moccasR:`ffe4b5`,navajowEte:`ffdead`,navy:`80`,Tdlace:`fdf5e6`,Tive:`808000`,TivedBb:`6b8e23`,Sange:`ffa500`,SangeYd:`ff4500`,ScEd:`da70d6`,pOegTMnPd:`eee8aa`,pOegYF:`98fb98`,pOeQe:`afeeee`,pOeviTetYd:`db7093`,papayawEp:`ffefd5`,pHKpuff:`ffdab9`,peru:`cd853f`,pRk:`ffc0cb`,plum:`dda0dd`,powMrXe:`b0e0e6`,purpN:`800080`,YbeccapurpN:`663399`,Yd:`ff0000`,Psybrown:`bc8f8f`,PyOXe:`4169e1`,saddNbPwn:`8b4513`,sOmon:`fa8072`,sandybPwn:`f4a460`,sHgYF:`2e8b57`,sHshell:`fff5ee`,siFna:`a0522d`,silver:`c0c0c0`,skyXe:`87ceeb`,UXe:`6a5acd`,UWay:`708090`,UgYy:`708090`,snow:`fffafa`,sprRggYF:`ff7f`,stAlXe:`4682b4`,tan:`d2b48c`,teO:`8080`,tEstN:`d8bfd8`,tomato:`ff6347`,Qe:`40e0d0`,viTet:`ee82ee`,JHt:`f5deb3`,wEte:`ffffff`,wEtesmoke:`f5f5f5`,Lw:`ffff00`,LwgYF:`9acd32`};function Am(){let e={},t=Object.keys(km),n=Object.keys(Om),r,i,a,o,s;for(r=0;r<t.length;r++){for(o=s=t[r],i=0;i<n.length;i++)a=n[i],s=s.replace(a,Om[a]);a=parseInt(km[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}var jm;function Mm(e){jm||(jm=Am(),jm.transparent=[0,0,0,0]);let t=jm[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var Nm=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Pm(e){let t=Nm.exec(e),n=255,r,i,a;if(t){if(t[7]!==r){let e=+t[7];n=t[8]?tm(e):em(e*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?tm(r):em(r,0,255)),i=255&(t[4]?tm(i):em(i,0,255)),a=255&(t[6]?tm(a):em(a,0,255)),{r,g:i,b:a,a:n}}}function Fm(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${rm(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var Im=e=>e<=.0031308?e*12.92:e**(1/2.4)*1.055-.055,Lm=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function Rm(e,t,n){let r=Lm(rm(e.r)),i=Lm(rm(e.g)),a=Lm(rm(e.b));return{r:nm(Im(r+n*(Lm(rm(t.r))-r))),g:nm(Im(i+n*(Lm(rm(t.g))-i))),b:nm(Im(a+n*(Lm(rm(t.b))-a))),a:e.a+n*(t.a-e.a)}}function zm(e,t,n){if(e){let r=ym(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=xm(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Bm(e,t){return e&&Object.assign(t||{},e)}function Vm(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=nm(e[3]))):(t=Bm(e,{r:0,g:0,b:0,a:1}),t.a=nm(t.a)),t}function Hm(e){return e.charAt(0)===`r`?Pm(e):Tm(e)}var Um=class e{constructor(t){if(t instanceof e)return t;let n=typeof t,r;n===`object`?r=Vm(t):n===`string`&&(r=dm(t)||Mm(t)||Hm(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=Bm(this._rgb);return e&&(e.a=rm(e.a)),e}set rgb(e){this._rgb=Vm(e)}rgbString(){return this._valid?Fm(this._rgb):void 0}hexString(){return this._valid?pm(this._rgb):void 0}hslString(){return this._valid?Dm(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,r=e.rgb,i,a=t===i?.5:t,o=2*a-1,s=n.a-r.a,c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2;i=1-c,n.r=255&c*n.r+i*r.r+.5,n.g=255&c*n.g+i*r.g+.5,n.b=255&c*n.b+i*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=Rm(this._rgb,e._rgb,t)),this}clone(){return new e(this.rgb)}alpha(e){return this._rgb.a=nm(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb;return e.r=e.g=e.b=$p(e.r*.3+e.g*.59+e.b*.11),this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return zm(this._rgb,2,e),this}darken(e){return zm(this._rgb,2,-e),this}saturate(e){return zm(this._rgb,1,e),this}desaturate(e){return zm(this._rgb,1,-e),this}rotate(e){return Em(this._rgb,e),this}};function Wm(){}var Gm=(()=>{let e=0;return()=>e++})();function B(e){return e==null}function V(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return t.slice(0,7)===`[object`&&t.slice(-6)===`Array]`}function H(e){return e!==null&&Object.prototype.toString.call(e)===`[object Object]`}function U(e){return(typeof e==`number`||e instanceof Number)&&isFinite(+e)}function Km(e,t){return U(e)?e:t}function W(e,t){return e===void 0?t:e}var qm=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100:+e/t,Jm=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100*t:+e;function G(e,t,n){if(e&&typeof e.call==`function`)return e.apply(n,t)}function K(e,t,n,r){let i,a,o;if(V(e))if(a=e.length,r)for(i=a-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<a;i++)t.call(n,e[i],i);else if(H(e))for(o=Object.keys(e),a=o.length,i=0;i<a;i++)t.call(n,e[o[i]],o[i])}function Ym(e,t){let n,r,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],a=t[n],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function Xm(e){if(V(e))return e.map(Xm);if(H(e)){let t=Object.create(null),n=Object.keys(e),r=n.length,i=0;for(;i<r;++i)t[n[i]]=Xm(e[n[i]]);return t}return e}function Zm(e){return[`__proto__`,`prototype`,`constructor`].indexOf(e)===-1}function Qm(e,t,n,r){if(!Zm(e))return;let i=t[e],a=n[e];H(i)&&H(a)?$m(i,a,r):t[e]=Xm(a)}function $m(e,t,n){let r=V(t)?t:[t],i=r.length;if(!H(e))return e;n||={};let a=n.merger||Qm,o;for(let t=0;t<i;++t){if(o=r[t],!H(o))continue;let i=Object.keys(o);for(let t=0,r=i.length;t<r;++t)a(i[t],e,o,n)}return e}function eh(e,t){return $m(e,t,{merger:th})}function th(e,t,n){if(!Zm(e))return;let r=t[e],i=n[e];H(r)&&H(i)?eh(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Xm(i))}var nh={"":e=>e,x:e=>e.x,y:e=>e.y};function rh(e){let t=e.split(`.`),n=[],r=``;for(let e of t)r+=e,r.endsWith(`\\`)?r=r.slice(0,-1)+`.`:(n.push(r),r=``);return n}function ih(e){let t=rh(e);return e=>{for(let n of t){if(n===``)break;e&&=e[n]}return e}}function ah(e,t){return(nh[t]||(nh[t]=ih(t)))(e)}function oh(e){return e.charAt(0).toUpperCase()+e.slice(1)}var sh=e=>e!==void 0,ch=e=>typeof e==`function`,lh=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};function uh(e){return e.type===`mouseup`||e.type===`click`||e.type===`contextmenu`}var q=Math.PI,J=2*q,dh=J+q,fh=1/0,ph=q/180,Y=q/2,mh=q/4,hh=q*2/3,gh=Math.log10,_h=Math.sign;function vh(e,t,n){return Math.abs(e-t)<n}function yh(e){let t=Math.round(e);e=vh(e,t,e/1e3)?t:e;let n=10**Math.floor(gh(e)),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function bh(e){let t=[],n=Math.sqrt(e),r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((e,t)=>e-t).pop(),t}function xh(e){return typeof e==`symbol`||typeof e==`object`&&!!e&&!(Symbol.toPrimitive in e||`toString`in e||`valueOf`in e)}function Sh(e){return!xh(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function Ch(e,t){let n=Math.round(e);return n-t<=e&&n+t>=e}function wh(e,t,n){let r,i,a;for(r=0,i=e.length;r<i;r++)a=e[r][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Th(e){return q/180*e}function Eh(e){return 180/q*e}function Dh(e){if(!U(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function Oh(e,t){let n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a<-.5*q&&(a+=J),{angle:a,distance:i}}function kh(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function Ah(e,t){return(e-t+dh)%J-q}function jh(e){return(e%J+J)%J}function Mh(e,t,n,r){let i=jh(e),a=jh(t),o=jh(n),s=jh(a-i),c=jh(o-i),l=jh(i-a),u=jh(i-o);return i===a||i===o||r&&a===o||s>c&&l<u}function Nh(e,t,n){return Math.max(t,Math.min(n,e))}function Ph(e){return Nh(e,-32768,32767)}function Fh(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Ih(e,t,n){n||=(n=>e[n]<t);let r=e.length-1,i=0,a;for(;r-i>1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}var Lh=(e,t,n,r)=>Ih(e,n,r?r=>{let i=e[r][t];return i<n||i===n&&e[r+1][t]===n}:r=>e[r][t]<n),Rh=(e,t,n)=>Ih(e,n,r=>e[r][t]>=n);function zh(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}var Bh=[`push`,`pop`,`shift`,`splice`,`unshift`];function Vh(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,`_chartjs`,{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Bh.forEach(t=>{let n=`_onData`+oh(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){let i=r.apply(this,t);return e._chartjs.listeners.forEach(e=>{typeof e[n]==`function`&&e[n](...t)}),i}})})}function Hh(e,t){let n=e._chartjs;if(!n)return;let r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(Bh.forEach(t=>{delete e[t]}),delete e._chartjs)}function Uh(e){let t=new Set(e);return t.size===e.length?e:Array.from(t)}var Wh=function(){return typeof window>`u`?function(e){return e()}:window.requestAnimationFrame}();function Gh(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Wh.call(window,()=>{r=!1,e.apply(t,n)}))}}function Kh(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}var qh=e=>e===`start`?`left`:e===`end`?`right`:`center`,Jh=(e,t,n)=>e===`start`?t:e===`end`?n:(t+n)/2,Yh=(e,t,n,r)=>e===(r?`left`:`right`)?n:e===`center`?(t+n)/2:t;function Xh(e,t,n){let r=t.length,i=0,a=r;if(e._sorted){let{iScale:o,vScale:s,_parsed:c}=e,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:d,max:f,minDefined:p,maxDefined:m}=o.getUserBounds();if(p){if(i=Math.min(Lh(c,u,d).lo,n?r:Lh(t,u,o.getPixelForValue(d)).lo),l){let e=c.slice(0,i+1).reverse().findIndex(e=>!B(e[s.axis]));i-=Math.max(0,e)}i=Nh(i,0,r-1)}if(m){let e=Math.max(Lh(c,o.axis,f,!0).hi+1,n?0:Lh(t,u,o.getPixelForValue(f),!0).hi+1);if(l){let t=c.slice(e-1).findIndex(e=>!B(e[s.axis]));e+=Math.max(0,t)}a=Nh(e,i,r)-i}else a=r-i}return{start:i,count:a}}function Zh(e){let{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;let a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}var Qh=e=>e===0||e===1,$h=(e,t,n)=>-(2**(10*--e)*Math.sin((e-t)*J/n)),eg=(e,t,n)=>2**(-10*e)*Math.sin((e-t)*J/n)+1,tg={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-(--e*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>--e*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Y)+1,easeOutSine:e=>Math.sin(e*Y),easeInOutSine:e=>-.5*(Math.cos(q*e)-1),easeInExpo:e=>e===0?0:2**(10*(e-1)),easeOutExpo:e=>e===1?1:-(2**(-10*e))+1,easeInOutExpo:e=>Qh(e)?e:e<.5?.5*2**(10*(e*2-1)):.5*(-(2**(-10*(e*2-1)))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1- --e*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Qh(e)?e:$h(e,.075,.3),easeOutElastic:e=>Qh(e)?e:eg(e,.075,.3),easeInOutElastic(e){let t=.1125,n=.45;return Qh(e)?e:e<.5?.5*$h(e*2,t,n):.5+.5*eg(e*2-1,t,n)},easeInBack(e){let t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){let t=1.70158;return--e*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-tg.easeOutBounce(1-e),easeOutBounce(e){let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?tg.easeInBounce(e*2)*.5:tg.easeOutBounce(e*2-1)*.5+.5};function ng(e){if(e&&typeof e==`object`){let t=e.toString();return t===`[object CanvasPattern]`||t===`[object CanvasGradient]`}return!1}function rg(e){return ng(e)?e:new Um(e)}function ig(e){return ng(e)?e:new Um(e).saturate(.5).darken(.1).hexString()}var ag=[`x`,`y`,`borderWidth`,`radius`,`tension`],og=[`color`,`borderColor`,`backgroundColor`];function sg(e){e.set(`animation`,{delay:void 0,duration:1e3,easing:`easeOutQuart`,fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe(`animation`,{_fallback:!1,_indexable:!1,_scriptable:e=>e!==`onProgress`&&e!==`onComplete`&&e!==`fn`}),e.set(`animations`,{colors:{type:`color`,properties:og},numbers:{type:`number`,properties:ag}}),e.describe(`animations`,{_fallback:`animation`}),e.set(`transitions`,{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:`transparent`},visible:{type:`boolean`,duration:0}}},hide:{animations:{colors:{to:`transparent`},visible:{type:`boolean`,easing:`linear`,fn:e=>e|0}}}})}function cg(e){e.set(`layout`,{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var lg=new Map;function ug(e,t){t||={};let n=e+JSON.stringify(t),r=lg.get(n);return r||(r=new Intl.NumberFormat(e,t),lg.set(n,r)),r}function dg(e,t,n){return ug(t,n).format(e)}var fg={values(e){return V(e)?e:``+e},numeric(e,t,n){if(e===0)return`0`;let r=this.chart.options.locale,i,a=e;if(n.length>1){let t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>0x38d7ea4c68000)&&(i=`scientific`),a=pg(e,n)}let o=gh(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),dg(e,r,c)},logarithmic(e,t,n){if(e===0)return`0`;let r=n[t].significand||e/10**Math.floor(gh(e));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?fg.numeric.call(this,e,t,n):``}};function pg(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var mg={formatters:fg};function hg(e){e.set(`scale`,{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:`ticks`,clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:``,padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:``,padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:mg.formatters.values,minor:{},major:{},align:`center`,crossAlign:`near`,showLabelBackdrop:!1,backdropColor:`rgba(255, 255, 255, 0.75)`,backdropPadding:2}}),e.route(`scale.ticks`,`color`,``,`color`),e.route(`scale.grid`,`color`,``,`borderColor`),e.route(`scale.border`,`color`,``,`borderColor`),e.route(`scale.title`,`color`,``,`color`),e.describe(`scale`,{_fallback:!1,_scriptable:e=>!e.startsWith(`before`)&&!e.startsWith(`after`)&&e!==`callback`&&e!==`parser`,_indexable:e=>e!==`borderDash`&&e!==`tickBorderDash`&&e!==`dash`}),e.describe(`scales`,{_fallback:`scale`}),e.describe(`scale.ticks`,{_scriptable:e=>e!==`backdropPadding`&&e!==`callback`,_indexable:e=>e!==`backdropPadding`})}var gg=Object.create(null),_g=Object.create(null);function vg(e,t){if(!t)return e;let n=t.split(`.`);for(let t=0,r=n.length;t<r;++t){let r=n[t];e=e[r]||(e[r]=Object.create(null))}return e}function yg(e,t,n){return typeof t==`string`?$m(vg(e,t),n):$m(vg(e,``),t)}var X=new class{constructor(e,t){this.animation=void 0,this.backgroundColor=`rgba(0,0,0,0.1)`,this.borderColor=`rgba(0,0,0,0.1)`,this.color=`#666`,this.datasets={},this.devicePixelRatio=e=>e.chart.platform.getDevicePixelRatio(),this.elements={},this.events=[`mousemove`,`mouseout`,`click`,`touchstart`,`touchmove`],this.font={family:`'Helvetica Neue', 'Helvetica', 'Arial', sans-serif`,size:12,style:`normal`,lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>ig(t.backgroundColor),this.hoverBorderColor=(e,t)=>ig(t.borderColor),this.hoverColor=(e,t)=>ig(t.color),this.indexAxis=`x`,this.interaction={mode:`nearest`,intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return yg(this,e,t)}get(e){return vg(this,e)}describe(e,t){return yg(_g,e,t)}override(e,t){return yg(gg,e,t)}route(e,t,n,r){let i=vg(this,e),a=vg(this,n),o=`_`+t;Object.defineProperties(i,{[o]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){let e=this[o],t=a[r];return H(e)?Object.assign({},t,e):W(e,t)},set(e){this[o]=e}}})}apply(e){e.forEach(e=>e(this))}}({_scriptable:e=>!e.startsWith(`on`),_indexable:e=>e!==`events`,hover:{_fallback:`interaction`},interaction:{_scriptable:!1,_indexable:!1}},[sg,cg,hg]);function bg(e){return!e||B(e.size)||B(e.family)?null:(e.style?e.style+` `:``)+(e.weight?e.weight+` `:``)+e.size+`px `+e.family}function xg(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function Sg(e,t,n,r){r||={};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0,s=n.length,c,l,u,d,f;for(c=0;c<s;c++)if(d=n[c],d!=null&&!V(d))o=xg(e,i,a,o,d);else if(V(d))for(l=0,u=d.length;l<u;l++)f=d[l],f!=null&&!V(f)&&(o=xg(e,i,a,o,f));e.restore();let p=a.length/2;if(p>n.length){for(c=0;c<p;c++)delete i[a[c]];a.splice(0,p)}return o}function Cg(e,t,n){let r=e.currentDevicePixelRatio,i=n===0?0:Math.max(n/2,.5);return Math.round((t-i)*r)/r+i}function wg(e,t){!t&&!e||(t||=e.getContext(`2d`),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Tg(e,t,n,r){Eg(e,t,n,r,null)}function Eg(e,t,n,r,i){let a,o,s,c,l,u,d,f,p=t.pointStyle,m=t.rotation,h=t.radius,g=(m||0)*ph;if(p&&typeof p==`object`&&(a=p.toString(),a===`[object HTMLImageElement]`||a===`[object HTMLCanvasElement]`)){e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(h)||h<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,r,i/2,h,0,0,J):e.arc(n,r,h,0,J),e.closePath();break;case`triangle`:u=i?i/2:h,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=hh,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=hh,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),e.closePath();break;case`rectRounded`:l=h*.516,c=h-l,o=Math.cos(g+mh)*c,d=Math.cos(g+mh)*(i?i/2-l:c),s=Math.sin(g+mh)*c,f=Math.sin(g+mh)*(i?i/2-l:c),e.arc(n-d,r-s,l,g-q,g-Y),e.arc(n+f,r-o,l,g-Y,g),e.arc(n+d,r+s,l,g,g+Y),e.arc(n-f,r+o,l,g+Y,g+q),e.closePath();break;case`rect`:if(!m){c=Math.SQRT1_2*h,u=i?i/2:c,e.rect(n-u,r-c,2*u,2*c);break}g+=mh;case`rectRot`:d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+f,r-o),e.lineTo(n+d,r+s),e.lineTo(n-f,r+o),e.closePath();break;case`crossRot`:g+=mh;case`cross`:d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case`star`:d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),g+=mh,d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case`line`:o=i?i/2:Math.cos(g)*h,s=Math.sin(g)*h,e.moveTo(n-o,r-s),e.lineTo(n+o,r+s);break;case`dash`:e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(i?i/2:h),r+Math.sin(g)*h);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Dg(e,t,n){return n||=.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Og(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function kg(e){e.restore()}function Ag(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i===`middle`){let r=(t.x+n.x)/2;e.lineTo(r,t.y),e.lineTo(r,n.y)}else i===`after`==!!r?e.lineTo(n.x,t.y):e.lineTo(t.x,n.y);e.lineTo(n.x,n.y)}function jg(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Mg(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),B(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Ng(e,t,n,r,i){if(i.strikethrough||i.underline){let a=e.measureText(r),o=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,c=n-a.actualBoundingBoxAscent,l=n+a.actualBoundingBoxDescent,u=i.strikethrough?(c+l)/2:l;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(s,u),e.stroke()}}function Pg(e,t){let n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Fg(e,t,n,r,i,a={}){let o=V(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!==``,c,l;for(e.save(),e.font=i.string,Mg(e,a),c=0;c<o.length;++c)l=o[c],a.backdrop&&Pg(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),B(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(l,n,r,a.maxWidth)),e.fillText(l,n,r,a.maxWidth),Ng(e,n,r,l,a),r+=Number(i.lineHeight);e.restore()}function Ig(e,t){let{x:n,y:r,w:i,h:a,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*q,q,!0),e.lineTo(n,r+a-o.bottomLeft),e.arc(n+o.bottomLeft,r+a-o.bottomLeft,o.bottomLeft,q,Y,!0),e.lineTo(n+i-o.bottomRight,r+a),e.arc(n+i-o.bottomRight,r+a-o.bottomRight,o.bottomRight,Y,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-Y,!0),e.lineTo(n+o.topLeft,r)}var Lg=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Rg=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function zg(e,t){let n=(``+e).match(Lg);if(!n||n[1]===`normal`)return t*1.2;switch(e=+n[2],n[3]){case`px`:return e;case`%`:e/=100;break}return t*e}var Bg=e=>+e||0;function Vg(e,t){let n={},r=H(t),i=r?Object.keys(t):t,a=H(e)?r?n=>W(e[n],e[t[n]]):t=>e[t]:()=>e;for(let e of i)n[e]=Bg(a(e));return n}function Hg(e){return Vg(e,{top:`y`,right:`x`,bottom:`y`,left:`x`})}function Ug(e){return Vg(e,[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])}function Wg(e){let t=Hg(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Z(e,t){e||={},t||=X.font;let n=W(e.size,t.size);typeof n==`string`&&(n=parseInt(n,10));let r=W(e.style,t.style);r&&!(``+r).match(Rg)&&(console.warn(`Invalid font style specified: "`+r+`"`),r=void 0);let i={family:W(e.family,t.family),lineHeight:zg(W(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:W(e.weight,t.weight),string:``};return i.string=bg(i),i}function Gg(e,t,n,r){let i=!0,a,o,s;for(a=0,o=e.length;a<o;++a)if(s=e[a],s!==void 0&&(t!==void 0&&typeof s==`function`&&(s=s(t),i=!1),n!==void 0&&V(s)&&(s=s[n%s.length],i=!1),s!==void 0))return r&&!i&&(r.cacheable=!1),s}function Kg(e,t,n){let{min:r,max:i}=e,a=Jm(t,(i-r)/2),o=(e,t)=>n&&e===0?0:e+t;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function qg(e,t){return Object.assign(Object.create(e),t)}function Jg(e,t=[``],n,r,i=()=>e[0]){let a=n||e;return r===void 0&&(r=u_(`_fallback`,e)),new Proxy({[Symbol.toStringTag]:`Object`,_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:n=>Jg([n,...e],t,a,r)},{deleteProperty(t,n){return delete t[n],delete t._keys,delete e[0][n],!0},get(n,r){return $g(n,r,()=>l_(r,t,e,n))},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(e,t){return d_(e).includes(t)},ownKeys(e){return d_(e)},set(e,t,n){let r=e._storage||=i();return e[t]=r[t]=n,delete e._keys,!0}})}function Yg(e,t,n,r){let i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Xg(e,r),setContext:t=>Yg(e,t,n,r),override:i=>Yg(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty(t,n){return delete t[n],delete e[n],!0},get(e,t,n){return $g(e,t,()=>e_(e,t,n))},getOwnPropertyDescriptor(t,n){return t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(t,n){return Reflect.has(e,n)},ownKeys(){return Reflect.ownKeys(e)},set(t,n,r){return e[n]=r,delete t[n],!0}})}function Xg(e,t={scriptable:!0,indexable:!0}){let{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:ch(n)?n:()=>n,isIndexable:ch(r)?r:()=>r}}var Zg=(e,t)=>e?e+oh(t):t,Qg=(e,t)=>H(t)&&e!==`adapters`&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function $g(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t===`constructor`)return e[t];let r=n();return e[t]=r,r}function e_(e,t,n){let{_proxy:r,_context:i,_subProxy:a,_descriptors:o}=e,s=r[t];return ch(s)&&o.isScriptable(t)&&(s=t_(t,s,e,n)),V(s)&&s.length&&(s=n_(t,s,e,o.isIndexable)),Qg(t,s)&&(s=Yg(s,i,a&&a[t],o)),s}function t_(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw Error(`Recursion detected: `+Array.from(s).join(`->`)+`->`+e);s.add(e);let c=t(a,o||r);return s.delete(e),Qg(e,c)&&(c=o_(i._scopes,i,e,c)),c}function n_(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=n;if(a.index!==void 0&&r(e))return t[a.index%t.length];if(H(t[0])){let n=t,r=i._scopes.filter(e=>e!==n);t=[];for(let c of n){let n=o_(r,i,e,c);t.push(Yg(n,a,o&&o[e],s))}}return t}function r_(e,t,n){return ch(e)?e(t,n):e}var i_=(e,t)=>e===!0?t:typeof e==`string`?ah(t,e):void 0;function a_(e,t,n,r,i){for(let a of t){let t=i_(n,a);if(t){e.add(t);let a=r_(t._fallback,n,i);if(a!==void 0&&a!==n&&a!==r)return a}else if(t===!1&&r!==void 0&&n!==r)return null}return!1}function o_(e,t,n,r){let i=t._rootScopes,a=r_(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let c=s_(s,o,n,a||n,r);return c===null||a!==void 0&&a!==n&&(c=s_(s,o,a,c,r),c===null)?!1:Jg(Array.from(s),[``],i,a,()=>c_(t,n,r))}function s_(e,t,n,r,i){for(;n;)n=a_(e,t,n,r,i);return n}function c_(e,t,n){let r=e._getTarget();t in r||(r[t]={});let i=r[t];return V(i)&&H(n)?n:i||{}}function l_(e,t,n,r){let i;for(let a of t)if(i=u_(Zg(a,e),n),i!==void 0)return Qg(e,i)?o_(n,r,e,i):i}function u_(e,t){for(let n of t){if(!n)continue;let t=n[e];if(t!==void 0)return t}}function d_(e){let t=e._keys;return t||=e._keys=f_(e._scopes),t}function f_(e){let t=new Set;for(let n of e)for(let e of Object.keys(n).filter(e=>!e.startsWith(`_`)))t.add(e);return Array.from(t)}var p_=2**-52||1e-14,m_=(e,t)=>t<e.length&&!e[t].skip&&e[t],h_=e=>e===`x`?`y`:`x`;function g_(e,t,n,r){let i=e.skip?t:e,a=t,o=n.skip?t:n,s=kh(a,i),c=kh(o,a),l=s/(s+c),u=c/(s+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;let d=r*l,f=r*u;return{previous:{x:a.x-d*(o.x-i.x),y:a.y-d*(o.y-i.y)},next:{x:a.x+f*(o.x-i.x),y:a.y+f*(o.y-i.y)}}}function __(e,t,n){let r=e.length,i,a,o,s,c,l=m_(e,0);for(let u=0;u<r-1;++u)if(c=l,l=m_(e,u+1),!(!c||!l)){if(vh(t[u],0,p_)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],a=n[u+1]/t[u],s=i**2+a**2,!(s<=9)&&(o=3/Math.sqrt(s),n[u]=i*o*t[u],n[u+1]=a*o*t[u])}}function v_(e,t,n=`x`){let r=h_(n),i=e.length,a,o,s,c=m_(e,0);for(let l=0;l<i;++l){if(o=s,s=c,c=m_(e,l+1),!s)continue;let i=s[n],u=s[r];o&&(a=(i-o[n])/3,s[`cp1${n}`]=i-a,s[`cp1${r}`]=u-a*t[l]),c&&(a=(c[n]-i)/3,s[`cp2${n}`]=i+a,s[`cp2${r}`]=u+a*t[l])}}function y_(e,t=`x`){let n=h_(t),r=e.length,i=Array(r).fill(0),a=Array(r),o,s,c,l=m_(e,0);for(o=0;o<r;++o)if(s=c,c=l,l=m_(e,o+1),c){if(l){let e=l[t]-c[t];i[o]=e===0?0:(l[n]-c[n])/e}a[o]=s?l?_h(i[o-1])===_h(i[o])?(i[o-1]+i[o])/2:0:i[o-1]:i[o]}__(e,i,a),v_(e,a,t)}function b_(e,t,n){return Math.max(Math.min(e,n),t)}function x_(e,t){let n,r,i,a,o,s=Dg(e[0],t);for(n=0,r=e.length;n<r;++n)o=a,a=s,s=n<r-1&&Dg(e[n+1],t),a&&(i=e[n],o&&(i.cp1x=b_(i.cp1x,t.left,t.right),i.cp1y=b_(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=b_(i.cp2x,t.left,t.right),i.cp2y=b_(i.cp2y,t.top,t.bottom)))}function S_(e,t,n,r,i){let a,o,s,c;if(t.spanGaps&&(e=e.filter(e=>!e.skip)),t.cubicInterpolationMode===`monotone`)y_(e,i);else{let n=r?e[e.length-1]:e[0];for(a=0,o=e.length;a<o;++a)s=e[a],c=g_(n,s,e[Math.min(a+1,o-(r?0:1))%o],t.tension),s.cp1x=c.previous.x,s.cp1y=c.previous.y,s.cp2x=c.next.x,s.cp2y=c.next.y,n=s}t.capBezierPoints&&x_(e,n)}function C_(){return typeof window<`u`&&typeof document<`u`}function w_(e){let t=e.parentNode;return t&&t.toString()===`[object ShadowRoot]`&&(t=t.host),t}function T_(e,t,n){let r;return typeof e==`string`?(r=parseInt(e,10),e.indexOf(`%`)!==-1&&(r=r/100*t.parentNode[n])):r=e,r}var E_=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function D_(e,t){return E_(e).getPropertyValue(t)}var O_=[`top`,`right`,`bottom`,`left`];function k_(e,t,n){let r={};n=n?`-`+n:``;for(let i=0;i<4;i++){let a=O_[i];r[a]=parseFloat(e[t+`-`+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}var A_=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function j_(e,t){let n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r,o=!1,s,c;if(A_(i,a,e.target))s=i,c=a;else{let e=t.getBoundingClientRect();s=r.clientX-e.left,c=r.clientY-e.top,o=!0}return{x:s,y:c,box:o}}function M_(e,t){if(`native`in e)return e;let{canvas:n,currentDevicePixelRatio:r}=t,i=E_(n),a=i.boxSizing===`border-box`,o=k_(i,`padding`),s=k_(i,`border`,`width`),{x:c,y:l,box:u}=j_(e,n),d=o.left+(u&&s.left),f=o.top+(u&&s.top),{width:p,height:m}=t;return a&&(p-=o.width+s.width,m-=o.height+s.height),{x:Math.round((c-d)/p*n.width/r),y:Math.round((l-f)/m*n.height/r)}}function N_(e,t,n){let r,i;if(t===void 0||n===void 0){let a=e&&w_(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{let e=a.getBoundingClientRect(),o=E_(a),s=k_(o,`border`,`width`),c=k_(o,`padding`);t=e.width-c.width-s.width,n=e.height-c.height-s.height,r=T_(o.maxWidth,a,`clientWidth`),i=T_(o.maxHeight,a,`clientHeight`)}}return{width:t,height:n,maxWidth:r||fh,maxHeight:i||fh}}var P_=e=>Math.round(e*10)/10;function F_(e,t,n,r){let i=E_(e),a=k_(i,`margin`),o=T_(i.maxWidth,e,`clientWidth`)||fh,s=T_(i.maxHeight,e,`clientHeight`)||fh,c=N_(e,t,n),{width:l,height:u}=c;if(i.boxSizing===`content-box`){let e=k_(i,`border`,`width`),t=k_(i,`padding`);l-=t.width+e.width,u-=t.height+e.height}return l=Math.max(0,l-a.width),u=Math.max(0,r?l/r:u-a.height),l=P_(Math.min(l,o,c.maxWidth)),u=P_(Math.min(u,s,c.maxHeight)),l&&!u&&(u=P_(l/2)),(t!==void 0||n!==void 0)&&r&&c.height&&u>c.height&&(u=c.height,l=P_(Math.floor(u*r))),{width:l,height:u}}function I_(e,t,n){let r=t||1,i=P_(e.height*r),a=P_(e.width*r);e.height=P_(e.height),e.width=P_(e.width);let o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}var L_=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};C_()&&(window.addEventListener(`test`,null,t),window.removeEventListener(`test`,null,t))}catch{}return e}();function R_(e,t){let n=D_(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function z_(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function B_(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r===`middle`?n<.5?e.y:t.y:r===`after`?n<1?e.y:t.y:n>0?t.y:e.y}}function V_(e,t,n,r){let i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=z_(e,i,n),s=z_(i,a,n),c=z_(a,t,n);return z_(z_(o,s,n),z_(s,c,n),n)}var H_=function(e,t){return{x(n){return e+e+t-n},setWidth(e){t=e},textAlign(e){return e===`center`?e:e===`right`?`left`:`right`},xPlus(e,t){return e-t},leftForLtr(e,t){return e-t}}},U_=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function W_(e,t,n){return e?H_(t,n):U_()}function G_(e,t){let n,r;(t===`ltr`||t===`rtl`)&&(n=e.canvas.style,r=[n.getPropertyValue(`direction`),n.getPropertyPriority(`direction`)],n.setProperty(`direction`,t,`important`),e.prevTextDirection=r)}function K_(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty(`direction`,t[0],t[1]))}function q_(e){return e===`angle`?{between:Mh,compare:Ah,normalize:jh}:{between:Fh,compare:(e,t)=>e-t,normalize:e=>e}}function J_({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function Y_(e,t,n){let{property:r,start:i,end:a}=n,{between:o,normalize:s}=q_(r),c=t.length,{start:l,end:u,loop:d}=e,f,p;if(d){for(l+=c,u+=c,f=0,p=c;f<p&&o(s(t[l%c][r]),i,a);++f)l--,u--;l%=c,u%=c}return u<l&&(u+=c),{start:l,end:u,loop:d,style:e.style}}function X_(e,t,n){if(!n)return[e];let{property:r,start:i,end:a}=n,o=t.length,{compare:s,between:c,normalize:l}=q_(r),{start:u,end:d,loop:f,style:p}=Y_(e,t,n),m=[],h=!1,g=null,_,v,y,b=()=>c(i,y,_)&&s(i,y)!==0,x=()=>s(a,_)===0||c(a,y,_),S=()=>h||b(),C=()=>!h||x();for(let e=u,n=u;e<=d;++e)v=t[e%o],!v.skip&&(_=l(v[r]),_!==y&&(h=c(_,i,a),g===null&&S()&&(g=s(_,i)===0?e:n),g!==null&&C()&&(m.push(J_({start:g,end:e,loop:f,count:o,style:p})),g=null),n=e,y=_));return g!==null&&m.push(J_({start:g,end:d,loop:f,count:o,style:p})),m}function Z_(e,t){let n=[],r=e.segments;for(let i=0;i<r.length;i++){let a=X_(r[i],e.points,t);a.length&&n.push(...a)}return n}function Q_(e,t,n,r){let i=0,a=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(a+=i);a>i&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function $_(e,t,n,r){let i=e.length,a=[],o=t,s=e[t],c;for(c=t+1;c<=n;++c){let n=e[c%i];n.skip||n.stop?s.skip||(r=!1,a.push({start:t%i,end:(c-1)%i,loop:r}),t=o=n.stop?c:null):(o=c,s.skip&&(t=c)),s=n}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function ev(e,t){let n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];let a=!!e._loop,{start:o,end:s}=Q_(n,i,a,r);return r===!0?tv(e,[{start:o,end:s,loop:a}],n,t):tv(e,$_(n,o,s<o?s+i:s,!!e._fullLoop&&o===0&&s===i-1),n,t)}function tv(e,t,n,r){return!r||!r.setContext||!n?t:nv(e,t,n,r)}function nv(e,t,n,r){let i=e._chart.getContext(),a=rv(e.options),{_datasetIndex:o,options:{spanGaps:s}}=e,c=n.length,l=[],u=a,d=t[0].start,f=d;function p(e,t,r,i){let a=s?-1:1;if(e!==t){for(e+=c;n[e%c].skip;)e-=a;for(;n[t%c].skip;)t+=a;e%c!==t%c&&(l.push({start:e%c,end:t%c,loop:r,style:i}),u=i,d=t%c)}}for(let e of t){d=s?d:e.start;let t=n[d%c],a;for(f=d+1;f<=e.end;f++){let s=n[f%c];a=rv(r.setContext(qg(i,{type:`segment`,p0:t,p1:s,p0DataIndex:(f-1)%c,p1DataIndex:f%c,datasetIndex:o}))),iv(a,u)&&p(d,f-1,e.loop,u),t=s,u=a}d<f-1&&p(d,f-1,e.loop,u)}return l}function rv(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function iv(e,t){if(!t)return!1;let n=[],r=function(e,t){return ng(t)?(n.includes(t)||n.push(t),n.indexOf(t)):t};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function av(e,t,n){return e.options.clip?e[n]:t[n]}function ov(e,t){let{xScale:n,yScale:r}=e;return n&&r?{left:av(n,t,`left`),right:av(n,t,`right`),top:av(r,t,`top`),bottom:av(r,t,`bottom`)}:t}function sv(e,t){let n=t._clip;if(n.disabled)return!1;let r=ov(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}var cv=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){let i=t.listeners[r],a=t.duration;i.forEach(r=>r({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}))}_refresh(){this._request||=(this._running=!0,Wh.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let i=n.items,a=i.length-1,o=!1,s;for(;a>=0;--a)s=i[a],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(e),o=!0):(i[a]=i[i.length-1],i.pop());o&&(r.draw(),this._notify(r,n,e,`progress`)),i.length||(n.running=!1,this._notify(r,n,e,`complete`),n.initial=!1),t+=i.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),`complete`)}remove(e){return this._charts.delete(e)}},lv=`transparent`,uv={boolean(e,t,n){return n>.5?t:e},color(e,t,n){let r=rg(e||lv),i=r.valid&&rg(t||lv);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}},dv=class{constructor(e,t,n,r){let i=t[n];r=Gg([e.to,r,i,e.from]);let a=Gg([e.from,i,r]);this._active=!0,this._fn=e.fn||uv[e.type||typeof a],this._easing=tg[e.easing]||tg.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let r=this._target[this._prop],i=n-this._start,a=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=Gg([e.to,t,r,e.from]),this._from=Gg([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,r=this._prop,i=this._from,a=this._loop,o=this._to,s;if(this._active=i!==o&&(a||t<n),!this._active){this._target[r]=o,this._notify(!0);return}if(t<0){this._target[r]=i;return}s=t/n%2,s=a&&s>1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(i,o,s)}wait(){let e=this._promises||=[];return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?`res`:`rej`,n=this._promises||[];for(let e=0;e<n.length;e++)n[e][t]()}},fv=class{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!H(e))return;let t=Object.keys(X.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{let i=e[r];if(!H(i))return;let a={};for(let e of t)a[e]=i[e];(V(i.properties)&&i.properties||[r]).forEach(e=>{(e===r||!n.has(e))&&n.set(e,a)})})}_animateOptions(e,t){let n=t.options,r=mv(e,n);if(!r)return[];let i=this._createAnimations(r,n);return n.$shared&&pv(e.options.$animations,n).then(()=>{e.options=n},()=>{}),i}_createAnimations(e,t){let n=this._properties,r=[],i=e.$animations||={},a=Object.keys(t),o=Date.now(),s;for(s=a.length-1;s>=0;--s){let c=a[s];if(c.charAt(0)===`$`)continue;if(c===`options`){r.push(...this._animateOptions(e,t));continue}let l=t[c],u=i[c],d=n.get(c);if(u)if(d&&u.active()){u.update(d,l,o);continue}else u.cancel();if(!d||!d.duration){e[c]=l;continue}i[c]=u=new dv(d,e,c,l),r.push(u)}return r}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return cv.add(this._chart,n),!0}};function pv(e,t){let n=[],r=Object.keys(t);for(let t=0;t<r.length;t++){let i=e[r[t]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function mv(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function hv(e,t){let n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function gv(e,t,n){if(n===!1)return!1;let r=hv(e,n),i=hv(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function _v(e){let t,n,r,i;return H(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function vv(e,t){let n=[],r=e._getSortedDatasetMetas(t),i,a;for(i=0,a=r.length;i<a;++i)n.push(r[i].index);return n}function yv(e,t,n,r={}){let i=e.keys,a=r.mode===`single`,o,s,c,l;if(t===null)return;let u=!1;for(o=0,s=i.length;o<s;++o){if(c=+i[o],c===n){if(u=!0,r.all)continue;break}l=e.values[c],U(l)&&(a||t===0||_h(t)===_h(l))&&(t+=l)}return!u&&!r.all?0:t}function bv(e,t){let{iScale:n,vScale:r}=t,i=n.axis===`x`?`x`:`y`,a=r.axis===`x`?`x`:`y`,o=Object.keys(e),s=Array(o.length),c,l,u;for(c=0,l=o.length;c<l;++c)u=o[c],s[c]={[i]:u,[a]:e[u]};return s}function xv(e,t){let n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Sv(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Cv(e){let{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:-1/0,max:i?n:1/0}}function wv(e,t,n){let r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Tv(e,t,n,r){for(let i of t.getMatchingVisibleMetas(r).reverse()){let t=e[i.index];if(n&&t>0||!n&&t<0)return i.index}return null}function Ev(e,t){let{chart:n,_cachedMeta:r}=e,i=n._stacks||={},{iScale:a,vScale:o,index:s}=r,c=a.axis,l=o.axis,u=Sv(a,o,r),d=t.length,f;for(let e=0;e<d;++e){let n=t[e],{[c]:a,[l]:d}=n,p=n._stacks||={};f=p[l]=wv(i,u,a),f[s]=d,f._top=Tv(f,o,!0,r.type),f._bottom=Tv(f,o,!1,r.type);let m=f._visualValues||={};m[s]=d}}function Dv(e,t){let n=e.scales;return Object.keys(n).filter(e=>n[e].axis===t).shift()}function Ov(e,t){return qg(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:`default`,type:`dataset`})}function kv(e,t,n){return qg(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:`default`,type:`data`})}function Av(e,t){let n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t||=e._parsed;for(let e of t){let t=e._stacks;if(!t||t[r]===void 0||t[r][n]===void 0)return;delete t[r][n],t[r]._visualValues!==void 0&&t[r]._visualValues[n]!==void 0&&delete t[r]._visualValues[n]}}}var jv=e=>e===`reset`||e===`none`,Mv=(e,t)=>t?e:Object.assign({},e),Nv=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:vv(n,!0),values:null},Pv=class{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=xv(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled(`filler`)&&console.warn(`Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options`)}updateIndex(e){this.index!==e&&Av(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>e===`x`?t:e===`r`?r:n,i=t.xAxisID=W(n.xAxisID,Dv(e,`x`)),a=t.yAxisID=W(n.yAxisID,Dv(e,`y`)),o=t.rAxisID=W(n.rAxisID,Dv(e,`r`)),s=t.indexAxis,c=t.iAxisID=r(s,i,a,o),l=t.vAxisID=r(s,a,i,o);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(o),t.iScale=this.getScaleForId(c),t.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update(`reset`)}_destroy(){let e=this._cachedMeta;this._data&&Hh(this._data,this),e._stacked&&Av(e)}_dataCheck(){let e=this.getDataset(),t=e.data||=[],n=this._data;if(H(t)){let e=this._cachedMeta;this._data=bv(t,e)}else if(n!==t){if(n){Hh(n,this);let e=this._cachedMeta;Av(e),e._parsed=[]}t&&Object.isExtensible(t)&&Vh(t,this),this._syncList=[],this._data=t}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let t=this._cachedMeta,n=this.getDataset(),r=!1;this._dataCheck();let i=t._stacked;t._stacked=xv(t.vScale,t),t.stack!==n.stack&&(r=!0,Av(t),t.stack=n.stack),this._resyncElements(e),(r||i!==t._stacked)&&(Ev(this,t._parsed),t._stacked=xv(t.vScale,t))}configure(){let e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){let{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:a}=n,o=i.axis,s=e===0&&t===r.length?!0:n._sorted,c=e>0&&n._parsed[e-1],l,u,d;if(this._parsing===!1)n._parsed=r,n._sorted=!0,d=r;else{d=V(r[e])?this.parseArrayData(n,r,e,t):H(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);let i=()=>u[o]===null||c&&u[o]<c[o];for(l=0;l<t;++l)n._parsed[l+e]=u=d[l],s&&(i()&&(s=!1),c=u);n._sorted=s}a&&Ev(this,d)}parsePrimitiveData(e,t,n,r){let{iScale:i,vScale:a}=e,o=i.axis,s=a.axis,c=i.getLabels(),l=i===a,u=Array(r),d,f,p;for(d=0,f=r;d<f;++d)p=d+n,u[d]={[o]:l||i.parse(c[p],p),[s]:a.parse(t[p],p)};return u}parseArrayData(e,t,n,r){let{xScale:i,yScale:a}=e,o=Array(r),s,c,l,u;for(s=0,c=r;s<c;++s)l=s+n,u=t[l],o[s]={x:i.parse(u[0],l),y:a.parse(u[1],l)};return o}parseObjectData(e,t,n,r){let{xScale:i,yScale:a}=e,{xAxisKey:o=`x`,yAxisKey:s=`y`}=this._parsing,c=Array(r),l,u,d,f;for(l=0,u=r;l<u;++l)d=l+n,f=t[d],c[l]={x:i.parse(ah(f,o),d),y:a.parse(ah(f,s),d)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,n){let r=this.chart,i=this._cachedMeta,a=t[e.axis];return yv({keys:vv(r,!0),values:t._stacks[e.axis]._visualValues},a,i.index,{mode:n})}updateRangeFromParsed(e,t,n,r){let i=n[t.axis],a=i===null?NaN:i,o=r&&n._stacks[t.axis];r&&o&&(r.values=o,a=yv(r,i,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,t){let n=this._cachedMeta,r=n._parsed,i=n._sorted&&e===n.iScale,a=r.length,o=this._getOtherScale(e),s=Nv(t,n,this.chart),c={min:1/0,max:-1/0},{min:l,max:u}=Cv(o),d,f;function p(){f=r[d];let t=f[o.axis];return!U(f[e.axis])||l>t||u<t}for(d=0;d<a&&!(!p()&&(this.updateRangeFromParsed(c,e,f,s),i));++d);if(i){for(d=a-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(c,e,f,s);break}}return c}getAllParsedValues(e){let t=this._cachedMeta._parsed,n=[],r,i,a;for(r=0,i=t.length;r<i;++r)a=t[r][e.axis],U(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(e){let t=this._cachedMeta,n=t.iScale,r=t.vScale,i=this.getParsed(e);return{label:n?``+n.getLabelForValue(i[n.axis]):``,value:r?``+r.getLabelForValue(i[r.axis]):``}}_update(e){let t=this._cachedMeta;this.update(e||`default`),t._clip=_v(W(this.options.clip,gv(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){let e=this._ctx,t=this.chart,n=this._cachedMeta,r=n.data||[],i=t.chartArea,a=[],o=this._drawStart||0,s=this._drawCount||r.length-o,c=this.options.drawActiveElementsOnTop,l;for(n.dataset&&n.dataset.draw(e,i,o,s),l=o;l<o+s;++l){let t=r[l];t.hidden||(t.active&&c?a.push(t):t.draw(e,i))}for(l=0;l<a.length;++l)a[l].draw(e,i)}getStyle(e,t){let n=t?`active`:`default`;return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,t,n){let r=this.getDataset(),i;if(e>=0&&e<this._cachedMeta.data.length){let t=this._cachedMeta.data[e];i=t.$context||=kv(this.getContext(),e,t),i.parsed=this.getParsed(e),i.raw=r.data[e],i.index=i.dataIndex=e}else i=this.$context||=Ov(this.chart.getContext(),this.index),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!t,i.mode=n,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t=`default`,n){let r=t===`active`,i=this._cachedDataOpts,a=e+`-`+t,o=i[a],s=this.enableOptionSharing&&sh(n);if(o)return Mv(o,s);let c=this.chart.config,l=c.datasetElementScopeKeys(this._type,e),u=r?[`${e}Hover`,`hover`,e,``]:[e,``],d=c.getOptionScopes(this.getDataset(),l),f=Object.keys(X.elements[e]),p=c.resolveNamedOptions(d,f,()=>this.getContext(n,r,t),u);return p.$shared&&(p.$shared=s,i[a]=Object.freeze(Mv(p,s))),p}_resolveAnimations(e,t,n){let r=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,o=i[a];if(o)return o;let s;if(r.options.animation!==!1){let r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),i);s=r.createResolver(a,this.getContext(e,n,t))}let c=new fv(r,s&&s.animations);return s&&s._cacheable&&(i[a]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||=Object.assign({},e)}includeOptions(e,t){return!t||jv(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){let n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),a=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:a}}updateElement(e,t,n,r){jv(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!jv(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;let i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,`active`,!1)}setHoverStyle(e,t,n){this._setStyle(e,n,`active`,!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!0)}_resyncElements(e){let t=this._data,n=this._cachedMeta.data;for(let[e,t,n]of this._syncList)this[e](t,n);this._syncList=[];let r=n.length,i=t.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i<r&&this._removeElements(i,r-i)}_insertElements(e,t,n=!0){let r=this._cachedMeta,i=r.data,a=e+t,o,s=e=>{for(e.length+=t,o=e.length-1;o>=a;o--)e[o]=e[o-t]};for(s(i),o=e;o<a;++o)i[o]=new this.dataElementType;this._parsing&&s(r._parsed),this.parse(e,t),n&&this.updateElements(i,e,t,`reset`)}updateElements(e,t,n,r){}_removeElements(e,t){let n=this._cachedMeta;if(this._parsing){let r=n._parsed.splice(e,t);n._stacked&&Av(n,r)}n.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{let[t,n,r]=e;this[t](n,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){let e=arguments.length;this._sync([`_insertElements`,this.getDataset().data.length-e,e])}_onDataPop(){this._sync([`_removeElements`,this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync([`_removeElements`,0,1])}_onDataSplice(e,t){t&&this._sync([`_removeElements`,e,t]);let n=arguments.length-2;n&&this._sync([`_insertElements`,e,n])}_onDataUnshift(){this._sync([`_insertElements`,0,arguments.length])}};function Fv(e,t,n){let r=1,i=1,a=0,o=0;if(t<J){let s=e,c=s+t,l=Math.cos(s),u=Math.sin(s),d=Math.cos(c),f=Math.sin(c),p=(e,t,r)=>Mh(e,s,c,!0)?1:Math.max(t,t*n,r,r*n),m=(e,t,r)=>Mh(e,s,c,!0)?-1:Math.min(t,t*n,r,r*n),h=p(0,l,d),g=p(Y,u,f),_=m(q,l,d),v=m(q+Y,u,f);r=(h-_)/2,i=(g-v)/2,a=-(h+_)/2,o=-(g+v)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:o}}var Iv=class extends Pv{static id=`doughnut`;static defaults={datasetElementType:!1,dataElementType:`arc`,animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:`number`,properties:[`circumference`,`endAngle`,`innerRadius`,`outerRadius`,`startAngle`,`x`,`y`,`offset`,`borderWidth`,`spacing`]}},cutout:`50%`,rotation:0,circumference:360,radius:`100%`,spacing:0,indexAxis:`r`};static descriptors={_scriptable:e=>e!==`spacing`,_indexable:e=>e!==`spacing`&&!e.startsWith(`borderDash`)&&!e.startsWith(`hoverBorderDash`)};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data,{labels:{pointStyle:n,textAlign:r,color:i,useBorderRadius:a,borderRadius:o}}=e.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((t,s)=>{let c=e.getDatasetMeta(0).controller.getStyle(s);return{text:t,fillStyle:c.backgroundColor,fontColor:i,hidden:!e.getDataVisibility(s),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:r,pointStyle:n,borderRadius:a&&(o||c.borderRadius),index:s}}):[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){let n=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=n;else{let i=e=>+n[e];if(H(n[e])){let{key:e=`value`}=this._parsing;i=t=>+ah(n[t],e)}let a,o;for(a=e,o=e+t;a<o;++a)r._parsed[a]=i(a)}}_getRotation(){return Th(this.options.rotation-90)}_getCircumference(){return Th(this.options.circumference)}_getRotationExtents(){let e=J,t=-J;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){let r=this.chart.getDatasetMeta(n).controller,i=r._getRotation(),a=r._getCircumference();e=Math.min(e,i),t=Math.max(t,i+a)}return{rotation:e,circumference:t-e}}update(e){let{chartArea:t}=this.chart,n=this._cachedMeta,r=n.data,i=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,a=Math.max((Math.min(t.width,t.height)-i)/2,0),o=Math.min(qm(this.options.cutout,a),1),s=this._getRingWeight(this.index),{circumference:c,rotation:l}=this._getRotationExtents(),{ratioX:u,ratioY:d,offsetX:f,offsetY:p}=Fv(l,c,o),m=(t.width-i)/u,h=(t.height-i)/d,g=Math.max(Math.min(m,h)/2,0),_=Jm(this.options.radius,g),v=(_-Math.max(_*o,0))/this._getVisibleDatasetWeightTotal();this.offsetX=f*_,this.offsetY=p*_,n.total=this.calculateTotal(),this.outerRadius=_-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*s,0),this.updateElements(r,0,r.length,e)}_circumference(e,t){let n=this.options,r=this._cachedMeta,i=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||r._parsed[e]===null||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*i/J)}updateElements(e,t,n,r){let i=r===`reset`,a=this.chart,o=a.chartArea,s=a.options.animation,c=(o.left+o.right)/2,l=(o.top+o.bottom)/2,u=i&&s.animateScale,d=u?0:this.innerRadius,f=u?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(t,r),h=this._getRotation(),g;for(g=0;g<t;++g)h+=this._circumference(g,i);for(g=t;g<t+n;++g){let t=this._circumference(g,i),n=e[g],a={x:c+this.offsetX,y:l+this.offsetY,startAngle:h,endAngle:h+t,circumference:t,outerRadius:f,innerRadius:d};m&&(a.options=p||this.resolveDataElementOptions(g,n.active?`active`:r)),h+=t,this.updateElement(n,g,a,r)}}calculateTotal(){let e=this._cachedMeta,t=e.data,n=0,r;for(r=0;r<t.length;r++){let i=e._parsed[r];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(r)&&!t[r].hidden&&(n+=Math.abs(i))}return n}calculateCircumference(e){let t=this._cachedMeta.total;return t>0&&!isNaN(e)?Math.abs(e)/t*J:0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=dg(t._parsed[e],n.options.locale);return{label:r[e]||``,value:i}}getMaxBorderWidth(e){let t=0,n=this.chart,r,i,a,o,s;if(!e){for(r=0,i=n.data.datasets.length;r<i;++r)if(n.isDatasetVisible(r)){a=n.getDatasetMeta(r),e=a.data,o=a.controller;break}}if(!e)return 0;for(r=0,i=e.length;r<i;++r)s=o.resolveDataElementOptions(r),s.borderAlign!==`inner`&&(t=Math.max(t,s.borderWidth||0,s.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let n=0,r=e.length;n<r;++n){let e=this.resolveDataElementOptions(n);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t}_getRingWeight(e){return Math.max(W(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}},Lv=class extends Pv{static id=`line`;static defaults={datasetElementType:`line`,dataElementType:`point`,showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:`category`},_value_:{type:`linear`}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){let t=this._cachedMeta,{dataset:n,data:r=[],_dataset:i}=t,a=this.chart._animationsDisabled,{start:o,count:s}=Xh(t,r,a);this._drawStart=o,this._drawCount=s,Zh(t)&&(o=0,s=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!i._decimated,n.points=r;let c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:c},e),this.updateElements(r,o,s,e)}updateElements(e,t,n,r){let i=r===`reset`,{iScale:a,vScale:o,_stacked:s,_dataset:c}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(t,r),d=a.axis,f=o.axis,{spanGaps:p,segment:m}=this.options,h=Sh(p)?p:1/0,g=this.chart._animationsDisabled||i||r===`none`,_=t+n,v=e.length,y=t>0&&this.getParsed(t-1);for(let n=0;n<v;++n){let p=e[n],v=g?p:{};if(n<t||n>=_){v.skip=!0;continue}let b=this.getParsed(n),x=B(b[f]),S=v[d]=a.getPixelForValue(b[d],n),C=v[f]=i||x?o.getBasePixel():o.getPixelForValue(s?this.applyStack(o,b,s):b[f],n);v.skip=isNaN(S)||isNaN(C)||x,v.stop=n>0&&Math.abs(b[d]-y[d])>h,m&&(v.parsed=b,v.raw=c.data[n]),u&&(v.options=l||this.resolveDataElementOptions(n,p.active?`active`:r)),g||this.updateElement(p,n,v,r),y=b}}getMaxOverflow(){let e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;let i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,a)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}},Rv=class extends Iv{static id=`pie`;static defaults={cutout:0,rotation:0,circumference:360,radius:`100%`}};function zv(){throw Error(`This method is not implemented: Check that a complete date adapter is provided.`)}var Bv={_date:class e{static override(t){Object.assign(e.prototype,t)}options;constructor(e){this.options=e||{}}init(){}formats(){return zv()}parse(){return zv()}format(){return zv()}add(){return zv()}diff(){return zv()}startOf(){return zv()}endOf(){return zv()}}};function Vv(e,t,n,r){let{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!==`r`&&o&&a.length){let o=s._reversePixels?Rh:Lh;if(!r){let r=o(a,t,n);if(c){let{vScale:t}=i._cachedMeta,{_parsed:n}=e,a=n.slice(0,r.lo+1).reverse().findIndex(e=>!B(e[t.axis]));r.lo-=Math.max(0,a);let o=n.slice(r.hi).findIndex(e=>!B(e[t.axis]));r.hi+=Math.max(0,o)}return r}else if(i._sharedOptions){let e=a[0],r=typeof e.getRange==`function`&&e.getRange(t);if(r){let e=o(a,t,n-r),i=o(a,t,n+r);return{lo:e.lo,hi:i.hi}}}}return{lo:0,hi:a.length-1}}function Hv(e,t,n,r,i){let a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let e=0,n=a.length;e<n;++e){let{index:n,data:s}=a[e],{lo:c,hi:l}=Vv(a[e],t,o,i);for(let e=c;e<=l;++e){let t=s[e];t.skip||r(t,n,e)}}}function Uv(e){let t=e.indexOf(`x`)!==-1,n=e.indexOf(`y`)!==-1;return function(e,r){let i=t?Math.abs(e.x-r.x):0,a=n?Math.abs(e.y-r.y):0;return Math.sqrt(i**2+a**2)}}function Wv(e,t,n,r,i){let a=[];return!i&&!e.isPointInArea(t)||Hv(e,n,t,function(n,o,s){!i&&!Dg(n,e.chartArea,0)||n.inRange(t.x,t.y,r)&&a.push({element:n,datasetIndex:o,index:s})},!0),a}function Gv(e,t,n,r){let i=[];function a(e,n,a){let{startAngle:o,endAngle:s}=e.getProps([`startAngle`,`endAngle`],r),{angle:c}=Oh(e,{x:t.x,y:t.y});Mh(c,o,s)&&i.push({element:e,datasetIndex:n,index:a})}return Hv(e,n,t,a),i}function Kv(e,t,n,r,i,a){let o=[],s=Uv(n),c=1/0;function l(n,l,u){let d=n.inRange(t.x,t.y,i);if(r&&!d)return;let f=n.getCenterPoint(i);if(!(a||e.isPointInArea(f))&&!d)return;let p=s(t,f);p<c?(o=[{element:n,datasetIndex:l,index:u}],c=p):p===c&&o.push({element:n,datasetIndex:l,index:u})}return Hv(e,n,t,l),o}function qv(e,t,n,r,i,a){return!a&&!e.isPointInArea(t)?[]:n===`r`&&!r?Gv(e,t,n,i):Kv(e,t,n,r,i,a)}function Jv(e,t,n,r,i){let a=[],o=n===`x`?`inXRange`:`inYRange`,s=!1;return Hv(e,n,t,(e,r,c)=>{e[o]&&e[o](t[n],i)&&(a.push({element:e,datasetIndex:r,index:c}),s||=e.inRange(t.x,t.y,i))}),r&&!s?[]:a}var Yv={evaluateInteractionItems:Hv,modes:{index(e,t,n,r){let i=M_(t,e),a=n.axis||`x`,o=n.includeInvisible||!1,s=n.intersect?Wv(e,i,a,r,o):qv(e,i,a,!1,r,o),c=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{let t=s[0].index,n=e.data[t];n&&!n.skip&&c.push({element:n,datasetIndex:e.index,index:t})}),c):[]},dataset(e,t,n,r){let i=M_(t,e),a=n.axis||`xy`,o=n.includeInvisible||!1,s=n.intersect?Wv(e,i,a,r,o):qv(e,i,a,!1,r,o);if(s.length>0){let t=s[0].datasetIndex,n=e.getDatasetMeta(t).data;s=[];for(let e=0;e<n.length;++e)s.push({element:n[e],datasetIndex:t,index:e})}return s},point(e,t,n,r){return Wv(e,M_(t,e),n.axis||`xy`,r,n.includeInvisible||!1)},nearest(e,t,n,r){let i=M_(t,e),a=n.axis||`xy`,o=n.includeInvisible||!1;return qv(e,i,a,n.intersect,r,o)},x(e,t,n,r){return Jv(e,M_(t,e),`x`,n.intersect,r)},y(e,t,n,r){return Jv(e,M_(t,e),`y`,n.intersect,r)}}},Xv=[`left`,`top`,`right`,`bottom`];function Zv(e,t){return e.filter(e=>e.pos===t)}function Qv(e,t){return e.filter(e=>Xv.indexOf(e.pos)===-1&&e.box.axis===t)}function $v(e,t){return e.sort((e,n)=>{let r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function ey(e){let t=[],n,r,i,a,o,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:a,options:{stack:o,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&a+o,stackWeight:s});return t}function ty(e){let t={};for(let n of e){let{stack:e,pos:r,stackWeight:i}=n;if(!e||!Xv.includes(r))continue;let a=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=i}return t}function ny(e,t){let n=ty(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t,a,o,s;for(a=0,o=e.length;a<o;++a){s=e[a];let{fullSize:o}=s.box,c=n[s.stack],l=c&&s.stackWeight/c.weight;s.horizontal?(s.width=l?l*r:o&&t.availableWidth,s.height=i):(s.width=r,s.height=l?l*i:o&&t.availableHeight)}return n}function ry(e){let t=ey(e),n=$v(t.filter(e=>e.box.fullSize),!0),r=$v(Zv(t,`left`),!0),i=$v(Zv(t,`right`)),a=$v(Zv(t,`top`),!0),o=$v(Zv(t,`bottom`)),s=Qv(t,`x`),c=Qv(t,`y`);return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(c).concat(o).concat(s),chartArea:Zv(t,`chartArea`),vertical:r.concat(i).concat(c),horizontal:a.concat(o).concat(s)}}function iy(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function ay(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function oy(e,t,n,r){let{pos:i,box:a}=n,o=e.maxPadding;if(!H(i)){n.size&&(e[i]-=n.size);let t=r[n.stack]||{size:0,count:1};t.size=Math.max(t.size,n.horizontal?a.height:a.width),n.size=t.size/t.count,e[i]+=n.size}a.getPadding&&ay(o,a.getPadding());let s=Math.max(0,t.outerWidth-iy(o,e,`left`,`right`)),c=Math.max(0,t.outerHeight-iy(o,e,`top`,`bottom`)),l=s!==e.w,u=c!==e.h;return e.w=s,e.h=c,n.horizontal?{same:l,other:u}:{same:u,other:l}}function sy(e){let t=e.maxPadding;function n(n){let r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n(`top`),e.x+=n(`left`),n(`right`),n(`bottom`)}function cy(e,t){let n=t.maxPadding;function r(e){let r={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{r[e]=Math.max(t[e],n[e])}),r}return r(e?[`left`,`right`]:[`top`,`bottom`])}function ly(e,t,n,r){let i=[],a,o,s,c,l,u;for(a=0,o=e.length,l=0;a<o;++a){s=e[a],c=s.box,c.update(s.width||t.w,s.height||t.h,cy(s.horizontal,t));let{same:o,other:d}=oy(t,n,s,r);l|=o&&i.length,u||=d,c.fullSize||i.push(s)}return l&&ly(i,t,n,r)||u}function uy(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function dy(e,t,n,r){let i=n.padding,{x:a,y:o}=t;for(let s of e){let e=s.box,c=r[s.stack]||{count:1,placed:0,weight:1},l=s.stackWeight/c.weight||1;if(s.horizontal){let r=t.w*l,a=c.size||e.height;sh(c.start)&&(o=c.start),e.fullSize?uy(e,i.left,o,n.outerWidth-i.right-i.left,a):uy(e,t.left+c.placed,o,r,a),c.start=o,c.placed+=r,o=e.bottom}else{let r=t.h*l,o=c.size||e.width;sh(c.start)&&(a=c.start),e.fullSize?uy(e,a,i.top,o,n.outerHeight-i.bottom-i.top):uy(e,a,t.top+c.placed,o,r),c.start=a,c.placed+=r,a=e.right}}t.x=a,t.y=o}var fy={addBox(e,t){e.boxes||=[],t.fullSize=t.fullSize||!1,t.position=t.position||`top`,t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){let n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;let i=Wg(e.options.layout.padding),a=Math.max(t-i.width,0),o=Math.max(n-i.height,0),s=ry(e.boxes),c=s.vertical,l=s.horizontal;K(e.boxes,e=>{typeof e.beforeLayout==`function`&&e.beforeLayout()});let u=c.reduce((e,t)=>t.box.options&&t.box.options.display===!1?e:e+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/u,hBoxMaxHeight:o/2}),f=Object.assign({},i);ay(f,Wg(r));let p=Object.assign({maxPadding:f,w:a,h:o,x:i.left,y:i.top},i),m=ny(c.concat(l),d);ly(s.fullSize,p,d,m),ly(c,p,d,m),ly(l,p,d,m)&&ly(c,p,d,m),sy(p),dy(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,dy(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},K(s.chartArea,t=>{let n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}},py=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n||=e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}},my=class extends py{acquireContext(e){return e&&e.getContext&&e.getContext(`2d`)||null}updateConfig(e){e.options.animation=!1}},hy=`$chartjs`,gy={touchstart:`mousedown`,touchmove:`mousemove`,touchend:`mouseup`,pointerenter:`mouseenter`,pointerdown:`mousedown`,pointermove:`mousemove`,pointerup:`mouseup`,pointerleave:`mouseout`,pointerout:`mouseout`},_y=e=>e===null||e===``;function vy(e,t){let n=e.style,r=e.getAttribute(`height`),i=e.getAttribute(`width`);if(e[hy]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||`block`,n.boxSizing=n.boxSizing||`border-box`,_y(i)){let t=R_(e,`width`);t!==void 0&&(e.width=t)}if(_y(r))if(e.style.height===``)e.height=e.width/(t||2);else{let t=R_(e,`height`);t!==void 0&&(e.height=t)}return e}var yy=L_?{passive:!0}:!1;function by(e,t,n){e&&e.addEventListener(t,n,yy)}function xy(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,yy)}function Sy(e,t){let n=gy[e.type]||e.type,{x:r,y:i}=M_(e,t);return{type:n,chart:t,native:e,x:r===void 0?null:r,y:i===void 0?null:i}}function Cy(e,t){for(let n of e)if(n===t||n.contains(t))return!0}function wy(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=Cy(n.addedNodes,r),t&&=!Cy(n.removedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Ty(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=Cy(n.removedNodes,r),t&&=!Cy(n.addedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}var Ey=new Map,Dy=0;function Oy(){let e=window.devicePixelRatio;e!==Dy&&(Dy=e,Ey.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function ky(e,t){Ey.size||window.addEventListener(`resize`,Oy),Ey.set(e,t)}function Ay(e){Ey.delete(e),Ey.size||window.removeEventListener(`resize`,Oy)}function jy(e,t,n){let r=e.canvas,i=r&&w_(r);if(!i)return;let a=Gh((e,t)=>{let r=i.clientWidth;n(e,t),r<i.clientWidth&&n()},window),o=new ResizeObserver(e=>{let t=e[0],n=t.contentRect.width,r=t.contentRect.height;n===0&&r===0||a(n,r)});return o.observe(i),ky(e,a),o}function My(e,t,n){n&&n.disconnect(),t===`resize`&&Ay(e)}function Ny(e,t,n){let r=e.canvas,i=Gh(t=>{e.ctx!==null&&n(Sy(t,e))},e);return by(r,t,i),i}var Py=class extends py{acquireContext(e,t){let n=e&&e.getContext&&e.getContext(`2d`);return n&&n.canvas===e?(vy(e,t),n):null}releaseContext(e){let t=e.canvas;if(!t[hy])return!1;let n=t[hy].initial;[`height`,`width`].forEach(e=>{let r=n[e];B(r)?t.removeAttribute(e):t.setAttribute(e,r)});let r=n.style||{};return Object.keys(r).forEach(e=>{t.style[e]=r[e]}),t.width=t.width,delete t[hy],!0}addEventListener(e,t,n){this.removeEventListener(e,t);let r=e.$proxies||={};r[t]=({attach:wy,detach:Ty,resize:jy}[t]||Ny)(e,t,n)}removeEventListener(e,t){let n=e.$proxies||={},r=n[t];r&&(({attach:My,detach:My,resize:My}[t]||xy)(e,t,r),n[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return F_(e,t,n,r)}isAttached(e){let t=e&&w_(e);return!!(t&&t.isConnected)}};function Fy(e){return!C_()||typeof OffscreenCanvas<`u`&&e instanceof OffscreenCanvas?my:Py}var Iy=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps([`x`,`y`],e);return{x:t,y:n}}hasValue(){return Sh(this.x)&&Sh(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let r={};return e.forEach(e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]}),r}};function Ly(e,t){let n=e.options.ticks,r=Ry(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?By(t):[],o=a.length,s=a[0],c=a[o-1],l=[];if(o>i)return Vy(t,l,a,o/i),l;let u=zy(a,t,i);if(o>0){let e,n,r=o>1?Math.round((c-s)/(o-1)):null;for(Hy(t,l,u,B(r)?0:s-r,s),e=0,n=o-1;e<n;e++)Hy(t,l,u,a[e],a[e+1]);return Hy(t,l,u,c,B(r)?t.length:c+r),l}return Hy(t,l,u),l}function Ry(e){let t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function zy(e,t,n){let r=Uy(e),i=t.length/n;if(!r)return Math.max(i,1);let a=bh(r);for(let e=0,t=a.length-1;e<t;e++){let t=a[e];if(t>i)return t}return Math.max(i,1)}function By(e){let t=[],n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function Vy(e,t,n,r){let i=0,a=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=n[i*r])}function Hy(e,t,n,r,i){let a=W(r,0),o=Math.min(W(i,e.length),e.length),s=0,c,l,u;for(n=Math.ceil(n),i&&(c=i-r,n=c/Math.floor(c/n)),u=a;u<0;)s++,u=Math.round(a+s*n);for(l=Math.max(a,0);l<o;l++)l===u&&(t.push(e[l]),s++,u=Math.round(a+s*n))}function Uy(e){let t=e.length,n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}var Wy=e=>e===`left`?`right`:e===`right`?`left`:e,Gy=(e,t,n)=>t===`top`||t===`left`?e[t]+n:e[t]-n,Ky=(e,t)=>Math.min(t||e,e);function qy(e,t){let n=[],r=e.length/t,i=e.length,a=0;for(;a<i;a+=r)n.push(e[Math.floor(a)]);return n}function Jy(e,t,n){let r=e.ticks.length,i=Math.min(t,r-1),a=e._startPixel,o=e._endPixel,s=1e-6,c=e.getPixelForTick(i),l;if(!(n&&(l=r===1?Math.max(c-a,o-c):t===0?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(i-1))/2,c+=i<t?l:-l,c<a-s||c>o+s)))return c}function Yy(e,t){K(e,e=>{let n=e.gc,r=n.length/2,i;if(r>t){for(i=0;i<r;++i)delete e.data[n[i]];n.splice(0,r)}})}function Xy(e){return e.drawTicks?e.tickLength:0}function Zy(e,t){if(!e.display)return 0;let n=Z(e.font,t),r=Wg(e.padding);return(V(e.text)?e.text.length:1)*n.lineHeight+r.height}function Qy(e,t){return qg(e,{scale:t,type:`scale`})}function $y(e,t,n){return qg(e,{tick:n,index:t,type:`tick`})}function eb(e,t,n){let r=qh(e);return(n&&t!==`right`||!n&&t===`right`)&&(r=Wy(r)),r}function tb(e,t,n,r){let{top:i,left:a,bottom:o,right:s,chart:c}=e,{chartArea:l,scales:u}=c,d=0,f,p,m,h=o-i,g=s-a;if(e.isHorizontal()){if(p=Jh(r,a,s),H(n)){let e=Object.keys(n)[0],r=n[e];m=u[e].getPixelForValue(r)+h-t}else m=n===`center`?(l.bottom+l.top)/2+h-t:Gy(e,n,t);f=s-a}else{if(H(n)){let e=Object.keys(n)[0],r=n[e];p=u[e].getPixelForValue(r)-g+t}else p=n===`center`?(l.left+l.right)/2-g+t:Gy(e,n,t);m=Jh(r,o,i),d=n===`left`?-Y:Y}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}var nb=class e extends Iy{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=Km(e,1/0),t=Km(t,-1/0),n=Km(n,1/0),r=Km(r,-1/0),{min:Km(e,n),max:Km(t,r),minDefined:U(e),maxDefined:U(t)}}getMinMax(e){let{min:t,max:n,minDefined:r,maxDefined:i}=this.getUserBounds(),a;if(r&&i)return{min:t,max:n};let o=this.getMatchingVisibleMetas();for(let s=0,c=o.length;s<c;++s)a=o[s].controller.getMinMax(this,e),r||(t=Math.min(t,a.min)),i||(n=Math.max(n,a.max));return t=i&&t>n?n:t,n=r&&t>n?t:n,{min:Km(t,Km(n,t)),max:Km(n,Km(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||=this._computeLabelItems(e)}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){G(this.options.beforeUpdate,[this])}update(e,t,n){let{beginAtZero:r,grace:i,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||=(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Kg(this,i,r),!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let s=o<this.ticks.length;this._convertTicksToLabels(s?qy(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source===`auto`)&&(this.ticks=Ly(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),s&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,n;this.isHorizontal()?(t=this.left,n=this.right):(t=this.top,n=this.bottom,e=!e),this._startPixel=t,this._endPixel=n,this._reversePixels=e,this._length=n-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){G(this.options.afterUpdate,[this])}beforeSetDimensions(){G(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){G(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),G(this.options[e],[this])}beforeDataLimits(){this._callHooks(`beforeDataLimits`)}determineDataLimits(){}afterDataLimits(){this._callHooks(`afterDataLimits`)}beforeBuildTicks(){this._callHooks(`beforeBuildTicks`)}buildTicks(){return[]}afterBuildTicks(){this._callHooks(`afterBuildTicks`)}beforeTickToLabelConversion(){G(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){let t=this.options.ticks,n,r,i;for(n=0,r=e.length;n<r;n++)i=e[n],i.label=G(t.callback,[i.value,n,e],this)}afterTickToLabelConversion(){G(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){G(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let e=this.options,t=e.ticks,n=Ky(this.ticks.length,e.ticks.maxTicksLimit),r=t.minRotation||0,i=t.maxRotation,a=r,o,s,c;if(!this._isVisible()||!t.display||r>=i||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let l=this._getLabelSizes(),u=l.widest.width,d=l.highest.height,f=Nh(this.chart.width-u,0,this.maxWidth);o=e.offset?this.maxWidth/n:f/(n-1),u+6>o&&(o=f/(n-(e.offset?.5:1)),s=this.maxHeight-Xy(e.grid)-t.padding-Zy(e.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),a=Eh(Math.min(Math.asin(Nh((l.highest.height+6)/o,-1,1)),Math.asin(Nh(s/c,-1,1))-Math.asin(Nh(d/c,-1,1)))),a=Math.max(r,Math.min(i,a))),this.labelRotation=a}afterCalculateLabelRotation(){G(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){G(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:i}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){let a=Zy(r,t.options.font);if(o?(e.width=this.maxWidth,e.height=Xy(i)+a):(e.height=this.maxHeight,e.width=Xy(i)+a),n.display&&this.ticks.length){let{first:t,last:r,widest:i,highest:a}=this._getLabelSizes(),s=n.padding*2,c=Th(this.labelRotation),l=Math.cos(c),u=Math.sin(c);if(o){let t=n.mirror?0:u*i.width+l*a.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{let t=n.mirror?0:l*i.width+u*a.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,r,u,l)}}this._handleMargins(),o?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){let{ticks:{align:i,padding:a},position:o}=this.options,s=this.labelRotation!==0,c=o!==`top`&&this.axis===`x`;if(this.isHorizontal()){let o=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1),u=0,d=0;s?c?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):i===`start`?d=t.width:i===`end`?u=e.width:i!==`inner`&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-l+a)*this.width/(this.width-l),0)}else{let n=t.height/2,r=e.height/2;i===`start`?(n=0,r=e.height):i===`end`&&(n=t.height,r=0),this.paddingTop=n+a,this.paddingBottom=r+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){G(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return t===`top`||t===`bottom`||e===`x`}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,n;for(t=0,n=e.length;t<n;t++)B(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){let t=this.options.ticks.sampleSize,n=this.ticks;t<n.length&&(n=qy(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,n){let{ctx:r,_longestTextCache:i}=this,a=[],o=[],s=Math.floor(t/Ky(t,n)),c=0,l=0,u,d,f,p,m,h,g,_,v,y,b;for(u=0;u<t;u+=s){if(p=e[u].label,m=this._resolveTickFontOptions(u),r.font=h=m.string,g=i[h]=i[h]||{data:{},gc:[]},_=m.lineHeight,v=y=0,!B(p)&&!V(p))v=xg(r,g.data,g.gc,v,p),y=_;else if(V(p))for(d=0,f=p.length;d<f;++d)b=p[d],!B(b)&&!V(b)&&(v=xg(r,g.data,g.gc,v,b),y+=_);a.push(v),o.push(y),c=Math.max(v,c),l=Math.max(y,l)}Yy(i,t);let x=a.indexOf(c),S=o.indexOf(l),C=e=>({width:a[e]||0,height:o[e]||0});return{first:C(0),last:C(t-1),widest:C(x),highest:C(S),widths:a,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return Ph(this._alignToPixels?Cg(this.chart,t,0):t)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&e<t.length){let n=t[e];return n.$context||=$y(this.getContext(),e,n)}return this.$context||=Qy(this.chart.getContext(),this)}_tickSize(){let e=this.options.ticks,t=Th(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),i=this._getLabelSizes(),a=e.autoSkipPadding||0,o=i?i.widest.width+a:0,s=i?i.highest.height+a:0;return this.isHorizontal()?s*n>o*r?o/n:s/r:s*r<o*n?s/n:o/r}_isVisible(){let e=this.options.display;return e===`auto`?this.getMatchingVisibleMetas().length>0:!!e}_computeGridLineItems(e){let t=this.axis,n=this.chart,r=this.options,{grid:i,position:a,border:o}=r,s=i.offset,c=this.isHorizontal(),l=this.ticks.length+(s?1:0),u=Xy(i),d=[],f=o.setContext(this.getContext()),p=f.display?f.width:0,m=p/2,h=function(e){return Cg(n,e,p)},g,_,v,y,b,x,S,C,w,T,E,ee;if(a===`top`)g=h(this.bottom),x=this.bottom-u,C=g-m,T=h(e.top)+m,ee=e.bottom;else if(a===`bottom`)g=h(this.top),T=e.top,ee=h(e.bottom)-m,x=g+m,C=this.top+u;else if(a===`left`)g=h(this.right),b=this.right-u,S=g-m,w=h(e.left)+m,E=e.right;else if(a===`right`)g=h(this.left),w=e.left,E=h(e.right)-m,b=g+m,S=this.left+u;else if(t===`x`){if(a===`center`)g=h((e.top+e.bottom)/2+.5);else if(H(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}T=e.top,ee=e.bottom,x=g+m,C=x+u}else if(t===`y`){if(a===`center`)g=h((e.left+e.right)/2);else if(H(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}b=g-m,S=b-u,w=e.left,E=e.right}let te=W(r.ticks.maxTicksLimit,l),ne=Math.max(1,Math.ceil(l/te));for(_=0;_<l;_+=ne){let e=this.getContext(_),t=i.setContext(e),r=o.setContext(e),a=t.lineWidth,l=t.color,u=r.dash||[],f=r.dashOffset,p=t.tickWidth,m=t.tickColor,h=t.tickBorderDash||[],g=t.tickBorderDashOffset;v=Jy(this,_,s),v!==void 0&&(y=Cg(n,v,a),c?b=S=w=E=y:x=C=T=ee=y,d.push({tx1:b,ty1:x,tx2:S,ty2:C,x1:w,y1:T,x2:E,y2:ee,width:a,color:l,borderDash:u,borderDashOffset:f,tickWidth:p,tickColor:m,tickBorderDash:h,tickBorderDashOffset:g}))}return this._ticksLength=l,this._borderValue=g,d}_computeLabelItems(e){let t=this.axis,n=this.options,{position:r,ticks:i}=n,a=this.isHorizontal(),o=this.ticks,{align:s,crossAlign:c,padding:l,mirror:u}=i,d=Xy(n.grid),f=d+l,p=u?-l:f,m=-Th(this.labelRotation),h=[],g,_,v,y,b,x,S,C,w,T,E,ee,te=`middle`;if(r===`top`)x=this.bottom-p,S=this._getXAxisLabelAlignment();else if(r===`bottom`)x=this.top+p,S=this._getXAxisLabelAlignment();else if(r===`left`){let e=this._getYAxisLabelAlignment(d);S=e.textAlign,b=e.x}else if(r===`right`){let e=this._getYAxisLabelAlignment(d);S=e.textAlign,b=e.x}else if(t===`x`){if(r===`center`)x=(e.top+e.bottom)/2+f;else if(H(r)){let e=Object.keys(r)[0],t=r[e];x=this.chart.scales[e].getPixelForValue(t)+f}S=this._getXAxisLabelAlignment()}else if(t===`y`){if(r===`center`)b=(e.left+e.right)/2-f;else if(H(r)){let e=Object.keys(r)[0],t=r[e];b=this.chart.scales[e].getPixelForValue(t)}S=this._getYAxisLabelAlignment(d).textAlign}t===`y`&&(s===`start`?te=`top`:s===`end`&&(te=`bottom`));let ne=this._getLabelSizes();for(g=0,_=o.length;g<_;++g){v=o[g],y=v.label;let e=i.setContext(this.getContext(g));C=this.getPixelForTick(g)+i.labelOffset,w=this._resolveTickFontOptions(g),T=w.lineHeight,E=V(y)?y.length:1;let t=E/2,n=e.color,s=e.textStrokeColor,l=e.textStrokeWidth,d=S;a?(b=C,S===`inner`&&(d=g===_-1?this.options.reverse?`left`:`right`:g===0?this.options.reverse?`right`:`left`:`center`),ee=r===`top`?c===`near`||m!==0?-E*T+T/2:c===`center`?-ne.highest.height/2-t*T+T:-ne.highest.height+T/2:c===`near`||m!==0?T/2:c===`center`?ne.highest.height/2-t*T:ne.highest.height-E*T,u&&(ee*=-1),m!==0&&!e.showLabelBackdrop&&(b+=T/2*Math.sin(m))):(x=C,ee=(1-E)*T/2);let f;if(e.showLabelBackdrop){let t=Wg(e.backdropPadding),n=ne.heights[g],r=ne.widths[g],i=ee-t.top,a=0-t.left;switch(te){case`middle`:i-=n/2;break;case`bottom`:i-=n;break}switch(S){case`center`:a-=r/2;break;case`right`:a-=r;break;case`inner`:g===_-1?a-=r:g>0&&(a-=r/2);break}f={left:a,top:i,width:r+t.width,height:n+t.height,color:e.backdropColor}}h.push({label:y,font:w,textOffset:ee,options:{rotation:m,color:n,strokeColor:s,strokeWidth:l,textAlign:d,textBaseline:te,translation:[b,x],backdrop:f}})}return h}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-Th(this.labelRotation))return e===`top`?`left`:`right`;let n=`center`;return t.align===`start`?n=`left`:t.align===`end`?n=`right`:t.align===`inner`&&(n=`inner`),n}_getYAxisLabelAlignment(e){let{position:t,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,a=this._getLabelSizes(),o=e+i,s=a.widest.width,c,l;return t===`left`?r?(l=this.right+i,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l+=s)):(l=this.right-o,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l=this.left)):t===`right`?r?(l=this.left+i,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l-=s)):(l=this.left+o,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l=this.right)):c=`right`,{textAlign:c,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;if(t===`left`||t===`right`)return{top:0,left:this.left,bottom:e.height,right:this.right};if(t===`top`||t===`bottom`)return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:n,top:r,width:i,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,i,a),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let n=this.ticks.findIndex(t=>t.value===e);return n>=0?t.setContext(this.getContext(n)).lineWidth:0}drawGrid(e){let t=this.options.grid,n=this.ctx,r=this._gridLineItems||=this._computeGridLineItems(e),i,a,o=(e,t,r)=>{!r.width||!r.color||(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(i=0,a=r.length;i<a;++i){let e=r[i];t.drawOnChartArea&&o({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&o({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){let{chart:e,ctx:t,options:{border:n,grid:r}}=this,i=n.setContext(this.getContext()),a=n.display?i.width:0;if(!a)return;let o=r.setContext(this.getContext(0)).lineWidth,s=this._borderValue,c,l,u,d;this.isHorizontal()?(c=Cg(e,this.left,a)-a/2,l=Cg(e,this.right,o)+o/2,u=d=s):(u=Cg(e,this.top,a)-a/2,d=Cg(e,this.bottom,o)+o/2,c=l=s),t.save(),t.lineWidth=i.width,t.strokeStyle=i.color,t.beginPath(),t.moveTo(c,u),t.lineTo(l,d),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;let t=this.ctx,n=this._computeLabelArea();n&&Og(t,n);let r=this.getLabelItems(e);for(let e of r){let n=e.options,r=e.font,i=e.label,a=e.textOffset;Fg(t,i,0,a,r,n)}n&&kg(t)}drawTitle(){let{ctx:e,options:{position:t,title:n,reverse:r}}=this;if(!n.display)return;let i=Z(n.font),a=Wg(n.padding),o=n.align,s=i.lineHeight/2;t===`bottom`||t===`center`||H(t)?(s+=a.bottom,V(n.text)&&(s+=i.lineHeight*(n.text.length-1))):s+=a.top;let{titleX:c,titleY:l,maxWidth:u,rotation:d}=tb(this,s,t,o);Fg(e,n.text,0,0,i,{color:n.color,maxWidth:u,rotation:d,textAlign:eb(o,t,r),textBaseline:`middle`,translation:[c,l]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){let t=this.options,n=t.ticks&&t.ticks.z||0,r=W(t.grid&&t.grid.z,-1),i=W(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==e.prototype.draw?[{z:n,draw:e=>{this.draw(e)}}]:[{z:r,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:e=>{this.drawLabels(e)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+`AxisID`,r=[],i,a;for(i=0,a=t.length;i<a;++i){let a=t[i];a[n]===this.id&&(!e||a.type===e)&&r.push(a)}return r}_resolveTickFontOptions(e){return Z(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){let e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}},rb=class{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){let t=Object.getPrototypeOf(e),n;ob(t)&&(n=this.register(t));let r=this.items,i=e.id,a=this.scope+`.`+i;if(!i)throw Error(`class does not have id: `+e);return i in r?a:(r[i]=e,ib(e,a,n),this.override&&X.override(e.id,e.overrides),a)}get(e){return this.items[e]}unregister(e){let t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in X[r]&&(delete X[r][n],this.override&&delete gg[n])}};function ib(e,t,n){let r=$m(Object.create(null),[n?X.get(n):{},X.get(t),e.defaults]);X.set(t,r),e.defaultRoutes&&ab(t,e.defaultRoutes),e.descriptors&&X.describe(t,e.descriptors)}function ab(e,t){Object.keys(t).forEach(n=>{let r=n.split(`.`),i=r.pop(),a=[e].concat(r).join(`.`),o=t[n].split(`.`),s=o.pop(),c=o.join(`.`);X.route(a,i,c,s)})}function ob(e){return`id`in e&&`defaults`in e}var sb=new class{constructor(){this.controllers=new rb(Pv,`datasets`,!0),this.elements=new rb(Iy,`elements`),this.plugins=new rb(Object,`plugins`),this.scales=new rb(nb,`scales`),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each(`register`,e)}remove(...e){this._each(`unregister`,e)}addControllers(...e){this._each(`register`,e,this.controllers)}addElements(...e){this._each(`register`,e,this.elements)}addPlugins(...e){this._each(`register`,e,this.plugins)}addScales(...e){this._each(`register`,e,this.scales)}getController(e){return this._get(e,this.controllers,`controller`)}getElement(e){return this._get(e,this.elements,`element`)}getPlugin(e){return this._get(e,this.plugins,`plugin`)}getScale(e){return this._get(e,this.scales,`scale`)}removeControllers(...e){this._each(`unregister`,e,this.controllers)}removeElements(...e){this._each(`unregister`,e,this.elements)}removePlugins(...e){this._each(`unregister`,e,this.plugins)}removeScales(...e){this._each(`unregister`,e,this.scales)}_each(e,t,n){[...t].forEach(t=>{let r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):K(t,t=>{let r=n||this._getRegistryForType(t);this._exec(e,r,t)})})}_exec(e,t,n){let r=oh(e);G(n[`before`+r],[],n),t[e](n),G(n[`after`+r],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){let n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){let r=t.get(e);if(r===void 0)throw Error(`"`+e+`" is not a registered `+n+`.`);return r}},cb=class{constructor(){this._init=void 0}notify(e,t,n,r){if(t===`beforeInit`&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,`install`)),this._init===void 0)return;let i=r?this._descriptors(e).filter(r):this._descriptors(e),a=this._notify(i,e,t,n);return t===`afterDestroy`&&(this._notify(i,e,`stop`),this._notify(this._init,e,`uninstall`),this._init=void 0),a}_notify(e,t,n,r){r||={};for(let i of e){let e=i.plugin,a=e[n];if(G(a,[t,r,i.options],e)===!1&&r.cancelable)return!1}return!0}invalidate(){B(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){let n=e&&e.config,r=W(n.options&&n.options.plugins,{}),i=lb(n);return r===!1&&!t?[]:db(e,i,r,t)}_notifyStateChanges(e){let t=this._oldCache||[],n=this._cache,r=(e,t)=>e.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(r(t,n),e,`stop`),this._notify(r(n,t),e,`start`)}};function lb(e){let t={},n=[],r=Object.keys(sb.plugins.items);for(let e=0;e<r.length;e++)n.push(sb.getPlugin(r[e]));let i=e.plugins||[];for(let e=0;e<i.length;e++){let r=i[e];n.indexOf(r)===-1&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}function ub(e,t){return!t&&e===!1?null:e===!0?{}:e}function db(e,{plugins:t,localIds:n},r,i){let a=[],o=e.getContext();for(let s of t){let t=s.id,c=ub(r[t],i);c!==null&&a.push({plugin:s,options:fb(e.config,{plugin:s,local:n[t]},c,o)})}return a}function fb(e,{plugin:t,local:n},r,i){let a=e.pluginScopeKeys(t),o=e.getOptionScopes(r,a);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[``],{scriptable:!1,indexable:!1,allKeys:!0})}function pb(e,t){let n=X.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||`x`}function mb(e,t){let n=e;return e===`_index_`?n=t:e===`_value_`&&(n=t===`x`?`y`:`x`),n}function hb(e,t){return e===t?`_index_`:`_value_`}function gb(e){if(e===`x`||e===`y`||e===`r`)return e}function _b(e){if(e===`top`||e===`bottom`)return`x`;if(e===`left`||e===`right`)return`y`}function vb(e,...t){if(gb(e))return e;for(let n of t){let t=n.axis||_b(n.position)||e.length>1&&gb(e[0].toLowerCase());if(t)return t}throw Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function yb(e,t,n){if(n[t+`AxisID`]===e)return{axis:t}}function bb(e,t){if(t.data&&t.data.datasets){let n=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(n.length)return yb(e,`x`,n[0])||yb(e,`y`,n[0])}return{}}function xb(e,t){let n=gg[e.type]||{scales:{}},r=t.scales||{},i=pb(e.type,t),a=Object.create(null);return Object.keys(r).forEach(t=>{let o=r[t];if(!H(o))return console.error(`Invalid scale configuration for scale: ${t}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);let s=vb(t,o,bb(t,e),X.scales[o.type]),c=hb(s,i),l=n.scales||{};a[t]=eh(Object.create(null),[{axis:s},o,l[s],l[c]])}),e.data.datasets.forEach(n=>{let i=n.type||e.type,o=n.indexAxis||pb(i,t),s=(gg[i]||{}).scales||{};Object.keys(s).forEach(e=>{let t=mb(e,o),i=n[t+`AxisID`]||t;a[i]=a[i]||Object.create(null),eh(a[i],[{axis:t},r[i],s[e]])})}),Object.keys(a).forEach(e=>{let t=a[e];eh(t,[X.scales[t.type],X.scale])}),a}function Sb(e){let t=e.options||={};t.plugins=W(t.plugins,{}),t.scales=xb(e,t)}function Cb(e){return e||={},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function wb(e){return e||={},e.data=Cb(e.data),Sb(e),e}var Tb=new Map,Eb=new Set;function Db(e,t){let n=Tb.get(e);return n||(n=t(),Tb.set(e,n),Eb.add(n)),n}var Ob=(e,t,n)=>{let r=ah(t,n);r!==void 0&&e.add(r)},kb=class{constructor(e){this._config=wb(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Cb(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),Sb(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Db(e,()=>[[`datasets.${e}`,``]])}datasetAnimationScopeKeys(e,t){return Db(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,``]])}datasetElementScopeKeys(e,t){return Db(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,``]])}pluginScopeKeys(e){let t=e.id,n=this.type;return Db(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,r=n.get(e);return(!r||t)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){let{options:r,type:i}=this,a=this._cachedScopes(e,n),o=a.get(t);if(o)return o;let s=new Set;t.forEach(t=>{e&&(s.add(e),t.forEach(t=>Ob(s,e,t))),t.forEach(e=>Ob(s,r,e)),t.forEach(e=>Ob(s,gg[i]||{},e)),t.forEach(e=>Ob(s,X,e)),t.forEach(e=>Ob(s,_g,e))});let c=Array.from(s);return c.length===0&&c.push(Object.create(null)),Eb.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:e,type:t}=this;return[e,gg[t]||{},X.datasets[t]||{},{type:t},X,_g]}resolveNamedOptions(e,t,n,r=[``]){let i={$shared:!0},{resolver:a,subPrefixes:o}=Ab(this._resolverCache,e,r),s=a;if(Mb(a,t)){i.$shared=!1,n=ch(n)?n():n;let t=this.createResolver(e,n,o);s=Yg(a,n,t)}for(let e of t)i[e]=s[e];return i}createResolver(e,t,n=[``],r){let{resolver:i}=Ab(this._resolverCache,e,n);return H(t)?Yg(i,t,void 0,r):i}};function Ab(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));let i=n.join(),a=r.get(i);return a||(a={resolver:Jg(t,n),subPrefixes:n.filter(e=>!e.toLowerCase().includes(`hover`))},r.set(i,a)),a}var jb=e=>H(e)&&Object.getOwnPropertyNames(e).some(t=>ch(e[t]));function Mb(e,t){let{isScriptable:n,isIndexable:r}=Xg(e);for(let i of t){let t=n(i),a=r(i),o=(a||t)&&e[i];if(t&&(ch(o)||jb(o))||a&&V(o))return!0}return!1}var Nb=`4.5.1`,Pb=[`top`,`bottom`,`left`,`right`,`chartArea`];function Fb(e,t){return e===`top`||e===`bottom`||Pb.indexOf(e)===-1&&t===`x`}function Ib(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Lb(e){let t=e.chart,n=t.options.animation;t.notifyPlugins(`afterRender`),G(n&&n.onComplete,[e],t)}function Rb(e){let t=e.chart,n=t.options.animation;G(n&&n.onProgress,[e],t)}function zb(e){return C_()&&typeof e==`string`?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var Bb={},Vb=e=>{let t=zb(e);return Object.values(Bb).filter(e=>e.canvas===t).pop()};function Hb(e,t,n){let r=Object.keys(e);for(let i of r){let r=+i;if(r>=t){let a=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=a)}}}function Ub(e,t,n,r){return!n||e.type===`mouseout`?null:r?t:e}var Wb=class{static defaults=X;static instances=Bb;static overrides=gg;static registry=sb;static version=Nb;static getChart=Vb;static register(...e){sb.add(...e),Gb()}static unregister(...e){sb.remove(...e),Gb()}constructor(e,t){let n=this.config=new kb(t),r=zb(e),i=Vb(r);if(i)throw Error(`Canvas is already in use. Chart with ID '`+i.id+`' must be destroyed before the canvas with ID '`+i.canvas.id+`' can be reused.`);let a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||(Fy(r))),this.platform.updateConfig(n);let o=this.platform.acquireContext(r,a.aspectRatio),s=o&&o.canvas,c=s&&s.height,l=s&&s.width;if(this.id=Gm(),this.ctx=o,this.canvas=s,this.width=l,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new cb,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Kh(e=>this.update(e),a.resizeDelay||0),this._dataChanges=[],Bb[this.id]=this,!o||!s){console.error(`Failed to create chart: can't acquire context from the given item`);return}cv.listen(this,`complete`,Lb),cv.listen(this,`progress`,Rb),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return B(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return sb}_initialize(){return this.notifyPlugins(`beforeInit`),this.options.responsive?this.resize():I_(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins(`afterInit`),this}clear(){return wg(this.canvas,this.ctx),this}stop(){return cv.stop(this),this}resize(e,t){cv.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){let n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,t,i),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?`resize`:`attach`;this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,I_(this,o,!0)&&(this.notifyPlugins(`resize`,{size:a}),G(n.onResize,[this,a],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){K(this.options.scales||{},(e,t)=>{e.id=t})}buildOrUpdateScales(){let e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce((e,t)=>(e[t]=!1,e),{}),i=[];t&&(i=i.concat(Object.keys(t).map(e=>{let n=t[e],r=vb(e,n),i=r===`r`,a=r===`x`;return{options:n,dposition:i?`chartArea`:a?`bottom`:`left`,dtype:i?`radialLinear`:a?`category`:`linear`}}))),K(i,t=>{let i=t.options,a=i.id,o=vb(a,i),s=W(i.type,t.dtype);(i.position===void 0||Fb(i.position,o)!==Fb(t.dposition))&&(i.position=t.dposition),r[a]=!0;let c=null;a in n&&n[a].type===s?c=n[a]:(c=new(sb.getScale(s))({id:a,type:s,ctx:this.ctx,chart:this}),n[c.id]=c),c.init(i,e)}),K(r,(e,t)=>{e||delete n[t]}),K(n,e=>{fy.configure(this,e,e.options),fy.addBox(this,e)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((e,t)=>e.index-t.index),n>t){for(let e=t;e<n;++e)this._destroyDatasetMeta(e);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(Ib(`order`,`index`))}_removeUnreferencedMetasets(){let{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((e,n)=>{t.filter(t=>t===e._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let e=[],t=this.data.datasets,n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n<r;n++){let r=t[n],i=this.getDatasetMeta(n),a=r.type||this.config.type;if(i.type&&i.type!==a&&(this._destroyDatasetMeta(n),i=this.getDatasetMeta(n)),i.type=a,i.indexAxis=r.indexAxis||pb(a,this.options),i.order=r.order||0,i.index=n,i.label=``+r.label,i.visible=this.isDatasetVisible(n),i.controller)i.controller.updateIndex(n),i.controller.linkScales();else{let t=sb.getController(a),{datasetElementType:r,dataElementType:o}=X.datasets[a];Object.assign(t,{dataElementType:sb.getElement(o),datasetElementType:r&&sb.getElement(r)}),i.controller=new t(this,n),e.push(i.controller)}}return this._updateMetasets(),e}_resetElements(){K(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins(`reset`)}update(e){let t=this.config;t.update();let n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins(`beforeUpdate`,{mode:e,cancelable:!0})===!1)return;let i=this.buildOrUpdateControllers();this.notifyPlugins(`beforeElementsUpdate`);let a=0;for(let e=0,t=this.data.datasets.length;e<t;e++){let{controller:t}=this.getDatasetMeta(e),n=!r&&i.indexOf(t)===-1;t.buildOrUpdateElements(n),a=Math.max(+t.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),r||K(i,e=>{e.reset()}),this._updateDatasets(e),this.notifyPlugins(`afterUpdate`,{mode:e}),this._layers.sort(Ib(`z`,`_idx`));let{_active:o,_lastEvent:s}=this;s?this._eventHandler(s,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){K(this.scales,e=>{fy.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options;(!lh(new Set(Object.keys(this._listeners)),new Set(e.events))||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(let{method:n,start:r,count:i}of t)Hb(e,r,n===`_removeElements`?-i:i)}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let t=this.data.datasets.length,n=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+`,`+e.splice(1).join(`,`))),r=n(0);for(let e=1;e<t;e++)if(!lh(r,n(e)))return;return Array.from(r).map(e=>e.split(`,`)).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(this.notifyPlugins(`beforeLayout`,{cancelable:!0})===!1)return;fy.update(this,this.width,this.height,e);let t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],K(this.boxes,e=>{n&&e.position===`chartArea`||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins(`afterLayout`)}_updateDatasets(e){if(this.notifyPlugins(`beforeDatasetsUpdate`,{mode:e,cancelable:!0})!==!1){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,n=this.data.datasets.length;t<n;++t)this._updateDataset(t,ch(e)?e({datasetIndex:t}):e);this.notifyPlugins(`afterDatasetsUpdate`,{mode:e})}}_updateDataset(e,t){let n=this.getDatasetMeta(e),r={meta:n,index:e,mode:t,cancelable:!0};this.notifyPlugins(`beforeDatasetUpdate`,r)!==!1&&(n.controller._update(t),r.cancelable=!1,this.notifyPlugins(`afterDatasetUpdate`,r))}render(){this.notifyPlugins(`beforeRender`,{cancelable:!0})!==!1&&(cv.has(this)?this.attached&&!cv.running(this)&&cv.start(this):(this.draw(),Lb({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){let{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins(`beforeDraw`,{cancelable:!0})===!1)return;let t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins(`afterDraw`)}_getSortedDatasetMetas(e){let t=this._sortedMetasets,n=[],r,i;for(r=0,i=t.length;r<i;++r){let i=t[r];(!e||i.visible)&&n.push(i)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins(`beforeDatasetsDraw`,{cancelable:!0})===!1)return;let e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins(`afterDatasetsDraw`)}_drawDataset(e){let t=this.ctx,n={meta:e,index:e.index,cancelable:!0},r=sv(this,e);this.notifyPlugins(`beforeDatasetDraw`,n)!==!1&&(r&&Og(t,r),e.controller.draw(),r&&kg(t),n.cancelable=!1,this.notifyPlugins(`afterDatasetDraw`,n))}isPointInArea(e){return Dg(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){let i=Yv.modes[t];return typeof i==`function`?i(this,e,n,r):[]}getDatasetMeta(e){let t=this.data.datasets[e],n=this._metasets,r=n.filter(e=>e&&e._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||=qg(null,{chart:this,type:`chart`})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden==`boolean`?!n.hidden:!t.hidden}setDatasetVisibility(e,t){let n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){let r=n?`show`:`hide`,i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);sh(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),a.update(i,{visible:n}),this.update(t=>t.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),cv.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins(`beforeDestroy`);let{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),wg(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete Bb[this.id],this.notifyPlugins(`afterDestroy`)}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let e=this._listeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};K(this.options.events,e=>n(e,r))}bindResponsiveEvents(){this._responsiveListeners||={};let e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},i=(e,t)=>{this.canvas&&this.resize(e,t)},a,o=()=>{r(`attach`,o),this.attached=!0,this.resize(),n(`resize`,i),n(`detach`,a)};a=()=>{this.attached=!1,r(`resize`,i),this._stop(),this._resize(0,0),n(`attach`,o)},t.isAttached(this.canvas)?o():a()}unbindEvents(){K(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},K(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){let r=n?`set`:`remove`,i,a,o,s;for(t===`dataset`&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller[`_`+r+`DatasetHoverStyle`]()),o=0,s=e.length;o<s;++o){a=e[o];let t=a&&this.getDatasetMeta(a.datasetIndex).controller;t&&t[r+`HoverStyle`](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){let t=this._active||[],n=e.map(({datasetIndex:e,index:t})=>{let n=this.getDatasetMeta(e);if(!n)throw Error(`No dataset found at index `+e);return{datasetIndex:e,element:n.data[t],index:t}});Ym(n,t)||(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){let r=this.options.hover,i=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=i(t,e),o=n?e:i(e,t);a.length&&this.updateHoverStyle(a,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(e,t){let n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins(`beforeEvent`,n,r)===!1)return;let i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins(`afterEvent`,n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){let{_active:r=[],options:i}=this,a=t,o=this._getActiveElements(e,r,n,a),s=uh(e),c=Ub(e,this._lastEvent,n,s);n&&(this._lastEvent=null,G(i.onHover,[e,o,this],this),s&&G(i.onClick,[e,o,this],this));let l=!Ym(o,r);return(l||t)&&(this._active=o,this._updateHoverStyles(o,r,t)),this._lastEvent=c,l}_getActiveElements(e,t,n,r){if(e.type===`mouseout`)return[];if(!n)return t;let i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}};function Gb(){return K(Wb.instances,e=>e._plugins.invalidate())}function Kb(e,t,n){let{startAngle:r,x:i,y:a,outerRadius:o,innerRadius:s,options:c}=t,{borderWidth:l,borderJoinStyle:u}=c,d=Math.min(l/o,jh(r-n));if(e.beginPath(),e.arc(i,a,o-l/2,r+d/2,n-d/2),s>0){let t=Math.min(l/s,jh(r-n));e.arc(i,a,s+l/2,n-t/2,r+t/2,!0)}else{let t=Math.min(l/2,o*jh(r-n));if(u===`round`)e.arc(i,a,t,n-q/2,r+q/2,!0);else if(u===`bevel`){let o=2*t*t,s=-o*Math.cos(n+q/2)+i,c=-o*Math.sin(n+q/2)+a,l=o*Math.cos(r+q/2)+i,u=o*Math.sin(r+q/2)+a;e.lineTo(s,c),e.lineTo(l,u)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip(`evenodd`)}function qb(e,t,n){let{startAngle:r,pixelMargin:i,x:a,y:o,outerRadius:s,innerRadius:c}=t,l=i/s;e.beginPath(),e.arc(a,o,s,r-l,n+l),c>i?(l=i/c,e.arc(a,o,c,n+l,r-l,!0)):e.arc(a,o,i,n+Y,r-Y),e.closePath(),e.clip()}function Jb(e){return Vg(e,[`outerStart`,`outerEnd`,`innerStart`,`innerEnd`])}function Yb(e,t,n,r){let i=Jb(e.options.borderRadius),a=(n-t)/2,o=Math.min(a,r*t/2),s=e=>{let t=(n-Math.min(a,e))*r/2;return Nh(e,0,Math.min(a,t))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Nh(i.innerStart,0,o),innerEnd:Nh(i.innerEnd,0,o)}}function Xb(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Zb(e,t,n,r,i,a){let{x:o,y:s,startAngle:c,pixelMargin:l,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-l,0),f=u>0?u+r+n+l:0,p=0,m=i-c;if(r){let e=((u>0?u-r:0)+(d>0?d-r:0))/2;p=(m-(e===0?m:m*e/(e+r)))/2}let h=(m-Math.max(.001,m*d-n/q)/d)/2,g=c+h+p,_=i-h-p,{outerStart:v,outerEnd:y,innerStart:b,innerEnd:x}=Yb(t,f,d,_-g),S=d-v,C=d-y,w=g+v/S,T=_-y/C,E=f+b,ee=f+x,te=g+b/E,ne=_-x/ee;if(e.beginPath(),a){let t=(w+T)/2;if(e.arc(o,s,d,w,t),e.arc(o,s,d,t,T),y>0){let t=Xb(C,T,o,s);e.arc(t.x,t.y,y,T,_+Y)}let n=Xb(ee,_,o,s);if(e.lineTo(n.x,n.y),x>0){let t=Xb(ee,ne,o,s);e.arc(t.x,t.y,x,_+Y,ne+Math.PI)}let r=(_-x/f+(g+b/f))/2;if(e.arc(o,s,f,_-x/f,r,!0),e.arc(o,s,f,r,g+b/f,!0),b>0){let t=Xb(E,te,o,s);e.arc(t.x,t.y,b,te+Math.PI,g-Y)}let i=Xb(S,g,o,s);if(e.lineTo(i.x,i.y),v>0){let t=Xb(S,w,o,s);e.arc(t.x,t.y,v,g-Y,w)}}else{e.moveTo(o,s);let t=Math.cos(w)*d+o,n=Math.sin(w)*d+s;e.lineTo(t,n);let r=Math.cos(T)*d+o,i=Math.sin(T)*d+s;e.lineTo(r,i)}e.closePath()}function Qb(e,t,n,r,i){let{fullCircles:a,startAngle:o,circumference:s}=t,c=t.endAngle;if(a){Zb(e,t,n,r,c,i);for(let t=0;t<a;++t)e.fill();isNaN(s)||(c=o+(s%J||J))}return Zb(e,t,n,r,c,i),e.fill(),c}function $b(e,t,n,r,i){let{fullCircles:a,startAngle:o,circumference:s,options:c}=t,{borderWidth:l,borderJoinStyle:u,borderDash:d,borderDashOffset:f,borderRadius:p}=c,m=c.borderAlign===`inner`;if(!l)return;e.setLineDash(d||[]),e.lineDashOffset=f,m?(e.lineWidth=l*2,e.lineJoin=u||`round`):(e.lineWidth=l,e.lineJoin=u||`bevel`);let h=t.endAngle;if(a){Zb(e,t,n,r,h,i);for(let t=0;t<a;++t)e.stroke();isNaN(s)||(h=o+(s%J||J))}m&&qb(e,t,h),c.selfJoin&&h-o>=q&&p===0&&u!==`miter`&&Kb(e,t,h),a||(Zb(e,t,n,r,h,i),e.stroke())}var ex=class extends Iy{static id=`arc`;static defaults={borderAlign:`center`,borderColor:`#fff`,borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:`backgroundColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){let{angle:r,distance:i}=Oh(this.getProps([`x`,`y`],n),{x:e,y:t}),{startAngle:a,endAngle:o,innerRadius:s,outerRadius:c,circumference:l}=this.getProps([`startAngle`,`endAngle`,`innerRadius`,`outerRadius`,`circumference`],n),u=(this.options.spacing+this.options.borderWidth)/2,d=W(l,o-a),f=Mh(r,a,o)&&a!==o,p=d>=J||f,m=Fh(i,s+u,c+u);return p&&m}getCenterPoint(e){let{x:t,y:n,startAngle:r,endAngle:i,innerRadius:a,outerRadius:o}=this.getProps([`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`],e),{offset:s,spacing:c}=this.options,l=(r+i)/2,u=(a+o+c+s)/2;return{x:t+Math.cos(l)*u,y:n+Math.sin(l)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:n}=this,r=(t.offset||0)/4,i=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign===`inner`?.33:0,this.fullCircles=n>J?Math.floor(n/J):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*r,Math.sin(o)*r);let s=r*(1-Math.sin(Math.min(q,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,Qb(e,this,s,i,a),$b(e,this,s,i,a),e.restore()}};function tx(e,t,n=t){e.lineCap=W(n.borderCapStyle,t.borderCapStyle),e.setLineDash(W(n.borderDash,t.borderDash)),e.lineDashOffset=W(n.borderDashOffset,t.borderDashOffset),e.lineJoin=W(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=W(n.borderWidth,t.borderWidth),e.strokeStyle=W(n.borderColor,t.borderColor)}function nx(e,t,n){e.lineTo(n.x,n.y)}function rx(e){return e.stepped?Ag:e.tension||e.cubicInterpolationMode===`monotone`?jg:nx}function ix(e,t,n={}){let r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:s}=t,c=Math.max(i,o),l=Math.min(a,s),u=i<o&&a<o||i>s&&a>s;return{count:r,start:c,loop:t.loop,ilen:l<c&&!u?r+l-c:l-c}}function ax(e,t,n,r){let{points:i,options:a}=t,{count:o,start:s,loop:c,ilen:l}=ix(i,n,r),u=rx(a),{move:d=!0,reverse:f}=r||{},p,m,h;for(p=0;p<=l;++p)m=i[(s+(f?l-p:p))%o],!m.skip&&(d?(e.moveTo(m.x,m.y),d=!1):u(e,h,m,f,a.stepped),h=m);return c&&(m=i[(s+(f?l:0))%o],u(e,h,m,f,a.stepped)),!!c}function ox(e,t,n,r){let i=t.points,{count:a,start:o,ilen:s}=ix(i,n,r),{move:c=!0,reverse:l}=r||{},u=0,d=0,f,p,m,h,g,_,v=e=>(o+(l?s-e:e))%a,y=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,_))};for(c&&(p=i[v(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[v(f)],p.skip)continue;let t=p.x,n=p.y,r=t|0;r===m?(n<h?h=n:n>g&&(g=n),u=(d*u+t)/++d):(y(),e.lineTo(t,n),m=r,d=0,h=g=n),_=n}y()}function sx(e){let t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!==`monotone`&&!t.stepped&&!n?ox:ax}function cx(e){return e.stepped?B_:e.tension||e.cubicInterpolationMode===`monotone`?V_:z_}function lx(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),tx(e,t.options),e.stroke(i)}function ux(e,t,n,r){let{segments:i,options:a}=t,o=sx(t);for(let s of i)tx(e,a,s.style),e.beginPath(),o(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}var dx=typeof Path2D==`function`;function fx(e,t,n,r){dx&&!t.options.segment?lx(e,t,n,r):ux(e,t,n,r)}var px=class extends Iy{static id=`line`;static defaults={borderCapStyle:`butt`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:`default`,fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`&&e!==`fill`};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){let n=this.options;if((n.tension||n.cubicInterpolationMode===`monotone`)&&!n.stepped&&!this._pointsUpdated){let r=n.spanGaps?this._loop:this._fullLoop;S_(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||=ev(this,this.options.segment)}first(){let e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){let e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){let n=this.options,r=e[t],i=this.points,a=Z_(this,{property:t,start:r,end:r});if(!a.length)return;let o=[],s=cx(n),c,l;for(c=0,l=a.length;c<l;++c){let{start:l,end:u}=a[c],d=i[l],f=i[u];if(d===f){o.push(d);continue}let p=s(d,f,Math.abs((r-d[t])/(f[t]-d[t])),n.stepped);p[t]=e[t],o.push(p)}return o.length===1?o[0]:o}pathSegment(e,t,n){return sx(this)(e,this,t,n)}path(e,t,n){let r=this.segments,i=sx(this),a=this._loop;t||=0,n||=this.points.length-t;for(let o of r)a&=i(e,this,o,{start:t,end:t+n-1});return!!a}draw(e,t,n,r){let i=this.options||{};(this.points||[]).length&&i.borderWidth&&(e.save(),fx(e,this,n,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};function mx(e,t,n,r){let i=e.options,{[n]:a}=e.getProps([n],r);return Math.abs(t-a)<i.radius+i.hitRadius}var hx=class extends Iy{static id=`point`;parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:`circle`,radius:3,rotation:0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,n){let r=this.options,{x:i,y:a}=this.getProps([`x`,`y`],n);return(e-i)**2+(t-a)**2<(r.hitRadius+r.radius)**2}inXRange(e,t){return mx(this,e,`x`,t)}inYRange(e,t){return mx(this,e,`y`,t)}getCenterPoint(e){let{x:t,y:n}=this.getProps([`x`,`y`],e);return{x:t,y:n}}size(e){e=e||this.options||{};let t=e.radius||0;t=Math.max(t,t&&e.hoverRadius||0);let n=t&&e.borderWidth||0;return(t+n)*2}draw(e,t){let n=this.options;this.skip||n.radius<.1||!Dg(this,t,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,Tg(e,n,this.x,this.y))}getRange(){let e=this.options||{};return e.radius+e.hitRadius}};function gx(e,t,n){let r=e.segments,i=e.points,a=t.points,o=[];for(let e of r){let{start:r,end:s}=e;s=yx(r,s,i);let c=_x(n,i[r],i[s],e.loop);if(!t.segments){o.push({source:e,target:c,start:i[r],end:i[s]});continue}let l=Z_(t,c);for(let t of l){let r=_x(n,a[t.start],a[t.end],t.loop),s=X_(e,i,r);for(let e of s)o.push({source:e,target:t,start:{[n]:bx(c,r,`start`,Math.max)},end:{[n]:bx(c,r,`end`,Math.min)}})}}return o}function _x(e,t,n,r){if(r)return;let i=t[e],a=n[e];return e===`angle`&&(i=jh(i),a=jh(a)),{property:e,start:i,end:a}}function vx(e,t){let{x:n=null,y:r=null}=e||{},i=t.points,a=[];return t.segments.forEach(({start:e,end:t})=>{t=yx(e,t,i);let o=i[e],s=i[t];r===null?n!==null&&(a.push({x:n,y:o.y}),a.push({x:n,y:s.y})):(a.push({x:o.x,y:r}),a.push({x:s.x,y:r}))}),a}function yx(e,t,n){for(;t>e;t--){let e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function bx(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function xx(e,t){let n=[],r=!1;return V(e)?(r=!0,n=e):n=vx(e,t),n.length?new px({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Sx(e){return e&&e.fill!==!1}function Cx(e,t,n){let r=e[t].fill,i=[t],a;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!U(r))return r;if(a=e[r],!a)return!1;if(a.visible)return r;i.push(r),r=a.fill}return!1}function wx(e,t,n){let r=Ox(e);if(H(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return U(i)&&Math.floor(i)===i?Tx(r[0],t,i,n):[`origin`,`start`,`end`,`stack`,`shape`].indexOf(r)>=0&&r}function Tx(e,t,n,r){return(e===`-`||e===`+`)&&(n=t+n),n===t||n<0||n>=r?!1:n}function Ex(e,t){let n=null;return e===`start`?n=t.bottom:e===`end`?n=t.top:H(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Dx(e,t,n){let r;return r=e===`start`?n:e===`end`?t.options.reverse?t.min:t.max:H(e)?e.value:t.getBaseValue(),r}function Ox(e){let t=e.options,n=t.fill,r=W(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?`origin`:r}function kx(e){let{scale:t,index:n,line:r}=e,i=[],a=r.segments,o=r.points,s=Ax(t,n);s.push(xx({x:null,y:t.bottom},r));for(let e=0;e<a.length;e++){let t=a[e];for(let e=t.start;e<=t.end;e++)jx(i,o[e],s)}return new px({points:i,options:{}})}function Ax(e,t){let n=[],r=e.getMatchingVisibleMetas(`line`);for(let e=0;e<r.length;e++){let i=r[e];if(i.index===t)break;i.hidden||n.unshift(i.dataset)}return n}function jx(e,t,n){let r=[];for(let i=0;i<n.length;i++){let a=n[i],{first:o,last:s,point:c}=Mx(a,t,`x`);if(!(!c||o&&s)){if(o)r.unshift(c);else if(e.push(c),!s)break}}e.push(...r)}function Mx(e,t,n){let r=e.interpolate(t,n);if(!r)return{};let i=r[n],a=e.segments,o=e.points,s=!1,c=!1;for(let e=0;e<a.length;e++){let t=a[e],r=o[t.start][n],l=o[t.end][n];if(Fh(i,r,l)){s=i===r,c=i===l;break}}return{first:s,last:c,point:r}}var Nx=class{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,n){let{x:r,y:i,radius:a}=this;return t||={start:0,end:J},e.arc(r,i,a,t.end,t.start,!0),!n.bounds}interpolate(e){let{x:t,y:n,radius:r}=this,i=e.angle;return{x:t+Math.cos(i)*r,y:n+Math.sin(i)*r,angle:i}}};function Px(e){let{chart:t,fill:n,line:r}=e;if(U(n))return Fx(t,n);if(n===`stack`)return kx(e);if(n===`shape`)return!0;let i=Ix(e);return i instanceof Nx?i:xx(i,r)}function Fx(e,t){let n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function Ix(e){return(e.scale||{}).getPointPositionForValue?Rx(e):Lx(e)}function Lx(e){let{scale:t={},fill:n}=e,r=Ex(n,t);if(U(r)){let e=t.isHorizontal();return{x:e?r:null,y:e?null:r}}return null}function Rx(e){let{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,a=r.reverse?t.max:t.min,o=Dx(n,t,a),s=[];if(r.grid.circular){let e=t.getPointPositionForValue(0,a);return new Nx({x:e.x,y:e.y,radius:t.getDistanceFromCenterForValue(o)})}for(let e=0;e<i;++e)s.push(t.getPointPositionForValue(e,o));return s}function zx(e,t,n){let r=Px(t),{chart:i,index:a,line:o,scale:s,axis:c}=t,l=o.options,u=l.fill,d=l.backgroundColor,{above:f=d,below:p=d}=u||{},m=sv(i,i.getDatasetMeta(a));r&&o.points.length&&(Og(e,n),Bx(e,{line:o,target:r,above:f,below:p,area:n,scale:s,axis:c,clip:m}),kg(e))}function Bx(e,t){let{line:n,target:r,above:i,below:a,area:o,scale:s,clip:c}=t,l=n._loop?`angle`:t.axis;e.save();let u=a;a!==i&&(l===`x`?(Vx(e,r,o.top),Ux(e,{line:n,target:r,color:i,scale:s,property:l,clip:c}),e.restore(),e.save(),Vx(e,r,o.bottom)):l===`y`&&(Hx(e,r,o.left),Ux(e,{line:n,target:r,color:a,scale:s,property:l,clip:c}),e.restore(),e.save(),Hx(e,r,o.right),u=i)),Ux(e,{line:n,target:r,color:u,scale:s,property:l,clip:c}),e.restore()}function Vx(e,t,n){let{segments:r,points:i}=t,a=!0,o=!1;e.beginPath();for(let s of r){let{start:r,end:c}=s,l=i[r],u=i[yx(r,c,i)];a?(e.moveTo(l.x,l.y),a=!1):(e.lineTo(l.x,n),e.lineTo(l.x,l.y)),o=!!t.pathSegment(e,s,{move:o}),o?e.closePath():e.lineTo(u.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function Hx(e,t,n){let{segments:r,points:i}=t,a=!0,o=!1;e.beginPath();for(let s of r){let{start:r,end:c}=s,l=i[r],u=i[yx(r,c,i)];a?(e.moveTo(l.x,l.y),a=!1):(e.lineTo(n,l.y),e.lineTo(l.x,l.y)),o=!!t.pathSegment(e,s,{move:o}),o?e.closePath():e.lineTo(n,u.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function Ux(e,t){let{line:n,target:r,property:i,color:a,scale:o,clip:s}=t,c=gx(n,r,i);for(let{source:t,target:l,start:u,end:d}of c){let{style:{backgroundColor:c=a}={}}=t,f=r!==!0;e.save(),e.fillStyle=c,Wx(e,o,s,f&&_x(i,u,d)),e.beginPath();let p=!!n.pathSegment(e,t),m;if(f){p?e.closePath():Gx(e,r,d,i);let t=!!r.pathSegment(e,l,{move:p,reverse:!0});m=p&&t,m||Gx(e,r,u,i)}e.closePath(),e.fill(m?`evenodd`:`nonzero`),e.restore()}}function Wx(e,t,n,r){let i=t.chart.chartArea,{property:a,start:o,end:s}=r||{};if(a===`x`||a===`y`){let t,r,c,l;a===`x`?(t=o,r=i.top,c=s,l=i.bottom):(t=i.left,r=o,c=i.right,l=s),e.beginPath(),n&&(t=Math.max(t,n.left),c=Math.min(c,n.right),r=Math.max(r,n.top),l=Math.min(l,n.bottom)),e.rect(t,r,c-t,l-r),e.clip()}}function Gx(e,t,n,r){let i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var Kx={id:`filler`,afterDatasetsUpdate(e,t,n){let r=(e.data.datasets||[]).length,i=[],a,o,s,c;for(o=0;o<r;++o)a=e.getDatasetMeta(o),s=a.dataset,c=null,s&&s.options&&s instanceof px&&(c={visible:e.isDatasetVisible(o),index:o,fill:wx(s,o,r),chart:e,axis:a.controller.options.indexAxis,scale:a.vScale,line:s}),a.$filler=c,i.push(c);for(o=0;o<r;++o)c=i[o],!(!c||c.fill===!1)&&(c.fill=Cx(i,o,n.propagate))},beforeDraw(e,t,n){let r=n.drawTime===`beforeDraw`,i=e.getSortedVisibleDatasetMetas(),a=e.chartArea;for(let t=i.length-1;t>=0;--t){let n=i[t].$filler;n&&(n.line.updateControlPoints(a,n.axis),r&&n.fill&&zx(e.ctx,n,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!==`beforeDatasetsDraw`)return;let r=e.getSortedVisibleDatasetMetas();for(let t=r.length-1;t>=0;--t){let n=r[t].$filler;Sx(n)&&zx(e.ctx,n,e.chartArea)}},beforeDatasetDraw(e,t,n){let r=t.meta.$filler;!Sx(r)||n.drawTime!==`beforeDatasetDraw`||zx(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:`beforeDatasetDraw`}},qx=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Jx=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index,Yx=class extends Iy{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},t=G(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,n)=>e.sort(t,n,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}let n=e.labels,r=Z(n.font),i=r.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:s}=qx(n,i),c,l;t.font=r.string,this.isHorizontal()?(c=this.maxWidth,l=this._fitRows(a,i,o,s)+10):(l=this.maxHeight,c=this._fitCols(a,r,o,s)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(l,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){let{ctx:i,maxWidth:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.lineWidths=[0],l=r+o,u=e;i.textAlign=`left`,i.textBaseline=`middle`;let d=-1,f=-l;return this.legendItems.forEach((e,p)=>{let m=n+t/2+i.measureText(e.text).width;(p===0||c[c.length-1]+m+2*o>a)&&(u+=l,c[c.length-(p>0?0:1)]=0,f+=l,d++),s[p]={left:0,top:f,row:d,width:m,height:r},c[c.length-1]+=m+o}),u}_fitCols(e,t,n,r){let{ctx:i,maxHeight:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.columnSizes=[],l=a-e,u=o,d=0,f=0,p=0,m=0;return this.legendItems.forEach((e,a)=>{let{itemWidth:h,itemHeight:g}=Xx(n,t,i,e,r);a>0&&f+g+2*o>l&&(u+=d+o,c.push({width:d,height:f}),p+=d+o,m++,d=f=0),s[a]={left:p,top:f,col:m,width:h,height:g},d=Math.max(d,h),f+=g+o}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:i}}=this,a=W_(i,this.left,this.width);if(this.isHorizontal()){let i=0,o=Jh(n,this.left+r,this.right-this.lineWidths[i]);for(let s of t)i!==s.row&&(i=s.row,o=Jh(n,this.left+r,this.right-this.lineWidths[i])),s.top+=this.top+e+r,s.left=a.leftForLtr(a.x(o),s.width),o+=s.width+r}else{let i=0,o=Jh(n,this.top+e+r,this.bottom-this.columnSizes[i].height);for(let s of t)s.col!==i&&(i=s.col,o=Jh(n,this.top+e+r,this.bottom-this.columnSizes[i].height)),s.top=o,s.left+=this.left+r,s.left=a.leftForLtr(a.x(s.left),s.width),o+=s.height+r}}isHorizontal(){return this.options.position===`top`||this.options.position===`bottom`}draw(){if(this.options.display){let e=this.ctx;Og(e,this),this._draw(),kg(e)}}_draw(){let{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:i,labels:a}=e,o=X.color,s=W_(e.rtl,this.left,this.width),c=Z(a.font),{padding:l}=a,u=c.size,d=u/2,f;this.drawTitle(),r.textAlign=s.textAlign(`left`),r.textBaseline=`middle`,r.lineWidth=.5,r.font=c.string;let{boxWidth:p,boxHeight:m,itemHeight:h}=qx(a,u),g=function(e,t,n){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;r.save();let i=W(n.lineWidth,1);if(r.fillStyle=W(n.fillStyle,o),r.lineCap=W(n.lineCap,`butt`),r.lineDashOffset=W(n.lineDashOffset,0),r.lineJoin=W(n.lineJoin,`miter`),r.lineWidth=i,r.strokeStyle=W(n.strokeStyle,o),r.setLineDash(W(n.lineDash,[])),a.usePointStyle)Eg(r,{radius:m*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:i},s.xPlus(e,p/2),t+d,a.pointStyleWidth&&p);else{let a=t+Math.max((u-m)/2,0),o=s.leftForLtr(e,p),c=Ug(n.borderRadius);r.beginPath(),Object.values(c).some(e=>e!==0)?Ig(r,{x:o,y:a,w:p,h:m,radius:c}):r.rect(o,a,p,m),r.fill(),i!==0&&r.stroke()}r.restore()},_=function(e,t,n){Fg(r,n.text,e,t+h/2,c,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})},v=this.isHorizontal(),y=this._computeTitleHeight();f=v?{x:Jh(i,this.left+l,this.right-n[0]),y:this.top+l+y,line:0}:{x:this.left+l,y:Jh(i,this.top+y+l,this.bottom-t[0].height),line:0},G_(this.ctx,e.textDirection);let b=h+l;this.legendItems.forEach((o,u)=>{r.strokeStyle=o.fontColor,r.fillStyle=o.fontColor;let m=r.measureText(o.text).width,h=s.textAlign(o.textAlign||=a.textAlign),x=p+d+m,S=f.x,C=f.y;if(s.setWidth(this.width),v?u>0&&S+x+l>this.right&&(C=f.y+=b,f.line++,S=f.x=Jh(i,this.left+l,this.right-n[f.line])):u>0&&C+b>this.bottom&&(S=f.x=S+t[f.line].width+l,f.line++,C=f.y=Jh(i,this.top+y+l,this.bottom-t[f.line].height)),g(s.x(S),C,o),S=Yh(h,S+p+d,v?S+x:this.right,e.rtl),_(s.x(S),C,o),v)f.x+=x+l;else if(typeof o.text!=`string`){let e=c.lineHeight;f.y+=$x(o,e)+l}else f.y+=b}),K_(this.ctx,e.textDirection)}drawTitle(){let e=this.options,t=e.title,n=Z(t.font),r=Wg(t.padding);if(!t.display)return;let i=W_(e.rtl,this.left,this.width),a=this.ctx,o=t.position,s=n.size/2,c=r.top+s,l,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),l=this.top+c,u=Jh(e.align,u,this.right-d);else{let t=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);l=c+Jh(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}let f=Jh(o,u,u+d);a.textAlign=i.textAlign(qh(o)),a.textBaseline=`middle`,a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,Fg(a,t.text,f,l,n)}_computeTitleHeight(){let e=this.options.title,t=Z(e.font),n=Wg(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,i;if(Fh(e,this.left,this.right)&&Fh(t,this.top,this.bottom)){for(i=this.legendHitBoxes,n=0;n<i.length;++n)if(r=i[n],Fh(e,r.left,r.left+r.width)&&Fh(t,r.top,r.top+r.height))return this.legendItems[n]}return null}handleEvent(e){let t=this.options;if(!eS(e.type,t))return;let n=this._getLegendItemAt(e.x,e.y);if(e.type===`mousemove`||e.type===`mouseout`){let r=this._hoveredItem,i=Jx(r,n);r&&!i&&G(t.onLeave,[e,r,this],this),this._hoveredItem=n,n&&!i&&G(t.onHover,[e,n,this],this)}else n&&G(t.onClick,[e,n,this],this)}};function Xx(e,t,n,r,i){return{itemWidth:Zx(r,e,t,n),itemHeight:Qx(i,r,t.lineHeight)}}function Zx(e,t,n,r){let i=e.text;return i&&typeof i!=`string`&&(i=i.reduce((e,t)=>e.length>t.length?e:t)),t+n.size/2+r.measureText(i).width}function Qx(e,t,n){let r=e;return typeof t.text!=`string`&&(r=$x(t,n)),r}function $x(e,t){return t*(e.text?e.text.length:0)}function eS(e,t){return!!((e===`mousemove`||e===`mouseout`)&&(t.onHover||t.onLeave)||t.onClick&&(e===`click`||e===`mouseup`))}var tS={id:`legend`,_element:Yx,start(e,t,n){let r=e.legend=new Yx({ctx:e.ctx,options:n,chart:e});fy.configure(e,r,n),fy.addBox(e,r)},stop(e){fy.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){let r=e.legend;fy.configure(e,r,n),r.options=n},afterUpdate(e){let t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:`top`,align:`center`,fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){let r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{let c=e.controller.getStyle(n?0:void 0),l=Wg(c.borderWidth);return{text:t[e.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(s||c.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:`center`,text:``}},descriptors:{_scriptable:e=>!e.startsWith(`on`),labels:{_scriptable:e=>![`generateLabels`,`filter`,`sort`].includes(e)}}},nS={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;t<n;++t){let n=e[t].element;if(n&&n.hasValue()){let e=n.tooltipPosition();r.add(e.x),i+=e.y,++a}}return a===0||r.size===0?!1:{x:[...r].reduce((e,t)=>e+t)/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=1/0,a,o,s;for(a=0,o=e.length;a<o;++a){let n=e[a].element;if(n&&n.hasValue()){let e=kh(t,n.getCenterPoint());e<i&&(i=e,s=n)}}if(s){let e=s.tooltipPosition();n=e.x,r=e.y}return{x:n,y:r}}};function rS(e,t){return t&&(V(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function iS(e){return(typeof e==`string`||e instanceof String)&&e.indexOf(`
|
|
41
|
-
`)>-1?e.split(`
|
|
42
|
-
`):e}function aS(e,t){let{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:e,label:o,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function oS(e,t){let n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,c=Z(t.bodyFont),l=Z(t.titleFont),u=Z(t.footerFont),d=a.length,f=i.length,p=r.length,m=Wg(t.padding),h=m.height,g=0,_=r.reduce((e,t)=>e+t.before.length+t.lines.length+t.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*l.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),_){let e=t.displayColors?Math.max(s,c.lineHeight):c.lineHeight;h+=p*e+(_-p)*c.lineHeight+(_-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0,y=function(e){g=Math.max(g,n.measureText(e).width+v)};return n.save(),n.font=l.string,K(e.title,y),n.font=c.string,K(e.beforeBody.concat(e.afterBody),y),v=t.displayColors?o+2+t.boxPadding:0,K(r,e=>{K(e.before,y),K(e.lines,y),K(e.after,y)}),v=0,n.font=u.string,K(e.footer,y),n.restore(),g+=m.width,{width:g,height:h}}function sS(e,t){let{y:n,height:r}=t;return n<r/2?`top`:n>e.height-r/2?`bottom`:`center`}function cS(e,t,n,r){let{x:i,width:a}=r,o=n.caretSize+n.caretPadding;if(e===`left`&&i+a+o>t.width||e===`right`&&i-a-o<0)return!0}function lS(e,t,n,r){let{x:i,width:a}=n,{width:o,chartArea:{left:s,right:c}}=e,l=`center`;return r===`center`?l=i<=(s+c)/2?`left`:`right`:i<=a/2?l=`left`:i>=o-a/2&&(l=`right`),cS(l,e,t,n)&&(l=`center`),l}function uS(e,t,n){let r=n.yAlign||t.yAlign||sS(e,n);return{xAlign:n.xAlign||t.xAlign||lS(e,t,n,r),yAlign:r}}function dS(e,t){let{x:n,width:r}=e;return t===`right`?n-=r:t===`center`&&(n-=r/2),n}function fS(e,t,n){let{y:r,height:i}=e;return t===`top`?r+=n:t===`bottom`?r-=i+n:r-=i/2,r}function pS(e,t,n,r){let{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:s,yAlign:c}=n,l=i+a,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Ug(o),m=dS(t,s),h=fS(t,c,l);return c===`center`?s===`left`?m+=l:s===`right`&&(m-=l):s===`left`?m-=Math.max(u,f)+i:s===`right`&&(m+=Math.max(d,p)+i),{x:Nh(m,0,r.width-t.width),y:Nh(h,0,r.height-t.height)}}function mS(e,t,n){let r=Wg(n.padding);return t===`center`?e.x+e.width/2:t===`right`?e.x+e.width-r.right:e.x+r.left}function hS(e){return rS([],iS(e))}function gS(e,t,n){return qg(e,{tooltip:t,tooltipItems:n,type:`tooltip`})}function _S(e,t){let n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}var vS={beforeTitle:Wm,title(e){if(e.length>0){let t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode===`dataset`)return t.dataset.label||``;if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return``},afterTitle:Wm,beforeBody:Wm,beforeLabel:Wm,label(e){if(this&&this.options&&this.options.mode===`dataset`)return e.label+`: `+e.formattedValue||e.formattedValue;let t=e.dataset.label||``;t&&(t+=`: `);let n=e.formattedValue;return B(n)||(t+=n),t},labelColor(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:Wm,afterBody:Wm,beforeFooter:Wm,footer:Wm,afterFooter:Wm};function yS(e,t,n,r){let i=e[t].call(n,r);return i===void 0?vS[t].call(n,r):i}var bS=class extends Iy{static positioners=nS;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let t=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&t.options.animation&&n.animations,i=new fv(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||=gS(this.chart.getContext(),this,this._tooltipItems)}getTitle(e,t){let{callbacks:n}=t,r=yS(n,`beforeTitle`,this,e),i=yS(n,`title`,this,e),a=yS(n,`afterTitle`,this,e),o=[];return o=rS(o,iS(r)),o=rS(o,iS(i)),o=rS(o,iS(a)),o}getBeforeBody(e,t){return hS(yS(t.callbacks,`beforeBody`,this,e))}getBody(e,t){let{callbacks:n}=t,r=[];return K(e,e=>{let t={before:[],lines:[],after:[]},i=_S(n,e);rS(t.before,iS(yS(i,`beforeLabel`,this,e))),rS(t.lines,yS(i,`label`,this,e)),rS(t.after,iS(yS(i,`afterLabel`,this,e))),r.push(t)}),r}getAfterBody(e,t){return hS(yS(t.callbacks,`afterBody`,this,e))}getFooter(e,t){let{callbacks:n}=t,r=yS(n,`beforeFooter`,this,e),i=yS(n,`footer`,this,e),a=yS(n,`afterFooter`,this,e),o=[];return o=rS(o,iS(r)),o=rS(o,iS(i)),o=rS(o,iS(a)),o}_createItems(e){let t=this._active,n=this.chart.data,r=[],i=[],a=[],o=[],s,c;for(s=0,c=t.length;s<c;++s)o.push(aS(this.chart,t[s]));return e.filter&&(o=o.filter((t,r,i)=>e.filter(t,r,i,n))),e.itemSort&&(o=o.sort((t,r)=>e.itemSort(t,r,n))),K(o,t=>{let n=_S(e.callbacks,t);r.push(yS(n,`labelColor`,this,t)),i.push(yS(n,`labelPointStyle`,this,t)),a.push(yS(n,`labelTextColor`,this,t))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=o,o}update(e,t){let n=this.options.setContext(this.getContext()),r=this._active,i,a=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{let e=nS[n.position].call(this,r,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);let t=this._size=oS(this,n),o=Object.assign({},e,t),s=uS(this.chart,n,o),c=pS(n,o,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,i={opacity:1,x:c.x,y:c.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){let i=this.getCaretPosition(e,n,r);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(e,t,n){let{xAlign:r,yAlign:i}=this,{caretSize:a,cornerRadius:o}=n,{topLeft:s,topRight:c,bottomLeft:l,bottomRight:u}=Ug(o),{x:d,y:f}=e,{width:p,height:m}=t,h,g,_,v,y,b;return i===`center`?(y=f+m/2,r===`left`?(h=d,g=h-a,v=y+a,b=y-a):(h=d+p,g=h+a,v=y-a,b=y+a),_=h):(g=r===`left`?d+Math.max(s,l)+a:r===`right`?d+p-Math.max(c,u)-a:this.caretX,i===`top`?(v=f,y=v-a,h=g-a,_=g+a):(v=f+m,y=v+a,h=g+a,_=g-a),b=v),{x1:h,x2:g,x3:_,y1:v,y2:y,y3:b}}drawTitle(e,t,n){let r=this.title,i=r.length,a,o,s;if(i){let c=W_(n.rtl,this.x,this.width);for(e.x=mS(this,n.titleAlign,n),t.textAlign=c.textAlign(n.titleAlign),t.textBaseline=`middle`,a=Z(n.titleFont),o=n.titleSpacing,t.fillStyle=n.titleColor,t.font=a.string,s=0;s<i;++s)t.fillText(r[s],c.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o,s+1===i&&(e.y+=n.titleMarginBottom-o)}}_drawColorBox(e,t,n,r,i){let a=this.labelColors[n],o=this.labelPointStyles[n],{boxHeight:s,boxWidth:c}=i,l=Z(i.bodyFont),u=mS(this,`left`,i),d=r.x(u),f=s<l.lineHeight?(l.lineHeight-s)/2:0,p=t.y+f;if(i.usePointStyle){let t={radius:Math.min(c,s)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},n=r.leftForLtr(d,c)+c/2,l=p+s/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,Tg(e,t,n,l),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,Tg(e,t,n,l)}else{e.lineWidth=H(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;let t=r.leftForLtr(d,c),n=r.leftForLtr(r.xPlus(d,1),c-2),o=Ug(a.borderRadius);Object.values(o).some(e=>e!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,Ig(e,{x:t,y:p,w:c,h:s,radius:o}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),Ig(e,{x:n,y:p+1,w:c-2,h:s-2,radius:o}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(t,p,c,s),e.strokeRect(t,p,c,s),e.fillStyle=a.backgroundColor,e.fillRect(n,p+1,c-2,s-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){let{body:r}=this,{bodySpacing:i,bodyAlign:a,displayColors:o,boxHeight:s,boxWidth:c,boxPadding:l}=n,u=Z(n.bodyFont),d=u.lineHeight,f=0,p=W_(n.rtl,this.x,this.width),m=function(n){t.fillText(n,p.x(e.x+f),e.y+d/2),e.y+=d+i},h=p.textAlign(a),g,_,v,y,b,x,S;for(t.textAlign=a,t.textBaseline=`middle`,t.font=u.string,e.x=mS(this,h,n),t.fillStyle=n.bodyColor,K(this.beforeBody,m),f=o&&h!==`right`?a===`center`?c/2+l:c+2+l:0,y=0,x=r.length;y<x;++y){for(g=r[y],_=this.labelTextColors[y],t.fillStyle=_,K(g.before,m),v=g.lines,o&&v.length&&(this._drawColorBox(t,e,y,p,n),d=Math.max(u.lineHeight,s)),b=0,S=v.length;b<S;++b)m(v[b]),d=u.lineHeight;K(g.after,m)}f=0,d=u.lineHeight,K(this.afterBody,m),e.y-=i}drawFooter(e,t,n){let r=this.footer,i=r.length,a,o;if(i){let s=W_(n.rtl,this.x,this.width);for(e.x=mS(this,n.footerAlign,n),e.y+=n.footerMarginTop,t.textAlign=s.textAlign(n.footerAlign),t.textBaseline=`middle`,a=Z(n.footerFont),t.fillStyle=n.footerColor,t.font=a.string,o=0;o<i;++o)t.fillText(r[o],s.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+n.footerSpacing}}drawBackground(e,t,n,r){let{xAlign:i,yAlign:a}=this,{x:o,y:s}=e,{width:c,height:l}=n,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Ug(r.cornerRadius);t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(o+u,s),a===`top`&&this.drawCaret(e,t,n,r),t.lineTo(o+c-d,s),t.quadraticCurveTo(o+c,s,o+c,s+d),a===`center`&&i===`right`&&this.drawCaret(e,t,n,r),t.lineTo(o+c,s+l-p),t.quadraticCurveTo(o+c,s+l,o+c-p,s+l),a===`bottom`&&this.drawCaret(e,t,n,r),t.lineTo(o+f,s+l),t.quadraticCurveTo(o,s+l,o,s+l-f),a===`center`&&i===`left`&&this.drawCaret(e,t,n,r),t.lineTo(o,s+u),t.quadraticCurveTo(o,s,o+u,s),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){let t=this.chart,n=this.$animations,r=n&&n.x,i=n&&n.y;if(r||i){let n=nS[e.position].call(this,this._active,this._eventPosition);if(!n)return;let a=this._size=oS(this,e),o=Object.assign({},n,this._size),s=uS(t,e,o),c=pS(e,o,s,t);(r._to!==c.x||i._to!==c.y)&&(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){let t=this.options.setContext(this.getContext()),n=this.opacity;if(!n)return;this._updateAnimationTarget(t);let r={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;let a=Wg(t.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&o&&(e.save(),e.globalAlpha=n,this.drawBackground(i,e,r,t),G_(e,t.textDirection),i.y+=a.top,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),K_(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){let n=this._active,r=e.map(({datasetIndex:e,index:t})=>{let n=this.chart.getDatasetMeta(e);if(!n)throw Error(`Cannot find a dataset at index `+e);return{datasetIndex:e,element:n.data[t],index:t}}),i=!Ym(n,r),a=this._positionChanged(r,t);(i||a)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,n=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let r=this.options,i=this._active||[],a=this._getActiveElements(e,i,t,n),o=this._positionChanged(a,e),s=t||!Ym(a,i)||o;return s&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),s}_getActiveElements(e,t,n,r){let i=this.options;if(e.type===`mouseout`)return[];if(!r)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)!==void 0);let a=this.chart.getElementsAtEventForMode(e,i.mode,i,n);return i.reverse&&a.reverse(),a}_positionChanged(e,t){let{caretX:n,caretY:r,options:i}=this,a=nS[i.position].call(this,e,t);return a!==!1&&(n!==a.x||r!==a.y)}},xS={id:`tooltip`,_element:bS,positioners:nS,afterInit(e,t,n){n&&(e.tooltip=new bS({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){let t=e.tooltip;if(t&&t._willRender()){let n={tooltip:t};if(e.notifyPlugins(`beforeTooltipDraw`,{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins(`afterTooltipDraw`,n)}},afterEvent(e,t){if(e.tooltip){let n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:`average`,backgroundColor:`rgba(0,0,0,0.8)`,titleColor:`#fff`,titleFont:{weight:`bold`},titleSpacing:2,titleMarginBottom:6,titleAlign:`left`,bodyColor:`#fff`,bodySpacing:2,bodyFont:{},bodyAlign:`left`,footerColor:`#fff`,footerSpacing:2,footerMarginTop:6,footerFont:{weight:`bold`},footerAlign:`left`,padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:`#fff`,displayColors:!0,boxPadding:0,borderColor:`rgba(0,0,0,0)`,borderWidth:0,animation:{duration:400,easing:`easeOutQuart`},animations:{numbers:{type:`number`,properties:[`x`,`y`,`width`,`height`,`caretX`,`caretY`]},opacity:{easing:`linear`,duration:200}},callbacks:vS},defaultRoutes:{bodyFont:`font`,footerFont:`font`,titleFont:`font`},descriptors:{_scriptable:e=>e!==`filter`&&e!==`itemSort`&&e!==`external`,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:`animation`}},additionalOptionScopes:[`interaction`]},SS=(e,t,n,r)=>(typeof t==`string`?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function CS(e,t,n,r){let i=e.indexOf(t);return i===-1?SS(e,t,n,r):i===e.lastIndexOf(t)?i:n}var wS=(e,t)=>e===null?null:Nh(Math.round(e),0,t);function TS(e){let t=this.getLabels();return e>=0&&e<t.length?t[e]:e}var ES=class extends nb{static id=`category`;static defaults={ticks:{callback:TS}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let t=this._addedLabels;if(t.length){let e=this.getLabels();for(let{index:n,label:r}of t)e[n]===r&&e.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(B(e))return null;let n=this.getLabels();return t=isFinite(t)&&n[t]===e?t:CS(n,e,W(t,e),this._addedLabels),wS(t,n.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),{min:n,max:r}=this.getMinMax(!0);this.options.bounds===`ticks`&&(e||(n=0),t||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){let e=this.min,t=this.max,n=this.options.offset,r=[],i=this.getLabels();i=e===0&&t===i.length-1?i:i.slice(e,t+1),this._valueRange=Math.max(i.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=e;n<=t;n++)r.push({value:n});return r}getLabelForValue(e){return TS.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!=`number`&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}};function DS(e,t){let n=[],{bounds:r,step:i,min:a,max:o,precision:s,count:c,maxTicks:l,maxDigits:u,includeBounds:d}=e,f=i||1,p=l-1,{min:m,max:h}=t,g=!B(a),_=!B(o),v=!B(c),y=(h-m)/(u+1),b=yh((h-m)/p/f)*f,x,S,C,w;if(b<1e-14&&!g&&!_)return[{value:m},{value:h}];w=Math.ceil(h/b)-Math.floor(m/b),w>p&&(b=yh(w*b/p/f)*f),B(s)||(x=10**s,b=Math.ceil(b*x)/x),r===`ticks`?(S=Math.floor(m/b)*b,C=Math.ceil(h/b)*b):(S=m,C=h),g&&_&&i&&Ch((o-a)/i,b/1e3)?(w=Math.round(Math.min((o-a)/b,l)),b=(o-a)/w,S=a,C=o):v?(S=g?a:S,C=_?o:C,w=c-1,b=(C-S)/w):(w=(C-S)/b,w=vh(w,Math.round(w),b/1e3)?Math.round(w):Math.ceil(w));let T=Math.max(Dh(b),Dh(S));x=10**(B(s)?T:s),S=Math.round(S*x)/x,C=Math.round(C*x)/x;let E=0;for(g&&(d&&S!==a?(n.push({value:a}),S<a&&E++,vh(Math.round((S+E*b)*x)/x,a,OS(a,y,e))&&E++):S<a&&E++);E<w;++E){let e=Math.round((S+E*b)*x)/x;if(_&&e>o)break;n.push({value:e})}return _&&d&&C!==o?n.length&&vh(n[n.length-1].value,o,OS(o,y,e))?n[n.length-1].value=o:n.push({value:o}):(!_||C===o)&&n.push({value:C}),n}function OS(e,t,{horizontal:n,minRotation:r}){let i=Th(r),a=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(``+e).length;return Math.min(t/a,o)}var kS=class extends nb{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return B(e)||(typeof e==`number`||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:r,max:i}=this,a=e=>r=t?r:e,o=e=>i=n?i:e;if(e){let e=_h(r),t=_h(i);e<0&&t<0?o(0):e>0&&t>0&&a(0)}if(r===i){let t=i===0?1:Math.abs(i*.05);o(i+t),e||a(r-t)}this.min=r,this.max=i}getTickLimit(){let{maxTicksLimit:e,stepSize:t}=this.options.ticks,n;return t?(n=Math.ceil(this.max/t)-Math.floor(this.min/t)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${t} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e||=11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return 1/0}buildTicks(){let e=this.options,t=e.ticks,n=this.getTickLimit();n=Math.max(2,n);let r=DS({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},this._range||this);return e.bounds===`ticks`&&wh(r,this,`value`),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){let e=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){let r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return dg(e,this.chart.options.locale,this.options.ticks.format)}},AS=class extends kS{static id=`linear`;static defaults={ticks:{callback:mg.formatters.numeric}};determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=U(e)?e:0,this.max=U(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),t=e?this.width:this.height,n=Th(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}},jS=e=>Math.floor(gh(e)),MS=(e,t)=>10**(jS(e)+t);function NS(e){return e/10**jS(e)==1}function PS(e,t,n){let r=10**n,i=Math.floor(e/r);return Math.ceil(t/r)-i}function FS(e,t){let n=jS(t-e);for(;PS(e,t,n)>10;)n++;for(;PS(e,t,n)<10;)n--;return Math.min(n,jS(e))}function IS(e,{min:t,max:n}){t=Km(e.min,t);let r=[],i=jS(t),a=FS(t,n),o=a<0?10**Math.abs(a):1,s=10**a,c=i>a?10**i:0,l=Math.round((t-c)*o)/o,u=Math.floor((t-c)/s/10)*s*10,d=Math.floor((l-u)/10**a),f=Km(e.min,Math.round((c+u+d*10**a)*o)/o);for(;f<n;)r.push({value:f,major:NS(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,o=a>=0?1:o),f=Math.round((c+u+d*10**a)*o)/o;let p=Km(e.max,f);return r.push({value:p,major:NS(p),significand:d}),r}(class extends nb{static id=`logarithmic`;static defaults={ticks:{callback:mg.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){let n=kS.prototype.parse.apply(this,[e,t]);if(n===0){this._zero=!0;return}return U(n)&&n>0?n:null}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=U(e)?Math.max(0,e):null,this.max=U(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!U(this._userMin)&&(this.min=e===MS(this.min,0)?MS(this.min,-1):MS(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),n=this.min,r=this.max,i=t=>n=e?n:t,a=e=>r=t?r:e;n===r&&(n<=0?(i(1),a(10)):(i(MS(n,-1)),a(MS(r,1)))),n<=0&&i(MS(r,-1)),r<=0&&a(MS(n,1)),this.min=n,this.max=r}buildTicks(){let e=this.options,t=IS({min:this._userMin,max:this._userMax},this);return e.bounds===`ticks`&&wh(t,this,`value`),e.reverse?(t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),t}getLabelForValue(e){return e===void 0?`0`:dg(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=gh(e),this._valueRange=gh(this.max)-gh(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(gh(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return 10**(this._startValue+t*this._valueRange)}});function LS(e){let t=e.ticks;if(t.display&&e.display){let e=Wg(t.backdropPadding);return W(t.font&&t.font.size,X.font.size)+e.height}return 0}function RS(e,t,n){return n=V(n)?n:[n],{w:Sg(e,t.string,n),h:n.length*t.lineHeight}}function zS(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function BS(e){let t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],a=e._pointLabels.length,o=e.options.pointLabels,s=o.centerPointLabels?q/a:0;for(let c=0;c<a;c++){let a=o.setContext(e.getPointLabelContext(c));i[c]=a.padding;let l=e.getPointPosition(c,e.drawingArea+i[c],s),u=Z(a.font),d=RS(e.ctx,u,e._pointLabels[c]);r[c]=d;let f=jh(e.getIndexAngle(c)+s),p=Math.round(Eh(f));VS(n,t,f,zS(p,l.x,d.w,0,180),zS(p,l.y,d.h,90,270))}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=WS(e,r,i)}function VS(e,t,n,r,i){let a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n)),s=0,c=0;r.start<t.l?(s=(t.l-r.start)/a,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/a,e.r=Math.max(e.r,t.r+s)),i.start<t.t?(c=(t.t-i.start)/o,e.t=Math.min(e.t,t.t-c)):i.end>t.b&&(c=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+c))}function HS(e,t,n){let r=e.drawingArea,{extra:i,additionalAngle:a,padding:o,size:s}=n,c=e.getPointPosition(t,r+i+o,a),l=Math.round(Eh(jh(c.angle+Y))),u=qS(c.y,s.h,l),d=GS(l),f=KS(c.x,s.w,d);return{visible:!0,x:c.x,y:u,textAlign:d,left:f,top:u,right:f+s.w,bottom:u+s.h}}function US(e,t){if(!t)return!0;let{left:n,top:r,right:i,bottom:a}=e;return!(Dg({x:n,y:r},t)||Dg({x:n,y:a},t)||Dg({x:i,y:r},t)||Dg({x:i,y:a},t))}function WS(e,t,n){let r=[],i=e._pointLabels.length,a=e.options,{centerPointLabels:o,display:s}=a.pointLabels,c={extra:LS(a)/2,additionalAngle:o?q/i:0},l;for(let a=0;a<i;a++){c.padding=n[a],c.size=t[a];let i=HS(e,a,c);r.push(i),s===`auto`&&(i.visible=US(i,l),i.visible&&(l=i))}return r}function GS(e){return e===0||e===180?`center`:e<180?`left`:`right`}function KS(e,t,n){return n===`right`?e-=t:n===`center`&&(e-=t/2),e}function qS(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function JS(e,t,n){let{left:r,top:i,right:a,bottom:o}=n,{backdropColor:s}=t;if(!B(s)){let n=Ug(t.borderRadius),c=Wg(t.backdropPadding);e.fillStyle=s;let l=r-c.left,u=i-c.top,d=a-r+c.width,f=o-i+c.height;Object.values(n).some(e=>e!==0)?(e.beginPath(),Ig(e,{x:l,y:u,w:d,h:f,radius:n}),e.fill()):e.fillRect(l,u,d,f)}}function YS(e,t){let{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){let t=e._pointLabelItems[i];if(!t.visible)continue;let a=r.setContext(e.getPointLabelContext(i));JS(n,a,t);let o=Z(a.font),{x:s,y:c,textAlign:l}=t;Fg(n,e._pointLabels[i],s,c+o.lineHeight/2,o,{color:a.color,textAlign:l,textBaseline:`middle`})}}function XS(e,t,n,r){let{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,J);else{let n=e.getPointPosition(0,t);i.moveTo(n.x,n.y);for(let a=1;a<r;a++)n=e.getPointPosition(a,t),i.lineTo(n.x,n.y)}}function ZS(e,t,n,r,i){let a=e.ctx,o=t.circular,{color:s,lineWidth:c}=t;!o&&!r||!s||!c||n<0||(a.save(),a.strokeStyle=s,a.lineWidth=c,a.setLineDash(i.dash||[]),a.lineDashOffset=i.dashOffset,a.beginPath(),XS(e,n,o,r),a.closePath(),a.stroke(),a.restore())}function QS(e,t,n){return qg(e,{label:n,index:t,type:`pointLabel`})}(class extends kS{static id=`radialLinear`;static defaults={display:!0,animate:!0,position:`chartArea`,angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:mg.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":`borderColor`,"pointLabels.color":`color`,"ticks.color":`color`};static descriptors={angleLines:{_fallback:`grid`}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let e=this._padding=Wg(LS(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!1);this.min=U(e)&&!isNaN(e)?e:0,this.max=U(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/LS(this.options))}generateTickLabels(e){kS.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((e,t)=>{let n=G(this.options.pointLabels.callback,[e,t],this);return n||n===0?n:``}).filter((e,t)=>this.chart.getDataVisibility(t))}fit(){let e=this.options;e.display&&e.pointLabels.display?BS(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}getIndexAngle(e){let t=J/(this._pointLabels.length||1),n=this.options.startAngle||0;return jh(e*t+Th(n))}getDistanceFromCenterForValue(e){if(B(e))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(B(e))return NaN;let t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){let t=this._pointLabels||[];if(e>=0&&e<t.length){let n=t[e];return QS(this.getContext(),e,n)}}getPointPosition(e,t,n=0){let r=this.getIndexAngle(e)-Y+n;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){let{left:t,top:n,right:r,bottom:i}=this._pointLabelItems[e];return{left:t,top:n,right:r,bottom:i}}drawBackground(){let{backgroundColor:e,grid:{circular:t}}=this.options;if(e){let n=this.ctx;n.save(),n.beginPath(),XS(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){let e=this.ctx,t=this.options,{angleLines:n,grid:r,border:i}=t,a=this._pointLabels.length,o,s,c;if(t.pointLabels.display&&YS(this,a),r.display&&this.ticks.forEach((e,t)=>{if(t!==0||t===0&&this.min<0){s=this.getDistanceFromCenterForValue(e.value);let n=this.getContext(t),o=r.setContext(n),c=i.setContext(n);ZS(this,o,s,a,c)}}),n.display){for(e.save(),o=a-1;o>=0;o--){let r=n.setContext(this.getPointLabelContext(o)),{color:i,lineWidth:a}=r;!a||!i||(e.lineWidth=a,e.strokeStyle=i,e.setLineDash(r.borderDash),e.lineDashOffset=r.borderDashOffset,s=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(o,s),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let r=this.getIndexAngle(0),i,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign=`center`,e.textBaseline=`middle`,this.ticks.forEach((r,o)=>{if(o===0&&this.min>=0&&!t.reverse)return;let s=n.setContext(this.getContext(o)),c=Z(s.font);if(i=this.getDistanceFromCenterForValue(this.ticks[o].value),s.showLabelBackdrop){e.font=c.string,a=e.measureText(r.label).width,e.fillStyle=s.backdropColor;let t=Wg(s.backdropPadding);e.fillRect(-a/2-t.left,-i-c.size/2-t.top,a+t.width,c.size+t.height)}Fg(e,r.label,0,-i,c,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})}),e.restore()}drawTitle(){}});var $S={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},eC=Object.keys($S);function tC(e,t){return e-t}function nC(e,t){if(B(t))return null;let n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts,o=t;return typeof r==`function`&&(o=r(o)),U(o)||(o=typeof r==`string`?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i===`week`&&(Sh(a)||a===!0)?n.startOf(o,`isoWeek`,a):n.startOf(o,i)),+o)}function rC(e,t,n,r){let i=eC.length;for(let a=eC.indexOf(e);a<i-1;++a){let e=$S[eC[a]],i=e.steps?e.steps:2**53-1;if(e.common&&Math.ceil((n-t)/(i*e.size))<=r)return eC[a]}return eC[i-1]}function iC(e,t,n,r,i){for(let a=eC.length-1;a>=eC.indexOf(n);a--){let n=eC[a];if($S[n].common&&e._adapter.diff(i,r,n)>=t-1)return n}return eC[n?eC.indexOf(n):0]}function aC(e){for(let t=eC.indexOf(e)+1,n=eC.length;t<n;++t)if($S[eC[t]].common)return eC[t]}function oC(e,t,n){if(!n)e[t]=!0;else if(n.length){let{lo:r,hi:i}=Ih(n,t),a=n[r]>=t?n[r]:n[i];e[a]=!0}}function sC(e,t,n,r){let i=e._adapter,a=+i.startOf(t[0].value,r),o=t[t.length-1].value,s,c;for(s=a;s<=o;s=+i.add(s,1,r))c=n[s],c>=0&&(t[c].major=!0);return t}function cC(e,t,n){let r=[],i={},a=t.length,o,s;for(o=0;o<a;++o)s=t[o],i[s]=o,r.push({value:s,major:!1});return a===0||!n?r:sC(e,r,i,n)}var lC=class extends nb{static id=`time`;static defaults={bounds:`data`,adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:`millisecond`,displayFormats:{}},ticks:{source:`auto`,callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit=`day`,this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){let n=e.time||={},r=this._adapter=new Bv._date(e.adapters.date);r.init(t),eh(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return e===void 0?null:nC(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let e=this.options,t=this._adapter,n=e.time.unit||`day`,{min:r,max:i,minDefined:a,maxDefined:o}=this.getUserBounds();function s(e){!a&&!isNaN(e.min)&&(r=Math.min(r,e.min)),!o&&!isNaN(e.max)&&(i=Math.max(i,e.max))}(!a||!o)&&(s(this._getLabelBounds()),(e.bounds!==`ticks`||e.ticks.source!==`labels`)&&s(this.getMinMax(!1))),r=U(r)&&!isNaN(r)?r:+t.startOf(Date.now(),n),i=U(i)&&!isNaN(i)?i:+t.endOf(Date.now(),n)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){let e=this.getLabelTimestamps(),t=1/0,n=-1/0;return e.length&&(t=e[0],n=e[e.length-1]),{min:t,max:n}}buildTicks(){let e=this.options,t=e.time,n=e.ticks,r=n.source===`labels`?this.getLabelTimestamps():this._generate();e.bounds===`ticks`&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);let i=this.min,a=this.max,o=zh(r,i,a);return this._unit=t.unit||(n.autoSkip?rC(t.minUnit,this.min,this.max,this._getLabelCapacity(i)):iC(this,o.length,t.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit===`year`?void 0:aC(this._unit),this.initOffsets(r),e.reverse&&o.reverse(),cC(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t=0,n=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),t=e.length===1?1-r:(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),n=e.length===1?i:(i-this.getDecimalForValue(e[e.length-2]))/2);let a=e.length<3?.5:.25;t=Nh(t,0,a),n=Nh(n,0,a),this._offsets={start:t,end:n,factor:1/(t+1+n)}}_generate(){let e=this._adapter,t=this.min,n=this.max,r=this.options,i=r.time,a=i.unit||rC(i.minUnit,t,n,this._getLabelCapacity(t)),o=W(r.ticks.stepSize,1),s=a===`week`?i.isoWeekday:!1,c=Sh(s)||s===!0,l={},u=t,d,f;if(c&&(u=+e.startOf(u,`isoWeek`,s)),u=+e.startOf(u,c?`day`:a),e.diff(n,t,a)>1e5*o)throw Error(t+` and `+n+` are too far apart with stepSize of `+o+` `+a);let p=r.ticks.source===`data`&&this.getDataTimestamps();for(d=u,f=0;d<n;d=+e.add(d,o,a),f++)oC(l,d,p);return(d===n||r.bounds===`ticks`||f===1)&&oC(l,d,p),Object.keys(l).sort(tC).map(e=>+e)}getLabelForValue(e){let t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){let n=this.options.time.displayFormats,r=this._unit,i=t||n[r];return this._adapter.format(e,i)}_tickFormatFunction(e,t,n,r){let i=this.options,a=i.ticks.callback;if(a)return G(a,[e,t,n],this);let o=i.time.displayFormats,s=this._unit,c=this._majorUnit,l=s&&o[s],u=c&&o[c],d=n[t],f=c&&u&&d&&d.major;return this._adapter.format(e,r||(f?u:l))}generateTickLabels(e){let t,n,r;for(t=0,n=e.length;t<n;++t)r=e[t],r.label=this._tickFormatFunction(r.value,t,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){let t=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+n)*t.factor)}getValueForPixel(e){let t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){let t=this.options.ticks,n=this.ctx.measureText(e).width,r=Th(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(r),a=Math.sin(r),o=this._resolveTickFontOptions(0).size;return{w:n*i+o*a,h:n*a+o*i}}_getLabelCapacity(e){let t=this.options.time,n=t.displayFormats,r=n[t.unit]||n.millisecond,i=this._tickFormatFunction(e,0,cC(this,[e],this._majorUnit),r),a=this._getLabelSize(i),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let e=this._cache.data||[],t,n;if(e.length)return e;let r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(t=0,n=r.length;t<n;++t)e=e.concat(r[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){let e=this._cache.labels||[],t,n;if(e.length)return e;let r=this.getLabels();for(t=0,n=r.length;t<n;++t)e.push(nC(this,r[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Uh(e.sort(tC))}};function uC(e,t,n){let r=0,i=e.length-1,a,o,s,c;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Lh(e,`pos`,t)),{pos:a,time:s}=e[r],{pos:o,time:c}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Lh(e,`time`,t)),{time:a,pos:s}=e[r],{time:o,pos:c}=e[i]);let l=o-a;return l?s+(c-s)*(t-a)/l:s}(class extends lC{static id=`timeseries`;static defaults=lC.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=uC(t,this.min),this._tableRange=uC(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:t,max:n}=this,r=[],i=[],a,o,s,c,l;for(a=0,o=e.length;a<o;++a)c=e[a],c>=t&&c<=n&&r.push(c);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(a=0,o=r.length;a<o;++a)l=r[a+1],s=r[a-1],c=r[a],Math.round((l+s)/2)!==c&&i.push({time:c,pos:a/(o-1)});return i}_generate(){let e=this.min,t=this.max,n=super.getDataTimestamps();return(!n.includes(e)||!n.length)&&n.splice(0,0,e),(!n.includes(t)||n.length===1)&&n.push(t),n.sort((e,t)=>e-t)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return e=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(uC(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return uC(this._table,n*this._tableRange+this._minPos,!0)}}),Wb.register(Lv,px,hx,AS,ES,Kx,xS,tS,Rv,ex);function dC(e){return{gridColor:e?`rgba(255,255,255,0.1)`:`rgba(0,0,0,0.1)`,textColor:e?`#94a3b8`:`#475569`}}function fC(e){let t=dC(document.body.classList.contains(`dark`)),n=document.getElementById(`memory-chart`);if(n){let r={labels:[],datasets:[{label:`Memory Usage (%)`,data:[],backgroundColor:`rgba(16, 185, 129, 0.1)`,borderColor:`#10b981`,borderWidth:2,fill:!0,tension:.4}]},i={responsive:!0,maintainAspectRatio:!1,scales:{x:{grid:{color:t.gridColor},ticks:{display:!1,color:t.textColor,maxRotation:0,autoSkip:!0,maxTicksLimit:10},title:{display:!1,text:`Time`,color:t.textColor}},y:{display:!0,beginAtZero:!0,max:100,grid:{color:t.gridColor},border:{display:!0,color:t.gridColor},ticks:{display:!0,color:t.textColor,stepSize:25,callback:function(e){return String(e)+`%`}},title:{display:!1,text:`Memory %`,color:t.textColor}}},layout:{padding:0},plugins:{legend:{display:!1},tooltip:{enabled:!0,position:`nearest`,intersect:!1}}},a=new Wb(n,{type:`line`,data:r,options:i});e.charts.memory={data:r,options:i,update:()=>a.update()}}let r=document.getElementById(`cpu-chart`);if(r){let n={labels:[],datasets:[{label:`CPU Usage (%)`,data:[],backgroundColor:`rgba(16, 185, 129, 0.1)`,borderColor:`#10b981`,borderWidth:2,fill:!0,tension:.4}]},i={responsive:!0,maintainAspectRatio:!1,scales:{x:{grid:{color:t.gridColor},ticks:{display:!1,color:t.textColor,maxRotation:0,autoSkip:!0,maxTicksLimit:10},title:{display:!1,text:`Time`,color:t.textColor}},y:{display:!0,beginAtZero:!0,max:100,grid:{color:t.gridColor},border:{display:!0,color:t.gridColor},ticks:{display:!0,color:t.textColor,stepSize:25,callback:function(e){return String(e)+`%`}},title:{display:!1,text:`Cpu %`,color:t.textColor}}},layout:{padding:0},plugins:{legend:{display:!1},tooltip:{enabled:!0,position:`nearest`,intersect:!1}}},a=new Wb(r,{type:`line`,data:n,options:i});e.charts.cpu={data:n,options:i,update:()=>a.update()}}let i=document.getElementById(`traffic-chart`);if(i){let n={labels:[],datasets:[{label:`Requests/s`,data:[],borderColor:`#3b82f6`,backgroundColor:`rgba(59, 130, 246, 0.1)`,fill:!0,tension:.4,yAxisID:`y`},{label:`Avg Response Time (ms)`,data:[],borderColor:`#10b981`,backgroundColor:`rgba(16, 185, 129, 0.1)`,fill:!0,tension:.4,yAxisID:`y1`}]},r={responsive:!0,maintainAspectRatio:!1,scales:{x:{grid:{color:t.gridColor},ticks:{display:!1,color:t.textColor,maxRotation:0,autoSkip:!0,maxTicksLimit:10},title:{display:!0,text:`Time`,color:t.textColor}},y:{type:`linear`,display:!0,position:`left`,grid:{color:t.gridColor},ticks:{color:t.textColor},beginAtZero:!0,title:{display:!0,text:`Requests/s`,color:t.textColor}},y1:{type:`linear`,display:!0,position:`right`,grid:{drawOnChartArea:!1,color:t.gridColor},ticks:{color:`#10b981`},beginAtZero:!0,title:{display:!0,text:`Avg Response Time (ms)`,color:`#10b981`}}},plugins:{legend:{labels:{color:t.textColor}}}},a=new Wb(i,{type:`line`,data:n,options:r});e.charts.traffic={data:n,options:r,update:()=>a.update()}}let a=document.getElementById(`pool-chart`);if(a){let n={labels:[],datasets:[]},r={responsive:!0,maintainAspectRatio:!1,scales:{x:{grid:{color:t.gridColor},ticks:{display:!1,color:t.textColor,maxRotation:0,autoSkip:!0,maxTicksLimit:10},title:{display:!0,text:`Time`,color:t.textColor}},y:{grid:{color:t.gridColor},ticks:{color:t.textColor},beginAtZero:!0,title:{display:!0,text:`Connections`,color:t.textColor}}},plugins:{legend:{labels:{color:t.textColor}}}},i=new Wb(a,{type:`line`,data:n,options:r});e.charts.pool={data:n,options:r,update:()=>i.update()}}}function pC(e,t){e.history.labels=[],e.history.requests=[],e.history.avgResponseTimes=[],e.history.p95ResponseTimes=[],e.history.p99ResponseTimes=[],e.history.cpuUsage=[],e.history.memoryUsage=[],e.history.poolUsage={};let n=e.maxHistoryPoints,r=t.slice(-n),i=(e.status.intervalMs??5e3)/1e3;r.forEach(t=>{let n=new Date(t.timestamp).toLocaleTimeString();e.history.labels.push(n),e.history.requests.push(t.requests/i),e.history.avgResponseTimes.push(t.durationAvg),e.history.p95ResponseTimes??=[],e.history.p95ResponseTimes.push(t.durationP95),e.history.p99ResponseTimes??=[],e.history.p99ResponseTimes.push(t.durationP99);let r=e.status.system?.memory.totalMemory??0;e.history.cpuUsage.push(t.system.cpu),e.history.memoryUsage.push(r>0?t.system.rss/r*100:0),t.pools.forEach(t=>{e.history.poolUsage[t.name]??=[],e.history.poolUsage[t.name]?.push(t.connectionsInUse)})});let a=e.charts.traffic;if(a){a.data.labels=e.history.labels;let t=a.data.datasets[0],n=a.data.datasets[1];t&&(t.data=e.history.requests),n&&(n.data=e.history.avgResponseTimes),a.update()}let o=e.charts.pool;o&&(o.data.labels=e.history.labels,Object.entries(e.history.poolUsage).forEach(([e,t],n)=>{let r=o.data.datasets.find(t=>t.label===e);if(r)r.data=t;else{let i=[`#10b981`,`#f59e0b`,`#3b82f6`,`#8b5cf6`,`#ec4899`];r={label:e,data:t,borderColor:i[n%i.length]??`#3b82f6`,backgroundColor:void 0,fill:void 0,tension:.4},o.data.datasets.push(r)}}),o.update());let s=e.charts.memory;s&&(s.data.labels=e.history.labels,s.data.datasets[0]&&(s.data.datasets[0].data=e.history.memoryUsage),s.update());let c=e.charts.cpu;c&&(c.data.labels=e.history.labels,c.data.datasets[0]&&(c.data.datasets[0].data=e.history.cpuUsage),c.update())}function mC(e,t,n,r,i){let a=e.maxHistoryPoints;e.history.labels.push(t),e.history.requests.push(n),e.history.avgResponseTimes.push(r);let o=e.status.system?.memory.totalMemory??0,s=e.status.history?.at(-1);s?(e.history.cpuUsage.push(s.system.cpu),e.history.memoryUsage.push(o>0?s.system.rss/o*100:0)):(e.history.cpuUsage.push(0),e.history.memoryUsage.push(0)),e.history.labels.length>a&&(e.history.labels.shift(),e.history.requests.shift(),e.history.avgResponseTimes.shift(),e.history.cpuUsage.shift(),e.history.memoryUsage.shift());let c=e.charts.traffic;c?.data.datasets[0]&&c.data.datasets[1]&&(c.data.labels=e.history.labels,c.data.datasets[0].data=e.history.requests,c.data.datasets[1].data=e.history.avgResponseTimes,c.update());let l=e.charts.memory;l?.data.datasets[0]&&(l.data.labels=e.history.labels,l.data.datasets[0].data=e.history.memoryUsage,l.update());let u=e.charts.cpu;u?.data.datasets[0]&&(u.data.labels=e.history.labels,u.data.datasets[0].data=e.history.cpuUsage,u.update());let d=e.charts.pool;d&&(d.data.labels=e.history.labels,i.forEach((t,n)=>{let r=t.name,i=e.history,o=i.poolUsage[r];if(!o){o=[],i.poolUsage[r]=o;let e=[`#10b981`,`#f59e0b`,`#3b82f6`,`#8b5cf6`,`#ec4899`],t=e[n%e.length]??`#3b82f6`;t&&d.data.datasets.push({label:r,data:o,borderColor:t,backgroundColor:void 0,fill:void 0,tension:.4})}o.push(t.connectionsInUse),o.length>a&&o.shift()}),d.update())}function hC(e){if(e<1)return gC(e*1e3);let t=Math.floor(e/(3600*24)),n=Math.floor(e%(3600*24)/3600),r=Math.floor(e%3600/60),i=Math.floor(e%60),a=[];return t>0&&a.push(`${t}d`),n>0&&a.push(`${n}h`),r>0&&a.push(`${r}m`),(i>0||a.length===0)&&a.push(`${i}s`),a.join(` `)}function gC(e){return e===0?`0 ms`:e<1?`${(e*1e3).toFixed(0)} μs`:e<1e3?`${e.toFixed(2)} ms`:hC(e/1e3)}function _C(e){return e?new Date(e).toLocaleString():`-`}function vC(e,t,n){Object.keys(e).forEach(r=>{let i=e[r],a=t[r],o=n[r];(a===void 0||i<a)&&(t[r]=i),(o===void 0||i>o)&&(n[r]=i)})}function yC(e){return{gridColor:e?`rgba(255,255,255,0.1)`:`rgba(0,0,0,0.1)`,textColor:e?`#94a3b8`:`#475569`}}function bC(e,t){if(!e.options.scales)return;let n=e.options.scales;n.x&&(n.x.grid&&(n.x.grid.color=t.gridColor),n.x.ticks&&(n.x.ticks.color=t.textColor)),n.y?.grid&&(n.y.grid.color=t.gridColor),n.y?.ticks&&(n.y.ticks.color=t.textColor),n.y1?.grid&&(n.y1.grid.color=t.gridColor),n.y1?.ticks&&(n.y1.ticks.color=t.textColor),n.y?.title&&(n.y.title.color=t.textColor),n.y1?.title&&(n.y1.title.color=t.textColor),e.options.plugins?.legend?.labels&&(e.options.plugins.legend.labels.color=t.textColor),e.update()}function xC(e){let t=localStorage.getItem(`theme`)??`dark`,n=document.getElementById(`theme-toggle-btn`);n&&(document.body.className=t,n.addEventListener(`click`,()=>{let t=document.body.classList.contains(`dark`)?`light`:`dark`;document.body.className=t,localStorage.setItem(`theme`,t);let n=yC(t===`dark`);Object.values(e.charts).forEach(e=>{let t=e;t?.options&&bC(t,n)})}))}function SC(e){let t=e.connectionsOpen>0?Math.round(e.connectionsInUse/e.connectionsOpen*100):0,n=t>90?`var(--danger)`:t>70?`var(--warning)`:`var(--success)`,r=e.stats??void 0;return`
|
|
43
|
-
<div class="card card-clickable transition-all duration-200" title="Connection pool status for ${e.name}">
|
|
44
|
-
<div class="card-header">
|
|
45
|
-
<span class="material-symbols-rounded">database</span>
|
|
46
|
-
<h3 class="text-lg font-bold text-bright">${e.name}</h3>
|
|
47
|
-
</div>
|
|
48
|
-
<div class="mb-6" title="Utilization: ${t}% of open connections are currently in use">
|
|
49
|
-
<div class="flex justify-between items-baseline mb-2">
|
|
50
|
-
<span class="text-3xl font-bold text-bright">${t}%</span>
|
|
51
|
-
<span class="text-main font-mono">${e.connectionsInUse} / ${e.connectionsOpen}</span>
|
|
52
|
-
</div>
|
|
53
|
-
<div class="progress-bar">
|
|
54
|
-
<div class="progress-bar-fill transition-all duration-300" style="width: ${t}%; background: ${n}"></div>
|
|
55
|
-
</div>
|
|
56
|
-
<small class="description mt-2 block opacity-75">Pool Utilization (Active / Open)</small>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<div class="stat-row text-sm" title="Total number of connections currently open in the pool">
|
|
60
|
-
<span class="text-xs uppercase font-bold opacity-75">Connections Open</span>
|
|
61
|
-
<span class="font-mono text-accent font-bold">${e.connectionsOpen}</span>
|
|
62
|
-
</div>
|
|
63
|
-
<div class="stat-row text-sm" title="Number of connections currently active and handling requests">
|
|
64
|
-
<span class="text-xs uppercase font-bold opacity-75">Connections In Use</span>
|
|
65
|
-
<span class="font-mono text-accent font-bold">${e.connectionsInUse}</span>
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
${r?`
|
|
69
|
-
<div class="mt-4 pt-4 border-t">
|
|
70
|
-
<div class="stat-row text-sm" title="Cumulative number of requests handled by this pool since server start">
|
|
71
|
-
<span>Total Requests</span>
|
|
72
|
-
<span class="font-mono text-accent font-bold">${r.totalRequests.toLocaleString()}</span>
|
|
73
|
-
</div>
|
|
74
|
-
<div class="stat-row text-sm" title="Number of requests that timed out waiting for a connection">
|
|
75
|
-
<span>Total Timeouts</span>
|
|
76
|
-
<span class="font-mono ${r.totalTimeouts>0?`text-danger`:`text-accent`} font-bold">${r.totalTimeouts.toLocaleString()}</span>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
`:``}
|
|
80
|
-
</div>
|
|
81
|
-
`}function Q(e,t,n=!0,r=`text-accent`,i=``){let a=`${n?`font-mono`:``} ${r} font-bold break-all`.trim();return`
|
|
82
|
-
<div class="stat-row text-sm" ${i?`title="${i}"`:``}>
|
|
83
|
-
<span>${e}</span>
|
|
84
|
-
<span class="${a}">${t}</span>
|
|
85
|
-
</div>
|
|
86
|
-
`}function CC(e,t){return`
|
|
87
|
-
<div class="card-header mt-6 mb-2">
|
|
88
|
-
<span class="material-symbols-rounded icon-sm">${t}</span>
|
|
89
|
-
<h3 class="text-xs uppercase tracking-wider font-bold text-accent">${e}</h3>
|
|
90
|
-
</div>
|
|
91
|
-
`}function wC(e,t){let n=e.exclusionList?.length?e.exclusionList.join(`, `):`(None)`,r=typeof e.transactionMode==`string`?e.transactionMode:e.transactionMode?`Custom`:`commit`;return`
|
|
92
|
-
<div class="card mb-6">
|
|
93
|
-
<div class="flex justify-between items-center mb-4">
|
|
94
|
-
<div class="flex items-center gap-3">
|
|
95
|
-
<span class="badge badge-info">PL/SQL Route #${t+1}</span>
|
|
96
|
-
<code class="text-lg font-bold text-bright">${e.route}</code>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
101
|
-
<div>
|
|
102
|
-
<h4 class="text-xs font-bold text-main uppercase mb-3 opacity-75">Database Connection</h4>
|
|
103
|
-
${Q(`Oracle User`,e.user??`(Not set)`)}
|
|
104
|
-
${Q(`Connect String`,e.connectString??`(Not set)`)}
|
|
105
|
-
${Q(`Password`,e.password??`(None)`)}
|
|
106
|
-
</div>
|
|
107
|
-
<div>
|
|
108
|
-
<h4 class="text-xs font-bold text-main uppercase mb-3 opacity-75">Request Handler</h4>
|
|
109
|
-
${Q(`Default Page`,e.defaultPage??`index`)}
|
|
110
|
-
${Q(`Document Table`,e.documentTable??`(None)`)}
|
|
111
|
-
${Q(`Error Style`,e.errorStyle??`table`)}
|
|
112
|
-
${Q(`Transaction Mode`,r)}
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
<div class="mt-4 pt-4 border-t">
|
|
117
|
-
<h4 class="text-xs font-bold text-main uppercase mb-3 opacity-75">Path & Validation</h4>
|
|
118
|
-
${Q(`Path Alias`,e.pathAlias??`(None)`)}
|
|
119
|
-
${Q(`Path Alias Proc`,e.pathAliasProcedure??`(None)`)}
|
|
120
|
-
${Q(`Exclusion List`,n)}
|
|
121
|
-
${Q(`Validation Func`,e.requestValidationFunction??`(None)`)}
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
`}function TC(e,t){return`
|
|
125
|
-
<div class="card mb-4">
|
|
126
|
-
<div class="flex items-center gap-3 mb-4">
|
|
127
|
-
<span class="badge badge-success">Static Route #${t+1}</span>
|
|
128
|
-
<code class="text-lg font-bold text-bright">${e.route}</code>
|
|
129
|
-
</div>
|
|
130
|
-
${Q(`Directory Path`,e.directoryPath??`(Not set)`)}
|
|
131
|
-
</div>
|
|
132
|
-
`}function EC(e){let t=`<div class="config-view-content">`;if(t+=`<div class="card mb-8">`,t+=`<div class="card-header"><span class="material-symbols-rounded">dns</span><h3>Server Settings</h3></div>`,typeof e.port==`number`&&(t+=Q(`Port`,e.port,!0,`text-accent`,`The TCP port the server is listening on`)),t+=Q(`Admin Route`,e.adminRoute??`/admin`,!0,`text-accent`,`The URL path for the administration console`),t+=Q(`Admin User`,e.adminUser??`(Not authenticated)`,!0,`text-accent`,`The username required for admin access`),t+=Q(`Admin Password`,e.adminPassword??`(None)`,!0,`text-accent`,`The password required for admin access`),t+=Q(`Logger Filename`,e.loggerFilename??`(Logging disabled)`,!0,`text-accent`,`The path to the server log file`),typeof e.uploadFileSizeLimit==`number`){let n=e.uploadFileSizeLimit,r=(n/(1024*1024)).toFixed(2);t+=Q(`Upload Size Limit`,`${r} MB (${n.toLocaleString()} bytes)`,!0,`text-accent`,`Maximum allowed size for file uploads`)}else t+=Q(`Upload Size Limit`,`No limit`,!1,`text-accent`,`Maximum allowed size for file uploads`);return t+=`</div>`,t+=CC(`PL/SQL Routes`,`database`),t+=e.routePlSql?.length?e.routePlSql.map((e,t)=>wC(e,t)).join(``):`<div class="empty-state">No PL/SQL routes configured</div>`,t+=CC(`Static Routes`,`folder_shared`),t+=e.routeStatic?.length?e.routeStatic.map((e,t)=>TC(e,t)).join(``):`<div class="empty-state">No static routes configured</div>`,t+=`</div>`,t}var DC=class{element=null;elementId;options;constructor(e,t){this.elementId=e,this.options=t}render(e){this.element=document.getElementById(this.elementId),this.element&&(this.element.classList.toggle(`dense-table`,!!this.options.dense),this.options.tableLayout&&(this.element.style.tableLayout=this.options.tableLayout),this.renderHeader(),this.renderBody(e))}renderHeader(){if(!this.element)return;let e=this.element.querySelector(`thead`);e||(e=document.createElement(`thead`),this.element.append(e)),e.innerHTML=``;let t=document.createElement(`tr`);this.options.columns.forEach(e=>{let n=document.createElement(`th`);n.textContent=e.header,e.headerTitle&&(n.title=e.headerTitle),e.width&&(n.style.width=e.width),e.align&&(n.style.textAlign=e.align),t.append(n)}),e.append(t)}renderBody(e){if(!this.element)return;let t=this.element.querySelector(`tbody`);t||(t=document.createElement(`tbody`),this.element.append(t)),t.innerHTML=``,e.forEach(e=>{let n=document.createElement(`tr`);this.options.onRowClick&&(n.style.cursor=`pointer`,n.addEventListener(`click`,()=>{this.options.onRowClick&&this.options.onRowClick(e)}),n.classList.add(`table-row-hover`)),this.options.columns.forEach(t=>{let r=document.createElement(`td`);if(t.render)r.innerHTML=t.render(e);else if(t.accessor){let n=t.accessor(e);r.textContent=n==null?``:String(n)}if(t.className){let n=typeof t.className==`function`?t.className(e):t.className;n&&(r.className=n)}t.align&&(r.style.textAlign=t.align),t.cellTitle&&(r.title=t.cellTitle(e)),n.append(r)}),t.append(n)})}};async function OC(){let e=document.getElementById(`error-filter`),t=document.getElementById(`error-limit`),n=e?.value??``,r=t?Number.parseInt(t.value):100,i=await Qp.getErrorLogs(r,n);new DC(`errors-table`,{columns:[{id:`timestamp`,header:`Timestamp`,headerTitle:`When the error occurred`,accessor:e=>new Date(e.timestamp).toLocaleString(),cellTitle:e=>new Date(e.timestamp).toLocaleString()},{id:`method`,header:`Method`,headerTitle:`HTTP method used`,render:e=>`<code>${e.req?.method??`-`}</code>`,cellTitle:e=>`Method: ${e.req?.method??`-`}`},{id:`url`,header:`URL`,headerTitle:`Requested URL`,accessor:e=>e.req?.url??`-`,cellTitle:e=>`URL: ${e.req?.url??`-`}`},{id:`message`,header:`Message`,headerTitle:`Error message summary`,accessor:e=>e.message,className:`break-all`,cellTitle:e=>`Click for details: ${e.details?.fullMessage??``}`},{id:`action`,header:``,width:`40px`,align:`center`,render:()=>`<span class="material-symbols-rounded">chevron_right</span>`,className:`text-center text-accent opacity-70`}],dense:!0,onRowClick:e=>{let t=document.getElementById(`error-modal`),n=document.getElementById(`error-detail-content`);t&&n&&(n.textContent=JSON.stringify(e,null,2),t.style.display=`flex`)}}).render(i);let a=document.querySelector(`#errors-table tbody`);a&&a.querySelectorAll(`tr`).forEach(e=>{e.classList.add(`errors-table-row`)})}async function kC(){let e=document.getElementById(`stats-limit`),t=document.getElementById(`stats-history-info`),n=document.querySelector(`#stats-table tbody`);if(!n)return;let r=e?Number.parseInt(e.value):50;try{let e=await Qp.getStatsHistory(r);t&&(t.textContent=`Showing latest ${e.length} data points`),n.innerHTML=e.map(e=>{let t=new Date(e.timestamp).toLocaleTimeString(),n=(e.system.rss/1024/1024).toFixed(1),r=(e.system.heapUsed/1024/1024).toFixed(1);return`
|
|
133
|
-
<tr>
|
|
134
|
-
<td class="font-mono text-xs">${t}</td>
|
|
135
|
-
<td class="text-center font-bold text-bright">${e.requests}</td>
|
|
136
|
-
<td class="text-center font-bold ${e.errors>0?`text-danger`:`text-success`}">${e.errors}</td>
|
|
137
|
-
<td class="text-right font-mono">${e.durationMin.toFixed(1)}</td>
|
|
138
|
-
<td class="text-right font-mono text-accent font-bold">${e.durationAvg.toFixed(1)}</td>
|
|
139
|
-
<td class="text-right font-mono text-warning">${e.durationP95.toFixed(1)}</td>
|
|
140
|
-
<td class="text-right font-mono text-danger">${e.durationP99.toFixed(1)}</td>
|
|
141
|
-
<td class="text-right font-mono">${e.durationMax.toFixed(1)}</td>
|
|
142
|
-
<td class="text-right font-mono">${e.system.cpu.toFixed(1)}%</td>
|
|
143
|
-
<td class="text-right font-mono">${n}</td>
|
|
144
|
-
<td class="text-right font-mono">${r}</td>
|
|
145
|
-
</tr>
|
|
146
|
-
`}).join(``)}catch(e){console.error(`Failed to load stats history:`,e),t&&(t.textContent=`Failed to load stats`)}}async function AC(){let e=document.getElementById(`access-filter`),t=document.getElementById(`access-limit`),n=e?.value??``,r=t?Number.parseInt(t.value):100,i=await Qp.getAccessLogs(r,n),a=document.getElementById(`access-log-view`),o=document.getElementById(`access-log-range`);if(!a)return;let s=0;Array.isArray(i)?(a.textContent=i.join(`
|
|
147
|
-
`),s=i.length):i&&typeof i==`object`&&`message`in i?(a.textContent=i.message,s=0):(a.textContent=`No logs available`,s=0),o&&(o.textContent=s>0?`Showing last ${s} log entries`:`No logs available`),a.parentElement&&(a.parentElement.scrollTop=a.parentElement.scrollHeight)}async function jC(){let e=document.getElementById(`trace-filter`),t=document.getElementById(`trace-limit`),n=document.getElementById(`trace-status-toggle`),r=e?.value??``,i=t?Number.parseInt(t.value):100;try{let{enabled:e}=await Qp.getTraceStatus();n&&(n.textContent=e?`Tracing: ON`:`Tracing: OFF`,n.dataset.enabled=String(e),n.className=`px-4 py-2 rounded-lg text-sm font-bold transition-colors ${e?`bg-success text-black hover:bg-success/80`:`bg-white/10 text-white hover:bg-white/20`}`)}catch(e){console.error(`Failed to get trace status`,e)}let a=await Qp.getTraceLogs(i,r);new DC(`trace-table`,{columns:[{id:`timestamp`,header:`Timestamp`,headerTitle:`Time of request`,width:`1%`,accessor:e=>new Date(e.timestamp).toLocaleString(),className:`font-mono text-xs text-dim whitespace-nowrap`},{id:`source`,header:`Source`,headerTitle:`Request source (IP/User)`,width:`1%`,accessor:e=>e.source,className:`text-dim text-xs truncate max-w-[150px]`,cellTitle:e=>e.source},{id:`method`,header:`Method`,headerTitle:`HTTP Method`,width:`1%`,accessor:e=>e.method,className:`font-mono text-xs whitespace-nowrap`},{id:`url`,header:`Request URL`,headerTitle:`Request URL`,accessor:e=>e.url,className:`text-bright font-mono text-xs truncate max-w-[800px]`,cellTitle:e=>e.url},{id:`status`,header:`Status`,headerTitle:`HTTP Status Code`,width:`1%`,accessor:e=>e.status,className:e=>`font-bold text-xs uppercase whitespace-nowrap ${e.status===`success`?`text-success`:`text-danger`}`},{id:`duration`,header:`Duration`,headerTitle:`Execution time in ms`,width:`1%`,align:`right`,accessor:e=>gC(e.duration),className:`font-mono text-xs text-dim whitespace-nowrap`}],dense:!0,tableLayout:`auto`,onRowClick:e=>{let t=document.getElementById(`trace-modal`),n=document.getElementById(`trace-detail-content`);t&&n&&(n.textContent=JSON.stringify(e,null,2),t.style.display=`flex`)}}).render(a)}function MC(e){let t=document.getElementById(`pools-container`);!t||!e.pools||(t.innerHTML=e.pools.map(e=>SC(e)).join(``))}function NC(e){let t=e.status.config;if(!t)return;let n=document.getElementById(`config-view`);n&&(n.innerHTML=EC(t))}function PC(e){if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return`${Number.parseFloat((e/t**+r).toFixed(2))} ${n[r]}`}function FC(e){return gC(e/1e3)}function IC(e,t){let n=document.getElementById(`middleware-version`);n&&e.version&&(n.textContent=`${e.version} (4/8/2026, 11:51:20 AM)`,n.title=`The version of the web_plsql gateway and admin console build time`);let r=document.getElementById(`node-version`);r&&e.system&&(r.textContent=e.system.nodeVersion,r.title=`The version of the Node.js runtime`);let i=document.getElementById(`platform-info`);i&&e.system&&(i.textContent=`${e.system.platform} (${e.system.arch})`,i.title=`The operating system and architecture`);let a=document.getElementById(`system-uptime`);a&&e.uptime&&(a.textContent=hC(e.uptime));let o=document.getElementById(`system-start-time`);o&&e.startTime&&(o.textContent=_C(e.startTime));let s=document.getElementById(`system-status-text`);s&&(s.textContent=e.status?.toUpperCase()??`-`);let c=document.getElementById(`total-requests`);c&&e.metrics&&(c.textContent=e.metrics.requestCount.toLocaleString(),c.title=`Cumulative number of requests handled by the server`);let l=document.getElementById(`total-errors`);l&&e.metrics&&(l.textContent=e.metrics.errorCount.toLocaleString(),l.title=`Cumulative number of failed requests`);let u=document.getElementById(`active-pools`);if(u&&e.pools&&(u.textContent=e.pools.length.toString(),u.title=`Number of database connection pools currently active`),e.system){let t=e.system,n={heapUsed:t.memory.heapUsed,heapTotal:t.memory.heapTotal,rss:t.memory.rss,external:t.memory.external,cpuUser:t.cpu.user,cpuSystem:t.cpu.system},r=(e,r,i)=>{let a=n[r],o=t.memory[i],s=document.getElementById(e),c=document.getElementById(`${e}-max`);s&&(s.textContent=PC(a)),c&&typeof o==`number`&&(c.textContent=PC(o))},i=(e,r,i)=>{let a=n[r],o=document.getElementById(e);if(o&&(o.textContent=FC(a)),i){let n=t.cpu[i],r=document.getElementById(`${e}-max`);r&&typeof n==`number`&&(r.textContent=FC(n))}};r(`memory-heap-used`,`heapUsed`,`heapUsedMax`),r(`memory-heap-total`,`heapTotal`,`heapTotalMax`),r(`memory-rss`,`rss`,`rssMax`),r(`memory-external`,`external`,`externalMax`),i(`cpu-user`,`cpuUser`,`userMax`),i(`cpu-system`,`cpuSystem`,`systemMax`);let a=document.getElementById(`cpu-percent`);a&&t.cpu.max!==void 0&&(a.textContent=`${t.cpu.max.toFixed(1)}%`,a.title=`Max System CPU usage`);let o=document.getElementById(`memory-percent`);o&&t.memory.totalMemory&&(o.textContent=`${(t.memory.rss/t.memory.totalMemory*100).toFixed(1)}%`,o.title=`System Memory Used relative to Total (${PC(t.memory.totalMemory)})`);let s=document.getElementById(`cpu-cores-info`);s&&t.cpuCores&&(s.textContent=`${t.cpuCores} Cores`)}}async function LC(e,t){let n=e.querySelector(`.material-symbols-rounded`),r=n?.textContent;e.disabled=!0,e.classList.add(`loading`),n&&(n.textContent=`sync`,n.classList.add(`animate-spin`));try{return await t()}finally{e.disabled=!1,e.classList.remove(`loading`),n&&(n.textContent=r??``,n.classList.remove(`animate-spin`))}}function RC(e,t){let n=document.getElementById(e);return n&&n.addEventListener(`click`,()=>void LC(n,t)),n}var zC={overview:`dashboard`,trace:`bolt`,errors:`error`,access:`list_alt`,pools:`database`,stats:`query_stats`,config:`settings`,system:`terminal`},$={currentView:`overview`,status:{},maxHistoryPoints:30,lastRequestCount:0,lastErrorCount:0,lastUpdateTime:Date.now(),lastBucketTimestamp:0,nextRefreshTimeout:null,nextRefreshTime:0,countdownInterval:null,history:{labels:[],requests:[],avgResponseTimes:[],p95ResponseTimes:[],p99ResponseTimes:[],cpuUsage:[],memoryUsage:[],poolUsage:{}},charts:{},metricsMin:{},metricsMax:{}},BC={REFRESH_INTERVAL:`admin_refresh_interval`,HISTORY_DURATION:`admin_history_duration`,AUTO_REFRESH:`admin_auto_refresh`,THEME:`theme`,LAST_VIEW:`admin_last_view`};function VC(e){console.error(`Connection lost:`,e);let t=document.getElementById(`server-status-dot`),n=document.getElementById(`server-status-text`);t&&(t.className=`dot offline`),n&&(n.textContent=`OFFLINE`);let r=document.getElementById(`btn-pause`);r&&(r.style.display=`none`);let i=document.getElementById(`btn-resume`);i&&(i.style.display=`none`);let a=document.querySelector(`#system-status .dot`),o=document.getElementById(`system-status-text`);a&&(a.className=`dot offline`),o&&(o.textContent=`OFFLINE`);let s=document.getElementById(`offline-modal`);s&&s.style.display!==`flex`&&(s.style.display=`flex`),GC(6e4),HC(6e4)}function HC(e){$.countdownInterval&&clearInterval($.countdownInterval);let t=Date.now()+e,n=document.getElementById(`offline-countdown`),r=document.getElementById(`reconnect-text`);r&&(r.textContent=`Try Reconnect`);let i=()=>{if(!n)return;let e=Math.max(0,Math.ceil((t-Date.now())/1e3));n.textContent=`Retrying in ${e}s...`,e<=0&&$.countdownInterval&&(clearInterval($.countdownInterval),$.countdownInterval=null)};i(),$.countdownInterval=setInterval(i,1e3)}function UC(){$.countdownInterval&&=(clearInterval($.countdownInterval),null);let e=document.getElementById(`offline-countdown`);e&&(e.textContent=``)}async function WC(e=!1,t=!1){let n=document.getElementById(`reconnect-spinner`),r=document.getElementById(`reconnect-icon`),i=document.getElementById(`reconnect-text`);n&&(n.style.display=`inline-block`),r&&(r.style.display=`none`),i&&(i.textContent=`Connecting...`);try{let a=Date.now(),o=await Qp.getStatus(e,t),s=document.getElementById(`offline-modal`);if(s?.style.display===`flex`&&s&&(s.style.display=`none`,UC()),n&&(n.style.display=`none`),r&&(r.style.display=`inline-block`),i&&(i.textContent=`Try Reconnect`),o.history&&$.history.labels.length===0&&pC($,o.history),!o.config&&$.status.config&&(o.config=$.status.config),$.status=o,!o.metrics||!o.pools)return;let c=o.history?.at(-1),l=(o.intervalMs??5e3)/1e3,u=c?c.requests/l:0,d=c?c.durationAvg:o.metrics.avgResponseTime;if($.lastRequestCount=o.metrics.requestCount,$.lastErrorCount=o.metrics.errorCount,$.lastUpdateTime=a,o.system){let e=o.system;vC({heapUsed:e.memory.heapUsed,heapTotal:e.memory.heapTotal,rss:e.memory.rss,external:e.memory.external,cpuUser:e.cpu.user,cpuSystem:e.cpu.system},$.metricsMin,$.metricsMax)}c&&c.timestamp>$.lastBucketTimestamp?($.lastBucketTimestamp=c.timestamp,mC($,new Date(c.timestamp).toLocaleTimeString(),u,d,o.pools)):!c&&$.history.labels.length===0&&mC($,new Date().toLocaleTimeString(),0,0,o.pools);let f=document.getElementById(`sidebar-version`);f&&(f.textContent=`v${o.version}`);let p=document.getElementById(`uptime-val`);p&&(p.textContent=hC(o.uptime));let m=document.getElementById(`start-time-val`);m&&(m.textContent=`Started: ${_C(o.startTime)}`);let h=document.getElementById(`req-per-sec`);h&&(h.textContent=u.toFixed(2));let g=document.getElementById(`max-req-per-sec`);g&&(g.textContent=o.metrics.maxRequestsPerSecond.toFixed(2));let _=document.getElementById(`avg-resp-time`);_&&(_.textContent=`${o.metrics.avgResponseTime.toFixed(1)}ms`);let v=document.getElementById(`max-resp-time`);v&&(v.textContent=`${o.metrics.maxResponseTime.toFixed(1)}ms`);let y=document.getElementById(`err-count`);y&&(y.textContent=o.metrics.errorCount.toLocaleString());let b=0,x=0;o.pools.forEach(e=>{e.cache&&(b+=e.cache.procedureName.hits+e.cache.argument.hits,x+=e.cache.procedureName.misses+e.cache.argument.misses)});let S=b+x,C=S>0?Math.round(b/S*100):0,w=document.getElementById(`cache-hit-rate-val`);w&&(w.textContent=`${C}%`,w.style.color=C>80?`var(--success)`:C>50?`var(--warning)`:`var(--danger)`);let T=document.getElementById(`cache-hits-val`);T&&(T.textContent=b.toLocaleString());let E=document.getElementById(`cache-misses-val`);E&&(E.textContent=x.toLocaleString());let ee=document.getElementById(`server-status-dot`),te=document.getElementById(`server-status-text`);ee&&(ee.className=`dot `+o.status),te&&(te.textContent=o.status.toUpperCase());let ne=document.getElementById(`btn-pause`);ne&&(ne.style.display=o.status===`running`?`flex`:`none`);let re=document.getElementById(`btn-resume`);re&&(re.style.display=o.status===`paused`?`flex`:`none`),$.currentView===`errors`&&await OC(),$.currentView===`trace`&&await jC(),$.currentView===`pools`&&MC(o),$.currentView===`config`&&NC($),$.currentView===`system`&&IC(o,$),YC?.checked&&XC&&GC(Number.parseInt(XC.value,10))}catch(e){document.getElementById(`offline-modal`)?.style.display===`flex`?(GC(6e4),HC(6e4),n&&(n.style.display=`none`),r&&(r.style.display=`inline-block`),i&&(i.textContent=`Try Reconnect`)):VC(e)}}function GC(e){$.nextRefreshTimeout&&=(clearTimeout($.nextRefreshTimeout),null),$.nextRefreshTime=Date.now()+e,$.nextRefreshTimeout=setTimeout(()=>{WC()},e)}function KC(){let e=document.getElementById(`refresh-interval`);e&&GC(Number.parseInt(e.value))}function qC(){$.nextRefreshTimeout&&=(clearTimeout($.nextRefreshTimeout),null)}function JC(){let e=document.getElementById(`chart-history-points`);e&&Array.from(e.options).forEach(e=>{let t=Number.parseInt(e.value),n=``;if(t<60)n=`${t}s`;else if(t<3600)n=`${Math.round(t/60)} min`;else{let e=t/3600;n=e===Math.round(e)?`${e} hour${e>1?`s`:``}`:`${e.toFixed(1)} hours`}e.textContent=`Last ${n}`})}document.querySelectorAll(`nav button`).forEach(e=>{let t=e;t.addEventListener(`click`,async()=>{try{let e=t.dataset.view;if(!e)return;$.currentView=e,localStorage.setItem(BC.LAST_VIEW,e),document.querySelectorAll(`.view`).forEach(e=>{let t=e;t.style.display=`none`});let n=document.getElementById(`view-`+e);n&&(n.style.display=`block`),document.querySelectorAll(`nav button`).forEach(e=>e.classList.remove(`active`)),t.classList.add(`active`);let r=document.getElementById(`view-title`);if(r){let n=Array.from(t.childNodes).filter(e=>e.nodeType===Node.TEXT_NODE).map(e=>e.textContent?.trim()).join(``);r.innerHTML=`<span class="material-symbols-rounded">${zC[e]??`chevron_right`}</span>${n}`}e===`errors`&&await OC(),e===`trace`&&await jC(),e===`pools`&&MC($.status),e===`stats`&&await kC(),e===`config`&&NC($),e===`system`&&IC($.status,$)}catch(e){VC(e)}})});var YC=document.getElementById(`auto-refresh-toggle`);YC&&YC.addEventListener(`change`,e=>{let t=e.target;localStorage.setItem(BC.AUTO_REFRESH,String(t.checked)),t.checked?KC():qC()});var XC=document.getElementById(`refresh-interval`);XC&&XC.addEventListener(`change`,()=>{localStorage.setItem(BC.REFRESH_INTERVAL,XC.value);let e=Number.parseInt(XC.value),t=Number.parseInt(ZC?.value??`60`);$.maxHistoryPoints=Math.max(1,Math.floor(t/(e/1e3))),$.history.labels=[],$.history.requests=[],$.history.avgResponseTimes=[],$.history.cpuUsage=[],$.history.memoryUsage=[],$.history.poolUsage={},JC(),IC($.status,$),WC()});var ZC=document.getElementById(`chart-history-points`);ZC&&ZC.addEventListener(`change`,()=>{localStorage.setItem(BC.HISTORY_DURATION,ZC.value);let e=document.getElementById(`refresh-interval`);if(!e)return;let t=Number.parseInt(e.value),n=Number.parseInt(ZC.value);$.maxHistoryPoints=Math.max(1,Math.floor(n/(t/1e3))),$.history.labels=[],$.history.requests=[],$.history.avgResponseTimes=[],$.history.cpuUsage=[],$.history.memoryUsage=[],$.history.poolUsage={},WC()});var QC=document.getElementById(`manual-refresh`);QC&&QC.addEventListener(`click`,()=>{LC(QC,WC)});var $C=document.getElementById(`error-filter`);$C&&$C.addEventListener(`keydown`,e=>{e.key===`Enter`&&OC()}),RC(`error-load-btn`,OC),RC(`trace-load-btn`,jC),RC(`access-load-btn`,AC),RC(`stats-load-btn`,kC);var ew=document.getElementById(`trace-filter`);ew&&ew.addEventListener(`keydown`,e=>{e.key===`Enter`&&jC()});var tw=document.getElementById(`trace-clear-btn`);tw&&tw.addEventListener(`click`,async()=>{confirm(`Are you sure you want to clear all traces?`)&&await LC(tw,async()=>{await Qp.clearTraces(),await jC()})});var nw=document.getElementById(`trace-status-toggle`);nw&&nw.addEventListener(`click`,async()=>{await LC(nw,async()=>{let{enabled:e}=await Qp.getTraceStatus();await Qp.toggleTrace(!e),await jC()})});var rw=document.getElementById(`access-filter`);rw&&rw.addEventListener(`keydown`,e=>{e.key===`Enter`&&AC()});var iw=document.getElementById(`stats-limit`);iw&&iw.addEventListener(`keydown`,e=>{e.key===`Enter`&&kC()}),RC(`btn-pause`,async()=>{confirm(`Are you sure you want to pause the server?`)&&(await Qp.post(`api/server/pause`),await WC())}),RC(`btn-resume`,async()=>{await Qp.post(`api/server/resume`),await WC()}),RC(`btn-stop`,async()=>{confirm(`Are you sure you want to STOP the server? This action cannot be undone from the web interface.`)&&(await Qp.post(`api/server/stop`),alert(`Server stop requested. The interface will now become unresponsive.`))}),RC(`btn-clear-all-cache`,async()=>{confirm(`Are you sure you want to clear ALL caches?`)&&(await Qp.post(`api/cache/clear`),await WC())});var aw=document.getElementById(`btn-reconnect`);aw&&aw.addEventListener(`click`,()=>{LC(aw,WC)}),globalThis.addEventListener(`keydown`,e=>{if(e.key===`Escape`){let e=document.getElementById(`error-modal`);e&&(e.style.display=`none`);let t=document.getElementById(`trace-modal`);t&&(t.style.display=`none`)}});var ow=localStorage.getItem(BC.REFRESH_INTERVAL);ow&&XC&&(XC.value=ow);var sw=localStorage.getItem(BC.HISTORY_DURATION);sw&&ZC&&(ZC.value=sw);var cw=localStorage.getItem(BC.AUTO_REFRESH);if(cw!==null&&YC&&(YC.checked=cw===`true`),xC($),fC($),JC(),XC&&ZC){let e=Number.parseInt(XC.value),t=Number.parseInt(ZC.value);$.maxHistoryPoints=Math.max(1,Math.floor(t/(e/1e3)))}var lw=localStorage.getItem(BC.LAST_VIEW);if(lw){let e=document.querySelector(`nav button[data-view="${lw}"]`);e&&e.click()}WC(!0,!0).then(()=>{YC?.checked&&KC()}).catch(console.error);
|