@ht-rnd/json-schema-editor 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -1
- package/dist/json-schema-editor.css +1 -1
- package/dist/lib/main.es.js +9757 -10527
- package/dist/lib/main.umd.js +43 -110
- package/dist/types/index.d.ts +13 -58
- package/package.json +27 -25
package/dist/lib/main.umd.js
CHANGED
|
@@ -1,35 +1,14 @@
|
|
|
1
|
-
(function(zt,Z){typeof exports=="object"&&typeof module<"u"?Z(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],Z):(zt=typeof globalThis<"u"?globalThis:zt||self,Z(zt["json-schema-editor"]={},zt.React,zt.ReactDOM))})(this,(function(zt,Z,ki){"use strict";function Ci(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const S=Ci(Z),$n=Ci(ki);function ji(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sn={exports:{}},Xr={};/**
|
|
2
|
-
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Ni;function ph(){if(Ni)return Xr;Ni=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,s,o){var a=null;if(o!==void 0&&(a=""+o),s.key!==void 0&&(a=""+s.key),"key"in s){o={};for(var i in s)i!=="key"&&(o[i]=s[i])}else o=s;return s=o.ref,{$$typeof:e,type:n,key:a,ref:s!==void 0?s:null,props:o}}return Xr.Fragment=t,Xr.jsx=r,Xr.jsxs=r,Xr}var Qr={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ri;function gh(){return Ri||(Ri=1,process.env.NODE_ENV!=="production"&&(function(){function e(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===D?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case m:return"Fragment";case f:return"Profiler";case _:return"StrictMode";case $:return"Suspense";case E:return"SuspenseList";case U:return"Activity"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case y:return"Portal";case x:return C.displayName||"Context";case b:return(C._context.displayName||"Context")+".Consumer";case g:var M=C.render;return C=C.displayName,C||(C=M.displayName||M.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case j:return M=C.displayName||null,M!==null?M:e(C.type)||"Memo";case I:M=C._payload,C=C._init;try{return e(C(M))}catch{}}return null}function t(C){return""+C}function r(C){try{t(C);var M=!1}catch{M=!0}if(M){M=console;var P=M.error,k=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return P.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",k),t(C)}}function n(C){if(C===m)return"<>";if(typeof C=="object"&&C!==null&&C.$$typeof===I)return"<...>";try{var M=e(C);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function s(){var C=V.A;return C===null?null:C.getOwner()}function o(){return Error("react-stack-top-frame")}function a(C){if(q.call(C,"key")){var M=Object.getOwnPropertyDescriptor(C,"key").get;if(M&&M.isReactWarning)return!1}return C.key!==void 0}function i(C,M){function P(){K||(K=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}P.isReactWarning=!0,Object.defineProperty(C,"key",{get:P,configurable:!0})}function c(){var C=e(this.type);return se[C]||(se[C]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),C=this.props.ref,C!==void 0?C:null}function l(C,M,P,k,N,z){var F=P.ref;return C={$$typeof:w,type:C,key:M,props:P,_owner:k},(F!==void 0?F:null)!==null?Object.defineProperty(C,"ref",{enumerable:!1,get:c}):Object.defineProperty(C,"ref",{enumerable:!1,value:null}),C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(C,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(C,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.defineProperty(C,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C}function u(C,M,P,k,N,z){var F=M.children;if(F!==void 0)if(k)if(W(F)){for(k=0;k<F.length;k++)h(F[k]);Object.freeze&&Object.freeze(F)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(F);if(q.call(M,"key")){F=e(C);var Y=Object.keys(M).filter(function(oe){return oe!=="key"});k=0<Y.length?"{key: someKey, "+Y.join(": ..., ")+": ...}":"{key: someKey}",H[F+k]||(Y=0<Y.length?"{"+Y.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
-
let props = %s;
|
|
19
|
-
<%s {...props} />
|
|
20
|
-
React keys must be passed directly to JSX without using spread:
|
|
21
|
-
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,k,F,Y,F),H[F+k]=!0)}if(F=null,P!==void 0&&(r(P),F=""+P),a(M)&&(r(M.key),F=""+M.key),"key"in M){P={};for(var de in M)de!=="key"&&(P[de]=M[de])}else P=M;return F&&i(P,typeof C=="function"?C.displayName||C.name||"Unknown":C),l(C,F,P,s(),N,z)}function h(C){p(C)?C._store&&(C._store.validated=1):typeof C=="object"&&C!==null&&C.$$typeof===I&&(C._payload.status==="fulfilled"?p(C._payload.value)&&C._payload.value._store&&(C._payload.value._store.validated=1):C._store&&(C._store.validated=1))}function p(C){return typeof C=="object"&&C!==null&&C.$$typeof===w}var v=Z,w=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),x=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),V=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=Object.prototype.hasOwnProperty,W=Array.isArray,ee=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(C){return C()}};var K,se={},L=v.react_stack_bottom_frame.bind(v,o)(),he=ee(n(o)),H={};Qr.Fragment=m,Qr.jsx=function(C,M,P){var k=1e4>V.recentlyCreatedOwnerStacks++;return u(C,M,P,!1,k?Error("react-stack-top-frame"):L,k?ee(n(C)):he)},Qr.jsxs=function(C,M,P){var k=1e4>V.recentlyCreatedOwnerStacks++;return u(C,M,P,!0,k?Error("react-stack-top-frame"):L,k?ee(n(C)):he)}})()),Qr}var Ai;function vh(){return Ai||(Ai=1,process.env.NODE_ENV==="production"?Sn.exports=ph():Sn.exports=gh()),Sn.exports}var d=vh(),en=e=>e.type==="checkbox",ar=e=>e instanceof Date,et=e=>e==null;const Pi=e=>typeof e=="object";var Be=e=>!et(e)&&!Array.isArray(e)&&Pi(e)&&!ar(e),Ti=e=>Be(e)&&e.target?en(e.target)?e.target.checked:e.target.value:e,yh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Oi=(e,t)=>e.has(yh(t)),bh=e=>{const t=e.constructor&&e.constructor.prototype;return Be(t)&&t.hasOwnProperty("isPrototypeOf")},jo=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Le(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(jo&&(e instanceof Blob||n))&&(r||Be(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!bh(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=Le(e[s]));else return e;return t}var En=e=>/^\w*$/.test(e),Fe=e=>e===void 0,kn=e=>Array.isArray(e)?e.filter(Boolean):[],No=e=>kn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),te=(e,t,r)=>{if(!t||!Be(e))return r;const n=(En(t)?[t]:No(t)).reduce((s,o)=>et(s)?s:s[o],e);return Fe(n)||n===e?Fe(e[t])?r:e[t]:n},nt=e=>typeof e=="boolean",Ie=(e,t,r)=>{let n=-1;const s=En(t)?[t]:No(t),o=s.length,a=o-1;for(;++n<o;){const i=s[n];let c=r;if(n!==a){const l=e[i];c=Be(l)||Array.isArray(l)?l:isNaN(+s[n+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}};const Cn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},lt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Rt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ro=Z.createContext(null);Ro.displayName="HookFormContext";const Ze=()=>Z.useContext(Ro),_h=e=>{const{children:t,...r}=e;return Z.createElement(Ro.Provider,{value:r},t)};var Ii=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const a=o;return t._proxyFormState[a]!==lt.all&&(t._proxyFormState[a]=!n||lt.all),r&&(r[a]=!0),e[a]}});return s};const jn=typeof window<"u"?Z.useLayoutEffect:Z.useEffect;function Di(e){const t=Ze(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[a,i]=Z.useState(r._formState),c=Z.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return jn(()=>r._subscribe({name:s,formState:c.current,exact:o,callback:l=>{!n&&i({...r._formState,...l})}}),[s,n,o]),Z.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),Z.useMemo(()=>Ii(a,r,c.current,!1),[a,r])}var st=e=>typeof e=="string",Ao=(e,t,r,n,s)=>st(e)?(n&&t.watch.add(e),te(r,e,s)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),te(r,o))):(n&&(t.watchAll=!0),r),Po=e=>et(e)||!Pi(e);function dt(e,t,r=new WeakSet){if(Po(e)||Po(t))return Object.is(e,t);if(ar(e)&&ar(t))return e.getTime()===t.getTime();const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const o of n){const a=e[o];if(!s.includes(o))return!1;if(o!=="ref"){const i=t[o];if(ar(a)&&ar(i)||Be(a)&&Be(i)||Array.isArray(a)&&Array.isArray(i)?!dt(a,i,r):!Object.is(a,i))return!1}}return!0}function tn(e){const t=Ze(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:a,compute:i}=e||{},c=Z.useRef(s),l=Z.useRef(i),u=Z.useRef(void 0),h=Z.useRef(r),p=Z.useRef(n);l.current=i;const[v,w]=Z.useState(()=>{const x=r._getWatch(n,c.current);return l.current?l.current(x):x}),y=Z.useCallback(x=>{const g=Ao(n,r._names,x||r._formValues,!1,c.current);return l.current?l.current(g):g},[r._formValues,r._names,n]),m=Z.useCallback(x=>{if(!o){const g=Ao(n,r._names,x||r._formValues,!1,c.current);if(l.current){const $=l.current(g);dt($,u.current)||(w($),u.current=$)}else w(g)}},[r._formValues,r._names,o,n]);jn(()=>((h.current!==r||!dt(p.current,n))&&(h.current=r,p.current=n,m()),r._subscribe({name:n,formState:{values:!0},exact:a,callback:x=>{m(x.values)}})),[r,a,n,m]),Z.useEffect(()=>r._removeUnmounted());const _=h.current!==r,f=p.current,b=Z.useMemo(()=>{if(o)return null;const x=!_&&!dt(f,n);return _||x?y():null},[o,_,n,f,y]);return b!==null?b:v}function xh(e){const t=Ze(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o,defaultValue:a}=e,i=Oi(s._names.array,r),c=Z.useMemo(()=>te(s._formValues,r,te(s._defaultValues,r,a)),[s,r,a]),l=tn({control:s,name:r,defaultValue:c,exact:!0}),u=Di({control:s,name:r,exact:!0}),h=Z.useRef(e),p=Z.useRef(void 0),v=Z.useRef(s.register(r,{...e.rules,value:l,...nt(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const w=Z.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!te(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!te(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!te(u.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!te(u.validatingFields,r)},error:{enumerable:!0,get:()=>te(u.errors,r)}}),[u,r]),y=Z.useCallback(b=>v.current.onChange({target:{value:Ti(b),name:r},type:Cn.CHANGE}),[r]),m=Z.useCallback(()=>v.current.onBlur({target:{value:te(s._formValues,r),name:r},type:Cn.BLUR}),[r,s._formValues]),_=Z.useCallback(b=>{const x=te(s._fields,r);x&&b&&(x._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:g=>b.setCustomValidity(g),reportValidity:()=>b.reportValidity()})},[s._fields,r]),f=Z.useMemo(()=>({name:r,value:l,...nt(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:y,onBlur:m,ref:_}),[r,n,u.disabled,y,m,_,l]);return Z.useEffect(()=>{const b=s._options.shouldUnregister||o,x=p.current;x&&x!==r&&!i&&s.unregister(x),s.register(r,{...h.current.rules,...nt(h.current.disabled)?{disabled:h.current.disabled}:{}});const g=($,E)=>{const j=te(s._fields,$);j&&j._f&&(j._f.mount=E)};if(g(r,!0),b){const $=Le(te(s._options.defaultValues,r,h.current.defaultValue));Ie(s._defaultValues,r,$),Fe(te(s._formValues,r))&&Ie(s._formValues,r,$)}return!i&&s.register(r),p.current=r,()=>{(i?b&&!s._state.action:b)?s.unregister(r):g(r,!1)}},[r,s,i,o]),Z.useEffect(()=>{s._setDisabledField({disabled:n,name:r})},[n,r,s]),Z.useMemo(()=>({field:f,formState:u,fieldState:w}),[f,u,w])}const qt=e=>e.render(xh(e));var To=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},tt=e=>Array.isArray(e)?e:[e],Mi=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}};function Vi(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const s=e[n],o=t[n];if(s&&Be(s)&&o){const a=Vi(s,o);Be(a)&&(r[n]=a)}else e[n]&&(r[n]=o)}return r}var Ke=e=>Be(e)&&!Object.keys(e).length,Oo=e=>e.type==="file",ft=e=>typeof e=="function",Nn=e=>{if(!jo)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Fi=e=>e.type==="select-multiple",Io=e=>e.type==="radio",wh=e=>Io(e)||en(e),Do=e=>Nn(e)&&e.isConnected;function $h(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Fe(e)?n++:e[t[n++]];return e}function Sh(e){for(const t in e)if(e.hasOwnProperty(t)&&!Fe(e[t]))return!1;return!0}function Ue(e,t){const r=Array.isArray(t)?t:En(t)?[t]:No(t),n=r.length===1?e:$h(e,r),s=r.length-1,o=r[s];return n&&delete n[o],s!==0&&(Be(n)&&Ke(n)||Array.isArray(n)&&Sh(n))&&Ue(e,r.slice(0,-1)),e}var Eh=e=>{for(const t in e)if(ft(e[t]))return!0;return!1};function Li(e){return Array.isArray(e)||Be(e)&&!Eh(e)}function Mo(e,t={}){for(const r in e){const n=e[r];Li(n)?(t[r]=Array.isArray(n)?[]:{},Mo(n,t[r])):Fe(n)||(t[r]=!0)}return t}function vr(e,t,r){r||(r=Mo(t));for(const n in e){const s=e[n];if(Li(s))Fe(t)||Po(r[n])?r[n]=Mo(s,Array.isArray(s)?[]:{}):vr(s,et(t)?{}:t[n],r[n]);else{const o=t[n];r[n]=!dt(s,o)}}return r}const zi={value:!1,isValid:!1},qi={value:!0,isValid:!0};var Ui=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Fe(e[0].attributes.value)?Fe(e[0].value)||e[0].value===""?qi:{value:e[0].value,isValid:!0}:qi:zi}return zi},Bi=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Fe(e)?e:t?e===""?NaN:e&&+e:r&&st(e)?new Date(e):n?n(e):e;const Wi={isValid:!1,value:null};var Hi=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Wi):Wi;function Gi(e){const t=e.ref;return Oo(t)?t.files:Io(t)?Hi(e.refs).value:Fi(t)?[...t.selectedOptions].map(({value:r})=>r):en(t)?Ui(e.refs).value:Bi(Fe(t.value)?e.ref.value:t.value,e)}var kh=(e,t,r,n)=>{const s={};for(const o of e){const a=te(t,o);a&&Ie(s,o,a._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Rn=e=>e instanceof RegExp,rn=e=>Fe(e)?e:Rn(e)?e.source:Be(e)?Rn(e.value)?e.value.source:e.value:e,yr=e=>({isOnSubmit:!e||e===lt.onSubmit,isOnBlur:e===lt.onBlur,isOnChange:e===lt.onChange,isOnAll:e===lt.all,isOnTouch:e===lt.onTouched});const Zi="AsyncFunction";var Ch=e=>!!e&&!!e.validate&&!!(ft(e.validate)&&e.validate.constructor.name===Zi||Be(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Zi)),jh=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Vo=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const br=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const o=te(e,s);if(o){const{_f:a,...i}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],s)&&!n)return!0;if(a.ref&&t(a.ref,a.name)&&!n)return!0;if(br(i,t))break}else if(Be(i)&&br(i,t))break}}};function Ki(e,t,r){const n=te(e,r);if(n||En(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const o=s.join("."),a=te(t,o),i=te(e,o);if(a&&!Array.isArray(a)&&r!==o)return{name:r};if(i&&i.type)return{name:o,error:i};if(i&&i.root&&i.root.type)return{name:`${o}.root`,error:i.root};s.pop()}return{name:r}}var Nh=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return Ke(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!n||lt.all))},Rh=(e,t,r)=>!e||!t||e===t||tt(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Ah=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,Ph=(e,t)=>!kn(te(e,t)).length&&Ue(e,t),Yi=(e,t,r)=>{const n=tt(te(e,r));return Ie(n,"root",t[r]),Ie(e,r,n),e};function Ji(e,t,r="validate"){if(st(e)||Array.isArray(e)&&e.every(st)||nt(e)&&!e)return{type:r,message:st(e)?e:"",ref:t}}var _r=e=>Be(e)&&!Rn(e)?e:{value:e,message:""},Fo=async(e,t,r,n,s,o)=>{const{ref:a,refs:i,required:c,maxLength:l,minLength:u,min:h,max:p,pattern:v,validate:w,name:y,valueAsNumber:m,mount:_}=e._f,f=te(r,y);if(!_||t.has(y))return{};const b=i?i[0]:a,x=V=>{s&&b.reportValidity&&(b.setCustomValidity(nt(V)?"":V||""),b.reportValidity())},g={},$=Io(a),E=en(a),j=$||E,I=(m||Oo(a))&&Fe(a.value)&&Fe(f)||Nn(a)&&a.value===""||f===""||Array.isArray(f)&&!f.length,U=To.bind(null,y,n,g),D=(V,q,W,ee=Rt.maxLength,K=Rt.minLength)=>{const se=V?q:W;g[y]={type:V?ee:K,message:se,ref:a,...U(V?ee:K,se)}};if(o?!Array.isArray(f)||!f.length:c&&(!j&&(I||et(f))||nt(f)&&!f||E&&!Ui(i).isValid||$&&!Hi(i).isValid)){const{value:V,message:q}=st(c)?{value:!!c,message:c}:_r(c);if(V&&(g[y]={type:Rt.required,message:q,ref:b,...U(Rt.required,q)},!n))return x(q),g}if(!I&&(!et(h)||!et(p))){let V,q;const W=_r(p),ee=_r(h);if(!et(f)&&!isNaN(f)){const K=a.valueAsNumber||f&&+f;et(W.value)||(V=K>W.value),et(ee.value)||(q=K<ee.value)}else{const K=a.valueAsDate||new Date(f),se=H=>new Date(new Date().toDateString()+" "+H),L=a.type=="time",he=a.type=="week";st(W.value)&&f&&(V=L?se(f)>se(W.value):he?f>W.value:K>new Date(W.value)),st(ee.value)&&f&&(q=L?se(f)<se(ee.value):he?f<ee.value:K<new Date(ee.value))}if((V||q)&&(D(!!V,W.message,ee.message,Rt.max,Rt.min),!n))return x(g[y].message),g}if((l||u)&&!I&&(st(f)||o&&Array.isArray(f))){const V=_r(l),q=_r(u),W=!et(V.value)&&f.length>+V.value,ee=!et(q.value)&&f.length<+q.value;if((W||ee)&&(D(W,V.message,q.message),!n))return x(g[y].message),g}if(v&&!I&&st(f)){const{value:V,message:q}=_r(v);if(Rn(V)&&!f.match(V)&&(g[y]={type:Rt.pattern,message:q,ref:a,...U(Rt.pattern,q)},!n))return x(q),g}if(w){if(ft(w)){const V=await w(f,r),q=Ji(V,b);if(q&&(g[y]={...q,...U(Rt.validate,q.message)},!n))return x(q.message),g}else if(Be(w)){let V={};for(const q in w){if(!Ke(V)&&!n)break;const W=Ji(await w[q](f,r),b,q);W&&(V={...W,...U(q,W.message)},x(W.message),n&&(g[y]=V))}if(!Ke(V)&&(g[y]={ref:b,...V},!n))return g}}return x(!0),g};const Th={mode:lt.onSubmit,reValidateMode:lt.onChange,shouldFocusError:!0};function Oh(e={}){let t={...Th,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:ft(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=Be(t.defaultValues)||Be(t.values)?Le(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Le(s),a={action:!1,mount:!1,watch:!1},i={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...u};const p={array:Mi(),state:Mi()},v=t.criteriaMode===lt.all,w=R=>O=>{clearTimeout(l),l=setTimeout(R,O)},y=async R=>{if(!t.disabled&&(u.isValid||h.isValid||R)){const O=t.resolver?Ke((await E()).errors):await I(n,!0);O!==r.isValid&&p.state.next({isValid:O})}},m=(R,O)=>{!t.disabled&&(u.isValidating||u.validatingFields||h.isValidating||h.validatingFields)&&((R||Array.from(i.mount)).forEach(B=>{B&&(O?Ie(r.validatingFields,B,O):Ue(r.validatingFields,B))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Ke(r.validatingFields)}))},_=(R,O=[],B,re,ne=!0,X=!0)=>{if(re&&B&&!t.disabled){if(a.action=!0,X&&Array.isArray(te(n,R))){const me=B(te(n,R),re.argA,re.argB);ne&&Ie(n,R,me)}if(X&&Array.isArray(te(r.errors,R))){const me=B(te(r.errors,R),re.argA,re.argB);ne&&Ie(r.errors,R,me),Ph(r.errors,R)}if((u.touchedFields||h.touchedFields)&&X&&Array.isArray(te(r.touchedFields,R))){const me=B(te(r.touchedFields,R),re.argA,re.argB);ne&&Ie(r.touchedFields,R,me)}(u.dirtyFields||h.dirtyFields)&&(r.dirtyFields=vr(s,o)),p.state.next({name:R,isDirty:D(R,O),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ie(o,R,O)},f=(R,O)=>{Ie(r.errors,R,O),p.state.next({errors:r.errors})},b=R=>{r.errors=R,p.state.next({errors:r.errors,isValid:!1})},x=(R,O,B,re)=>{const ne=te(n,R);if(ne){const X=te(o,R,Fe(B)?te(s,R):B);Fe(X)||re&&re.defaultChecked||O?Ie(o,R,O?X:Gi(ne._f)):W(R,X),a.mount&&!a.action&&y()}},g=(R,O,B,re,ne)=>{let X=!1,me=!1;const Pe={name:R};if(!t.disabled){if(!B||re){(u.isDirty||h.isDirty)&&(me=r.isDirty,r.isDirty=Pe.isDirty=D(),X=me!==Pe.isDirty);const Ve=dt(te(s,R),O);me=!!te(r.dirtyFields,R),Ve?Ue(r.dirtyFields,R):Ie(r.dirtyFields,R,!0),Pe.dirtyFields=r.dirtyFields,X=X||(u.dirtyFields||h.dirtyFields)&&me!==!Ve}if(B){const Ve=te(r.touchedFields,R);Ve||(Ie(r.touchedFields,R,B),Pe.touchedFields=r.touchedFields,X=X||(u.touchedFields||h.touchedFields)&&Ve!==B)}X&&ne&&p.state.next(Pe)}return X?Pe:{}},$=(R,O,B,re)=>{const ne=te(r.errors,R),X=(u.isValid||h.isValid)&&nt(O)&&r.isValid!==O;if(t.delayError&&B?(c=w(()=>f(R,B)),c(t.delayError)):(clearTimeout(l),c=null,B?Ie(r.errors,R,B):Ue(r.errors,R)),(B?!dt(ne,B):ne)||!Ke(re)||X){const me={...re,...X&&nt(O)?{isValid:O}:{},errors:r.errors,name:R};r={...r,...me},p.state.next(me)}},E=async R=>{m(R,!0);const O=await t.resolver(o,t.context,kh(R||i.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return m(R),O},j=async R=>{const{errors:O}=await E(R);if(R)for(const B of R){const re=te(O,B);re?Ie(r.errors,B,re):Ue(r.errors,B)}else r.errors=O;return O},I=async(R,O,B={valid:!0})=>{for(const re in R){const ne=R[re];if(ne){const{_f:X,...me}=ne;if(X){const Pe=i.array.has(X.name),Ve=ne._f&&Ch(ne._f);Ve&&u.validatingFields&&m([X.name],!0);const Qe=await Fo(ne,i.disabled,o,v,t.shouldUseNativeValidation&&!O,Pe);if(Ve&&u.validatingFields&&m([X.name]),Qe[X.name]&&(B.valid=!1,O))break;!O&&(te(Qe,X.name)?Pe?Yi(r.errors,Qe,X.name):Ie(r.errors,X.name,Qe[X.name]):Ue(r.errors,X.name))}!Ke(me)&&await I(me,O,B)}}return B.valid},U=()=>{for(const R of i.unMount){const O=te(n,R);O&&(O._f.refs?O._f.refs.every(B=>!Do(B)):!Do(O._f.ref))&&F(R)}i.unMount=new Set},D=(R,O)=>!t.disabled&&(R&&O&&Ie(o,R,O),!dt(H(),s)),V=(R,O,B)=>Ao(R,i,{...a.mount?o:Fe(O)?s:st(R)?{[R]:O}:O},B,O),q=R=>kn(te(a.mount?o:s,R,t.shouldUnregister?te(s,R,[]):[])),W=(R,O,B={})=>{const re=te(n,R);let ne=O;if(re){const X=re._f;X&&(!X.disabled&&Ie(o,R,Bi(O,X)),ne=Nn(X.ref)&&et(O)?"":O,Fi(X.ref)?[...X.ref.options].forEach(me=>me.selected=ne.includes(me.value)):X.refs?en(X.ref)?X.refs.forEach(me=>{(!me.defaultChecked||!me.disabled)&&(Array.isArray(ne)?me.checked=!!ne.find(Pe=>Pe===me.value):me.checked=ne===me.value||!!ne)}):X.refs.forEach(me=>me.checked=me.value===ne):Oo(X.ref)?X.ref.value="":(X.ref.value=ne,X.ref.type||p.state.next({name:R,values:Le(o)})))}(B.shouldDirty||B.shouldTouch)&&g(R,ne,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&he(R)},ee=(R,O,B)=>{for(const re in O){if(!O.hasOwnProperty(re))return;const ne=O[re],X=R+"."+re,me=te(n,X);(i.array.has(R)||Be(ne)||me&&!me._f)&&!ar(ne)?ee(X,ne,B):W(X,ne,B)}},K=(R,O,B={})=>{const re=te(n,R),ne=i.array.has(R),X=Le(O);Ie(o,R,X),ne?(p.array.next({name:R,values:Le(o)}),(u.isDirty||u.dirtyFields||h.isDirty||h.dirtyFields)&&B.shouldDirty&&p.state.next({name:R,dirtyFields:vr(s,o),isDirty:D(R,X)})):re&&!re._f&&!et(X)?ee(R,X,B):W(R,X,B),Vo(R,i)&&p.state.next({...r,name:R}),p.state.next({name:a.mount?R:void 0,values:Le(o)})},se=async R=>{a.mount=!0;const O=R.target;let B=O.name,re=!0;const ne=te(n,B),X=Ve=>{re=Number.isNaN(Ve)||ar(Ve)&&isNaN(Ve.getTime())||dt(Ve,te(o,B,Ve))},me=yr(t.mode),Pe=yr(t.reValidateMode);if(ne){let Ve,Qe;const Jr=O.type?Gi(ne._f):Ti(R),or=R.type===Cn.BLUR||R.type===Cn.FOCUS_OUT,o$=!jh(ne._f)&&!t.resolver&&!te(r.errors,B)&&!ne._f.deps||Ah(or,te(r.touchedFields,B),r.isSubmitted,Pe,me),Si=Vo(B,i,or);Ie(o,B,Jr),or?(!O||!O.readOnly)&&(ne._f.onBlur&&ne._f.onBlur(R),c&&c(0)):ne._f.onChange&&ne._f.onChange(R);const Ei=g(B,Jr,or),a$=!Ke(Ei)||Si;if(!or&&p.state.next({name:B,type:R.type,values:Le(o)}),o$)return(u.isValid||h.isValid)&&(t.mode==="onBlur"?or&&y():or||y()),a$&&p.state.next({name:B,...Si?{}:Ei});if(!or&&Si&&p.state.next({...r}),t.resolver){const{errors:mh}=await E([B]);if(X(Jr),re){const i$=Ki(r.errors,n,B),hh=Ki(mh,n,i$.name||B);Ve=hh.error,B=hh.name,Qe=Ke(mh)}}else m([B],!0),Ve=(await Fo(ne,i.disabled,o,v,t.shouldUseNativeValidation))[B],m([B]),X(Jr),re&&(Ve?Qe=!1:(u.isValid||h.isValid)&&(Qe=await I(n,!0)));re&&(ne._f.deps&&(!Array.isArray(ne._f.deps)||ne._f.deps.length>0)&&he(ne._f.deps),$(B,Qe,Ve,Ei))}},L=(R,O)=>{if(te(r.errors,O)&&R.focus)return R.focus(),1},he=async(R,O={})=>{let B,re;const ne=tt(R);if(t.resolver){const X=await j(Fe(R)?R:ne);B=Ke(X),re=R?!ne.some(me=>te(X,me)):B}else R?(re=(await Promise.all(ne.map(async X=>{const me=te(n,X);return await I(me&&me._f?{[X]:me}:me)}))).every(Boolean),!(!re&&!r.isValid)&&y()):re=B=await I(n);return p.state.next({...!st(R)||(u.isValid||h.isValid)&&B!==r.isValid?{}:{name:R},...t.resolver||!R?{isValid:B}:{},errors:r.errors}),O.shouldFocus&&!re&&br(n,L,R?ne:i.mount),re},H=(R,O)=>{let B={...a.mount?o:s};return O&&(B=Vi(O.dirtyFields?r.dirtyFields:r.touchedFields,B)),Fe(R)?B:st(R)?te(B,R):R.map(re=>te(B,re))},C=(R,O)=>({invalid:!!te((O||r).errors,R),isDirty:!!te((O||r).dirtyFields,R),error:te((O||r).errors,R),isValidating:!!te(r.validatingFields,R),isTouched:!!te((O||r).touchedFields,R)}),M=R=>{R&&tt(R).forEach(O=>Ue(r.errors,O)),p.state.next({errors:R?r.errors:{}})},P=(R,O,B)=>{const re=(te(n,R,{_f:{}})._f||{}).ref,ne=te(r.errors,R)||{},{ref:X,message:me,type:Pe,...Ve}=ne;Ie(r.errors,R,{...Ve,...O,ref:re}),p.state.next({name:R,errors:r.errors,isValid:!1}),B&&B.shouldFocus&&re&&re.focus&&re.focus()},k=(R,O)=>ft(R)?p.state.subscribe({next:B=>"values"in B&&R(V(void 0,O),B)}):V(R,O,!0),N=R=>p.state.subscribe({next:O=>{Rh(R.name,O.name,R.exact)&&Nh(O,R.formState||u,ze,R.reRenderRoot)&&R.callback({values:{...o},...r,...O,defaultValues:s})}}).unsubscribe,z=R=>(a.mount=!0,h={...h,...R.formState},N({...R,formState:h})),F=(R,O={})=>{for(const B of R?tt(R):i.mount)i.mount.delete(B),i.array.delete(B),O.keepValue||(Ue(n,B),Ue(o,B)),!O.keepError&&Ue(r.errors,B),!O.keepDirty&&Ue(r.dirtyFields,B),!O.keepTouched&&Ue(r.touchedFields,B),!O.keepIsValidating&&Ue(r.validatingFields,B),!t.shouldUnregister&&!O.keepDefaultValue&&Ue(s,B);p.state.next({values:Le(o)}),p.state.next({...r,...O.keepDirty?{isDirty:D()}:{}}),!O.keepIsValid&&y()},Y=({disabled:R,name:O})=>{(nt(R)&&a.mount||R||i.disabled.has(O))&&(R?i.disabled.add(O):i.disabled.delete(O))},de=(R,O={})=>{let B=te(n,R);const re=nt(O.disabled)||nt(t.disabled);return Ie(n,R,{...B||{},_f:{...B&&B._f?B._f:{ref:{name:R}},name:R,mount:!0,...O}}),i.mount.add(R),B?Y({disabled:nt(O.disabled)?O.disabled:t.disabled,name:R}):x(R,!0,O.value),{...re?{disabled:O.disabled||t.disabled}:{},...t.progressive?{required:!!O.required,min:rn(O.min),max:rn(O.max),minLength:rn(O.minLength),maxLength:rn(O.maxLength),pattern:rn(O.pattern)}:{},name:R,onChange:se,onBlur:se,ref:ne=>{if(ne){de(R,O),B=te(n,R);const X=Fe(ne.value)&&ne.querySelectorAll&&ne.querySelectorAll("input,select,textarea")[0]||ne,me=wh(X),Pe=B._f.refs||[];if(me?Pe.find(Ve=>Ve===X):X===B._f.ref)return;Ie(n,R,{_f:{...B._f,...me?{refs:[...Pe.filter(Do),X,...Array.isArray(te(s,R))?[{}]:[]],ref:{type:X.type,name:R}}:{ref:X}}}),x(R,!1,void 0,X)}else B=te(n,R,{}),B._f&&(B._f.mount=!1),(t.shouldUnregister||O.shouldUnregister)&&!(Oi(i.array,R)&&a.action)&&i.unMount.add(R)}}},oe=()=>t.shouldFocusError&&br(n,L,i.mount),A=R=>{nt(R)&&(p.state.next({disabled:R}),br(n,(O,B)=>{const re=te(n,B);re&&(O.disabled=re._f.disabled||R,Array.isArray(re._f.refs)&&re._f.refs.forEach(ne=>{ne.disabled=re._f.disabled||R}))},0,!1))},T=(R,O)=>async B=>{let re;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let ne=Le(o);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:me}=await E();r.errors=X,ne=Le(me)}else await I(n);if(i.disabled.size)for(const X of i.disabled)Ue(ne,X);if(Ue(r.errors,"root"),Ke(r.errors)){p.state.next({errors:{}});try{await R(ne,B)}catch(X){re=X}}else O&&await O({...r.errors},B),oe(),setTimeout(oe);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ke(r.errors)&&!re,submitCount:r.submitCount+1,errors:r.errors}),re)throw re},G=(R,O={})=>{te(n,R)&&(Fe(O.defaultValue)?K(R,Le(te(s,R))):(K(R,O.defaultValue),Ie(s,R,Le(O.defaultValue))),O.keepTouched||Ue(r.touchedFields,R),O.keepDirty||(Ue(r.dirtyFields,R),r.isDirty=O.defaultValue?D(R,Le(te(s,R))):D()),O.keepError||(Ue(r.errors,R),u.isValid&&y()),p.state.next({...r}))},J=(R,O={})=>{const B=R?Le(R):s,re=Le(B),ne=Ke(R),X=ne?s:re;if(O.keepDefaultValues||(s=B),!O.keepValues){if(O.keepDirtyValues){const me=new Set([...i.mount,...Object.keys(vr(s,o))]);for(const Pe of Array.from(me))te(r.dirtyFields,Pe)?Ie(X,Pe,te(o,Pe)):K(Pe,te(X,Pe))}else{if(jo&&Fe(R))for(const me of i.mount){const Pe=te(n,me);if(Pe&&Pe._f){const Ve=Array.isArray(Pe._f.refs)?Pe._f.refs[0]:Pe._f.ref;if(Nn(Ve)){const Qe=Ve.closest("form");if(Qe){Qe.reset();break}}}}if(O.keepFieldsRef)for(const me of i.mount)K(me,te(X,me));else n={}}o=t.shouldUnregister?O.keepDefaultValues?Le(s):{}:Le(X),p.array.next({values:{...X}}),p.state.next({values:{...X}})}i={mount:O.keepDirtyValues?i.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!u.isValid||!!O.keepIsValid||!!O.keepDirtyValues||!t.shouldUnregister&&!Ke(X),a.watch=!!t.shouldUnregister,p.state.next({submitCount:O.keepSubmitCount?r.submitCount:0,isDirty:ne?!1:O.keepDirty?r.isDirty:!!(O.keepDefaultValues&&!dt(R,s)),isSubmitted:O.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:ne?{}:O.keepDirtyValues?O.keepDefaultValues&&o?vr(s,o):r.dirtyFields:O.keepDefaultValues&&R?vr(s,R):O.keepDirty?r.dirtyFields:{},touchedFields:O.keepTouched?r.touchedFields:{},errors:O.keepErrors?r.errors:{},isSubmitSuccessful:O.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:s})},ie=(R,O)=>J(ft(R)?R(o):R,O),ge=(R,O={})=>{const B=te(n,R),re=B&&B._f;if(re){const ne=re.refs?re.refs[0]:re.ref;ne.focus&&(ne.focus(),O.shouldSelect&&ft(ne.select)&&ne.select())}},ze=R=>{r={...r,...R}},qe={control:{register:de,unregister:F,getFieldState:C,handleSubmit:T,setError:P,_subscribe:N,_runSchema:E,_focusError:oe,_getWatch:V,_getDirty:D,_setValid:y,_setFieldArray:_,_setDisabledField:Y,_setErrors:b,_getFieldArray:q,_reset:J,_resetDefaultValues:()=>ft(t.defaultValues)&&t.defaultValues().then(R=>{ie(R,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:A,_subjects:p,_proxyFormState:u,get _fields(){return n},get _formValues(){return o},get _state(){return a},set _state(R){a=R},get _defaultValues(){return s},get _names(){return i},set _names(R){i=R},get _formState(){return r},get _options(){return t},set _options(R){t={...t,...R}}},subscribe:z,trigger:he,register:de,handleSubmit:T,watch:k,setValue:K,getValues:H,reset:ie,resetField:G,clearErrors:M,unregister:F,setError:P,setFocus:ge,getFieldState:C};return{...qe,formControl:qe}}var Ut=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Lo=(e,t,r={})=>r.shouldFocus||Fe(r.shouldFocus)?r.focusName||`${e}.${Fe(r.focusIndex)?t:r.focusIndex}.`:"",zo=(e,t)=>[...e,...tt(t)],qo=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Uo(e,t,r){return[...e.slice(0,t),...tt(r),...e.slice(t)]}var Bo=(e,t,r)=>Array.isArray(e)?(Fe(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Wo=(e,t)=>[...tt(t),...tt(e)];function Ih(e,t){let r=0;const n=[...e];for(const s of t)n.splice(s-r,1),r++;return kn(n).length?n:[]}var Ho=(e,t)=>Fe(t)?[]:Ih(e,tt(t).sort((r,n)=>r-n)),Go=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Xi=(e,t,r)=>(e[t]=r,e);function Qi(e){const t=Ze(),{control:r=t.control,name:n,keyName:s="id",shouldUnregister:o,rules:a}=e,[i,c]=Z.useState(r._getFieldArray(n)),l=Z.useRef(r._getFieldArray(n).map(Ut)),u=Z.useRef(!1);r._names.array.add(n),Z.useMemo(()=>a&&i.length>=0&&r.register(n,a),[r,n,i.length,a]),jn(()=>r._subjects.array.subscribe({next:({values:x,name:g})=>{if(g===n||!g){const $=te(x,n);Array.isArray($)&&(c($),l.current=$.map(Ut))}}}).unsubscribe,[r,n]);const h=Z.useCallback(x=>{u.current=!0,r._setFieldArray(n,x)},[r,n]),p=(x,g)=>{const $=tt(Le(x)),E=zo(r._getFieldArray(n),$);r._names.focus=Lo(n,E.length-1,g),l.current=zo(l.current,$.map(Ut)),h(E),c(E),r._setFieldArray(n,E,zo,{argA:qo(x)})},v=(x,g)=>{const $=tt(Le(x)),E=Wo(r._getFieldArray(n),$);r._names.focus=Lo(n,0,g),l.current=Wo(l.current,$.map(Ut)),h(E),c(E),r._setFieldArray(n,E,Wo,{argA:qo(x)})},w=x=>{const g=Ho(r._getFieldArray(n),x);l.current=Ho(l.current,x),h(g),c(g),!Array.isArray(te(r._fields,n))&&Ie(r._fields,n,void 0),r._setFieldArray(n,g,Ho,{argA:x})},y=(x,g,$)=>{const E=tt(Le(g)),j=Uo(r._getFieldArray(n),x,E);r._names.focus=Lo(n,x,$),l.current=Uo(l.current,x,E.map(Ut)),h(j),c(j),r._setFieldArray(n,j,Uo,{argA:x,argB:qo(g)})},m=(x,g)=>{const $=r._getFieldArray(n);Go($,x,g),Go(l.current,x,g),h($),c($),r._setFieldArray(n,$,Go,{argA:x,argB:g},!1)},_=(x,g)=>{const $=r._getFieldArray(n);Bo($,x,g),Bo(l.current,x,g),h($),c($),r._setFieldArray(n,$,Bo,{argA:x,argB:g},!1)},f=(x,g)=>{const $=Le(g),E=Xi(r._getFieldArray(n),x,$);l.current=[...E].map((j,I)=>!j||I===x?Ut():l.current[I]),h(E),c([...E]),r._setFieldArray(n,E,Xi,{argA:x,argB:$},!0,!1)},b=x=>{const g=tt(Le(x));l.current=g.map(Ut),h([...g]),c([...g]),r._setFieldArray(n,[...g],$=>$,{},!0,!1)};return Z.useEffect(()=>{if(r._state.action=!1,Vo(n,r._names)&&r._subjects.state.next({...r._formState}),u.current&&(!yr(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!yr(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(x=>{const g=te(x.errors,n),$=te(r._formState.errors,n);($?!g&&$.type||g&&($.type!==g.type||$.message!==g.message):g&&g.type)&&(g?Ie(r._formState.errors,n,g):Ue(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const x=te(r._fields,n);x&&x._f&&!(yr(r._options.reValidateMode).isOnSubmit&&yr(r._options.mode).isOnSubmit)&&Fo(x,r._names.disabled,r._formValues,r._options.criteriaMode===lt.all,r._options.shouldUseNativeValidation,!0).then(g=>!Ke(g)&&r._subjects.state.next({errors:Yi(r._formState.errors,g,n)}))}r._subjects.state.next({name:n,values:Le(r._formValues)}),r._names.focus&&br(r._fields,(x,g)=>{if(r._names.focus&&g.startsWith(r._names.focus)&&x.focus)return x.focus(),1}),r._names.focus="",r._setValid(),u.current=!1},[i,n,r]),Z.useEffect(()=>(!te(r._formValues,n)&&r._setFieldArray(n),()=>{const x=(g,$)=>{const E=te(r._fields,g);E&&E._f&&(E._f.mount=$)};r._options.shouldUnregister||o?r.unregister(n):x(n,!1)}),[n,r,s,o]),{swap:Z.useCallback(m,[h,n,r]),move:Z.useCallback(_,[h,n,r]),prepend:Z.useCallback(v,[h,n,r]),append:Z.useCallback(p,[h,n,r]),remove:Z.useCallback(w,[h,n,r]),insert:Z.useCallback(y,[h,n,r]),update:Z.useCallback(f,[h,n,r]),replace:Z.useCallback(b,[h,n,r]),fields:Z.useMemo(()=>i.map((x,g)=>({...x,[s]:l.current[g]||Ut()})),[i,s])}}function Dh(e={}){const t=Z.useRef(void 0),r=Z.useRef(void 0),[n,s]=Z.useState({isDirty:!1,isValidating:!1,isLoading:ft(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:ft(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!ft(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...i}=Oh(e);t.current={...i,formState:n}}const o=t.current.control;return o._options=e,jn(()=>{const a=o._subscribe({formState:o._proxyFormState,callback:()=>s({...o._formState}),reRenderRoot:!0});return s(i=>({...i,isReady:!0})),o._formState.isReady=!0,a},[o]),Z.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Z.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),Z.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),Z.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),Z.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==n.isDirty&&o._subjects.state.next({isDirty:a})}},[o,n.isDirty]),Z.useEffect(()=>{var a;e.values&&!dt(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((a=o._options.resetOptions)===null||a===void 0)&&a.keepIsValid||o._setValid(),r.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[o,e.values]),Z.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Ii(n,o),t.current}const Mh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let nn=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Mh[r[e]&63];return t};function ec(e,[t,r]){return Math.min(r,Math.max(t,e))}function be(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Vh(e,t){const r=S.createContext(t),n=o=>{const{children:a,...i}=o,c=S.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function s(o){const a=S.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function xt(e,t=[]){let r=[];function n(o,a){const i=S.createContext(a),c=r.length;r=[...r,a];const l=h=>{var _;const{scope:p,children:v,...w}=h,y=((_=p==null?void 0:p[e])==null?void 0:_[c])||i,m=S.useMemo(()=>w,Object.values(w));return d.jsx(y.Provider,{value:m,children:v})};l.displayName=o+"Provider";function u(h,p){var y;const v=((y=p==null?void 0:p[e])==null?void 0:y[c])||i,w=S.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[l,u]}const s=()=>{const o=r.map(a=>S.createContext(a));return function(i){const c=(i==null?void 0:i[e])||o;return S.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return s.scopeName=e,[n,Fh(s,...t)]}function Fh(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const a=n.reduce((i,{useScope:c,scopeName:l})=>{const h=c(o)[`__scope${l}`];return{...i,...h}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function tc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xr(...e){return t=>{let r=!1;const n=e.map(s=>{const o=tc(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():tc(e[s],null)}}}}function De(...e){return S.useCallback(xr(...e),e)}function rc(e){const t=Lh(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(qh);if(c){const l=c.props.children,u=i.map(h=>h===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Lh(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=Bh(s),i=Uh(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zh=Symbol("radix.slottable");function qh(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zh}function Uh(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function Bh(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function nc(e){const t=e+"CollectionProvider",[r,n]=xt(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:m,children:_}=y,f=Z.useRef(null),b=Z.useRef(new Map).current;return d.jsx(s,{scope:m,itemMap:b,collectionRef:f,children:_})};a.displayName=t;const i=e+"CollectionSlot",c=rc(i),l=Z.forwardRef((y,m)=>{const{scope:_,children:f}=y,b=o(i,_),x=De(m,b.collectionRef);return d.jsx(c,{ref:x,children:f})});l.displayName=i;const u=e+"CollectionItemSlot",h="data-radix-collection-item",p=rc(u),v=Z.forwardRef((y,m)=>{const{scope:_,children:f,...b}=y,x=Z.useRef(null),g=De(m,x),$=o(u,_);return Z.useEffect(()=>($.itemMap.set(x,{ref:x,...b}),()=>void $.itemMap.delete(x))),d.jsx(p,{[h]:"",ref:g,children:f})});v.displayName=u;function w(y){const m=o(e+"CollectionConsumer",y);return Z.useCallback(()=>{const f=m.collectionRef.current;if(!f)return[];const b=Array.from(f.querySelectorAll(`[${h}]`));return Array.from(m.itemMap.values()).sort(($,E)=>b.indexOf($.ref.current)-b.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},w,n]}var Wh=S.createContext(void 0);function Zo(e){const t=S.useContext(Wh);return e||t||"ltr"}function Hh(e){const t=Gh(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(Kh);if(c){const l=c.props.children,u=i.map(h=>h===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Gh(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=Jh(s),i=Yh(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zh=Symbol("radix.slottable");function Kh(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zh}function Yh(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function Jh(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Xh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],je=Xh.reduce((e,t)=>{const r=Hh(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Qh(e,t){e&&$n.flushSync(()=>e.dispatchEvent(t))}function Bt(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function ep(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e);S.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var tp="DismissableLayer",Ko="dismissableLayer.update",rp="dismissableLayer.pointerDownOutside",np="dismissableLayer.focusOutside",sc,oc=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),An=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:i,...c}=e,l=S.useContext(oc),[u,h]=S.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=S.useState({}),w=De(t,E=>h(E)),y=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=y.indexOf(m),f=u?y.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,x=f>=_,g=ap(E=>{const j=E.target,I=[...l.branches].some(U=>U.contains(j));!x||I||(s==null||s(E),a==null||a(E),E.defaultPrevented||i==null||i())},p),$=ip(E=>{const j=E.target;[...l.branches].some(U=>U.contains(j))||(o==null||o(E),a==null||a(E),E.defaultPrevented||i==null||i())},p);return ep(E=>{f===l.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},p),S.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(sc=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),ac(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=sc)}},[u,p,r,l]),S.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),ac())},[u,l]),S.useEffect(()=>{const E=()=>v({});return document.addEventListener(Ko,E),()=>document.removeEventListener(Ko,E)},[]),d.jsx(je.div,{...c,ref:w,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,$.onFocusCapture),onBlurCapture:be(e.onBlurCapture,$.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,g.onPointerDownCapture)})});An.displayName=tp;var sp="DismissableLayerBranch",op=S.forwardRef((e,t)=>{const r=S.useContext(oc),n=S.useRef(null),s=De(t,n);return S.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),d.jsx(je.div,{...e,ref:s})});op.displayName=sp;function ap(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e),n=S.useRef(!1),s=S.useRef(()=>{});return S.useEffect(()=>{const o=i=>{if(i.target&&!n.current){let c=function(){ic(rp,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ip(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e),n=S.useRef(!1);return S.useEffect(()=>{const s=o=>{o.target&&!n.current&&ic(np,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ac(){const e=new CustomEvent(Ko);document.dispatchEvent(e)}function ic(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Qh(s,o):s.dispatchEvent(o)}var Yo=0;function cc(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lc()),document.body.insertAdjacentElement("beforeend",e[1]??lc()),Yo++,()=>{Yo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Yo--}},[])}function lc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Jo="focusScope.autoFocusOnMount",Xo="focusScope.autoFocusOnUnmount",uc={bubbles:!1,cancelable:!0},cp="FocusScope",Qo=S.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=e,[i,c]=S.useState(null),l=Bt(s),u=Bt(o),h=S.useRef(null),p=De(t,y=>c(y)),v=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let y=function(b){if(v.paused||!i)return;const x=b.target;i.contains(x)?h.current=x:Wt(h.current,{select:!0})},m=function(b){if(v.paused||!i)return;const x=b.relatedTarget;x!==null&&(i.contains(x)||Wt(h.current,{select:!0}))},_=function(b){if(document.activeElement===document.body)for(const g of b)g.removedNodes.length>0&&Wt(i)};document.addEventListener("focusin",y),document.addEventListener("focusout",m);const f=new MutationObserver(_);return i&&f.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",m),f.disconnect()}}},[n,i,v.paused]),S.useEffect(()=>{if(i){mc.add(v);const y=document.activeElement;if(!i.contains(y)){const _=new CustomEvent(Jo,uc);i.addEventListener(Jo,l),i.dispatchEvent(_),_.defaultPrevented||(lp(hp(dc(i)),{select:!0}),document.activeElement===y&&Wt(i))}return()=>{i.removeEventListener(Jo,l),setTimeout(()=>{const _=new CustomEvent(Xo,uc);i.addEventListener(Xo,u),i.dispatchEvent(_),_.defaultPrevented||Wt(y??document.body,{select:!0}),i.removeEventListener(Xo,u),mc.remove(v)},0)}}},[i,l,u,v]);const w=S.useCallback(y=>{if(!r&&!n||v.paused)return;const m=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(m&&_){const f=y.currentTarget,[b,x]=up(f);b&&x?!y.shiftKey&&_===x?(y.preventDefault(),r&&Wt(b,{select:!0})):y.shiftKey&&_===b&&(y.preventDefault(),r&&Wt(x,{select:!0})):_===f&&y.preventDefault()}},[r,n,v.paused]);return d.jsx(je.div,{tabIndex:-1,...a,ref:p,onKeyDown:w})});Qo.displayName=cp;function lp(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Wt(n,{select:t}),document.activeElement!==r)return}function up(e){const t=dc(e),r=fc(t,e),n=fc(t.reverse(),e);return[r,n]}function dc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function fc(e,t){for(const r of e)if(!dp(r,{upTo:t}))return r}function dp(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fp(e){return e instanceof HTMLInputElement&&"select"in e}function Wt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&fp(e)&&t&&e.select()}}var mc=mp();function mp(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=hc(e,t),e.unshift(t)},remove(t){var r;e=hc(e,t),(r=e[0])==null||r.resume()}}}function hc(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hp(e){return e.filter(t=>t.tagName!=="A")}var Ye=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},pp=S[" useId ".trim().toString()]||(()=>{}),gp=0;function Ht(e){const[t,r]=S.useState(pp());return Ye(()=>{r(n=>n??String(gp++))},[e]),e||(t?`radix-${t}`:"")}const vp=["top","right","bottom","left"],Gt=Math.min,ot=Math.max,Pn=Math.round,Tn=Math.floor,wt=e=>({x:e,y:e}),yp={left:"right",right:"left",bottom:"top",top:"bottom"},bp={start:"end",end:"start"};function ea(e,t,r){return ot(e,Gt(t,r))}function At(e,t){return typeof e=="function"?e(t):e}function Pt(e){return e.split("-")[0]}function wr(e){return e.split("-")[1]}function ta(e){return e==="x"?"y":"x"}function ra(e){return e==="y"?"height":"width"}const _p=new Set(["top","bottom"]);function $t(e){return _p.has(Pt(e))?"y":"x"}function na(e){return ta($t(e))}function xp(e,t,r){r===void 0&&(r=!1);const n=wr(e),s=na(e),o=ra(s);let a=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=On(a)),[a,On(a)]}function wp(e){const t=On(e);return[sa(e),t,sa(t)]}function sa(e){return e.replace(/start|end/g,t=>bp[t])}const pc=["left","right"],gc=["right","left"],$p=["top","bottom"],Sp=["bottom","top"];function Ep(e,t,r){switch(e){case"top":case"bottom":return r?t?gc:pc:t?pc:gc;case"left":case"right":return t?$p:Sp;default:return[]}}function kp(e,t,r,n){const s=wr(e);let o=Ep(Pt(e),r==="start",n);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(sa)))),o}function On(e){return e.replace(/left|right|bottom|top/g,t=>yp[t])}function Cp(e){return{top:0,right:0,bottom:0,left:0,...e}}function vc(e){return typeof e!="number"?Cp(e):{top:e,right:e,bottom:e,left:e}}function In(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function yc(e,t,r){let{reference:n,floating:s}=e;const o=$t(t),a=na(t),i=ra(a),c=Pt(t),l=o==="y",u=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,p=n[i]/2-s[i]/2;let v;switch(c){case"top":v={x:u,y:n.y-s.height};break;case"bottom":v={x:u,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:h};break;case"left":v={x:n.x-s.width,y:h};break;default:v={x:n.x,y:n.y}}switch(wr(t)){case"start":v[a]-=p*(r&&l?-1:1);break;case"end":v[a]+=p*(r&&l?-1:1);break}return v}const jp=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:a}=r,i=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:h}=yc(l,n,c),p=n,v={},w=0;for(let y=0;y<i.length;y++){const{name:m,fn:_}=i[y],{x:f,y:b,data:x,reset:g}=await _({x:u,y:h,initialPlacement:n,placement:p,strategy:s,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});u=f??u,h=b??h,v={...v,[m]:{...v[m],...x}},g&&w<=50&&(w++,typeof g=="object"&&(g.placement&&(p=g.placement),g.rects&&(l=g.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):g.rects),{x:u,y:h}=yc(l,p,c)),y=-1)}return{x:u,y:h,placement:p,strategy:s,middlewareData:v}};async function sn(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:a,elements:i,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:v=0}=At(t,e),w=vc(v),m=i[p?h==="floating"?"reference":"floating":h],_=In(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(m)))==null||r?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:l,rootBoundary:u,strategy:c})),f=h==="floating"?{x:n,y:s,width:a.floating.width,height:a.floating.height}:a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),x=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},g=In(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:f,offsetParent:b,strategy:c}):f);return{top:(_.top-g.top+w.top)/x.y,bottom:(g.bottom-_.bottom+w.bottom)/x.y,left:(_.left-g.left+w.left)/x.x,right:(g.right-_.right+w.right)/x.x}}const Np=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:a,elements:i,middlewareData:c}=t,{element:l,padding:u=0}=At(e,t)||{};if(l==null)return{};const h=vc(u),p={x:r,y:n},v=na(s),w=ra(v),y=await a.getDimensions(l),m=v==="y",_=m?"top":"left",f=m?"bottom":"right",b=m?"clientHeight":"clientWidth",x=o.reference[w]+o.reference[v]-p[v]-o.floating[w],g=p[v]-o.reference[v],$=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let E=$?$[b]:0;(!E||!await(a.isElement==null?void 0:a.isElement($)))&&(E=i.floating[b]||o.floating[w]);const j=x/2-g/2,I=E/2-y[w]/2-1,U=Gt(h[_],I),D=Gt(h[f],I),V=U,q=E-y[w]-D,W=E/2-y[w]/2+j,ee=ea(V,W,q),K=!c.arrow&&wr(s)!=null&&W!==ee&&o.reference[w]/2-(W<V?U:D)-y[w]/2<0,se=K?W<V?W-V:W-q:0;return{[v]:p[v]+se,data:{[v]:ee,centerOffset:W-ee-se,...K&&{alignmentOffset:se}},reset:K}}}),Rp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:a,initialPlacement:i,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...m}=At(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const _=Pt(s),f=$t(i),b=Pt(i)===i,x=await(c.isRTL==null?void 0:c.isRTL(l.floating)),g=p||(b||!y?[On(i)]:wp(i)),$=w!=="none";!p&&$&&g.push(...kp(i,y,w,x));const E=[i,...g],j=await sn(t,m),I=[];let U=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&I.push(j[_]),h){const W=xp(s,a,x);I.push(j[W[0]],j[W[1]])}if(U=[...U,{placement:s,overflows:I}],!I.every(W=>W<=0)){var D,V;const W=(((D=o.flip)==null?void 0:D.index)||0)+1,ee=E[W];if(ee&&(!(h==="alignment"?f!==$t(ee):!1)||U.every(L=>$t(L.placement)===f?L.overflows[0]>0:!0)))return{data:{index:W,overflows:U},reset:{placement:ee}};let K=(V=U.filter(se=>se.overflows[0]<=0).sort((se,L)=>se.overflows[1]-L.overflows[1])[0])==null?void 0:V.placement;if(!K)switch(v){case"bestFit":{var q;const se=(q=U.filter(L=>{if($){const he=$t(L.placement);return he===f||he==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(he=>he>0).reduce((he,H)=>he+H,0)]).sort((L,he)=>L[1]-he[1])[0])==null?void 0:q[0];se&&(K=se);break}case"initialPlacement":K=i;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function bc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _c(e){return vp.some(t=>e[t]>=0)}const Ap=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=At(e,t);switch(n){case"referenceHidden":{const o=await sn(t,{...s,elementContext:"reference"}),a=bc(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:_c(a)}}}case"escaped":{const o=await sn(t,{...s,altBoundary:!0}),a=bc(o,r.floating);return{data:{escapedOffsets:a,escaped:_c(a)}}}default:return{}}}}},xc=new Set(["left","top"]);async function Pp(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),a=Pt(r),i=wr(r),c=$t(r)==="y",l=xc.has(a)?-1:1,u=o&&c?-1:1,h=At(t,e);let{mainAxis:p,crossAxis:v,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return i&&typeof w=="number"&&(v=i==="end"?w*-1:w),c?{x:v*u,y:p*l}:{x:p*l,y:v*u}}const Tp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:a,middlewareData:i}=t,c=await Pp(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:a}}}}},Op=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:i={fn:m=>{let{x:_,y:f}=m;return{x:_,y:f}}},...c}=At(e,t),l={x:r,y:n},u=await sn(t,c),h=$t(Pt(s)),p=ta(h);let v=l[p],w=l[h];if(o){const m=p==="y"?"top":"left",_=p==="y"?"bottom":"right",f=v+u[m],b=v-u[_];v=ea(f,v,b)}if(a){const m=h==="y"?"top":"left",_=h==="y"?"bottom":"right",f=w+u[m],b=w-u[_];w=ea(f,w,b)}const y=i.fn({...t,[p]:v,[h]:w});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[p]:o,[h]:a}}}}}},Ip=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:l=!0}=At(e,t),u={x:r,y:n},h=$t(s),p=ta(h);let v=u[p],w=u[h];const y=At(i,t),m=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const b=p==="y"?"height":"width",x=o.reference[p]-o.floating[b]+m.mainAxis,g=o.reference[p]+o.reference[b]-m.mainAxis;v<x?v=x:v>g&&(v=g)}if(l){var _,f;const b=p==="y"?"width":"height",x=xc.has(Pt(s)),g=o.reference[h]-o.floating[b]+(x&&((_=a.offset)==null?void 0:_[h])||0)+(x?0:m.crossAxis),$=o.reference[h]+o.reference[b]+(x?0:((f=a.offset)==null?void 0:f[h])||0)-(x?m.crossAxis:0);w<g?w=g:w>$&&(w=$)}return{[p]:v,[h]:w}}}},Dp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:a,elements:i}=t,{apply:c=()=>{},...l}=At(e,t),u=await sn(t,l),h=Pt(s),p=wr(s),v=$t(s)==="y",{width:w,height:y}=o.floating;let m,_;h==="top"||h==="bottom"?(m=h,_=p===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(_=h,m=p==="end"?"top":"bottom");const f=y-u.top-u.bottom,b=w-u.left-u.right,x=Gt(y-u[m],f),g=Gt(w-u[_],b),$=!t.middlewareData.shift;let E=x,j=g;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(j=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=f),$&&!p){const U=ot(u.left,0),D=ot(u.right,0),V=ot(u.top,0),q=ot(u.bottom,0);v?j=w-2*(U!==0||D!==0?U+D:ot(u.left,u.right)):E=y-2*(V!==0||q!==0?V+q:ot(u.top,u.bottom))}await c({...t,availableWidth:j,availableHeight:E});const I=await a.getDimensions(i.floating);return w!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function Dn(){return typeof window<"u"}function $r(e){return wc(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(wc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wc(e){return Dn()?e instanceof Node||e instanceof at(e).Node:!1}function mt(e){return Dn()?e instanceof Element||e instanceof at(e).Element:!1}function Et(e){return Dn()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function $c(e){return!Dn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}const Mp=new Set(["inline","contents"]);function on(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Mp.has(s)}const Vp=new Set(["table","td","th"]);function Fp(e){return Vp.has($r(e))}const Lp=[":popover-open",":modal"];function Mn(e){return Lp.some(t=>{try{return e.matches(t)}catch{return!1}})}const zp=["transform","translate","scale","rotate","perspective"],qp=["transform","translate","scale","rotate","perspective","filter"],Up=["paint","layout","strict","content"];function oa(e){const t=aa(),r=mt(e)?ht(e):e;return zp.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||qp.some(n=>(r.willChange||"").includes(n))||Up.some(n=>(r.contain||"").includes(n))}function Bp(e){let t=Zt(e);for(;Et(t)&&!Sr(t);){if(oa(t))return t;if(Mn(t))return null;t=Zt(t)}return null}function aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Wp=new Set(["html","body","#document"]);function Sr(e){return Wp.has($r(e))}function ht(e){return at(e).getComputedStyle(e)}function Vn(e){return mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zt(e){if($r(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$c(e)&&e.host||St(e);return $c(t)?t.host:t}function Sc(e){const t=Zt(e);return Sr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&on(t)?t:Sc(t)}function an(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Sc(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),a=at(s);if(o){const i=ia(a);return t.concat(a,a.visualViewport||[],on(s)?s:[],i&&r?an(i):[])}return t.concat(s,an(s,[],r))}function ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ec(e){const t=ht(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Et(e),o=s?e.offsetWidth:r,a=s?e.offsetHeight:n,i=Pn(r)!==o||Pn(n)!==a;return i&&(r=o,n=a),{width:r,height:n,$:i}}function ca(e){return mt(e)?e:e.contextElement}function Er(e){const t=ca(e);if(!Et(t))return wt(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Ec(t);let a=(o?Pn(r.width):r.width)/n,i=(o?Pn(r.height):r.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Hp=wt(0);function kc(e){const t=at(e);return!aa()||!t.visualViewport?Hp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gp(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==at(e)?!1:t}function ir(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=ca(e);let a=wt(1);t&&(n?mt(n)&&(a=Er(n)):a=Er(e));const i=Gp(o,r,n)?kc(o):wt(0);let c=(s.left+i.x)/a.x,l=(s.top+i.y)/a.y,u=s.width/a.x,h=s.height/a.y;if(o){const p=at(o),v=n&&mt(n)?at(n):n;let w=p,y=ia(w);for(;y&&n&&v!==w;){const m=Er(y),_=y.getBoundingClientRect(),f=ht(y),b=_.left+(y.clientLeft+parseFloat(f.paddingLeft))*m.x,x=_.top+(y.clientTop+parseFloat(f.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,h*=m.y,c+=b,l+=x,w=at(y),y=ia(w)}}return In({width:u,height:h,x:c,y:l})}function Fn(e,t){const r=Vn(e).scrollLeft;return t?t.left+r:ir(St(e)).left+r}function Cc(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Fn(e,r),s=r.top+t.scrollTop;return{x:n,y:s}}function Zp(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",a=St(n),i=t?Mn(t.floating):!1;if(n===a||i&&o)return r;let c={scrollLeft:0,scrollTop:0},l=wt(1);const u=wt(0),h=Et(n);if((h||!h&&!o)&&(($r(n)!=="body"||on(a))&&(c=Vn(n)),Et(n))){const v=ir(n);l=Er(n),u.x=v.x+n.clientLeft,u.y=v.y+n.clientTop}const p=a&&!h&&!o?Cc(a,c):wt(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+p.x,y:r.y*l.y-c.scrollTop*l.y+u.y+p.y}}function Kp(e){return Array.from(e.getClientRects())}function Yp(e){const t=St(e),r=Vn(e),n=e.ownerDocument.body,s=ot(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ot(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Fn(e);const i=-r.scrollTop;return ht(n).direction==="rtl"&&(a+=ot(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:a,y:i}}const jc=25;function Jp(e,t){const r=at(e),n=St(e),s=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,i=0,c=0;if(s){o=s.width,a=s.height;const u=aa();(!u||u&&t==="fixed")&&(i=s.offsetLeft,c=s.offsetTop)}const l=Fn(n);if(l<=0){const u=n.ownerDocument,h=u.body,p=getComputedStyle(h),v=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(n.clientWidth-h.clientWidth-v);w<=jc&&(o-=w)}else l<=jc&&(o+=l);return{width:o,height:a,x:i,y:c}}const Xp=new Set(["absolute","fixed"]);function Qp(e,t){const r=ir(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=Et(e)?Er(e):wt(1),a=e.clientWidth*o.x,i=e.clientHeight*o.y,c=s*o.x,l=n*o.y;return{width:a,height:i,x:c,y:l}}function Nc(e,t,r){let n;if(t==="viewport")n=Jp(e,r);else if(t==="document")n=Yp(St(e));else if(mt(t))n=Qp(t,r);else{const s=kc(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return In(n)}function Rc(e,t){const r=Zt(e);return r===t||!mt(r)||Sr(r)?!1:ht(r).position==="fixed"||Rc(r,t)}function eg(e,t){const r=t.get(e);if(r)return r;let n=an(e,[],!1).filter(i=>mt(i)&&$r(i)!=="body"),s=null;const o=ht(e).position==="fixed";let a=o?Zt(e):e;for(;mt(a)&&!Sr(a);){const i=ht(a),c=oa(a);!c&&i.position==="fixed"&&(s=null),(o?!c&&!s:!c&&i.position==="static"&&!!s&&Xp.has(s.position)||on(a)&&!c&&Rc(e,a))?n=n.filter(u=>u!==a):s=i,a=Zt(a)}return t.set(e,n),n}function tg(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const a=[...r==="clippingAncestors"?Mn(t)?[]:eg(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((l,u)=>{const h=Nc(t,u,s);return l.top=ot(h.top,l.top),l.right=Gt(h.right,l.right),l.bottom=Gt(h.bottom,l.bottom),l.left=ot(h.left,l.left),l},Nc(t,i,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function rg(e){const{width:t,height:r}=Ec(e);return{width:t,height:r}}function ng(e,t,r){const n=Et(t),s=St(t),o=r==="fixed",a=ir(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const c=wt(0);function l(){c.x=Fn(s)}if(n||!n&&!o)if(($r(t)!=="body"||on(s))&&(i=Vn(t)),n){const v=ir(t,!0,o,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else s&&l();o&&!n&&s&&l();const u=s&&!n&&!o?Cc(s,i):wt(0),h=a.left+i.scrollLeft-c.x-u.x,p=a.top+i.scrollTop-c.y-u.y;return{x:h,y:p,width:a.width,height:a.height}}function la(e){return ht(e).position==="static"}function Ac(e,t){if(!Et(e)||ht(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return St(e)===r&&(r=r.ownerDocument.body),r}function Pc(e,t){const r=at(e);if(Mn(e))return r;if(!Et(e)){let s=Zt(e);for(;s&&!Sr(s);){if(mt(s)&&!la(s))return s;s=Zt(s)}return r}let n=Ac(e,t);for(;n&&Fp(n)&&la(n);)n=Ac(n,t);return n&&Sr(n)&&la(n)&&!oa(n)?r:n||Bp(e)||r}const sg=async function(e){const t=this.getOffsetParent||Pc,r=this.getDimensions,n=await r(e.floating);return{reference:ng(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function og(e){return ht(e).direction==="rtl"}const ag={convertOffsetParentRelativeRectToViewportRelativeRect:Zp,getDocumentElement:St,getClippingRect:tg,getOffsetParent:Pc,getElementRects:sg,getClientRects:Kp,getDimensions:rg,getScale:Er,isElement:mt,isRTL:og};function Tc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ig(e,t){let r=null,n;const s=St(e);function o(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),o();const l=e.getBoundingClientRect(),{left:u,top:h,width:p,height:v}=l;if(i||t(),!p||!v)return;const w=Tn(h),y=Tn(s.clientWidth-(u+p)),m=Tn(s.clientHeight-(h+v)),_=Tn(u),b={rootMargin:-w+"px "+-y+"px "+-m+"px "+-_+"px",threshold:ot(0,Gt(1,c))||1};let x=!0;function g($){const E=$[0].intersectionRatio;if(E!==c){if(!x)return a();E?a(!1,E):n=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Tc(l,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(g,{...b,root:s.ownerDocument})}catch{r=new IntersectionObserver(g,b)}r.observe(e)}return a(!0),o}function cg(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=ca(e),u=s||o?[...l?an(l):[],...an(t)]:[];u.forEach(_=>{s&&_.addEventListener("scroll",r,{passive:!0}),o&&_.addEventListener("resize",r)});const h=l&&i?ig(l,r):null;let p=-1,v=null;a&&(v=new ResizeObserver(_=>{let[f]=_;f&&f.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),r()}),l&&!c&&v.observe(l),v.observe(t));let w,y=c?ir(e):null;c&&m();function m(){const _=ir(e);y&&!Tc(y,_)&&r(),y=_,w=requestAnimationFrame(m)}return r(),()=>{var _;u.forEach(f=>{s&&f.removeEventListener("scroll",r),o&&f.removeEventListener("resize",r)}),h==null||h(),(_=v)==null||_.disconnect(),v=null,c&&cancelAnimationFrame(w)}}const lg=Tp,ug=Op,dg=Rp,fg=Dp,mg=Ap,Oc=Np,hg=Ip,pg=(e,t,r)=>{const n=new Map,s={platform:ag,...r},o={...s.platform,_c:n};return jp(e,t,{...s,platform:o})};var gg=typeof document<"u",vg=function(){},Ln=gg?Z.useLayoutEffect:vg;function zn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!zn(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!zn(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ic(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dc(e,t){const r=Ic(e);return Math.round(t*r)/r}function ua(e){const t=S.useRef(e);return Ln(()=>{t.current=e}),t}function yg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:a}={},transform:i=!0,whileElementsMounted:c,open:l}=e,[u,h]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=S.useState(n);zn(p,n)||v(n);const[w,y]=S.useState(null),[m,_]=S.useState(null),f=S.useCallback(L=>{L!==$.current&&($.current=L,y(L))},[]),b=S.useCallback(L=>{L!==E.current&&(E.current=L,_(L))},[]),x=o||w,g=a||m,$=S.useRef(null),E=S.useRef(null),j=S.useRef(u),I=c!=null,U=ua(c),D=ua(s),V=ua(l),q=S.useCallback(()=>{if(!$.current||!E.current)return;const L={placement:t,strategy:r,middleware:p};D.current&&(L.platform=D.current),pg($.current,E.current,L).then(he=>{const H={...he,isPositioned:V.current!==!1};W.current&&!zn(j.current,H)&&(j.current=H,$n.flushSync(()=>{h(H)}))})},[p,t,r,D,V]);Ln(()=>{l===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,h(L=>({...L,isPositioned:!1})))},[l]);const W=S.useRef(!1);Ln(()=>(W.current=!0,()=>{W.current=!1}),[]),Ln(()=>{if(x&&($.current=x),g&&(E.current=g),x&&g){if(U.current)return U.current(x,g,q);q()}},[x,g,q,U,I]);const ee=S.useMemo(()=>({reference:$,floating:E,setReference:f,setFloating:b}),[f,b]),K=S.useMemo(()=>({reference:x,floating:g}),[x,g]),se=S.useMemo(()=>{const L={position:r,left:0,top:0};if(!K.floating)return L;const he=Dc(K.floating,u.x),H=Dc(K.floating,u.y);return i?{...L,transform:"translate("+he+"px, "+H+"px)",...Ic(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:he,top:H}},[r,i,K.floating,u.x,u.y]);return S.useMemo(()=>({...u,update:q,refs:ee,elements:K,floatingStyles:se}),[u,q,ee,K,se])}const bg=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Oc({element:n.current,padding:s}).fn(r):{}:n?Oc({element:n,padding:s}).fn(r):{}}}},_g=(e,t)=>({...lg(e),options:[e,t]}),xg=(e,t)=>({...ug(e),options:[e,t]}),wg=(e,t)=>({...hg(e),options:[e,t]}),$g=(e,t)=>({...dg(e),options:[e,t]}),Sg=(e,t)=>({...fg(e),options:[e,t]}),Eg=(e,t)=>({...mg(e),options:[e,t]}),kg=(e,t)=>({...bg(e),options:[e,t]});var Cg="Arrow",Mc=S.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return d.jsx(je.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Mc.displayName=Cg;var jg=Mc;function da(e){const[t,r]=S.useState(void 0);return Ye(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let a,i;if("borderBoxSize"in o){const c=o.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var fa="Popper",[Vc,qn]=xt(fa),[Ng,Fc]=Vc(fa),Lc=e=>{const{__scopePopper:t,children:r}=e,[n,s]=S.useState(null);return d.jsx(Ng,{scope:t,anchor:n,onAnchorChange:s,children:r})};Lc.displayName=fa;var zc="PopperAnchor",qc=S.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=Fc(zc,r),a=S.useRef(null),i=De(t,a),c=S.useRef(null);return S.useEffect(()=>{const l=c.current;c.current=(n==null?void 0:n.current)||a.current,l!==c.current&&o.onAnchorChange(c.current)}),n?null:d.jsx(je.div,{...s,ref:i})});qc.displayName=zc;var ma="PopperContent",[Rg,Ag]=Vc(ma),Uc=S.forwardRef((e,t)=>{var F,Y,de,oe,A,T;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:v="optimized",onPlaced:w,...y}=e,m=Fc(ma,r),[_,f]=S.useState(null),b=De(t,G=>f(G)),[x,g]=S.useState(null),$=da(x),E=($==null?void 0:$.width)??0,j=($==null?void 0:$.height)??0,I=n+(o!=="center"?"-"+o:""),U=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],V=D.length>0,q={padding:U,boundary:D.filter(Tg),altBoundary:V},{refs:W,floatingStyles:ee,placement:K,isPositioned:se,middlewareData:L}=yg({strategy:"fixed",placement:I,whileElementsMounted:(...G)=>cg(...G,{animationFrame:v==="always"}),elements:{reference:m.anchor},middleware:[_g({mainAxis:s+j,alignmentAxis:a}),c&&xg({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?wg():void 0,...q}),c&&$g({...q}),Sg({...q,apply:({elements:G,rects:J,availableWidth:ie,availableHeight:ge})=>{const{width:ze,height:rt}=J.reference,qe=G.floating.style;qe.setProperty("--radix-popper-available-width",`${ie}px`),qe.setProperty("--radix-popper-available-height",`${ge}px`),qe.setProperty("--radix-popper-anchor-width",`${ze}px`),qe.setProperty("--radix-popper-anchor-height",`${rt}px`)}}),x&&kg({element:x,padding:i}),Og({arrowWidth:E,arrowHeight:j}),p&&Eg({strategy:"referenceHidden",...q})]}),[he,H]=Hc(K),C=Bt(w);Ye(()=>{se&&(C==null||C())},[se,C]);const M=(F=L.arrow)==null?void 0:F.x,P=(Y=L.arrow)==null?void 0:Y.y,k=((de=L.arrow)==null?void 0:de.centerOffset)!==0,[N,z]=S.useState();return Ye(()=>{_&&z(window.getComputedStyle(_).zIndex)},[_]),d.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:se?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:N,"--radix-popper-transform-origin":[(oe=L.transformOrigin)==null?void 0:oe.x,(A=L.transformOrigin)==null?void 0:A.y].join(" "),...((T=L.hide)==null?void 0:T.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Rg,{scope:r,placedSide:he,onArrowChange:g,arrowX:M,arrowY:P,shouldHideArrow:k,children:d.jsx(je.div,{"data-side":he,"data-align":H,...y,ref:b,style:{...y.style,animation:se?void 0:"none"}})})})});Uc.displayName=ma;var Bc="PopperArrow",Pg={top:"bottom",right:"left",bottom:"top",left:"right"},Wc=S.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=Ag(Bc,n),a=Pg[o.placedSide];return d.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:d.jsx(jg,{...s,ref:r,style:{...s.style,display:"block"}})})});Wc.displayName=Bc;function Tg(e){return e!==null}var Og=e=>({name:"transformOrigin",options:e,fn(t){var m,_,f;const{placement:r,rects:n,middlewareData:s}=t,a=((m=s.arrow)==null?void 0:m.centerOffset)!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,u]=Hc(r),h={start:"0%",center:"50%",end:"100%"}[u],p=(((_=s.arrow)==null?void 0:_.x)??0)+i/2,v=(((f=s.arrow)==null?void 0:f.y)??0)+c/2;let w="",y="";return l==="bottom"?(w=a?h:`${p}px`,y=`${-c}px`):l==="top"?(w=a?h:`${p}px`,y=`${n.floating.height+c}px`):l==="right"?(w=`${-c}px`,y=a?h:`${v}px`):l==="left"&&(w=`${n.floating.width+c}px`,y=a?h:`${v}px`),{data:{x:w,y}}}});function Hc(e){const[t,r="center"]=e.split("-");return[t,r]}var Gc=Lc,Zc=qc,Kc=Uc,Yc=Wc,Ig="Portal",Un=S.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[s,o]=S.useState(!1);Ye(()=>o(!0),[]);const a=r||s&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?ki.createPortal(d.jsx(je.div,{...n,ref:t}),a):null});Un.displayName=Ig;function Dg(e){const t=Mg(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(Fg);if(c){const l=c.props.children,u=i.map(h=>h===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Mg(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=zg(s),i=Lg(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vg=Symbol("radix.slottable");function Fg(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vg}function Lg(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function zg(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qg=S[" useInsertionEffect ".trim().toString()]||Ye;function cr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,a]=Ug({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:s;{const u=S.useRef(e!==void 0);S.useEffect(()=>{const h=u.current;h!==i&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,n])}const l=S.useCallback(u=>{var h;if(i){const p=Bg(u)?u(e):u;p!==e&&((h=a.current)==null||h.call(a,p))}else o(u)},[i,e,o,a]);return[c,l]}function Ug({defaultProp:e,onChange:t}){const[r,n]=S.useState(e),s=S.useRef(r),o=S.useRef(t);return qg(()=>{o.current=t},[t]),S.useEffect(()=>{var a;s.current!==r&&((a=o.current)==null||a.call(o,r),s.current=r)},[r,s]),[r,n,o]}function Bg(e){return typeof e=="function"}function ha(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Jc=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Wg="VisuallyHidden",Xc=S.forwardRef((e,t)=>d.jsx(je.span,{...e,ref:t,style:{...Jc,...e.style}}));Xc.displayName=Wg;var Hg=Xc,Gg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kr=new WeakMap,Bn=new WeakMap,Wn={},pa=0,Qc=function(e){return e&&(e.host||Qc(e.parentNode))},Zg=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Qc(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Kg=function(e,t,r,n){var s=Zg(t,Array.isArray(e)?e:[e]);Wn[r]||(Wn[r]=new WeakMap);var o=Wn[r],a=[],i=new Set,c=new Set(s),l=function(h){!h||i.has(h)||(i.add(h),l(h.parentNode))};s.forEach(l);var u=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(p){if(i.has(p))u(p);else try{var v=p.getAttribute(n),w=v!==null&&v!=="false",y=(kr.get(p)||0)+1,m=(o.get(p)||0)+1;kr.set(p,y),o.set(p,m),a.push(p),y===1&&w&&Bn.set(p,!0),m===1&&p.setAttribute(r,"true"),w||p.setAttribute(n,"true")}catch(_){console.error("aria-hidden: cannot operate on ",p,_)}})};return u(t),i.clear(),pa++,function(){a.forEach(function(h){var p=kr.get(h)-1,v=o.get(h)-1;kr.set(h,p),o.set(h,v),p||(Bn.has(h)||h.removeAttribute(n),Bn.delete(h)),v||h.removeAttribute(r)}),pa--,pa||(kr=new WeakMap,kr=new WeakMap,Bn=new WeakMap,Wn={})}},el=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=Gg(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Kg(n,s,r,"aria-hidden")):function(){return null}},kt=function(){return kt=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},kt.apply(this,arguments)};function tl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function Yg(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Hn="right-scroll-bar-position",Gn="width-before-scroll-bar",Jg="with-scroll-bars-hidden",Xg="--removed-body-scroll-bar-size";function ga(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qg(e,t){var r=Z.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var ev=typeof window<"u"?S.useLayoutEffect:S.useEffect,rl=new WeakMap;function tv(e,t){var r=Qg(null,function(n){return e.forEach(function(s){return ga(s,n)})});return ev(function(){var n=rl.get(r);if(n){var s=new Set(n),o=new Set(e),a=r.current;s.forEach(function(i){o.has(i)||ga(i,null)}),o.forEach(function(i){s.has(i)||ga(i,a)})}rl.set(r,e)},[e]),r}function rv(e){return e}function nv(e,t){t===void 0&&(t=rv);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(i){return o(i)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(o),a=r}var c=function(){var u=a;a=[],u.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),r}}}};return s}function sv(e){e===void 0&&(e={});var t=nv(null);return t.options=kt({async:!0,ssr:!1},e),t}var nl=function(e){var t=e.sideCar,r=tl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return S.createElement(n,kt({},r))};nl.isSideCarExport=!0;function ov(e,t){return e.useMedium(t),nl}var sl=sv(),va=function(){},Zn=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:va,onWheelCapture:va,onTouchMoveCapture:va}),s=n[0],o=n[1],a=e.forwardProps,i=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,h=e.shards,p=e.sideCar,v=e.noRelative,w=e.noIsolation,y=e.inert,m=e.allowPinchZoom,_=e.as,f=_===void 0?"div":_,b=e.gapMode,x=tl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),g=p,$=tv([r,t]),E=kt(kt({},x),s);return S.createElement(S.Fragment,null,u&&S.createElement(g,{sideCar:sl,removeScrollBar:l,shards:h,noRelative:v,noIsolation:w,inert:y,setCallbacks:o,allowPinchZoom:!!m,lockRef:r,gapMode:b}),a?S.cloneElement(S.Children.only(i),kt(kt({},E),{ref:$})):S.createElement(f,kt({},E,{className:c,ref:$}),i))});Zn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zn.classNames={fullWidth:Gn,zeroRight:Hn};var av=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function iv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=av();return t&&e.setAttribute("nonce",t),e}function cv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uv=function(){var e=0,t=null;return{add:function(r){e==0&&(t=iv())&&(cv(t,r),lv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dv=function(){var e=uv();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ol=function(){var e=dv(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},fv={left:0,top:0,right:0,gap:0},ya=function(e){return parseInt(e||"",10)||0},mv=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[ya(r),ya(n),ya(s)]},hv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fv;var t=mv(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},pv=ol(),Cr="data-scroll-locked",gv=function(e,t,r,n){var s=e.left,o=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
23
|
-
.`.concat(Jg,` {
|
|
1
|
+
(function(kt,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],d):(kt=typeof globalThis<"u"?globalThis:kt||self,d(kt["json-schema-editor"]={},kt.React,kt.React,kt.ReactDOM))})(this,(function(kt,d,J,Si){"use strict";function Ei(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const S=Ei(J),fn=Ei(Si);var Wr=e=>e.type==="checkbox",Qt=e=>e instanceof Date,Je=e=>e==null;const ki=e=>typeof e=="object";var Re=e=>!Je(e)&&!Array.isArray(e)&&ki(e)&&!Qt(e),xi=e=>Re(e)&&e.target?Wr(e.target)?e.target.checked:e.target.value:e,Ah=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Ci=(e,t)=>e.has(Ah(t)),Th=e=>{const t=e.constructor&&e.constructor.prototype;return Re(t)&&t.hasOwnProperty("isPrototypeOf")},Ss=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function De(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Ss&&(e instanceof Blob||n))&&(r||Re(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Th(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=De(e[o]));else return e;return t}var pn=e=>/^\w*$/.test(e),Oe=e=>e===void 0,hn=e=>Array.isArray(e)?e.filter(Boolean):[],Es=e=>hn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ee=(e,t,r)=>{if(!t||!Re(e))return r;const n=(pn(t)?[t]:Es(t)).reduce((o,s)=>Je(o)?o:o[s],e);return Oe(n)||n===e?Oe(e[t])?r:e[t]:n},Qe=e=>typeof e=="boolean",Pe=(e,t,r)=>{let n=-1;const o=pn(t)?[t]:Es(t),s=o.length,a=s-1;for(;++n<s;){const i=o[n];let c=r;if(n!==a){const l=e[i];c=Re(l)||Array.isArray(l)?l:isNaN(+o[n+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}};const mn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},st={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},xt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ks=J.createContext(null);ks.displayName="HookFormContext";const Be=()=>J.useContext(ks),Ih=e=>{const{children:t,...r}=e;return J.createElement(ks.Provider,{value:r},t)};var Pi=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const a=s;return t._proxyFormState[a]!==st.all&&(t._proxyFormState[a]=!n||st.all),r&&(r[a]=!0),e[a]}});return o};const gn=typeof window<"u"?J.useLayoutEffect:J.useEffect;function Ni(e){const t=Be(),{control:r=t.control,disabled:n,name:o,exact:s}=e||{},[a,i]=J.useState(r._formState),c=J.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return gn(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:l=>{!n&&i({...r._formState,...l})}}),[o,n,s]),J.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),J.useMemo(()=>Pi(a,r,c.current,!1),[a,r])}var et=e=>typeof e=="string",xs=(e,t,r,n,o)=>et(e)?(n&&t.watch.add(e),ee(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),ee(r,s))):(n&&(t.watchAll=!0),r),Cs=e=>Je(e)||!ki(e);function ct(e,t,r=new WeakSet){if(Cs(e)||Cs(t))return Object.is(e,t);if(Qt(e)&&Qt(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const a=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const i=t[s];if(Qt(a)&&Qt(i)||Re(a)&&Re(i)||Array.isArray(a)&&Array.isArray(i)?!ct(a,i,r):!Object.is(a,i))return!1}}return!0}function Hr(e){const t=Be(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:a,compute:i}=e||{},c=J.useRef(o),l=J.useRef(i),u=J.useRef(void 0),p=J.useRef(r),h=J.useRef(n);l.current=i;const[v,w]=J.useState(()=>{const $=r._getWatch(n,c.current);return l.current?l.current($):$}),y=J.useCallback($=>{const g=xs(n,r._names,$||r._formValues,!1,c.current);return l.current?l.current(g):g},[r._formValues,r._names,n]),m=J.useCallback($=>{if(!s){const g=xs(n,r._names,$||r._formValues,!1,c.current);if(l.current){const E=l.current(g);ct(E,u.current)||(w(E),u.current=E)}else w(g)}},[r._formValues,r._names,s,n]);gn(()=>((p.current!==r||!ct(h.current,n))&&(p.current=r,h.current=n,m()),r._subscribe({name:n,formState:{values:!0},exact:a,callback:$=>{m($.values)}})),[r,a,n,m]),J.useEffect(()=>r._removeUnmounted());const _=p.current!==r,f=h.current,b=J.useMemo(()=>{if(s)return null;const $=!_&&!ct(f,n);return _||$?y():null},[s,_,n,f,y]);return b!==null?b:v}function Oh(e){const t=Be(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:a,exact:i=!0}=e,c=Ci(o._names.array,r),l=J.useMemo(()=>ee(o._formValues,r,ee(o._defaultValues,r,a)),[o,r,a]),u=Hr({control:o,name:r,defaultValue:l,exact:i}),p=Ni({control:o,name:r,exact:i}),h=J.useRef(e),v=J.useRef(void 0),w=J.useRef(o.register(r,{...e.rules,value:u,...Qe(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const y=J.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ee(p.errors,r)},isDirty:{enumerable:!0,get:()=>!!ee(p.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ee(p.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ee(p.validatingFields,r)},error:{enumerable:!0,get:()=>ee(p.errors,r)}}),[p,r]),m=J.useCallback($=>w.current.onChange({target:{value:xi($),name:r},type:mn.CHANGE}),[r]),_=J.useCallback(()=>w.current.onBlur({target:{value:ee(o._formValues,r),name:r},type:mn.BLUR}),[r,o._formValues]),f=J.useCallback($=>{const g=ee(o._fields,r);g&&$&&(g._f.ref={focus:()=>$.focus&&$.focus(),select:()=>$.select&&$.select(),setCustomValidity:E=>$.setCustomValidity(E),reportValidity:()=>$.reportValidity()})},[o._fields,r]),b=J.useMemo(()=>({name:r,value:u,...Qe(n)||p.disabled?{disabled:p.disabled||n}:{},onChange:m,onBlur:_,ref:f}),[r,n,p.disabled,m,_,f,u]);return J.useEffect(()=>{const $=o._options.shouldUnregister||s,g=v.current;g&&g!==r&&!c&&o.unregister(g),o.register(r,{...h.current.rules,...Qe(h.current.disabled)?{disabled:h.current.disabled}:{}});const E=(k,C)=>{const O=ee(o._fields,k);O&&O._f&&(O._f.mount=C)};if(E(r,!0),$){const k=De(ee(o._options.defaultValues,r,h.current.defaultValue));Pe(o._defaultValues,r,k),Oe(ee(o._formValues,r))&&Pe(o._formValues,r,k)}return!c&&o.register(r),v.current=r,()=>{(c?$&&!o._state.action:$)?o.unregister(r):E(r,!1)}},[r,o,c,s]),J.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),J.useMemo(()=>({field:b,formState:p,fieldState:y}),[b,p,y])}const Mt=e=>e.render(Oh(e));var Ps=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Ye=e=>Array.isArray(e)?e:[e],Ai=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function Ti(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const o=e[n],s=t[n];if(o&&Re(o)&&s){const a=Ti(o,s);Re(a)&&(r[n]=a)}else e[n]&&(r[n]=s)}return r}var We=e=>Re(e)&&!Object.keys(e).length,Ns=e=>e.type==="file",lt=e=>typeof e=="function",vn=e=>{if(!Ss)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ii=e=>e.type==="select-multiple",As=e=>e.type==="radio",Dh=e=>As(e)||Wr(e),Ts=e=>vn(e)&&e.isConnected;function Mh(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Oe(e)?n++:e[t[n++]];return e}function zh(e){for(const t in e)if(e.hasOwnProperty(t)&&!Oe(e[t]))return!1;return!0}function Le(e,t){const r=Array.isArray(t)?t:pn(t)?[t]:Es(t),n=r.length===1?e:Mh(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(Re(n)&&We(n)||Array.isArray(n)&&zh(n))&&Le(e,r.slice(0,-1)),e}var jh=e=>{for(const t in e)if(lt(e[t]))return!0;return!1};function Oi(e){return Array.isArray(e)||Re(e)&&!jh(e)}function Is(e,t={}){for(const r in e){const n=e[r];Oi(n)?(t[r]=Array.isArray(n)?[]:{},Is(n,t[r])):Oe(n)||(t[r]=!0)}return t}function dr(e,t,r){r||(r=Is(t));for(const n in e){const o=e[n];if(Oi(o))Oe(t)||Cs(r[n])?r[n]=Is(o,Array.isArray(o)?[]:{}):dr(o,Je(t)?{}:t[n],r[n]);else{const s=t[n];r[n]=!ct(o,s)}}return r}const Di={value:!1,isValid:!1},Mi={value:!0,isValid:!0};var zi=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Oe(e[0].attributes.value)?Oe(e[0].value)||e[0].value===""?Mi:{value:e[0].value,isValid:!0}:Mi:Di}return Di},ji=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Oe(e)?e:t?e===""?NaN:e&&+e:r&&et(e)?new Date(e):n?n(e):e;const Fi={isValid:!1,value:null};var Vi=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Fi):Fi;function Li(e){const t=e.ref;return Ns(t)?t.files:As(t)?Vi(e.refs).value:Ii(t)?[...t.selectedOptions].map(({value:r})=>r):Wr(t)?zi(e.refs).value:ji(Oe(t.value)?e.ref.value:t.value,e)}var Fh=(e,t,r,n)=>{const o={};for(const s of e){const a=ee(t,s);a&&Pe(o,s,a._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},yn=e=>e instanceof RegExp,Kr=e=>Oe(e)?e:yn(e)?e.source:Re(e)?yn(e.value)?e.value.source:e.value:e,fr=e=>({isOnSubmit:!e||e===st.onSubmit,isOnBlur:e===st.onBlur,isOnChange:e===st.onChange,isOnAll:e===st.all,isOnTouch:e===st.onTouched});const Ri="AsyncFunction";var Vh=e=>!!e&&!!e.validate&&!!(lt(e.validate)&&e.validate.constructor.name===Ri||Re(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ri)),Lh=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Os=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const pr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=ee(e,o);if(s){const{_f:a,...i}=s;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!n)return!0;if(a.ref&&t(a.ref,a.name)&&!n)return!0;if(pr(i,t))break}else if(Re(i)&&pr(i,t))break}}};function qi(e,t,r){const n=ee(e,r);if(n||pn(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),a=ee(t,s),i=ee(e,s);if(a&&!Array.isArray(a)&&r!==s)return{name:r};if(i&&i.type)return{name:s,error:i};if(i&&i.root&&i.root.type)return{name:`${s}.root`,error:i.root};o.pop()}return{name:r}}var Rh=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return We(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(a=>t[a]===(!n||st.all))},qh=(e,t,r)=>!e||!t||e===t||Ye(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Uh=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Zh=(e,t)=>!hn(ee(e,t)).length&&Le(e,t),Ui=(e,t,r)=>{const n=Ye(ee(e,r));return Pe(n,"root",t[r]),Pe(e,r,n),e};function Zi(e,t,r="validate"){if(et(e)||Array.isArray(e)&&e.every(et)||Qe(e)&&!e)return{type:r,message:et(e)?e:"",ref:t}}var hr=e=>Re(e)&&!yn(e)?e:{value:e,message:""},Ds=async(e,t,r,n,o,s)=>{const{ref:a,refs:i,required:c,maxLength:l,minLength:u,min:p,max:h,pattern:v,validate:w,name:y,valueAsNumber:m,mount:_}=e._f,f=ee(r,y);if(!_||t.has(y))return{};const b=i?i[0]:a,$=j=>{o&&b.reportValidity&&(b.setCustomValidity(Qe(j)?"":j||""),b.reportValidity())},g={},E=As(a),k=Wr(a),C=E||k,O=(m||Ns(a))&&Oe(a.value)&&Oe(f)||vn(a)&&a.value===""||f===""||Array.isArray(f)&&!f.length,V=Ps.bind(null,y,n,g),z=(j,R,Z,ne=xt.maxLength,G=xt.minLength)=>{const oe=j?R:Z;g[y]={type:j?ne:G,message:oe,ref:a,...V(j?ne:G,oe)}};if(s?!Array.isArray(f)||!f.length:c&&(!C&&(O||Je(f))||Qe(f)&&!f||k&&!zi(i).isValid||E&&!Vi(i).isValid)){const{value:j,message:R}=et(c)?{value:!!c,message:c}:hr(c);if(j&&(g[y]={type:xt.required,message:R,ref:b,...V(xt.required,R)},!n))return $(R),g}if(!O&&(!Je(p)||!Je(h))){let j,R;const Z=hr(h),ne=hr(p);if(!Je(f)&&!isNaN(f)){const G=a.valueAsNumber||f&&+f;Je(Z.value)||(j=G>Z.value),Je(ne.value)||(R=G<ne.value)}else{const G=a.valueAsDate||new Date(f),oe=H=>new Date(new Date().toDateString()+" "+H),F=a.type=="time",fe=a.type=="week";et(Z.value)&&f&&(j=F?oe(f)>oe(Z.value):fe?f>Z.value:G>new Date(Z.value)),et(ne.value)&&f&&(R=F?oe(f)<oe(ne.value):fe?f<ne.value:G<new Date(ne.value))}if((j||R)&&(z(!!j,Z.message,ne.message,xt.max,xt.min),!n))return $(g[y].message),g}if((l||u)&&!O&&(et(f)||s&&Array.isArray(f))){const j=hr(l),R=hr(u),Z=!Je(j.value)&&f.length>+j.value,ne=!Je(R.value)&&f.length<+R.value;if((Z||ne)&&(z(Z,j.message,R.message),!n))return $(g[y].message),g}if(v&&!O&&et(f)){const{value:j,message:R}=hr(v);if(yn(j)&&!f.match(j)&&(g[y]={type:xt.pattern,message:R,ref:a,...V(xt.pattern,R)},!n))return $(R),g}if(w){if(lt(w)){const j=await w(f,r),R=Zi(j,b);if(R&&(g[y]={...R,...V(xt.validate,R.message)},!n))return $(R.message),g}else if(Re(w)){let j={};for(const R in w){if(!We(j)&&!n)break;const Z=Zi(await w[R](f,r),b,R);Z&&(j={...Z,...V(R,Z.message)},$(Z.message),n&&(g[y]=j))}if(!We(j)&&(g[y]={ref:b,...j},!n))return g}}return $(!0),g};const Bh={mode:st.onSubmit,reValidateMode:st.onChange,shouldFocusError:!0};function Wh(e={}){let t={...Bh,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:lt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=Re(t.defaultValues)||Re(t.values)?De(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:De(o),a={action:!1,mount:!1,watch:!1},i={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let p={...u};const h={array:Ai(),state:Ai()},v=t.criteriaMode===st.all,w=P=>M=>{clearTimeout(l),l=setTimeout(P,M)},y=async P=>{if(!t.disabled&&(u.isValid||p.isValid||P)){const M=t.resolver?We((await k()).errors):await O(n,!0);M!==r.isValid&&h.state.next({isValid:M})}},m=(P,M)=>{!t.disabled&&(u.isValidating||u.validatingFields||p.isValidating||p.validatingFields)&&((P||Array.from(i.mount)).forEach(U=>{U&&(M?Pe(r.validatingFields,U,M):Le(r.validatingFields,U))}),h.state.next({validatingFields:r.validatingFields,isValidating:!We(r.validatingFields)}))},_=(P,M=[],U,te,re=!0,X=!0)=>{if(te&&U&&!t.disabled){if(a.action=!0,X&&Array.isArray(ee(n,P))){const le=U(ee(n,P),te.argA,te.argB);re&&Pe(n,P,le)}if(X&&Array.isArray(ee(r.errors,P))){const le=U(ee(r.errors,P),te.argA,te.argB);re&&Pe(r.errors,P,le),Zh(r.errors,P)}if((u.touchedFields||p.touchedFields)&&X&&Array.isArray(ee(r.touchedFields,P))){const le=U(ee(r.touchedFields,P),te.argA,te.argB);re&&Pe(r.touchedFields,P,le)}(u.dirtyFields||p.dirtyFields)&&(r.dirtyFields=dr(o,s)),h.state.next({name:P,isDirty:z(P,M),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Pe(s,P,M)},f=(P,M)=>{Pe(r.errors,P,M),h.state.next({errors:r.errors})},b=P=>{r.errors=P,h.state.next({errors:r.errors,isValid:!1})},$=(P,M,U,te)=>{const re=ee(n,P);if(re){const X=ee(s,P,Oe(U)?ee(o,P):U);Oe(X)||te&&te.defaultChecked||M?Pe(s,P,M?X:Li(re._f)):Z(P,X),a.mount&&!a.action&&y()}},g=(P,M,U,te,re)=>{let X=!1,le=!1;const xe={name:P};if(!t.disabled){if(!U||te){(u.isDirty||p.isDirty)&&(le=r.isDirty,r.isDirty=xe.isDirty=z(),X=le!==xe.isDirty);const Ie=ct(ee(o,P),M);le=!!ee(r.dirtyFields,P),Ie?Le(r.dirtyFields,P):Pe(r.dirtyFields,P,!0),xe.dirtyFields=r.dirtyFields,X=X||(u.dirtyFields||p.dirtyFields)&&le!==!Ie}if(U){const Ie=ee(r.touchedFields,P);Ie||(Pe(r.touchedFields,P,U),xe.touchedFields=r.touchedFields,X=X||(u.touchedFields||p.touchedFields)&&Ie!==U)}X&&re&&h.state.next(xe)}return X?xe:{}},E=(P,M,U,te)=>{const re=ee(r.errors,P),X=(u.isValid||p.isValid)&&Qe(M)&&r.isValid!==M;if(t.delayError&&U?(c=w(()=>f(P,U)),c(t.delayError)):(clearTimeout(l),c=null,U?Pe(r.errors,P,U):Le(r.errors,P)),(U?!ct(re,U):re)||!We(te)||X){const le={...te,...X&&Qe(M)?{isValid:M}:{},errors:r.errors,name:P};r={...r,...le},h.state.next(le)}},k=async P=>{m(P,!0);const M=await t.resolver(s,t.context,Fh(P||i.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return m(P),M},C=async P=>{const{errors:M}=await k(P);if(P)for(const U of P){const te=ee(M,U);te?Pe(r.errors,U,te):Le(r.errors,U)}else r.errors=M;return M},O=async(P,M,U={valid:!0})=>{for(const te in P){const re=P[te];if(re){const{_f:X,...le}=re;if(X){const xe=i.array.has(X.name),Ie=re._f&&Vh(re._f);Ie&&u.validatingFields&&m([X.name],!0);const Ge=await Ds(re,i.disabled,s,v,t.shouldUseNativeValidation&&!M,xe);if(Ie&&u.validatingFields&&m([X.name]),Ge[X.name]&&(U.valid=!1,M))break;!M&&(ee(Ge,X.name)?xe?Ui(r.errors,Ge,X.name):Pe(r.errors,X.name,Ge[X.name]):Le(r.errors,X.name))}!We(le)&&await O(le,M,U)}}return U.valid},V=()=>{for(const P of i.unMount){const M=ee(n,P);M&&(M._f.refs?M._f.refs.every(U=>!Ts(U)):!Ts(M._f.ref))&&q(P)}i.unMount=new Set},z=(P,M)=>!t.disabled&&(P&&M&&Pe(s,P,M),!ct(H(),o)),j=(P,M,U)=>xs(P,i,{...a.mount?s:Oe(M)?o:et(P)?{[P]:M}:M},U,M),R=P=>hn(ee(a.mount?s:o,P,t.shouldUnregister?ee(o,P,[]):[])),Z=(P,M,U={})=>{const te=ee(n,P);let re=M;if(te){const X=te._f;X&&(!X.disabled&&Pe(s,P,ji(M,X)),re=vn(X.ref)&&Je(M)?"":M,Ii(X.ref)?[...X.ref.options].forEach(le=>le.selected=re.includes(le.value)):X.refs?Wr(X.ref)?X.refs.forEach(le=>{(!le.defaultChecked||!le.disabled)&&(Array.isArray(re)?le.checked=!!re.find(xe=>xe===le.value):le.checked=re===le.value||!!re)}):X.refs.forEach(le=>le.checked=le.value===re):Ns(X.ref)?X.ref.value="":(X.ref.value=re,X.ref.type||h.state.next({name:P,values:De(s)})))}(U.shouldDirty||U.shouldTouch)&&g(P,re,U.shouldTouch,U.shouldDirty,!0),U.shouldValidate&&fe(P)},ne=(P,M,U)=>{for(const te in M){if(!M.hasOwnProperty(te))return;const re=M[te],X=P+"."+te,le=ee(n,X);(i.array.has(P)||Re(re)||le&&!le._f)&&!Qt(re)?ne(X,re,U):Z(X,re,U)}},G=(P,M,U={})=>{const te=ee(n,P),re=i.array.has(P),X=De(M);Pe(s,P,X),re?(h.array.next({name:P,values:De(s)}),(u.isDirty||u.dirtyFields||p.isDirty||p.dirtyFields)&&U.shouldDirty&&h.state.next({name:P,dirtyFields:dr(o,s),isDirty:z(P,X)})):te&&!te._f&&!Je(X)?ne(P,X,U):Z(P,X,U),Os(P,i)&&h.state.next({...r,name:P}),h.state.next({name:a.mount?P:void 0,values:De(s)})},oe=async P=>{a.mount=!0;const M=P.target;let U=M.name,te=!0;const re=ee(n,U),X=Ie=>{te=Number.isNaN(Ie)||Qt(Ie)&&isNaN(Ie.getTime())||ct(Ie,ee(s,U,Ie))},le=fr(t.mode),xe=fr(t.reValidateMode);if(re){let Ie,Ge;const Br=M.type?Li(re._f):xi(P),Xt=P.type===mn.BLUR||P.type===mn.FOCUS_OUT,eC=!Lh(re._f)&&!t.resolver&&!ee(r.errors,U)&&!re._f.deps||Uh(Xt,ee(r.touchedFields,U),r.isSubmitted,xe,le),wi=Os(U,i,Xt);Pe(s,U,Br),Xt?(!M||!M.readOnly)&&(re._f.onBlur&&re._f.onBlur(P),c&&c(0)):re._f.onChange&&re._f.onChange(P);const $i=g(U,Br,Xt),tC=!We($i)||wi;if(!Xt&&h.state.next({name:U,type:P.type,values:De(s)}),eC)return(u.isValid||p.isValid)&&(t.mode==="onBlur"?Xt&&y():Xt||y()),tC&&h.state.next({name:U,...wi?{}:$i});if(!Xt&&wi&&h.state.next({...r}),t.resolver){const{errors:Ph}=await k([U]);if(X(Br),te){const rC=qi(r.errors,n,U),Nh=qi(Ph,n,rC.name||U);Ie=Nh.error,U=Nh.name,Ge=We(Ph)}}else m([U],!0),Ie=(await Ds(re,i.disabled,s,v,t.shouldUseNativeValidation))[U],m([U]),X(Br),te&&(Ie?Ge=!1:(u.isValid||p.isValid)&&(Ge=await O(n,!0)));te&&(re._f.deps&&(!Array.isArray(re._f.deps)||re._f.deps.length>0)&&fe(re._f.deps),E(U,Ge,Ie,$i))}},F=(P,M)=>{if(ee(r.errors,M)&&P.focus)return P.focus(),1},fe=async(P,M={})=>{let U,te;const re=Ye(P);if(t.resolver){const X=await C(Oe(P)?P:re);U=We(X),te=P?!re.some(le=>ee(X,le)):U}else P?(te=(await Promise.all(re.map(async X=>{const le=ee(n,X);return await O(le&&le._f?{[X]:le}:le)}))).every(Boolean),!(!te&&!r.isValid)&&y()):te=U=await O(n);return h.state.next({...!et(P)||(u.isValid||p.isValid)&&U!==r.isValid?{}:{name:P},...t.resolver||!P?{isValid:U}:{},errors:r.errors}),M.shouldFocus&&!te&&pr(n,F,P?re:i.mount),te},H=(P,M)=>{let U={...a.mount?s:o};return M&&(U=Ti(M.dirtyFields?r.dirtyFields:r.touchedFields,U)),Oe(P)?U:et(P)?ee(U,P):P.map(te=>ee(U,te))},I=(P,M)=>({invalid:!!ee((M||r).errors,P),isDirty:!!ee((M||r).dirtyFields,P),error:ee((M||r).errors,P),isValidating:!!ee(r.validatingFields,P),isTouched:!!ee((M||r).touchedFields,P)}),K=P=>{P&&Ye(P).forEach(M=>Le(r.errors,M)),h.state.next({errors:P?r.errors:{}})},D=(P,M,U)=>{const te=(ee(n,P,{_f:{}})._f||{}).ref,re=ee(r.errors,P)||{},{ref:X,message:le,type:xe,...Ie}=re;Pe(r.errors,P,{...Ie,...M,ref:te}),h.state.next({name:P,errors:r.errors,isValid:!1}),U&&U.shouldFocus&&te&&te.focus&&te.focus()},x=(P,M)=>lt(P)?h.state.subscribe({next:U=>"values"in U&&P(j(void 0,M),U)}):j(P,M,!0),N=P=>h.state.subscribe({next:M=>{qh(P.name,M.name,P.exact)&&Rh(M,P.formState||u,Ve,P.reRenderRoot)&&P.callback({values:{...s},...r,...M,defaultValues:o})}}).unsubscribe,L=P=>(a.mount=!0,p={...p,...P.formState},N({...P,formState:p})),q=(P,M={})=>{for(const U of P?Ye(P):i.mount)i.mount.delete(U),i.array.delete(U),M.keepValue||(Le(n,U),Le(s,U)),!M.keepError&&Le(r.errors,U),!M.keepDirty&&Le(r.dirtyFields,U),!M.keepTouched&&Le(r.touchedFields,U),!M.keepIsValidating&&Le(r.validatingFields,U),!t.shouldUnregister&&!M.keepDefaultValue&&Le(o,U);h.state.next({values:De(s)}),h.state.next({...r,...M.keepDirty?{isDirty:z()}:{}}),!M.keepIsValid&&y()},Q=({disabled:P,name:M})=>{(Qe(P)&&a.mount||P||i.disabled.has(M))&&(P?i.disabled.add(M):i.disabled.delete(M))},ue=(P,M={})=>{let U=ee(n,P);const te=Qe(M.disabled)||Qe(t.disabled);return Pe(n,P,{...U||{},_f:{...U&&U._f?U._f:{ref:{name:P}},name:P,mount:!0,...M}}),i.mount.add(P),U?Q({disabled:Qe(M.disabled)?M.disabled:t.disabled,name:P}):$(P,!0,M.value),{...te?{disabled:M.disabled||t.disabled}:{},...t.progressive?{required:!!M.required,min:Kr(M.min),max:Kr(M.max),minLength:Kr(M.minLength),maxLength:Kr(M.maxLength),pattern:Kr(M.pattern)}:{},name:P,onChange:oe,onBlur:oe,ref:re=>{if(re){ue(P,M),U=ee(n,P);const X=Oe(re.value)&&re.querySelectorAll&&re.querySelectorAll("input,select,textarea")[0]||re,le=Dh(X),xe=U._f.refs||[];if(le?xe.find(Ie=>Ie===X):X===U._f.ref)return;Pe(n,P,{_f:{...U._f,...le?{refs:[...xe.filter(Ts),X,...Array.isArray(ee(o,P))?[{}]:[]],ref:{type:X.type,name:P}}:{ref:X}}}),$(P,!1,void 0,X)}else U=ee(n,P,{}),U._f&&(U._f.mount=!1),(t.shouldUnregister||M.shouldUnregister)&&!(Ci(i.array,P)&&a.action)&&i.unMount.add(P)}}},se=()=>t.shouldFocusError&&pr(n,F,i.mount),A=P=>{Qe(P)&&(h.state.next({disabled:P}),pr(n,(M,U)=>{const te=ee(n,U);te&&(M.disabled=te._f.disabled||P,Array.isArray(te._f.refs)&&te._f.refs.forEach(re=>{re.disabled=te._f.disabled||P}))},0,!1))},T=(P,M)=>async U=>{let te;U&&(U.preventDefault&&U.preventDefault(),U.persist&&U.persist());let re=De(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:le}=await k();r.errors=X,re=De(le)}else await O(n);if(i.disabled.size)for(const X of i.disabled)Le(re,X);if(Le(r.errors,"root"),We(r.errors)){h.state.next({errors:{}});try{await P(re,U)}catch(X){te=X}}else M&&await M({...r.errors},U),se(),setTimeout(se);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:We(r.errors)&&!te,submitCount:r.submitCount+1,errors:r.errors}),te)throw te},W=(P,M={})=>{ee(n,P)&&(Oe(M.defaultValue)?G(P,De(ee(o,P))):(G(P,M.defaultValue),Pe(o,P,De(M.defaultValue))),M.keepTouched||Le(r.touchedFields,P),M.keepDirty||(Le(r.dirtyFields,P),r.isDirty=M.defaultValue?z(P,De(ee(o,P))):z()),M.keepError||(Le(r.errors,P),u.isValid&&y()),h.state.next({...r}))},Y=(P,M={})=>{const U=P?De(P):o,te=De(U),re=We(P),X=re?o:te;if(M.keepDefaultValues||(o=U),!M.keepValues){if(M.keepDirtyValues){const le=new Set([...i.mount,...Object.keys(dr(o,s))]);for(const xe of Array.from(le))ee(r.dirtyFields,xe)?Pe(X,xe,ee(s,xe)):G(xe,ee(X,xe))}else{if(Ss&&Oe(P))for(const le of i.mount){const xe=ee(n,le);if(xe&&xe._f){const Ie=Array.isArray(xe._f.refs)?xe._f.refs[0]:xe._f.ref;if(vn(Ie)){const Ge=Ie.closest("form");if(Ge){Ge.reset();break}}}}if(M.keepFieldsRef)for(const le of i.mount)G(le,ee(X,le));else n={}}s=t.shouldUnregister?M.keepDefaultValues?De(o):{}:De(X),h.array.next({values:{...X}}),h.state.next({values:{...X}})}i={mount:M.keepDirtyValues?i.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!u.isValid||!!M.keepIsValid||!!M.keepDirtyValues||!t.shouldUnregister&&!We(X),a.watch=!!t.shouldUnregister,h.state.next({submitCount:M.keepSubmitCount?r.submitCount:0,isDirty:re?!1:M.keepDirty?r.isDirty:!!(M.keepDefaultValues&&!ct(P,o)),isSubmitted:M.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:re?{}:M.keepDirtyValues?M.keepDefaultValues&&s?dr(o,s):r.dirtyFields:M.keepDefaultValues&&P?dr(o,P):M.keepDirty?r.dirtyFields:{},touchedFields:M.keepTouched?r.touchedFields:{},errors:M.keepErrors?r.errors:{},isSubmitSuccessful:M.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},ce=(P,M)=>Y(lt(P)?P(s):P,M),he=(P,M={})=>{const U=ee(n,P),te=U&&U._f;if(te){const re=te.refs?te.refs[0]:te.ref;re.focus&&(re.focus(),M.shouldSelect&<(re.select)&&re.select())}},Ve=P=>{r={...r,...P}},Ze={control:{register:ue,unregister:q,getFieldState:I,handleSubmit:T,setError:D,_subscribe:N,_runSchema:k,_focusError:se,_getWatch:j,_getDirty:z,_setValid:y,_setFieldArray:_,_setDisabledField:Q,_setErrors:b,_getFieldArray:R,_reset:Y,_resetDefaultValues:()=>lt(t.defaultValues)&&t.defaultValues().then(P=>{ce(P,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:V,_disableForm:A,_subjects:h,_proxyFormState:u,get _fields(){return n},get _formValues(){return s},get _state(){return a},set _state(P){a=P},get _defaultValues(){return o},get _names(){return i},set _names(P){i=P},get _formState(){return r},get _options(){return t},set _options(P){t={...t,...P}}},subscribe:L,trigger:fe,register:ue,handleSubmit:T,watch:x,setValue:G,getValues:H,reset:ce,resetField:W,clearErrors:K,unregister:q,setError:D,setFocus:he,getFieldState:I};return{...Ze,formControl:Ze}}var zt=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Ms=(e,t,r={})=>r.shouldFocus||Oe(r.shouldFocus)?r.focusName||`${e}.${Oe(r.focusIndex)?t:r.focusIndex}.`:"",zs=(e,t)=>[...e,...Ye(t)],js=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Fs(e,t,r){return[...e.slice(0,t),...Ye(r),...e.slice(t)]}var Vs=(e,t,r)=>Array.isArray(e)?(Oe(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Ls=(e,t)=>[...Ye(t),...Ye(e)];function Hh(e,t){let r=0;const n=[...e];for(const o of t)n.splice(o-r,1),r++;return hn(n).length?n:[]}var Rs=(e,t)=>Oe(t)?[]:Hh(e,Ye(t).sort((r,n)=>r-n)),qs=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Bi=(e,t,r)=>(e[t]=r,e);function Wi(e){const t=Be(),{control:r=t.control,name:n,keyName:o="id",shouldUnregister:s,rules:a}=e,[i,c]=J.useState(r._getFieldArray(n)),l=J.useRef(r._getFieldArray(n).map(zt)),u=J.useRef(!1);r._names.array.add(n),J.useMemo(()=>a&&i.length>=0&&r.register(n,a),[r,n,i.length,a]),gn(()=>r._subjects.array.subscribe({next:({values:$,name:g})=>{if(g===n||!g){const E=ee($,n);Array.isArray(E)&&(c(E),l.current=E.map(zt))}}}).unsubscribe,[r,n]);const p=J.useCallback($=>{u.current=!0,r._setFieldArray(n,$)},[r,n]),h=($,g)=>{const E=Ye(De($)),k=zs(r._getFieldArray(n),E);r._names.focus=Ms(n,k.length-1,g),l.current=zs(l.current,E.map(zt)),p(k),c(k),r._setFieldArray(n,k,zs,{argA:js($)})},v=($,g)=>{const E=Ye(De($)),k=Ls(r._getFieldArray(n),E);r._names.focus=Ms(n,0,g),l.current=Ls(l.current,E.map(zt)),p(k),c(k),r._setFieldArray(n,k,Ls,{argA:js($)})},w=$=>{const g=Rs(r._getFieldArray(n),$);l.current=Rs(l.current,$),p(g),c(g),!Array.isArray(ee(r._fields,n))&&Pe(r._fields,n,void 0),r._setFieldArray(n,g,Rs,{argA:$})},y=($,g,E)=>{const k=Ye(De(g)),C=Fs(r._getFieldArray(n),$,k);r._names.focus=Ms(n,$,E),l.current=Fs(l.current,$,k.map(zt)),p(C),c(C),r._setFieldArray(n,C,Fs,{argA:$,argB:js(g)})},m=($,g)=>{const E=r._getFieldArray(n);qs(E,$,g),qs(l.current,$,g),p(E),c(E),r._setFieldArray(n,E,qs,{argA:$,argB:g},!1)},_=($,g)=>{const E=r._getFieldArray(n);Vs(E,$,g),Vs(l.current,$,g),p(E),c(E),r._setFieldArray(n,E,Vs,{argA:$,argB:g},!1)},f=($,g)=>{const E=De(g),k=Bi(r._getFieldArray(n),$,E);l.current=[...k].map((C,O)=>!C||O===$?zt():l.current[O]),p(k),c([...k]),r._setFieldArray(n,k,Bi,{argA:$,argB:E},!0,!1)},b=$=>{const g=Ye(De($));l.current=g.map(zt),p([...g]),c([...g]),r._setFieldArray(n,[...g],E=>E,{},!0,!1)};return J.useEffect(()=>{if(r._state.action=!1,Os(n,r._names)&&r._subjects.state.next({...r._formState}),u.current&&(!fr(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!fr(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then($=>{const g=ee($.errors,n),E=ee(r._formState.errors,n);(E?!g&&E.type||g&&(E.type!==g.type||E.message!==g.message):g&&g.type)&&(g?Pe(r._formState.errors,n,g):Le(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const $=ee(r._fields,n);$&&$._f&&!(fr(r._options.reValidateMode).isOnSubmit&&fr(r._options.mode).isOnSubmit)&&Ds($,r._names.disabled,r._formValues,r._options.criteriaMode===st.all,r._options.shouldUseNativeValidation,!0).then(g=>!We(g)&&r._subjects.state.next({errors:Ui(r._formState.errors,g,n)}))}r._subjects.state.next({name:n,values:De(r._formValues)}),r._names.focus&&pr(r._fields,($,g)=>{if(r._names.focus&&g.startsWith(r._names.focus)&&$.focus)return $.focus(),1}),r._names.focus="",r._setValid(),u.current=!1},[i,n,r]),J.useEffect(()=>(!ee(r._formValues,n)&&r._setFieldArray(n),()=>{const $=(g,E)=>{const k=ee(r._fields,g);k&&k._f&&(k._f.mount=E)};r._options.shouldUnregister||s?r.unregister(n):$(n,!1)}),[n,r,o,s]),{swap:J.useCallback(m,[p,n,r]),move:J.useCallback(_,[p,n,r]),prepend:J.useCallback(v,[p,n,r]),append:J.useCallback(h,[p,n,r]),remove:J.useCallback(w,[p,n,r]),insert:J.useCallback(y,[p,n,r]),update:J.useCallback(f,[p,n,r]),replace:J.useCallback(b,[p,n,r]),fields:J.useMemo(()=>i.map(($,g)=>({...$,[o]:l.current[g]||zt()})),[i,o])}}function Kh(e={}){const t=J.useRef(void 0),r=J.useRef(void 0),[n,o]=J.useState({isDirty:!1,isValidating:!1,isLoading:lt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:lt(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!lt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...i}=Wh(e);t.current={...i,formState:n}}const s=t.current.control;return s._options=e,gn(()=>{const a=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(i=>({...i,isReady:!0})),s._formState.isReady=!0,a},[s]),J.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),J.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),J.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),J.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),J.useEffect(()=>{if(s._proxyFormState.isDirty){const a=s._getDirty();a!==n.isDirty&&s._subjects.state.next({isDirty:a})}},[s,n.isDirty]),J.useEffect(()=>{var a;e.values&&!ct(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((a=s._options.resetOptions)===null||a===void 0)&&a.keepIsValid||s._setValid(),r.current=e.values,o(i=>({...i}))):s._resetDefaultValues()},[s,e.values]),J.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=Pi(n,s),t.current}const Gh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Gr=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Gh[r[e]&63];return t};function Hi(e,[t,r]){return Math.min(r,Math.max(t,e))}function me(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function Jh(e,t){const r=S.createContext(t),n=s=>{const{children:a,...i}=s,c=S.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function o(s){const a=S.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function yt(e,t=[]){let r=[];function n(s,a){const i=S.createContext(a),c=r.length;r=[...r,a];const l=p=>{const{scope:h,children:v,...w}=p,y=h?.[e]?.[c]||i,m=S.useMemo(()=>w,Object.values(w));return d.jsx(y.Provider,{value:m,children:v})};l.displayName=s+"Provider";function u(p,h){const v=h?.[e]?.[c]||i,w=S.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[l,u]}const o=()=>{const s=r.map(a=>S.createContext(a));return function(i){const c=i?.[e]||s;return S.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,Yh(o,...t)]}function Yh(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=n.reduce((i,{useScope:c,scopeName:l})=>{const p=c(s)[`__scope${l}`];return{...i,...p}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Ki(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mr(...e){return t=>{let r=!1;const n=e.map(o=>{const s=Ki(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Ki(e[o],null)}}}}function Ne(...e){return S.useCallback(mr(...e),e)}function Gi(e){const t=Xh(e),r=S.forwardRef((n,o)=>{const{children:s,...a}=n,i=S.Children.toArray(s),c=i.find(em);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function Xh(e){const t=S.forwardRef((r,n)=>{const{children:o,...s}=r;if(S.isValidElement(o)){const a=rm(o),i=tm(s,o.props);return o.type!==S.Fragment&&(i.ref=n?mr(n,a):a),S.cloneElement(o,i)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qh=Symbol("radix.slottable");function em(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qh}function tm(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function rm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Ji(e){const t=e+"CollectionProvider",[r,n]=yt(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:m,children:_}=y,f=J.useRef(null),b=J.useRef(new Map).current;return d.jsx(o,{scope:m,itemMap:b,collectionRef:f,children:_})};a.displayName=t;const i=e+"CollectionSlot",c=Gi(i),l=J.forwardRef((y,m)=>{const{scope:_,children:f}=y,b=s(i,_),$=Ne(m,b.collectionRef);return d.jsx(c,{ref:$,children:f})});l.displayName=i;const u=e+"CollectionItemSlot",p="data-radix-collection-item",h=Gi(u),v=J.forwardRef((y,m)=>{const{scope:_,children:f,...b}=y,$=J.useRef(null),g=Ne(m,$),E=s(u,_);return J.useEffect(()=>(E.itemMap.set($,{ref:$,...b}),()=>void E.itemMap.delete($))),d.jsx(h,{[p]:"",ref:g,children:f})});v.displayName=u;function w(y){const m=s(e+"CollectionConsumer",y);return J.useCallback(()=>{const f=m.collectionRef.current;if(!f)return[];const b=Array.from(f.querySelectorAll(`[${p}]`));return Array.from(m.itemMap.values()).sort((E,k)=>b.indexOf(E.ref.current)-b.indexOf(k.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},w,n]}var nm=S.createContext(void 0);function Us(e){const t=S.useContext(nm);return e||t||"ltr"}function om(e){const t=sm(e),r=S.forwardRef((n,o)=>{const{children:s,...a}=n,i=S.Children.toArray(s),c=i.find(im);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function sm(e){const t=S.forwardRef((r,n)=>{const{children:o,...s}=r;if(S.isValidElement(o)){const a=lm(o),i=cm(s,o.props);return o.type!==S.Fragment&&(i.ref=n?mr(n,a):a),S.cloneElement(o,i)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var am=Symbol("radix.slottable");function im(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===am}function cm(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function lm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var um=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Se=um.reduce((e,t)=>{const r=om(`Primitive.${t}`),n=S.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function dm(e,t){e&&fn.flushSync(()=>e.dispatchEvent(t))}function jt(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...r)=>t.current?.(...r),[])}function fm(e,t=globalThis?.document){const r=jt(e);S.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var pm="DismissableLayer",Zs="dismissableLayer.update",hm="dismissableLayer.pointerDownOutside",mm="dismissableLayer.focusOutside",Yi,Xi=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bn=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,l=S.useContext(Xi),[u,p]=S.useState(null),h=u?.ownerDocument??globalThis?.document,[,v]=S.useState({}),w=Ne(t,k=>p(k)),y=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=y.indexOf(m),f=u?y.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,$=f>=_,g=ym(k=>{const C=k.target,O=[...l.branches].some(V=>V.contains(C));!$||O||(o?.(k),a?.(k),k.defaultPrevented||i?.())},h),E=bm(k=>{const C=k.target;[...l.branches].some(V=>V.contains(C))||(s?.(k),a?.(k),k.defaultPrevented||i?.())},h);return fm(k=>{f===l.layers.size-1&&(n?.(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),S.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Yi=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Qi(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Yi)}},[u,h,r,l]),S.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Qi())},[u,l]),S.useEffect(()=>{const k=()=>v({});return document.addEventListener(Zs,k),()=>document.removeEventListener(Zs,k)},[]),d.jsx(Se.div,{...c,ref:w,style:{pointerEvents:b?$?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,E.onFocusCapture),onBlurCapture:me(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,g.onPointerDownCapture)})});bn.displayName=pm;var gm="DismissableLayerBranch",vm=S.forwardRef((e,t)=>{const r=S.useContext(Xi),n=S.useRef(null),o=Ne(t,n);return S.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),d.jsx(Se.div,{...e,ref:o})});vm.displayName=gm;function ym(e,t=globalThis?.document){const r=jt(e),n=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let c=function(){ec(hm,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function bm(e,t=globalThis?.document){const r=jt(e),n=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!n.current&&ec(mm,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Qi(){const e=new CustomEvent(Zs);document.dispatchEvent(e)}function ec(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?dm(o,s):o.dispatchEvent(s)}var Bs=0;function tc(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rc()),document.body.insertAdjacentElement("beforeend",e[1]??rc()),Bs++,()=>{Bs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bs--}},[])}function rc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ws="focusScope.autoFocusOnMount",Hs="focusScope.autoFocusOnUnmount",nc={bubbles:!1,cancelable:!0},_m="FocusScope",Ks=S.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=S.useState(null),l=jt(o),u=jt(s),p=S.useRef(null),h=Ne(t,y=>c(y)),v=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let y=function(b){if(v.paused||!i)return;const $=b.target;i.contains($)?p.current=$:Ft(p.current,{select:!0})},m=function(b){if(v.paused||!i)return;const $=b.relatedTarget;$!==null&&(i.contains($)||Ft(p.current,{select:!0}))},_=function(b){if(document.activeElement===document.body)for(const g of b)g.removedNodes.length>0&&Ft(i)};document.addEventListener("focusin",y),document.addEventListener("focusout",m);const f=new MutationObserver(_);return i&&f.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",m),f.disconnect()}}},[n,i,v.paused]),S.useEffect(()=>{if(i){ac.add(v);const y=document.activeElement;if(!i.contains(y)){const _=new CustomEvent(Ws,nc);i.addEventListener(Ws,l),i.dispatchEvent(_),_.defaultPrevented||(wm(xm(oc(i)),{select:!0}),document.activeElement===y&&Ft(i))}return()=>{i.removeEventListener(Ws,l),setTimeout(()=>{const _=new CustomEvent(Hs,nc);i.addEventListener(Hs,u),i.dispatchEvent(_),_.defaultPrevented||Ft(y??document.body,{select:!0}),i.removeEventListener(Hs,u),ac.remove(v)},0)}}},[i,l,u,v]);const w=S.useCallback(y=>{if(!r&&!n||v.paused)return;const m=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(m&&_){const f=y.currentTarget,[b,$]=$m(f);b&&$?!y.shiftKey&&_===$?(y.preventDefault(),r&&Ft(b,{select:!0})):y.shiftKey&&_===b&&(y.preventDefault(),r&&Ft($,{select:!0})):_===f&&y.preventDefault()}},[r,n,v.paused]);return d.jsx(Se.div,{tabIndex:-1,...a,ref:h,onKeyDown:w})});Ks.displayName=_m;function wm(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ft(n,{select:t}),document.activeElement!==r)return}function $m(e){const t=oc(e),r=sc(t,e),n=sc(t.reverse(),e);return[r,n]}function oc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function sc(e,t){for(const r of e)if(!Sm(r,{upTo:t}))return r}function Sm(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Em(e){return e instanceof HTMLInputElement&&"select"in e}function Ft(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Em(e)&&t&&e.select()}}var ac=km();function km(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=ic(e,t),e.unshift(t)},remove(t){e=ic(e,t),e[0]?.resume()}}}function ic(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function xm(e){return e.filter(t=>t.tagName!=="A")}var He=globalThis?.document?S.useLayoutEffect:()=>{},Cm=S[" useId ".trim().toString()]||(()=>{}),Pm=0;function Vt(e){const[t,r]=S.useState(Cm());return He(()=>{r(n=>n??String(Pm++))},[e]),e||(t?`radix-${t}`:"")}const Nm=["top","right","bottom","left"],Lt=Math.min,tt=Math.max,_n=Math.round,wn=Math.floor,bt=e=>({x:e,y:e}),Am={left:"right",right:"left",bottom:"top",top:"bottom"},Tm={start:"end",end:"start"};function Gs(e,t,r){return tt(e,Lt(t,r))}function Ct(e,t){return typeof e=="function"?e(t):e}function Pt(e){return e.split("-")[0]}function gr(e){return e.split("-")[1]}function Js(e){return e==="x"?"y":"x"}function Ys(e){return e==="y"?"height":"width"}const Im=new Set(["top","bottom"]);function _t(e){return Im.has(Pt(e))?"y":"x"}function Xs(e){return Js(_t(e))}function Om(e,t,r){r===void 0&&(r=!1);const n=gr(e),o=Xs(e),s=Ys(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=$n(a)),[a,$n(a)]}function Dm(e){const t=$n(e);return[Qs(e),t,Qs(t)]}function Qs(e){return e.replace(/start|end/g,t=>Tm[t])}const cc=["left","right"],lc=["right","left"],Mm=["top","bottom"],zm=["bottom","top"];function jm(e,t,r){switch(e){case"top":case"bottom":return r?t?lc:cc:t?cc:lc;case"left":case"right":return t?Mm:zm;default:return[]}}function Fm(e,t,r,n){const o=gr(e);let s=jm(Pt(e),r==="start",n);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Qs)))),s}function $n(e){return e.replace(/left|right|bottom|top/g,t=>Am[t])}function Vm(e){return{top:0,right:0,bottom:0,left:0,...e}}function uc(e){return typeof e!="number"?Vm(e):{top:e,right:e,bottom:e,left:e}}function Sn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function dc(e,t,r){let{reference:n,floating:o}=e;const s=_t(t),a=Xs(t),i=Ys(a),c=Pt(t),l=s==="y",u=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,h=n[i]/2-o[i]/2;let v;switch(c){case"top":v={x:u,y:n.y-o.height};break;case"bottom":v={x:u,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:p};break;case"left":v={x:n.x-o.width,y:p};break;default:v={x:n.x,y:n.y}}switch(gr(t)){case"start":v[a]-=h*(r&&l?-1:1);break;case"end":v[a]+=h*(r&&l?-1:1);break}return v}const Lm=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=dc(l,n,c),h=n,v={},w=0;for(let y=0;y<i.length;y++){const{name:m,fn:_}=i[y],{x:f,y:b,data:$,reset:g}=await _({x:u,y:p,initialPlacement:n,placement:h,strategy:o,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});u=f??u,p=b??p,v={...v,[m]:{...v[m],...$}},g&&w<=50&&(w++,typeof g=="object"&&(g.placement&&(h=g.placement),g.rects&&(l=g.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):g.rects),{x:u,y:p}=dc(l,h,c)),y=-1)}return{x:u,y:p,placement:h,strategy:o,middlewareData:v}};async function Jr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:h=!1,padding:v=0}=Ct(t,e),w=uc(v),m=i[h?p==="floating"?"reference":"floating":p],_=Sn(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(m)))==null||r?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:l,rootBoundary:u,strategy:c})),f=p==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),$=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},g=Sn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:f,offsetParent:b,strategy:c}):f);return{top:(_.top-g.top+w.top)/$.y,bottom:(g.bottom-_.bottom+w.bottom)/$.y,left:(_.left-g.left+w.left)/$.x,right:(g.right-_.right+w.right)/$.x}}const Rm=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:l,padding:u=0}=Ct(e,t)||{};if(l==null)return{};const p=uc(u),h={x:r,y:n},v=Xs(o),w=Ys(v),y=await a.getDimensions(l),m=v==="y",_=m?"top":"left",f=m?"bottom":"right",b=m?"clientHeight":"clientWidth",$=s.reference[w]+s.reference[v]-h[v]-s.floating[w],g=h[v]-s.reference[v],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let k=E?E[b]:0;(!k||!await(a.isElement==null?void 0:a.isElement(E)))&&(k=i.floating[b]||s.floating[w]);const C=$/2-g/2,O=k/2-y[w]/2-1,V=Lt(p[_],O),z=Lt(p[f],O),j=V,R=k-y[w]-z,Z=k/2-y[w]/2+C,ne=Gs(j,Z,R),G=!c.arrow&&gr(o)!=null&&Z!==ne&&s.reference[w]/2-(Z<j?V:z)-y[w]/2<0,oe=G?Z<j?Z-j:Z-R:0;return{[v]:h[v]+oe,data:{[v]:ne,centerOffset:Z-ne-oe,...G&&{alignmentOffset:oe}},reset:G}}}),qm=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...m}=Ct(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const _=Pt(o),f=_t(i),b=Pt(i)===i,$=await(c.isRTL==null?void 0:c.isRTL(l.floating)),g=h||(b||!y?[$n(i)]:Dm(i)),E=w!=="none";!h&&E&&g.push(...Fm(i,y,w,$));const k=[i,...g],C=await Jr(t,m),O=[];let V=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&O.push(C[_]),p){const Z=Om(o,a,$);O.push(C[Z[0]],C[Z[1]])}if(V=[...V,{placement:o,overflows:O}],!O.every(Z=>Z<=0)){var z,j;const Z=(((z=s.flip)==null?void 0:z.index)||0)+1,ne=k[Z];if(ne&&(!(p==="alignment"?f!==_t(ne):!1)||V.every(F=>_t(F.placement)===f?F.overflows[0]>0:!0)))return{data:{index:Z,overflows:V},reset:{placement:ne}};let G=(j=V.filter(oe=>oe.overflows[0]<=0).sort((oe,F)=>oe.overflows[1]-F.overflows[1])[0])==null?void 0:j.placement;if(!G)switch(v){case"bestFit":{var R;const oe=(R=V.filter(F=>{if(E){const fe=_t(F.placement);return fe===f||fe==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(fe=>fe>0).reduce((fe,H)=>fe+H,0)]).sort((F,fe)=>F[1]-fe[1])[0])==null?void 0:R[0];oe&&(G=oe);break}case"initialPlacement":G=i;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function fc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pc(e){return Nm.some(t=>e[t]>=0)}const Um=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Ct(e,t);switch(n){case"referenceHidden":{const s=await Jr(t,{...o,elementContext:"reference"}),a=fc(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:pc(a)}}}case"escaped":{const s=await Jr(t,{...o,altBoundary:!0}),a=fc(s,r.floating);return{data:{escapedOffsets:a,escaped:pc(a)}}}default:return{}}}}},hc=new Set(["left","top"]);async function Zm(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Pt(r),i=gr(r),c=_t(r)==="y",l=hc.has(a)?-1:1,u=s&&c?-1:1,p=Ct(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof w=="number"&&(v=i==="end"?w*-1:w),c?{x:v*u,y:h*l}:{x:h*l,y:v*u}}const Bm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await Zm(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},Wm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:m=>{let{x:_,y:f}=m;return{x:_,y:f}}},...c}=Ct(e,t),l={x:r,y:n},u=await Jr(t,c),p=_t(Pt(o)),h=Js(p);let v=l[h],w=l[p];if(s){const m=h==="y"?"top":"left",_=h==="y"?"bottom":"right",f=v+u[m],b=v-u[_];v=Gs(f,v,b)}if(a){const m=p==="y"?"top":"left",_=p==="y"?"bottom":"right",f=w+u[m],b=w-u[_];w=Gs(f,w,b)}const y=i.fn({...t,[h]:v,[p]:w});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[h]:s,[p]:a}}}}}},Hm=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:l=!0}=Ct(e,t),u={x:r,y:n},p=_t(o),h=Js(p);let v=u[h],w=u[p];const y=Ct(i,t),m=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const b=h==="y"?"height":"width",$=s.reference[h]-s.floating[b]+m.mainAxis,g=s.reference[h]+s.reference[b]-m.mainAxis;v<$?v=$:v>g&&(v=g)}if(l){var _,f;const b=h==="y"?"width":"height",$=hc.has(Pt(o)),g=s.reference[p]-s.floating[b]+($&&((_=a.offset)==null?void 0:_[p])||0)+($?0:m.crossAxis),E=s.reference[p]+s.reference[b]+($?0:((f=a.offset)==null?void 0:f[p])||0)-($?m.crossAxis:0);w<g?w=g:w>E&&(w=E)}return{[h]:v,[p]:w}}}},Km=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...l}=Ct(e,t),u=await Jr(t,l),p=Pt(o),h=gr(o),v=_t(o)==="y",{width:w,height:y}=s.floating;let m,_;p==="top"||p==="bottom"?(m=p,_=h===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(_=p,m=h==="end"?"top":"bottom");const f=y-u.top-u.bottom,b=w-u.left-u.right,$=Lt(y-u[m],f),g=Lt(w-u[_],b),E=!t.middlewareData.shift;let k=$,C=g;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(C=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=f),E&&!h){const V=tt(u.left,0),z=tt(u.right,0),j=tt(u.top,0),R=tt(u.bottom,0);v?C=w-2*(V!==0||z!==0?V+z:tt(u.left,u.right)):k=y-2*(j!==0||R!==0?j+R:tt(u.top,u.bottom))}await c({...t,availableWidth:C,availableHeight:k});const O=await a.getDimensions(i.floating);return w!==O.width||y!==O.height?{reset:{rects:!0}}:{}}}};function En(){return typeof window<"u"}function vr(e){return mc(e)?(e.nodeName||"").toLowerCase():"#document"}function rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wt(e){var t;return(t=(mc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mc(e){return En()?e instanceof Node||e instanceof rt(e).Node:!1}function ut(e){return En()?e instanceof Element||e instanceof rt(e).Element:!1}function $t(e){return En()?e instanceof HTMLElement||e instanceof rt(e).HTMLElement:!1}function gc(e){return!En()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot}const Gm=new Set(["inline","contents"]);function Yr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=dt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Gm.has(o)}const Jm=new Set(["table","td","th"]);function Ym(e){return Jm.has(vr(e))}const Xm=[":popover-open",":modal"];function kn(e){return Xm.some(t=>{try{return e.matches(t)}catch{return!1}})}const Qm=["transform","translate","scale","rotate","perspective"],eg=["transform","translate","scale","rotate","perspective","filter"],tg=["paint","layout","strict","content"];function ea(e){const t=ta(),r=ut(e)?dt(e):e;return Qm.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||eg.some(n=>(r.willChange||"").includes(n))||tg.some(n=>(r.contain||"").includes(n))}function rg(e){let t=Rt(e);for(;$t(t)&&!yr(t);){if(ea(t))return t;if(kn(t))return null;t=Rt(t)}return null}function ta(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ng=new Set(["html","body","#document"]);function yr(e){return ng.has(vr(e))}function dt(e){return rt(e).getComputedStyle(e)}function xn(e){return ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rt(e){if(vr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gc(e)&&e.host||wt(e);return gc(t)?t.host:t}function vc(e){const t=Rt(e);return yr(t)?e.ownerDocument?e.ownerDocument.body:e.body:$t(t)&&Yr(t)?t:vc(t)}function Xr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=vc(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),a=rt(o);if(s){const i=ra(a);return t.concat(a,a.visualViewport||[],Yr(o)?o:[],i&&r?Xr(i):[])}return t.concat(o,Xr(o,[],r))}function ra(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yc(e){const t=dt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=$t(e),s=o?e.offsetWidth:r,a=o?e.offsetHeight:n,i=_n(r)!==s||_n(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function na(e){return ut(e)?e:e.contextElement}function br(e){const t=na(e);if(!$t(t))return bt(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=yc(t);let a=(s?_n(r.width):r.width)/n,i=(s?_n(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const og=bt(0);function bc(e){const t=rt(e);return!ta()||!t.visualViewport?og:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sg(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==rt(e)?!1:t}function er(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=na(e);let a=bt(1);t&&(n?ut(n)&&(a=br(n)):a=br(e));const i=sg(s,r,n)?bc(s):bt(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,u=o.width/a.x,p=o.height/a.y;if(s){const h=rt(s),v=n&&ut(n)?rt(n):n;let w=h,y=ra(w);for(;y&&n&&v!==w;){const m=br(y),_=y.getBoundingClientRect(),f=dt(y),b=_.left+(y.clientLeft+parseFloat(f.paddingLeft))*m.x,$=_.top+(y.clientTop+parseFloat(f.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,p*=m.y,c+=b,l+=$,w=rt(y),y=ra(w)}}return Sn({width:u,height:p,x:c,y:l})}function Cn(e,t){const r=xn(e).scrollLeft;return t?t.left+r:er(wt(e)).left+r}function _c(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Cn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function ag(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",a=wt(n),i=t?kn(t.floating):!1;if(n===a||i&&s)return r;let c={scrollLeft:0,scrollTop:0},l=bt(1);const u=bt(0),p=$t(n);if((p||!p&&!s)&&((vr(n)!=="body"||Yr(a))&&(c=xn(n)),$t(n))){const v=er(n);l=br(n),u.x=v.x+n.clientLeft,u.y=v.y+n.clientTop}const h=a&&!p&&!s?_c(a,c):bt(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+h.x,y:r.y*l.y-c.scrollTop*l.y+u.y+h.y}}function ig(e){return Array.from(e.getClientRects())}function cg(e){const t=wt(e),r=xn(e),n=e.ownerDocument.body,o=tt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=tt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Cn(e);const i=-r.scrollTop;return dt(n).direction==="rtl"&&(a+=tt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}const wc=25;function lg(e,t){const r=rt(e),n=wt(e),o=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const u=ta();(!u||u&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const l=Cn(n);if(l<=0){const u=n.ownerDocument,p=u.body,h=getComputedStyle(p),v=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(n.clientWidth-p.clientWidth-v);w<=wc&&(s-=w)}else l<=wc&&(s+=l);return{width:s,height:a,x:i,y:c}}const ug=new Set(["absolute","fixed"]);function dg(e,t){const r=er(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=$t(e)?br(e):bt(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,l=n*s.y;return{width:a,height:i,x:c,y:l}}function $c(e,t,r){let n;if(t==="viewport")n=lg(e,r);else if(t==="document")n=cg(wt(e));else if(ut(t))n=dg(t,r);else{const o=bc(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Sn(n)}function Sc(e,t){const r=Rt(e);return r===t||!ut(r)||yr(r)?!1:dt(r).position==="fixed"||Sc(r,t)}function fg(e,t){const r=t.get(e);if(r)return r;let n=Xr(e,[],!1).filter(i=>ut(i)&&vr(i)!=="body"),o=null;const s=dt(e).position==="fixed";let a=s?Rt(e):e;for(;ut(a)&&!yr(a);){const i=dt(a),c=ea(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&ug.has(o.position)||Yr(a)&&!c&&Sc(e,a))?n=n.filter(u=>u!==a):o=i,a=Rt(a)}return t.set(e,n),n}function pg(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?kn(t)?[]:fg(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((l,u)=>{const p=$c(t,u,o);return l.top=tt(p.top,l.top),l.right=Lt(p.right,l.right),l.bottom=Lt(p.bottom,l.bottom),l.left=tt(p.left,l.left),l},$c(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function hg(e){const{width:t,height:r}=yc(e);return{width:t,height:r}}function mg(e,t,r){const n=$t(t),o=wt(t),s=r==="fixed",a=er(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=bt(0);function l(){c.x=Cn(o)}if(n||!n&&!s)if((vr(t)!=="body"||Yr(o))&&(i=xn(t)),n){const v=er(t,!0,s,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&l();s&&!n&&o&&l();const u=o&&!n&&!s?_c(o,i):bt(0),p=a.left+i.scrollLeft-c.x-u.x,h=a.top+i.scrollTop-c.y-u.y;return{x:p,y:h,width:a.width,height:a.height}}function oa(e){return dt(e).position==="static"}function Ec(e,t){if(!$t(e)||dt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return wt(e)===r&&(r=r.ownerDocument.body),r}function kc(e,t){const r=rt(e);if(kn(e))return r;if(!$t(e)){let o=Rt(e);for(;o&&!yr(o);){if(ut(o)&&!oa(o))return o;o=Rt(o)}return r}let n=Ec(e,t);for(;n&&Ym(n)&&oa(n);)n=Ec(n,t);return n&&yr(n)&&oa(n)&&!ea(n)?r:n||rg(e)||r}const gg=async function(e){const t=this.getOffsetParent||kc,r=this.getDimensions,n=await r(e.floating);return{reference:mg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function vg(e){return dt(e).direction==="rtl"}const yg={convertOffsetParentRelativeRectToViewportRelativeRect:ag,getDocumentElement:wt,getClippingRect:pg,getOffsetParent:kc,getElementRects:gg,getClientRects:ig,getDimensions:hg,getScale:br,isElement:ut,isRTL:vg};function xc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bg(e,t){let r=null,n;const o=wt(e);function s(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:p,width:h,height:v}=l;if(i||t(),!h||!v)return;const w=wn(p),y=wn(o.clientWidth-(u+h)),m=wn(o.clientHeight-(p+v)),_=wn(u),b={rootMargin:-w+"px "+-y+"px "+-m+"px "+-_+"px",threshold:tt(0,Lt(1,c))||1};let $=!0;function g(E){const k=E[0].intersectionRatio;if(k!==c){if(!$)return a();k?a(!1,k):n=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!xc(l,e.getBoundingClientRect())&&a(),$=!1}try{r=new IntersectionObserver(g,{...b,root:o.ownerDocument})}catch{r=new IntersectionObserver(g,b)}r.observe(e)}return a(!0),s}function _g(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=na(e),u=o||s?[...l?Xr(l):[],...Xr(t)]:[];u.forEach(_=>{o&&_.addEventListener("scroll",r,{passive:!0}),s&&_.addEventListener("resize",r)});const p=l&&i?bg(l,r):null;let h=-1,v=null;a&&(v=new ResizeObserver(_=>{let[f]=_;f&&f.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),r()}),l&&!c&&v.observe(l),v.observe(t));let w,y=c?er(e):null;c&&m();function m(){const _=er(e);y&&!xc(y,_)&&r(),y=_,w=requestAnimationFrame(m)}return r(),()=>{var _;u.forEach(f=>{o&&f.removeEventListener("scroll",r),s&&f.removeEventListener("resize",r)}),p?.(),(_=v)==null||_.disconnect(),v=null,c&&cancelAnimationFrame(w)}}const wg=Bm,$g=Wm,Sg=qm,Eg=Km,kg=Um,Cc=Rm,xg=Hm,Cg=(e,t,r)=>{const n=new Map,o={platform:yg,...r},s={...o.platform,_c:n};return Lm(e,t,{...o,platform:s})};var Pg=typeof document<"u",Ng=function(){},Pn=Pg?J.useLayoutEffect:Ng;function Nn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Nn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Nn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Pc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Nc(e,t){const r=Pc(e);return Math.round(t*r)/r}function sa(e){const t=S.useRef(e);return Pn(()=>{t.current=e}),t}function Ag(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:l}=e,[u,p]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=S.useState(n);Nn(h,n)||v(n);const[w,y]=S.useState(null),[m,_]=S.useState(null),f=S.useCallback(F=>{F!==E.current&&(E.current=F,y(F))},[]),b=S.useCallback(F=>{F!==k.current&&(k.current=F,_(F))},[]),$=s||w,g=a||m,E=S.useRef(null),k=S.useRef(null),C=S.useRef(u),O=c!=null,V=sa(c),z=sa(o),j=sa(l),R=S.useCallback(()=>{if(!E.current||!k.current)return;const F={placement:t,strategy:r,middleware:h};z.current&&(F.platform=z.current),Cg(E.current,k.current,F).then(fe=>{const H={...fe,isPositioned:j.current!==!1};Z.current&&!Nn(C.current,H)&&(C.current=H,fn.flushSync(()=>{p(H)}))})},[h,t,r,z,j]);Pn(()=>{l===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[l]);const Z=S.useRef(!1);Pn(()=>(Z.current=!0,()=>{Z.current=!1}),[]),Pn(()=>{if($&&(E.current=$),g&&(k.current=g),$&&g){if(V.current)return V.current($,g,R);R()}},[$,g,R,V,O]);const ne=S.useMemo(()=>({reference:E,floating:k,setReference:f,setFloating:b}),[f,b]),G=S.useMemo(()=>({reference:$,floating:g}),[$,g]),oe=S.useMemo(()=>{const F={position:r,left:0,top:0};if(!G.floating)return F;const fe=Nc(G.floating,u.x),H=Nc(G.floating,u.y);return i?{...F,transform:"translate("+fe+"px, "+H+"px)",...Pc(G.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:fe,top:H}},[r,i,G.floating,u.x,u.y]);return S.useMemo(()=>({...u,update:R,refs:ne,elements:G,floatingStyles:oe}),[u,R,ne,G,oe])}const Tg=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Cc({element:n.current,padding:o}).fn(r):{}:n?Cc({element:n,padding:o}).fn(r):{}}}},Ig=(e,t)=>({...wg(e),options:[e,t]}),Og=(e,t)=>({...$g(e),options:[e,t]}),Dg=(e,t)=>({...xg(e),options:[e,t]}),Mg=(e,t)=>({...Sg(e),options:[e,t]}),zg=(e,t)=>({...Eg(e),options:[e,t]}),jg=(e,t)=>({...kg(e),options:[e,t]}),Fg=(e,t)=>({...Tg(e),options:[e,t]});var Vg="Arrow",Ac=S.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return d.jsx(Se.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ac.displayName=Vg;var Lg=Ac;function aa(e){const[t,r]=S.useState(void 0);return He(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var ia="Popper",[Tc,An]=yt(ia),[Rg,Ic]=Tc(ia),Oc=e=>{const{__scopePopper:t,children:r}=e,[n,o]=S.useState(null);return d.jsx(Rg,{scope:t,anchor:n,onAnchorChange:o,children:r})};Oc.displayName=ia;var Dc="PopperAnchor",Mc=S.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=Ic(Dc,r),a=S.useRef(null),i=Ne(t,a),c=S.useRef(null);return S.useEffect(()=>{const l=c.current;c.current=n?.current||a.current,l!==c.current&&s.onAnchorChange(c.current)}),n?null:d.jsx(Se.div,{...o,ref:i})});Mc.displayName=Dc;var ca="PopperContent",[qg,Ug]=Tc(ca),zc=S.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:w,...y}=e,m=Ic(ca,r),[_,f]=S.useState(null),b=Ne(t,q=>f(q)),[$,g]=S.useState(null),E=aa($),k=E?.width??0,C=E?.height??0,O=n+(s!=="center"?"-"+s:""),V=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},z=Array.isArray(l)?l:[l],j=z.length>0,R={padding:V,boundary:z.filter(Bg),altBoundary:j},{refs:Z,floatingStyles:ne,placement:G,isPositioned:oe,middlewareData:F}=Ag({strategy:"fixed",placement:O,whileElementsMounted:(...q)=>_g(...q,{animationFrame:v==="always"}),elements:{reference:m.anchor},middleware:[Ig({mainAxis:o+C,alignmentAxis:a}),c&&Og({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Dg():void 0,...R}),c&&Mg({...R}),zg({...R,apply:({elements:q,rects:Q,availableWidth:ue,availableHeight:se})=>{const{width:A,height:T}=Q.reference,W=q.floating.style;W.setProperty("--radix-popper-available-width",`${ue}px`),W.setProperty("--radix-popper-available-height",`${se}px`),W.setProperty("--radix-popper-anchor-width",`${A}px`),W.setProperty("--radix-popper-anchor-height",`${T}px`)}}),$&&Fg({element:$,padding:i}),Wg({arrowWidth:k,arrowHeight:C}),h&&jg({strategy:"referenceHidden",...R})]}),[fe,H]=Vc(G),I=jt(w);He(()=>{oe&&I?.()},[oe,I]);const K=F.arrow?.x,D=F.arrow?.y,x=F.arrow?.centerOffset!==0,[N,L]=S.useState();return He(()=>{_&&L(window.getComputedStyle(_).zIndex)},[_]),d.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:oe?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:N,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(qg,{scope:r,placedSide:fe,onArrowChange:g,arrowX:K,arrowY:D,shouldHideArrow:x,children:d.jsx(Se.div,{"data-side":fe,"data-align":H,...y,ref:b,style:{...y.style,animation:oe?void 0:"none"}})})})});zc.displayName=ca;var jc="PopperArrow",Zg={top:"bottom",right:"left",bottom:"top",left:"right"},Fc=S.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=Ug(jc,n),a=Zg[s.placedSide];return d.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:d.jsx(Lg,{...o,ref:r,style:{...o.style,display:"block"}})})});Fc.displayName=jc;function Bg(e){return e!==null}var Wg=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,u]=Vc(r),p={start:"0%",center:"50%",end:"100%"}[u],h=(o.arrow?.x??0)+i/2,v=(o.arrow?.y??0)+c/2;let w="",y="";return l==="bottom"?(w=a?p:`${h}px`,y=`${-c}px`):l==="top"?(w=a?p:`${h}px`,y=`${n.floating.height+c}px`):l==="right"?(w=`${-c}px`,y=a?p:`${v}px`):l==="left"&&(w=`${n.floating.width+c}px`,y=a?p:`${v}px`),{data:{x:w,y}}}});function Vc(e){const[t,r="center"]=e.split("-");return[t,r]}var Lc=Oc,Rc=Mc,qc=zc,Uc=Fc,Hg="Portal",Tn=S.forwardRef((e,t)=>{const{container:r,...n}=e,[o,s]=S.useState(!1);He(()=>s(!0),[]);const a=r||o&&globalThis?.document?.body;return a?Si.createPortal(d.jsx(Se.div,{...n,ref:t}),a):null});Tn.displayName=Hg;function Kg(e){const t=Gg(e),r=S.forwardRef((n,o)=>{const{children:s,...a}=n,i=S.Children.toArray(s),c=i.find(Yg);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function Gg(e){const t=S.forwardRef((r,n)=>{const{children:o,...s}=r;if(S.isValidElement(o)){const a=Qg(o),i=Xg(s,o.props);return o.type!==S.Fragment&&(i.ref=n?mr(n,a):a),S.cloneElement(o,i)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jg=Symbol("radix.slottable");function Yg(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jg}function Xg(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Qg(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ev=S[" useInsertionEffect ".trim().toString()]||He;function tr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,a]=tv({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const u=S.useRef(e!==void 0);S.useEffect(()=>{const p=u.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,n])}const l=S.useCallback(u=>{if(i){const p=rv(u)?u(e):u;p!==e&&a.current?.(p)}else s(u)},[i,e,s,a]);return[c,l]}function tv({defaultProp:e,onChange:t}){const[r,n]=S.useState(e),o=S.useRef(r),s=S.useRef(t);return ev(()=>{s.current=t},[t]),S.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,n,s]}function rv(e){return typeof e=="function"}function la(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Zc=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),nv="VisuallyHidden",Bc=S.forwardRef((e,t)=>d.jsx(Se.span,{...e,ref:t,style:{...Zc,...e.style}}));Bc.displayName=nv;var ov=Bc,sv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_r=new WeakMap,In=new WeakMap,On={},ua=0,Wc=function(e){return e&&(e.host||Wc(e.parentNode))},av=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Wc(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},iv=function(e,t,r,n){var o=av(t,Array.isArray(e)?e:[e]);On[r]||(On[r]=new WeakMap);var s=On[r],a=[],i=new Set,c=new Set(o),l=function(p){!p||i.has(p)||(i.add(p),l(p.parentNode))};o.forEach(l);var u=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(h){if(i.has(h))u(h);else try{var v=h.getAttribute(n),w=v!==null&&v!=="false",y=(_r.get(h)||0)+1,m=(s.get(h)||0)+1;_r.set(h,y),s.set(h,m),a.push(h),y===1&&w&&In.set(h,!0),m===1&&h.setAttribute(r,"true"),w||h.setAttribute(n,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return u(t),i.clear(),ua++,function(){a.forEach(function(p){var h=_r.get(p)-1,v=s.get(p)-1;_r.set(p,h),s.set(p,v),h||(In.has(p)||p.removeAttribute(n),In.delete(p)),v||p.removeAttribute(r)}),ua--,ua||(_r=new WeakMap,_r=new WeakMap,In=new WeakMap,On={})}},Hc=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=sv(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),iv(n,o,r,"aria-hidden")):function(){return null}},St=function(){return St=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},St.apply(this,arguments)};function Kc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function cv(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Dn="right-scroll-bar-position",Mn="width-before-scroll-bar",lv="with-scroll-bars-hidden",uv="--removed-body-scroll-bar-size";function da(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function dv(e,t){var r=J.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var fv=typeof window<"u"?S.useLayoutEffect:S.useEffect,Gc=new WeakMap;function pv(e,t){var r=dv(null,function(n){return e.forEach(function(o){return da(o,n)})});return fv(function(){var n=Gc.get(r);if(n){var o=new Set(n),s=new Set(e),a=r.current;o.forEach(function(i){s.has(i)||da(i,null)}),s.forEach(function(i){o.has(i)||da(i,a)})}Gc.set(r,e)},[e]),r}function hv(e){return e}function mv(e,t){t===void 0&&(t=hv);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(s),a=r}var c=function(){var u=a;a=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),r}}}};return o}function gv(e){e===void 0&&(e={});var t=mv(null);return t.options=St({async:!0,ssr:!1},e),t}var Jc=function(e){var t=e.sideCar,r=Kc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return S.createElement(n,St({},r))};Jc.isSideCarExport=!0;function vv(e,t){return e.useMedium(t),Jc}var Yc=gv(),fa=function(){},zn=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:fa,onWheelCapture:fa,onTouchMoveCapture:fa}),o=n[0],s=n[1],a=e.forwardProps,i=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,p=e.shards,h=e.sideCar,v=e.noRelative,w=e.noIsolation,y=e.inert,m=e.allowPinchZoom,_=e.as,f=_===void 0?"div":_,b=e.gapMode,$=Kc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),g=h,E=pv([r,t]),k=St(St({},$),o);return S.createElement(S.Fragment,null,u&&S.createElement(g,{sideCar:Yc,removeScrollBar:l,shards:p,noRelative:v,noIsolation:w,inert:y,setCallbacks:s,allowPinchZoom:!!m,lockRef:r,gapMode:b}),a?S.cloneElement(S.Children.only(i),St(St({},k),{ref:E})):S.createElement(f,St({},k,{className:c,ref:E}),i))});zn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},zn.classNames={fullWidth:Mn,zeroRight:Dn};var yv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yv();return t&&e.setAttribute("nonce",t),e}function _v(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $v=function(){var e=0,t=null;return{add:function(r){e==0&&(t=bv())&&(_v(t,r),wv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sv=function(){var e=$v();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Xc=function(){var e=Sv(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Ev={left:0,top:0,right:0,gap:0},pa=function(e){return parseInt(e||"",10)||0},kv=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[pa(r),pa(n),pa(o)]},xv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ev;var t=kv(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Cv=Xc(),wr="data-scroll-locked",Pv=function(e,t,r,n){var o=e.left,s=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
+
.`.concat(lv,` {
|
|
24
3
|
overflow: hidden `).concat(n,`;
|
|
25
4
|
padding-right: `).concat(i,"px ").concat(n,`;
|
|
26
5
|
}
|
|
27
|
-
body[`).concat(
|
|
6
|
+
body[`).concat(wr,`] {
|
|
28
7
|
overflow: hidden `).concat(n,`;
|
|
29
8
|
overscroll-behavior: contain;
|
|
30
9
|
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
31
|
-
padding-left: `.concat(
|
|
32
|
-
padding-top: `).concat(
|
|
10
|
+
padding-left: `.concat(o,`px;
|
|
11
|
+
padding-top: `).concat(s,`px;
|
|
33
12
|
padding-right: `).concat(a,`px;
|
|
34
13
|
margin-left:0;
|
|
35
14
|
margin-top:0;
|
|
@@ -37,109 +16,63 @@ React keys must be passed directly to JSX without using spread:
|
|
|
37
16
|
`),r==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
38
17
|
}
|
|
39
18
|
|
|
40
|
-
.`).concat(
|
|
19
|
+
.`).concat(Dn,` {
|
|
41
20
|
right: `).concat(i,"px ").concat(n,`;
|
|
42
21
|
}
|
|
43
22
|
|
|
44
|
-
.`).concat(
|
|
23
|
+
.`).concat(Mn,` {
|
|
45
24
|
margin-right: `).concat(i,"px ").concat(n,`;
|
|
46
25
|
}
|
|
47
26
|
|
|
48
|
-
.`).concat(
|
|
27
|
+
.`).concat(Dn," .").concat(Dn,` {
|
|
49
28
|
right: 0 `).concat(n,`;
|
|
50
29
|
}
|
|
51
30
|
|
|
52
|
-
.`).concat(
|
|
31
|
+
.`).concat(Mn," .").concat(Mn,` {
|
|
53
32
|
margin-right: 0 `).concat(n,`;
|
|
54
33
|
}
|
|
55
34
|
|
|
56
|
-
body[`).concat(
|
|
57
|
-
`).concat(
|
|
35
|
+
body[`).concat(wr,`] {
|
|
36
|
+
`).concat(uv,": ").concat(i,`px;
|
|
58
37
|
}
|
|
59
|
-
`)},
|
|
38
|
+
`)},Qc=function(){var e=parseInt(document.body.getAttribute(wr)||"0",10);return isFinite(e)?e:0},Nv=function(){S.useEffect(function(){return document.body.setAttribute(wr,(Qc()+1).toString()),function(){var e=Qc()-1;e<=0?document.body.removeAttribute(wr):document.body.setAttribute(wr,e.toString())}},[])},Av=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Nv();var s=S.useMemo(function(){return xv(o)},[o]);return S.createElement(Cv,{styles:Pv(s,!t,o,r?"":"!important")})},ha=!1;if(typeof window<"u")try{var jn=Object.defineProperty({},"passive",{get:function(){return ha=!0,!0}});window.addEventListener("test",jn,jn),window.removeEventListener("test",jn,jn)}catch{ha=!1}var $r=ha?{passive:!1}:!1,Tv=function(e){return e.tagName==="TEXTAREA"},el=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Tv(e)&&r[t]==="visible")},Iv=function(e){return el(e,"overflowY")},Ov=function(e){return el(e,"overflowX")},tl=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=rl(e,n);if(o){var s=nl(e,n),a=s[1],i=s[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Dv=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Mv=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},rl=function(e,t){return e==="v"?Iv(t):Ov(t)},nl=function(e,t){return e==="v"?Dv(t):Mv(t)},zv=function(e,t){return e==="h"&&t==="rtl"?-1:1},jv=function(e,t,r,n,o){var s=zv(e,window.getComputedStyle(t).direction),a=s*n,i=r.target,c=t.contains(i),l=!1,u=a>0,p=0,h=0;do{if(!i)break;var v=nl(e,i),w=v[0],y=v[1],m=v[2],_=y-m-s*w;(w||_)&&rl(e,i)&&(p+=_,h+=w);var f=i.parentNode;i=f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(u&&Math.abs(p)<1||!u&&Math.abs(h)<1)&&(l=!0),l},Fn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ol=function(e){return[e.deltaX,e.deltaY]},sl=function(e){return e&&"current"in e?e.current:e},Fv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Vv=function(e){return`
|
|
60
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
61
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
62
|
-
`)},jv=0,Nr=[];function Nv(e){var t=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),s=S.useState(jv++)[0],o=S.useState(ol)[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=Yg([e.lockRef.current],(e.shards||[]).map(fl),!0).filter(Boolean);return y.forEach(function(m){return m.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var i=S.useCallback(function(y,m){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var _=Yn(y),f=r.current,b="deltaX"in y?y.deltaX:f[0]-_[0],x="deltaY"in y?y.deltaY:f[1]-_[1],g,$=y.target,E=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in y&&E==="h"&&$.type==="range")return!1;var j=cl(E,$);if(!j)return!0;if(j?g=E:(g=E==="v"?"h":"v",j=cl(E,$)),!j)return!1;if(!n.current&&"changedTouches"in y&&(b||x)&&(n.current=g),!g)return!0;var I=n.current||g;return Ev(I,m,y,I==="h"?b:x)},[]),c=S.useCallback(function(y){var m=y;if(!(!Nr.length||Nr[Nr.length-1]!==o)){var _="deltaY"in m?dl(m):Yn(m),f=t.current.filter(function(g){return g.name===m.type&&(g.target===m.target||m.target===g.shadowParent)&&kv(g.delta,_)})[0];if(f&&f.should){m.cancelable&&m.preventDefault();return}if(!f){var b=(a.current.shards||[]).map(fl).filter(Boolean).filter(function(g){return g.contains(m.target)}),x=b.length>0?i(m,b[0]):!a.current.noIsolation;x&&m.cancelable&&m.preventDefault()}}},[]),l=S.useCallback(function(y,m,_,f){var b={name:y,delta:m,target:_,should:f,shadowParent:Rv(_)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),u=S.useCallback(function(y){r.current=Yn(y),n.current=void 0},[]),h=S.useCallback(function(y){l(y.type,dl(y),y.target,i(y,e.lockRef.current))},[]),p=S.useCallback(function(y){l(y.type,Yn(y),y.target,i(y,e.lockRef.current))},[]);S.useEffect(function(){return Nr.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,jr),document.addEventListener("touchmove",c,jr),document.addEventListener("touchstart",u,jr),function(){Nr=Nr.filter(function(y){return y!==o}),document.removeEventListener("wheel",c,jr),document.removeEventListener("touchmove",c,jr),document.removeEventListener("touchstart",u,jr)}},[]);var v=e.removeScrollBar,w=e.inert;return S.createElement(S.Fragment,null,w?S.createElement(o,{styles:Cv(s)}):null,v?S.createElement(yv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Rv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Av=ov(sl,Nv);var _a=S.forwardRef(function(e,t){return S.createElement(Zn,kt({},e,{ref:t,sideCar:Av}))});_a.classNames=Zn.classNames;var Pv=[" ","Enter","ArrowUp","ArrowDown"],Tv=[" ","Enter"],lr="Select",[Jn,Xn,Ov]=nc(lr),[Rr]=xt(lr,[Ov,qn]),Qn=qn(),[Iv,Kt]=Rr(lr),[Dv,Mv]=Rr(lr),ml=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:a,defaultValue:i,onValueChange:c,dir:l,name:u,autoComplete:h,disabled:p,required:v,form:w}=e,y=Qn(t),[m,_]=S.useState(null),[f,b]=S.useState(null),[x,g]=S.useState(!1),$=Zo(l),[E,j]=cr({prop:n,defaultProp:s??!1,onChange:o,caller:lr}),[I,U]=cr({prop:a,defaultProp:i,onChange:c,caller:lr}),D=S.useRef(null),V=m?w||!!m.closest("form"):!0,[q,W]=S.useState(new Set),ee=Array.from(q).map(K=>K.props.value).join(";");return d.jsx(Gc,{...y,children:d.jsxs(Iv,{required:v,scope:t,trigger:m,onTriggerChange:_,valueNode:f,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:g,contentId:Ht(),value:I,onValueChange:U,open:E,onOpenChange:j,dir:$,triggerPointerDownPosRef:D,disabled:p,children:[d.jsx(Jn.Provider,{scope:t,children:d.jsx(Dv,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(K=>{W(se=>new Set(se).add(K))},[]),onNativeOptionRemove:S.useCallback(K=>{W(se=>{const L=new Set(se);return L.delete(K),L})},[]),children:r})}),V?d.jsxs(Il,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:h,value:I,onChange:K=>U(K.target.value),disabled:p,form:w,children:[I===void 0?d.jsx("option",{value:""}):null,Array.from(q)]},ee):null]})})};ml.displayName=lr;var hl="SelectTrigger",pl=S.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=Qn(r),a=Kt(hl,r),i=a.disabled||n,c=De(t,a.onTriggerChange),l=Xn(r),u=S.useRef("touch"),[h,p,v]=Ml(y=>{const m=l().filter(b=>!b.disabled),_=m.find(b=>b.value===a.value),f=Vl(m,y,_);f!==void 0&&a.onValueChange(f.value)}),w=y=>{i||(a.onOpenChange(!0),v()),y&&(a.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return d.jsx(Zc,{asChild:!0,...o,children:d.jsx(je.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Dl(a.value)?"":void 0,...s,ref:c,onClick:be(s.onClick,y=>{y.currentTarget.focus(),u.current!=="mouse"&&w(y)}),onPointerDown:be(s.onPointerDown,y=>{u.current=y.pointerType;const m=y.target;m.hasPointerCapture(y.pointerId)&&m.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(w(y),y.preventDefault())}),onKeyDown:be(s.onKeyDown,y=>{const m=h.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&p(y.key),!(m&&y.key===" ")&&Pv.includes(y.key)&&(w(),y.preventDefault())})})})});pl.displayName=hl;var gl="SelectValue",vl=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:a="",...i}=e,c=Kt(gl,r),{onValueNodeHasChildrenChange:l}=c,u=o!==void 0,h=De(t,c.onValueNodeChange);return Ye(()=>{l(u)},[l,u]),d.jsx(je.span,{...i,ref:h,style:{pointerEvents:"none"},children:Dl(c.value)?d.jsx(d.Fragment,{children:a}):o})});vl.displayName=gl;var Vv="SelectIcon",yl=S.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return d.jsx(je.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});yl.displayName=Vv;var Fv="SelectPortal",bl=e=>d.jsx(Un,{asChild:!0,...e});bl.displayName=Fv;var ur="SelectContent",_l=S.forwardRef((e,t)=>{const r=Kt(ur,e.__scopeSelect),[n,s]=S.useState();if(Ye(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?$n.createPortal(d.jsx(xl,{scope:e.__scopeSelect,children:d.jsx(Jn.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),o):null}return d.jsx(wl,{...e,ref:t})});_l.displayName=ur;var pt=10,[xl,Yt]=Rr(ur),Lv="SelectContentImpl",zv=Dg("SelectContent.RemoveScroll"),wl=S.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:a,side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:v,sticky:w,hideWhenDetached:y,avoidCollisions:m,..._}=e,f=Kt(ur,r),[b,x]=S.useState(null),[g,$]=S.useState(null),E=De(t,F=>x(F)),[j,I]=S.useState(null),[U,D]=S.useState(null),V=Xn(r),[q,W]=S.useState(!1),ee=S.useRef(!1);S.useEffect(()=>{if(b)return el(b)},[b]),cc();const K=S.useCallback(F=>{const[Y,...de]=V().map(T=>T.ref.current),[oe]=de.slice(-1),A=document.activeElement;for(const T of F)if(T===A||(T==null||T.scrollIntoView({block:"nearest"}),T===Y&&g&&(g.scrollTop=0),T===oe&&g&&(g.scrollTop=g.scrollHeight),T==null||T.focus(),document.activeElement!==A))return},[V,g]),se=S.useCallback(()=>K([j,b]),[K,j,b]);S.useEffect(()=>{q&&se()},[q,se]);const{onOpenChange:L,triggerPointerDownPosRef:he}=f;S.useEffect(()=>{if(b){let F={x:0,y:0};const Y=oe=>{var A,T;F={x:Math.abs(Math.round(oe.pageX)-(((A=he.current)==null?void 0:A.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((T=he.current)==null?void 0:T.y)??0))}},de=oe=>{F.x<=10&&F.y<=10?oe.preventDefault():b.contains(oe.target)||L(!1),document.removeEventListener("pointermove",Y),he.current=null};return he.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",de,{capture:!0})}}},[b,L,he]),S.useEffect(()=>{const F=()=>L(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[L]);const[H,C]=Ml(F=>{const Y=V().filter(A=>!A.disabled),de=Y.find(A=>A.ref.current===document.activeElement),oe=Vl(Y,F,de);oe&&setTimeout(()=>oe.ref.current.focus())}),M=S.useCallback((F,Y,de)=>{const oe=!ee.current&&!de;(f.value!==void 0&&f.value===Y||oe)&&(I(F),oe&&(ee.current=!0))},[f.value]),P=S.useCallback(()=>b==null?void 0:b.focus(),[b]),k=S.useCallback((F,Y,de)=>{const oe=!ee.current&&!de;(f.value!==void 0&&f.value===Y||oe)&&D(F)},[f.value]),N=n==="popper"?xa:$l,z=N===xa?{side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:v,sticky:w,hideWhenDetached:y,avoidCollisions:m}:{};return d.jsx(xl,{scope:r,content:b,viewport:g,onViewportChange:$,itemRefCallback:M,selectedItem:j,onItemLeave:P,itemTextRefCallback:k,focusSelectedItem:se,selectedItemText:U,position:n,isPositioned:q,searchRef:H,children:d.jsx(_a,{as:zv,allowPinchZoom:!0,children:d.jsx(Qo,{asChild:!0,trapped:f.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:be(s,F=>{var Y;(Y=f.trigger)==null||Y.focus({preventScroll:!0}),F.preventDefault()}),children:d.jsx(An,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>f.onOpenChange(!1),children:d.jsx(N,{role:"listbox",id:f.contentId,"data-state":f.open?"open":"closed",dir:f.dir,onContextMenu:F=>F.preventDefault(),..._,...z,onPlaced:()=>W(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:be(_.onKeyDown,F=>{const Y=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!Y&&F.key.length===1&&C(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let oe=V().filter(A=>!A.disabled).map(A=>A.ref.current);if(["ArrowUp","End"].includes(F.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const A=F.target,T=oe.indexOf(A);oe=oe.slice(T+1)}setTimeout(()=>K(oe)),F.preventDefault()}})})})})})})});wl.displayName=Lv;var qv="SelectItemAlignedPosition",$l=S.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=Kt(ur,r),a=Yt(ur,r),[i,c]=S.useState(null),[l,u]=S.useState(null),h=De(t,E=>u(E)),p=Xn(r),v=S.useRef(!1),w=S.useRef(!0),{viewport:y,selectedItem:m,selectedItemText:_,focusSelectedItem:f}=a,b=S.useCallback(()=>{if(o.trigger&&o.valueNode&&i&&l&&y&&m&&_){const E=o.trigger.getBoundingClientRect(),j=l.getBoundingClientRect(),I=o.valueNode.getBoundingClientRect(),U=_.getBoundingClientRect();if(o.dir!=="rtl"){const A=U.left-j.left,T=I.left-A,G=E.left-T,J=E.width+G,ie=Math.max(J,j.width),ge=window.innerWidth-pt,ze=ec(T,[pt,Math.max(pt,ge-ie)]);i.style.minWidth=J+"px",i.style.left=ze+"px"}else{const A=j.right-U.right,T=window.innerWidth-I.right-A,G=window.innerWidth-E.right-T,J=E.width+G,ie=Math.max(J,j.width),ge=window.innerWidth-pt,ze=ec(T,[pt,Math.max(pt,ge-ie)]);i.style.minWidth=J+"px",i.style.right=ze+"px"}const D=p(),V=window.innerHeight-pt*2,q=y.scrollHeight,W=window.getComputedStyle(l),ee=parseInt(W.borderTopWidth,10),K=parseInt(W.paddingTop,10),se=parseInt(W.borderBottomWidth,10),L=parseInt(W.paddingBottom,10),he=ee+K+q+L+se,H=Math.min(m.offsetHeight*5,he),C=window.getComputedStyle(y),M=parseInt(C.paddingTop,10),P=parseInt(C.paddingBottom,10),k=E.top+E.height/2-pt,N=V-k,z=m.offsetHeight/2,F=m.offsetTop+z,Y=ee+K+F,de=he-Y;if(Y<=k){const A=D.length>0&&m===D[D.length-1].ref.current;i.style.bottom="0px";const T=l.clientHeight-y.offsetTop-y.offsetHeight,G=Math.max(N,z+(A?P:0)+T+se),J=Y+G;i.style.height=J+"px"}else{const A=D.length>0&&m===D[0].ref.current;i.style.top="0px";const G=Math.max(k,ee+y.offsetTop+(A?M:0)+z)+de;i.style.height=G+"px",y.scrollTop=Y-k+y.offsetTop}i.style.margin=`${pt}px 0`,i.style.minHeight=H+"px",i.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[p,o.trigger,o.valueNode,i,l,y,m,_,o.dir,n]);Ye(()=>b(),[b]);const[x,g]=S.useState();Ye(()=>{l&&g(window.getComputedStyle(l).zIndex)},[l]);const $=S.useCallback(E=>{E&&w.current===!0&&(b(),f==null||f(),w.current=!1)},[b,f]);return d.jsx(Bv,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:v,onScrollButtonChange:$,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:d.jsx(je.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});$l.displayName=qv;var Uv="SelectPopperPosition",xa=S.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=pt,...o}=e,a=Qn(r);return d.jsx(Kc,{...a,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});xa.displayName=Uv;var[Bv,wa]=Rr(ur,{}),$a="SelectViewport",Sl=S.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=Yt($a,r),a=wa($a,r),i=De(t,o.onViewportChange),c=S.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(Jn.Slot,{scope:r,children:d.jsx(je.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:be(s.onScroll,l=>{const u=l.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=a;if(p!=null&&p.current&&h){const v=Math.abs(c.current-u.scrollTop);if(v>0){const w=window.innerHeight-pt*2,y=parseFloat(h.style.minHeight),m=parseFloat(h.style.height),_=Math.max(y,m);if(_<w){const f=_+v,b=Math.min(w,f),x=f-b;h.style.height=b+"px",h.style.bottom==="0px"&&(u.scrollTop=x>0?x:0,h.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});Sl.displayName=$a;var El="SelectGroup",[Wv,Hv]=Rr(El),Gv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Ht();return d.jsx(Wv,{scope:r,id:s,children:d.jsx(je.div,{role:"group","aria-labelledby":s,...n,ref:t})})});Gv.displayName=El;var kl="SelectLabel",Zv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Hv(kl,r);return d.jsx(je.div,{id:s.id,...n,ref:t})});Zv.displayName=kl;var es="SelectItem",[Kv,Cl]=Rr(es),jl=S.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...a}=e,i=Kt(es,r),c=Yt(es,r),l=i.value===n,[u,h]=S.useState(o??""),[p,v]=S.useState(!1),w=De(t,f=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,f,n,s)}),y=Ht(),m=S.useRef("touch"),_=()=>{s||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Kv,{scope:r,value:n,disabled:s,textId:y,isSelected:l,onItemTextChange:S.useCallback(f=>{h(b=>b||((f==null?void 0:f.textContent)??"").trim())},[]),children:d.jsx(Jn.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:d.jsx(je.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":l&&p,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:w,onFocus:be(a.onFocus,()=>v(!0)),onBlur:be(a.onBlur,()=>v(!1)),onClick:be(a.onClick,()=>{m.current!=="mouse"&&_()}),onPointerUp:be(a.onPointerUp,()=>{m.current==="mouse"&&_()}),onPointerDown:be(a.onPointerDown,f=>{m.current=f.pointerType}),onPointerMove:be(a.onPointerMove,f=>{var b;m.current=f.pointerType,s?(b=c.onItemLeave)==null||b.call(c):m.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(a.onPointerLeave,f=>{var b;f.currentTarget===document.activeElement&&((b=c.onItemLeave)==null||b.call(c))}),onKeyDown:be(a.onKeyDown,f=>{var x;((x=c.searchRef)==null?void 0:x.current)!==""&&f.key===" "||(Tv.includes(f.key)&&_(),f.key===" "&&f.preventDefault())})})})})});jl.displayName=es;var cn="SelectItemText",Nl=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,a=Kt(cn,r),i=Yt(cn,r),c=Cl(cn,r),l=Mv(cn,r),[u,h]=S.useState(null),p=De(t,_=>h(_),c.onItemTextChange,_=>{var f;return(f=i.itemTextRefCallback)==null?void 0:f.call(i,_,c.value,c.disabled)}),v=u==null?void 0:u.textContent,w=S.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:m}=l;return Ye(()=>(y(w),()=>m(w)),[y,m,w]),d.jsxs(d.Fragment,{children:[d.jsx(je.span,{id:c.textId,...o,ref:p}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?$n.createPortal(o.children,a.valueNode):null]})});Nl.displayName=cn;var Rl="SelectItemIndicator",Al=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return Cl(Rl,r).isSelected?d.jsx(je.span,{"aria-hidden":!0,...n,ref:t}):null});Al.displayName=Rl;var Sa="SelectScrollUpButton",Pl=S.forwardRef((e,t)=>{const r=Yt(Sa,e.__scopeSelect),n=wa(Sa,e.__scopeSelect),[s,o]=S.useState(!1),a=De(t,n.onScrollButtonChange);return Ye(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollTop>0;o(l)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?d.jsx(Ol,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});Pl.displayName=Sa;var Ea="SelectScrollDownButton",Tl=S.forwardRef((e,t)=>{const r=Yt(Ea,e.__scopeSelect),n=wa(Ea,e.__scopeSelect),[s,o]=S.useState(!1),a=De(t,n.onScrollButtonChange);return Ye(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;o(u)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?d.jsx(Ol,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});Tl.displayName=Ea;var Ol=S.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=Yt("SelectScrollButton",r),a=S.useRef(null),i=Xn(r),c=S.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),Ye(()=>{var u;const l=i().find(h=>h.ref.current===document.activeElement);(u=l==null?void 0:l.ref.current)==null||u.scrollIntoView({block:"nearest"})},[i]),d.jsx(je.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:be(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:be(s.onPointerMove,()=>{var l;(l=o.onItemLeave)==null||l.call(o),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:be(s.onPointerLeave,()=>{c()})})}),Yv="SelectSeparator",Jv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return d.jsx(je.div,{"aria-hidden":!0,...n,ref:t})});Jv.displayName=Yv;var ka="SelectArrow",Xv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Qn(r),o=Kt(ka,r),a=Yt(ka,r);return o.open&&a.position==="popper"?d.jsx(Yc,{...s,...n,ref:t}):null});Xv.displayName=ka;var Qv="SelectBubbleInput",Il=S.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const s=S.useRef(null),o=De(n,s),a=ha(t);return S.useEffect(()=>{const i=s.current;if(!i)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&u){const h=new Event("change",{bubbles:!0});u.call(i,t),i.dispatchEvent(h)}},[a,t]),d.jsx(je.select,{...r,style:{...Jc,...r.style},ref:o,defaultValue:t})});Il.displayName=Qv;function Dl(e){return e===""||e===void 0}function Ml(e){const t=Bt(e),r=S.useRef(""),n=S.useRef(0),s=S.useCallback(a=>{const i=r.current+a;t(i),(function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(i)},[t]),o=S.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function Vl(e,t,r){const s=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let a=ey(e,Math.max(o,0));s.length===1&&(a=a.filter(l=>l!==r));const c=a.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function ey(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var ty=ml,ry=pl,ny=vl,sy=yl,oy=bl,ay=_l,iy=Sl,cy=jl,ly=Nl,uy=Al,dy=Pl,fy=Tl;/**
|
|
63
|
-
* @license lucide-react v0.525.0 - ISC
|
|
64
|
-
*
|
|
65
|
-
* This source code is licensed under the ISC license.
|
|
66
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const my=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hy=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Fl=e=>{const t=hy(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ll=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),py=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
68
|
-
* @license lucide-react v0.525.0 - ISC
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the ISC license.
|
|
71
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/var gy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
73
|
-
* @license lucide-react v0.525.0 - ISC
|
|
74
|
-
*
|
|
75
|
-
* This source code is licensed under the ISC license.
|
|
76
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const vy=Z.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:a,...i},c)=>Z.createElement("svg",{ref:c,...gy,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Ll("lucide",s),...!o&&!py(i)&&{"aria-hidden":"true"},...i},[...a.map(([l,u])=>Z.createElement(l,u)),...Array.isArray(o)?o:[o]]));/**
|
|
78
|
-
* @license lucide-react v0.525.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const Tt=(e,t)=>{const r=Z.forwardRef(({className:n,...s},o)=>Z.createElement(vy,{ref:o,iconNode:t,className:Ll(`lucide-${my(Fl(e))}`,`lucide-${e}`,n),...s}));return r.displayName=Fl(e),r};/**
|
|
83
|
-
* @license lucide-react v0.525.0 - ISC
|
|
84
|
-
*
|
|
85
|
-
* This source code is licensed under the ISC license.
|
|
86
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const zl=Tt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
88
|
-
* @license lucide-react v0.525.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const ql=Tt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
93
|
-
* @license lucide-react v0.525.0 - ISC
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the ISC license.
|
|
96
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const yy=Tt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
98
|
-
* @license lucide-react v0.525.0 - ISC
|
|
99
|
-
*
|
|
100
|
-
* This source code is licensed under the ISC license.
|
|
101
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const Ul=Tt("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
|
|
103
|
-
* @license lucide-react v0.525.0 - ISC
|
|
104
|
-
*
|
|
105
|
-
* This source code is licensed under the ISC license.
|
|
106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const by=Tt("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
108
|
-
* @license lucide-react v0.525.0 - ISC
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the ISC license.
|
|
111
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const Bl=Tt("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
113
|
-
* @license lucide-react v0.525.0 - ISC
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the ISC license.
|
|
116
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const _y=Tt("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
118
|
-
* @license lucide-react v0.525.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const Wl=Tt("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
123
|
-
* @license lucide-react v0.525.0 - ISC
|
|
124
|
-
*
|
|
125
|
-
* This source code is licensed under the ISC license.
|
|
126
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const Hl=Tt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Gl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Gl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Zl(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Gl(e))&&(n&&(n+=" "),n+=t);return n}const xy=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},wy=(e,t)=>({classGroupId:e,validator:t}),Kl=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),ts="-",Yl=[],$y="arbitrary..",Sy=e=>{const t=ky(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Ey(a);const i=a.split(ts),c=i[0]===""&&i.length>1?1:0;return Jl(i,c,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=n[a],l=r[a];return c?l?xy(l,c):c:l||Yl}return r[a]||Yl}}},Jl=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],o=r.nextPart.get(s);if(o){const l=Jl(e,t+1,o);if(l)return l}const a=r.validators;if(a===null)return;const i=t===0?e.join(ts):e.slice(t).join(ts),c=a.length;for(let l=0;l<c;l++){const u=a[l];if(u.validator(i))return u.classGroupId}},Ey=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?$y+n:void 0})(),ky=e=>{const{theme:t,classGroups:r}=e;return Cy(r,t)},Cy=(e,t)=>{const r=Kl();for(const n in e){const s=e[n];Ca(s,r,n,t)}return r},Ca=(e,t,r,n)=>{const s=e.length;for(let o=0;o<s;o++){const a=e[o];jy(a,t,r,n)}},jy=(e,t,r,n)=>{if(typeof e=="string"){Ny(e,t,r);return}if(typeof e=="function"){Ry(e,t,r,n);return}Ay(e,t,r,n)},Ny=(e,t,r)=>{const n=e===""?t:Xl(t,e);n.classGroupId=r},Ry=(e,t,r,n)=>{if(Py(e)){Ca(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(wy(r,e))},Ay=(e,t,r,n)=>{const s=Object.entries(e),o=s.length;for(let a=0;a<o;a++){const[i,c]=s[a];Ca(c,Xl(t,i),r,n)}},Xl=(e,t)=>{let r=e;const n=t.split(ts),s=n.length;for(let o=0;o<s;o++){const a=n[o];let i=r.nextPart.get(a);i||(i=Kl(),r.nextPart.set(a,i)),r=i}return r},Py=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ty=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(o){let a=r[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return s(o,a),a},set(o,a){o in r?r[o]=a:s(o,a)}}},ja="!",Ql=":",Oy=[],eu=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Iy=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const o=[];let a=0,i=0,c=0,l;const u=s.length;for(let y=0;y<u;y++){const m=s[y];if(a===0&&i===0){if(m===Ql){o.push(s.slice(c,y)),c=y+1;continue}if(m==="/"){l=y;continue}}m==="["?a++:m==="]"?a--:m==="("?i++:m===")"&&i--}const h=o.length===0?s:s.slice(c);let p=h,v=!1;h.endsWith(ja)?(p=h.slice(0,-1),v=!0):h.startsWith(ja)&&(p=h.slice(1),v=!0);const w=l&&l>c?l-c:void 0;return eu(o,v,p,w)};if(t){const s=t+Ql,o=n;n=a=>a.startsWith(s)?o(a.slice(s.length)):eu(Oy,!1,a,void 0,!0)}if(r){const s=n;n=o=>r({className:o,parseClassName:s})}return n},Dy=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let s=[];for(let o=0;o<r.length;o++){const a=r[o],i=a[0]==="[",c=t.has(a);i||c?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(a)):s.push(a)}return s.length>0&&(s.sort(),n.push(...s)),n}},My=e=>({cache:Ty(e.cacheSize),parseClassName:Iy(e),sortModifiers:Dy(e),...Sy(e)}),Vy=/\s+/,Fy=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:o}=t,a=[],i=e.trim().split(Vy);let c="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{isExternal:h,modifiers:p,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:y}=r(u);if(h){c=u+(c.length>0?" "+c:c);continue}let m=!!y,_=n(m?w.substring(0,y):w);if(!_){if(!m){c=u+(c.length>0?" "+c:c);continue}if(_=n(w),!_){c=u+(c.length>0?" "+c:c);continue}m=!1}const f=p.length===0?"":p.length===1?p[0]:o(p).join(":"),b=v?f+ja:f,x=b+_;if(a.indexOf(x)>-1)continue;a.push(x);const g=s(_,m);for(let $=0;$<g.length;++$){const E=g[$];a.push(b+E)}c=u+(c.length>0?" "+c:c)}return c},Ly=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=tu(r))&&(s&&(s+=" "),s+=n);return s},tu=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=tu(e[n]))&&(r&&(r+=" "),r+=t);return r},zy=(e,...t)=>{let r,n,s,o;const a=c=>{const l=t.reduce((u,h)=>h(u),e());return r=My(l),n=r.cache.get,s=r.cache.set,o=i,i(c)},i=c=>{const l=n(c);if(l)return l;const u=Fy(c,r);return s(c,u),u};return o=a,(...c)=>o(Ly(...c))},qy=[],He=e=>{const t=r=>r[e]||qy;return t.isThemeGetter=!0,t},ru=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Uy=/^\d+\/\d+$/,By=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Hy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ar=e=>Uy.test(e),Se=e=>!!e&&!Number.isNaN(Number(e)),Jt=e=>!!e&&Number.isInteger(Number(e)),Na=e=>e.endsWith("%")&&Se(e.slice(0,-1)),Ot=e=>By.test(e),Ky=()=>!0,Yy=e=>Wy.test(e)&&!Hy.test(e),su=()=>!1,Jy=e=>Gy.test(e),Xy=e=>Zy.test(e),Qy=e=>!ce(e)&&!le(e),eb=e=>Pr(e,lu,su),ce=e=>ru.test(e),dr=e=>Pr(e,uu,Yy),Ra=e=>Pr(e,ob,Se),ou=e=>Pr(e,iu,su),tb=e=>Pr(e,cu,Xy),rs=e=>Pr(e,du,Jy),le=e=>nu.test(e),ln=e=>Tr(e,uu),rb=e=>Tr(e,ab),au=e=>Tr(e,iu),nb=e=>Tr(e,lu),sb=e=>Tr(e,cu),ns=e=>Tr(e,du,!0),Pr=(e,t,r)=>{const n=ru.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Tr=(e,t,r=!1)=>{const n=nu.exec(e);return n?n[1]?t(n[1]):r:!1},iu=e=>e==="position"||e==="percentage",cu=e=>e==="image"||e==="url",lu=e=>e==="length"||e==="size"||e==="bg-size",uu=e=>e==="length",ob=e=>e==="number",ab=e=>e==="family-name",du=e=>e==="shadow",ib=zy(()=>{const e=He("color"),t=He("font"),r=He("text"),n=He("font-weight"),s=He("tracking"),o=He("leading"),a=He("breakpoint"),i=He("container"),c=He("spacing"),l=He("radius"),u=He("shadow"),h=He("inset-shadow"),p=He("text-shadow"),v=He("drop-shadow"),w=He("blur"),y=He("perspective"),m=He("aspect"),_=He("ease"),f=He("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],g=()=>[...x(),le,ce],$=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],j=()=>[le,ce,c],I=()=>[Ar,"full","auto",...j()],U=()=>[Jt,"none","subgrid",le,ce],D=()=>["auto",{span:["full",Jt,le,ce]},Jt,le,ce],V=()=>[Jt,"auto",le,ce],q=()=>["auto","min","max","fr",le,ce],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...j()],se=()=>[Ar,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],L=()=>[e,le,ce],he=()=>[...x(),au,ou,{position:[le,ce]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",nb,eb,{size:[le,ce]}],M=()=>[Na,ln,dr],P=()=>["","none","full",l,le,ce],k=()=>["",Se,ln,dr],N=()=>["solid","dashed","dotted","double"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>[Se,Na,au,ou],Y=()=>["","none",w,le,ce],de=()=>["none",Se,le,ce],oe=()=>["none",Se,le,ce],A=()=>[Se,le,ce],T=()=>[Ar,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ot],breakpoint:[Ot],color:[Ky],container:[Ot],"drop-shadow":[Ot],ease:["in","out","in-out"],font:[Qy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ot],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ot],shadow:[Ot],spacing:["px",Se],text:[Ot],"text-shadow":[Ot],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ar,ce,le,m]}],container:["container"],columns:[{columns:[Se,ce,le,i]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:g()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Jt,"auto",le,ce]}],basis:[{basis:[Ar,"full","auto",i,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Se,Ar,"auto","initial","none",ce]}],grow:[{grow:["",Se,le,ce]}],shrink:[{shrink:["",Se,le,ce]}],order:[{order:[Jt,"first","last","none",le,ce]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:se()}],w:[{w:[i,"screen",...se()]}],"min-w":[{"min-w":[i,"screen","none",...se()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...se()]}],h:[{h:["screen","lh",...se()]}],"min-h":[{"min-h":["screen","lh","none",...se()]}],"max-h":[{"max-h":["screen","lh",...se()]}],"font-size":[{text:["base",r,ln,dr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,le,Ra]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Na,ce]}],"font-family":[{font:[rb,ce,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,le,ce]}],"line-clamp":[{"line-clamp":[Se,"none",le,Ra]}],leading:[{leading:[o,...j()]}],"list-image":[{"list-image":["none",le,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:[Se,"from-font","auto",le,dr]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Se,"auto",le,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:he()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Jt,le,ce],radial:["",le,ce],conic:[Jt,le,ce]},sb,tb]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:M()}],"gradient-via-pos":[{via:M()}],"gradient-to-pos":[{to:M()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:k()}],"border-w-x":[{"border-x":k()}],"border-w-y":[{"border-y":k()}],"border-w-s":[{"border-s":k()}],"border-w-e":[{"border-e":k()}],"border-w-t":[{"border-t":k()}],"border-w-r":[{"border-r":k()}],"border-w-b":[{"border-b":k()}],"border-w-l":[{"border-l":k()}],"divide-x":[{"divide-x":k()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":k()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...N(),"hidden","none"]}],"divide-style":[{divide:[...N(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...N(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Se,le,ce]}],"outline-w":[{outline:["",Se,ln,dr]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",u,ns,rs]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",h,ns,rs]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Se,dr]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":k()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,ns,rs]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Se,le,ce]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Se]}],"mask-image-linear-from-pos":[{"mask-linear-from":F()}],"mask-image-linear-to-pos":[{"mask-linear-to":F()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":F()}],"mask-image-t-to-pos":[{"mask-t-to":F()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":F()}],"mask-image-r-to-pos":[{"mask-r-to":F()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":F()}],"mask-image-b-to-pos":[{"mask-b-to":F()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":F()}],"mask-image-l-to-pos":[{"mask-l-to":F()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":F()}],"mask-image-x-to-pos":[{"mask-x-to":F()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":F()}],"mask-image-y-to-pos":[{"mask-y-to":F()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[le,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":F()}],"mask-image-radial-to-pos":[{"mask-radial-to":F()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[Se]}],"mask-image-conic-from-pos":[{"mask-conic-from":F()}],"mask-image-conic-to-pos":[{"mask-conic-to":F()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:he()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ce]}],filter:[{filter:["","none",le,ce]}],blur:[{blur:Y()}],brightness:[{brightness:[Se,le,ce]}],contrast:[{contrast:[Se,le,ce]}],"drop-shadow":[{"drop-shadow":["","none",v,ns,rs]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Se,le,ce]}],"hue-rotate":[{"hue-rotate":[Se,le,ce]}],invert:[{invert:["",Se,le,ce]}],saturate:[{saturate:[Se,le,ce]}],sepia:[{sepia:["",Se,le,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ce]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[Se,le,ce]}],"backdrop-contrast":[{"backdrop-contrast":[Se,le,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Se,le,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Se,le,ce]}],"backdrop-invert":[{"backdrop-invert":["",Se,le,ce]}],"backdrop-opacity":[{"backdrop-opacity":[Se,le,ce]}],"backdrop-saturate":[{"backdrop-saturate":[Se,le,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Se,le,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Se,"initial",le,ce]}],ease:[{ease:["linear","initial",_,le,ce]}],delay:[{delay:[Se,le,ce]}],animate:[{animate:["none",f,le,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,le,ce]}],"perspective-origin":[{"perspective-origin":g()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[le,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:g()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:T()}],"translate-x":[{"translate-x":T()}],"translate-y":[{"translate-y":T()}],"translate-z":[{"translate-z":T()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,ce]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Se,ln,dr,Ra]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function _e(...e){return ib(Zl(e))}function Or({...e}){return d.jsx(ty,{"data-slot":"select",...e})}function Ir({...e}){return d.jsx(ny,{"data-slot":"select-value",...e})}function Dr({className:e,size:t="default",children:r,...n}){return d.jsxs(ry,{"data-slot":"select-trigger","data-size":t,className:_e("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,d.jsx(sy,{asChild:!0,children:d.jsx(ql,{className:"size-4 opacity-50"})})]})}function Mr({className:e,children:t,position:r="popper",...n}){return d.jsx(oy,{children:d.jsxs(ay,{"data-slot":"select-content",className:_e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[d.jsx(cb,{}),d.jsx(iy,{className:_e("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(lb,{})]})})}function Ct({className:e,children:t,...r}){return d.jsxs(cy,{"data-slot":"select-item",className:_e("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(uy,{children:d.jsx(zl,{className:"size-4"})})}),d.jsx(ly,{children:t})]})}function cb({className:e,...t}){return d.jsx(dy,{"data-slot":"select-scroll-up-button",className:_e("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(yy,{className:"size-4"})})}function lb({className:e,...t}){return d.jsx(fy,{"data-slot":"select-scroll-down-button",className:_e("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(ql,{className:"size-4"})})}const Te=Z.forwardRef(({className:e,type:t,...r},n)=>d.jsx("input",{type:t,"data-slot":"input",className:_e("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r}));Te.displayName="Input";var ub=Symbol.for("react.lazy"),ss=S[" use ".trim().toString()];function db(e){return typeof e=="object"&&e!==null&&"then"in e}function fu(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ub&&"_payload"in e&&db(e._payload)}function Aa(e){const t=fb(e),r=S.forwardRef((n,s)=>{let{children:o,...a}=n;fu(o)&&typeof ss=="function"&&(o=ss(o._payload));const i=S.Children.toArray(o),c=i.find(hb);if(c){const l=c.props.children,u=i.map(h=>h===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var Pa=Aa("Slot");function fb(e){const t=S.forwardRef((r,n)=>{let{children:s,...o}=r;if(fu(s)&&typeof ss=="function"&&(s=ss(s._payload)),S.isValidElement(s)){const a=gb(s),i=pb(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mb=Symbol("radix.slottable");function hb(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mb}function pb(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function gb(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const mu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hu=Zl,pu=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return hu(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(l=>{const u=r==null?void 0:r[l],h=o==null?void 0:o[l];if(u===null)return null;const p=mu(u)||mu(h);return s[l][p]}),i=r&&Object.entries(r).reduce((l,u)=>{let[h,p]=u;return p===void 0||(l[h]=p),l},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,u)=>{let{class:h,className:p,...v}=u;return Object.entries(v).every(w=>{let[y,m]=w;return Array.isArray(m)?m.includes({...o,...i}[y]):{...o,...i}[y]===m})?[...l,h,p]:l},[]);return hu(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)},Ta=pu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Xt=Z.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const a=n?Pa:"button";return d.jsx(a,{"data-slot":"button",ref:o,className:_e(Ta({variant:t,size:r,className:e})),...s})});function vb(e,t){return S.useReducer((r,n)=>t[r][n]??r,e)}var Qt=e=>{const{present:t,children:r}=e,n=yb(t),s=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),o=De(n.ref,bb(s));return typeof r=="function"||n.isPresent?S.cloneElement(s,{ref:o}):null};Qt.displayName="Presence";function yb(e){const[t,r]=S.useState(),n=S.useRef(null),s=S.useRef(e),o=S.useRef("none"),a=e?"mounted":"unmounted",[i,c]=vb(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const l=os(n.current);o.current=i==="mounted"?l:"none"},[i]),Ye(()=>{const l=n.current,u=s.current;if(u!==e){const p=o.current,v=os(l);e?c("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Ye(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,h=v=>{const y=os(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&y&&(c("ANIMATION_END"),!s.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},p=v=>{v.target===t&&(o.current=os(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:S.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function os(e){return(e==null?void 0:e.animationName)||"none"}function bb(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var _b=Symbol("radix.slottable");function xb(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=_b,t}var[as]=xt("Tooltip",[qn]),is=qn(),gu="TooltipProvider",wb=700,Oa="tooltip.open",[$b,Ia]=as(gu),vu=e=>{const{__scopeTooltip:t,delayDuration:r=wb,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,a=S.useRef(!0),i=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),d.jsx($b,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:S.useCallback(l=>{i.current=l},[]),disableHoverableContent:s,children:o})};vu.displayName=gu;var un="Tooltip",[Sb,dn]=as(un),yu=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s,onOpenChange:o,disableHoverableContent:a,delayDuration:i}=e,c=Ia(un,e.__scopeTooltip),l=is(t),[u,h]=S.useState(null),p=Ht(),v=S.useRef(0),w=a??c.disableHoverableContent,y=i??c.delayDuration,m=S.useRef(!1),[_,f]=cr({prop:n,defaultProp:s??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Oa))):c.onClose(),o==null||o(E)},caller:un}),b=S.useMemo(()=>_?m.current?"delayed-open":"instant-open":"closed",[_]),x=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,m.current=!1,f(!0)},[f]),g=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,f(!1)},[f]),$=S.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{m.current=!0,f(!0),v.current=0},y)},[y,f]);return S.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),d.jsx(Gc,{...l,children:d.jsx(Sb,{scope:t,contentId:p,open:_,stateAttribute:b,trigger:u,onTriggerChange:h,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?$():x()},[c.isOpenDelayedRef,$,x]),onTriggerLeave:S.useCallback(()=>{w?g():(window.clearTimeout(v.current),v.current=0)},[g,w]),onOpen:x,onClose:g,disableHoverableContent:w,children:r})})};yu.displayName=un;var Da="TooltipTrigger",bu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=dn(Da,r),o=Ia(Da,r),a=is(r),i=S.useRef(null),c=De(t,i,s.onTriggerChange),l=S.useRef(!1),u=S.useRef(!1),h=S.useCallback(()=>l.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),d.jsx(Zc,{asChild:!0,...a,children:d.jsx(je.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:be(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:be(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:be(e.onPointerDown,()=>{s.open&&s.onClose(),l.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:be(e.onFocus,()=>{l.current||s.onOpen()}),onBlur:be(e.onBlur,s.onClose),onClick:be(e.onClick,s.onClose)})})});bu.displayName=Da;var Ma="TooltipPortal",[Eb,kb]=as(Ma,{forceMount:void 0}),_u=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:s}=e,o=dn(Ma,t);return d.jsx(Eb,{scope:t,forceMount:r,children:d.jsx(Qt,{present:r||o.open,children:d.jsx(Un,{asChild:!0,container:s,children:n})})})};_u.displayName=Ma;var Vr="TooltipContent",xu=S.forwardRef((e,t)=>{const r=kb(Vr,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,a=dn(Vr,e.__scopeTooltip);return d.jsx(Qt,{present:n||a.open,children:a.disableHoverableContent?d.jsx(wu,{side:s,...o,ref:t}):d.jsx(Cb,{side:s,...o,ref:t})})}),Cb=S.forwardRef((e,t)=>{const r=dn(Vr,e.__scopeTooltip),n=Ia(Vr,e.__scopeTooltip),s=S.useRef(null),o=De(t,s),[a,i]=S.useState(null),{trigger:c,onClose:l}=r,u=s.current,{onPointerInTransitChange:h}=n,p=S.useCallback(()=>{i(null),h(!1)},[h]),v=S.useCallback((w,y)=>{const m=w.currentTarget,_={x:w.clientX,y:w.clientY},f=Ab(_,m.getBoundingClientRect()),b=Pb(_,f),x=Tb(y.getBoundingClientRect()),g=Ib([...b,...x]);i(g),h(!0)},[h]);return S.useEffect(()=>()=>p(),[p]),S.useEffect(()=>{if(c&&u){const w=m=>v(m,u),y=m=>v(m,c);return c.addEventListener("pointerleave",w),u.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",y)}}},[c,u,v,p]),S.useEffect(()=>{if(a){const w=y=>{const m=y.target,_={x:y.clientX,y:y.clientY},f=(c==null?void 0:c.contains(m))||(u==null?void 0:u.contains(m)),b=!Ob(_,a);f?p():b&&(p(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,u,a,l,p]),d.jsx(wu,{...e,ref:o})}),[jb,Nb]=as(un,{isInside:!1}),Rb=xb("TooltipContent"),wu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...i}=e,c=dn(Vr,r),l=is(r),{onClose:u}=c;return S.useEffect(()=>(document.addEventListener(Oa,u),()=>document.removeEventListener(Oa,u)),[u]),S.useEffect(()=>{if(c.trigger){const h=p=>{const v=p.target;v!=null&&v.contains(c.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,u]),d.jsx(An,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:d.jsxs(Kc,{"data-state":c.stateAttribute,...l,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Rb,{children:n}),d.jsx(jb,{scope:r,isInside:!0,children:d.jsx(Hg,{id:c.contentId,role:"tooltip",children:s||n})})]})})});xu.displayName=Vr;var $u="TooltipArrow",Su=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=is(r);return Nb($u,r).isInside?null:d.jsx(Yc,{...s,...n,ref:t})});Su.displayName=$u;function Ab(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Pb(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Tb(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function Ob(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const i=t[o],c=t[a],l=i.x,u=i.y,h=c.x,p=c.y;u>n!=p>n&&r<(h-l)*(n-u)/(p-u)+l&&(s=!s)}return s}function Ib(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Db(t)}function Db(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],a=r[r.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Mb=vu,Vb=yu,Fb=bu,Lb=_u,zb=xu,qb=Su;function Ub({delayDuration:e=0,...t}){return d.jsx(Mb,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Eu({...e}){return d.jsx(Ub,{children:d.jsx(Vb,{"data-slot":"tooltip",...e})})}function ku({...e}){return d.jsx(Fb,{"data-slot":"tooltip-trigger",...e})}function Cu({className:e,sideOffset:t=0,children:r,...n}){return d.jsx(Lb,{children:d.jsxs(zb,{"data-slot":"tooltip-content",sideOffset:t,className:_e("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,d.jsx(qb,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Bb=({theme:e,readOnly:t,rootType:r,onAddField:n,onOpenSettings:s})=>{const{control:o}=Ze();return d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Te,{value:"root",disabled:!0,className:"w-40"}),d.jsxs(Or,{disabled:!0,value:r,children:[d.jsx(Dr,{className:"w-40",children:d.jsx(Ir,{})}),d.jsx(Mr,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:d.jsx(Ct,{value:r,children:r})})]}),d.jsx(qt,{control:o,name:"root.title",render:({field:a})=>d.jsx(Te,{placeholder:"Title",disabled:t,className:"flex-1",...a})}),d.jsx(qt,{control:o,name:"root.description",render:({field:a})=>d.jsx(Te,{placeholder:"Description",disabled:t,className:"flex-1",...a})}),d.jsxs(Eu,{children:[d.jsx(ku,{asChild:!0,children:d.jsx(Xt,{disabled:!0,size:"icon",children:d.jsx(Wl,{})})}),d.jsx(Cu,{children:d.jsx("p",{children:"Required"})})]}),d.jsx("div",{className:"border-l-2 border-input"}),d.jsx(Xt,{size:"icon",variant:"ghost","data-testid":"root-settings-button",onClick:()=>s("root"),children:d.jsx(Bl,{className:"text-blue-500"})}),r==="object"&&d.jsx(Xt,{size:"icon",variant:"ghost","data-testid":"root-add-button",disabled:t,onClick:n,children:d.jsx(Ul,{className:"text-green-500"})}),d.jsx("div",{})]})},cs={form:{width:"full",height:"md"},output:{position:"bottom",showJson:!0,width:"full",height:"md"},settings:{width:"md"},spacing:"md"},ju={sm:"max-h-[300px]",md:"max-h-[500px]",lg:"max-h-[800px]",full:"max-h-full"},Wb={sm:300,md:500,lg:800,full:void 0},Va={sm:"w-full max-w-[600px]",md:"w-full max-w-[800px]",lg:"w-full max-w-[1200px]",full:"w-full"},Hb={sm:"sm:max-w-[500px]",md:"sm:max-w-[700px]",lg:"sm:max-w-[1000px]",full:"w-full sm:max-w-full"},Gb={top:"flex-col-reverse",bottom:"flex-col",left:"flex-row-reverse",right:"flex-row"},Nu={sm:"gap-2",md:"gap-4",lg:"gap-6"},Zb=["string","integer","number","boolean","object","array"],Kb=["int-32","int-64"],Yb=["float","double","big-decimal"],Jb=["date","date-time","local-date-time","time","duration","email","hostname","ipv4","ipv6","password","html","json","json-path","uri","uri-refrence","uri-template","relative-json-pointer","json-pointer","regex","uuid"];function Xb(e){const t=Qb(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(t_);if(c){const l=c.props.children,u=i.map(h=>h===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Qb(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=n_(s),i=r_(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var e_=Symbol("radix.slottable");function t_(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===e_}function r_(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function n_(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ls="Dialog",[Ru,Au]=xt(ls),[s_,gt]=Ru(ls),Pu=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:a=!0}=e,i=S.useRef(null),c=S.useRef(null),[l,u]=cr({prop:n,defaultProp:s??!1,onChange:o,caller:ls});return d.jsx(s_,{scope:t,triggerRef:i,contentRef:c,contentId:Ht(),titleId:Ht(),descriptionId:Ht(),open:l,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(h=>!h),[u]),modal:a,children:r})};Pu.displayName=ls;var Tu="DialogTrigger",Ou=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(Tu,r),o=De(t,s.triggerRef);return d.jsx(je.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":za(s.open),...n,ref:o,onClick:be(e.onClick,s.onOpenToggle)})});Ou.displayName=Tu;var Fa="DialogPortal",[o_,Iu]=Ru(Fa,{forceMount:void 0}),Du=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=gt(Fa,t);return d.jsx(o_,{scope:t,forceMount:r,children:S.Children.map(n,a=>d.jsx(Qt,{present:r||o.open,children:d.jsx(Un,{asChild:!0,container:s,children:a})}))})};Du.displayName=Fa;var us="DialogOverlay",Mu=S.forwardRef((e,t)=>{const r=Iu(us,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=gt(us,e.__scopeDialog);return o.modal?d.jsx(Qt,{present:n||o.open,children:d.jsx(i_,{...s,ref:t})}):null});Mu.displayName=us;var a_=Xb("DialogOverlay.RemoveScroll"),i_=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(us,r);return d.jsx(_a,{as:a_,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(je.div,{"data-state":za(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),fr="DialogContent",Vu=S.forwardRef((e,t)=>{const r=Iu(fr,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=gt(fr,e.__scopeDialog);return d.jsx(Qt,{present:n||o.open,children:o.modal?d.jsx(c_,{...s,ref:t}):d.jsx(l_,{...s,ref:t})})});Vu.displayName=fr;var c_=S.forwardRef((e,t)=>{const r=gt(fr,e.__scopeDialog),n=S.useRef(null),s=De(t,r.contentRef,n);return S.useEffect(()=>{const o=n.current;if(o)return el(o)},[]),d.jsx(Fu,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&o.preventDefault()}),onFocusOutside:be(e.onFocusOutside,o=>o.preventDefault())})}),l_=S.forwardRef((e,t)=>{const r=gt(fr,e.__scopeDialog),n=S.useRef(!1),s=S.useRef(!1);return d.jsx(Fu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=o.target;((l=r.triggerRef.current)==null?void 0:l.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Fu=S.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...a}=e,i=gt(fr,r),c=S.useRef(null),l=De(t,c);return cc(),d.jsxs(d.Fragment,{children:[d.jsx(Qo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:d.jsx(An,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":za(i.open),...a,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(d_,{titleId:i.titleId}),d.jsx(m_,{contentRef:c,descriptionId:i.descriptionId})]})]})}),La="DialogTitle",Lu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(La,r);return d.jsx(je.h2,{id:s.titleId,...n,ref:t})});Lu.displayName=La;var zu="DialogDescription",qu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(zu,r);return d.jsx(je.p,{id:s.descriptionId,...n,ref:t})});qu.displayName=zu;var Uu="DialogClose",Bu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(Uu,r);return d.jsx(je.button,{type:"button",...n,ref:t,onClick:be(e.onClick,()=>s.onOpenChange(!1))})});Bu.displayName=Uu;function za(e){return e?"open":"closed"}var Wu="DialogTitleWarning",[u_,Hu]=Vh(Wu,{contentName:fr,titleName:La,docsSlug:"dialog"}),d_=({titleId:e})=>{const t=Hu(Wu),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
41
|
+
`)},Lv=0,Sr=[];function Rv(e){var t=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),o=S.useState(Lv++)[0],s=S.useState(Xc)[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=cv([e.lockRef.current],(e.shards||[]).map(sl),!0).filter(Boolean);return y.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=S.useCallback(function(y,m){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var _=Fn(y),f=r.current,b="deltaX"in y?y.deltaX:f[0]-_[0],$="deltaY"in y?y.deltaY:f[1]-_[1],g,E=y.target,k=Math.abs(b)>Math.abs($)?"h":"v";if("touches"in y&&k==="h"&&E.type==="range")return!1;var C=window.getSelection(),O=C&&C.anchorNode,V=O?O===E||O.contains(E):!1;if(V)return!1;var z=tl(k,E);if(!z)return!0;if(z?g=k:(g=k==="v"?"h":"v",z=tl(k,E)),!z)return!1;if(!n.current&&"changedTouches"in y&&(b||$)&&(n.current=g),!g)return!0;var j=n.current||g;return jv(j,m,y,j==="h"?b:$)},[]),c=S.useCallback(function(y){var m=y;if(!(!Sr.length||Sr[Sr.length-1]!==s)){var _="deltaY"in m?ol(m):Fn(m),f=t.current.filter(function(g){return g.name===m.type&&(g.target===m.target||m.target===g.shadowParent)&&Fv(g.delta,_)})[0];if(f&&f.should){m.cancelable&&m.preventDefault();return}if(!f){var b=(a.current.shards||[]).map(sl).filter(Boolean).filter(function(g){return g.contains(m.target)}),$=b.length>0?i(m,b[0]):!a.current.noIsolation;$&&m.cancelable&&m.preventDefault()}}},[]),l=S.useCallback(function(y,m,_,f){var b={name:y,delta:m,target:_,should:f,shadowParent:qv(_)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function($){return $!==b})},1)},[]),u=S.useCallback(function(y){r.current=Fn(y),n.current=void 0},[]),p=S.useCallback(function(y){l(y.type,ol(y),y.target,i(y,e.lockRef.current))},[]),h=S.useCallback(function(y){l(y.type,Fn(y),y.target,i(y,e.lockRef.current))},[]);S.useEffect(function(){return Sr.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",c,$r),document.addEventListener("touchmove",c,$r),document.addEventListener("touchstart",u,$r),function(){Sr=Sr.filter(function(y){return y!==s}),document.removeEventListener("wheel",c,$r),document.removeEventListener("touchmove",c,$r),document.removeEventListener("touchstart",u,$r)}},[]);var v=e.removeScrollBar,w=e.inert;return S.createElement(S.Fragment,null,w?S.createElement(s,{styles:Vv(o)}):null,v?S.createElement(Av,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function qv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Uv=vv(Yc,Rv);var ma=S.forwardRef(function(e,t){return S.createElement(zn,St({},e,{ref:t,sideCar:Uv}))});ma.classNames=zn.classNames;var Zv=[" ","Enter","ArrowUp","ArrowDown"],Bv=[" ","Enter"],rr="Select",[Vn,Ln,Wv]=Ji(rr),[Er]=yt(rr,[Wv,An]),Rn=An(),[Hv,qt]=Er(rr),[Kv,Gv]=Er(rr),al=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:s,value:a,defaultValue:i,onValueChange:c,dir:l,name:u,autoComplete:p,disabled:h,required:v,form:w}=e,y=Rn(t),[m,_]=S.useState(null),[f,b]=S.useState(null),[$,g]=S.useState(!1),E=Us(l),[k,C]=tr({prop:n,defaultProp:o??!1,onChange:s,caller:rr}),[O,V]=tr({prop:a,defaultProp:i,onChange:c,caller:rr}),z=S.useRef(null),j=m?w||!!m.closest("form"):!0,[R,Z]=S.useState(new Set),ne=Array.from(R).map(G=>G.props.value).join(";");return d.jsx(Lc,{...y,children:d.jsxs(Hv,{required:v,scope:t,trigger:m,onTriggerChange:_,valueNode:f,onValueNodeChange:b,valueNodeHasChildren:$,onValueNodeHasChildrenChange:g,contentId:Vt(),value:O,onValueChange:V,open:k,onOpenChange:C,dir:E,triggerPointerDownPosRef:z,disabled:h,children:[d.jsx(Vn.Provider,{scope:t,children:d.jsx(Kv,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(G=>{Z(oe=>new Set(oe).add(G))},[]),onNativeOptionRemove:S.useCallback(G=>{Z(oe=>{const F=new Set(oe);return F.delete(G),F})},[]),children:r})}),j?d.jsxs(Pl,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:p,value:O,onChange:G=>V(G.target.value),disabled:h,form:w,children:[O===void 0?d.jsx("option",{value:""}):null,Array.from(R)]},ne):null]})})};al.displayName=rr;var il="SelectTrigger",cl=S.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,s=Rn(r),a=qt(il,r),i=a.disabled||n,c=Ne(t,a.onTriggerChange),l=Ln(r),u=S.useRef("touch"),[p,h,v]=Al(y=>{const m=l().filter(b=>!b.disabled),_=m.find(b=>b.value===a.value),f=Tl(m,y,_);f!==void 0&&a.onValueChange(f.value)}),w=y=>{i||(a.onOpenChange(!0),v()),y&&(a.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return d.jsx(Rc,{asChild:!0,...s,children:d.jsx(Se.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Nl(a.value)?"":void 0,...o,ref:c,onClick:me(o.onClick,y=>{y.currentTarget.focus(),u.current!=="mouse"&&w(y)}),onPointerDown:me(o.onPointerDown,y=>{u.current=y.pointerType;const m=y.target;m.hasPointerCapture(y.pointerId)&&m.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(w(y),y.preventDefault())}),onKeyDown:me(o.onKeyDown,y=>{const m=p.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&h(y.key),!(m&&y.key===" ")&&Zv.includes(y.key)&&(w(),y.preventDefault())})})})});cl.displayName=il;var ll="SelectValue",ul=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:s,placeholder:a="",...i}=e,c=qt(ll,r),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,p=Ne(t,c.onValueNodeChange);return He(()=>{l(u)},[l,u]),d.jsx(Se.span,{...i,ref:p,style:{pointerEvents:"none"},children:Nl(c.value)?d.jsx(d.Fragment,{children:a}):s})});ul.displayName=ll;var Jv="SelectIcon",dl=S.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return d.jsx(Se.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});dl.displayName=Jv;var Yv="SelectPortal",fl=e=>d.jsx(Tn,{asChild:!0,...e});fl.displayName=Yv;var nr="SelectContent",pl=S.forwardRef((e,t)=>{const r=qt(nr,e.__scopeSelect),[n,o]=S.useState();if(He(()=>{o(new DocumentFragment)},[]),!r.open){const s=n;return s?fn.createPortal(d.jsx(hl,{scope:e.__scopeSelect,children:d.jsx(Vn.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),s):null}return d.jsx(ml,{...e,ref:t})});pl.displayName=nr;var ft=10,[hl,Ut]=Er(nr),Xv="SelectContentImpl",Qv=Kg("SelectContent.RemoveScroll"),ml=S.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:p,collisionBoundary:h,collisionPadding:v,sticky:w,hideWhenDetached:y,avoidCollisions:m,..._}=e,f=qt(nr,r),[b,$]=S.useState(null),[g,E]=S.useState(null),k=Ne(t,q=>$(q)),[C,O]=S.useState(null),[V,z]=S.useState(null),j=Ln(r),[R,Z]=S.useState(!1),ne=S.useRef(!1);S.useEffect(()=>{if(b)return Hc(b)},[b]),tc();const G=S.useCallback(q=>{const[Q,...ue]=j().map(T=>T.ref.current),[se]=ue.slice(-1),A=document.activeElement;for(const T of q)if(T===A||(T?.scrollIntoView({block:"nearest"}),T===Q&&g&&(g.scrollTop=0),T===se&&g&&(g.scrollTop=g.scrollHeight),T?.focus(),document.activeElement!==A))return},[j,g]),oe=S.useCallback(()=>G([C,b]),[G,C,b]);S.useEffect(()=>{R&&oe()},[R,oe]);const{onOpenChange:F,triggerPointerDownPosRef:fe}=f;S.useEffect(()=>{if(b){let q={x:0,y:0};const Q=se=>{q={x:Math.abs(Math.round(se.pageX)-(fe.current?.x??0)),y:Math.abs(Math.round(se.pageY)-(fe.current?.y??0))}},ue=se=>{q.x<=10&&q.y<=10?se.preventDefault():b.contains(se.target)||F(!1),document.removeEventListener("pointermove",Q),fe.current=null};return fe.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",ue,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",ue,{capture:!0})}}},[b,F,fe]),S.useEffect(()=>{const q=()=>F(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[F]);const[H,I]=Al(q=>{const Q=j().filter(A=>!A.disabled),ue=Q.find(A=>A.ref.current===document.activeElement),se=Tl(Q,q,ue);se&&setTimeout(()=>se.ref.current.focus())}),K=S.useCallback((q,Q,ue)=>{const se=!ne.current&&!ue;(f.value!==void 0&&f.value===Q||se)&&(O(q),se&&(ne.current=!0))},[f.value]),D=S.useCallback(()=>b?.focus(),[b]),x=S.useCallback((q,Q,ue)=>{const se=!ne.current&&!ue;(f.value!==void 0&&f.value===Q||se)&&z(q)},[f.value]),N=n==="popper"?ga:gl,L=N===ga?{side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:p,collisionBoundary:h,collisionPadding:v,sticky:w,hideWhenDetached:y,avoidCollisions:m}:{};return d.jsx(hl,{scope:r,content:b,viewport:g,onViewportChange:E,itemRefCallback:K,selectedItem:C,onItemLeave:D,itemTextRefCallback:x,focusSelectedItem:oe,selectedItemText:V,position:n,isPositioned:R,searchRef:H,children:d.jsx(ma,{as:Qv,allowPinchZoom:!0,children:d.jsx(Ks,{asChild:!0,trapped:f.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:me(o,q=>{f.trigger?.focus({preventScroll:!0}),q.preventDefault()}),children:d.jsx(bn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>f.onOpenChange(!1),children:d.jsx(N,{role:"listbox",id:f.contentId,"data-state":f.open?"open":"closed",dir:f.dir,onContextMenu:q=>q.preventDefault(),..._,...L,onPlaced:()=>Z(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:me(_.onKeyDown,q=>{const Q=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!Q&&q.key.length===1&&I(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let se=j().filter(A=>!A.disabled).map(A=>A.ref.current);if(["ArrowUp","End"].includes(q.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const A=q.target,T=se.indexOf(A);se=se.slice(T+1)}setTimeout(()=>G(se)),q.preventDefault()}})})})})})})});ml.displayName=Xv;var ey="SelectItemAlignedPosition",gl=S.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,s=qt(nr,r),a=Ut(nr,r),[i,c]=S.useState(null),[l,u]=S.useState(null),p=Ne(t,k=>u(k)),h=Ln(r),v=S.useRef(!1),w=S.useRef(!0),{viewport:y,selectedItem:m,selectedItemText:_,focusSelectedItem:f}=a,b=S.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&l&&y&&m&&_){const k=s.trigger.getBoundingClientRect(),C=l.getBoundingClientRect(),O=s.valueNode.getBoundingClientRect(),V=_.getBoundingClientRect();if(s.dir!=="rtl"){const A=V.left-C.left,T=O.left-A,W=k.left-T,Y=k.width+W,ce=Math.max(Y,C.width),he=window.innerWidth-ft,Ve=Hi(T,[ft,Math.max(ft,he-ce)]);i.style.minWidth=Y+"px",i.style.left=Ve+"px"}else{const A=C.right-V.right,T=window.innerWidth-O.right-A,W=window.innerWidth-k.right-T,Y=k.width+W,ce=Math.max(Y,C.width),he=window.innerWidth-ft,Ve=Hi(T,[ft,Math.max(ft,he-ce)]);i.style.minWidth=Y+"px",i.style.right=Ve+"px"}const z=h(),j=window.innerHeight-ft*2,R=y.scrollHeight,Z=window.getComputedStyle(l),ne=parseInt(Z.borderTopWidth,10),G=parseInt(Z.paddingTop,10),oe=parseInt(Z.borderBottomWidth,10),F=parseInt(Z.paddingBottom,10),fe=ne+G+R+F+oe,H=Math.min(m.offsetHeight*5,fe),I=window.getComputedStyle(y),K=parseInt(I.paddingTop,10),D=parseInt(I.paddingBottom,10),x=k.top+k.height/2-ft,N=j-x,L=m.offsetHeight/2,q=m.offsetTop+L,Q=ne+G+q,ue=fe-Q;if(Q<=x){const A=z.length>0&&m===z[z.length-1].ref.current;i.style.bottom="0px";const T=l.clientHeight-y.offsetTop-y.offsetHeight,W=Math.max(N,L+(A?D:0)+T+oe),Y=Q+W;i.style.height=Y+"px"}else{const A=z.length>0&&m===z[0].ref.current;i.style.top="0px";const W=Math.max(x,ne+y.offsetTop+(A?K:0)+L)+ue;i.style.height=W+"px",y.scrollTop=Q-x+y.offsetTop}i.style.margin=`${ft}px 0`,i.style.minHeight=H+"px",i.style.maxHeight=j+"px",n?.(),requestAnimationFrame(()=>v.current=!0)}},[h,s.trigger,s.valueNode,i,l,y,m,_,s.dir,n]);He(()=>b(),[b]);const[$,g]=S.useState();He(()=>{l&&g(window.getComputedStyle(l).zIndex)},[l]);const E=S.useCallback(k=>{k&&w.current===!0&&(b(),f?.(),w.current=!1)},[b,f]);return d.jsx(ry,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:v,onScrollButtonChange:E,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:$},children:d.jsx(Se.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});gl.displayName=ey;var ty="SelectPopperPosition",ga=S.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=ft,...s}=e,a=Rn(r);return d.jsx(qc,{...a,...s,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ga.displayName=ty;var[ry,va]=Er(nr,{}),ya="SelectViewport",vl=S.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,s=Ut(ya,r),a=va(ya,r),i=Ne(t,s.onViewportChange),c=S.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(Vn.Slot,{scope:r,children:d.jsx(Se.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:me(o.onScroll,l=>{const u=l.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:h}=a;if(h?.current&&p){const v=Math.abs(c.current-u.scrollTop);if(v>0){const w=window.innerHeight-ft*2,y=parseFloat(p.style.minHeight),m=parseFloat(p.style.height),_=Math.max(y,m);if(_<w){const f=_+v,b=Math.min(w,f),$=f-b;p.style.height=b+"px",p.style.bottom==="0px"&&(u.scrollTop=$>0?$:0,p.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});vl.displayName=ya;var yl="SelectGroup",[ny,oy]=Er(yl),sy=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Vt();return d.jsx(ny,{scope:r,id:o,children:d.jsx(Se.div,{role:"group","aria-labelledby":o,...n,ref:t})})});sy.displayName=yl;var bl="SelectLabel",ay=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=oy(bl,r);return d.jsx(Se.div,{id:o.id,...n,ref:t})});ay.displayName=bl;var qn="SelectItem",[iy,_l]=Er(qn),wl=S.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:s,...a}=e,i=qt(qn,r),c=Ut(qn,r),l=i.value===n,[u,p]=S.useState(s??""),[h,v]=S.useState(!1),w=Ne(t,f=>c.itemRefCallback?.(f,n,o)),y=Vt(),m=S.useRef("touch"),_=()=>{o||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(iy,{scope:r,value:n,disabled:o,textId:y,isSelected:l,onItemTextChange:S.useCallback(f=>{p(b=>b||(f?.textContent??"").trim())},[]),children:d.jsx(Vn.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:d.jsx(Se.div,{role:"option","aria-labelledby":y,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:w,onFocus:me(a.onFocus,()=>v(!0)),onBlur:me(a.onBlur,()=>v(!1)),onClick:me(a.onClick,()=>{m.current!=="mouse"&&_()}),onPointerUp:me(a.onPointerUp,()=>{m.current==="mouse"&&_()}),onPointerDown:me(a.onPointerDown,f=>{m.current=f.pointerType}),onPointerMove:me(a.onPointerMove,f=>{m.current=f.pointerType,o?c.onItemLeave?.():m.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:me(a.onPointerLeave,f=>{f.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:me(a.onKeyDown,f=>{c.searchRef?.current!==""&&f.key===" "||(Bv.includes(f.key)&&_(),f.key===" "&&f.preventDefault())})})})})});wl.displayName=qn;var Qr="SelectItemText",$l=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...s}=e,a=qt(Qr,r),i=Ut(Qr,r),c=_l(Qr,r),l=Gv(Qr,r),[u,p]=S.useState(null),h=Ne(t,_=>p(_),c.onItemTextChange,_=>i.itemTextRefCallback?.(_,c.value,c.disabled)),v=u?.textContent,w=S.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:m}=l;return He(()=>(y(w),()=>m(w)),[y,m,w]),d.jsxs(d.Fragment,{children:[d.jsx(Se.span,{id:c.textId,...s,ref:h}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?fn.createPortal(s.children,a.valueNode):null]})});$l.displayName=Qr;var Sl="SelectItemIndicator",El=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return _l(Sl,r).isSelected?d.jsx(Se.span,{"aria-hidden":!0,...n,ref:t}):null});El.displayName=Sl;var ba="SelectScrollUpButton",kl=S.forwardRef((e,t)=>{const r=Ut(ba,e.__scopeSelect),n=va(ba,e.__scopeSelect),[o,s]=S.useState(!1),a=Ne(t,n.onScrollButtonChange);return He(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollTop>0;s(l)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),o?d.jsx(Cl,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});kl.displayName=ba;var _a="SelectScrollDownButton",xl=S.forwardRef((e,t)=>{const r=Ut(_a,e.__scopeSelect),n=va(_a,e.__scopeSelect),[o,s]=S.useState(!1),a=Ne(t,n.onScrollButtonChange);return He(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;s(u)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),o?d.jsx(Cl,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});xl.displayName=_a;var Cl=S.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,s=Ut("SelectScrollButton",r),a=S.useRef(null),i=Ln(r),c=S.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),He(()=>{i().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),d.jsx(Se.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:me(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:me(o.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:me(o.onPointerLeave,()=>{c()})})}),cy="SelectSeparator",ly=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return d.jsx(Se.div,{"aria-hidden":!0,...n,ref:t})});ly.displayName=cy;var wa="SelectArrow",uy=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Rn(r),s=qt(wa,r),a=Ut(wa,r);return s.open&&a.position==="popper"?d.jsx(Uc,{...o,...n,ref:t}):null});uy.displayName=wa;var dy="SelectBubbleInput",Pl=S.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=S.useRef(null),s=Ne(n,o),a=la(t);return S.useEffect(()=>{const i=o.current;if(!i)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&u){const p=new Event("change",{bubbles:!0});u.call(i,t),i.dispatchEvent(p)}},[a,t]),d.jsx(Se.select,{...r,style:{...Zc,...r.style},ref:s,defaultValue:t})});Pl.displayName=dy;function Nl(e){return e===""||e===void 0}function Al(e){const t=jt(e),r=S.useRef(""),n=S.useRef(0),o=S.useCallback(a=>{const i=r.current+a;t(i),(function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(i)},[t]),s=S.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,s]}function Tl(e,t,r){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let a=fy(e,Math.max(s,0));o.length===1&&(a=a.filter(l=>l!==r));const c=a.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function fy(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var py=al,hy=cl,my=ul,gy=dl,vy=fl,yy=pl,by=vl,_y=wl,wy=$l,$y=El,Sy=kl,Ey=xl;const ky=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xy=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Il=e=>{const t=xy(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ol=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Cy=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Py={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ny=J.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:a,...i},c)=>J.createElement("svg",{ref:c,...Py,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Ol("lucide",o),...!s&&!Cy(i)&&{"aria-hidden":"true"},...i},[...a.map(([l,u])=>J.createElement(l,u)),...Array.isArray(s)?s:[s]]));const Nt=(e,t)=>{const r=J.forwardRef(({className:n,...o},s)=>J.createElement(Ny,{ref:s,iconNode:t,className:Ol(`lucide-${ky(Il(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Il(e),r};const Dl=Nt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Ml=Nt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Ay=Nt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const zl=Nt("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);const Ty=Nt("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const jl=Nt("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Iy=Nt("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Fl=Nt("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Vl=Nt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Ll(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Ll(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Rl(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Ll(e))&&(n&&(n+=" "),n+=t);return n}const Oy=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Dy=(e,t)=>({classGroupId:e,validator:t}),ql=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Un="-",Ul=[],My="arbitrary..",zy=e=>{const t=Fy(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return jy(a);const i=a.split(Un),c=i[0]===""&&i.length>1?1:0;return Zl(i,c,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=n[a],l=r[a];return c?l?Oy(l,c):c:l||Ul}return r[a]||Ul}}},Zl=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const l=Zl(e,t+1,s);if(l)return l}const a=r.validators;if(a===null)return;const i=t===0?e.join(Un):e.slice(t).join(Un),c=a.length;for(let l=0;l<c;l++){const u=a[l];if(u.validator(i))return u.classGroupId}},jy=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?My+n:void 0})(),Fy=e=>{const{theme:t,classGroups:r}=e;return Vy(r,t)},Vy=(e,t)=>{const r=ql();for(const n in e){const o=e[n];$a(o,r,n,t)}return r},$a=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const a=e[s];Ly(a,t,r,n)}},Ly=(e,t,r,n)=>{if(typeof e=="string"){Ry(e,t,r);return}if(typeof e=="function"){qy(e,t,r,n);return}Uy(e,t,r,n)},Ry=(e,t,r)=>{const n=e===""?t:Bl(t,e);n.classGroupId=r},qy=(e,t,r,n)=>{if(Zy(e)){$a(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Dy(r,e))},Uy=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let a=0;a<s;a++){const[i,c]=o[a];$a(c,Bl(t,i),r,n)}},Bl=(e,t)=>{let r=e;const n=t.split(Un),o=n.length;for(let s=0;s<o;s++){const a=n[s];let i=r.nextPart.get(a);i||(i=ql(),r.nextPart.set(a,i)),r=i}return r},Zy=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,By=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,a)=>{r[s]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let a=r[s];if(a!==void 0)return a;if((a=n[s])!==void 0)return o(s,a),a},set(s,a){s in r?r[s]=a:o(s,a)}}},Sa="!",Wl=":",Wy=[],Hl=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Hy=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let a=0,i=0,c=0,l;const u=o.length;for(let y=0;y<u;y++){const m=o[y];if(a===0&&i===0){if(m===Wl){s.push(o.slice(c,y)),c=y+1;continue}if(m==="/"){l=y;continue}}m==="["?a++:m==="]"?a--:m==="("?i++:m===")"&&i--}const p=s.length===0?o:o.slice(c);let h=p,v=!1;p.endsWith(Sa)?(h=p.slice(0,-1),v=!0):p.startsWith(Sa)&&(h=p.slice(1),v=!0);const w=l&&l>c?l-c:void 0;return Hl(s,v,h,w)};if(t){const o=t+Wl,s=n;n=a=>a.startsWith(o)?s(a.slice(o.length)):Hl(Wy,!1,a,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Ky=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const a=r[s],i=a[0]==="[",c=t.has(a);i||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(a)):o.push(a)}return o.length>0&&(o.sort(),n.push(...o)),n}},Gy=e=>({cache:By(e.cacheSize),parseClassName:Hy(e),sortModifiers:Ky(e),...zy(e)}),Jy=/\s+/,Yy=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(Jy);let c="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{isExternal:p,modifiers:h,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:y}=r(u);if(p){c=u+(c.length>0?" "+c:c);continue}let m=!!y,_=n(m?w.substring(0,y):w);if(!_){if(!m){c=u+(c.length>0?" "+c:c);continue}if(_=n(w),!_){c=u+(c.length>0?" "+c:c);continue}m=!1}const f=h.length===0?"":h.length===1?h[0]:s(h).join(":"),b=v?f+Sa:f,$=b+_;if(a.indexOf($)>-1)continue;a.push($);const g=o(_,m);for(let E=0;E<g.length;++E){const k=g[E];a.push(b+k)}c=u+(c.length>0?" "+c:c)}return c},Xy=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Kl(r))&&(o&&(o+=" "),o+=n);return o},Kl=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Kl(e[n]))&&(r&&(r+=" "),r+=t);return r},Qy=(e,...t)=>{let r,n,o,s;const a=c=>{const l=t.reduce((u,p)=>p(u),e());return r=Gy(l),n=r.cache.get,o=r.cache.set,s=i,i(c)},i=c=>{const l=n(c);if(l)return l;const u=Yy(c,r);return o(c,u),u};return s=a,(...c)=>s(Xy(...c))},eb=[],qe=e=>{const t=r=>r[e]||eb;return t.isThemeGetter=!0,t},Gl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jl=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tb=/^\d+\/\d+$/,rb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ob=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ab=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kr=e=>tb.test(e),be=e=>!!e&&!Number.isNaN(Number(e)),Zt=e=>!!e&&Number.isInteger(Number(e)),Ea=e=>e.endsWith("%")&&be(e.slice(0,-1)),At=e=>rb.test(e),ib=()=>!0,cb=e=>nb.test(e)&&!ob.test(e),Yl=()=>!1,lb=e=>sb.test(e),ub=e=>ab.test(e),db=e=>!ae(e)&&!ie(e),fb=e=>xr(e,ru,Yl),ae=e=>Gl.test(e),or=e=>xr(e,nu,cb),ka=e=>xr(e,vb,be),Xl=e=>xr(e,eu,Yl),pb=e=>xr(e,tu,ub),Zn=e=>xr(e,ou,lb),ie=e=>Jl.test(e),en=e=>Cr(e,nu),hb=e=>Cr(e,yb),Ql=e=>Cr(e,eu),mb=e=>Cr(e,ru),gb=e=>Cr(e,tu),Bn=e=>Cr(e,ou,!0),xr=(e,t,r)=>{const n=Gl.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Cr=(e,t,r=!1)=>{const n=Jl.exec(e);return n?n[1]?t(n[1]):r:!1},eu=e=>e==="position"||e==="percentage",tu=e=>e==="image"||e==="url",ru=e=>e==="length"||e==="size"||e==="bg-size",nu=e=>e==="length",vb=e=>e==="number",yb=e=>e==="family-name",ou=e=>e==="shadow",bb=Qy(()=>{const e=qe("color"),t=qe("font"),r=qe("text"),n=qe("font-weight"),o=qe("tracking"),s=qe("leading"),a=qe("breakpoint"),i=qe("container"),c=qe("spacing"),l=qe("radius"),u=qe("shadow"),p=qe("inset-shadow"),h=qe("text-shadow"),v=qe("drop-shadow"),w=qe("blur"),y=qe("perspective"),m=qe("aspect"),_=qe("ease"),f=qe("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],g=()=>[...$(),ie,ae],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[ie,ae,c],O=()=>[kr,"full","auto",...C()],V=()=>[Zt,"none","subgrid",ie,ae],z=()=>["auto",{span:["full",Zt,ie,ae]},Zt,ie,ae],j=()=>[Zt,"auto",ie,ae],R=()=>["auto","min","max","fr",ie,ae],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...C()],oe=()=>[kr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],F=()=>[e,ie,ae],fe=()=>[...$(),Ql,Xl,{position:[ie,ae]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",mb,fb,{size:[ie,ae]}],K=()=>[Ea,en,or],D=()=>["","none","full",l,ie,ae],x=()=>["",be,en,or],N=()=>["solid","dashed","dotted","double"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[be,Ea,Ql,Xl],Q=()=>["","none",w,ie,ae],ue=()=>["none",be,ie,ae],se=()=>["none",be,ie,ae],A=()=>[be,ie,ae],T=()=>[kr,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[At],breakpoint:[At],color:[ib],container:[At],"drop-shadow":[At],ease:["in","out","in-out"],font:[db],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[At],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[At],shadow:[At],spacing:["px",be],text:[At],"text-shadow":[At],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kr,ae,ie,m]}],container:["container"],columns:[{columns:[be,ae,ie,i]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:g()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[Zt,"auto",ie,ae]}],basis:[{basis:[kr,"full","auto",i,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[be,kr,"auto","initial","none",ae]}],grow:[{grow:["",be,ie,ae]}],shrink:[{shrink:["",be,ie,ae]}],order:[{order:[Zt,"first","last","none",ie,ae]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],w:[{w:[i,"screen",...oe()]}],"min-w":[{"min-w":[i,"screen","none",...oe()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...oe()]}],h:[{h:["screen","lh",...oe()]}],"min-h":[{"min-h":["screen","lh","none",...oe()]}],"max-h":[{"max-h":["screen","lh",...oe()]}],"font-size":[{text:["base",r,en,or]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ie,ka]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ea,ae]}],"font-family":[{font:[hb,ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ie,ae]}],"line-clamp":[{"line-clamp":[be,"none",ie,ka]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",ie,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ie,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:[be,"from-font","auto",ie,or]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[be,"auto",ie,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ie,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:fe()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Zt,ie,ae],radial:["",ie,ae],conic:[Zt,ie,ae]},gb,pb]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:x()}],"border-w-x":[{"border-x":x()}],"border-w-y":[{"border-y":x()}],"border-w-s":[{"border-s":x()}],"border-w-e":[{"border-e":x()}],"border-w-t":[{"border-t":x()}],"border-w-r":[{"border-r":x()}],"border-w-b":[{"border-b":x()}],"border-w-l":[{"border-l":x()}],"divide-x":[{"divide-x":x()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":x()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...N(),"hidden","none"]}],"divide-style":[{divide:[...N(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...N(),"none","hidden"]}],"outline-offset":[{"outline-offset":[be,ie,ae]}],"outline-w":[{outline:["",be,en,or]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",u,Bn,Zn]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",p,Bn,Zn]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:x()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[be,or]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":x()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",h,Bn,Zn]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[be,ie,ae]}],"mix-blend":[{"mix-blend":[...L(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":L()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[be]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[ie,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":$()}],"mask-image-conic-pos":[{"mask-conic":[be]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ie,ae]}],filter:[{filter:["","none",ie,ae]}],blur:[{blur:Q()}],brightness:[{brightness:[be,ie,ae]}],contrast:[{contrast:[be,ie,ae]}],"drop-shadow":[{"drop-shadow":["","none",v,Bn,Zn]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",be,ie,ae]}],"hue-rotate":[{"hue-rotate":[be,ie,ae]}],invert:[{invert:["",be,ie,ae]}],saturate:[{saturate:[be,ie,ae]}],sepia:[{sepia:["",be,ie,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",ie,ae]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[be,ie,ae]}],"backdrop-contrast":[{"backdrop-contrast":[be,ie,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",be,ie,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[be,ie,ae]}],"backdrop-invert":[{"backdrop-invert":["",be,ie,ae]}],"backdrop-opacity":[{"backdrop-opacity":[be,ie,ae]}],"backdrop-saturate":[{"backdrop-saturate":[be,ie,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",be,ie,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ie,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[be,"initial",ie,ae]}],ease:[{ease:["linear","initial",_,ie,ae]}],delay:[{delay:[be,ie,ae]}],animate:[{animate:["none",f,ie,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,ie,ae]}],"perspective-origin":[{"perspective-origin":g()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[ie,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:g()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:T()}],"translate-x":[{"translate-x":T()}],"translate-y":[{"translate-y":T()}],"translate-z":[{"translate-z":T()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ie,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ie,ae]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[be,en,or,ka]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function ge(...e){return bb(Rl(e))}function Pr({...e}){return d.jsx(py,{"data-slot":"select",...e})}function Nr({...e}){return d.jsx(my,{"data-slot":"select-value",...e})}function Ar({className:e,size:t="default",children:r,...n}){return d.jsxs(hy,{"data-slot":"select-trigger","data-size":t,className:ge("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,d.jsx(gy,{asChild:!0,children:d.jsx(Ml,{className:"size-4 opacity-50"})})]})}function Tr({className:e,children:t,position:r="popper",...n}){return d.jsx(vy,{children:d.jsxs(yy,{"data-slot":"select-content",className:ge("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[d.jsx(_b,{}),d.jsx(by,{className:ge("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(wb,{})]})})}function Et({className:e,children:t,...r}){return d.jsxs(_y,{"data-slot":"select-item",className:ge("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx($y,{children:d.jsx(Dl,{className:"size-4"})})}),d.jsx(wy,{children:t})]})}function _b({className:e,...t}){return d.jsx(Sy,{"data-slot":"select-scroll-up-button",className:ge("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Ay,{className:"size-4"})})}function wb({className:e,...t}){return d.jsx(Ey,{"data-slot":"select-scroll-down-button",className:ge("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Ml,{className:"size-4"})})}const Ce=J.forwardRef(({className:e,type:t,...r},n)=>d.jsx("input",{type:t,"data-slot":"input",className:ge("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r}));Ce.displayName="Input";var $b=Symbol.for("react.lazy"),Wn=S[" use ".trim().toString()];function Sb(e){return typeof e=="object"&&e!==null&&"then"in e}function su(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$b&&"_payload"in e&&Sb(e._payload)}function xa(e){const t=Eb(e),r=S.forwardRef((n,o)=>{let{children:s,...a}=n;su(s)&&typeof Wn=="function"&&(s=Wn(s._payload));const i=S.Children.toArray(s),c=i.find(xb);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var Ca=xa("Slot");function Eb(e){const t=S.forwardRef((r,n)=>{let{children:o,...s}=r;if(su(o)&&typeof Wn=="function"&&(o=Wn(o._payload)),S.isValidElement(o)){const a=Pb(o),i=Cb(s,o.props);return o.type!==S.Fragment&&(i.ref=n?mr(n,a):a),S.cloneElement(o,i)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kb=Symbol("radix.slottable");function xb(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kb}function Cb(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Pb(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const au=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,iu=Rl,cu=(e,t)=>r=>{var n;if(t?.variants==null)return iu(e,r?.class,r?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(l=>{const u=r?.[l],p=s?.[l];if(u===null)return null;const h=au(u)||au(p);return o[l][h]}),i=r&&Object.entries(r).reduce((l,u)=>{let[p,h]=u;return h===void 0||(l[p]=h),l},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,u)=>{let{class:p,className:h,...v}=u;return Object.entries(v).every(w=>{let[y,m]=w;return Array.isArray(m)?m.includes({...s,...i}[y]):{...s,...i}[y]===m})?[...l,p,h]:l},[]);return iu(e,a,c,r?.class,r?.className)},Pa=cu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Bt=J.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const a=n?Ca:"button";return d.jsx(a,{"data-slot":"button",ref:s,className:ge(Pa({variant:t,size:r,className:e})),...o})});function Nb(e,t){return S.useReducer((r,n)=>t[r][n]??r,e)}var Wt=e=>{const{present:t,children:r}=e,n=Ab(t),o=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),s=Ne(n.ref,Tb(o));return typeof r=="function"||n.isPresent?S.cloneElement(o,{ref:s}):null};Wt.displayName="Presence";function Ab(e){const[t,r]=S.useState(),n=S.useRef(null),o=S.useRef(e),s=S.useRef("none"),a=e?"mounted":"unmounted",[i,c]=Nb(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const l=Hn(n.current);s.current=i==="mounted"?l:"none"},[i]),He(()=>{const l=n.current,u=o.current;if(u!==e){const h=s.current,v=Hn(l);e?c("MOUNT"):v==="none"||l?.display==="none"?c("UNMOUNT"):c(u&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),He(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,p=v=>{const y=Hn(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&y&&(c("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=v=>{v.target===t&&(s.current=Hn(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:S.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function Hn(e){return e?.animationName||"none"}function Tb(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ib=Symbol("radix.slottable");function Ob(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Ib,t}var[Kn]=yt("Tooltip",[An]),Gn=An(),lu="TooltipProvider",Db=700,Na="tooltip.open",[Mb,Aa]=Kn(lu),uu=e=>{const{__scopeTooltip:t,delayDuration:r=Db,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:s}=e,a=S.useRef(!0),i=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),d.jsx(Mb,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:S.useCallback(l=>{i.current=l},[]),disableHoverableContent:o,children:s})};uu.displayName=lu;var tn="Tooltip",[zb,rn]=Kn(tn),du=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,c=Aa(tn,e.__scopeTooltip),l=Gn(t),[u,p]=S.useState(null),h=Vt(),v=S.useRef(0),w=a??c.disableHoverableContent,y=i??c.delayDuration,m=S.useRef(!1),[_,f]=tr({prop:n,defaultProp:o??!1,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(Na))):c.onClose(),s?.(k)},caller:tn}),b=S.useMemo(()=>_?m.current?"delayed-open":"instant-open":"closed",[_]),$=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,m.current=!1,f(!0)},[f]),g=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,f(!1)},[f]),E=S.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{m.current=!0,f(!0),v.current=0},y)},[y,f]);return S.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),d.jsx(Lc,{...l,children:d.jsx(zb,{scope:t,contentId:h,open:_,stateAttribute:b,trigger:u,onTriggerChange:p,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?E():$()},[c.isOpenDelayedRef,E,$]),onTriggerLeave:S.useCallback(()=>{w?g():(window.clearTimeout(v.current),v.current=0)},[g,w]),onOpen:$,onClose:g,disableHoverableContent:w,children:r})})};du.displayName=tn;var Ta="TooltipTrigger",fu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=rn(Ta,r),s=Aa(Ta,r),a=Gn(r),i=S.useRef(null),c=Ne(t,i,o.onTriggerChange),l=S.useRef(!1),u=S.useRef(!1),p=S.useCallback(()=>l.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),d.jsx(Rc,{asChild:!0,...a,children:d.jsx(Se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:me(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:me(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:me(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:me(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:me(e.onBlur,o.onClose),onClick:me(e.onClick,o.onClose)})})});fu.displayName=Ta;var Ia="TooltipPortal",[jb,Fb]=Kn(Ia,{forceMount:void 0}),pu=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,s=rn(Ia,t);return d.jsx(jb,{scope:t,forceMount:r,children:d.jsx(Wt,{present:r||s.open,children:d.jsx(Tn,{asChild:!0,container:o,children:n})})})};pu.displayName=Ia;var Ir="TooltipContent",hu=S.forwardRef((e,t)=>{const r=Fb(Ir,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,a=rn(Ir,e.__scopeTooltip);return d.jsx(Wt,{present:n||a.open,children:a.disableHoverableContent?d.jsx(mu,{side:o,...s,ref:t}):d.jsx(Vb,{side:o,...s,ref:t})})}),Vb=S.forwardRef((e,t)=>{const r=rn(Ir,e.__scopeTooltip),n=Aa(Ir,e.__scopeTooltip),o=S.useRef(null),s=Ne(t,o),[a,i]=S.useState(null),{trigger:c,onClose:l}=r,u=o.current,{onPointerInTransitChange:p}=n,h=S.useCallback(()=>{i(null),p(!1)},[p]),v=S.useCallback((w,y)=>{const m=w.currentTarget,_={x:w.clientX,y:w.clientY},f=Ub(_,m.getBoundingClientRect()),b=Zb(_,f),$=Bb(y.getBoundingClientRect()),g=Hb([...b,...$]);i(g),p(!0)},[p]);return S.useEffect(()=>()=>h(),[h]),S.useEffect(()=>{if(c&&u){const w=m=>v(m,u),y=m=>v(m,c);return c.addEventListener("pointerleave",w),u.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",y)}}},[c,u,v,h]),S.useEffect(()=>{if(a){const w=y=>{const m=y.target,_={x:y.clientX,y:y.clientY},f=c?.contains(m)||u?.contains(m),b=!Wb(_,a);f?h():b&&(h(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,u,a,l,h]),d.jsx(mu,{...e,ref:s})}),[Lb,Rb]=Kn(tn,{isInside:!1}),qb=Ob("TooltipContent"),mu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=rn(Ir,r),l=Gn(r),{onClose:u}=c;return S.useEffect(()=>(document.addEventListener(Na,u),()=>document.removeEventListener(Na,u)),[u]),S.useEffect(()=>{if(c.trigger){const p=h=>{h.target?.contains(c.trigger)&&u()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,u]),d.jsx(bn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:u,children:d.jsxs(qc,{"data-state":c.stateAttribute,...l,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(qb,{children:n}),d.jsx(Lb,{scope:r,isInside:!0,children:d.jsx(ov,{id:c.contentId,role:"tooltip",children:o||n})})]})})});hu.displayName=Ir;var gu="TooltipArrow",vu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Gn(r);return Rb(gu,r).isInside?null:d.jsx(Uc,{...o,...n,ref:t})});vu.displayName=gu;function Ub(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Zb(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Bb(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Wb(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],l=i.x,u=i.y,p=c.x,h=c.y;u>n!=h>n&&r<(p-l)*(n-u)/(h-u)+l&&(o=!o)}return o}function Hb(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Kb(t)}function Kb(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Gb=uu,Jb=du,Yb=fu,Xb=pu,Qb=hu,e_=vu;function t_({delayDuration:e=0,...t}){return d.jsx(Gb,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function yu({...e}){return d.jsx(t_,{children:d.jsx(Jb,{"data-slot":"tooltip",...e})})}function bu({...e}){return d.jsx(Yb,{"data-slot":"tooltip-trigger",...e})}function _u({className:e,sideOffset:t=0,children:r,...n}){return d.jsx(Xb,{children:d.jsxs(Qb,{"data-slot":"tooltip-content",sideOffset:t,className:ge("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,d.jsx(e_,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const r_=({theme:e,readOnly:t,rootType:r,onAddField:n,onOpenSettings:o})=>{const{control:s}=Be();return d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Ce,{value:"root",disabled:!0,className:"w-40"}),d.jsxs(Pr,{disabled:!0,value:r,children:[d.jsx(Ar,{className:"w-40",children:d.jsx(Nr,{})}),d.jsx(Tr,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:d.jsx(Et,{value:r,children:r})})]}),d.jsx(Mt,{control:s,name:"root.title",render:({field:a})=>d.jsx(Ce,{placeholder:"Title",disabled:t,className:"flex-1",...a})}),d.jsx(Mt,{control:s,name:"root.description",render:({field:a})=>d.jsx(Ce,{placeholder:"Description",disabled:t,className:"flex-1",...a})}),d.jsxs(yu,{children:[d.jsx(bu,{asChild:!0,children:d.jsx(Bt,{disabled:!0,size:"icon",children:d.jsx(Fl,{})})}),d.jsx(_u,{children:d.jsx("p",{children:"Required"})})]}),d.jsx("div",{className:"border-l-2 border-input"}),d.jsx(Bt,{size:"icon",variant:"ghost","data-testid":"root-settings-button",onClick:()=>o("root"),children:d.jsx(jl,{className:"text-blue-500"})}),r==="object"&&d.jsx(Bt,{size:"icon",variant:"ghost","data-testid":"root-add-button",disabled:t,onClick:n,children:d.jsx(zl,{className:"text-green-500"})}),d.jsx("div",{})]})},Jn={form:{width:"full",height:"md"},output:{position:"bottom",showJson:!0,width:"full",height:"md"},settings:{width:"md"},spacing:"md"},wu={sm:"max-h-[300px]",md:"max-h-[500px]",lg:"max-h-[800px]",full:"max-h-full"},n_={sm:300,md:500,lg:800,full:void 0},Oa={sm:"w-full max-w-[600px]",md:"w-full max-w-[800px]",lg:"w-full max-w-[1200px]",full:"w-full"},o_={sm:"sm:max-w-[500px]",md:"sm:max-w-[700px]",lg:"sm:max-w-[1000px]",full:"w-full sm:max-w-full"},s_={top:"flex-col-reverse",bottom:"flex-col",left:"flex-row-reverse",right:"flex-row"},$u={sm:"gap-2",md:"gap-4",lg:"gap-6"},a_=["string","integer","number","boolean","object","array"],i_=["int-32","int-64"],c_=["float","double","big-decimal"],l_=["date","date-time","local-date-time","time","duration","email","hostname","ipv4","ipv6","password","html","json","json-path","uri","uri-refrence","uri-template","relative-json-pointer","json-pointer","regex","uuid"];function u_(e){const t=d_(e),r=S.forwardRef((n,o)=>{const{children:s,...a}=n,i=S.Children.toArray(s),c=i.find(p_);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function d_(e){const t=S.forwardRef((r,n)=>{const{children:o,...s}=r;if(S.isValidElement(o)){const a=m_(o),i=h_(s,o.props);return o.type!==S.Fragment&&(i.ref=n?mr(n,a):a),S.cloneElement(o,i)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var f_=Symbol("radix.slottable");function p_(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===f_}function h_(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function m_(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Yn="Dialog",[Su,Eu]=yt(Yn),[g_,pt]=Su(Yn),ku=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=S.useRef(null),c=S.useRef(null),[l,u]=tr({prop:n,defaultProp:o??!1,onChange:s,caller:Yn});return d.jsx(g_,{scope:t,triggerRef:i,contentRef:c,contentId:Vt(),titleId:Vt(),descriptionId:Vt(),open:l,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(p=>!p),[u]),modal:a,children:r})};ku.displayName=Yn;var xu="DialogTrigger",Cu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=pt(xu,r),s=Ne(t,o.triggerRef);return d.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":za(o.open),...n,ref:s,onClick:me(e.onClick,o.onOpenToggle)})});Cu.displayName=xu;var Da="DialogPortal",[v_,Pu]=Su(Da,{forceMount:void 0}),Nu=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,s=pt(Da,t);return d.jsx(v_,{scope:t,forceMount:r,children:S.Children.map(n,a=>d.jsx(Wt,{present:r||s.open,children:d.jsx(Tn,{asChild:!0,container:o,children:a})}))})};Nu.displayName=Da;var Xn="DialogOverlay",Au=S.forwardRef((e,t)=>{const r=Pu(Xn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=pt(Xn,e.__scopeDialog);return s.modal?d.jsx(Wt,{present:n||s.open,children:d.jsx(b_,{...o,ref:t})}):null});Au.displayName=Xn;var y_=u_("DialogOverlay.RemoveScroll"),b_=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=pt(Xn,r);return d.jsx(ma,{as:y_,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(Se.div,{"data-state":za(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),sr="DialogContent",Tu=S.forwardRef((e,t)=>{const r=Pu(sr,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=pt(sr,e.__scopeDialog);return d.jsx(Wt,{present:n||s.open,children:s.modal?d.jsx(__,{...o,ref:t}):d.jsx(w_,{...o,ref:t})})});Tu.displayName=sr;var __=S.forwardRef((e,t)=>{const r=pt(sr,e.__scopeDialog),n=S.useRef(null),o=Ne(t,r.contentRef,n);return S.useEffect(()=>{const s=n.current;if(s)return Hc(s)},[]),d.jsx(Iu,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,s=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:me(e.onFocusOutside,s=>s.preventDefault())})}),w_=S.forwardRef((e,t)=>{const r=pt(sr,e.__scopeDialog),n=S.useRef(!1),o=S.useRef(!1);return d.jsx(Iu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;r.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Iu=S.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=pt(sr,r),c=S.useRef(null),l=Ne(t,c);return tc(),d.jsxs(d.Fragment,{children:[d.jsx(Ks,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:d.jsx(bn,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":za(i.open),...a,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(S_,{titleId:i.titleId}),d.jsx(k_,{contentRef:c,descriptionId:i.descriptionId})]})]})}),Ma="DialogTitle",Ou=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=pt(Ma,r);return d.jsx(Se.h2,{id:o.titleId,...n,ref:t})});Ou.displayName=Ma;var Du="DialogDescription",Mu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=pt(Du,r);return d.jsx(Se.p,{id:o.descriptionId,...n,ref:t})});Mu.displayName=Du;var zu="DialogClose",ju=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=pt(zu,r);return d.jsx(Se.button,{type:"button",...n,ref:t,onClick:me(e.onClick,()=>o.onOpenChange(!1))})});ju.displayName=zu;function za(e){return e?"open":"closed"}var Fu="DialogTitleWarning",[$_,Vu]=Jh(Fu,{contentName:sr,titleName:Ma,docsSlug:"dialog"}),S_=({titleId:e})=>{const t=Vu(Fu),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
128
42
|
|
|
129
43
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
130
44
|
|
|
131
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},E_="DialogDescriptionWarning",k_=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vu(E_).contentName}}.`;return S.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Lu=ku,x_=Cu,Ru=Nu,qu=Au,Uu=Tu,Zu=Ou,C_=Mu,ja=ju,P_=Symbol("radix.slottable");function N_(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=P_,t}var Bu="AlertDialog",[A_]=yt(Bu,[Eu]),Tt=Eu(),Wu=e=>{const{__scopeAlertDialog:t,...r}=e,n=Tt(t);return d.jsx(Lu,{...n,...r,modal:!0})};Wu.displayName=Bu;var T_="AlertDialogTrigger",Hu=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Tt(r);return d.jsx(x_,{...o,...n,ref:t})});Hu.displayName=T_;var I_="AlertDialogPortal",Ku=e=>{const{__scopeAlertDialog:t,...r}=e,n=Tt(t);return d.jsx(Ru,{...n,...r})};Ku.displayName=I_;var O_="AlertDialogOverlay",Gu=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Tt(r);return d.jsx(qu,{...o,...n,ref:t})});Gu.displayName=O_;var Or="AlertDialogContent",[D_,M_]=A_(Or),z_=N_("AlertDialogContent"),Ju=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,s=Tt(r),a=S.useRef(null),i=Ne(t,a),c=S.useRef(null);return d.jsx($_,{contentName:Or,titleName:Yu,docsSlug:"alert-dialog",children:d.jsx(D_,{scope:r,cancelRef:c,children:d.jsxs(Uu,{role:"alertdialog",...s,...o,ref:i,onOpenAutoFocus:me(o.onOpenAutoFocus,l=>{l.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[d.jsx(z_,{children:n}),d.jsx(F_,{contentRef:a})]})})})});Ju.displayName=Or;var Yu="AlertDialogTitle",Xu=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Tt(r);return d.jsx(Zu,{...o,...n,ref:t})});Xu.displayName=Yu;var Qu="AlertDialogDescription",ed=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Tt(r);return d.jsx(C_,{...o,...n,ref:t})});ed.displayName=Qu;var j_="AlertDialogAction",td=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Tt(r);return d.jsx(ja,{...o,...n,ref:t})});td.displayName=j_;var rd="AlertDialogCancel",nd=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=M_(rd,r),s=Tt(r),a=Ne(t,o);return d.jsx(ja,{...s,...n,ref:a})});nd.displayName=rd;var F_=({contentRef:e})=>{const t=`\`${Or}\` requires a description for the component to be accessible for screen reader users.
|
|
132
46
|
|
|
133
|
-
You can add a description to the \`${
|
|
47
|
+
You can add a description to the \`${Or}\` by passing a \`${Qu}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
134
48
|
|
|
135
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${
|
|
49
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Or}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
136
50
|
|
|
137
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return S.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},C_=Qu,j_=ed,N_=td,R_=rd,A_=nd,P_=cd,T_=ud,O_=od,I_=id;function D_({...e}){return d.jsx(C_,{"data-slot":"alert-dialog",...e})}function M_({...e}){return d.jsx(j_,{"data-slot":"alert-dialog-trigger",...e})}function V_({...e}){return d.jsx(N_,{"data-slot":"alert-dialog-portal",...e})}function F_({className:e,...t}){return d.jsx(R_,{"data-slot":"alert-dialog-overlay",className:_e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function L_({className:e,...t}){return d.jsxs(V_,{children:[d.jsx(F_,{}),d.jsx(A_,{"data-slot":"alert-dialog-content",className:_e("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function z_({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-header",className:_e("flex flex-col gap-2 text-center sm:text-left",e),...t})}function q_({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-footer",className:_e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function U_({className:e,...t}){return d.jsx(O_,{"data-slot":"alert-dialog-title",className:_e("text-lg font-semibold",e),...t})}function B_({className:e,...t}){return d.jsx(I_,{"data-slot":"alert-dialog-description",className:_e("text-muted-foreground text-sm",e),...t})}function W_({className:e,...t}){return d.jsx(P_,{className:_e(Ta(),e),...t})}function H_({className:e,...t}){return d.jsx(T_,{className:_e(Ta({variant:"outline"}),e),...t})}const G_=({theme:e,readOnly:t,control:r,fieldPath:n,isSimpleType:s,isRootLevel:o,onRemove:a,onOpenSettings:i,onTypeChange:c})=>{const l=tn({control:r,name:`${n}.key`});return d.jsxs("div",{className:"p-2 flex gap-2","data-testid":"field",children:[s&&d.jsx(qt,{control:r,name:`${n}.key`,render:({field:u})=>d.jsx(Te,{placeholder:"field_name",disabled:t,className:"w-40",...u})}),d.jsx(qt,{control:r,name:`${n}.schema.type`,render:({field:u})=>d.jsxs(Or,{disabled:t,onValueChange:h=>{u.onChange(h),c(h)},value:u.value,children:[d.jsx(Dr,{className:"w-40",children:d.jsx(Ir,{})}),d.jsx(Mr,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:Zb.map(h=>d.jsx(Ct,{value:h,children:h},h))})]})}),d.jsx(qt,{control:r,name:`${n}.schema.title`,render:({field:u})=>d.jsx(Te,{placeholder:"Title",disabled:t,className:"flex-1",...u})}),d.jsx(qt,{control:r,name:`${n}.schema.description`,render:({field:u})=>d.jsx(Te,{placeholder:"Description",disabled:t,className:"flex-1",...u})}),s&&d.jsxs("div",{className:"flex gap-2",children:[d.jsx(qt,{control:r,name:`${n}.isRequired`,render:({field:u})=>d.jsxs(Eu,{children:[d.jsx(ku,{asChild:!0,children:d.jsx(Xt,{"data-testid":"required",disabled:t,size:"icon",variant:u.value?"default":"outline",onClick:()=>{u.onChange(!u.value)},children:d.jsx(Wl,{})})}),d.jsx(Cu,{children:d.jsx("p",{children:"Required"})})]})}),d.jsx("div",{className:"border-l-2 border-input"})]}),d.jsx(Xt,{size:"icon",variant:"ghost",onClick:()=>i(`${n}.schema`),children:d.jsx(Bl,{className:"text-blue-500"})}),o&&d.jsxs(D_,{children:[d.jsx(M_,{asChild:!0,children:d.jsx(Xt,{size:"icon",variant:"ghost","data-testid":"delete-button",disabled:t,children:d.jsx(_y,{className:"text-red-500"})})}),d.jsxs(L_,{className:_e("border-input",e),children:[d.jsxs(z_,{children:[d.jsx(U_,{className:"text-foreground",children:"Are you absolutely sure?"}),d.jsxs(B_,{children:["This action cannot be undone. This will permanently delete field"," ",l,"."]})]}),d.jsxs(q_,{children:[d.jsx(H_,{className:"text-foreground",children:"Cancel"}),d.jsx(W_,{onClick:a,children:"Delete"})]})]})]})]})},ds=({theme:e,readOnly:t,fieldPath:r,onRemove:n,onOpenSettings:s,isSimpleType:o=!0,isRootLevel:a=!1})=>{const{control:i,setValue:c}=Ze(),l=tn({control:i,name:`${r}.schema.type`}),{fields:u,append:h,remove:p}=Qi({control:i,name:`${r}.schema.properties`}),v=()=>{const y=nn(6);h({id:y,key:`field_${y}`,isRequired:!1,schema:{type:"string"}})},w=y=>{let m={};y==="object"?m={type:"object",properties:[],additionalProperties:!0}:y==="array"?m={type:"array"}:m={type:y},c(`${r}.schema`,m)};return d.jsxs("div",{children:[d.jsx(G_,{theme:e,readOnly:t,control:i,fieldPath:r,isSimpleType:o,isRootLevel:a,onRemove:n,onOpenSettings:s,onTypeChange:w}),l==="object"&&d.jsxs("div",{className:"ml-2 pl-2 border-l-2 border-input",children:[u.map((y,m)=>d.jsx(ds,{readOnly:t,theme:e,fieldPath:`${r}.schema.properties.${m}`,onRemove:()=>p(m),onOpenSettings:s,isRootLevel:!0},y.id)),d.jsxs(Xt,{disabled:t,size:"sm",variant:"outline",onClick:v,className:"ml-2 mt-2 mb-4 flex gap-2 text-green-500",children:[d.jsx(Ul,{})," Add Field"]})]}),l==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input mr-11","data-testid":"field-array",children:d.jsx(ds,{theme:e,readOnly:t,fieldPath:`${r}.schema.items`,onRemove:()=>{},onOpenSettings:s,isSimpleType:!1})})]},`${r}-${l}`)};function Z_({theme:e,readOnly:t,fields:r,onRemove:n,onOpenSettings:s}){return d.jsx("div",{className:"pl-2 border-l-2 border-input",children:r.map((o,a)=>d.jsx(ds,{readOnly:t,theme:e,fieldPath:`properties.${a}`,onRemove:()=>n(a),onOpenSettings:s,isRootLevel:!0},o.fieldId))})}var K_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Y_=K_.reduce((e,t)=>{const r=Aa(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),J_="Label",dd=S.forwardRef((e,t)=>d.jsx(Y_.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));dd.displayName=J_;var X_=dd;function Q_({className:e,...t}){return d.jsx(X_,{"data-slot":"label",className:_e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const fd=Z.createContext({}),Ne=({...e})=>d.jsx(fd.Provider,{value:{name:e.name},children:d.jsx(qt,{...e})}),Ua=()=>{const e=Z.useContext(fd),t=Z.useContext(md),{getFieldState:r}=Ze(),n=Di({name:e.name}),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},md=Z.createContext({});function xe({className:e,...t}){const r=Z.useId();return d.jsx(md.Provider,{value:{id:r},children:d.jsx("div",{"data-slot":"form-item",className:_e("grid gap-2",e),...t})})}function we({className:e,...t}){const{error:r,formItemId:n}=Ua();return d.jsx(Q_,{"data-slot":"form-label","data-error":!!r,className:_e("data-[error=true]:text-destructive",e),htmlFor:n,...t})}function ke({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:s}=Ua();return d.jsx(Pa,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${s}`:`${n}`,"aria-invalid":!!t,...e})}function Ce({className:e,...t}){const{error:r,formMessageId:n}=Ua(),s=r?String((r==null?void 0:r.message)??""):t.children;return s?d.jsx("p",{"data-slot":"form-message",id:n,className:_e("text-destructive text-sm",e),...t,children:s}):null}var fs="Checkbox",[e0]=xt(fs),[t0,Ba]=e0(fs);function r0(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:o,form:a,name:i,onCheckedChange:c,required:l,value:u="on",internal_do_not_use_render:h}=e,[p,v]=cr({prop:r,defaultProp:s??!1,onChange:c,caller:fs}),[w,y]=S.useState(null),[m,_]=S.useState(null),f=S.useRef(!1),b=w?!!a||!!w.closest("form"):!0,x={checked:p,disabled:o,setChecked:v,control:w,setControl:y,name:i,form:a,value:u,hasConsumerStoppedPropagationRef:f,required:l,defaultChecked:er(s)?!1:s,isFormControl:b,bubbleInput:m,setBubbleInput:_};return d.jsx(t0,{scope:t,...x,children:n0(h)?h(x):n})}var hd="CheckboxTrigger",pd=S.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:o,value:a,disabled:i,checked:c,required:l,setControl:u,setChecked:h,hasConsumerStoppedPropagationRef:p,isFormControl:v,bubbleInput:w}=Ba(hd,e),y=De(s,u),m=S.useRef(c);return S.useEffect(()=>{const _=o==null?void 0:o.form;if(_){const f=()=>h(m.current);return _.addEventListener("reset",f),()=>_.removeEventListener("reset",f)}},[o,h]),d.jsx(je.button,{type:"button",role:"checkbox","aria-checked":er(c)?"mixed":c,"aria-required":l,"data-state":xd(c),"data-disabled":i?"":void 0,disabled:i,value:a,...n,ref:y,onKeyDown:be(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:be(r,_=>{h(f=>er(f)?!0:!f),w&&v&&(p.current=_.isPropagationStopped(),p.current||_.stopPropagation())})})});pd.displayName=hd;var gd=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:o,required:a,disabled:i,value:c,onCheckedChange:l,form:u,...h}=e;return d.jsx(r0,{__scopeCheckbox:r,checked:s,defaultChecked:o,disabled:i,required:a,onCheckedChange:l,name:n,form:u,value:c,internal_do_not_use_render:({isFormControl:p})=>d.jsxs(d.Fragment,{children:[d.jsx(pd,{...h,ref:t,__scopeCheckbox:r}),p&&d.jsx(_d,{__scopeCheckbox:r})]})})});gd.displayName=fs;var vd="CheckboxIndicator",yd=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,o=Ba(vd,r);return d.jsx(Qt,{present:n||er(o.checked)||o.checked===!0,children:d.jsx(je.span,{"data-state":xd(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});yd.displayName=vd;var bd="CheckboxBubbleInput",_d=S.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:a,required:i,disabled:c,name:l,value:u,form:h,bubbleInput:p,setBubbleInput:v}=Ba(bd,e),w=De(r,v),y=ha(o),m=da(n);S.useEffect(()=>{const f=p;if(!f)return;const b=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(b,"checked").set,$=!s.current;if(y!==o&&g){const E=new Event("click",{bubbles:$});f.indeterminate=er(o),g.call(f,er(o)?!1:o),f.dispatchEvent(E)}},[p,y,o,s]);const _=S.useRef(er(o)?!1:o);return d.jsx(je.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??_.current,required:i,disabled:c,name:l,value:u,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});_d.displayName=bd;function n0(e){return typeof e=="function"}function er(e){return e==="indeterminate"}function xd(e){return er(e)?"indeterminate":e?"checked":"unchecked"}function ms({className:e,...t}){return d.jsx(gd,{"data-slot":"checkbox",className:_e("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(yd,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:d.jsx(zl,{className:"size-3.5"})})})}const s0=pu("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function wd({className:e,variant:t,asChild:r=!1,...n}){const s=r?Pa:"span";return d.jsx(s,{"data-slot":"badge",className:_e(s0({variant:t}),e),...n})}const o0=/[\n#?=&\t,./-]+/,a0=/^[^a-zA-Z0-9]*|[^a-zA-Z0-9]*$/g,i0=Z.createContext(null),fn=Z.forwardRef(({children:e,value:t,onValueChange:r,placeholder:n,maxItems:s,minItems:o,className:a,disabled:i=!1,dir:c,...l},u)=>{const[h,p]=Z.useState(-1),[v,w]=Z.useState(""),[y,m]=Z.useState(i),[_,f]=Z.useState(i),[b,x]=Z.useState(!1),[g,$]=Z.useState(""),E=o??0,j=s??1/0,I=Z.useCallback(K=>{!t.includes(K)&&t.length<j&&r([...t,K])},[t]),U=Z.useCallback(K=>{t.includes(K)&&t.length>E&&r(t.filter(se=>se!==K))},[t]),D=Z.useCallback(K=>{K.preventDefault();const se=K.clipboardData.getData("text").split(o0),L=[...t];se.forEach(he=>{const H=he.replaceAll(a0,"").trim();H.length>0&&!L.includes(H)&&L.length<j&&L.push(H)}),r(L),w("")},[t]),V=Z.useCallback(K=>{const se=K.currentTarget,L=se.value.substring(se.selectionStart??0,se.selectionEnd??0);$(L),x(L===v)},[v]);Z.useEffect(()=>{(()=>{i==!1&&(t.length-1>=E?f(!1):f(!0),t.length+1<=j?m(!1):m(!0))})()},[t]);const q=Z.useCallback(async K=>{K.stopPropagation();const se=()=>{const C=h+1>t.length-1?-1:h+1;p(C)},L=()=>{const C=h-1<0?t.length-1:h-1;p(C)},he=()=>{const C=h-1<=0?t.length-1===0?-1:0:h-1;p(C)},H=K.currentTarget;switch(K.key){case"ArrowLeft":c==="rtl"?t.length>0&&h!==-1&&se():t.length>0&&H.selectionStart===0&&L();break;case"ArrowRight":c==="rtl"?t.length>0&&H.selectionStart===0&&L():t.length>0&&h!==-1&&se();break;case"Backspace":case"Delete":t.length>0&&(h!==-1&&h<t.length?(U(t[h]),he()):H.selectionStart===0&&(g===v||b)&&U(t[t.length-1]));break;case"Escape":const C=h===-1?t.length-1:-1;p(C);break;case"Enter":v.trim()!==""&&(K.preventDefault(),I(v),w(""));break}},[h,t,v,U]),W=Z.useCallback(K=>{K.preventDefault(),K.stopPropagation()},[]),ee=Z.useCallback(K=>{w(K.currentTarget.value)},[]);return d.jsx(i0.Provider,{value:{value:t,onValueChange:r,inputValue:v,setInputValue:w,activeIndex:h,setActiveIndex:p},children:d.jsxs("div",{...l,ref:u,dir:c,className:_e("flex items-center flex-wrap gap-1 rounded-lg bg-background overflow-hidden",{"focus-within:ring-ring":h===-1},a),children:[t.map((K,se)=>d.jsxs(wd,{tabIndex:h!==-1?0:h,"aria-disabled":_,"data-active":h===se,className:_e("relative px-1 rounded flex items-center gap-1 data-[active='true']:ring-2 data-[active='true']:ring-muted-foreground truncate aria-disabled:opacity-50 aria-disabled:cursor-not-allowed"),variant:"secondary",children:[d.jsx("span",{className:"text-xs",children:K}),d.jsxs("button",{type:"button","aria-label":`Remove ${K} option`,"aria-roledescription":"button to remove option",disabled:_,onMouseDown:W,onClick:()=>U(K),className:"disabled:cursor-not-allowed",children:[d.jsxs("span",{className:"sr-only",children:["Remove ",K," option"]}),d.jsx(Hl,{className:"h-4 w-4 hover:stroke-destructive"})]})]},K)),d.jsx(Te,{tabIndex:0,"aria-label":"input tag",disabled:y,onKeyDown:q,onPaste:D,value:v,onSelect:V,onChange:h===-1?ee:void 0,placeholder:n,onClick:()=>p(-1),className:_e("border border-input h-9 min-w-fit flex-1 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0 placeholder:text-muted-foreground px-2",h!==-1&&"caret-transparent")})]})})});fn.displayName="TagsInput";const c0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=Ze(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Default Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Minimum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Maximum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Multiple Of"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Format"}),d.jsx(ke,{children:d.jsxs(Or,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"Choose data type"})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"none",children:"none"}),Yb.map(i=>d.jsx(Ct,{value:i,children:i},i))]})]})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(we,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ce,{})]})}),o&&d.jsx(Ne,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Enum Values"}),d.jsx(ke,{children:d.jsx(fn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ce,{})]})})]})},l0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=Ze(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Default Value"}),d.jsx(ke,{children:d.jsx(Te,{disabled:r,...a})}),d.jsx(Ce,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:n,name:`${t}.minLength`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Length"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.maxLength`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Length"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:n,name:`${t}.pattern`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Pattern (Regular Expression)"}),d.jsx(ke,{children:d.jsx(Te,{disabled:r,...a})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Format"}),d.jsxs(Or,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(ke,{children:d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"Choose data type"})})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"none",children:"none"}),Jb.map(i=>d.jsx(Ct,{value:i,children:i},i))]})]}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(we,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ce,{})]})}),o&&d.jsx(Ne,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Enum Values"}),d.jsx(ke,{children:d.jsx(fn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ce,{})]})})]})},u0=({theme:e,basePath:t,readOnly:r})=>{const{control:n}=Ze();return d.jsx("form",{children:d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:s})=>d.jsxs(xe,{className:"flex gap-2",children:[d.jsx(we,{children:"Default Value"}),d.jsxs(Or,{onValueChange:s.onChange,defaultValue:s.value,disabled:r,children:[d.jsx(ke,{children:d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"False"})})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"true","data-testid":"true",children:"True"}),d.jsx(Ct,{value:"false",children:"False"})]})]}),d.jsx(Ce,{})]})})})},d0=({basePath:e,readOnly:t})=>{const{control:r}=Ze();return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:r,name:`${e}.minItems`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Items"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}.maxItems`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Items"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ne,{control:r,name:`${e}.minContains`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Contains"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}.maxContains`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Contains"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:r,name:`${e}.uniqueItems`,render:({field:n})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{checked:n.value,onCheckedChange:n.onChange,disabled:t})}),d.jsx(we,{className:"ml-2",children:"Unique Items"}),d.jsx(Ce,{})]})})]})},f0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=Ze(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Default Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Minimum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Maximum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Multiple Of"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Format"}),d.jsx(ke,{children:d.jsxs(Or,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"Choose data type"})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"none",children:"none"}),Kb.map(i=>d.jsx(Ct,{value:i,children:i},i))]})]})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange,defaultValue:0})}),d.jsx(we,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ce,{})]})}),o&&d.jsx(Ne,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Enum Values"}),d.jsx(ke,{children:d.jsx(fn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ce,{})]})})]})};var hs={exports:{}},Wa={},Dt={},mr={},Ha={},Ga={},Za={},$d;function ps(){return $d||($d=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((b,x)=>`${b}${x}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((b,x)=>(x instanceof r&&(b[x.str]=(b[x.str]||0)+1),b),{})}}e._Code=n,e.nil=new n("");function s(_,...f){const b=[_[0]];let x=0;for(;x<f.length;)i(b,f[x]),b.push(_[++x]);return new n(b)}e._=s;const o=new n("+");function a(_,...f){const b=[v(_[0])];let x=0;for(;x<f.length;)b.push(o),i(b,f[x]),b.push(o,v(_[++x]));return c(b),new n(b)}e.str=a;function i(_,f){f instanceof n?_.push(...f._items):f instanceof r?_.push(f):_.push(h(f))}e.addCodeArg=i;function c(_){let f=1;for(;f<_.length-1;){if(_[f]===o){const b=l(_[f-1],_[f+1]);if(b!==void 0){_.splice(f-1,3,b);continue}_[f++]="+"}f++}}function l(_,f){if(f==='""')return _;if(_==='""')return f;if(typeof _=="string")return f instanceof r||_[_.length-1]!=='"'?void 0:typeof f!="string"?`${_.slice(0,-1)}${f}"`:f[0]==='"'?_.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(_ instanceof r))return`"${_}${f.slice(1)}`}function u(_,f){return f.emptyStr()?_:_.emptyStr()?f:a`${_}${f}`}e.strConcat=u;function h(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:v(Array.isArray(_)?_.join(","):_)}function p(_){return new n(v(_))}e.stringify=p;function v(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function w(_){return typeof _=="string"&&e.IDENTIFIER.test(_)?new n(`.${_}`):s`[${_}]`}e.getProperty=w;function y(_){if(typeof _=="string"&&e.IDENTIFIER.test(_))return new n(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}e.getEsmExportName=y;function m(_){return new n(_.toString())}e.regexpCode=m})(Za)),Za}var Ka={},Sd;function Ed(){return Sd||(Sd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=ps();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,h;if(!((h=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||h===void 0)&&h.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=s;class o extends t.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:h}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(u)}[${h}]`}}e.ValueScopeName=o;const a=(0,t._)`\n`;class i extends s{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new o(l,this._newName(l))}value(l,u){var h;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const p=this.toName(l),{prefix:v}=p,w=(h=u.key)!==null&&h!==void 0?h:u.ref;let y=this._values[v];if(y){const f=y.get(w);if(f)return f}else y=this._values[v]=new Map;y.set(w,p);const m=this._scope[v]||(this._scope[v]=[]),_=m.length;return m[_]=u.ref,p.setValue(u,{property:v,itemIndex:_}),p}getValue(l,u){const h=this._values[l];if(h)return h.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${l}${h.scopePath}`})}scopeCode(l=this._values,u,h){return this._reduceValues(l,p=>{if(p.value===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return p.value.code},u,h)}_reduceValues(l,u,h={},p){let v=t.nil;for(const w in l){const y=l[w];if(!y)continue;const m=h[w]=h[w]||new Map;y.forEach(_=>{if(m.has(_))return;m.set(_,n.Started);let f=u(_);if(f){const b=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${b} ${_} = ${f};${this.opts._n}`}else if(f=p==null?void 0:p(_))v=(0,t._)`${v}${f}${this.opts._n}`;else throw new r(_);m.set(_,n.Completed)})}return v}}e.ValueScope=i})(Ka)),Ka}var kd;function ye(){return kd||(kd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=ps(),r=Ed();var n=ps();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Ed();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(k,N){return this}}class a extends o{constructor(k,N,z){super(),this.varKind=k,this.name=N,this.rhs=z}render({es5:k,_n:N}){const z=k?r.varKinds.var:this.varKind,F=this.rhs===void 0?"":` = ${this.rhs}`;return`${z} ${this.name}${F};`+N}optimizeNames(k,N){if(k[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,k,N)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends o{constructor(k,N,z){super(),this.lhs=k,this.rhs=N,this.sideEffects=z}render({_n:k}){return`${this.lhs} = ${this.rhs};`+k}optimizeNames(k,N){if(!(this.lhs instanceof t.Name&&!k[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,k,N),this}get names(){const k=this.lhs instanceof t.Name?{}:{...this.lhs.names};return q(k,this.rhs)}}class c extends i{constructor(k,N,z,F){super(k,z,F),this.op=N}render({_n:k}){return`${this.lhs} ${this.op}= ${this.rhs};`+k}}class l extends o{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`${this.label}:`+k}}class u extends o{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`break${this.label?` ${this.label}`:""};`+k}}class h extends o{constructor(k){super(),this.error=k}render({_n:k}){return`throw ${this.error};`+k}get names(){return this.error.names}}class p extends o{constructor(k){super(),this.code=k}render({_n:k}){return`${this.code};`+k}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(k,N){return this.code=W(this.code,k,N),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends o{constructor(k=[]){super(),this.nodes=k}render(k){return this.nodes.reduce((N,z)=>N+z.render(k),"")}optimizeNodes(){const{nodes:k}=this;let N=k.length;for(;N--;){const z=k[N].optimizeNodes();Array.isArray(z)?k.splice(N,1,...z):z?k[N]=z:k.splice(N,1)}return k.length>0?this:void 0}optimizeNames(k,N){const{nodes:z}=this;let F=z.length;for(;F--;){const Y=z[F];Y.optimizeNames(k,N)||(ee(k,Y.names),z.splice(F,1))}return z.length>0?this:void 0}get names(){return this.nodes.reduce((k,N)=>V(k,N.names),{})}}class w extends v{render(k){return"{"+k._n+super.render(k)+"}"+k._n}}class y extends v{}class m extends w{}m.kind="else";class _ extends w{constructor(k,N){super(N),this.condition=k}render(k){let N=`if(${this.condition})`+super.render(k);return this.else&&(N+="else "+this.else.render(k)),N}optimizeNodes(){super.optimizeNodes();const k=this.condition;if(k===!0)return this.nodes;let N=this.else;if(N){const z=N.optimizeNodes();N=this.else=Array.isArray(z)?new m(z):z}if(N)return k===!1?N instanceof _?N:N.nodes:this.nodes.length?this:new _(K(k),N instanceof _?[N]:N.nodes);if(!(k===!1||!this.nodes.length))return this}optimizeNames(k,N){var z;if(this.else=(z=this.else)===null||z===void 0?void 0:z.optimizeNames(k,N),!!(super.optimizeNames(k,N)||this.else))return this.condition=W(this.condition,k,N),this}get names(){const k=super.names;return q(k,this.condition),this.else&&V(k,this.else.names),k}}_.kind="if";class f extends w{}f.kind="for";class b extends f{constructor(k){super(),this.iteration=k}render(k){return`for(${this.iteration})`+super.render(k)}optimizeNames(k,N){if(super.optimizeNames(k,N))return this.iteration=W(this.iteration,k,N),this}get names(){return V(super.names,this.iteration.names)}}class x extends f{constructor(k,N,z,F){super(),this.varKind=k,this.name=N,this.from=z,this.to=F}render(k){const N=k.es5?r.varKinds.var:this.varKind,{name:z,from:F,to:Y}=this;return`for(${N} ${z}=${F}; ${z}<${Y}; ${z}++)`+super.render(k)}get names(){const k=q(super.names,this.from);return q(k,this.to)}}class g extends f{constructor(k,N,z,F){super(),this.loop=k,this.varKind=N,this.name=z,this.iterable=F}render(k){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(k)}optimizeNames(k,N){if(super.optimizeNames(k,N))return this.iterable=W(this.iterable,k,N),this}get names(){return V(super.names,this.iterable.names)}}class $ extends w{constructor(k,N,z){super(),this.name=k,this.args=N,this.async=z}render(k){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(k)}}$.kind="func";class E extends v{render(k){return"return "+super.render(k)}}E.kind="return";class j extends w{render(k){let N="try"+super.render(k);return this.catch&&(N+=this.catch.render(k)),this.finally&&(N+=this.finally.render(k)),N}optimizeNodes(){var k,N;return super.optimizeNodes(),(k=this.catch)===null||k===void 0||k.optimizeNodes(),(N=this.finally)===null||N===void 0||N.optimizeNodes(),this}optimizeNames(k,N){var z,F;return super.optimizeNames(k,N),(z=this.catch)===null||z===void 0||z.optimizeNames(k,N),(F=this.finally)===null||F===void 0||F.optimizeNames(k,N),this}get names(){const k=super.names;return this.catch&&V(k,this.catch.names),this.finally&&V(k,this.finally.names),k}}class I extends w{constructor(k){super(),this.error=k}render(k){return`catch(${this.error})`+super.render(k)}}I.kind="catch";class U extends w{render(k){return"finally"+super.render(k)}}U.kind="finally";class D{constructor(k,N={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...N,_n:N.lines?`
|
|
138
|
-
`:""},this._extScope=k,this._scope=new r.Scope({parent:k}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(k){return this._scope.name(k)}scopeName(k){return this._extScope.name(k)}scopeValue(k,N){const z=this._extScope.value(k,N);return(this._values[z.prefix]||(this._values[z.prefix]=new Set)).add(z),z}getScopeValue(k,N){return this._extScope.getValue(k,N)}scopeRefs(k){return this._extScope.scopeRefs(k,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(k,N,z,F){const Y=this._scope.toName(N);return z!==void 0&&F&&(this._constants[Y.str]=z),this._leafNode(new a(k,Y,z)),Y}const(k,N,z){return this._def(r.varKinds.const,k,N,z)}let(k,N,z){return this._def(r.varKinds.let,k,N,z)}var(k,N,z){return this._def(r.varKinds.var,k,N,z)}assign(k,N,z){return this._leafNode(new i(k,N,z))}add(k,N){return this._leafNode(new c(k,e.operators.ADD,N))}code(k){return typeof k=="function"?k():k!==t.nil&&this._leafNode(new p(k)),this}object(...k){const N=["{"];for(const[z,F]of k)N.length>1&&N.push(","),N.push(z),(z!==F||this.opts.es5)&&(N.push(":"),(0,t.addCodeArg)(N,F));return N.push("}"),new t._Code(N)}if(k,N,z){if(this._blockNode(new _(k)),N&&z)this.code(N).else().code(z).endIf();else if(N)this.code(N).endIf();else if(z)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(k){return this._elseNode(new _(k))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(_,m)}_for(k,N){return this._blockNode(k),N&&this.code(N).endFor(),this}for(k,N){return this._for(new b(k),N)}forRange(k,N,z,F,Y=this.opts.es5?r.varKinds.var:r.varKinds.let){const de=this._scope.toName(k);return this._for(new x(Y,de,N,z),()=>F(de))}forOf(k,N,z,F=r.varKinds.const){const Y=this._scope.toName(k);if(this.opts.es5){const de=N instanceof t.Name?N:this.var("_arr",N);return this.forRange("_i",0,(0,t._)`${de}.length`,oe=>{this.var(Y,(0,t._)`${de}[${oe}]`),z(Y)})}return this._for(new g("of",F,Y,N),()=>z(Y))}forIn(k,N,z,F=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(k,(0,t._)`Object.keys(${N})`,z);const Y=this._scope.toName(k);return this._for(new g("in",F,Y,N),()=>z(Y))}endFor(){return this._endBlockNode(f)}label(k){return this._leafNode(new l(k))}break(k){return this._leafNode(new u(k))}return(k){const N=new E;if(this._blockNode(N),this.code(k),N.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(k,N,z){if(!N&&!z)throw new Error('CodeGen: "try" without "catch" and "finally"');const F=new j;if(this._blockNode(F),this.code(k),N){const Y=this.name("e");this._currNode=F.catch=new I(Y),N(Y)}return z&&(this._currNode=F.finally=new U,this.code(z)),this._endBlockNode(I,U)}throw(k){return this._leafNode(new h(k))}block(k,N){return this._blockStarts.push(this._nodes.length),k&&this.code(k).endBlock(N),this}endBlock(k){const N=this._blockStarts.pop();if(N===void 0)throw new Error("CodeGen: not in self-balancing block");const z=this._nodes.length-N;if(z<0||k!==void 0&&z!==k)throw new Error(`CodeGen: wrong number of nodes: ${z} vs ${k} expected`);return this._nodes.length=N,this}func(k,N=t.nil,z,F){return this._blockNode(new $(k,N,z)),F&&this.code(F).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(k=1){for(;k-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(k){return this._currNode.nodes.push(k),this}_blockNode(k){this._currNode.nodes.push(k),this._nodes.push(k)}_endBlockNode(k,N){const z=this._currNode;if(z instanceof k||N&&z instanceof N)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${N?`${k.kind}/${N.kind}`:k.kind}"`)}_elseNode(k){const N=this._currNode;if(!(N instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=N.else=k,this}get _root(){return this._nodes[0]}get _currNode(){const k=this._nodes;return k[k.length-1]}set _currNode(k){const N=this._nodes;N[N.length-1]=k}}e.CodeGen=D;function V(P,k){for(const N in k)P[N]=(P[N]||0)+(k[N]||0);return P}function q(P,k){return k instanceof t._CodeOrName?V(P,k.names):P}function W(P,k,N){if(P instanceof t.Name)return z(P);if(!F(P))return P;return new t._Code(P._items.reduce((Y,de)=>(de instanceof t.Name&&(de=z(de)),de instanceof t._Code?Y.push(...de._items):Y.push(de),Y),[]));function z(Y){const de=N[Y.str];return de===void 0||k[Y.str]!==1?Y:(delete k[Y.str],de)}function F(Y){return Y instanceof t._Code&&Y._items.some(de=>de instanceof t.Name&&k[de.str]===1&&N[de.str]!==void 0)}}function ee(P,k){for(const N in k)P[N]=(P[N]||0)-(k[N]||0)}function K(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${M(P)}`}e.not=K;const se=C(e.operators.AND);function L(...P){return P.reduce(se)}e.and=L;const he=C(e.operators.OR);function H(...P){return P.reduce(he)}e.or=H;function C(P){return(k,N)=>k===t.nil?N:N===t.nil?k:(0,t._)`${M(k)} ${P} ${M(N)}`}function M(P){return P instanceof t.Name?P:(0,t._)`(${P})`}})(Ga)),Ga}var Ee={},Cd;function Re(){if(Cd)return Ee;Cd=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.checkStrictMode=Ee.getErrorPath=Ee.Type=Ee.useFunc=Ee.setEvaluated=Ee.evaluatedPropsToName=Ee.mergeEvaluated=Ee.eachItem=Ee.unescapeJsonPointer=Ee.escapeJsonPointer=Ee.escapeFragment=Ee.unescapeFragment=Ee.schemaRefOrVal=Ee.schemaHasRulesButRef=Ee.schemaHasRules=Ee.checkUnknownRules=Ee.alwaysValidSchema=Ee.toHash=void 0;const e=ye(),t=ps();function r(g){const $={};for(const E of g)$[E]=!0;return $}Ee.toHash=r;function n(g,$){return typeof $=="boolean"?$:Object.keys($).length===0?!0:(s(g,$),!o($,g.self.RULES.all))}Ee.alwaysValidSchema=n;function s(g,$=g.schema){const{opts:E,self:j}=g;if(!E.strictSchema||typeof $=="boolean")return;const I=j.RULES.keywords;for(const U in $)I[U]||x(g,`unknown keyword: "${U}"`)}Ee.checkUnknownRules=s;function o(g,$){if(typeof g=="boolean")return!g;for(const E in g)if($[E])return!0;return!1}Ee.schemaHasRules=o;function a(g,$){if(typeof g=="boolean")return!g;for(const E in g)if(E!=="$ref"&&$.all[E])return!0;return!1}Ee.schemaHasRulesButRef=a;function i({topSchemaRef:g,schemaPath:$},E,j,I){if(!I){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${g}${$}${(0,e.getProperty)(j)}`}Ee.schemaRefOrVal=i;function c(g){return h(decodeURIComponent(g))}Ee.unescapeFragment=c;function l(g){return encodeURIComponent(u(g))}Ee.escapeFragment=l;function u(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}Ee.escapeJsonPointer=u;function h(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}Ee.unescapeJsonPointer=h;function p(g,$){if(Array.isArray(g))for(const E of g)$(E);else $(g)}Ee.eachItem=p;function v({mergeNames:g,mergeToName:$,mergeValues:E,resultToName:j}){return(I,U,D,V)=>{const q=D===void 0?U:D instanceof e.Name?(U instanceof e.Name?g(I,U,D):$(I,U,D),D):U instanceof e.Name?($(I,D,U),U):E(U,D);return V===e.Name&&!(q instanceof e.Name)?j(I,q):q}}Ee.mergeEvaluated={props:v({mergeNames:(g,$,E)=>g.if((0,e._)`${E} !== true && ${$} !== undefined`,()=>{g.if((0,e._)`${$} === true`,()=>g.assign(E,!0),()=>g.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${$})`))}),mergeToName:(g,$,E)=>g.if((0,e._)`${E} !== true`,()=>{$===!0?g.assign(E,!0):(g.assign(E,(0,e._)`${E} || {}`),y(g,E,$))}),mergeValues:(g,$)=>g===!0?!0:{...g,...$},resultToName:w}),items:v({mergeNames:(g,$,E)=>g.if((0,e._)`${E} !== true && ${$} !== undefined`,()=>g.assign(E,(0,e._)`${$} === true ? true : ${E} > ${$} ? ${E} : ${$}`)),mergeToName:(g,$,E)=>g.if((0,e._)`${E} !== true`,()=>g.assign(E,$===!0?!0:(0,e._)`${E} > ${$} ? ${E} : ${$}`)),mergeValues:(g,$)=>g===!0?!0:Math.max(g,$),resultToName:(g,$)=>g.var("items",$)})};function w(g,$){if($===!0)return g.var("props",!0);const E=g.var("props",(0,e._)`{}`);return $!==void 0&&y(g,E,$),E}Ee.evaluatedPropsToName=w;function y(g,$,E){Object.keys(E).forEach(j=>g.assign((0,e._)`${$}${(0,e.getProperty)(j)}`,!0))}Ee.setEvaluated=y;const m={};function _(g,$){return g.scopeValue("func",{ref:$,code:m[$.code]||(m[$.code]=new t._Code($.code))})}Ee.useFunc=_;var f;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(f||(Ee.Type=f={}));function b(g,$,E){if(g instanceof e.Name){const j=$===f.Num;return E?j?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:j?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(g).toString():"/"+u(g)}Ee.getErrorPath=b;function x(g,$,E=g.opts.strictSchema){if(E){if($=`strict mode: ${$}`,E===!0)throw new Error($);g.self.logger.warn($)}}return Ee.checkStrictMode=x,Ee}var gs={},jd;function vt(){if(jd)return gs;jd=1,Object.defineProperty(gs,"__esModule",{value:!0});const e=ye(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return gs.default=t,gs}var Nd;function vs(){return Nd||(Nd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ye(),r=Re(),n=vt();e.keywordError={message:({keyword:m})=>(0,t.str)`must pass "${m}" keyword validation`},e.keyword$DataError={message:({keyword:m,schemaType:_})=>_?(0,t.str)`"${m}" keyword must be ${_} ($data)`:(0,t.str)`"${m}" keyword is invalid ($data)`};function s(m,_=e.keywordError,f,b){const{it:x}=m,{gen:g,compositeRule:$,allErrors:E}=x,j=h(m,_,f);b??($||E)?c(g,j):l(x,(0,t._)`[${j}]`)}e.reportError=s;function o(m,_=e.keywordError,f){const{it:b}=m,{gen:x,compositeRule:g,allErrors:$}=b,E=h(m,_,f);c(x,E),g||$||l(b,n.default.vErrors)}e.reportExtraError=o;function a(m,_){m.assign(n.default.errors,_),m.if((0,t._)`${n.default.vErrors} !== null`,()=>m.if(_,()=>m.assign((0,t._)`${n.default.vErrors}.length`,_),()=>m.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function i({gen:m,keyword:_,schemaValue:f,data:b,errsCount:x,it:g}){if(x===void 0)throw new Error("ajv implementation error");const $=m.name("err");m.forRange("i",x,n.default.errors,E=>{m.const($,(0,t._)`${n.default.vErrors}[${E}]`),m.if((0,t._)`${$}.instancePath === undefined`,()=>m.assign((0,t._)`${$}.instancePath`,(0,t.strConcat)(n.default.instancePath,g.errorPath))),m.assign((0,t._)`${$}.schemaPath`,(0,t.str)`${g.errSchemaPath}/${_}`),g.opts.verbose&&(m.assign((0,t._)`${$}.schema`,f),m.assign((0,t._)`${$}.data`,b))})}e.extendErrors=i;function c(m,_){const f=m.const("err",_);m.if((0,t._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),m.code((0,t._)`${n.default.errors}++`)}function l(m,_){const{gen:f,validateName:b,schemaEnv:x}=m;x.$async?f.throw((0,t._)`new ${m.ValidationError}(${_})`):(f.assign((0,t._)`${b}.errors`,_),f.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function h(m,_,f){const{createErrors:b}=m.it;return b===!1?(0,t._)`{}`:p(m,_,f)}function p(m,_,f={}){const{gen:b,it:x}=m,g=[v(x,f),w(m,f)];return y(m,_,g),b.object(...g)}function v({errorPath:m},{instancePath:_}){const f=_?(0,t.str)`${m}${(0,r.getErrorPath)(_,r.Type.Str)}`:m;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function w({keyword:m,it:{errSchemaPath:_}},{schemaPath:f,parentSchema:b}){let x=b?_:(0,t.str)`${_}/${m}`;return f&&(x=(0,t.str)`${x}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,x]}function y(m,{params:_,message:f},b){const{keyword:x,data:g,schemaValue:$,it:E}=m,{opts:j,propertyName:I,topSchemaRef:U,schemaPath:D}=E;b.push([u.keyword,x],[u.params,typeof _=="function"?_(m):_||(0,t._)`{}`]),j.messages&&b.push([u.message,typeof f=="function"?f(m):f]),j.verbose&&b.push([u.schema,$],[u.parentSchema,(0,t._)`${U}${D}`],[n.default.data,g]),I&&b.push([u.propertyName,I])}})(Ha)),Ha}var Rd;function m0(){if(Rd)return mr;Rd=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.boolOrEmptySchema=mr.topBoolOrEmptySchema=void 0;const e=vs(),t=ye(),r=vt(),n={message:"boolean schema is false"};function s(i){const{gen:c,schema:l,validateName:u}=i;l===!1?a(i,!1):typeof l=="object"&&l.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}mr.topBoolOrEmptySchema=s;function o(i,c){const{gen:l,schema:u}=i;u===!1?(l.var(c,!1),a(i)):l.var(c,!0)}mr.boolOrEmptySchema=o;function a(i,c){const{gen:l,data:u}=i,h={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,e.reportError)(h,n,void 0,c)}return mr}var Ge={},hr={},Ad;function Pd(){if(Ad)return hr;Ad=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.getRules=hr.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(s){return typeof s=="string"&&t.has(s)}hr.isJSONType=r;function n(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return hr.getRules=n,hr}var Mt={},Td;function Od(){if(Td)return Mt;Td=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.shouldUseRule=Mt.shouldUseGroup=Mt.schemaHasRulesForType=void 0;function e({schema:n,self:s},o){const a=s.RULES.types[o];return a&&a!==!0&&t(n,a)}Mt.schemaHasRulesForType=e;function t(n,s){return s.rules.some(o=>r(n,o))}Mt.shouldUseGroup=t;function r(n,s){var o;return n[s.keyword]!==void 0||((o=s.definition.implements)===null||o===void 0?void 0:o.some(a=>n[a]!==void 0))}return Mt.shouldUseRule=r,Mt}var Id;function ys(){if(Id)return Ge;Id=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.reportTypeError=Ge.checkDataTypes=Ge.checkDataType=Ge.coerceAndCheckDataType=Ge.getJSONTypes=Ge.getSchemaTypes=Ge.DataType=void 0;const e=Pd(),t=Od(),r=vs(),n=ye(),s=Re();var o;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(o||(Ge.DataType=o={}));function a(f){const b=i(f.type);if(b.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!b.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&b.push("null")}return b}Ge.getSchemaTypes=a;function i(f){const b=Array.isArray(f)?f:f?[f]:[];if(b.every(e.isJSONType))return b;throw new Error("type must be JSONType or JSONType[]: "+b.join(","))}Ge.getJSONTypes=i;function c(f,b){const{gen:x,data:g,opts:$}=f,E=u(b,$.coerceTypes),j=b.length>0&&!(E.length===0&&b.length===1&&(0,t.schemaHasRulesForType)(f,b[0]));if(j){const I=w(b,g,$.strictNumbers,o.Wrong);x.if(I,()=>{E.length?h(f,b,E):m(f)})}return j}Ge.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(f,b){return b?f.filter(x=>l.has(x)||b==="array"&&x==="array"):[]}function h(f,b,x){const{gen:g,data:$,opts:E}=f,j=g.let("dataType",(0,n._)`typeof ${$}`),I=g.let("coerced",(0,n._)`undefined`);E.coerceTypes==="array"&&g.if((0,n._)`${j} == 'object' && Array.isArray(${$}) && ${$}.length == 1`,()=>g.assign($,(0,n._)`${$}[0]`).assign(j,(0,n._)`typeof ${$}`).if(w(b,$,E.strictNumbers),()=>g.assign(I,$))),g.if((0,n._)`${I} !== undefined`);for(const D of x)(l.has(D)||D==="array"&&E.coerceTypes==="array")&&U(D);g.else(),m(f),g.endIf(),g.if((0,n._)`${I} !== undefined`,()=>{g.assign($,I),p(f,I)});function U(D){switch(D){case"string":g.elseIf((0,n._)`${j} == "number" || ${j} == "boolean"`).assign(I,(0,n._)`"" + ${$}`).elseIf((0,n._)`${$} === null`).assign(I,(0,n._)`""`);return;case"number":g.elseIf((0,n._)`${j} == "boolean" || ${$} === null
|
|
139
|
-
|| (${
|
|
140
|
-
|| (${
|
|
141
|
-
|| ${j} === "boolean" || ${$} === null`).assign(I,(0,n._)`[${$}]`)}}}function p({gen:f,parentData:b,parentDataProperty:x},g){f.if((0,n._)`${b} !== undefined`,()=>f.assign((0,n._)`${b}[${x}]`,g))}function v(f,b,x,g=o.Correct){const $=g===o.Correct?n.operators.EQ:n.operators.NEQ;let E;switch(f){case"null":return(0,n._)`${b} ${$} null`;case"array":E=(0,n._)`Array.isArray(${b})`;break;case"object":E=(0,n._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":E=j((0,n._)`!(${b} % 1) && !isNaN(${b})`);break;case"number":E=j();break;default:return(0,n._)`typeof ${b} ${$} ${f}`}return g===o.Correct?E:(0,n.not)(E);function j(I=n.nil){return(0,n.and)((0,n._)`typeof ${b} == "number"`,I,x?(0,n._)`isFinite(${b})`:n.nil)}}Ge.checkDataType=v;function w(f,b,x,g){if(f.length===1)return v(f[0],b,x,g);let $;const E=(0,s.toHash)(f);if(E.array&&E.object){const j=(0,n._)`typeof ${b} != "object"`;$=E.null?j:(0,n._)`!${b} || ${j}`,delete E.null,delete E.array,delete E.object}else $=n.nil;E.number&&delete E.integer;for(const j in E)$=(0,n.and)($,v(j,b,x,g));return $}Ge.checkDataTypes=w;const y={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:b})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${b}}`};function m(f){const b=_(f);(0,r.reportError)(b,y)}Ge.reportTypeError=m;function _(f){const{gen:b,data:x,schema:g}=f,$=(0,s.schemaRefOrVal)(f,g,"type");return{gen:b,keyword:"type",data:x,schema:g.type,schemaCode:$,schemaValue:$,parentSchema:g,params:{},it:f}}return Ge}var mn={},Dd;function h0(){if(Dd)return mn;Dd=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.assignDefaults=void 0;const e=ye(),t=Re();function r(s,o){const{properties:a,items:i}=s.schema;if(o==="object"&&a)for(const c in a)n(s,c,a[c].default);else o==="array"&&Array.isArray(i)&&i.forEach((c,l)=>n(s,l,c.default))}mn.assignDefaults=r;function n(s,o,a){const{gen:i,compositeRule:c,data:l,opts:u}=s;if(a===void 0)return;const h=(0,e._)`${l}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(s,`default is ignored for: ${h}`);return}let p=(0,e._)`${h} === undefined`;u.useDefaults==="empty"&&(p=(0,e._)`${p} || ${h} === null || ${h} === ""`),i.if(p,(0,e._)`${h} = ${(0,e.stringify)(a)}`)}return mn}var yt={},Me={},Md;function bt(){if(Md)return Me;Md=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.validateUnion=Me.validateArray=Me.usePattern=Me.callValidateCode=Me.schemaProperties=Me.allSchemaProperties=Me.noPropertyInData=Me.propertyInData=Me.isOwnProperty=Me.hasPropFunc=Me.reportMissingProp=Me.checkMissingProp=Me.checkReportMissingProp=void 0;const e=ye(),t=Re(),r=vt(),n=Re();function s(f,b){const{gen:x,data:g,it:$}=f;x.if(u(x,g,b,$.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${b}`},!0),f.error()})}Me.checkReportMissingProp=s;function o({gen:f,data:b,it:{opts:x}},g,$){return(0,e.or)(...g.map(E=>(0,e.and)(u(f,b,E,x.ownProperties),(0,e._)`${$} = ${E}`)))}Me.checkMissingProp=o;function a(f,b){f.setParams({missingProperty:b},!0),f.error()}Me.reportMissingProp=a;function i(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Me.hasPropFunc=i;function c(f,b,x){return(0,e._)`${i(f)}.call(${b}, ${x})`}Me.isOwnProperty=c;function l(f,b,x,g){const $=(0,e._)`${b}${(0,e.getProperty)(x)} !== undefined`;return g?(0,e._)`${$} && ${c(f,b,x)}`:$}Me.propertyInData=l;function u(f,b,x,g){const $=(0,e._)`${b}${(0,e.getProperty)(x)} === undefined`;return g?(0,e.or)($,(0,e.not)(c(f,b,x))):$}Me.noPropertyInData=u;function h(f){return f?Object.keys(f).filter(b=>b!=="__proto__"):[]}Me.allSchemaProperties=h;function p(f,b){return h(b).filter(x=>!(0,t.alwaysValidSchema)(f,b[x]))}Me.schemaProperties=p;function v({schemaCode:f,data:b,it:{gen:x,topSchemaRef:g,schemaPath:$,errorPath:E},it:j},I,U,D){const V=D?(0,e._)`${f}, ${b}, ${g}${$}`:b,q=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,E)],[r.default.parentData,j.parentData],[r.default.parentDataProperty,j.parentDataProperty],[r.default.rootData,r.default.rootData]];j.opts.dynamicRef&&q.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const W=(0,e._)`${V}, ${x.object(...q)}`;return U!==e.nil?(0,e._)`${I}.call(${U}, ${W})`:(0,e._)`${I}(${W})`}Me.callValidateCode=v;const w=(0,e._)`new RegExp`;function y({gen:f,it:{opts:b}},x){const g=b.unicodeRegExp?"u":"",{regExp:$}=b.code,E=$(x,g);return f.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${$.code==="new RegExp"?w:(0,n.useFunc)(f,$)}(${x}, ${g})`})}Me.usePattern=y;function m(f){const{gen:b,data:x,keyword:g,it:$}=f,E=b.name("valid");if($.allErrors){const I=b.let("valid",!0);return j(()=>b.assign(I,!1)),I}return b.var(E,!0),j(()=>b.break()),E;function j(I){const U=b.const("len",(0,e._)`${x}.length`);b.forRange("i",0,U,D=>{f.subschema({keyword:g,dataProp:D,dataPropType:t.Type.Num},E),b.if((0,e.not)(E),I)})}}Me.validateArray=m;function _(f){const{gen:b,schema:x,keyword:g,it:$}=f;if(!Array.isArray(x))throw new Error("ajv implementation error");if(x.some(U=>(0,t.alwaysValidSchema)($,U))&&!$.opts.unevaluated)return;const j=b.let("valid",!1),I=b.name("_valid");b.block(()=>x.forEach((U,D)=>{const V=f.subschema({keyword:g,schemaProp:D,compositeRule:!0},I);b.assign(j,(0,e._)`${j} || ${I}`),f.mergeValidEvaluated(V,I)||b.if((0,e.not)(j))})),f.result(j,()=>f.reset(),()=>f.error(!0))}return Me.validateUnion=_,Me}var Vd;function p0(){if(Vd)return yt;Vd=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.validateKeywordUsage=yt.validSchemaType=yt.funcKeywordCode=yt.macroKeywordCode=void 0;const e=ye(),t=vt(),r=bt(),n=vs();function s(p,v){const{gen:w,keyword:y,schema:m,parentSchema:_,it:f}=p,b=v.macro.call(f.self,m,_,f),x=l(w,y,b);f.opts.validateSchema!==!1&&f.self.validateSchema(b,!0);const g=w.name("valid");p.subschema({schema:b,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${y}`,topSchemaRef:x,compositeRule:!0},g),p.pass(g,()=>p.error(!0))}yt.macroKeywordCode=s;function o(p,v){var w;const{gen:y,keyword:m,schema:_,parentSchema:f,$data:b,it:x}=p;c(x,v);const g=!b&&v.compile?v.compile.call(x.self,_,f,x):v.validate,$=l(y,m,g),E=y.let("valid");p.block$data(E,j),p.ok((w=v.valid)!==null&&w!==void 0?w:E);function j(){if(v.errors===!1)D(),v.modifying&&a(p),V(()=>p.error());else{const q=v.async?I():U();v.modifying&&a(p),V(()=>i(p,q))}}function I(){const q=y.let("ruleErrs",null);return y.try(()=>D((0,e._)`await `),W=>y.assign(E,!1).if((0,e._)`${W} instanceof ${x.ValidationError}`,()=>y.assign(q,(0,e._)`${W}.errors`),()=>y.throw(W))),q}function U(){const q=(0,e._)`${$}.errors`;return y.assign(q,null),D(e.nil),q}function D(q=v.async?(0,e._)`await `:e.nil){const W=x.opts.passContext?t.default.this:t.default.self,ee=!("compile"in v&&!b||v.schema===!1);y.assign(E,(0,e._)`${q}${(0,r.callValidateCode)(p,$,W,ee)}`,v.modifying)}function V(q){var W;y.if((0,e.not)((W=v.valid)!==null&&W!==void 0?W:E),q)}}yt.funcKeywordCode=o;function a(p){const{gen:v,data:w,it:y}=p;v.if(y.parentData,()=>v.assign(w,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function i(p,v){const{gen:w}=p;w.if((0,e._)`Array.isArray(${v})`,()=>{w.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(p)},()=>p.error())}function c({schemaEnv:p},v){if(v.async&&!p.$async)throw new Error("async keyword in sync schema")}function l(p,v,w){if(w===void 0)throw new Error(`keyword "${v}" failed to compile`);return p.scopeValue("keyword",typeof w=="function"?{ref:w}:{ref:w,code:(0,e.stringify)(w)})}function u(p,v,w=!1){return!v.length||v.some(y=>y==="array"?Array.isArray(p):y==="object"?p&&typeof p=="object"&&!Array.isArray(p):typeof p==y||w&&typeof p>"u")}yt.validSchemaType=u;function h({schema:p,opts:v,self:w,errSchemaPath:y},m,_){if(Array.isArray(m.keyword)?!m.keyword.includes(_):m.keyword!==_)throw new Error("ajv implementation error");const f=m.dependencies;if(f!=null&&f.some(b=>!Object.prototype.hasOwnProperty.call(p,b)))throw new Error(`parent schema must have dependencies of ${_}: ${f.join(",")}`);if(m.validateSchema&&!m.validateSchema(p[_])){const x=`keyword "${_}" value is invalid at path "${y}": `+w.errorsText(m.validateSchema.errors);if(v.validateSchema==="log")w.logger.error(x);else throw new Error(x)}}return yt.validateKeywordUsage=h,yt}var Vt={},Fd;function g0(){if(Fd)return Vt;Fd=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.extendSubschemaMode=Vt.extendSubschemaData=Vt.getSubschema=void 0;const e=ye(),t=Re();function r(o,{keyword:a,schemaProp:i,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:h}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const p=o.schema[a];return i===void 0?{schema:p,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:p[i],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(i)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,t.escapeFragment)(i)}`}}if(c!==void 0){if(l===void 0||u===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:h,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}Vt.getSubschema=r;function n(o,a,{dataProp:i,dataPropType:c,data:l,dataTypes:u,propertyName:h}){if(l!==void 0&&i!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:p}=a;if(i!==void 0){const{errorPath:w,dataPathArr:y,opts:m}=a,_=p.let("data",(0,e._)`${a.data}${(0,e.getProperty)(i)}`,!0);v(_),o.errorPath=(0,e.str)`${w}${(0,t.getErrorPath)(i,c,m.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${i}`,o.dataPathArr=[...y,o.parentDataProperty]}if(l!==void 0){const w=l instanceof e.Name?l:p.let("data",l,!0);v(w),h!==void 0&&(o.propertyName=h)}u&&(o.dataTypes=u);function v(w){o.data=w,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,w]}}Vt.extendSubschemaData=n;function s(o,{jtdDiscriminator:a,jtdMetadata:i,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(o.compositeRule=c),l!==void 0&&(o.createErrors=l),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=a,o.jtdMetadata=i}return Vt.extendSubschemaMode=s,Vt}var Je={},Ya,Ld;function zd(){return Ld||(Ld=1,Ya=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var a=o[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Ya}var Ja={exports:{}},qd;function v0(){if(qd)return Ja.exports;qd=1;var e=Ja.exports=function(n,s,o){typeof s=="function"&&(o=s,s={}),o=s.cb||o;var a=typeof o=="function"?o:o.pre||function(){},i=o.post||function(){};t(s,a,i,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,s,o,a,i,c,l,u,h,p){if(a&&typeof a=="object"&&!Array.isArray(a)){s(a,i,c,l,u,h,p);for(var v in a){var w=a[v];if(Array.isArray(w)){if(v in e.arrayKeywords)for(var y=0;y<w.length;y++)t(n,s,o,w[y],i+"/"+v+"/"+y,c,i,v,a,y)}else if(v in e.propsKeywords){if(w&&typeof w=="object")for(var m in w)t(n,s,o,w[m],i+"/"+v+"/"+r(m),c,i,v,a,m)}else(v in e.keywords||n.allKeys&&!(v in e.skipKeywords))&&t(n,s,o,w,i+"/"+v,c,i,v,a)}o(a,i,c,l,u,h,p)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Ja.exports}var Ud;function bs(){if(Ud)return Je;Ud=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.getSchemaRefs=Je.resolveUrl=Je.normalizeId=Je._getFullPath=Je.getFullPath=Je.inlineRef=void 0;const e=Re(),t=zd(),r=v0(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(y,m=!0){return typeof y=="boolean"?!0:m===!0?!a(y):m?i(y)<=m:!1}Je.inlineRef=s;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(y){for(const m in y){if(o.has(m))return!0;const _=y[m];if(Array.isArray(_)&&_.some(a)||typeof _=="object"&&a(_))return!0}return!1}function i(y){let m=0;for(const _ in y){if(_==="$ref")return 1/0;if(m++,!n.has(_)&&(typeof y[_]=="object"&&(0,e.eachItem)(y[_],f=>m+=i(f)),m===1/0))return 1/0}return m}function c(y,m="",_){_!==!1&&(m=h(m));const f=y.parse(m);return l(y,f)}Je.getFullPath=c;function l(y,m){return y.serialize(m).split("#")[0]+"#"}Je._getFullPath=l;const u=/#\/?$/;function h(y){return y?y.replace(u,""):""}Je.normalizeId=h;function p(y,m,_){return _=h(_),y.resolve(m,_)}Je.resolveUrl=p;const v=/^[a-z_][-a-z0-9._]*$/i;function w(y,m){if(typeof y=="boolean")return{};const{schemaId:_,uriResolver:f}=this.opts,b=h(y[_]||m),x={"":b},g=c(f,b,!1),$={},E=new Set;return r(y,{allKeys:!0},(U,D,V,q)=>{if(q===void 0)return;const W=g+D;let ee=x[q];typeof U[_]=="string"&&(ee=K.call(this,U[_])),se.call(this,U.$anchor),se.call(this,U.$dynamicAnchor),x[D]=ee;function K(L){const he=this.opts.uriResolver.resolve;if(L=h(ee?he(ee,L):L),E.has(L))throw I(L);E.add(L);let H=this.refs[L];return typeof H=="string"&&(H=this.refs[H]),typeof H=="object"?j(U,H.schema,L):L!==h(W)&&(L[0]==="#"?(j(U,$[L],L),$[L]=U):this.refs[L]=W),L}function se(L){if(typeof L=="string"){if(!v.test(L))throw new Error(`invalid anchor "${L}"`);K.call(this,`#${L}`)}}}),$;function j(U,D,V){if(D!==void 0&&!t(U,D))throw I(V)}function I(U){return new Error(`reference "${U}" resolves to more than one schema`)}}return Je.getSchemaRefs=w,Je}var Bd;function hn(){if(Bd)return Dt;Bd=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.getData=Dt.KeywordCxt=Dt.validateFunctionCode=void 0;const e=m0(),t=ys(),r=Od(),n=ys(),s=h0(),o=p0(),a=g0(),i=ye(),c=vt(),l=bs(),u=Re(),h=vs();function p(A){if(g(A)&&(E(A),x(A))){m(A);return}v(A,()=>(0,e.topBoolOrEmptySchema)(A))}Dt.validateFunctionCode=p;function v({gen:A,validateName:T,schema:G,schemaEnv:J,opts:ie},ge){ie.code.es5?A.func(T,(0,i._)`${c.default.data}, ${c.default.valCxt}`,J.$async,()=>{A.code((0,i._)`"use strict"; ${f(G,ie)}`),y(A,ie),A.code(ge)}):A.func(T,(0,i._)`${c.default.data}, ${w(ie)}`,J.$async,()=>A.code(f(G,ie)).code(ge))}function w(A){return(0,i._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${A.dynamicRef?(0,i._)`, ${c.default.dynamicAnchors}={}`:i.nil}}={}`}function y(A,T){A.if(c.default.valCxt,()=>{A.var(c.default.instancePath,(0,i._)`${c.default.valCxt}.${c.default.instancePath}`),A.var(c.default.parentData,(0,i._)`${c.default.valCxt}.${c.default.parentData}`),A.var(c.default.parentDataProperty,(0,i._)`${c.default.valCxt}.${c.default.parentDataProperty}`),A.var(c.default.rootData,(0,i._)`${c.default.valCxt}.${c.default.rootData}`),T.dynamicRef&&A.var(c.default.dynamicAnchors,(0,i._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{A.var(c.default.instancePath,(0,i._)`""`),A.var(c.default.parentData,(0,i._)`undefined`),A.var(c.default.parentDataProperty,(0,i._)`undefined`),A.var(c.default.rootData,c.default.data),T.dynamicRef&&A.var(c.default.dynamicAnchors,(0,i._)`{}`)})}function m(A){const{schema:T,opts:G,gen:J}=A;v(A,()=>{G.$comment&&T.$comment&&q(A),U(A),J.let(c.default.vErrors,null),J.let(c.default.errors,0),G.unevaluated&&_(A),j(A),W(A)})}function _(A){const{gen:T,validateName:G}=A;A.evaluated=T.const("evaluated",(0,i._)`${G}.evaluated`),T.if((0,i._)`${A.evaluated}.dynamicProps`,()=>T.assign((0,i._)`${A.evaluated}.props`,(0,i._)`undefined`)),T.if((0,i._)`${A.evaluated}.dynamicItems`,()=>T.assign((0,i._)`${A.evaluated}.items`,(0,i._)`undefined`))}function f(A,T){const G=typeof A=="object"&&A[T.schemaId];return G&&(T.code.source||T.code.process)?(0,i._)`/*# sourceURL=${G} */`:i.nil}function b(A,T){if(g(A)&&(E(A),x(A))){$(A,T);return}(0,e.boolOrEmptySchema)(A,T)}function x({schema:A,self:T}){if(typeof A=="boolean")return!A;for(const G in A)if(T.RULES.all[G])return!0;return!1}function g(A){return typeof A.schema!="boolean"}function $(A,T){const{schema:G,gen:J,opts:ie}=A;ie.$comment&&G.$comment&&q(A),D(A),V(A);const ge=J.const("_errs",c.default.errors);j(A,ge),J.var(T,(0,i._)`${ge} === ${c.default.errors}`)}function E(A){(0,u.checkUnknownRules)(A),I(A)}function j(A,T){if(A.opts.jtd)return K(A,[],!1,T);const G=(0,t.getSchemaTypes)(A.schema),J=(0,t.coerceAndCheckDataType)(A,G);K(A,G,!J,T)}function I(A){const{schema:T,errSchemaPath:G,opts:J,self:ie}=A;T.$ref&&J.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(T,ie.RULES)&&ie.logger.warn(`$ref: keywords ignored in schema at path "${G}"`)}function U(A){const{schema:T,opts:G}=A;T.default!==void 0&&G.useDefaults&&G.strictSchema&&(0,u.checkStrictMode)(A,"default is ignored in the schema root")}function D(A){const T=A.schema[A.opts.schemaId];T&&(A.baseId=(0,l.resolveUrl)(A.opts.uriResolver,A.baseId,T))}function V(A){if(A.schema.$async&&!A.schemaEnv.$async)throw new Error("async schema in sync schema")}function q({gen:A,schemaEnv:T,schema:G,errSchemaPath:J,opts:ie}){const ge=G.$comment;if(ie.$comment===!0)A.code((0,i._)`${c.default.self}.logger.log(${ge})`);else if(typeof ie.$comment=="function"){const ze=(0,i.str)`${J}/$comment`,rt=A.scopeValue("root",{ref:T.root});A.code((0,i._)`${c.default.self}.opts.$comment(${ge}, ${ze}, ${rt}.schema)`)}}function W(A){const{gen:T,schemaEnv:G,validateName:J,ValidationError:ie,opts:ge}=A;G.$async?T.if((0,i._)`${c.default.errors} === 0`,()=>T.return(c.default.data),()=>T.throw((0,i._)`new ${ie}(${c.default.vErrors})`)):(T.assign((0,i._)`${J}.errors`,c.default.vErrors),ge.unevaluated&&ee(A),T.return((0,i._)`${c.default.errors} === 0`))}function ee({gen:A,evaluated:T,props:G,items:J}){G instanceof i.Name&&A.assign((0,i._)`${T}.props`,G),J instanceof i.Name&&A.assign((0,i._)`${T}.items`,J)}function K(A,T,G,J){const{gen:ie,schema:ge,data:ze,allErrors:rt,opts:qe,self:R}=A,{RULES:O}=R;if(ge.$ref&&(qe.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(ge,O))){ie.block(()=>F(A,"$ref",O.all.$ref.definition));return}qe.jtd||L(A,T),ie.block(()=>{for(const re of O.rules)B(re);B(O.post)});function B(re){(0,r.shouldUseGroup)(ge,re)&&(re.type?(ie.if((0,n.checkDataType)(re.type,ze,qe.strictNumbers)),se(A,re),T.length===1&&T[0]===re.type&&G&&(ie.else(),(0,n.reportTypeError)(A)),ie.endIf()):se(A,re),rt||ie.if((0,i._)`${c.default.errors} === ${J||0}`))}}function se(A,T){const{gen:G,schema:J,opts:{useDefaults:ie}}=A;ie&&(0,s.assignDefaults)(A,T.type),G.block(()=>{for(const ge of T.rules)(0,r.shouldUseRule)(J,ge)&&F(A,ge.keyword,ge.definition,T.type)})}function L(A,T){A.schemaEnv.meta||!A.opts.strictTypes||(he(A,T),A.opts.allowUnionTypes||H(A,T),C(A,A.dataTypes))}function he(A,T){if(T.length){if(!A.dataTypes.length){A.dataTypes=T;return}T.forEach(G=>{P(A.dataTypes,G)||N(A,`type "${G}" not allowed by context "${A.dataTypes.join(",")}"`)}),k(A,T)}}function H(A,T){T.length>1&&!(T.length===2&&T.includes("null"))&&N(A,"use allowUnionTypes to allow union type keyword")}function C(A,T){const G=A.self.RULES.all;for(const J in G){const ie=G[J];if(typeof ie=="object"&&(0,r.shouldUseRule)(A.schema,ie)){const{type:ge}=ie.definition;ge.length&&!ge.some(ze=>M(T,ze))&&N(A,`missing type "${ge.join(",")}" for keyword "${J}"`)}}}function M(A,T){return A.includes(T)||T==="number"&&A.includes("integer")}function P(A,T){return A.includes(T)||T==="integer"&&A.includes("number")}function k(A,T){const G=[];for(const J of A.dataTypes)P(T,J)?G.push(J):T.includes("integer")&&J==="number"&&G.push("integer");A.dataTypes=G}function N(A,T){const G=A.schemaEnv.baseId+A.errSchemaPath;T+=` at "${G}" (strictTypes)`,(0,u.checkStrictMode)(A,T,A.opts.strictTypes)}class z{constructor(T,G,J){if((0,o.validateKeywordUsage)(T,G,J),this.gen=T.gen,this.allErrors=T.allErrors,this.keyword=J,this.data=T.data,this.schema=T.schema[J],this.$data=G.$data&&T.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(T,this.schema,J,this.$data),this.schemaType=G.schemaType,this.parentSchema=T.schema,this.params={},this.it=T,this.def=G,this.$data)this.schemaCode=T.gen.const("vSchema",oe(this.$data,T));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,G.schemaType,G.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(G.schemaType)}`);("code"in G?G.trackErrors:G.errors!==!1)&&(this.errsCount=T.gen.const("_errs",c.default.errors))}result(T,G,J){this.failResult((0,i.not)(T),G,J)}failResult(T,G,J){this.gen.if(T),J?J():this.error(),G?(this.gen.else(),G(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(T,G){this.failResult((0,i.not)(T),void 0,G)}fail(T){if(T===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(T),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(T){if(!this.$data)return this.fail(T);const{schemaCode:G}=this;this.fail((0,i._)`${G} !== undefined && (${(0,i.or)(this.invalid$data(),T)})`)}error(T,G,J){if(G){this.setParams(G),this._error(T,J),this.setParams({});return}this._error(T,J)}_error(T,G){(T?h.reportExtraError:h.reportError)(this,this.def.error,G)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(T){this.allErrors||this.gen.if(T)}setParams(T,G){G?Object.assign(this.params,T):this.params=T}block$data(T,G,J=i.nil){this.gen.block(()=>{this.check$data(T,J),G()})}check$data(T=i.nil,G=i.nil){if(!this.$data)return;const{gen:J,schemaCode:ie,schemaType:ge,def:ze}=this;J.if((0,i.or)((0,i._)`${ie} === undefined`,G)),T!==i.nil&&J.assign(T,!0),(ge.length||ze.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),T!==i.nil&&J.assign(T,!1)),J.else()}invalid$data(){const{gen:T,schemaCode:G,schemaType:J,def:ie,it:ge}=this;return(0,i.or)(ze(),rt());function ze(){if(J.length){if(!(G instanceof i.Name))throw new Error("ajv implementation error");const qe=Array.isArray(J)?J:[J];return(0,i._)`${(0,n.checkDataTypes)(qe,G,ge.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}function rt(){if(ie.validateSchema){const qe=T.scopeValue("validate$data",{ref:ie.validateSchema});return(0,i._)`!${qe}(${G})`}return i.nil}}subschema(T,G){const J=(0,a.getSubschema)(this.it,T);(0,a.extendSubschemaData)(J,this.it,T),(0,a.extendSubschemaMode)(J,T);const ie={...this.it,...J,items:void 0,props:void 0};return b(ie,G),ie}mergeEvaluated(T,G){const{it:J,gen:ie}=this;J.opts.unevaluated&&(J.props!==!0&&T.props!==void 0&&(J.props=u.mergeEvaluated.props(ie,T.props,J.props,G)),J.items!==!0&&T.items!==void 0&&(J.items=u.mergeEvaluated.items(ie,T.items,J.items,G)))}mergeValidEvaluated(T,G){const{it:J,gen:ie}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return ie.if(G,()=>this.mergeEvaluated(T,i.Name)),!0}}Dt.KeywordCxt=z;function F(A,T,G,J){const ie=new z(A,G,T);"code"in G?G.code(ie,J):ie.$data&&G.validate?(0,o.funcKeywordCode)(ie,G):"macro"in G?(0,o.macroKeywordCode)(ie,G):(G.compile||G.validate)&&(0,o.funcKeywordCode)(ie,G)}const Y=/^\/(?:[^~]|~0|~1)*$/,de=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function oe(A,{dataLevel:T,dataNames:G,dataPathArr:J}){let ie,ge;if(A==="")return c.default.rootData;if(A[0]==="/"){if(!Y.test(A))throw new Error(`Invalid JSON-pointer: ${A}`);ie=A,ge=c.default.rootData}else{const R=de.exec(A);if(!R)throw new Error(`Invalid JSON-pointer: ${A}`);const O=+R[1];if(ie=R[2],ie==="#"){if(O>=T)throw new Error(qe("property/index",O));return J[T-O]}if(O>T)throw new Error(qe("data",O));if(ge=G[T-O],!ie)return ge}let ze=ge;const rt=ie.split("/");for(const R of rt)R&&(ge=(0,i._)`${ge}${(0,i.getProperty)((0,u.unescapeJsonPointer)(R))}`,ze=(0,i._)`${ze} && ${ge}`);return ze;function qe(R,O){return`Cannot access ${R} ${O} levels up, current level is ${T}`}}return Dt.getData=oe,Dt}var _s={},Wd;function xs(){if(Wd)return _s;Wd=1,Object.defineProperty(_s,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return _s.default=e,_s}var ws={},Hd;function pn(){if(Hd)return ws;Hd=1,Object.defineProperty(ws,"__esModule",{value:!0});const e=bs();class t extends Error{constructor(n,s,o,a){super(a||`can't resolve reference ${o} from id ${s}`),this.missingRef=(0,e.resolveUrl)(n,s,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return ws.default=t,ws}var it={},Gd;function $s(){if(Gd)return it;Gd=1,Object.defineProperty(it,"__esModule",{value:!0}),it.resolveSchema=it.getCompilingSchema=it.resolveRef=it.compileSchema=it.SchemaEnv=void 0;const e=ye(),t=xs(),r=vt(),n=bs(),s=Re(),o=hn();class a{constructor(_){var f;this.refs={},this.dynamicAnchors={};let b;typeof _.schema=="object"&&(b=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(f=_.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(b==null?void 0:b[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=b==null?void 0:b.$async,this.refs={}}}it.SchemaEnv=a;function i(m){const _=u.call(this,m);if(_)return _;const f=(0,n.getFullPath)(this.opts.uriResolver,m.root.baseId),{es5:b,lines:x}=this.opts.code,{ownProperties:g}=this.opts,$=new e.CodeGen(this.scope,{es5:b,lines:x,ownProperties:g});let E;m.$async&&(E=$.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=$.scopeName("validate");m.validateName=j;const I={gen:$,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:$.scopeValue("schema",this.opts.code.source===!0?{ref:m.schema,code:(0,e.stringify)(m.schema)}:{ref:m.schema}),validateName:j,ValidationError:E,schema:m.schema,schemaEnv:m,rootId:f,baseId:m.baseId||f,schemaPath:e.nil,errSchemaPath:m.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let U;try{this._compilations.add(m),(0,o.validateFunctionCode)(I),$.optimize(this.opts.code.optimize);const D=$.toString();U=`${$.scopeRefs(r.default.scope)}return ${D}`,this.opts.code.process&&(U=this.opts.code.process(U,m));const q=new Function(`${r.default.self}`,`${r.default.scope}`,U)(this,this.scope.get());if(this.scope.value(j,{ref:q}),q.errors=null,q.schema=m.schema,q.schemaEnv=m,m.$async&&(q.$async=!0),this.opts.code.source===!0&&(q.source={validateName:j,validateCode:D,scopeValues:$._values}),this.opts.unevaluated){const{props:W,items:ee}=I;q.evaluated={props:W instanceof e.Name?void 0:W,items:ee instanceof e.Name?void 0:ee,dynamicProps:W instanceof e.Name,dynamicItems:ee instanceof e.Name},q.source&&(q.source.evaluated=(0,e.stringify)(q.evaluated))}return m.validate=q,m}catch(D){throw delete m.validate,delete m.validateName,U&&this.logger.error("Error compiling schema, function code:",U),D}finally{this._compilations.delete(m)}}it.compileSchema=i;function c(m,_,f){var b;f=(0,n.resolveUrl)(this.opts.uriResolver,_,f);const x=m.refs[f];if(x)return x;let g=p.call(this,m,f);if(g===void 0){const $=(b=m.localRefs)===null||b===void 0?void 0:b[f],{schemaId:E}=this.opts;$&&(g=new a({schema:$,schemaId:E,root:m,baseId:_}))}if(g!==void 0)return m.refs[f]=l.call(this,g)}it.resolveRef=c;function l(m){return(0,n.inlineRef)(m.schema,this.opts.inlineRefs)?m.schema:m.validate?m:i.call(this,m)}function u(m){for(const _ of this._compilations)if(h(_,m))return _}it.getCompilingSchema=u;function h(m,_){return m.schema===_.schema&&m.root===_.root&&m.baseId===_.baseId}function p(m,_){let f;for(;typeof(f=this.refs[_])=="string";)_=f;return f||this.schemas[_]||v.call(this,m,_)}function v(m,_){const f=this.opts.uriResolver.parse(_),b=(0,n._getFullPath)(this.opts.uriResolver,f);let x=(0,n.getFullPath)(this.opts.uriResolver,m.baseId,void 0);if(Object.keys(m.schema).length>0&&b===x)return y.call(this,f,m);const g=(0,n.normalizeId)(b),$=this.refs[g]||this.schemas[g];if(typeof $=="string"){const E=v.call(this,m,$);return typeof(E==null?void 0:E.schema)!="object"?void 0:y.call(this,f,E)}if(typeof($==null?void 0:$.schema)=="object"){if($.validate||i.call(this,$),g===(0,n.normalizeId)(_)){const{schema:E}=$,{schemaId:j}=this.opts,I=E[j];return I&&(x=(0,n.resolveUrl)(this.opts.uriResolver,x,I)),new a({schema:E,schemaId:j,root:m,baseId:x})}return y.call(this,f,$)}}it.resolveSchema=v;const w=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(m,{baseId:_,schema:f,root:b}){var x;if(((x=m.fragment)===null||x===void 0?void 0:x[0])!=="/")return;for(const E of m.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const j=f[(0,s.unescapeFragment)(E)];if(j===void 0)return;f=j;const I=typeof f=="object"&&f[this.opts.schemaId];!w.has(E)&&I&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,I))}let g;if(typeof f!="boolean"&&f.$ref&&!(0,s.schemaHasRulesButRef)(f,this.RULES)){const E=(0,n.resolveUrl)(this.opts.uriResolver,_,f.$ref);g=v.call(this,b,E)}const{schemaId:$}=this.opts;if(g=g||new a({schema:f,schemaId:$,root:b,baseId:_}),g.schema!==g.root.schema)return g}return it}const y0={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Ss={},gn={exports:{}},Xa,Zd;function Kd(){if(Zd)return Xa;Zd=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(p){let v="",w=0,y=0;for(y=0;y<p.length;y++)if(w=p[y].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=p[y];break}for(y+=1;y<p.length;y++){if(w=p[y].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=p[y]}return v}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(p){return p.length=0,!0}function o(p,v,w){if(p.length){const y=r(p);if(y!=="")v.push(y);else return w.error=!0,!1;p.length=0}return!0}function a(p){let v=0;const w={error:!1,address:"",zone:""},y=[],m=[];let _=!1,f=!1,b=o;for(let x=0;x<p.length;x++){const g=p[x];if(!(g==="["||g==="]"))if(g===":"){if(_===!0&&(f=!0),!b(m,y,w))break;if(++v>7){w.error=!0;break}x>0&&p[x-1]===":"&&(_=!0),y.push(":");continue}else if(g==="%"){if(!b(m,y,w))break;b=s}else{m.push(g);continue}}return m.length&&(b===s?w.zone=m.join(""):f?y.push(m.join("")):y.push(r(m))),w.address=y.join(""),w}function i(p){if(c(p,":")<2)return{host:p,isIPV6:!1};const v=a(p);if(v.error)return{host:p,isIPV6:!1};{let w=v.address,y=v.address;return v.zone&&(w+="%"+v.zone,y+="%25"+v.zone),{host:w,isIPV6:!0,escapedHost:y}}}function c(p,v){let w=0;for(let y=0;y<p.length;y++)p[y]===v&&w++;return w}function l(p){let v=p;const w=[];let y=-1,m=0;for(;m=v.length;){if(m===1){if(v===".")break;if(v==="/"){w.push("/");break}else{w.push(v);break}}else if(m===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){w.push("/");break}}else if(m===3&&v==="/.."){w.length!==0&&w.pop(),w.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),w.length!==0&&w.pop();continue}}if((y=v.indexOf("/",1))===-1){w.push(v);break}else w.push(v.slice(0,y)),v=v.slice(y)}return w.join("")}function u(p,v){const w=v!==!0?escape:unescape;return p.scheme!==void 0&&(p.scheme=w(p.scheme)),p.userinfo!==void 0&&(p.userinfo=w(p.userinfo)),p.host!==void 0&&(p.host=w(p.host)),p.path!==void 0&&(p.path=w(p.path)),p.query!==void 0&&(p.query=w(p.query)),p.fragment!==void 0&&(p.fragment=w(p.fragment)),p}function h(p){const v=[];if(p.userinfo!==void 0&&(v.push(p.userinfo),v.push("@")),p.host!==void 0){let w=unescape(p.host);if(!t(w)){const y=i(w);y.isIPV6===!0?w=`[${y.escapedHost}]`:w=p.host}v.push(w)}return(typeof p.port=="number"||typeof p.port=="string")&&(v.push(":"),v.push(String(p.port))),v.length?v.join(""):void 0}return Xa={nonSimpleDomain:n,recomposeAuthority:h,normalizeComponentEncoding:u,removeDotSegments:l,isIPv4:t,isUUID:e,normalizeIPv6:i,stringArrayToHexStripped:r},Xa}var Qa,Yd;function b0(){if(Yd)return Qa;Yd=1;const{isUUID:e}=Kd(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(g){return r.indexOf(g)!==-1}function s(g){return g.secure===!0?!0:g.secure===!1?!1:g.scheme?g.scheme.length===3&&(g.scheme[0]==="w"||g.scheme[0]==="W")&&(g.scheme[1]==="s"||g.scheme[1]==="S")&&(g.scheme[2]==="s"||g.scheme[2]==="S"):!1}function o(g){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g}function a(g){const $=String(g.scheme).toLowerCase()==="https";return(g.port===($?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}function i(g){return g.secure=s(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g}function c(g){if((g.port===(s(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){const[$,E]=g.resourceName.split("?");g.path=$&&$!=="/"?$:void 0,g.query=E,g.resourceName=void 0}return g.fragment=void 0,g}function l(g,$){if(!g.path)return g.error="URN can not be parsed",g;const E=g.path.match(t);if(E){const j=$.scheme||g.scheme||"urn";g.nid=E[1].toLowerCase(),g.nss=E[2];const I=`${j}:${$.nid||g.nid}`,U=x(I);g.path=void 0,U&&(g=U.parse(g,$))}else g.error=g.error||"URN can not be parsed.";return g}function u(g,$){if(g.nid===void 0)throw new Error("URN without nid cannot be serialized");const E=$.scheme||g.scheme||"urn",j=g.nid.toLowerCase(),I=`${E}:${$.nid||j}`,U=x(I);U&&(g=U.serialize(g,$));const D=g,V=g.nss;return D.path=`${j||$.nid}:${V}`,$.skipEscape=!0,D}function h(g,$){const E=g;return E.uuid=E.nss,E.nss=void 0,!$.tolerant&&(!E.uuid||!e(E.uuid))&&(E.error=E.error||"UUID is not valid."),E}function p(g){const $=g;return $.nss=(g.uuid||"").toLowerCase(),$}const v={scheme:"http",domainHost:!0,parse:o,serialize:a},w={scheme:"https",domainHost:v.domainHost,parse:o,serialize:a},y={scheme:"ws",domainHost:!0,parse:i,serialize:c},m={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},b={http:v,https:w,ws:y,wss:m,urn:{scheme:"urn",parse:l,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:h,serialize:p,skipNormalize:!0}};Object.setPrototypeOf(b,null);function x(g){return g&&(b[g]||b[g.toLowerCase()])||void 0}return Qa={wsIsSecure:s,SCHEMES:b,isValidSchemeName:n,getSchemeHandler:x},Qa}var Jd;function _0(){if(Jd)return gn.exports;Jd=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:s,nonSimpleDomain:o}=Kd(),{SCHEMES:a,getSchemeHandler:i}=b0();function c(m,_){return typeof m=="string"?m=p(w(m,_),_):typeof m=="object"&&(m=w(p(m,_),_)),m}function l(m,_,f){const b=f?Object.assign({scheme:"null"},f):{scheme:"null"},x=u(w(m,b),w(_,b),b,!0);return b.skipEscape=!0,p(x,b)}function u(m,_,f,b){const x={};return b||(m=w(p(m,f),f),_=w(p(_,f),f)),f=f||{},!f.tolerant&&_.scheme?(x.scheme=_.scheme,x.userinfo=_.userinfo,x.host=_.host,x.port=_.port,x.path=t(_.path||""),x.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(x.userinfo=_.userinfo,x.host=_.host,x.port=_.port,x.path=t(_.path||""),x.query=_.query):(_.path?(_.path[0]==="/"?x.path=t(_.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?x.path="/"+_.path:m.path?x.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+_.path:x.path=_.path,x.path=t(x.path)),x.query=_.query):(x.path=m.path,_.query!==void 0?x.query=_.query:x.query=m.query),x.userinfo=m.userinfo,x.host=m.host,x.port=m.port),x.scheme=m.scheme),x.fragment=_.fragment,x}function h(m,_,f){return typeof m=="string"?(m=unescape(m),m=p(n(w(m,f),!0),{...f,skipEscape:!0})):typeof m=="object"&&(m=p(n(m,!0),{...f,skipEscape:!0})),typeof _=="string"?(_=unescape(_),_=p(n(w(_,f),!0),{...f,skipEscape:!0})):typeof _=="object"&&(_=p(n(_,!0),{...f,skipEscape:!0})),m.toLowerCase()===_.toLowerCase()}function p(m,_){const f={host:m.host,scheme:m.scheme,userinfo:m.userinfo,port:m.port,path:m.path,query:m.query,nid:m.nid,nss:m.nss,uuid:m.uuid,fragment:m.fragment,reference:m.reference,resourceName:m.resourceName,secure:m.secure,error:""},b=Object.assign({},_),x=[],g=i(b.scheme||f.scheme);g&&g.serialize&&g.serialize(f,b),f.path!==void 0&&(b.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),b.reference!=="suffix"&&f.scheme&&x.push(f.scheme,":");const $=r(f);if($!==void 0&&(b.reference!=="suffix"&&x.push("//"),x.push($),f.path&&f.path[0]!=="/"&&x.push("/")),f.path!==void 0){let E=f.path;!b.absolutePath&&(!g||!g.absolutePath)&&(E=t(E)),$===void 0&&E[0]==="/"&&E[1]==="/"&&(E="/%2F"+E.slice(2)),x.push(E)}return f.query!==void 0&&x.push("?",f.query),f.fragment!==void 0&&x.push("#",f.fragment),x.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(m,_){const f=Object.assign({},_),b={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let x=!1;f.reference==="suffix"&&(f.scheme?m=f.scheme+":"+m:m="//"+m);const g=m.match(v);if(g){if(b.scheme=g[1],b.userinfo=g[3],b.host=g[4],b.port=parseInt(g[5],10),b.path=g[6]||"",b.query=g[7],b.fragment=g[8],isNaN(b.port)&&(b.port=g[5]),b.host)if(s(b.host)===!1){const j=e(b.host);b.host=j.host.toLowerCase(),x=j.isIPV6}else x=!0;b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&b.query===void 0&&!b.path?b.reference="same-document":b.scheme===void 0?b.reference="relative":b.fragment===void 0?b.reference="absolute":b.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==b.reference&&(b.error=b.error||"URI is not a "+f.reference+" reference.");const $=i(f.scheme||b.scheme);if(!f.unicodeSupport&&(!$||!$.unicodeSupport)&&b.host&&(f.domainHost||$&&$.domainHost)&&x===!1&&o(b.host))try{b.host=URL.domainToASCII(b.host.toLowerCase())}catch(E){b.error=b.error||"Host's domain name can not be converted to ASCII: "+E}(!$||$&&!$.skipNormalize)&&(m.indexOf("%")!==-1&&(b.scheme!==void 0&&(b.scheme=unescape(b.scheme)),b.host!==void 0&&(b.host=unescape(b.host))),b.path&&(b.path=escape(unescape(b.path))),b.fragment&&(b.fragment=encodeURI(decodeURIComponent(b.fragment)))),$&&$.parse&&$.parse(b,f)}else b.error=b.error||"URI can not be parsed.";return b}const y={SCHEMES:a,normalize:c,resolve:l,resolveComponent:u,equal:h,serialize:p,parse:w};return gn.exports=y,gn.exports.default=y,gn.exports.fastUri=y,gn.exports}var Xd;function x0(){if(Xd)return Ss;Xd=1,Object.defineProperty(Ss,"__esModule",{value:!0});const e=_0();return e.code='require("ajv/dist/runtime/uri").default',Ss.default=e,Ss}var Qd;function ef(){return Qd||(Qd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=hn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ye();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=xs(),s=pn(),o=Pd(),a=$s(),i=ye(),c=bs(),l=ys(),u=Re(),h=y0,p=x0(),v=(H,C)=>new RegExp(H,C);v.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function b(H){var C,M,P,k,N,z,F,Y,de,oe,A,T,G,J,ie,ge,ze,rt,qe,R,O,B,re,ne,X;const me=H.strict,Pe=(C=H.code)===null||C===void 0?void 0:C.optimize,Ve=Pe===!0||Pe===void 0?1:Pe||0,Qe=(P=(M=H.code)===null||M===void 0?void 0:M.regExp)!==null&&P!==void 0?P:v,Jr=(k=H.uriResolver)!==null&&k!==void 0?k:p.default;return{strictSchema:(z=(N=H.strictSchema)!==null&&N!==void 0?N:me)!==null&&z!==void 0?z:!0,strictNumbers:(Y=(F=H.strictNumbers)!==null&&F!==void 0?F:me)!==null&&Y!==void 0?Y:!0,strictTypes:(oe=(de=H.strictTypes)!==null&&de!==void 0?de:me)!==null&&oe!==void 0?oe:"log",strictTuples:(T=(A=H.strictTuples)!==null&&A!==void 0?A:me)!==null&&T!==void 0?T:"log",strictRequired:(J=(G=H.strictRequired)!==null&&G!==void 0?G:me)!==null&&J!==void 0?J:!1,code:H.code?{...H.code,optimize:Ve,regExp:Qe}:{optimize:Ve,regExp:Qe},loopRequired:(ie=H.loopRequired)!==null&&ie!==void 0?ie:f,loopEnum:(ge=H.loopEnum)!==null&&ge!==void 0?ge:f,meta:(ze=H.meta)!==null&&ze!==void 0?ze:!0,messages:(rt=H.messages)!==null&&rt!==void 0?rt:!0,inlineRefs:(qe=H.inlineRefs)!==null&&qe!==void 0?qe:!0,schemaId:(R=H.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(O=H.addUsedSchema)!==null&&O!==void 0?O:!0,validateSchema:(B=H.validateSchema)!==null&&B!==void 0?B:!0,validateFormats:(re=H.validateFormats)!==null&&re!==void 0?re:!0,unicodeRegExp:(ne=H.unicodeRegExp)!==null&&ne!==void 0?ne:!0,int32range:(X=H.int32range)!==null&&X!==void 0?X:!0,uriResolver:Jr}}class x{constructor(C={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,C=this.opts={...C,...b(C)};const{es5:M,lines:P}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:y,es5:M,lines:P}),this.logger=V(C.logger);const k=C.validateFormats;C.validateFormats=!1,this.RULES=(0,o.getRules)(),g.call(this,m,C,"NOT SUPPORTED"),g.call(this,_,C,"DEPRECATED","warn"),this._metaOpts=U.call(this),C.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),C.keywords&&I.call(this,C.keywords),typeof C.meta=="object"&&this.addMetaSchema(C.meta),E.call(this),C.validateFormats=k}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:C,meta:M,schemaId:P}=this.opts;let k=h;P==="id"&&(k={...h},k.id=k.$id,delete k.$id),M&&C&&this.addMetaSchema(k,k[P],!1)}defaultMeta(){const{meta:C,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof C=="object"?C[M]||C:void 0}validate(C,M){let P;if(typeof C=="string"){if(P=this.getSchema(C),!P)throw new Error(`no schema with key or ref "${C}"`)}else P=this.compile(C);const k=P(M);return"$async"in P||(this.errors=P.errors),k}compile(C,M){const P=this._addSchema(C,M);return P.validate||this._compileSchemaEnv(P)}compileAsync(C,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return k.call(this,C,M);async function k(oe,A){await N.call(this,oe.$schema);const T=this._addSchema(oe,A);return T.validate||z.call(this,T)}async function N(oe){oe&&!this.getSchema(oe)&&await k.call(this,{$ref:oe},!0)}async function z(oe){try{return this._compileSchemaEnv(oe)}catch(A){if(!(A instanceof s.default))throw A;return F.call(this,A),await Y.call(this,A.missingSchema),z.call(this,oe)}}function F({missingSchema:oe,missingRef:A}){if(this.refs[oe])throw new Error(`AnySchema ${oe} is loaded but ${A} cannot be resolved`)}async function Y(oe){const A=await de.call(this,oe);this.refs[oe]||await N.call(this,A.$schema),this.refs[oe]||this.addSchema(A,oe,M)}async function de(oe){const A=this._loading[oe];if(A)return A;try{return await(this._loading[oe]=P(oe))}finally{delete this._loading[oe]}}}addSchema(C,M,P,k=this.opts.validateSchema){if(Array.isArray(C)){for(const z of C)this.addSchema(z,void 0,P,k);return this}let N;if(typeof C=="object"){const{schemaId:z}=this.opts;if(N=C[z],N!==void 0&&typeof N!="string")throw new Error(`schema ${z} must be string`)}return M=(0,c.normalizeId)(M||N),this._checkUnique(M),this.schemas[M]=this._addSchema(C,P,M,k,!0),this}addMetaSchema(C,M,P=this.opts.validateSchema){return this.addSchema(C,M,!0,P),this}validateSchema(C,M){if(typeof C=="boolean")return!0;let P;if(P=C.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const k=this.validate(P,C);if(!k&&M){const N="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(N);else throw new Error(N)}return k}getSchema(C){let M;for(;typeof(M=$.call(this,C))=="string";)C=M;if(M===void 0){const{schemaId:P}=this.opts,k=new a.SchemaEnv({schema:{},schemaId:P});if(M=a.resolveSchema.call(this,k,C),!M)return;this.refs[C]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(C){if(C instanceof RegExp)return this._removeAllSchemas(this.schemas,C),this._removeAllSchemas(this.refs,C),this;switch(typeof C){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=$.call(this,C);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[C],delete this.refs[C],this}case"object":{const M=C;this._cache.delete(M);let P=C[this.opts.schemaId];return P&&(P=(0,c.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(C){for(const M of C)this.addKeyword(M);return this}addKeyword(C,M){let P;if(typeof C=="string")P=C,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=P);else if(typeof C=="object"&&M===void 0){if(M=C,P=M.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,P,M),!M)return(0,u.eachItem)(P,N=>ee.call(this,N)),this;se.call(this,M);const k={...M,type:(0,l.getJSONTypes)(M.type),schemaType:(0,l.getJSONTypes)(M.schemaType)};return(0,u.eachItem)(P,k.type.length===0?N=>ee.call(this,N,k):N=>k.type.forEach(z=>ee.call(this,N,k,z))),this}getKeyword(C){const M=this.RULES.all[C];return typeof M=="object"?M.definition:!!M}removeKeyword(C){const{RULES:M}=this;delete M.keywords[C],delete M.all[C];for(const P of M.rules){const k=P.rules.findIndex(N=>N.keyword===C);k>=0&&P.rules.splice(k,1)}return this}addFormat(C,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[C]=M,this}errorsText(C=this.errors,{separator:M=", ",dataVar:P="data"}={}){return!C||C.length===0?"No errors":C.map(k=>`${P}${k.instancePath} ${k.message}`).reduce((k,N)=>k+M+N)}$dataMetaSchema(C,M){const P=this.RULES.all;C=JSON.parse(JSON.stringify(C));for(const k of M){const N=k.split("/").slice(1);let z=C;for(const F of N)z=z[F];for(const F in P){const Y=P[F];if(typeof Y!="object")continue;const{$data:de}=Y.definition,oe=z[F];de&&oe&&(z[F]=he(oe))}}return C}_removeAllSchemas(C,M){for(const P in C){const k=C[P];(!M||M.test(P))&&(typeof k=="string"?delete C[P]:k&&!k.meta&&(this._cache.delete(k.schema),delete C[P]))}}_addSchema(C,M,P,k=this.opts.validateSchema,N=this.opts.addUsedSchema){let z;const{schemaId:F}=this.opts;if(typeof C=="object")z=C[F];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof C!="boolean")throw new Error("schema must be object or boolean")}let Y=this._cache.get(C);if(Y!==void 0)return Y;P=(0,c.normalizeId)(z||P);const de=c.getSchemaRefs.call(this,C,P);return Y=new a.SchemaEnv({schema:C,schemaId:F,meta:M,baseId:P,localRefs:de}),this._cache.set(Y.schema,Y),N&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=Y),k&&this.validateSchema(C,!0),Y}_checkUnique(C){if(this.schemas[C]||this.refs[C])throw new Error(`schema with key or id "${C}" already exists`)}_compileSchemaEnv(C){if(C.meta?this._compileMetaSchema(C):a.compileSchema.call(this,C),!C.validate)throw new Error("ajv implementation error");return C.validate}_compileMetaSchema(C){const M=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,C)}finally{this.opts=M}}}x.ValidationError=n.default,x.MissingRefError=s.default,e.default=x;function g(H,C,M,P="error"){for(const k in H){const N=k;N in C&&this.logger[P](`${M}: option ${k}. ${H[N]}`)}}function $(H){return H=(0,c.normalizeId)(H),this.schemas[H]||this.refs[H]}function E(){const H=this.opts.schemas;if(H)if(Array.isArray(H))this.addSchema(H);else for(const C in H)this.addSchema(H[C],C)}function j(){for(const H in this.opts.formats){const C=this.opts.formats[H];C&&this.addFormat(H,C)}}function I(H){if(Array.isArray(H)){this.addVocabulary(H);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const C in H){const M=H[C];M.keyword||(M.keyword=C),this.addKeyword(M)}}function U(){const H={...this.opts};for(const C of w)delete H[C];return H}const D={log(){},warn(){},error(){}};function V(H){if(H===!1)return D;if(H===void 0)return console;if(H.log&&H.warn&&H.error)return H;throw new Error("logger must implement log, warn and error methods")}const q=/^[a-z_$][a-z0-9_$:-]*$/i;function W(H,C){const{RULES:M}=this;if((0,u.eachItem)(H,P=>{if(M.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!q.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!C&&C.$data&&!("code"in C||"validate"in C))throw new Error('$data keyword must have "code" or "validate" function')}function ee(H,C,M){var P;const k=C==null?void 0:C.post;if(M&&k)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:N}=this;let z=k?N.post:N.rules.find(({type:Y})=>Y===M);if(z||(z={type:M,rules:[]},N.rules.push(z)),N.keywords[H]=!0,!C)return;const F={keyword:H,definition:{...C,type:(0,l.getJSONTypes)(C.type),schemaType:(0,l.getJSONTypes)(C.schemaType)}};C.before?K.call(this,z,F,C.before):z.rules.push(F),N.all[H]=F,(P=C.implements)===null||P===void 0||P.forEach(Y=>this.addKeyword(Y))}function K(H,C,M){const P=H.rules.findIndex(k=>k.keyword===M);P>=0?H.rules.splice(P,0,C):(H.rules.push(C),this.logger.warn(`rule ${M} is not defined`))}function se(H){let{metaSchema:C}=H;C!==void 0&&(H.$data&&this.opts.$data&&(C=he(C)),H.validateSchema=this.compile(C,!0))}const L={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function he(H){return{anyOf:[H,L]}}})(Wa)),Wa}var Es={},ks={},Cs={},tf;function w0(){if(tf)return Cs;tf=1,Object.defineProperty(Cs,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Cs.default=e,Cs}var tr={},rf;function ei(){if(rf)return tr;rf=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.callRef=tr.getValidate=void 0;const e=pn(),t=bt(),r=ye(),n=vt(),s=$s(),o=Re(),a={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:h,it:p}=l,{baseId:v,schemaEnv:w,validateName:y,opts:m,self:_}=p,{root:f}=w;if((h==="#"||h==="#/")&&v===f.baseId)return x();const b=s.resolveRef.call(_,f,v,h);if(b===void 0)throw new e.default(p.opts.uriResolver,v,h);if(b instanceof s.SchemaEnv)return g(b);return $(b);function x(){if(w===f)return c(l,y,w,w.$async);const E=u.scopeValue("root",{ref:f});return c(l,(0,r._)`${E}.validate`,f,f.$async)}function g(E){const j=i(l,E);c(l,j,E,E.$async)}function $(E){const j=u.scopeValue("schema",m.code.source===!0?{ref:E,code:(0,r.stringify)(E)}:{ref:E}),I=u.name("valid"),U=l.subschema({schema:E,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:h},I);l.mergeEvaluated(U),l.ok(I)}}};function i(l,u){const{gen:h}=l;return u.validate?h.scopeValue("validate",{ref:u.validate}):(0,r._)`${h.scopeValue("wrapper",{ref:u})}.validate`}tr.getValidate=i;function c(l,u,h,p){const{gen:v,it:w}=l,{allErrors:y,schemaEnv:m,opts:_}=w,f=_.passContext?n.default.this:r.nil;p?b():x();function b(){if(!m.$async)throw new Error("async schema referenced by sync schema");const E=v.let("valid");v.try(()=>{v.code((0,r._)`await ${(0,t.callValidateCode)(l,u,f)}`),$(u),y||v.assign(E,!0)},j=>{v.if((0,r._)`!(${j} instanceof ${w.ValidationError})`,()=>v.throw(j)),g(j),y||v.assign(E,!1)}),l.ok(E)}function x(){l.result((0,t.callValidateCode)(l,u,f),()=>$(u),()=>g(u))}function g(E){const j=(0,r._)`${E}.errors`;v.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${j} : ${n.default.vErrors}.concat(${j})`),v.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function $(E){var j;if(!w.opts.unevaluated)return;const I=(j=h==null?void 0:h.validate)===null||j===void 0?void 0:j.evaluated;if(w.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(w.props=o.mergeEvaluated.props(v,I.props,w.props));else{const U=v.var("props",(0,r._)`${E}.evaluated.props`);w.props=o.mergeEvaluated.props(v,U,w.props,r.Name)}if(w.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(w.items=o.mergeEvaluated.items(v,I.items,w.items));else{const U=v.var("items",(0,r._)`${E}.evaluated.items`);w.items=o.mergeEvaluated.items(v,U,w.items,r.Name)}}}return tr.callRef=c,tr.default=a,tr}var nf;function sf(){if(nf)return ks;nf=1,Object.defineProperty(ks,"__esModule",{value:!0});const e=w0(),t=ei(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return ks.default=r,ks}var js={},Ns={},of;function $0(){if(of)return Ns;of=1,Object.defineProperty(Ns,"__esModule",{value:!0});const e=ye(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:o,schemaCode:a})=>(0,e.str)`must be ${r[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${a}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:a,data:i,schemaCode:c}=o;o.fail$data((0,e._)`${i} ${r[a].fail} ${c} || isNaN(${i})`)}};return Ns.default=s,Ns}var Rs={},af;function S0(){if(af)return Rs;af=1,Object.defineProperty(Rs,"__esModule",{value:!0});const e=ye(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:s,data:o,schemaCode:a,it:i}=n,c=i.opts.multipleOfPrecision,l=s.let("res"),u=c?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:(0,e._)`${l} !== parseInt(${l})`;n.fail$data((0,e._)`(${a} === 0 || (${l} = ${o}/${a}, ${u}))`)}};return Rs.default=r,Rs}var As={},Ps={},cf;function E0(){if(cf)return Ps;cf=1,Object.defineProperty(Ps,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,s=0,o;for(;s<r;)n++,o=t.charCodeAt(s++),o>=55296&&o<=56319&&s<r&&(o=t.charCodeAt(s),(o&64512)===56320&&s++);return n}return Ps.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ps}var lf;function k0(){if(lf)return As;lf=1,Object.defineProperty(As,"__esModule",{value:!0});const e=ye(),t=Re(),r=E0(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){const i=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:a,data:i,schemaCode:c,it:l}=o,u=a==="maxLength"?e.operators.GT:e.operators.LT,h=l.opts.unicode===!1?(0,e._)`${i}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${i})`;o.fail$data((0,e._)`${h} ${u} ${c}`)}};return As.default=s,As}var Ts={},uf;function C0(){if(uf)return Ts;uf=1,Object.defineProperty(Ts,"__esModule",{value:!0});const e=bt(),t=ye(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,t.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,t._)`{pattern: ${s}}`},code(s){const{data:o,$data:a,schema:i,schemaCode:c,it:l}=s,u=l.opts.unicodeRegExp?"u":"",h=a?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(s,i);s.fail$data((0,t._)`!${h}.test(${o})`)}};return Ts.default=n,Ts}var Os={},df;function j0(){if(df)return Os;df=1,Object.defineProperty(Os,"__esModule",{value:!0});const e=ye(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const o=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:s,data:o,schemaCode:a}=n,i=s==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${o}).length ${i} ${a}`)}};return Os.default=r,Os}var Is={},ff;function N0(){if(ff)return Is;ff=1,Object.defineProperty(Is,"__esModule",{value:!0});const e=bt(),t=ye(),r=Re(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:a,schema:i,schemaCode:c,data:l,$data:u,it:h}=o,{opts:p}=h;if(!u&&i.length===0)return;const v=i.length>=p.loopRequired;if(h.allErrors?w():y(),p.strictRequired){const f=o.parentSchema.properties,{definedProperties:b}=o.it;for(const x of i)if((f==null?void 0:f[x])===void 0&&!b.has(x)){const g=h.schemaEnv.baseId+h.errSchemaPath,$=`required property "${x}" is not defined at "${g}" (strictRequired)`;(0,r.checkStrictMode)(h,$,h.opts.strictRequired)}}function w(){if(v||u)o.block$data(t.nil,m);else for(const f of i)(0,e.checkReportMissingProp)(o,f)}function y(){const f=a.let("missing");if(v||u){const b=a.let("valid",!0);o.block$data(b,()=>_(f,b)),o.ok(b)}else a.if((0,e.checkMissingProp)(o,i,f)),(0,e.reportMissingProp)(o,f),a.else()}function m(){a.forOf("prop",c,f=>{o.setParams({missingProperty:f}),a.if((0,e.noPropertyInData)(a,l,f,p.ownProperties),()=>o.error())})}function _(f,b){o.setParams({missingProperty:f}),a.forOf(f,c,()=>{a.assign(b,(0,e.propertyInData)(a,l,f,p.ownProperties)),a.if((0,t.not)(b),()=>{o.error(),a.break()})},t.nil)}}};return Is.default=s,Is}var Ds={},mf;function R0(){if(mf)return Ds;mf=1,Object.defineProperty(Ds,"__esModule",{value:!0});const e=ye(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const o=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:s,data:o,schemaCode:a}=n,i=s==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${o}.length ${i} ${a}`)}};return Ds.default=r,Ds}var Ms={},Vs={},hf;function ti(){if(hf)return Vs;hf=1,Object.defineProperty(Vs,"__esModule",{value:!0});const e=zd();return e.code='require("ajv/dist/runtime/equal").default',Vs.default=e,Vs}var pf;function A0(){if(pf)return Ms;pf=1,Object.defineProperty(Ms,"__esModule",{value:!0});const e=ys(),t=ye(),r=Re(),n=ti(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:i}})=>(0,t.str)`must NOT have duplicate items (items ## ${i} and ${a} are identical)`,params:({params:{i:a,j:i}})=>(0,t._)`{i: ${a}, j: ${i}}`},code(a){const{gen:i,data:c,$data:l,schema:u,parentSchema:h,schemaCode:p,it:v}=a;if(!l&&!u)return;const w=i.let("valid"),y=h.items?(0,e.getSchemaTypes)(h.items):[];a.block$data(w,m,(0,t._)`${p} === false`),a.ok(w);function m(){const x=i.let("i",(0,t._)`${c}.length`),g=i.let("j");a.setParams({i:x,j:g}),i.assign(w,!0),i.if((0,t._)`${x} > 1`,()=>(_()?f:b)(x,g))}function _(){return y.length>0&&!y.some(x=>x==="object"||x==="array")}function f(x,g){const $=i.name("item"),E=(0,e.checkDataTypes)(y,$,v.opts.strictNumbers,e.DataType.Wrong),j=i.const("indices",(0,t._)`{}`);i.for((0,t._)`;${x}--;`,()=>{i.let($,(0,t._)`${c}[${x}]`),i.if(E,(0,t._)`continue`),y.length>1&&i.if((0,t._)`typeof ${$} == "string"`,(0,t._)`${$} += "_"`),i.if((0,t._)`typeof ${j}[${$}] == "number"`,()=>{i.assign(g,(0,t._)`${j}[${$}]`),a.error(),i.assign(w,!1).break()}).code((0,t._)`${j}[${$}] = ${x}`)})}function b(x,g){const $=(0,r.useFunc)(i,n.default),E=i.name("outer");i.label(E).for((0,t._)`;${x}--;`,()=>i.for((0,t._)`${g} = ${x}; ${g}--;`,()=>i.if((0,t._)`${$}(${c}[${x}], ${c}[${g}])`,()=>{a.error(),i.assign(w,!1).break(E)})))}}};return Ms.default=o,Ms}var Fs={},gf;function P0(){if(gf)return Fs;gf=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=ye(),t=Re(),r=ti(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:a,data:i,$data:c,schemaCode:l,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(a,r.default)}(${i}, ${l})`):o.fail((0,e._)`${u} !== ${i}`)}};return Fs.default=s,Fs}var Ls={},vf;function T0(){if(vf)return Ls;vf=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=ye(),t=Re(),r=ti(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:a,data:i,$data:c,schema:l,schemaCode:u,it:h}=o;if(!c&&l.length===0)throw new Error("enum must have non-empty array");const p=l.length>=h.opts.loopEnum;let v;const w=()=>v??(v=(0,t.useFunc)(a,r.default));let y;if(p||c)y=a.let("valid"),o.block$data(y,m);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const f=a.const("vSchema",u);y=(0,e.or)(...l.map((b,x)=>_(f,x)))}o.pass(y);function m(){a.assign(y,!1),a.forOf("v",u,f=>a.if((0,e._)`${w()}(${i}, ${f})`,()=>a.assign(y,!0).break()))}function _(f,b){const x=l[b];return typeof x=="object"&&x!==null?(0,e._)`${w()}(${i}, ${f}[${b}])`:(0,e._)`${i} === ${x}`}}};return Ls.default=s,Ls}var yf;function bf(){if(yf)return js;yf=1,Object.defineProperty(js,"__esModule",{value:!0});const e=$0(),t=S0(),r=k0(),n=C0(),s=j0(),o=N0(),a=R0(),i=A0(),c=P0(),l=T0(),u=[e.default,t.default,r.default,n.default,s.default,o.default,a.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default];return js.default=u,js}var zs={},Lr={},_f;function xf(){if(_f)return Lr;_f=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.validateAdditionalItems=void 0;const e=ye(),t=Re(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:a,it:i}=o,{items:c}=a;if(!Array.isArray(c)){(0,t.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(o,c)}};function s(o,a){const{gen:i,schema:c,data:l,keyword:u,it:h}=o;h.items=!0;const p=i.const("len",(0,e._)`${l}.length`);if(c===!1)o.setParams({len:a.length}),o.pass((0,e._)`${p} <= ${a.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(h,c)){const w=i.var("valid",(0,e._)`${p} <= ${a.length}`);i.if((0,e.not)(w),()=>v(w)),o.ok(w)}function v(w){i.forRange("i",a.length,p,y=>{o.subschema({keyword:u,dataProp:y,dataPropType:t.Type.Num},w),h.allErrors||i.if((0,e.not)(w),()=>i.break())})}}return Lr.validateAdditionalItems=s,Lr.default=n,Lr}var qs={},zr={},wf;function $f(){if(wf)return zr;wf=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.validateTuple=void 0;const e=ye(),t=Re(),r=bt(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:a,it:i}=o;if(Array.isArray(a))return s(o,"additionalItems",a);i.items=!0,!(0,t.alwaysValidSchema)(i,a)&&o.ok((0,r.validateArray)(o))}};function s(o,a,i=o.schema){const{gen:c,parentSchema:l,data:u,keyword:h,it:p}=o;y(l),p.opts.unevaluated&&i.length&&p.items!==!0&&(p.items=t.mergeEvaluated.items(c,i.length,p.items));const v=c.name("valid"),w=c.const("len",(0,e._)`${u}.length`);i.forEach((m,_)=>{(0,t.alwaysValidSchema)(p,m)||(c.if((0,e._)`${w} > ${_}`,()=>o.subschema({keyword:h,schemaProp:_,dataProp:_},v)),o.ok(v))});function y(m){const{opts:_,errSchemaPath:f}=p,b=i.length,x=b===m.minItems&&(b===m.maxItems||m[a]===!1);if(_.strictTuples&&!x){const g=`"${h}" is ${b}-tuple, but minItems or maxItems/${a} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(p,g,_.strictTuples)}}}return zr.validateTuple=s,zr.default=n,zr}var Sf;function O0(){if(Sf)return qs;Sf=1,Object.defineProperty(qs,"__esModule",{value:!0});const e=$f(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return qs.default=t,qs}var Us={},Ef;function I0(){if(Ef)return Us;Ef=1,Object.defineProperty(Us,"__esModule",{value:!0});const e=ye(),t=Re(),r=bt(),n=xf(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:i,parentSchema:c,it:l}=a,{prefixItems:u}=c;l.items=!0,!(0,t.alwaysValidSchema)(l,i)&&(u?(0,n.validateAdditionalItems)(a,u):a.ok((0,r.validateArray)(a)))}};return Us.default=o,Us}var Bs={},kf;function D0(){if(kf)return Bs;kf=1,Object.defineProperty(Bs,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:o}})=>o===void 0?(0,e.str)`must contain at least ${s} valid item(s)`:(0,e.str)`must contain at least ${s} and no more than ${o} valid item(s)`,params:({params:{min:s,max:o}})=>o===void 0?(0,e._)`{minContains: ${s}}`:(0,e._)`{minContains: ${s}, maxContains: ${o}}`},code(s){const{gen:o,schema:a,parentSchema:i,data:c,it:l}=s;let u,h;const{minContains:p,maxContains:v}=i;l.opts.next?(u=p===void 0?1:p,h=v):u=1;const w=o.const("len",(0,e._)`${c}.length`);if(s.setParams({min:u,max:h}),h===void 0&&u===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&u>h){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,t.alwaysValidSchema)(l,a)){let b=(0,e._)`${w} >= ${u}`;h!==void 0&&(b=(0,e._)`${b} && ${w} <= ${h}`),s.pass(b);return}l.items=!0;const y=o.name("valid");h===void 0&&u===1?_(y,()=>o.if(y,()=>o.break())):u===0?(o.let(y,!0),h!==void 0&&o.if((0,e._)`${c}.length > 0`,m)):(o.let(y,!1),m()),s.result(y,()=>s.reset());function m(){const b=o.name("_valid"),x=o.let("count",0);_(b,()=>o.if(b,()=>f(x)))}function _(b,x){o.forRange("i",0,w,g=>{s.subschema({keyword:"contains",dataProp:g,dataPropType:t.Type.Num,compositeRule:!0},b),x()})}function f(b){o.code((0,e._)`${b}++`),h===void 0?o.if((0,e._)`${b} >= ${u}`,()=>o.assign(y,!0).break()):(o.if((0,e._)`${b} > ${h}`,()=>o.assign(y,!1).break()),u===1?o.assign(y,!0):o.if((0,e._)`${b} >= ${u}`,()=>o.assign(y,!0)))}}};return Bs.default=n,Bs}var ri={},Cf;function ni(){return Cf||(Cf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ye(),r=Re(),n=bt();e.error={message:({params:{property:c,depsCount:l,deps:u}})=>{const h=l===1?"property":"properties";return(0,t.str)`must have ${h} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:h}})=>(0,t._)`{property: ${c},
|
|
142
|
-
missingProperty: ${
|
|
51
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return S.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},V_=Wu,L_=Hu,R_=Ku,q_=Gu,U_=Ju,Z_=td,B_=nd,W_=Xu,H_=ed;function K_({...e}){return d.jsx(V_,{"data-slot":"alert-dialog",...e})}function G_({...e}){return d.jsx(L_,{"data-slot":"alert-dialog-trigger",...e})}function J_({...e}){return d.jsx(R_,{"data-slot":"alert-dialog-portal",...e})}function Y_({className:e,...t}){return d.jsx(q_,{"data-slot":"alert-dialog-overlay",className:ge("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function X_({className:e,...t}){return d.jsxs(J_,{children:[d.jsx(Y_,{}),d.jsx(U_,{"data-slot":"alert-dialog-content",className:ge("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function Q_({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-header",className:ge("flex flex-col gap-2 text-center sm:text-left",e),...t})}function e0({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-footer",className:ge("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function t0({className:e,...t}){return d.jsx(W_,{"data-slot":"alert-dialog-title",className:ge("text-lg font-semibold",e),...t})}function r0({className:e,...t}){return d.jsx(H_,{"data-slot":"alert-dialog-description",className:ge("text-muted-foreground text-sm",e),...t})}function n0({className:e,...t}){return d.jsx(Z_,{className:ge(Pa(),e),...t})}function o0({className:e,...t}){return d.jsx(B_,{className:ge(Pa({variant:"outline"}),e),...t})}const s0=({theme:e,readOnly:t,control:r,fieldPath:n,isSimpleType:o,isRootLevel:s,onRemove:a,onOpenSettings:i,onTypeChange:c})=>{const l=Hr({control:r,name:`${n}.key`});return d.jsxs("div",{className:"p-2 flex gap-2","data-testid":"field",children:[o&&d.jsx(Mt,{control:r,name:`${n}.key`,render:({field:u})=>d.jsx(Ce,{placeholder:"field_name",disabled:t,className:"w-40",...u})}),d.jsx(Mt,{control:r,name:`${n}.schema.type`,render:({field:u})=>d.jsxs(Pr,{disabled:t,onValueChange:p=>{u.onChange(p),c(p)},value:u.value,children:[d.jsx(Ar,{className:"w-40",children:d.jsx(Nr,{})}),d.jsx(Tr,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:a_.map(p=>d.jsx(Et,{value:p,children:p},p))})]})}),d.jsx(Mt,{control:r,name:`${n}.schema.title`,render:({field:u})=>d.jsx(Ce,{placeholder:"Title",disabled:t,className:"flex-1",...u})}),d.jsx(Mt,{control:r,name:`${n}.schema.description`,render:({field:u})=>d.jsx(Ce,{placeholder:"Description",disabled:t,className:"flex-1",...u})}),o&&d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Mt,{control:r,name:`${n}.isRequired`,render:({field:u})=>d.jsxs(yu,{children:[d.jsx(bu,{asChild:!0,children:d.jsx(Bt,{"data-testid":"required",disabled:t,size:"icon",variant:u.value?"default":"outline",onClick:()=>{u.onChange(!u.value)},children:d.jsx(Fl,{})})}),d.jsx(_u,{children:d.jsx("p",{children:"Required"})})]})}),d.jsx("div",{className:"border-l-2 border-input"})]}),d.jsx(Bt,{size:"icon",variant:"ghost",onClick:()=>i(`${n}.schema`),children:d.jsx(jl,{className:"text-blue-500"})}),s&&d.jsxs(K_,{children:[d.jsx(G_,{asChild:!0,children:d.jsx(Bt,{size:"icon",variant:"ghost","data-testid":"delete-button",disabled:t,children:d.jsx(Iy,{className:"text-red-500"})})}),d.jsxs(X_,{className:ge("border-input",e),children:[d.jsxs(Q_,{children:[d.jsx(t0,{className:"text-foreground",children:"Are you absolutely sure?"}),d.jsxs(r0,{children:["This action cannot be undone. This will permanently delete field"," ",l,"."]})]}),d.jsxs(e0,{children:[d.jsx(o0,{className:"text-foreground",children:"Cancel"}),d.jsx(n0,{onClick:a,children:"Delete"})]})]})]})]})},Qn=({theme:e,readOnly:t,fieldPath:r,onRemove:n,onOpenSettings:o,isSimpleType:s=!0,isRootLevel:a=!1})=>{const{control:i,setValue:c}=Be(),l=Hr({control:i,name:`${r}.schema.type`}),{fields:u,append:p,remove:h}=Wi({control:i,name:`${r}.schema.properties`}),v=()=>{const y=Gr(6);p({id:y,key:`field_${y}`,isRequired:!1,schema:{type:"string"}})},w=y=>{let m={};y==="object"?m={type:"object",properties:[],additionalProperties:!0}:y==="array"?m={type:"array"}:m={type:y},c(`${r}.schema`,m)};return d.jsxs("div",{children:[d.jsx(s0,{theme:e,readOnly:t,control:i,fieldPath:r,isSimpleType:s,isRootLevel:a,onRemove:n,onOpenSettings:o,onTypeChange:w}),l==="object"&&d.jsxs("div",{className:"ml-2 pl-2 border-l-2 border-input",children:[u.map((y,m)=>d.jsx(Qn,{readOnly:t,theme:e,fieldPath:`${r}.schema.properties.${m}`,onRemove:()=>h(m),onOpenSettings:o,isRootLevel:!0},y.id)),d.jsxs(Bt,{disabled:t,size:"sm",variant:"outline",onClick:v,className:"ml-2 mt-2 mb-4 flex gap-2 text-green-500",children:[d.jsx(zl,{})," Add Field"]})]}),l==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input mr-11","data-testid":"field-array",children:d.jsx(Qn,{theme:e,readOnly:t,fieldPath:`${r}.schema.items`,onRemove:()=>{},onOpenSettings:o,isSimpleType:!1})})]},`${r}-${l}`)};function a0({theme:e,readOnly:t,fields:r,onRemove:n,onOpenSettings:o}){return d.jsx("div",{className:"pl-2 border-l-2 border-input",children:r.map((s,a)=>d.jsx(Qn,{readOnly:t,theme:e,fieldPath:`properties.${a}`,onRemove:()=>n(a),onOpenSettings:o,isRootLevel:!0},s.fieldId))})}var i0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],c0=i0.reduce((e,t)=>{const r=xa(`Primitive.${t}`),n=S.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),l0="Label",od=S.forwardRef((e,t)=>d.jsx(c0.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));od.displayName=l0;var u0=od;function d0({className:e,...t}){return d.jsx(u0,{"data-slot":"label",className:ge("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const sd=J.createContext({}),Ee=({...e})=>d.jsx(sd.Provider,{value:{name:e.name},children:d.jsx(Mt,{...e})}),Fa=()=>{const e=J.useContext(sd),t=J.useContext(ad),{getFieldState:r}=Be(),n=Ni({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},ad=J.createContext({});function ve({className:e,...t}){const r=J.useId();return d.jsx(ad.Provider,{value:{id:r},children:d.jsx("div",{"data-slot":"form-item",className:ge("grid gap-2",e),...t})})}function ye({className:e,...t}){const{error:r,formItemId:n}=Fa();return d.jsx(d0,{"data-slot":"form-label","data-error":!!r,className:ge("data-[error=true]:text-destructive",e),htmlFor:n,...t})}function we({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=Fa();return d.jsx(Ca,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function $e({className:e,...t}){const{error:r,formMessageId:n}=Fa(),o=r?String(r?.message??""):t.children;return o?d.jsx("p",{"data-slot":"form-message",id:n,className:ge("text-destructive text-sm",e),...t,children:o}):null}var eo="Checkbox",[f0]=yt(eo),[p0,Va]=f0(eo);function h0(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:s,form:a,name:i,onCheckedChange:c,required:l,value:u="on",internal_do_not_use_render:p}=e,[h,v]=tr({prop:r,defaultProp:o??!1,onChange:c,caller:eo}),[w,y]=S.useState(null),[m,_]=S.useState(null),f=S.useRef(!1),b=w?!!a||!!w.closest("form"):!0,$={checked:h,disabled:s,setChecked:v,control:w,setControl:y,name:i,form:a,value:u,hasConsumerStoppedPropagationRef:f,required:l,defaultChecked:Ht(o)?!1:o,isFormControl:b,bubbleInput:m,setBubbleInput:_};return d.jsx(p0,{scope:t,...$,children:m0(p)?p($):n})}var id="CheckboxTrigger",cd=S.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:s,value:a,disabled:i,checked:c,required:l,setControl:u,setChecked:p,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:w}=Va(id,e),y=Ne(o,u),m=S.useRef(c);return S.useEffect(()=>{const _=s?.form;if(_){const f=()=>p(m.current);return _.addEventListener("reset",f),()=>_.removeEventListener("reset",f)}},[s,p]),d.jsx(Se.button,{type:"button",role:"checkbox","aria-checked":Ht(c)?"mixed":c,"aria-required":l,"data-state":hd(c),"data-disabled":i?"":void 0,disabled:i,value:a,...n,ref:y,onKeyDown:me(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:me(r,_=>{p(f=>Ht(f)?!0:!f),w&&v&&(h.current=_.isPropagationStopped(),h.current||_.stopPropagation())})})});cd.displayName=id;var ld=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:s,required:a,disabled:i,value:c,onCheckedChange:l,form:u,...p}=e;return d.jsx(h0,{__scopeCheckbox:r,checked:o,defaultChecked:s,disabled:i,required:a,onCheckedChange:l,name:n,form:u,value:c,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(cd,{...p,ref:t,__scopeCheckbox:r}),h&&d.jsx(pd,{__scopeCheckbox:r})]})})});ld.displayName=eo;var ud="CheckboxIndicator",dd=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,s=Va(ud,r);return d.jsx(Wt,{present:n||Ht(s.checked)||s.checked===!0,children:d.jsx(Se.span,{"data-state":hd(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});dd.displayName=ud;var fd="CheckboxBubbleInput",pd=S.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:a,required:i,disabled:c,name:l,value:u,form:p,bubbleInput:h,setBubbleInput:v}=Va(fd,e),w=Ne(r,v),y=la(s),m=aa(n);S.useEffect(()=>{const f=h;if(!f)return;const b=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(b,"checked").set,E=!o.current;if(y!==s&&g){const k=new Event("click",{bubbles:E});f.indeterminate=Ht(s),g.call(f,Ht(s)?!1:s),f.dispatchEvent(k)}},[h,y,s,o]);const _=S.useRef(Ht(s)?!1:s);return d.jsx(Se.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??_.current,required:i,disabled:c,name:l,value:u,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});pd.displayName=fd;function m0(e){return typeof e=="function"}function Ht(e){return e==="indeterminate"}function hd(e){return Ht(e)?"indeterminate":e?"checked":"unchecked"}function to({className:e,...t}){return d.jsx(ld,{"data-slot":"checkbox",className:ge("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(dd,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:d.jsx(Dl,{className:"size-3.5"})})})}const g0=cu("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function md({className:e,variant:t,asChild:r=!1,...n}){const o=r?Ca:"span";return d.jsx(o,{"data-slot":"badge",className:ge(g0({variant:t}),e),...n})}const v0=/[\n#?=&\t,./-]+/,y0=/^[^a-zA-Z0-9]*|[^a-zA-Z0-9]*$/g,b0=J.createContext(null),nn=J.forwardRef(({children:e,value:t,onValueChange:r,placeholder:n,maxItems:o,minItems:s,className:a,disabled:i=!1,dir:c,...l},u)=>{const[p,h]=J.useState(-1),[v,w]=J.useState(""),[y,m]=J.useState(i),[_,f]=J.useState(i),[b,$]=J.useState(!1),[g,E]=J.useState(""),k=s??0,C=o??1/0,O=J.useCallback(G=>{!t.includes(G)&&t.length<C&&r([...t,G])},[t]),V=J.useCallback(G=>{t.includes(G)&&t.length>k&&r(t.filter(oe=>oe!==G))},[t]),z=J.useCallback(G=>{G.preventDefault();const oe=G.clipboardData.getData("text").split(v0),F=[...t];oe.forEach(fe=>{const H=fe.replaceAll(y0,"").trim();H.length>0&&!F.includes(H)&&F.length<C&&F.push(H)}),r(F),w("")},[t]),j=J.useCallback(G=>{const oe=G.currentTarget,F=oe.value.substring(oe.selectionStart??0,oe.selectionEnd??0);E(F),$(F===v)},[v]);J.useEffect(()=>{(()=>{i==!1&&(t.length-1>=k?f(!1):f(!0),t.length+1<=C?m(!1):m(!0))})()},[t]);const R=J.useCallback(async G=>{G.stopPropagation();const oe=()=>{const I=p+1>t.length-1?-1:p+1;h(I)},F=()=>{const I=p-1<0?t.length-1:p-1;h(I)},fe=()=>{const I=p-1<=0?t.length-1===0?-1:0:p-1;h(I)},H=G.currentTarget;switch(G.key){case"ArrowLeft":c==="rtl"?t.length>0&&p!==-1&&oe():t.length>0&&H.selectionStart===0&&F();break;case"ArrowRight":c==="rtl"?t.length>0&&H.selectionStart===0&&F():t.length>0&&p!==-1&&oe();break;case"Backspace":case"Delete":t.length>0&&(p!==-1&&p<t.length?(V(t[p]),fe()):H.selectionStart===0&&(g===v||b)&&V(t[t.length-1]));break;case"Escape":const I=p===-1?t.length-1:-1;h(I);break;case"Enter":v.trim()!==""&&(G.preventDefault(),O(v),w(""));break}},[p,t,v,V]),Z=J.useCallback(G=>{G.preventDefault(),G.stopPropagation()},[]),ne=J.useCallback(G=>{w(G.currentTarget.value)},[]);return d.jsx(b0.Provider,{value:{value:t,onValueChange:r,inputValue:v,setInputValue:w,activeIndex:p,setActiveIndex:h},children:d.jsxs("div",{...l,ref:u,dir:c,className:ge("flex items-center flex-wrap gap-1 rounded-lg bg-background overflow-hidden",{"focus-within:ring-ring":p===-1},a),children:[t.map((G,oe)=>d.jsxs(md,{tabIndex:p!==-1?0:p,"aria-disabled":_,"data-active":p===oe,className:ge("relative px-1 rounded flex items-center gap-1 data-[active='true']:ring-2 data-[active='true']:ring-muted-foreground truncate aria-disabled:opacity-50 aria-disabled:cursor-not-allowed"),variant:"secondary",children:[d.jsx("span",{className:"text-xs",children:G}),d.jsxs("button",{type:"button","aria-label":`Remove ${G} option`,"aria-roledescription":"button to remove option",disabled:_,onMouseDown:Z,onClick:()=>V(G),className:"disabled:cursor-not-allowed",children:[d.jsxs("span",{className:"sr-only",children:["Remove ",G," option"]}),d.jsx(Vl,{className:"h-4 w-4 hover:stroke-destructive"})]})]},G)),d.jsx(Ce,{tabIndex:0,"aria-label":"input tag",disabled:y,onKeyDown:R,onPaste:z,value:v,onSelect:j,onChange:p===-1?ne:void 0,placeholder:n,onClick:()=>h(-1),className:ge("border border-input h-9 min-w-fit flex-1 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0 placeholder:text-muted-foreground px-2",p!==-1&&"caret-transparent")})]})})});nn.displayName="TagsInput";const _0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:o}=Be(),s=o(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ee,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Default Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ee,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ee,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Exclusive Minimum"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Exclusive Maximum"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})})]}),d.jsx(Ee,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Multiple Of"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Format"}),d.jsx(we,{children:d.jsxs(Pr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Ar,{children:d.jsx(Nr,{placeholder:"Choose data type"})}),d.jsxs(Tr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Et,{value:"none",children:"none"}),c_.map(i=>d.jsx(Et,{value:i,children:i},i))]})]})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(ve,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(we,{children:d.jsx(to,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(ye,{className:"ml-2",children:"Enable Enum"}),d.jsx($e,{})]})}),s&&d.jsx(Ee,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Enum Values"}),d.jsx(we,{children:d.jsx(nn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx($e,{})]})})]})},w0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:o}=Be(),s=o(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ee,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Default Value"}),d.jsx(we,{children:d.jsx(Ce,{disabled:r,...a})}),d.jsx($e,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ee,{control:n,name:`${t}.minLength`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Length"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:n,name:`${t}.maxLength`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Length"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})})]}),d.jsx(Ee,{control:n,name:`${t}.pattern`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Pattern (Regular Expression)"}),d.jsx(we,{children:d.jsx(Ce,{disabled:r,...a})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Format"}),d.jsxs(Pr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(we,{children:d.jsx(Ar,{children:d.jsx(Nr,{placeholder:"Choose data type"})})}),d.jsxs(Tr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Et,{value:"none",children:"none"}),l_.map(i=>d.jsx(Et,{value:i,children:i},i))]})]}),d.jsx($e,{})]})}),d.jsx(Ee,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(ve,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(we,{children:d.jsx(to,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(ye,{className:"ml-2",children:"Enable Enum"}),d.jsx($e,{})]})}),s&&d.jsx(Ee,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Enum Values"}),d.jsx(we,{children:d.jsx(nn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx($e,{})]})})]})},$0=({theme:e,basePath:t,readOnly:r})=>{const{control:n}=Be();return d.jsx("form",{children:d.jsx(Ee,{control:n,name:`${t}.default`,render:({field:o})=>d.jsxs(ve,{className:"flex gap-2",children:[d.jsx(ye,{children:"Default Value"}),d.jsxs(Pr,{onValueChange:o.onChange,defaultValue:o.value,disabled:r,children:[d.jsx(we,{children:d.jsx(Ar,{children:d.jsx(Nr,{placeholder:"False"})})}),d.jsxs(Tr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Et,{value:"true","data-testid":"true",children:"True"}),d.jsx(Et,{value:"false",children:"False"})]})]}),d.jsx($e,{})]})})})},S0=({basePath:e,readOnly:t})=>{const{control:r}=Be();return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ee,{control:r,name:`${e}.minItems`,render:({field:n})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Items"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,...n,value:n.value??"",onChange:o=>n.onChange(o.target.value===""?null:Number(o.target.value))})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:r,name:`${e}.maxItems`,render:({field:n})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Items"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,...n,value:n.value??"",onChange:o=>n.onChange(o.target.value===""?null:Number(o.target.value))})}),d.jsx($e,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ee,{control:r,name:`${e}.minContains`,render:({field:n})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Contains"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,...n,value:n.value??"",onChange:o=>n.onChange(o.target.value===""?null:Number(o.target.value))})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:r,name:`${e}.maxContains`,render:({field:n})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Contains"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,...n,value:n.value??"",onChange:o=>n.onChange(o.target.value===""?null:Number(o.target.value))})}),d.jsx($e,{})]})})]}),d.jsx(Ee,{control:r,name:`${e}.uniqueItems`,render:({field:n})=>d.jsxs(ve,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(we,{children:d.jsx(to,{checked:n.value,onCheckedChange:n.onChange,disabled:t})}),d.jsx(ye,{className:"ml-2",children:"Unique Items"}),d.jsx($e,{})]})})]})},E0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:o}=Be(),s=o(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ee,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Default Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ee,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ee,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Exclusive Minimum"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Exclusive Maximum"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})})]}),d.jsx(Ee,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Multiple Of"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Format"}),d.jsx(we,{children:d.jsxs(Pr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Ar,{children:d.jsx(Nr,{placeholder:"Choose data type"})}),d.jsxs(Tr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Et,{value:"none",children:"none"}),i_.map(i=>d.jsx(Et,{value:i,children:i},i))]})]})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(ve,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(we,{children:d.jsx(to,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange,defaultValue:0})}),d.jsx(ye,{className:"ml-2",children:"Enable Enum"}),d.jsx($e,{})]})}),s&&d.jsx(Ee,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Enum Values"}),d.jsx(we,{children:d.jsx(nn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx($e,{})]})})]})};function gd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ro={exports:{}},La={},It={},ar={},Ra={},qa={},Ua={},vd;function no(){return vd||(vd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((b,$)=>`${b}${$}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((b,$)=>($ instanceof r&&(b[$.str]=(b[$.str]||0)+1),b),{})}}e._Code=n,e.nil=new n("");function o(_,...f){const b=[_[0]];let $=0;for(;$<f.length;)i(b,f[$]),b.push(_[++$]);return new n(b)}e._=o;const s=new n("+");function a(_,...f){const b=[v(_[0])];let $=0;for(;$<f.length;)b.push(s),i(b,f[$]),b.push(s,v(_[++$]));return c(b),new n(b)}e.str=a;function i(_,f){f instanceof n?_.push(...f._items):f instanceof r?_.push(f):_.push(p(f))}e.addCodeArg=i;function c(_){let f=1;for(;f<_.length-1;){if(_[f]===s){const b=l(_[f-1],_[f+1]);if(b!==void 0){_.splice(f-1,3,b);continue}_[f++]="+"}f++}}function l(_,f){if(f==='""')return _;if(_==='""')return f;if(typeof _=="string")return f instanceof r||_[_.length-1]!=='"'?void 0:typeof f!="string"?`${_.slice(0,-1)}${f}"`:f[0]==='"'?_.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(_ instanceof r))return`"${_}${f.slice(1)}`}function u(_,f){return f.emptyStr()?_:_.emptyStr()?f:a`${_}${f}`}e.strConcat=u;function p(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:v(Array.isArray(_)?_.join(","):_)}function h(_){return new n(v(_))}e.stringify=h;function v(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function w(_){return typeof _=="string"&&e.IDENTIFIER.test(_)?new n(`.${_}`):o`[${_}]`}e.getProperty=w;function y(_){if(typeof _=="string"&&e.IDENTIFIER.test(_))return new n(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}e.getEsmExportName=y;function m(_){return new n(_.toString())}e.regexpCode=m})(Ua)),Ua}var Za={},yd;function bd(){return yd||(yd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=no();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,p;if(!((p=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||p===void 0)&&p.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=o;class s extends t.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:p}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(u)}[${p}]`}}e.ValueScopeName=s;const a=(0,t._)`\n`;class i extends o{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new s(l,this._newName(l))}value(l,u){var p;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const h=this.toName(l),{prefix:v}=h,w=(p=u.key)!==null&&p!==void 0?p:u.ref;let y=this._values[v];if(y){const f=y.get(w);if(f)return f}else y=this._values[v]=new Map;y.set(w,h);const m=this._scope[v]||(this._scope[v]=[]),_=m.length;return m[_]=u.ref,h.setValue(u,{property:v,itemIndex:_}),h}getValue(l,u){const p=this._values[l];if(p)return p.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${l}${p.scopePath}`})}scopeCode(l=this._values,u,p){return this._reduceValues(l,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},u,p)}_reduceValues(l,u,p={},h){let v=t.nil;for(const w in l){const y=l[w];if(!y)continue;const m=p[w]=p[w]||new Map;y.forEach(_=>{if(m.has(_))return;m.set(_,n.Started);let f=u(_);if(f){const b=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${b} ${_} = ${f};${this.opts._n}`}else if(f=h?.(_))v=(0,t._)`${v}${f}${this.opts._n}`;else throw new r(_);m.set(_,n.Completed)})}return v}}e.ValueScope=i})(Za)),Za}var _d;function pe(){return _d||(_d=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=no(),r=bd();var n=no();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=bd();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(x,N){return this}}class a extends s{constructor(x,N,L){super(),this.varKind=x,this.name=N,this.rhs=L}render({es5:x,_n:N}){const L=x?r.varKinds.var:this.varKind,q=this.rhs===void 0?"":` = ${this.rhs}`;return`${L} ${this.name}${q};`+N}optimizeNames(x,N){if(x[this.name.str])return this.rhs&&(this.rhs=Z(this.rhs,x,N)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends s{constructor(x,N,L){super(),this.lhs=x,this.rhs=N,this.sideEffects=L}render({_n:x}){return`${this.lhs} = ${this.rhs};`+x}optimizeNames(x,N){if(!(this.lhs instanceof t.Name&&!x[this.lhs.str]&&!this.sideEffects))return this.rhs=Z(this.rhs,x,N),this}get names(){const x=this.lhs instanceof t.Name?{}:{...this.lhs.names};return R(x,this.rhs)}}class c extends i{constructor(x,N,L,q){super(x,L,q),this.op=N}render({_n:x}){return`${this.lhs} ${this.op}= ${this.rhs};`+x}}class l extends s{constructor(x){super(),this.label=x,this.names={}}render({_n:x}){return`${this.label}:`+x}}class u extends s{constructor(x){super(),this.label=x,this.names={}}render({_n:x}){return`break${this.label?` ${this.label}`:""};`+x}}class p extends s{constructor(x){super(),this.error=x}render({_n:x}){return`throw ${this.error};`+x}get names(){return this.error.names}}class h extends s{constructor(x){super(),this.code=x}render({_n:x}){return`${this.code};`+x}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(x,N){return this.code=Z(this.code,x,N),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends s{constructor(x=[]){super(),this.nodes=x}render(x){return this.nodes.reduce((N,L)=>N+L.render(x),"")}optimizeNodes(){const{nodes:x}=this;let N=x.length;for(;N--;){const L=x[N].optimizeNodes();Array.isArray(L)?x.splice(N,1,...L):L?x[N]=L:x.splice(N,1)}return x.length>0?this:void 0}optimizeNames(x,N){const{nodes:L}=this;let q=L.length;for(;q--;){const Q=L[q];Q.optimizeNames(x,N)||(ne(x,Q.names),L.splice(q,1))}return L.length>0?this:void 0}get names(){return this.nodes.reduce((x,N)=>j(x,N.names),{})}}class w extends v{render(x){return"{"+x._n+super.render(x)+"}"+x._n}}class y extends v{}class m extends w{}m.kind="else";class _ extends w{constructor(x,N){super(N),this.condition=x}render(x){let N=`if(${this.condition})`+super.render(x);return this.else&&(N+="else "+this.else.render(x)),N}optimizeNodes(){super.optimizeNodes();const x=this.condition;if(x===!0)return this.nodes;let N=this.else;if(N){const L=N.optimizeNodes();N=this.else=Array.isArray(L)?new m(L):L}if(N)return x===!1?N instanceof _?N:N.nodes:this.nodes.length?this:new _(G(x),N instanceof _?[N]:N.nodes);if(!(x===!1||!this.nodes.length))return this}optimizeNames(x,N){var L;if(this.else=(L=this.else)===null||L===void 0?void 0:L.optimizeNames(x,N),!!(super.optimizeNames(x,N)||this.else))return this.condition=Z(this.condition,x,N),this}get names(){const x=super.names;return R(x,this.condition),this.else&&j(x,this.else.names),x}}_.kind="if";class f extends w{}f.kind="for";class b extends f{constructor(x){super(),this.iteration=x}render(x){return`for(${this.iteration})`+super.render(x)}optimizeNames(x,N){if(super.optimizeNames(x,N))return this.iteration=Z(this.iteration,x,N),this}get names(){return j(super.names,this.iteration.names)}}class $ extends f{constructor(x,N,L,q){super(),this.varKind=x,this.name=N,this.from=L,this.to=q}render(x){const N=x.es5?r.varKinds.var:this.varKind,{name:L,from:q,to:Q}=this;return`for(${N} ${L}=${q}; ${L}<${Q}; ${L}++)`+super.render(x)}get names(){const x=R(super.names,this.from);return R(x,this.to)}}class g extends f{constructor(x,N,L,q){super(),this.loop=x,this.varKind=N,this.name=L,this.iterable=q}render(x){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(x)}optimizeNames(x,N){if(super.optimizeNames(x,N))return this.iterable=Z(this.iterable,x,N),this}get names(){return j(super.names,this.iterable.names)}}class E extends w{constructor(x,N,L){super(),this.name=x,this.args=N,this.async=L}render(x){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(x)}}E.kind="func";class k extends v{render(x){return"return "+super.render(x)}}k.kind="return";class C extends w{render(x){let N="try"+super.render(x);return this.catch&&(N+=this.catch.render(x)),this.finally&&(N+=this.finally.render(x)),N}optimizeNodes(){var x,N;return super.optimizeNodes(),(x=this.catch)===null||x===void 0||x.optimizeNodes(),(N=this.finally)===null||N===void 0||N.optimizeNodes(),this}optimizeNames(x,N){var L,q;return super.optimizeNames(x,N),(L=this.catch)===null||L===void 0||L.optimizeNames(x,N),(q=this.finally)===null||q===void 0||q.optimizeNames(x,N),this}get names(){const x=super.names;return this.catch&&j(x,this.catch.names),this.finally&&j(x,this.finally.names),x}}class O extends w{constructor(x){super(),this.error=x}render(x){return`catch(${this.error})`+super.render(x)}}O.kind="catch";class V extends w{render(x){return"finally"+super.render(x)}}V.kind="finally";class z{constructor(x,N={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...N,_n:N.lines?`
|
|
52
|
+
`:""},this._extScope=x,this._scope=new r.Scope({parent:x}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(x){return this._scope.name(x)}scopeName(x){return this._extScope.name(x)}scopeValue(x,N){const L=this._extScope.value(x,N);return(this._values[L.prefix]||(this._values[L.prefix]=new Set)).add(L),L}getScopeValue(x,N){return this._extScope.getValue(x,N)}scopeRefs(x){return this._extScope.scopeRefs(x,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(x,N,L,q){const Q=this._scope.toName(N);return L!==void 0&&q&&(this._constants[Q.str]=L),this._leafNode(new a(x,Q,L)),Q}const(x,N,L){return this._def(r.varKinds.const,x,N,L)}let(x,N,L){return this._def(r.varKinds.let,x,N,L)}var(x,N,L){return this._def(r.varKinds.var,x,N,L)}assign(x,N,L){return this._leafNode(new i(x,N,L))}add(x,N){return this._leafNode(new c(x,e.operators.ADD,N))}code(x){return typeof x=="function"?x():x!==t.nil&&this._leafNode(new h(x)),this}object(...x){const N=["{"];for(const[L,q]of x)N.length>1&&N.push(","),N.push(L),(L!==q||this.opts.es5)&&(N.push(":"),(0,t.addCodeArg)(N,q));return N.push("}"),new t._Code(N)}if(x,N,L){if(this._blockNode(new _(x)),N&&L)this.code(N).else().code(L).endIf();else if(N)this.code(N).endIf();else if(L)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(x){return this._elseNode(new _(x))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(_,m)}_for(x,N){return this._blockNode(x),N&&this.code(N).endFor(),this}for(x,N){return this._for(new b(x),N)}forRange(x,N,L,q,Q=this.opts.es5?r.varKinds.var:r.varKinds.let){const ue=this._scope.toName(x);return this._for(new $(Q,ue,N,L),()=>q(ue))}forOf(x,N,L,q=r.varKinds.const){const Q=this._scope.toName(x);if(this.opts.es5){const ue=N instanceof t.Name?N:this.var("_arr",N);return this.forRange("_i",0,(0,t._)`${ue}.length`,se=>{this.var(Q,(0,t._)`${ue}[${se}]`),L(Q)})}return this._for(new g("of",q,Q,N),()=>L(Q))}forIn(x,N,L,q=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(x,(0,t._)`Object.keys(${N})`,L);const Q=this._scope.toName(x);return this._for(new g("in",q,Q,N),()=>L(Q))}endFor(){return this._endBlockNode(f)}label(x){return this._leafNode(new l(x))}break(x){return this._leafNode(new u(x))}return(x){const N=new k;if(this._blockNode(N),this.code(x),N.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(x,N,L){if(!N&&!L)throw new Error('CodeGen: "try" without "catch" and "finally"');const q=new C;if(this._blockNode(q),this.code(x),N){const Q=this.name("e");this._currNode=q.catch=new O(Q),N(Q)}return L&&(this._currNode=q.finally=new V,this.code(L)),this._endBlockNode(O,V)}throw(x){return this._leafNode(new p(x))}block(x,N){return this._blockStarts.push(this._nodes.length),x&&this.code(x).endBlock(N),this}endBlock(x){const N=this._blockStarts.pop();if(N===void 0)throw new Error("CodeGen: not in self-balancing block");const L=this._nodes.length-N;if(L<0||x!==void 0&&L!==x)throw new Error(`CodeGen: wrong number of nodes: ${L} vs ${x} expected`);return this._nodes.length=N,this}func(x,N=t.nil,L,q){return this._blockNode(new E(x,N,L)),q&&this.code(q).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(x=1){for(;x-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(x){return this._currNode.nodes.push(x),this}_blockNode(x){this._currNode.nodes.push(x),this._nodes.push(x)}_endBlockNode(x,N){const L=this._currNode;if(L instanceof x||N&&L instanceof N)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${N?`${x.kind}/${N.kind}`:x.kind}"`)}_elseNode(x){const N=this._currNode;if(!(N instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=N.else=x,this}get _root(){return this._nodes[0]}get _currNode(){const x=this._nodes;return x[x.length-1]}set _currNode(x){const N=this._nodes;N[N.length-1]=x}}e.CodeGen=z;function j(D,x){for(const N in x)D[N]=(D[N]||0)+(x[N]||0);return D}function R(D,x){return x instanceof t._CodeOrName?j(D,x.names):D}function Z(D,x,N){if(D instanceof t.Name)return L(D);if(!q(D))return D;return new t._Code(D._items.reduce((Q,ue)=>(ue instanceof t.Name&&(ue=L(ue)),ue instanceof t._Code?Q.push(...ue._items):Q.push(ue),Q),[]));function L(Q){const ue=N[Q.str];return ue===void 0||x[Q.str]!==1?Q:(delete x[Q.str],ue)}function q(Q){return Q instanceof t._Code&&Q._items.some(ue=>ue instanceof t.Name&&x[ue.str]===1&&N[ue.str]!==void 0)}}function ne(D,x){for(const N in x)D[N]=(D[N]||0)-(x[N]||0)}function G(D){return typeof D=="boolean"||typeof D=="number"||D===null?!D:(0,t._)`!${K(D)}`}e.not=G;const oe=I(e.operators.AND);function F(...D){return D.reduce(oe)}e.and=F;const fe=I(e.operators.OR);function H(...D){return D.reduce(fe)}e.or=H;function I(D){return(x,N)=>x===t.nil?N:N===t.nil?x:(0,t._)`${K(x)} ${D} ${K(N)}`}function K(D){return D instanceof t.Name?D:(0,t._)`(${D})`}})(qa)),qa}var _e={},wd;function ke(){if(wd)return _e;wd=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.checkStrictMode=_e.getErrorPath=_e.Type=_e.useFunc=_e.setEvaluated=_e.evaluatedPropsToName=_e.mergeEvaluated=_e.eachItem=_e.unescapeJsonPointer=_e.escapeJsonPointer=_e.escapeFragment=_e.unescapeFragment=_e.schemaRefOrVal=_e.schemaHasRulesButRef=_e.schemaHasRules=_e.checkUnknownRules=_e.alwaysValidSchema=_e.toHash=void 0;const e=pe(),t=no();function r(g){const E={};for(const k of g)E[k]=!0;return E}_e.toHash=r;function n(g,E){return typeof E=="boolean"?E:Object.keys(E).length===0?!0:(o(g,E),!s(E,g.self.RULES.all))}_e.alwaysValidSchema=n;function o(g,E=g.schema){const{opts:k,self:C}=g;if(!k.strictSchema||typeof E=="boolean")return;const O=C.RULES.keywords;for(const V in E)O[V]||$(g,`unknown keyword: "${V}"`)}_e.checkUnknownRules=o;function s(g,E){if(typeof g=="boolean")return!g;for(const k in g)if(E[k])return!0;return!1}_e.schemaHasRules=s;function a(g,E){if(typeof g=="boolean")return!g;for(const k in g)if(k!=="$ref"&&E.all[k])return!0;return!1}_e.schemaHasRulesButRef=a;function i({topSchemaRef:g,schemaPath:E},k,C,O){if(!O){if(typeof k=="number"||typeof k=="boolean")return k;if(typeof k=="string")return(0,e._)`${k}`}return(0,e._)`${g}${E}${(0,e.getProperty)(C)}`}_e.schemaRefOrVal=i;function c(g){return p(decodeURIComponent(g))}_e.unescapeFragment=c;function l(g){return encodeURIComponent(u(g))}_e.escapeFragment=l;function u(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}_e.escapeJsonPointer=u;function p(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}_e.unescapeJsonPointer=p;function h(g,E){if(Array.isArray(g))for(const k of g)E(k);else E(g)}_e.eachItem=h;function v({mergeNames:g,mergeToName:E,mergeValues:k,resultToName:C}){return(O,V,z,j)=>{const R=z===void 0?V:z instanceof e.Name?(V instanceof e.Name?g(O,V,z):E(O,V,z),z):V instanceof e.Name?(E(O,z,V),V):k(V,z);return j===e.Name&&!(R instanceof e.Name)?C(O,R):R}}_e.mergeEvaluated={props:v({mergeNames:(g,E,k)=>g.if((0,e._)`${k} !== true && ${E} !== undefined`,()=>{g.if((0,e._)`${E} === true`,()=>g.assign(k,!0),()=>g.assign(k,(0,e._)`${k} || {}`).code((0,e._)`Object.assign(${k}, ${E})`))}),mergeToName:(g,E,k)=>g.if((0,e._)`${k} !== true`,()=>{E===!0?g.assign(k,!0):(g.assign(k,(0,e._)`${k} || {}`),y(g,k,E))}),mergeValues:(g,E)=>g===!0?!0:{...g,...E},resultToName:w}),items:v({mergeNames:(g,E,k)=>g.if((0,e._)`${k} !== true && ${E} !== undefined`,()=>g.assign(k,(0,e._)`${E} === true ? true : ${k} > ${E} ? ${k} : ${E}`)),mergeToName:(g,E,k)=>g.if((0,e._)`${k} !== true`,()=>g.assign(k,E===!0?!0:(0,e._)`${k} > ${E} ? ${k} : ${E}`)),mergeValues:(g,E)=>g===!0?!0:Math.max(g,E),resultToName:(g,E)=>g.var("items",E)})};function w(g,E){if(E===!0)return g.var("props",!0);const k=g.var("props",(0,e._)`{}`);return E!==void 0&&y(g,k,E),k}_e.evaluatedPropsToName=w;function y(g,E,k){Object.keys(k).forEach(C=>g.assign((0,e._)`${E}${(0,e.getProperty)(C)}`,!0))}_e.setEvaluated=y;const m={};function _(g,E){return g.scopeValue("func",{ref:E,code:m[E.code]||(m[E.code]=new t._Code(E.code))})}_e.useFunc=_;var f;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(f||(_e.Type=f={}));function b(g,E,k){if(g instanceof e.Name){const C=E===f.Num;return k?C?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:C?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return k?(0,e.getProperty)(g).toString():"/"+u(g)}_e.getErrorPath=b;function $(g,E,k=g.opts.strictSchema){if(k){if(E=`strict mode: ${E}`,k===!0)throw new Error(E);g.self.logger.warn(E)}}return _e.checkStrictMode=$,_e}var oo={},$d;function ht(){if($d)return oo;$d=1,Object.defineProperty(oo,"__esModule",{value:!0});const e=pe(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return oo.default=t,oo}var Sd;function so(){return Sd||(Sd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=pe(),r=ke(),n=ht();e.keywordError={message:({keyword:m})=>(0,t.str)`must pass "${m}" keyword validation`},e.keyword$DataError={message:({keyword:m,schemaType:_})=>_?(0,t.str)`"${m}" keyword must be ${_} ($data)`:(0,t.str)`"${m}" keyword is invalid ($data)`};function o(m,_=e.keywordError,f,b){const{it:$}=m,{gen:g,compositeRule:E,allErrors:k}=$,C=p(m,_,f);b??(E||k)?c(g,C):l($,(0,t._)`[${C}]`)}e.reportError=o;function s(m,_=e.keywordError,f){const{it:b}=m,{gen:$,compositeRule:g,allErrors:E}=b,k=p(m,_,f);c($,k),g||E||l(b,n.default.vErrors)}e.reportExtraError=s;function a(m,_){m.assign(n.default.errors,_),m.if((0,t._)`${n.default.vErrors} !== null`,()=>m.if(_,()=>m.assign((0,t._)`${n.default.vErrors}.length`,_),()=>m.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function i({gen:m,keyword:_,schemaValue:f,data:b,errsCount:$,it:g}){if($===void 0)throw new Error("ajv implementation error");const E=m.name("err");m.forRange("i",$,n.default.errors,k=>{m.const(E,(0,t._)`${n.default.vErrors}[${k}]`),m.if((0,t._)`${E}.instancePath === undefined`,()=>m.assign((0,t._)`${E}.instancePath`,(0,t.strConcat)(n.default.instancePath,g.errorPath))),m.assign((0,t._)`${E}.schemaPath`,(0,t.str)`${g.errSchemaPath}/${_}`),g.opts.verbose&&(m.assign((0,t._)`${E}.schema`,f),m.assign((0,t._)`${E}.data`,b))})}e.extendErrors=i;function c(m,_){const f=m.const("err",_);m.if((0,t._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),m.code((0,t._)`${n.default.errors}++`)}function l(m,_){const{gen:f,validateName:b,schemaEnv:$}=m;$.$async?f.throw((0,t._)`new ${m.ValidationError}(${_})`):(f.assign((0,t._)`${b}.errors`,_),f.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(m,_,f){const{createErrors:b}=m.it;return b===!1?(0,t._)`{}`:h(m,_,f)}function h(m,_,f={}){const{gen:b,it:$}=m,g=[v($,f),w(m,f)];return y(m,_,g),b.object(...g)}function v({errorPath:m},{instancePath:_}){const f=_?(0,t.str)`${m}${(0,r.getErrorPath)(_,r.Type.Str)}`:m;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function w({keyword:m,it:{errSchemaPath:_}},{schemaPath:f,parentSchema:b}){let $=b?_:(0,t.str)`${_}/${m}`;return f&&($=(0,t.str)`${$}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,$]}function y(m,{params:_,message:f},b){const{keyword:$,data:g,schemaValue:E,it:k}=m,{opts:C,propertyName:O,topSchemaRef:V,schemaPath:z}=k;b.push([u.keyword,$],[u.params,typeof _=="function"?_(m):_||(0,t._)`{}`]),C.messages&&b.push([u.message,typeof f=="function"?f(m):f]),C.verbose&&b.push([u.schema,E],[u.parentSchema,(0,t._)`${V}${z}`],[n.default.data,g]),O&&b.push([u.propertyName,O])}})(Ra)),Ra}var Ed;function k0(){if(Ed)return ar;Ed=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.boolOrEmptySchema=ar.topBoolOrEmptySchema=void 0;const e=so(),t=pe(),r=ht(),n={message:"boolean schema is false"};function o(i){const{gen:c,schema:l,validateName:u}=i;l===!1?a(i,!1):typeof l=="object"&&l.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}ar.topBoolOrEmptySchema=o;function s(i,c){const{gen:l,schema:u}=i;u===!1?(l.var(c,!1),a(i)):l.var(c,!0)}ar.boolOrEmptySchema=s;function a(i,c){const{gen:l,data:u}=i,p={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,e.reportError)(p,n,void 0,c)}return ar}var Ue={},ir={},kd;function xd(){if(kd)return ir;kd=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.getRules=ir.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(o){return typeof o=="string"&&t.has(o)}ir.isJSONType=r;function n(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}return ir.getRules=n,ir}var Ot={},Cd;function Pd(){if(Cd)return Ot;Cd=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.shouldUseRule=Ot.shouldUseGroup=Ot.schemaHasRulesForType=void 0;function e({schema:n,self:o},s){const a=o.RULES.types[s];return a&&a!==!0&&t(n,a)}Ot.schemaHasRulesForType=e;function t(n,o){return o.rules.some(s=>r(n,s))}Ot.shouldUseGroup=t;function r(n,o){var s;return n[o.keyword]!==void 0||((s=o.definition.implements)===null||s===void 0?void 0:s.some(a=>n[a]!==void 0))}return Ot.shouldUseRule=r,Ot}var Nd;function ao(){if(Nd)return Ue;Nd=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.reportTypeError=Ue.checkDataTypes=Ue.checkDataType=Ue.coerceAndCheckDataType=Ue.getJSONTypes=Ue.getSchemaTypes=Ue.DataType=void 0;const e=xd(),t=Pd(),r=so(),n=pe(),o=ke();var s;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(s||(Ue.DataType=s={}));function a(f){const b=i(f.type);if(b.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!b.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&b.push("null")}return b}Ue.getSchemaTypes=a;function i(f){const b=Array.isArray(f)?f:f?[f]:[];if(b.every(e.isJSONType))return b;throw new Error("type must be JSONType or JSONType[]: "+b.join(","))}Ue.getJSONTypes=i;function c(f,b){const{gen:$,data:g,opts:E}=f,k=u(b,E.coerceTypes),C=b.length>0&&!(k.length===0&&b.length===1&&(0,t.schemaHasRulesForType)(f,b[0]));if(C){const O=w(b,g,E.strictNumbers,s.Wrong);$.if(O,()=>{k.length?p(f,b,k):m(f)})}return C}Ue.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(f,b){return b?f.filter($=>l.has($)||b==="array"&&$==="array"):[]}function p(f,b,$){const{gen:g,data:E,opts:k}=f,C=g.let("dataType",(0,n._)`typeof ${E}`),O=g.let("coerced",(0,n._)`undefined`);k.coerceTypes==="array"&&g.if((0,n._)`${C} == 'object' && Array.isArray(${E}) && ${E}.length == 1`,()=>g.assign(E,(0,n._)`${E}[0]`).assign(C,(0,n._)`typeof ${E}`).if(w(b,E,k.strictNumbers),()=>g.assign(O,E))),g.if((0,n._)`${O} !== undefined`);for(const z of $)(l.has(z)||z==="array"&&k.coerceTypes==="array")&&V(z);g.else(),m(f),g.endIf(),g.if((0,n._)`${O} !== undefined`,()=>{g.assign(E,O),h(f,O)});function V(z){switch(z){case"string":g.elseIf((0,n._)`${C} == "number" || ${C} == "boolean"`).assign(O,(0,n._)`"" + ${E}`).elseIf((0,n._)`${E} === null`).assign(O,(0,n._)`""`);return;case"number":g.elseIf((0,n._)`${C} == "boolean" || ${E} === null
|
|
53
|
+
|| (${C} == "string" && ${E} && ${E} == +${E})`).assign(O,(0,n._)`+${E}`);return;case"integer":g.elseIf((0,n._)`${C} === "boolean" || ${E} === null
|
|
54
|
+
|| (${C} === "string" && ${E} && ${E} == +${E} && !(${E} % 1))`).assign(O,(0,n._)`+${E}`);return;case"boolean":g.elseIf((0,n._)`${E} === "false" || ${E} === 0 || ${E} === null`).assign(O,!1).elseIf((0,n._)`${E} === "true" || ${E} === 1`).assign(O,!0);return;case"null":g.elseIf((0,n._)`${E} === "" || ${E} === 0 || ${E} === false`),g.assign(O,null);return;case"array":g.elseIf((0,n._)`${C} === "string" || ${C} === "number"
|
|
55
|
+
|| ${C} === "boolean" || ${E} === null`).assign(O,(0,n._)`[${E}]`)}}}function h({gen:f,parentData:b,parentDataProperty:$},g){f.if((0,n._)`${b} !== undefined`,()=>f.assign((0,n._)`${b}[${$}]`,g))}function v(f,b,$,g=s.Correct){const E=g===s.Correct?n.operators.EQ:n.operators.NEQ;let k;switch(f){case"null":return(0,n._)`${b} ${E} null`;case"array":k=(0,n._)`Array.isArray(${b})`;break;case"object":k=(0,n._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":k=C((0,n._)`!(${b} % 1) && !isNaN(${b})`);break;case"number":k=C();break;default:return(0,n._)`typeof ${b} ${E} ${f}`}return g===s.Correct?k:(0,n.not)(k);function C(O=n.nil){return(0,n.and)((0,n._)`typeof ${b} == "number"`,O,$?(0,n._)`isFinite(${b})`:n.nil)}}Ue.checkDataType=v;function w(f,b,$,g){if(f.length===1)return v(f[0],b,$,g);let E;const k=(0,o.toHash)(f);if(k.array&&k.object){const C=(0,n._)`typeof ${b} != "object"`;E=k.null?C:(0,n._)`!${b} || ${C}`,delete k.null,delete k.array,delete k.object}else E=n.nil;k.number&&delete k.integer;for(const C in k)E=(0,n.and)(E,v(C,b,$,g));return E}Ue.checkDataTypes=w;const y={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:b})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${b}}`};function m(f){const b=_(f);(0,r.reportError)(b,y)}Ue.reportTypeError=m;function _(f){const{gen:b,data:$,schema:g}=f,E=(0,o.schemaRefOrVal)(f,g,"type");return{gen:b,keyword:"type",data:$,schema:g.type,schemaCode:E,schemaValue:E,parentSchema:g,params:{},it:f}}return Ue}var on={},Ad;function x0(){if(Ad)return on;Ad=1,Object.defineProperty(on,"__esModule",{value:!0}),on.assignDefaults=void 0;const e=pe(),t=ke();function r(o,s){const{properties:a,items:i}=o.schema;if(s==="object"&&a)for(const c in a)n(o,c,a[c].default);else s==="array"&&Array.isArray(i)&&i.forEach((c,l)=>n(o,l,c.default))}on.assignDefaults=r;function n(o,s,a){const{gen:i,compositeRule:c,data:l,opts:u}=o;if(a===void 0)return;const p=(0,e._)`${l}${(0,e.getProperty)(s)}`;if(c){(0,t.checkStrictMode)(o,`default is ignored for: ${p}`);return}let h=(0,e._)`${p} === undefined`;u.useDefaults==="empty"&&(h=(0,e._)`${h} || ${p} === null || ${p} === ""`),i.if(h,(0,e._)`${p} = ${(0,e.stringify)(a)}`)}return on}var mt={},Te={},Td;function gt(){if(Td)return Te;Td=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.validateUnion=Te.validateArray=Te.usePattern=Te.callValidateCode=Te.schemaProperties=Te.allSchemaProperties=Te.noPropertyInData=Te.propertyInData=Te.isOwnProperty=Te.hasPropFunc=Te.reportMissingProp=Te.checkMissingProp=Te.checkReportMissingProp=void 0;const e=pe(),t=ke(),r=ht(),n=ke();function o(f,b){const{gen:$,data:g,it:E}=f;$.if(u($,g,b,E.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${b}`},!0),f.error()})}Te.checkReportMissingProp=o;function s({gen:f,data:b,it:{opts:$}},g,E){return(0,e.or)(...g.map(k=>(0,e.and)(u(f,b,k,$.ownProperties),(0,e._)`${E} = ${k}`)))}Te.checkMissingProp=s;function a(f,b){f.setParams({missingProperty:b},!0),f.error()}Te.reportMissingProp=a;function i(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Te.hasPropFunc=i;function c(f,b,$){return(0,e._)`${i(f)}.call(${b}, ${$})`}Te.isOwnProperty=c;function l(f,b,$,g){const E=(0,e._)`${b}${(0,e.getProperty)($)} !== undefined`;return g?(0,e._)`${E} && ${c(f,b,$)}`:E}Te.propertyInData=l;function u(f,b,$,g){const E=(0,e._)`${b}${(0,e.getProperty)($)} === undefined`;return g?(0,e.or)(E,(0,e.not)(c(f,b,$))):E}Te.noPropertyInData=u;function p(f){return f?Object.keys(f).filter(b=>b!=="__proto__"):[]}Te.allSchemaProperties=p;function h(f,b){return p(b).filter($=>!(0,t.alwaysValidSchema)(f,b[$]))}Te.schemaProperties=h;function v({schemaCode:f,data:b,it:{gen:$,topSchemaRef:g,schemaPath:E,errorPath:k},it:C},O,V,z){const j=z?(0,e._)`${f}, ${b}, ${g}${E}`:b,R=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,k)],[r.default.parentData,C.parentData],[r.default.parentDataProperty,C.parentDataProperty],[r.default.rootData,r.default.rootData]];C.opts.dynamicRef&&R.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const Z=(0,e._)`${j}, ${$.object(...R)}`;return V!==e.nil?(0,e._)`${O}.call(${V}, ${Z})`:(0,e._)`${O}(${Z})`}Te.callValidateCode=v;const w=(0,e._)`new RegExp`;function y({gen:f,it:{opts:b}},$){const g=b.unicodeRegExp?"u":"",{regExp:E}=b.code,k=E($,g);return f.scopeValue("pattern",{key:k.toString(),ref:k,code:(0,e._)`${E.code==="new RegExp"?w:(0,n.useFunc)(f,E)}(${$}, ${g})`})}Te.usePattern=y;function m(f){const{gen:b,data:$,keyword:g,it:E}=f,k=b.name("valid");if(E.allErrors){const O=b.let("valid",!0);return C(()=>b.assign(O,!1)),O}return b.var(k,!0),C(()=>b.break()),k;function C(O){const V=b.const("len",(0,e._)`${$}.length`);b.forRange("i",0,V,z=>{f.subschema({keyword:g,dataProp:z,dataPropType:t.Type.Num},k),b.if((0,e.not)(k),O)})}}Te.validateArray=m;function _(f){const{gen:b,schema:$,keyword:g,it:E}=f;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(V=>(0,t.alwaysValidSchema)(E,V))&&!E.opts.unevaluated)return;const C=b.let("valid",!1),O=b.name("_valid");b.block(()=>$.forEach((V,z)=>{const j=f.subschema({keyword:g,schemaProp:z,compositeRule:!0},O);b.assign(C,(0,e._)`${C} || ${O}`),f.mergeValidEvaluated(j,O)||b.if((0,e.not)(C))})),f.result(C,()=>f.reset(),()=>f.error(!0))}return Te.validateUnion=_,Te}var Id;function C0(){if(Id)return mt;Id=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.validateKeywordUsage=mt.validSchemaType=mt.funcKeywordCode=mt.macroKeywordCode=void 0;const e=pe(),t=ht(),r=gt(),n=so();function o(h,v){const{gen:w,keyword:y,schema:m,parentSchema:_,it:f}=h,b=v.macro.call(f.self,m,_,f),$=l(w,y,b);f.opts.validateSchema!==!1&&f.self.validateSchema(b,!0);const g=w.name("valid");h.subschema({schema:b,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${y}`,topSchemaRef:$,compositeRule:!0},g),h.pass(g,()=>h.error(!0))}mt.macroKeywordCode=o;function s(h,v){var w;const{gen:y,keyword:m,schema:_,parentSchema:f,$data:b,it:$}=h;c($,v);const g=!b&&v.compile?v.compile.call($.self,_,f,$):v.validate,E=l(y,m,g),k=y.let("valid");h.block$data(k,C),h.ok((w=v.valid)!==null&&w!==void 0?w:k);function C(){if(v.errors===!1)z(),v.modifying&&a(h),j(()=>h.error());else{const R=v.async?O():V();v.modifying&&a(h),j(()=>i(h,R))}}function O(){const R=y.let("ruleErrs",null);return y.try(()=>z((0,e._)`await `),Z=>y.assign(k,!1).if((0,e._)`${Z} instanceof ${$.ValidationError}`,()=>y.assign(R,(0,e._)`${Z}.errors`),()=>y.throw(Z))),R}function V(){const R=(0,e._)`${E}.errors`;return y.assign(R,null),z(e.nil),R}function z(R=v.async?(0,e._)`await `:e.nil){const Z=$.opts.passContext?t.default.this:t.default.self,ne=!("compile"in v&&!b||v.schema===!1);y.assign(k,(0,e._)`${R}${(0,r.callValidateCode)(h,E,Z,ne)}`,v.modifying)}function j(R){var Z;y.if((0,e.not)((Z=v.valid)!==null&&Z!==void 0?Z:k),R)}}mt.funcKeywordCode=s;function a(h){const{gen:v,data:w,it:y}=h;v.if(y.parentData,()=>v.assign(w,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function i(h,v){const{gen:w}=h;w.if((0,e._)`Array.isArray(${v})`,()=>{w.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(h)},()=>h.error())}function c({schemaEnv:h},v){if(v.async&&!h.$async)throw new Error("async keyword in sync schema")}function l(h,v,w){if(w===void 0)throw new Error(`keyword "${v}" failed to compile`);return h.scopeValue("keyword",typeof w=="function"?{ref:w}:{ref:w,code:(0,e.stringify)(w)})}function u(h,v,w=!1){return!v.length||v.some(y=>y==="array"?Array.isArray(h):y==="object"?h&&typeof h=="object"&&!Array.isArray(h):typeof h==y||w&&typeof h>"u")}mt.validSchemaType=u;function p({schema:h,opts:v,self:w,errSchemaPath:y},m,_){if(Array.isArray(m.keyword)?!m.keyword.includes(_):m.keyword!==_)throw new Error("ajv implementation error");const f=m.dependencies;if(f?.some(b=>!Object.prototype.hasOwnProperty.call(h,b)))throw new Error(`parent schema must have dependencies of ${_}: ${f.join(",")}`);if(m.validateSchema&&!m.validateSchema(h[_])){const $=`keyword "${_}" value is invalid at path "${y}": `+w.errorsText(m.validateSchema.errors);if(v.validateSchema==="log")w.logger.error($);else throw new Error($)}}return mt.validateKeywordUsage=p,mt}var Dt={},Od;function P0(){if(Od)return Dt;Od=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.extendSubschemaMode=Dt.extendSubschemaData=Dt.getSubschema=void 0;const e=pe(),t=ke();function r(s,{keyword:a,schemaProp:i,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:p}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const h=s.schema[a];return i===void 0?{schema:h,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${a}`}:{schema:h[i],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(i)}`,errSchemaPath:`${s.errSchemaPath}/${a}/${(0,t.escapeFragment)(i)}`}}if(c!==void 0){if(l===void 0||u===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:p,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}Dt.getSubschema=r;function n(s,a,{dataProp:i,dataPropType:c,data:l,dataTypes:u,propertyName:p}){if(l!==void 0&&i!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=a;if(i!==void 0){const{errorPath:w,dataPathArr:y,opts:m}=a,_=h.let("data",(0,e._)`${a.data}${(0,e.getProperty)(i)}`,!0);v(_),s.errorPath=(0,e.str)`${w}${(0,t.getErrorPath)(i,c,m.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${i}`,s.dataPathArr=[...y,s.parentDataProperty]}if(l!==void 0){const w=l instanceof e.Name?l:h.let("data",l,!0);v(w),p!==void 0&&(s.propertyName=p)}u&&(s.dataTypes=u);function v(w){s.data=w,s.dataLevel=a.dataLevel+1,s.dataTypes=[],a.definedProperties=new Set,s.parentData=a.data,s.dataNames=[...a.dataNames,w]}}Dt.extendSubschemaData=n;function o(s,{jtdDiscriminator:a,jtdMetadata:i,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(s.compositeRule=c),l!==void 0&&(s.createErrors=l),u!==void 0&&(s.allErrors=u),s.jtdDiscriminator=a,s.jtdMetadata=i}return Dt.extendSubschemaMode=o,Dt}var Ke={},Ba,Dd;function Md(){return Dd||(Dd=1,Ba=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var a=s[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Ba}var Wa={exports:{}},zd;function N0(){if(zd)return Wa.exports;zd=1;var e=Wa.exports=function(n,o,s){typeof o=="function"&&(s=o,o={}),s=o.cb||s;var a=typeof s=="function"?s:s.pre||function(){},i=s.post||function(){};t(o,a,i,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,o,s,a,i,c,l,u,p,h){if(a&&typeof a=="object"&&!Array.isArray(a)){o(a,i,c,l,u,p,h);for(var v in a){var w=a[v];if(Array.isArray(w)){if(v in e.arrayKeywords)for(var y=0;y<w.length;y++)t(n,o,s,w[y],i+"/"+v+"/"+y,c,i,v,a,y)}else if(v in e.propsKeywords){if(w&&typeof w=="object")for(var m in w)t(n,o,s,w[m],i+"/"+v+"/"+r(m),c,i,v,a,m)}else(v in e.keywords||n.allKeys&&!(v in e.skipKeywords))&&t(n,o,s,w,i+"/"+v,c,i,v,a)}s(a,i,c,l,u,p,h)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Wa.exports}var jd;function io(){if(jd)return Ke;jd=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.getSchemaRefs=Ke.resolveUrl=Ke.normalizeId=Ke._getFullPath=Ke.getFullPath=Ke.inlineRef=void 0;const e=ke(),t=Md(),r=N0(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(y,m=!0){return typeof y=="boolean"?!0:m===!0?!a(y):m?i(y)<=m:!1}Ke.inlineRef=o;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(y){for(const m in y){if(s.has(m))return!0;const _=y[m];if(Array.isArray(_)&&_.some(a)||typeof _=="object"&&a(_))return!0}return!1}function i(y){let m=0;for(const _ in y){if(_==="$ref")return 1/0;if(m++,!n.has(_)&&(typeof y[_]=="object"&&(0,e.eachItem)(y[_],f=>m+=i(f)),m===1/0))return 1/0}return m}function c(y,m="",_){_!==!1&&(m=p(m));const f=y.parse(m);return l(y,f)}Ke.getFullPath=c;function l(y,m){return y.serialize(m).split("#")[0]+"#"}Ke._getFullPath=l;const u=/#\/?$/;function p(y){return y?y.replace(u,""):""}Ke.normalizeId=p;function h(y,m,_){return _=p(_),y.resolve(m,_)}Ke.resolveUrl=h;const v=/^[a-z_][-a-z0-9._]*$/i;function w(y,m){if(typeof y=="boolean")return{};const{schemaId:_,uriResolver:f}=this.opts,b=p(y[_]||m),$={"":b},g=c(f,b,!1),E={},k=new Set;return r(y,{allKeys:!0},(V,z,j,R)=>{if(R===void 0)return;const Z=g+z;let ne=$[R];typeof V[_]=="string"&&(ne=G.call(this,V[_])),oe.call(this,V.$anchor),oe.call(this,V.$dynamicAnchor),$[z]=ne;function G(F){const fe=this.opts.uriResolver.resolve;if(F=p(ne?fe(ne,F):F),k.has(F))throw O(F);k.add(F);let H=this.refs[F];return typeof H=="string"&&(H=this.refs[H]),typeof H=="object"?C(V,H.schema,F):F!==p(Z)&&(F[0]==="#"?(C(V,E[F],F),E[F]=V):this.refs[F]=Z),F}function oe(F){if(typeof F=="string"){if(!v.test(F))throw new Error(`invalid anchor "${F}"`);G.call(this,`#${F}`)}}}),E;function C(V,z,j){if(z!==void 0&&!t(V,z))throw O(j)}function O(V){return new Error(`reference "${V}" resolves to more than one schema`)}}return Ke.getSchemaRefs=w,Ke}var Fd;function sn(){if(Fd)return It;Fd=1,Object.defineProperty(It,"__esModule",{value:!0}),It.getData=It.KeywordCxt=It.validateFunctionCode=void 0;const e=k0(),t=ao(),r=Pd(),n=ao(),o=x0(),s=C0(),a=P0(),i=pe(),c=ht(),l=io(),u=ke(),p=so();function h(A){if(g(A)&&(k(A),$(A))){m(A);return}v(A,()=>(0,e.topBoolOrEmptySchema)(A))}It.validateFunctionCode=h;function v({gen:A,validateName:T,schema:W,schemaEnv:Y,opts:ce},he){ce.code.es5?A.func(T,(0,i._)`${c.default.data}, ${c.default.valCxt}`,Y.$async,()=>{A.code((0,i._)`"use strict"; ${f(W,ce)}`),y(A,ce),A.code(he)}):A.func(T,(0,i._)`${c.default.data}, ${w(ce)}`,Y.$async,()=>A.code(f(W,ce)).code(he))}function w(A){return(0,i._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${A.dynamicRef?(0,i._)`, ${c.default.dynamicAnchors}={}`:i.nil}}={}`}function y(A,T){A.if(c.default.valCxt,()=>{A.var(c.default.instancePath,(0,i._)`${c.default.valCxt}.${c.default.instancePath}`),A.var(c.default.parentData,(0,i._)`${c.default.valCxt}.${c.default.parentData}`),A.var(c.default.parentDataProperty,(0,i._)`${c.default.valCxt}.${c.default.parentDataProperty}`),A.var(c.default.rootData,(0,i._)`${c.default.valCxt}.${c.default.rootData}`),T.dynamicRef&&A.var(c.default.dynamicAnchors,(0,i._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{A.var(c.default.instancePath,(0,i._)`""`),A.var(c.default.parentData,(0,i._)`undefined`),A.var(c.default.parentDataProperty,(0,i._)`undefined`),A.var(c.default.rootData,c.default.data),T.dynamicRef&&A.var(c.default.dynamicAnchors,(0,i._)`{}`)})}function m(A){const{schema:T,opts:W,gen:Y}=A;v(A,()=>{W.$comment&&T.$comment&&R(A),V(A),Y.let(c.default.vErrors,null),Y.let(c.default.errors,0),W.unevaluated&&_(A),C(A),Z(A)})}function _(A){const{gen:T,validateName:W}=A;A.evaluated=T.const("evaluated",(0,i._)`${W}.evaluated`),T.if((0,i._)`${A.evaluated}.dynamicProps`,()=>T.assign((0,i._)`${A.evaluated}.props`,(0,i._)`undefined`)),T.if((0,i._)`${A.evaluated}.dynamicItems`,()=>T.assign((0,i._)`${A.evaluated}.items`,(0,i._)`undefined`))}function f(A,T){const W=typeof A=="object"&&A[T.schemaId];return W&&(T.code.source||T.code.process)?(0,i._)`/*# sourceURL=${W} */`:i.nil}function b(A,T){if(g(A)&&(k(A),$(A))){E(A,T);return}(0,e.boolOrEmptySchema)(A,T)}function $({schema:A,self:T}){if(typeof A=="boolean")return!A;for(const W in A)if(T.RULES.all[W])return!0;return!1}function g(A){return typeof A.schema!="boolean"}function E(A,T){const{schema:W,gen:Y,opts:ce}=A;ce.$comment&&W.$comment&&R(A),z(A),j(A);const he=Y.const("_errs",c.default.errors);C(A,he),Y.var(T,(0,i._)`${he} === ${c.default.errors}`)}function k(A){(0,u.checkUnknownRules)(A),O(A)}function C(A,T){if(A.opts.jtd)return G(A,[],!1,T);const W=(0,t.getSchemaTypes)(A.schema),Y=(0,t.coerceAndCheckDataType)(A,W);G(A,W,!Y,T)}function O(A){const{schema:T,errSchemaPath:W,opts:Y,self:ce}=A;T.$ref&&Y.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(T,ce.RULES)&&ce.logger.warn(`$ref: keywords ignored in schema at path "${W}"`)}function V(A){const{schema:T,opts:W}=A;T.default!==void 0&&W.useDefaults&&W.strictSchema&&(0,u.checkStrictMode)(A,"default is ignored in the schema root")}function z(A){const T=A.schema[A.opts.schemaId];T&&(A.baseId=(0,l.resolveUrl)(A.opts.uriResolver,A.baseId,T))}function j(A){if(A.schema.$async&&!A.schemaEnv.$async)throw new Error("async schema in sync schema")}function R({gen:A,schemaEnv:T,schema:W,errSchemaPath:Y,opts:ce}){const he=W.$comment;if(ce.$comment===!0)A.code((0,i._)`${c.default.self}.logger.log(${he})`);else if(typeof ce.$comment=="function"){const Ve=(0,i.str)`${Y}/$comment`,it=A.scopeValue("root",{ref:T.root});A.code((0,i._)`${c.default.self}.opts.$comment(${he}, ${Ve}, ${it}.schema)`)}}function Z(A){const{gen:T,schemaEnv:W,validateName:Y,ValidationError:ce,opts:he}=A;W.$async?T.if((0,i._)`${c.default.errors} === 0`,()=>T.return(c.default.data),()=>T.throw((0,i._)`new ${ce}(${c.default.vErrors})`)):(T.assign((0,i._)`${Y}.errors`,c.default.vErrors),he.unevaluated&&ne(A),T.return((0,i._)`${c.default.errors} === 0`))}function ne({gen:A,evaluated:T,props:W,items:Y}){W instanceof i.Name&&A.assign((0,i._)`${T}.props`,W),Y instanceof i.Name&&A.assign((0,i._)`${T}.items`,Y)}function G(A,T,W,Y){const{gen:ce,schema:he,data:Ve,allErrors:it,opts:Ze,self:P}=A,{RULES:M}=P;if(he.$ref&&(Ze.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(he,M))){ce.block(()=>q(A,"$ref",M.all.$ref.definition));return}Ze.jtd||F(A,T),ce.block(()=>{for(const te of M.rules)U(te);U(M.post)});function U(te){(0,r.shouldUseGroup)(he,te)&&(te.type?(ce.if((0,n.checkDataType)(te.type,Ve,Ze.strictNumbers)),oe(A,te),T.length===1&&T[0]===te.type&&W&&(ce.else(),(0,n.reportTypeError)(A)),ce.endIf()):oe(A,te),it||ce.if((0,i._)`${c.default.errors} === ${Y||0}`))}}function oe(A,T){const{gen:W,schema:Y,opts:{useDefaults:ce}}=A;ce&&(0,o.assignDefaults)(A,T.type),W.block(()=>{for(const he of T.rules)(0,r.shouldUseRule)(Y,he)&&q(A,he.keyword,he.definition,T.type)})}function F(A,T){A.schemaEnv.meta||!A.opts.strictTypes||(fe(A,T),A.opts.allowUnionTypes||H(A,T),I(A,A.dataTypes))}function fe(A,T){if(T.length){if(!A.dataTypes.length){A.dataTypes=T;return}T.forEach(W=>{D(A.dataTypes,W)||N(A,`type "${W}" not allowed by context "${A.dataTypes.join(",")}"`)}),x(A,T)}}function H(A,T){T.length>1&&!(T.length===2&&T.includes("null"))&&N(A,"use allowUnionTypes to allow union type keyword")}function I(A,T){const W=A.self.RULES.all;for(const Y in W){const ce=W[Y];if(typeof ce=="object"&&(0,r.shouldUseRule)(A.schema,ce)){const{type:he}=ce.definition;he.length&&!he.some(Ve=>K(T,Ve))&&N(A,`missing type "${he.join(",")}" for keyword "${Y}"`)}}}function K(A,T){return A.includes(T)||T==="number"&&A.includes("integer")}function D(A,T){return A.includes(T)||T==="integer"&&A.includes("number")}function x(A,T){const W=[];for(const Y of A.dataTypes)D(T,Y)?W.push(Y):T.includes("integer")&&Y==="number"&&W.push("integer");A.dataTypes=W}function N(A,T){const W=A.schemaEnv.baseId+A.errSchemaPath;T+=` at "${W}" (strictTypes)`,(0,u.checkStrictMode)(A,T,A.opts.strictTypes)}class L{constructor(T,W,Y){if((0,s.validateKeywordUsage)(T,W,Y),this.gen=T.gen,this.allErrors=T.allErrors,this.keyword=Y,this.data=T.data,this.schema=T.schema[Y],this.$data=W.$data&&T.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(T,this.schema,Y,this.$data),this.schemaType=W.schemaType,this.parentSchema=T.schema,this.params={},this.it=T,this.def=W,this.$data)this.schemaCode=T.gen.const("vSchema",se(this.$data,T));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,W.schemaType,W.allowUndefined))throw new Error(`${Y} value must be ${JSON.stringify(W.schemaType)}`);("code"in W?W.trackErrors:W.errors!==!1)&&(this.errsCount=T.gen.const("_errs",c.default.errors))}result(T,W,Y){this.failResult((0,i.not)(T),W,Y)}failResult(T,W,Y){this.gen.if(T),Y?Y():this.error(),W?(this.gen.else(),W(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(T,W){this.failResult((0,i.not)(T),void 0,W)}fail(T){if(T===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(T),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(T){if(!this.$data)return this.fail(T);const{schemaCode:W}=this;this.fail((0,i._)`${W} !== undefined && (${(0,i.or)(this.invalid$data(),T)})`)}error(T,W,Y){if(W){this.setParams(W),this._error(T,Y),this.setParams({});return}this._error(T,Y)}_error(T,W){(T?p.reportExtraError:p.reportError)(this,this.def.error,W)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(T){this.allErrors||this.gen.if(T)}setParams(T,W){W?Object.assign(this.params,T):this.params=T}block$data(T,W,Y=i.nil){this.gen.block(()=>{this.check$data(T,Y),W()})}check$data(T=i.nil,W=i.nil){if(!this.$data)return;const{gen:Y,schemaCode:ce,schemaType:he,def:Ve}=this;Y.if((0,i.or)((0,i._)`${ce} === undefined`,W)),T!==i.nil&&Y.assign(T,!0),(he.length||Ve.validateSchema)&&(Y.elseIf(this.invalid$data()),this.$dataError(),T!==i.nil&&Y.assign(T,!1)),Y.else()}invalid$data(){const{gen:T,schemaCode:W,schemaType:Y,def:ce,it:he}=this;return(0,i.or)(Ve(),it());function Ve(){if(Y.length){if(!(W instanceof i.Name))throw new Error("ajv implementation error");const Ze=Array.isArray(Y)?Y:[Y];return(0,i._)`${(0,n.checkDataTypes)(Ze,W,he.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}function it(){if(ce.validateSchema){const Ze=T.scopeValue("validate$data",{ref:ce.validateSchema});return(0,i._)`!${Ze}(${W})`}return i.nil}}subschema(T,W){const Y=(0,a.getSubschema)(this.it,T);(0,a.extendSubschemaData)(Y,this.it,T),(0,a.extendSubschemaMode)(Y,T);const ce={...this.it,...Y,items:void 0,props:void 0};return b(ce,W),ce}mergeEvaluated(T,W){const{it:Y,gen:ce}=this;Y.opts.unevaluated&&(Y.props!==!0&&T.props!==void 0&&(Y.props=u.mergeEvaluated.props(ce,T.props,Y.props,W)),Y.items!==!0&&T.items!==void 0&&(Y.items=u.mergeEvaluated.items(ce,T.items,Y.items,W)))}mergeValidEvaluated(T,W){const{it:Y,gen:ce}=this;if(Y.opts.unevaluated&&(Y.props!==!0||Y.items!==!0))return ce.if(W,()=>this.mergeEvaluated(T,i.Name)),!0}}It.KeywordCxt=L;function q(A,T,W,Y){const ce=new L(A,W,T);"code"in W?W.code(ce,Y):ce.$data&&W.validate?(0,s.funcKeywordCode)(ce,W):"macro"in W?(0,s.macroKeywordCode)(ce,W):(W.compile||W.validate)&&(0,s.funcKeywordCode)(ce,W)}const Q=/^\/(?:[^~]|~0|~1)*$/,ue=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(A,{dataLevel:T,dataNames:W,dataPathArr:Y}){let ce,he;if(A==="")return c.default.rootData;if(A[0]==="/"){if(!Q.test(A))throw new Error(`Invalid JSON-pointer: ${A}`);ce=A,he=c.default.rootData}else{const P=ue.exec(A);if(!P)throw new Error(`Invalid JSON-pointer: ${A}`);const M=+P[1];if(ce=P[2],ce==="#"){if(M>=T)throw new Error(Ze("property/index",M));return Y[T-M]}if(M>T)throw new Error(Ze("data",M));if(he=W[T-M],!ce)return he}let Ve=he;const it=ce.split("/");for(const P of it)P&&(he=(0,i._)`${he}${(0,i.getProperty)((0,u.unescapeJsonPointer)(P))}`,Ve=(0,i._)`${Ve} && ${he}`);return Ve;function Ze(P,M){return`Cannot access ${P} ${M} levels up, current level is ${T}`}}return It.getData=se,It}var co={},Vd;function lo(){if(Vd)return co;Vd=1,Object.defineProperty(co,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return co.default=e,co}var uo={},Ld;function an(){if(Ld)return uo;Ld=1,Object.defineProperty(uo,"__esModule",{value:!0});const e=io();class t extends Error{constructor(n,o,s,a){super(a||`can't resolve reference ${s} from id ${o}`),this.missingRef=(0,e.resolveUrl)(n,o,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return uo.default=t,uo}var nt={},Rd;function fo(){if(Rd)return nt;Rd=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.resolveSchema=nt.getCompilingSchema=nt.resolveRef=nt.compileSchema=nt.SchemaEnv=void 0;const e=pe(),t=lo(),r=ht(),n=io(),o=ke(),s=sn();class a{constructor(_){var f;this.refs={},this.dynamicAnchors={};let b;typeof _.schema=="object"&&(b=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(f=_.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(b?.[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=b?.$async,this.refs={}}}nt.SchemaEnv=a;function i(m){const _=u.call(this,m);if(_)return _;const f=(0,n.getFullPath)(this.opts.uriResolver,m.root.baseId),{es5:b,lines:$}=this.opts.code,{ownProperties:g}=this.opts,E=new e.CodeGen(this.scope,{es5:b,lines:$,ownProperties:g});let k;m.$async&&(k=E.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const C=E.scopeName("validate");m.validateName=C;const O={gen:E,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:E.scopeValue("schema",this.opts.code.source===!0?{ref:m.schema,code:(0,e.stringify)(m.schema)}:{ref:m.schema}),validateName:C,ValidationError:k,schema:m.schema,schemaEnv:m,rootId:f,baseId:m.baseId||f,schemaPath:e.nil,errSchemaPath:m.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let V;try{this._compilations.add(m),(0,s.validateFunctionCode)(O),E.optimize(this.opts.code.optimize);const z=E.toString();V=`${E.scopeRefs(r.default.scope)}return ${z}`,this.opts.code.process&&(V=this.opts.code.process(V,m));const R=new Function(`${r.default.self}`,`${r.default.scope}`,V)(this,this.scope.get());if(this.scope.value(C,{ref:R}),R.errors=null,R.schema=m.schema,R.schemaEnv=m,m.$async&&(R.$async=!0),this.opts.code.source===!0&&(R.source={validateName:C,validateCode:z,scopeValues:E._values}),this.opts.unevaluated){const{props:Z,items:ne}=O;R.evaluated={props:Z instanceof e.Name?void 0:Z,items:ne instanceof e.Name?void 0:ne,dynamicProps:Z instanceof e.Name,dynamicItems:ne instanceof e.Name},R.source&&(R.source.evaluated=(0,e.stringify)(R.evaluated))}return m.validate=R,m}catch(z){throw delete m.validate,delete m.validateName,V&&this.logger.error("Error compiling schema, function code:",V),z}finally{this._compilations.delete(m)}}nt.compileSchema=i;function c(m,_,f){var b;f=(0,n.resolveUrl)(this.opts.uriResolver,_,f);const $=m.refs[f];if($)return $;let g=h.call(this,m,f);if(g===void 0){const E=(b=m.localRefs)===null||b===void 0?void 0:b[f],{schemaId:k}=this.opts;E&&(g=new a({schema:E,schemaId:k,root:m,baseId:_}))}if(g!==void 0)return m.refs[f]=l.call(this,g)}nt.resolveRef=c;function l(m){return(0,n.inlineRef)(m.schema,this.opts.inlineRefs)?m.schema:m.validate?m:i.call(this,m)}function u(m){for(const _ of this._compilations)if(p(_,m))return _}nt.getCompilingSchema=u;function p(m,_){return m.schema===_.schema&&m.root===_.root&&m.baseId===_.baseId}function h(m,_){let f;for(;typeof(f=this.refs[_])=="string";)_=f;return f||this.schemas[_]||v.call(this,m,_)}function v(m,_){const f=this.opts.uriResolver.parse(_),b=(0,n._getFullPath)(this.opts.uriResolver,f);let $=(0,n.getFullPath)(this.opts.uriResolver,m.baseId,void 0);if(Object.keys(m.schema).length>0&&b===$)return y.call(this,f,m);const g=(0,n.normalizeId)(b),E=this.refs[g]||this.schemas[g];if(typeof E=="string"){const k=v.call(this,m,E);return typeof k?.schema!="object"?void 0:y.call(this,f,k)}if(typeof E?.schema=="object"){if(E.validate||i.call(this,E),g===(0,n.normalizeId)(_)){const{schema:k}=E,{schemaId:C}=this.opts,O=k[C];return O&&($=(0,n.resolveUrl)(this.opts.uriResolver,$,O)),new a({schema:k,schemaId:C,root:m,baseId:$})}return y.call(this,f,E)}}nt.resolveSchema=v;const w=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(m,{baseId:_,schema:f,root:b}){var $;if((($=m.fragment)===null||$===void 0?void 0:$[0])!=="/")return;for(const k of m.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const C=f[(0,o.unescapeFragment)(k)];if(C===void 0)return;f=C;const O=typeof f=="object"&&f[this.opts.schemaId];!w.has(k)&&O&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,O))}let g;if(typeof f!="boolean"&&f.$ref&&!(0,o.schemaHasRulesButRef)(f,this.RULES)){const k=(0,n.resolveUrl)(this.opts.uriResolver,_,f.$ref);g=v.call(this,b,k)}const{schemaId:E}=this.opts;if(g=g||new a({schema:f,schemaId:E,root:b,baseId:_}),g.schema!==g.root.schema)return g}return nt}const A0={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var po={},cn={exports:{}},Ha,qd;function Ud(){if(qd)return Ha;qd=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(h){let v="",w=0,y=0;for(y=0;y<h.length;y++)if(w=h[y].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=h[y];break}for(y+=1;y<h.length;y++){if(w=h[y].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=h[y]}return v}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(h){return h.length=0,!0}function s(h,v,w){if(h.length){const y=r(h);if(y!=="")v.push(y);else return w.error=!0,!1;h.length=0}return!0}function a(h){let v=0;const w={error:!1,address:"",zone:""},y=[],m=[];let _=!1,f=!1,b=s;for(let $=0;$<h.length;$++){const g=h[$];if(!(g==="["||g==="]"))if(g===":"){if(_===!0&&(f=!0),!b(m,y,w))break;if(++v>7){w.error=!0;break}$>0&&h[$-1]===":"&&(_=!0),y.push(":");continue}else if(g==="%"){if(!b(m,y,w))break;b=o}else{m.push(g);continue}}return m.length&&(b===o?w.zone=m.join(""):f?y.push(m.join("")):y.push(r(m))),w.address=y.join(""),w}function i(h){if(c(h,":")<2)return{host:h,isIPV6:!1};const v=a(h);if(v.error)return{host:h,isIPV6:!1};{let w=v.address,y=v.address;return v.zone&&(w+="%"+v.zone,y+="%25"+v.zone),{host:w,isIPV6:!0,escapedHost:y}}}function c(h,v){let w=0;for(let y=0;y<h.length;y++)h[y]===v&&w++;return w}function l(h){let v=h;const w=[];let y=-1,m=0;for(;m=v.length;){if(m===1){if(v===".")break;if(v==="/"){w.push("/");break}else{w.push(v);break}}else if(m===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){w.push("/");break}}else if(m===3&&v==="/.."){w.length!==0&&w.pop(),w.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),w.length!==0&&w.pop();continue}}if((y=v.indexOf("/",1))===-1){w.push(v);break}else w.push(v.slice(0,y)),v=v.slice(y)}return w.join("")}function u(h,v){const w=v!==!0?escape:unescape;return h.scheme!==void 0&&(h.scheme=w(h.scheme)),h.userinfo!==void 0&&(h.userinfo=w(h.userinfo)),h.host!==void 0&&(h.host=w(h.host)),h.path!==void 0&&(h.path=w(h.path)),h.query!==void 0&&(h.query=w(h.query)),h.fragment!==void 0&&(h.fragment=w(h.fragment)),h}function p(h){const v=[];if(h.userinfo!==void 0&&(v.push(h.userinfo),v.push("@")),h.host!==void 0){let w=unescape(h.host);if(!t(w)){const y=i(w);y.isIPV6===!0?w=`[${y.escapedHost}]`:w=h.host}v.push(w)}return(typeof h.port=="number"||typeof h.port=="string")&&(v.push(":"),v.push(String(h.port))),v.length?v.join(""):void 0}return Ha={nonSimpleDomain:n,recomposeAuthority:p,normalizeComponentEncoding:u,removeDotSegments:l,isIPv4:t,isUUID:e,normalizeIPv6:i,stringArrayToHexStripped:r},Ha}var Ka,Zd;function T0(){if(Zd)return Ka;Zd=1;const{isUUID:e}=Ud(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(g){return r.indexOf(g)!==-1}function o(g){return g.secure===!0?!0:g.secure===!1?!1:g.scheme?g.scheme.length===3&&(g.scheme[0]==="w"||g.scheme[0]==="W")&&(g.scheme[1]==="s"||g.scheme[1]==="S")&&(g.scheme[2]==="s"||g.scheme[2]==="S"):!1}function s(g){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g}function a(g){const E=String(g.scheme).toLowerCase()==="https";return(g.port===(E?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}function i(g){return g.secure=o(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g}function c(g){if((g.port===(o(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){const[E,k]=g.resourceName.split("?");g.path=E&&E!=="/"?E:void 0,g.query=k,g.resourceName=void 0}return g.fragment=void 0,g}function l(g,E){if(!g.path)return g.error="URN can not be parsed",g;const k=g.path.match(t);if(k){const C=E.scheme||g.scheme||"urn";g.nid=k[1].toLowerCase(),g.nss=k[2];const O=`${C}:${E.nid||g.nid}`,V=$(O);g.path=void 0,V&&(g=V.parse(g,E))}else g.error=g.error||"URN can not be parsed.";return g}function u(g,E){if(g.nid===void 0)throw new Error("URN without nid cannot be serialized");const k=E.scheme||g.scheme||"urn",C=g.nid.toLowerCase(),O=`${k}:${E.nid||C}`,V=$(O);V&&(g=V.serialize(g,E));const z=g,j=g.nss;return z.path=`${C||E.nid}:${j}`,E.skipEscape=!0,z}function p(g,E){const k=g;return k.uuid=k.nss,k.nss=void 0,!E.tolerant&&(!k.uuid||!e(k.uuid))&&(k.error=k.error||"UUID is not valid."),k}function h(g){const E=g;return E.nss=(g.uuid||"").toLowerCase(),E}const v={scheme:"http",domainHost:!0,parse:s,serialize:a},w={scheme:"https",domainHost:v.domainHost,parse:s,serialize:a},y={scheme:"ws",domainHost:!0,parse:i,serialize:c},m={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},b={http:v,https:w,ws:y,wss:m,urn:{scheme:"urn",parse:l,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:h,skipNormalize:!0}};Object.setPrototypeOf(b,null);function $(g){return g&&(b[g]||b[g.toLowerCase()])||void 0}return Ka={wsIsSecure:o,SCHEMES:b,isValidSchemeName:n,getSchemeHandler:$},Ka}var Bd;function I0(){if(Bd)return cn.exports;Bd=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:o,nonSimpleDomain:s}=Ud(),{SCHEMES:a,getSchemeHandler:i}=T0();function c(m,_){return typeof m=="string"?m=h(w(m,_),_):typeof m=="object"&&(m=w(h(m,_),_)),m}function l(m,_,f){const b=f?Object.assign({scheme:"null"},f):{scheme:"null"},$=u(w(m,b),w(_,b),b,!0);return b.skipEscape=!0,h($,b)}function u(m,_,f,b){const $={};return b||(m=w(h(m,f),f),_=w(h(_,f),f)),f=f||{},!f.tolerant&&_.scheme?($.scheme=_.scheme,$.userinfo=_.userinfo,$.host=_.host,$.port=_.port,$.path=t(_.path||""),$.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?($.userinfo=_.userinfo,$.host=_.host,$.port=_.port,$.path=t(_.path||""),$.query=_.query):(_.path?(_.path[0]==="/"?$.path=t(_.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?$.path="/"+_.path:m.path?$.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+_.path:$.path=_.path,$.path=t($.path)),$.query=_.query):($.path=m.path,_.query!==void 0?$.query=_.query:$.query=m.query),$.userinfo=m.userinfo,$.host=m.host,$.port=m.port),$.scheme=m.scheme),$.fragment=_.fragment,$}function p(m,_,f){return typeof m=="string"?(m=unescape(m),m=h(n(w(m,f),!0),{...f,skipEscape:!0})):typeof m=="object"&&(m=h(n(m,!0),{...f,skipEscape:!0})),typeof _=="string"?(_=unescape(_),_=h(n(w(_,f),!0),{...f,skipEscape:!0})):typeof _=="object"&&(_=h(n(_,!0),{...f,skipEscape:!0})),m.toLowerCase()===_.toLowerCase()}function h(m,_){const f={host:m.host,scheme:m.scheme,userinfo:m.userinfo,port:m.port,path:m.path,query:m.query,nid:m.nid,nss:m.nss,uuid:m.uuid,fragment:m.fragment,reference:m.reference,resourceName:m.resourceName,secure:m.secure,error:""},b=Object.assign({},_),$=[],g=i(b.scheme||f.scheme);g&&g.serialize&&g.serialize(f,b),f.path!==void 0&&(b.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),b.reference!=="suffix"&&f.scheme&&$.push(f.scheme,":");const E=r(f);if(E!==void 0&&(b.reference!=="suffix"&&$.push("//"),$.push(E),f.path&&f.path[0]!=="/"&&$.push("/")),f.path!==void 0){let k=f.path;!b.absolutePath&&(!g||!g.absolutePath)&&(k=t(k)),E===void 0&&k[0]==="/"&&k[1]==="/"&&(k="/%2F"+k.slice(2)),$.push(k)}return f.query!==void 0&&$.push("?",f.query),f.fragment!==void 0&&$.push("#",f.fragment),$.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(m,_){const f=Object.assign({},_),b={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let $=!1;f.reference==="suffix"&&(f.scheme?m=f.scheme+":"+m:m="//"+m);const g=m.match(v);if(g){if(b.scheme=g[1],b.userinfo=g[3],b.host=g[4],b.port=parseInt(g[5],10),b.path=g[6]||"",b.query=g[7],b.fragment=g[8],isNaN(b.port)&&(b.port=g[5]),b.host)if(o(b.host)===!1){const C=e(b.host);b.host=C.host.toLowerCase(),$=C.isIPV6}else $=!0;b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&b.query===void 0&&!b.path?b.reference="same-document":b.scheme===void 0?b.reference="relative":b.fragment===void 0?b.reference="absolute":b.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==b.reference&&(b.error=b.error||"URI is not a "+f.reference+" reference.");const E=i(f.scheme||b.scheme);if(!f.unicodeSupport&&(!E||!E.unicodeSupport)&&b.host&&(f.domainHost||E&&E.domainHost)&&$===!1&&s(b.host))try{b.host=URL.domainToASCII(b.host.toLowerCase())}catch(k){b.error=b.error||"Host's domain name can not be converted to ASCII: "+k}(!E||E&&!E.skipNormalize)&&(m.indexOf("%")!==-1&&(b.scheme!==void 0&&(b.scheme=unescape(b.scheme)),b.host!==void 0&&(b.host=unescape(b.host))),b.path&&(b.path=escape(unescape(b.path))),b.fragment&&(b.fragment=encodeURI(decodeURIComponent(b.fragment)))),E&&E.parse&&E.parse(b,f)}else b.error=b.error||"URI can not be parsed.";return b}const y={SCHEMES:a,normalize:c,resolve:l,resolveComponent:u,equal:p,serialize:h,parse:w};return cn.exports=y,cn.exports.default=y,cn.exports.fastUri=y,cn.exports}var Wd;function O0(){if(Wd)return po;Wd=1,Object.defineProperty(po,"__esModule",{value:!0});const e=I0();return e.code='require("ajv/dist/runtime/uri").default',po.default=e,po}var Hd;function Kd(){return Hd||(Hd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=sn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=pe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=lo(),o=an(),s=xd(),a=fo(),i=pe(),c=io(),l=ao(),u=ke(),p=A0,h=O0(),v=(H,I)=>new RegExp(H,I);v.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function b(H){var I,K,D,x,N,L,q,Q,ue,se,A,T,W,Y,ce,he,Ve,it,Ze,P,M,U,te,re,X;const le=H.strict,xe=(I=H.code)===null||I===void 0?void 0:I.optimize,Ie=xe===!0||xe===void 0?1:xe||0,Ge=(D=(K=H.code)===null||K===void 0?void 0:K.regExp)!==null&&D!==void 0?D:v,Br=(x=H.uriResolver)!==null&&x!==void 0?x:h.default;return{strictSchema:(L=(N=H.strictSchema)!==null&&N!==void 0?N:le)!==null&&L!==void 0?L:!0,strictNumbers:(Q=(q=H.strictNumbers)!==null&&q!==void 0?q:le)!==null&&Q!==void 0?Q:!0,strictTypes:(se=(ue=H.strictTypes)!==null&&ue!==void 0?ue:le)!==null&&se!==void 0?se:"log",strictTuples:(T=(A=H.strictTuples)!==null&&A!==void 0?A:le)!==null&&T!==void 0?T:"log",strictRequired:(Y=(W=H.strictRequired)!==null&&W!==void 0?W:le)!==null&&Y!==void 0?Y:!1,code:H.code?{...H.code,optimize:Ie,regExp:Ge}:{optimize:Ie,regExp:Ge},loopRequired:(ce=H.loopRequired)!==null&&ce!==void 0?ce:f,loopEnum:(he=H.loopEnum)!==null&&he!==void 0?he:f,meta:(Ve=H.meta)!==null&&Ve!==void 0?Ve:!0,messages:(it=H.messages)!==null&&it!==void 0?it:!0,inlineRefs:(Ze=H.inlineRefs)!==null&&Ze!==void 0?Ze:!0,schemaId:(P=H.schemaId)!==null&&P!==void 0?P:"$id",addUsedSchema:(M=H.addUsedSchema)!==null&&M!==void 0?M:!0,validateSchema:(U=H.validateSchema)!==null&&U!==void 0?U:!0,validateFormats:(te=H.validateFormats)!==null&&te!==void 0?te:!0,unicodeRegExp:(re=H.unicodeRegExp)!==null&&re!==void 0?re:!0,int32range:(X=H.int32range)!==null&&X!==void 0?X:!0,uriResolver:Br}}class ${constructor(I={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts={...I,...b(I)};const{es5:K,lines:D}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:y,es5:K,lines:D}),this.logger=j(I.logger);const x=I.validateFormats;I.validateFormats=!1,this.RULES=(0,s.getRules)(),g.call(this,m,I,"NOT SUPPORTED"),g.call(this,_,I,"DEPRECATED","warn"),this._metaOpts=V.call(this),I.formats&&C.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&O.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),k.call(this),I.validateFormats=x}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:I,meta:K,schemaId:D}=this.opts;let x=p;D==="id"&&(x={...p},x.id=x.$id,delete x.$id),K&&I&&this.addMetaSchema(x,x[D],!1)}defaultMeta(){const{meta:I,schemaId:K}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[K]||I:void 0}validate(I,K){let D;if(typeof I=="string"){if(D=this.getSchema(I),!D)throw new Error(`no schema with key or ref "${I}"`)}else D=this.compile(I);const x=D(K);return"$async"in D||(this.errors=D.errors),x}compile(I,K){const D=this._addSchema(I,K);return D.validate||this._compileSchemaEnv(D)}compileAsync(I,K){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:D}=this.opts;return x.call(this,I,K);async function x(se,A){await N.call(this,se.$schema);const T=this._addSchema(se,A);return T.validate||L.call(this,T)}async function N(se){se&&!this.getSchema(se)&&await x.call(this,{$ref:se},!0)}async function L(se){try{return this._compileSchemaEnv(se)}catch(A){if(!(A instanceof o.default))throw A;return q.call(this,A),await Q.call(this,A.missingSchema),L.call(this,se)}}function q({missingSchema:se,missingRef:A}){if(this.refs[se])throw new Error(`AnySchema ${se} is loaded but ${A} cannot be resolved`)}async function Q(se){const A=await ue.call(this,se);this.refs[se]||await N.call(this,A.$schema),this.refs[se]||this.addSchema(A,se,K)}async function ue(se){const A=this._loading[se];if(A)return A;try{return await(this._loading[se]=D(se))}finally{delete this._loading[se]}}}addSchema(I,K,D,x=this.opts.validateSchema){if(Array.isArray(I)){for(const L of I)this.addSchema(L,void 0,D,x);return this}let N;if(typeof I=="object"){const{schemaId:L}=this.opts;if(N=I[L],N!==void 0&&typeof N!="string")throw new Error(`schema ${L} must be string`)}return K=(0,c.normalizeId)(K||N),this._checkUnique(K),this.schemas[K]=this._addSchema(I,D,K,x,!0),this}addMetaSchema(I,K,D=this.opts.validateSchema){return this.addSchema(I,K,!0,D),this}validateSchema(I,K){if(typeof I=="boolean")return!0;let D;if(D=I.$schema,D!==void 0&&typeof D!="string")throw new Error("$schema must be a string");if(D=D||this.opts.defaultMeta||this.defaultMeta(),!D)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const x=this.validate(D,I);if(!x&&K){const N="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(N);else throw new Error(N)}return x}getSchema(I){let K;for(;typeof(K=E.call(this,I))=="string";)I=K;if(K===void 0){const{schemaId:D}=this.opts,x=new a.SchemaEnv({schema:{},schemaId:D});if(K=a.resolveSchema.call(this,x,I),!K)return;this.refs[I]=K}return K.validate||this._compileSchemaEnv(K)}removeSchema(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(typeof I){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const K=E.call(this,I);return typeof K=="object"&&this._cache.delete(K.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{const K=I;this._cache.delete(K);let D=I[this.opts.schemaId];return D&&(D=(0,c.normalizeId)(D),delete this.schemas[D],delete this.refs[D]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(const K of I)this.addKeyword(K);return this}addKeyword(I,K){let D;if(typeof I=="string")D=I,typeof K=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),K.keyword=D);else if(typeof I=="object"&&K===void 0){if(K=I,D=K.keyword,Array.isArray(D)&&!D.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Z.call(this,D,K),!K)return(0,u.eachItem)(D,N=>ne.call(this,N)),this;oe.call(this,K);const x={...K,type:(0,l.getJSONTypes)(K.type),schemaType:(0,l.getJSONTypes)(K.schemaType)};return(0,u.eachItem)(D,x.type.length===0?N=>ne.call(this,N,x):N=>x.type.forEach(L=>ne.call(this,N,x,L))),this}getKeyword(I){const K=this.RULES.all[I];return typeof K=="object"?K.definition:!!K}removeKeyword(I){const{RULES:K}=this;delete K.keywords[I],delete K.all[I];for(const D of K.rules){const x=D.rules.findIndex(N=>N.keyword===I);x>=0&&D.rules.splice(x,1)}return this}addFormat(I,K){return typeof K=="string"&&(K=new RegExp(K)),this.formats[I]=K,this}errorsText(I=this.errors,{separator:K=", ",dataVar:D="data"}={}){return!I||I.length===0?"No errors":I.map(x=>`${D}${x.instancePath} ${x.message}`).reduce((x,N)=>x+K+N)}$dataMetaSchema(I,K){const D=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(const x of K){const N=x.split("/").slice(1);let L=I;for(const q of N)L=L[q];for(const q in D){const Q=D[q];if(typeof Q!="object")continue;const{$data:ue}=Q.definition,se=L[q];ue&&se&&(L[q]=fe(se))}}return I}_removeAllSchemas(I,K){for(const D in I){const x=I[D];(!K||K.test(D))&&(typeof x=="string"?delete I[D]:x&&!x.meta&&(this._cache.delete(x.schema),delete I[D]))}}_addSchema(I,K,D,x=this.opts.validateSchema,N=this.opts.addUsedSchema){let L;const{schemaId:q}=this.opts;if(typeof I=="object")L=I[q];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof I!="boolean")throw new Error("schema must be object or boolean")}let Q=this._cache.get(I);if(Q!==void 0)return Q;D=(0,c.normalizeId)(L||D);const ue=c.getSchemaRefs.call(this,I,D);return Q=new a.SchemaEnv({schema:I,schemaId:q,meta:K,baseId:D,localRefs:ue}),this._cache.set(Q.schema,Q),N&&!D.startsWith("#")&&(D&&this._checkUnique(D),this.refs[D]=Q),x&&this.validateSchema(I,!0),Q}_checkUnique(I){if(this.schemas[I]||this.refs[I])throw new Error(`schema with key or id "${I}" already exists`)}_compileSchemaEnv(I){if(I.meta?this._compileMetaSchema(I):a.compileSchema.call(this,I),!I.validate)throw new Error("ajv implementation error");return I.validate}_compileMetaSchema(I){const K=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,I)}finally{this.opts=K}}}$.ValidationError=n.default,$.MissingRefError=o.default,e.default=$;function g(H,I,K,D="error"){for(const x in H){const N=x;N in I&&this.logger[D](`${K}: option ${x}. ${H[N]}`)}}function E(H){return H=(0,c.normalizeId)(H),this.schemas[H]||this.refs[H]}function k(){const H=this.opts.schemas;if(H)if(Array.isArray(H))this.addSchema(H);else for(const I in H)this.addSchema(H[I],I)}function C(){for(const H in this.opts.formats){const I=this.opts.formats[H];I&&this.addFormat(H,I)}}function O(H){if(Array.isArray(H)){this.addVocabulary(H);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const I in H){const K=H[I];K.keyword||(K.keyword=I),this.addKeyword(K)}}function V(){const H={...this.opts};for(const I of w)delete H[I];return H}const z={log(){},warn(){},error(){}};function j(H){if(H===!1)return z;if(H===void 0)return console;if(H.log&&H.warn&&H.error)return H;throw new Error("logger must implement log, warn and error methods")}const R=/^[a-z_$][a-z0-9_$:-]*$/i;function Z(H,I){const{RULES:K}=this;if((0,u.eachItem)(H,D=>{if(K.keywords[D])throw new Error(`Keyword ${D} is already defined`);if(!R.test(D))throw new Error(`Keyword ${D} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw new Error('$data keyword must have "code" or "validate" function')}function ne(H,I,K){var D;const x=I?.post;if(K&&x)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:N}=this;let L=x?N.post:N.rules.find(({type:Q})=>Q===K);if(L||(L={type:K,rules:[]},N.rules.push(L)),N.keywords[H]=!0,!I)return;const q={keyword:H,definition:{...I,type:(0,l.getJSONTypes)(I.type),schemaType:(0,l.getJSONTypes)(I.schemaType)}};I.before?G.call(this,L,q,I.before):L.rules.push(q),N.all[H]=q,(D=I.implements)===null||D===void 0||D.forEach(Q=>this.addKeyword(Q))}function G(H,I,K){const D=H.rules.findIndex(x=>x.keyword===K);D>=0?H.rules.splice(D,0,I):(H.rules.push(I),this.logger.warn(`rule ${K} is not defined`))}function oe(H){let{metaSchema:I}=H;I!==void 0&&(H.$data&&this.opts.$data&&(I=fe(I)),H.validateSchema=this.compile(I,!0))}const F={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fe(H){return{anyOf:[H,F]}}})(La)),La}var ho={},mo={},go={},Gd;function D0(){if(Gd)return go;Gd=1,Object.defineProperty(go,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return go.default=e,go}var Kt={},Jd;function Ga(){if(Jd)return Kt;Jd=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.callRef=Kt.getValidate=void 0;const e=an(),t=gt(),r=pe(),n=ht(),o=fo(),s=ke(),a={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:p,it:h}=l,{baseId:v,schemaEnv:w,validateName:y,opts:m,self:_}=h,{root:f}=w;if((p==="#"||p==="#/")&&v===f.baseId)return $();const b=o.resolveRef.call(_,f,v,p);if(b===void 0)throw new e.default(h.opts.uriResolver,v,p);if(b instanceof o.SchemaEnv)return g(b);return E(b);function $(){if(w===f)return c(l,y,w,w.$async);const k=u.scopeValue("root",{ref:f});return c(l,(0,r._)`${k}.validate`,f,f.$async)}function g(k){const C=i(l,k);c(l,C,k,k.$async)}function E(k){const C=u.scopeValue("schema",m.code.source===!0?{ref:k,code:(0,r.stringify)(k)}:{ref:k}),O=u.name("valid"),V=l.subschema({schema:k,dataTypes:[],schemaPath:r.nil,topSchemaRef:C,errSchemaPath:p},O);l.mergeEvaluated(V),l.ok(O)}}};function i(l,u){const{gen:p}=l;return u.validate?p.scopeValue("validate",{ref:u.validate}):(0,r._)`${p.scopeValue("wrapper",{ref:u})}.validate`}Kt.getValidate=i;function c(l,u,p,h){const{gen:v,it:w}=l,{allErrors:y,schemaEnv:m,opts:_}=w,f=_.passContext?n.default.this:r.nil;h?b():$();function b(){if(!m.$async)throw new Error("async schema referenced by sync schema");const k=v.let("valid");v.try(()=>{v.code((0,r._)`await ${(0,t.callValidateCode)(l,u,f)}`),E(u),y||v.assign(k,!0)},C=>{v.if((0,r._)`!(${C} instanceof ${w.ValidationError})`,()=>v.throw(C)),g(C),y||v.assign(k,!1)}),l.ok(k)}function $(){l.result((0,t.callValidateCode)(l,u,f),()=>E(u),()=>g(u))}function g(k){const C=(0,r._)`${k}.errors`;v.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${C} : ${n.default.vErrors}.concat(${C})`),v.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function E(k){var C;if(!w.opts.unevaluated)return;const O=(C=p?.validate)===null||C===void 0?void 0:C.evaluated;if(w.props!==!0)if(O&&!O.dynamicProps)O.props!==void 0&&(w.props=s.mergeEvaluated.props(v,O.props,w.props));else{const V=v.var("props",(0,r._)`${k}.evaluated.props`);w.props=s.mergeEvaluated.props(v,V,w.props,r.Name)}if(w.items!==!0)if(O&&!O.dynamicItems)O.items!==void 0&&(w.items=s.mergeEvaluated.items(v,O.items,w.items));else{const V=v.var("items",(0,r._)`${k}.evaluated.items`);w.items=s.mergeEvaluated.items(v,V,w.items,r.Name)}}}return Kt.callRef=c,Kt.default=a,Kt}var Yd;function Xd(){if(Yd)return mo;Yd=1,Object.defineProperty(mo,"__esModule",{value:!0});const e=D0(),t=Ga(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return mo.default=r,mo}var vo={},yo={},Qd;function M0(){if(Qd)return yo;Qd=1,Object.defineProperty(yo,"__esModule",{value:!0});const e=pe(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:s,schemaCode:a})=>(0,e.str)`must be ${r[s].okStr} ${a}`,params:({keyword:s,schemaCode:a})=>(0,e._)`{comparison: ${r[s].okStr}, limit: ${a}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:a,data:i,schemaCode:c}=s;s.fail$data((0,e._)`${i} ${r[a].fail} ${c} || isNaN(${i})`)}};return yo.default=o,yo}var bo={},ef;function z0(){if(ef)return bo;ef=1,Object.defineProperty(bo,"__esModule",{value:!0});const e=pe(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:o,data:s,schemaCode:a,it:i}=n,c=i.opts.multipleOfPrecision,l=o.let("res"),u=c?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:(0,e._)`${l} !== parseInt(${l})`;n.fail$data((0,e._)`(${a} === 0 || (${l} = ${s}/${a}, ${u}))`)}};return bo.default=r,bo}var _o={},wo={},tf;function j0(){if(tf)return wo;tf=1,Object.defineProperty(wo,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,o=0,s;for(;o<r;)n++,s=t.charCodeAt(o++),s>=55296&&s<=56319&&o<r&&(s=t.charCodeAt(o),(s&64512)===56320&&o++);return n}return wo.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',wo}var rf;function F0(){if(rf)return _o;rf=1,Object.defineProperty(_o,"__esModule",{value:!0});const e=pe(),t=ke(),r=j0(),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:a}){const i=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:a,data:i,schemaCode:c,it:l}=s,u=a==="maxLength"?e.operators.GT:e.operators.LT,p=l.opts.unicode===!1?(0,e._)`${i}.length`:(0,e._)`${(0,t.useFunc)(s.gen,r.default)}(${i})`;s.fail$data((0,e._)`${p} ${u} ${c}`)}};return _o.default=o,_o}var $o={},nf;function V0(){if(nf)return $o;nf=1,Object.defineProperty($o,"__esModule",{value:!0});const e=gt(),t=pe(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,t.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,t._)`{pattern: ${o}}`},code(o){const{data:s,$data:a,schema:i,schemaCode:c,it:l}=o,u=l.opts.unicodeRegExp?"u":"",p=a?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(o,i);o.fail$data((0,t._)`!${p}.test(${s})`)}};return $o.default=n,$o}var So={},of;function L0(){if(of)return So;of=1,Object.defineProperty(So,"__esModule",{value:!0});const e=pe(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:o}){const s=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:o,data:s,schemaCode:a}=n,i=o==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${s}).length ${i} ${a}`)}};return So.default=r,So}var Eo={},sf;function R0(){if(sf)return Eo;sf=1,Object.defineProperty(Eo,"__esModule",{value:!0});const e=gt(),t=pe(),r=ke(),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:a,schema:i,schemaCode:c,data:l,$data:u,it:p}=s,{opts:h}=p;if(!u&&i.length===0)return;const v=i.length>=h.loopRequired;if(p.allErrors?w():y(),h.strictRequired){const f=s.parentSchema.properties,{definedProperties:b}=s.it;for(const $ of i)if(f?.[$]===void 0&&!b.has($)){const g=p.schemaEnv.baseId+p.errSchemaPath,E=`required property "${$}" is not defined at "${g}" (strictRequired)`;(0,r.checkStrictMode)(p,E,p.opts.strictRequired)}}function w(){if(v||u)s.block$data(t.nil,m);else for(const f of i)(0,e.checkReportMissingProp)(s,f)}function y(){const f=a.let("missing");if(v||u){const b=a.let("valid",!0);s.block$data(b,()=>_(f,b)),s.ok(b)}else a.if((0,e.checkMissingProp)(s,i,f)),(0,e.reportMissingProp)(s,f),a.else()}function m(){a.forOf("prop",c,f=>{s.setParams({missingProperty:f}),a.if((0,e.noPropertyInData)(a,l,f,h.ownProperties),()=>s.error())})}function _(f,b){s.setParams({missingProperty:f}),a.forOf(f,c,()=>{a.assign(b,(0,e.propertyInData)(a,l,f,h.ownProperties)),a.if((0,t.not)(b),()=>{s.error(),a.break()})},t.nil)}}};return Eo.default=o,Eo}var ko={},af;function q0(){if(af)return ko;af=1,Object.defineProperty(ko,"__esModule",{value:!0});const e=pe(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:o}){const s=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:o,data:s,schemaCode:a}=n,i=o==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${s}.length ${i} ${a}`)}};return ko.default=r,ko}var xo={},Co={},cf;function Ja(){if(cf)return Co;cf=1,Object.defineProperty(Co,"__esModule",{value:!0});const e=Md();return e.code='require("ajv/dist/runtime/equal").default',Co.default=e,Co}var lf;function U0(){if(lf)return xo;lf=1,Object.defineProperty(xo,"__esModule",{value:!0});const e=ao(),t=pe(),r=ke(),n=Ja(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:i}})=>(0,t.str)`must NOT have duplicate items (items ## ${i} and ${a} are identical)`,params:({params:{i:a,j:i}})=>(0,t._)`{i: ${a}, j: ${i}}`},code(a){const{gen:i,data:c,$data:l,schema:u,parentSchema:p,schemaCode:h,it:v}=a;if(!l&&!u)return;const w=i.let("valid"),y=p.items?(0,e.getSchemaTypes)(p.items):[];a.block$data(w,m,(0,t._)`${h} === false`),a.ok(w);function m(){const $=i.let("i",(0,t._)`${c}.length`),g=i.let("j");a.setParams({i:$,j:g}),i.assign(w,!0),i.if((0,t._)`${$} > 1`,()=>(_()?f:b)($,g))}function _(){return y.length>0&&!y.some($=>$==="object"||$==="array")}function f($,g){const E=i.name("item"),k=(0,e.checkDataTypes)(y,E,v.opts.strictNumbers,e.DataType.Wrong),C=i.const("indices",(0,t._)`{}`);i.for((0,t._)`;${$}--;`,()=>{i.let(E,(0,t._)`${c}[${$}]`),i.if(k,(0,t._)`continue`),y.length>1&&i.if((0,t._)`typeof ${E} == "string"`,(0,t._)`${E} += "_"`),i.if((0,t._)`typeof ${C}[${E}] == "number"`,()=>{i.assign(g,(0,t._)`${C}[${E}]`),a.error(),i.assign(w,!1).break()}).code((0,t._)`${C}[${E}] = ${$}`)})}function b($,g){const E=(0,r.useFunc)(i,n.default),k=i.name("outer");i.label(k).for((0,t._)`;${$}--;`,()=>i.for((0,t._)`${g} = ${$}; ${g}--;`,()=>i.if((0,t._)`${E}(${c}[${$}], ${c}[${g}])`,()=>{a.error(),i.assign(w,!1).break(k)})))}}};return xo.default=s,xo}var Po={},uf;function Z0(){if(uf)return Po;uf=1,Object.defineProperty(Po,"__esModule",{value:!0});const e=pe(),t=ke(),r=Ja(),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:a,data:i,$data:c,schemaCode:l,schema:u}=s;c||u&&typeof u=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(a,r.default)}(${i}, ${l})`):s.fail((0,e._)`${u} !== ${i}`)}};return Po.default=o,Po}var No={},df;function B0(){if(df)return No;df=1,Object.defineProperty(No,"__esModule",{value:!0});const e=pe(),t=ke(),r=Ja(),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:a,data:i,$data:c,schema:l,schemaCode:u,it:p}=s;if(!c&&l.length===0)throw new Error("enum must have non-empty array");const h=l.length>=p.opts.loopEnum;let v;const w=()=>v??(v=(0,t.useFunc)(a,r.default));let y;if(h||c)y=a.let("valid"),s.block$data(y,m);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const f=a.const("vSchema",u);y=(0,e.or)(...l.map((b,$)=>_(f,$)))}s.pass(y);function m(){a.assign(y,!1),a.forOf("v",u,f=>a.if((0,e._)`${w()}(${i}, ${f})`,()=>a.assign(y,!0).break()))}function _(f,b){const $=l[b];return typeof $=="object"&&$!==null?(0,e._)`${w()}(${i}, ${f}[${b}])`:(0,e._)`${i} === ${$}`}}};return No.default=o,No}var ff;function pf(){if(ff)return vo;ff=1,Object.defineProperty(vo,"__esModule",{value:!0});const e=M0(),t=z0(),r=F0(),n=V0(),o=L0(),s=R0(),a=q0(),i=U0(),c=Z0(),l=B0(),u=[e.default,t.default,r.default,n.default,o.default,s.default,a.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default];return vo.default=u,vo}var Ao={},Dr={},hf;function mf(){if(hf)return Dr;hf=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.validateAdditionalItems=void 0;const e=pe(),t=ke(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:a,it:i}=s,{items:c}=a;if(!Array.isArray(c)){(0,t.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(s,c)}};function o(s,a){const{gen:i,schema:c,data:l,keyword:u,it:p}=s;p.items=!0;const h=i.const("len",(0,e._)`${l}.length`);if(c===!1)s.setParams({len:a.length}),s.pass((0,e._)`${h} <= ${a.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(p,c)){const w=i.var("valid",(0,e._)`${h} <= ${a.length}`);i.if((0,e.not)(w),()=>v(w)),s.ok(w)}function v(w){i.forRange("i",a.length,h,y=>{s.subschema({keyword:u,dataProp:y,dataPropType:t.Type.Num},w),p.allErrors||i.if((0,e.not)(w),()=>i.break())})}}return Dr.validateAdditionalItems=o,Dr.default=n,Dr}var To={},Mr={},gf;function vf(){if(gf)return Mr;gf=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.validateTuple=void 0;const e=pe(),t=ke(),r=gt(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:a,it:i}=s;if(Array.isArray(a))return o(s,"additionalItems",a);i.items=!0,!(0,t.alwaysValidSchema)(i,a)&&s.ok((0,r.validateArray)(s))}};function o(s,a,i=s.schema){const{gen:c,parentSchema:l,data:u,keyword:p,it:h}=s;y(l),h.opts.unevaluated&&i.length&&h.items!==!0&&(h.items=t.mergeEvaluated.items(c,i.length,h.items));const v=c.name("valid"),w=c.const("len",(0,e._)`${u}.length`);i.forEach((m,_)=>{(0,t.alwaysValidSchema)(h,m)||(c.if((0,e._)`${w} > ${_}`,()=>s.subschema({keyword:p,schemaProp:_,dataProp:_},v)),s.ok(v))});function y(m){const{opts:_,errSchemaPath:f}=h,b=i.length,$=b===m.minItems&&(b===m.maxItems||m[a]===!1);if(_.strictTuples&&!$){const g=`"${p}" is ${b}-tuple, but minItems or maxItems/${a} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(h,g,_.strictTuples)}}}return Mr.validateTuple=o,Mr.default=n,Mr}var yf;function W0(){if(yf)return To;yf=1,Object.defineProperty(To,"__esModule",{value:!0});const e=vf(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return To.default=t,To}var Io={},bf;function H0(){if(bf)return Io;bf=1,Object.defineProperty(Io,"__esModule",{value:!0});const e=pe(),t=ke(),r=gt(),n=mf(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:i,parentSchema:c,it:l}=a,{prefixItems:u}=c;l.items=!0,!(0,t.alwaysValidSchema)(l,i)&&(u?(0,n.validateAdditionalItems)(a,u):a.ok((0,r.validateArray)(a)))}};return Io.default=s,Io}var Oo={},_f;function K0(){if(_f)return Oo;_f=1,Object.defineProperty(Oo,"__esModule",{value:!0});const e=pe(),t=ke(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:o,max:s}})=>s===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${s} valid item(s)`,params:({params:{min:o,max:s}})=>s===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${s}}`},code(o){const{gen:s,schema:a,parentSchema:i,data:c,it:l}=o;let u,p;const{minContains:h,maxContains:v}=i;l.opts.next?(u=h===void 0?1:h,p=v):u=1;const w=s.const("len",(0,e._)`${c}.length`);if(o.setParams({min:u,max:p}),p===void 0&&u===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&u>p){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,t.alwaysValidSchema)(l,a)){let b=(0,e._)`${w} >= ${u}`;p!==void 0&&(b=(0,e._)`${b} && ${w} <= ${p}`),o.pass(b);return}l.items=!0;const y=s.name("valid");p===void 0&&u===1?_(y,()=>s.if(y,()=>s.break())):u===0?(s.let(y,!0),p!==void 0&&s.if((0,e._)`${c}.length > 0`,m)):(s.let(y,!1),m()),o.result(y,()=>o.reset());function m(){const b=s.name("_valid"),$=s.let("count",0);_(b,()=>s.if(b,()=>f($)))}function _(b,$){s.forRange("i",0,w,g=>{o.subschema({keyword:"contains",dataProp:g,dataPropType:t.Type.Num,compositeRule:!0},b),$()})}function f(b){s.code((0,e._)`${b}++`),p===void 0?s.if((0,e._)`${b} >= ${u}`,()=>s.assign(y,!0).break()):(s.if((0,e._)`${b} > ${p}`,()=>s.assign(y,!1).break()),u===1?s.assign(y,!0):s.if((0,e._)`${b} >= ${u}`,()=>s.assign(y,!0)))}}};return Oo.default=n,Oo}var Ya={},wf;function Xa(){return wf||(wf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=pe(),r=ke(),n=gt();e.error={message:({params:{property:c,depsCount:l,deps:u}})=>{const p=l===1?"property":"properties";return(0,t.str)`must have ${p} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:p}})=>(0,t._)`{property: ${c},
|
|
56
|
+
missingProperty: ${p},
|
|
143
57
|
depsCount: ${l},
|
|
144
|
-
deps: ${u}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[l,u]=o(c);a(c,l),i(c,u)}};function o({schema:c}){const l={},u={};for(const h in c){if(h==="__proto__")continue;const p=Array.isArray(c[h])?l:u;p[h]=c[h]}return[l,u]}function a(c,l=c.schema){const{gen:u,data:h,it:p}=c;if(Object.keys(l).length===0)return;const v=u.let("missing");for(const w in l){const y=l[w];if(y.length===0)continue;const m=(0,n.propertyInData)(u,h,w,p.opts.ownProperties);c.setParams({property:w,depsCount:y.length,deps:y.join(", ")}),p.allErrors?u.if(m,()=>{for(const _ of y)(0,n.checkReportMissingProp)(c,_)}):(u.if((0,t._)`${m} && (${(0,n.checkMissingProp)(c,y,v)})`),(0,n.reportMissingProp)(c,v),u.else())}}e.validatePropertyDeps=a;function i(c,l=c.schema){const{gen:u,data:h,keyword:p,it:v}=c,w=u.name("valid");for(const y in l)(0,r.alwaysValidSchema)(v,l[y])||(u.if((0,n.propertyInData)(u,h,y,v.opts.ownProperties),()=>{const m=c.subschema({keyword:p,schemaProp:y},w);c.mergeValidEvaluated(m,w)},()=>u.var(w,!0)),c.ok(w))}e.validateSchemaDeps=i,e.default=s})(ri)),ri}var Ws={},jf;function M0(){if(jf)return Ws;jf=1,Object.defineProperty(Ws,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,e._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:o,schema:a,data:i,it:c}=s;if((0,t.alwaysValidSchema)(c,a))return;const l=o.name("valid");o.forIn("key",i,u=>{s.setParams({propertyName:u}),s.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),o.if((0,e.not)(l),()=>{s.error(!0),c.allErrors||o.break()})}),s.ok(l)}};return Ws.default=n,Ws}var Hs={},Nf;function Rf(){if(Nf)return Hs;Nf=1,Object.defineProperty(Hs,"__esModule",{value:!0});const e=bt(),t=ye(),r=vt(),n=Re(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:i,schema:c,parentSchema:l,data:u,errsCount:h,it:p}=a;if(!h)throw new Error("ajv implementation error");const{allErrors:v,opts:w}=p;if(p.props=!0,w.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(p,c))return;const y=(0,e.allSchemaProperties)(l.properties),m=(0,e.allSchemaProperties)(l.patternProperties);_(),a.ok((0,t._)`${h} === ${r.default.errors}`);function _(){i.forIn("key",u,$=>{!y.length&&!m.length?x($):i.if(f($),()=>x($))})}function f($){let E;if(y.length>8){const j=(0,n.schemaRefOrVal)(p,l.properties,"properties");E=(0,e.isOwnProperty)(i,j,$)}else y.length?E=(0,t.or)(...y.map(j=>(0,t._)`${$} === ${j}`)):E=t.nil;return m.length&&(E=(0,t.or)(E,...m.map(j=>(0,t._)`${(0,e.usePattern)(a,j)}.test(${$})`))),(0,t.not)(E)}function b($){i.code((0,t._)`delete ${u}[${$}]`)}function x($){if(w.removeAdditional==="all"||w.removeAdditional&&c===!1){b($);return}if(c===!1){a.setParams({additionalProperty:$}),a.error(),v||i.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(p,c)){const E=i.name("valid");w.removeAdditional==="failing"?(g($,E,!1),i.if((0,t.not)(E),()=>{a.reset(),b($)})):(g($,E),v||i.if((0,t.not)(E),()=>i.break()))}}function g($,E,j){const I={keyword:"additionalProperties",dataProp:$,dataPropType:n.Type.Str};j===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(I,E)}}};return Hs.default=o,Hs}var Gs={},Af;function V0(){if(Af)return Gs;Af=1,Object.defineProperty(Gs,"__esModule",{value:!0});const e=hn(),t=bt(),r=Re(),n=Rf(),s={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:i,parentSchema:c,data:l,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(i);for(const m of h)u.definedProperties.add(m);u.opts.unevaluated&&h.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(h),u.props));const p=h.filter(m=>!(0,r.alwaysValidSchema)(u,i[m]));if(p.length===0)return;const v=a.name("valid");for(const m of p)w(m)?y(m):(a.if((0,t.propertyInData)(a,l,m,u.opts.ownProperties)),y(m),u.allErrors||a.else().var(v,!0),a.endIf()),o.it.definedProperties.add(m),o.ok(v);function w(m){return u.opts.useDefaults&&!u.compositeRule&&i[m].default!==void 0}function y(m){o.subschema({keyword:"properties",schemaProp:m,dataProp:m},v)}}};return Gs.default=s,Gs}var Zs={},Pf;function F0(){if(Pf)return Zs;Pf=1,Object.defineProperty(Zs,"__esModule",{value:!0});const e=bt(),t=ye(),r=Re(),n=Re(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:i,data:c,parentSchema:l,it:u}=o,{opts:h}=u,p=(0,e.allSchemaProperties)(i),v=p.filter(x=>(0,r.alwaysValidSchema)(u,i[x]));if(p.length===0||v.length===p.length&&(!u.opts.unevaluated||u.props===!0))return;const w=h.strictSchema&&!h.allowMatchingProperties&&l.properties,y=a.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:m}=u;_();function _(){for(const x of p)w&&f(x),u.allErrors?b(x):(a.var(y,!0),b(x),a.if(y))}function f(x){for(const g in w)new RegExp(x).test(g)&&(0,r.checkStrictMode)(u,`property ${g} matches pattern ${x} (use allowMatchingProperties)`)}function b(x){a.forIn("key",c,g=>{a.if((0,t._)`${(0,e.usePattern)(o,x)}.test(${g})`,()=>{const $=v.includes(x);$||o.subschema({keyword:"patternProperties",schemaProp:x,dataProp:g,dataPropType:n.Type.Str},y),u.opts.unevaluated&&m!==!0?a.assign((0,t._)`${m}[${g}]`,!0):!$&&!u.allErrors&&a.if((0,t.not)(y),()=>a.break())})})}}};return Zs.default=s,Zs}var Ks={},Tf;function L0(){if(Tf)return Ks;Tf=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=Re(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:s,it:o}=r;if((0,e.alwaysValidSchema)(o,s)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Ks.default=t,Ks}var Ys={},Of;function z0(){if(Of)return Ys;Of=1,Object.defineProperty(Ys,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:bt().validateUnion,error:{message:"must match a schema in anyOf"}};return Ys.default=t,Ys}var Js={},If;function q0(){if(If)return Js;If=1,Object.defineProperty(Js,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,e._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:o,schema:a,parentSchema:i,it:c}=s;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&i.discriminator)return;const l=a,u=o.let("valid",!1),h=o.let("passing",null),p=o.name("_valid");s.setParams({passing:h}),o.block(v),s.result(u,()=>s.reset(),()=>s.error(!0));function v(){l.forEach((w,y)=>{let m;(0,t.alwaysValidSchema)(c,w)?o.var(p,!0):m=s.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},p),y>0&&o.if((0,e._)`${p} && ${u}`).assign(u,!1).assign(h,(0,e._)`[${h}, ${y}]`).else(),o.if(p,()=>{o.assign(u,!0),o.assign(h,y),m&&s.mergeEvaluated(m,e.Name)})})}}};return Js.default=n,Js}var Xs={},Df;function U0(){if(Df)return Xs;Df=1,Object.defineProperty(Xs,"__esModule",{value:!0});const e=Re(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:s,it:o}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const a=n.name("valid");s.forEach((i,c)=>{if((0,e.alwaysValidSchema)(o,i))return;const l=r.subschema({keyword:"allOf",schemaProp:c},a);r.ok(a),r.mergeEvaluated(l)})}};return Xs.default=t,Xs}var Qs={},Mf;function B0(){if(Mf)return Qs;Mf=1,Object.defineProperty(Qs,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:a,parentSchema:i,it:c}=o;i.then===void 0&&i.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=s(c,"then"),u=s(c,"else");if(!l&&!u)return;const h=a.let("valid",!0),p=a.name("_valid");if(v(),o.reset(),l&&u){const y=a.let("ifClause");o.setParams({ifClause:y}),a.if(p,w("then",y),w("else",y))}else l?a.if(p,w("then")):a.if((0,e.not)(p),w("else"));o.pass(h,()=>o.error(!0));function v(){const y=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p);o.mergeEvaluated(y)}function w(y,m){return()=>{const _=o.subschema({keyword:y},p);a.assign(h,p),o.mergeValidEvaluated(_,h),m?a.assign(m,(0,e._)`${y}`):o.setParams({ifClause:y})}}}};function s(o,a){const i=o.schema[a];return i!==void 0&&!(0,t.alwaysValidSchema)(o,i)}return Qs.default=n,Qs}var eo={},Vf;function W0(){if(Vf)return eo;Vf=1,Object.defineProperty(eo,"__esModule",{value:!0});const e=Re(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:s}){n.if===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "if" is ignored`)}};return eo.default=t,eo}var Ff;function Lf(){if(Ff)return zs;Ff=1,Object.defineProperty(zs,"__esModule",{value:!0});const e=xf(),t=O0(),r=$f(),n=I0(),s=D0(),o=ni(),a=M0(),i=Rf(),c=V0(),l=F0(),u=L0(),h=z0(),p=q0(),v=U0(),w=B0(),y=W0();function m(_=!1){const f=[u.default,h.default,p.default,v.default,w.default,y.default,a.default,i.default,o.default,c.default,l.default];return _?f.push(t.default,n.default):f.push(e.default,r.default),f.push(s.default),f}return zs.default=m,zs}var to={},qr={},zf;function qf(){if(zf)return qr;zf=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.dynamicAnchor=void 0;const e=ye(),t=vt(),r=$s(),n=ei(),s={keyword:"$dynamicAnchor",schemaType:"string",code:i=>o(i,i.schema)};function o(i,c){const{gen:l,it:u}=i;u.schemaEnv.root.dynamicAnchors[c]=!0;const h=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`,p=u.errSchemaPath==="#"?u.validateName:a(i);l.if((0,e._)`!${h}`,()=>l.assign(h,p))}qr.dynamicAnchor=o;function a(i){const{schemaEnv:c,schema:l,self:u}=i.it,{root:h,baseId:p,localRefs:v,meta:w}=c.root,{schemaId:y}=u.opts,m=new r.SchemaEnv({schema:l,schemaId:y,root:h,baseId:p,localRefs:v,meta:w});return r.compileSchema.call(u,m),(0,n.getValidate)(i,m)}return qr.default=s,qr}var Ur={},Uf;function Bf(){if(Uf)return Ur;Uf=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.dynamicRef=void 0;const e=ye(),t=vt(),r=ei(),n={keyword:"$dynamicRef",schemaType:"string",code:o=>s(o,o.schema)};function s(o,a){const{gen:i,keyword:c,it:l}=o;if(a[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const u=a.slice(1);if(l.allErrors)h();else{const v=i.let("valid",!1);h(v),o.ok(v)}function h(v){if(l.schemaEnv.root.dynamicAnchors[u]){const w=i.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(u)}`);i.if(w,p(w,v),p(l.validateName,v))}else p(l.validateName,v)()}function p(v,w){return w?()=>i.block(()=>{(0,r.callRef)(o,v),i.let(w,!0)}):()=>(0,r.callRef)(o,v)}}return Ur.dynamicRef=s,Ur.default=n,Ur}var ro={},Wf;function H0(){if(Wf)return ro;Wf=1,Object.defineProperty(ro,"__esModule",{value:!0});const e=qf(),t=Re(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return ro.default=r,ro}var no={},Hf;function G0(){if(Hf)return no;Hf=1,Object.defineProperty(no,"__esModule",{value:!0});const e=Bf(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return no.default=t,no}var Gf;function Z0(){if(Gf)return to;Gf=1,Object.defineProperty(to,"__esModule",{value:!0});const e=qf(),t=Bf(),r=H0(),n=G0(),s=[e.default,t.default,r.default,n.default];return to.default=s,to}var so={},oo={},Zf;function K0(){if(Zf)return oo;Zf=1,Object.defineProperty(oo,"__esModule",{value:!0});const e=ni(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return oo.default=t,oo}var ao={},Kf;function Y0(){if(Kf)return ao;Kf=1,Object.defineProperty(ao,"__esModule",{value:!0});const e=ni(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return ao.default=t,ao}var io={},Yf;function J0(){if(Yf)return io;Yf=1,Object.defineProperty(io,"__esModule",{value:!0});const e=Re(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:s}){n.contains===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "contains" is ignored`)}};return io.default=t,io}var Jf;function X0(){if(Jf)return so;Jf=1,Object.defineProperty(so,"__esModule",{value:!0});const e=K0(),t=Y0(),r=J0(),n=[e.default,t.default,r.default];return so.default=n,so}var co={},lo={},Xf;function Q0(){if(Xf)return lo;Xf=1,Object.defineProperty(lo,"__esModule",{value:!0});const e=ye(),t=Re(),r=vt(),s={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,e._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:a,schema:i,data:c,errsCount:l,it:u}=o;if(!l)throw new Error("ajv implementation error");const{allErrors:h,props:p}=u;p instanceof e.Name?a.if((0,e._)`${p} !== true`,()=>a.forIn("key",c,m=>a.if(w(p,m),()=>v(m)))):p!==!0&&a.forIn("key",c,m=>p===void 0?v(m):a.if(y(p,m),()=>v(m))),u.props=!0,o.ok((0,e._)`${l} === ${r.default.errors}`);function v(m){if(i===!1){o.setParams({unevaluatedProperty:m}),o.error(),h||a.break();return}if(!(0,t.alwaysValidSchema)(u,i)){const _=a.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:m,dataPropType:t.Type.Str},_),h||a.if((0,e.not)(_),()=>a.break())}}function w(m,_){return(0,e._)`!${m} || !${m}[${_}]`}function y(m,_){const f=[];for(const b in m)m[b]===!0&&f.push((0,e._)`${_} !== ${b}`);return(0,e.and)(...f)}}};return lo.default=s,lo}var uo={},Qf;function ex(){if(Qf)return uo;Qf=1,Object.defineProperty(uo,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{gen:o,schema:a,data:i,it:c}=s,l=c.items||0;if(l===!0)return;const u=o.const("len",(0,e._)`${i}.length`);if(a===!1)s.setParams({len:l}),s.fail((0,e._)`${u} > ${l}`);else if(typeof a=="object"&&!(0,t.alwaysValidSchema)(c,a)){const p=o.var("valid",(0,e._)`${u} <= ${l}`);o.if((0,e.not)(p),()=>h(p,l)),s.ok(p)}c.items=!0;function h(p,v){o.forRange("i",v,u,w=>{s.subschema({keyword:"unevaluatedItems",dataProp:w,dataPropType:t.Type.Num},p),c.allErrors||o.if((0,e.not)(p),()=>o.break())})}}};return uo.default=n,uo}var em;function tx(){if(em)return co;em=1,Object.defineProperty(co,"__esModule",{value:!0});const e=Q0(),t=ex(),r=[e.default,t.default];return co.default=r,co}var fo={},mo={},tm;function rx(){if(tm)return mo;tm=1,Object.defineProperty(mo,"__esModule",{value:!0});const e=ye(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,s){const{gen:o,data:a,$data:i,schema:c,schemaCode:l,it:u}=n,{opts:h,errSchemaPath:p,schemaEnv:v,self:w}=u;if(!h.validateFormats)return;i?y():m();function y(){const _=o.scopeValue("formats",{ref:w.formats,code:h.code.formats}),f=o.const("fDef",(0,e._)`${_}[${l}]`),b=o.let("fType"),x=o.let("format");o.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>o.assign(b,(0,e._)`${f}.type || "string"`).assign(x,(0,e._)`${f}.validate`),()=>o.assign(b,(0,e._)`"string"`).assign(x,f)),n.fail$data((0,e.or)(g(),$()));function g(){return h.strictSchema===!1?e.nil:(0,e._)`${l} && !${x}`}function $(){const E=v.$async?(0,e._)`(${f}.async ? await ${x}(${a}) : ${x}(${a}))`:(0,e._)`${x}(${a})`,j=(0,e._)`(typeof ${x} == "function" ? ${E} : ${x}.test(${a}))`;return(0,e._)`${x} && ${x} !== true && ${b} === ${s} && !${j}`}}function m(){const _=w.formats[c];if(!_){g();return}if(_===!0)return;const[f,b,x]=$(_);f===s&&n.pass(E());function g(){if(h.strictSchema===!1){w.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${c}" ignored in schema at path "${p}"`}}function $(j){const I=j instanceof RegExp?(0,e.regexpCode)(j):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(c)}`:void 0,U=o.scopeValue("formats",{key:c,ref:j,code:I});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${U}.validate`]:["string",j,U]}function E(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${x}(${a})`}return typeof b=="function"?(0,e._)`${x}(${a})`:(0,e._)`${x}.test(${a})`}}}};return mo.default=r,mo}var rm;function nm(){if(rm)return fo;rm=1,Object.defineProperty(fo,"__esModule",{value:!0});const t=[rx().default];return fo.default=t,fo}var pr={},sm;function om(){return sm||(sm=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.contentVocabulary=pr.metadataVocabulary=void 0,pr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],pr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),pr}var am;function nx(){if(am)return Es;am=1,Object.defineProperty(Es,"__esModule",{value:!0});const e=sf(),t=bf(),r=Lf(),n=Z0(),s=X0(),o=tx(),a=nm(),i=om(),c=[n.default,e.default,t.default,(0,r.default)(!0),a.default,i.metadataVocabulary,i.contentVocabulary,s.default,o.default];return Es.default=c,Es}var ho={},vn={},im;function sx(){if(im)return vn;im=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(vn.DiscrError=e={})),vn}var cm;function lm(){if(cm)return ho;cm=1,Object.defineProperty(ho,"__esModule",{value:!0});const e=ye(),t=sx(),r=$s(),n=pn(),s=Re(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:i,tagName:c}})=>i===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:i,tag:c,tagName:l}})=>(0,e._)`{error: ${i}, tag: ${l}, tagValue: ${c}}`},code(i){const{gen:c,data:l,schema:u,parentSchema:h,it:p}=i,{oneOf:v}=h;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const w=u.propertyName;if(typeof w!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const y=c.let("valid",!1),m=c.const("tag",(0,e._)`${l}${(0,e.getProperty)(w)}`);c.if((0,e._)`typeof ${m} == "string"`,()=>_(),()=>i.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:w})),i.ok(y);function _(){const x=b();c.if(!1);for(const g in x)c.elseIf((0,e._)`${m} === ${g}`),c.assign(y,f(x[g]));c.else(),i.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:w}),c.endIf()}function f(x){const g=c.name("valid"),$=i.subschema({keyword:"oneOf",schemaProp:x},g);return i.mergeEvaluated($,e.Name),g}function b(){var x;const g={},$=j(h);let E=!0;for(let D=0;D<v.length;D++){let V=v[D];if(V!=null&&V.$ref&&!(0,s.schemaHasRulesButRef)(V,p.self.RULES)){const W=V.$ref;if(V=r.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,W),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new n.default(p.opts.uriResolver,p.baseId,W)}const q=(x=V==null?void 0:V.properties)===null||x===void 0?void 0:x[w];if(typeof q!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${w}"`);E=E&&($||j(V)),I(q,D)}if(!E)throw new Error(`discriminator: "${w}" must be required`);return g;function j({required:D}){return Array.isArray(D)&&D.includes(w)}function I(D,V){if(D.const)U(D.const,V);else if(D.enum)for(const q of D.enum)U(q,V);else throw new Error(`discriminator: "properties/${w}" must have "const" or "enum"`)}function U(D,V){if(typeof D!="string"||D in g)throw new Error(`discriminator: "${w}" values must be unique strings`);g[D]=V}}}};return ho.default=a,ho}var po={};const ox={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},ax={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},ix={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},cx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},lx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},ux={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},dx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},fx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};var um;function mx(){if(um)return po;um=1,Object.defineProperty(po,"__esModule",{value:!0});const e=ox,t=ax,r=ix,n=cx,s=lx,o=ux,a=dx,i=fx,c=["/properties"];function l(u){return[e,t,r,n,s,h(this,o),a,h(this,i)].forEach(p=>this.addMetaSchema(p,void 0,!1)),this;function h(p,v){return u?p.$dataMetaSchema(v,c):v}}return po.default=l,po}var dm;function hx(){return dm||(dm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=ef(),n=nx(),s=lm(),o=mx(),a="https://json-schema.org/draft/2020-12/schema";class i extends r.default{constructor(v={}){super({...v,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:v,meta:w}=this.opts;w&&(o.default.call(this,v),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=i,e.exports=t=i,e.exports.Ajv2020=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var c=hn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=xs();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var h=pn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(hs,hs.exports)),hs.exports}var px=hx();const gx=ji(px);var go={exports:{}},si={},fm;function vx(){return fm||(fm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(D,V){return{validate:D,compare:V}}e.fullFormats={date:t(o,a),time:t(c(!0),l),"date-time":t(p(!0),v),"iso-time":t(c(),u),"iso-date-time":t(p(),w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:U,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:b,int32:{type:"number",validate:$},int64:{type:"number",validate:E},float:{type:"number",validate:j},double:{type:"number",validate:j},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,w),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(D){return D%4===0&&(D%100!==0||D%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(D){const V=n.exec(D);if(!V)return!1;const q=+V[1],W=+V[2],ee=+V[3];return W>=1&&W<=12&&ee>=1&&ee<=(W===2&&r(q)?29:s[W])}function a(D,V){if(D&&V)return D>V?1:D<V?-1:0}const i=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(D){return function(q){const W=i.exec(q);if(!W)return!1;const ee=+W[1],K=+W[2],se=+W[3],L=W[4],he=W[5]==="-"?-1:1,H=+(W[6]||0),C=+(W[7]||0);if(H>23||C>59||D&&!L)return!1;if(ee<=23&&K<=59&&se<60)return!0;const M=K-C*he,P=ee-H*he-(M<0?1:0);return(P===23||P===-1)&&(M===59||M===-1)&&se<61}}function l(D,V){if(!(D&&V))return;const q=new Date("2020-01-01T"+D).valueOf(),W=new Date("2020-01-01T"+V).valueOf();if(q&&W)return q-W}function u(D,V){if(!(D&&V))return;const q=i.exec(D),W=i.exec(V);if(q&&W)return D=q[1]+q[2]+q[3],V=W[1]+W[2]+W[3],D>V?1:D<V?-1:0}const h=/t|\s/i;function p(D){const V=c(D);return function(W){const ee=W.split(h);return ee.length===2&&o(ee[0])&&V(ee[1])}}function v(D,V){if(!(D&&V))return;const q=new Date(D).valueOf(),W=new Date(V).valueOf();if(q&&W)return q-W}function w(D,V){if(!(D&&V))return;const[q,W]=D.split(h),[ee,K]=V.split(h),se=a(q,ee);if(se!==void 0)return se||l(W,K)}const y=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _(D){return y.test(D)&&m.test(D)}const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function b(D){return f.lastIndex=0,f.test(D)}const x=-2147483648,g=2**31-1;function $(D){return Number.isInteger(D)&&D<=g&&D>=x}function E(D){return Number.isInteger(D)}function j(){return!0}const I=/[^\\]\\Z/;function U(D){if(I.test(D))return!1;try{return new RegExp(D),!0}catch{return!1}}})(si)),si}var oi={},vo={exports:{}},yo={},mm;function yx(){if(mm)return yo;mm=1,Object.defineProperty(yo,"__esModule",{value:!0});const e=sf(),t=bf(),r=Lf(),n=nm(),s=om(),o=[e.default,t.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];return yo.default=o,yo}const bx={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var hm;function _x(){return hm||(hm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=ef(),n=yx(),s=lm(),o=bx,a=["/properties"],i="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(w,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=hn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=xs();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var p=pn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})(vo,vo.exports)),vo.exports}var pm;function xx(){return pm||(pm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=_x(),r=ye(),n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},o={message:({keyword:i,schemaCode:c})=>(0,r.str)`should be ${s[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,r._)`{comparison: ${s[i].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:o,code(i){const{gen:c,data:l,schemaCode:u,keyword:h,it:p}=i,{opts:v,self:w}=p;if(!v.validateFormats)return;const y=new t.KeywordCxt(p,w.RULES.all.format.definition,"format");y.$data?m():_();function m(){const b=c.scopeValue("formats",{ref:w.formats,code:v.code.formats}),x=c.const("fmt",(0,r._)`${b}[${y.schemaCode}]`);i.fail$data((0,r.or)((0,r._)`typeof ${x} != "object"`,(0,r._)`${x} instanceof RegExp`,(0,r._)`typeof ${x}.compare != "function"`,f(x)))}function _(){const b=y.schema,x=w.formats[b];if(!x||x===!0)return;if(typeof x!="object"||x instanceof RegExp||typeof x.compare!="function")throw new Error(`"${h}": format "${b}" does not define "compare" function`);const g=c.scopeValue("formats",{key:b,ref:x,code:v.code.formats?(0,r._)`${v.code.formats}${(0,r.getProperty)(b)}`:void 0});i.fail$data(f(g))}function f(b){return(0,r._)`${b}.compare(${l}, ${u}) ${s[h].fail} 0`}},dependencies:["format"]};const a=i=>(i.addKeyword(e.formatLimitDefinition),i);e.default=a})(oi)),oi}var gm;function wx(){return gm||(gm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=vx(),n=xx(),s=ye(),o=new s.Name("fullFormats"),a=new s.Name("fastFormats"),i=(l,u={keywords:!0})=>{if(Array.isArray(u))return c(l,u,r.fullFormats,o),l;const[h,p]=u.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,o],v=u.formats||r.formatNames;return c(l,v,h,p),u.keywords&&(0,n.default)(l),l};i.get=(l,u="full")=>{const p=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!p)throw new Error(`Unknown format "${l}"`);return p};function c(l,u,h,p){var v,w;(v=(w=l.opts.code).formats)!==null&&v!==void 0||(w.formats=(0,s._)`require("ajv-formats/dist/formats").${p}`);for(const y of u)l.addFormat(y,h[y])}e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i})(go,go.exports)),go.exports}var $x=wx();const Sx=ji($x),Ex="https://json-schema.org/draft/2020-12/schema",ai=new gx;Sx(ai);function vm(e){return ai.validate(Ex,e)?null:ai.errors||[]}function kx({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:_e("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var ii="rovingFocusGroup.onEntryFocus",Cx={bubbles:!1,cancelable:!0},yn="RovingFocusGroup",[ci,ym,jx]=nc(yn),[Nx,bm]=xt(yn,[jx]),[Rx,Ax]=Nx(yn),_m=S.forwardRef((e,t)=>d.jsx(ci.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(ci.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Px,{...e,ref:t})})}));_m.displayName=yn;var Px=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...h}=e,p=S.useRef(null),v=De(t,p),w=Zo(o),[y,m]=cr({prop:a,defaultProp:i??null,onChange:c,caller:yn}),[_,f]=S.useState(!1),b=Bt(l),x=ym(r),g=S.useRef(!1),[$,E]=S.useState(0);return S.useEffect(()=>{const j=p.current;if(j)return j.addEventListener(ii,b),()=>j.removeEventListener(ii,b)},[b]),d.jsx(Rx,{scope:r,orientation:n,dir:w,loop:s,currentTabStopId:y,onItemFocus:S.useCallback(j=>m(j),[m]),onItemShiftTab:S.useCallback(()=>f(!0),[]),onFocusableItemAdd:S.useCallback(()=>E(j=>j+1),[]),onFocusableItemRemove:S.useCallback(()=>E(j=>j-1),[]),children:d.jsx(je.div,{tabIndex:_||$===0?-1:0,"data-orientation":n,...h,ref:v,style:{outline:"none",...e.style},onMouseDown:be(e.onMouseDown,()=>{g.current=!0}),onFocus:be(e.onFocus,j=>{const I=!g.current;if(j.target===j.currentTarget&&I&&!_){const U=new CustomEvent(ii,Cx);if(j.currentTarget.dispatchEvent(U),!U.defaultPrevented){const D=x().filter(K=>K.focusable),V=D.find(K=>K.active),q=D.find(K=>K.id===y),ee=[V,q,...D].filter(Boolean).map(K=>K.ref.current);$m(ee,u)}}g.current=!1}),onBlur:be(e.onBlur,()=>f(!1))})})}),xm="RovingFocusGroupItem",wm=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,children:a,...i}=e,c=Ht(),l=o||c,u=Ax(xm,r),h=u.currentTabStopId===l,p=ym(r),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:y}=u;return S.useEffect(()=>{if(n)return v(),()=>w()},[n,v,w]),d.jsx(ci.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:d.jsx(je.span,{tabIndex:h?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:be(e.onMouseDown,m=>{n?u.onItemFocus(l):m.preventDefault()}),onFocus:be(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:be(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const _=Ix(m,u.orientation,u.dir);if(_!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let b=p().filter(x=>x.focusable).map(x=>x.ref.current);if(_==="last")b.reverse();else if(_==="prev"||_==="next"){_==="prev"&&b.reverse();const x=b.indexOf(m.currentTarget);b=u.loop?Dx(b,x+1):b.slice(x+1)}setTimeout(()=>$m(b))}}),children:typeof a=="function"?a({isCurrentTabStop:h,hasTabStop:y!=null}):a})})});wm.displayName=xm;var Tx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ox(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ix(e,t,r){const n=Ox(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Tx[n]}function $m(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Dx(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Mx=_m,Vx=wm,li="Radio",[Fx,Sm]=xt(li),[Lx,zx]=Fx(li),Em=S.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:o,disabled:a,value:i="on",onCheck:c,form:l,...u}=e,[h,p]=S.useState(null),v=De(t,m=>p(m)),w=S.useRef(!1),y=h?l||!!h.closest("form"):!0;return d.jsxs(Lx,{scope:r,checked:s,disabled:a,children:[d.jsx(je.button,{type:"button",role:"radio","aria-checked":s,"data-state":Nm(s),"data-disabled":a?"":void 0,disabled:a,value:i,...u,ref:v,onClick:be(e.onClick,m=>{s||c==null||c(),y&&(w.current=m.isPropagationStopped(),w.current||m.stopPropagation())})}),y&&d.jsx(jm,{control:h,bubbles:!w.current,name:n,value:i,checked:s,required:o,disabled:a,form:l,style:{transform:"translateX(-100%)"}})]})});Em.displayName=li;var km="RadioIndicator",Cm=S.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...s}=e,o=zx(km,r);return d.jsx(Qt,{present:n||o.checked,children:d.jsx(je.span,{"data-state":Nm(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});Cm.displayName=km;var qx="RadioBubbleInput",jm=S.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...s},o)=>{const a=S.useRef(null),i=De(a,o),c=ha(r),l=da(t);return S.useEffect(()=>{const u=a.current;if(!u)return;const h=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==r&&v){const w=new Event("click",{bubbles:n});v.call(u,r),u.dispatchEvent(w)}},[c,r,n]),d.jsx(je.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...s.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});jm.displayName=qx;function Nm(e){return e?"checked":"unchecked"}var Ux=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bo="RadioGroup",[Bx]=xt(bo,[bm,Sm]),Rm=bm(),Am=Sm(),[Wx,Hx]=Bx(bo),Pm=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:o,required:a=!1,disabled:i=!1,orientation:c,dir:l,loop:u=!0,onValueChange:h,...p}=e,v=Rm(r),w=Zo(l),[y,m]=cr({prop:o,defaultProp:s??null,onChange:h,caller:bo});return d.jsx(Wx,{scope:r,name:n,required:a,disabled:i,value:y,onValueChange:m,children:d.jsx(Mx,{asChild:!0,...v,orientation:c,dir:w,loop:u,children:d.jsx(je.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:w,...p,ref:t})})})});Pm.displayName=bo;var Tm="RadioGroupItem",Om=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...s}=e,o=Hx(Tm,r),a=o.disabled||n,i=Rm(r),c=Am(r),l=S.useRef(null),u=De(t,l),h=o.value===s.value,p=S.useRef(!1);return S.useEffect(()=>{const v=y=>{Ux.includes(y.key)&&(p.current=!0)},w=()=>p.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",w),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",w)}},[]),d.jsx(Vx,{asChild:!0,...i,focusable:!a,active:h,children:d.jsx(Em,{disabled:a,required:o.required,checked:h,...c,...s,name:o.name,ref:u,onCheck:()=>o.onValueChange(s.value),onKeyDown:be(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:be(s.onFocus,()=>{var v;p.current&&((v=l.current)==null||v.click())})})})});Om.displayName=Tm;var Gx="RadioGroupIndicator",Im=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,s=Am(r);return d.jsx(Cm,{...s,...n,ref:t})});Im.displayName=Gx;var Zx=Pm,Kx=Om,Yx=Im;function Jx({className:e,...t}){return d.jsx(Zx,{"data-slot":"radio-group",className:_e("grid gap-3",e),...t})}function ui({className:e,...t}){return d.jsx(Kx,{"data-slot":"radio-group-item",className:_e("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(Yx,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(by,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const Xx=({basePath:e,readOnly:t})=>{const{control:r,setValue:n,getValues:s}=Ze(),[o,a]=Z.useState(JSON.stringify(s(`${e}.additionalProperties`),null,2)),[i,c]=Z.useState(null);tn({control:r,name:`${e}.isModifiable`});const l=tn({control:r,name:`${e}.additionalProperties`});Z.useEffect(()=>{c(null),a(JSON.stringify(l,null,2))},[l]);let u;typeof l=="boolean"?u=l?"true":"false":typeof l=="object"&&l!==null?u="schema":u="true";const h=p=>{const v=`${e}.additionalProperties`;if(p==="true")n(v,!0);else if(p==="false")n(v,!1);else{const w={type:"string"};n(v,w),a(JSON.stringify(w,null,2))}};return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:r,name:`${e}.minProperties`,render:({field:p})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Properties"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,value:p.value??"",onChange:v=>p.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}.maxProperties`,render:({field:p})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Properties"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,value:p.value??"",onChange:v=>p.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(we,{children:"Additional Properties"}),d.jsxs(Jx,{value:u,onValueChange:h,className:"flex space-x-4 pt-2",disabled:t,children:[d.jsxs(xe,{className:"flex items-center space-x-2",children:[d.jsx(ui,{value:"true",id:"ap-true"}),d.jsx(we,{htmlFor:"ap-true",className:"font-normal",children:"Allow (true)"})]}),d.jsxs(xe,{className:"flex items-center space-x-2",children:[d.jsx(ui,{value:"false",id:"ap-false"}),d.jsx(we,{htmlFor:"ap-false",className:"font-normal",children:"Disallow (false)"})]}),d.jsxs(xe,{className:"flex items-center space-x-2",children:[d.jsx(ui,{value:"schema",id:"ap-schema"}),d.jsx(we,{htmlFor:"ap-schema",className:"font-normal",children:"Specify Schema"})]})]}),d.jsx(Ce,{})]}),u==="schema"&&d.jsxs(xe,{children:[d.jsx(ke,{children:d.jsx(kx,{"data-testid":"schema-textarea",rows:6,disabled:t,className:"font-mono",value:o,onChange:p=>{const v=p.target.value;a(v);try{const w=JSON.parse(v),y=vm(w);if(y){const m=y.map(_=>`${_.instancePath} - ${_.message}`);c(m)}else n(`${e}.additionalProperties`,w)}catch{c(["Invalid schema structure."])}}})}),i&&i.length>0&&d.jsx("div",{className:"mt-2 text-sm font-medium text-destructive",children:i.map((p,v)=>d.jsx("p",{children:p},v))})]}),d.jsx(Ne,{control:r,name:`${e}."x-modifiable"`,render:({field:p})=>d.jsxs(xe,{className:"mt-2",children:[d.jsx(we,{children:"Modifiable Properties"}),d.jsx(ke,{children:d.jsx(fn,{disabled:t,value:p.value||[],onValueChange:p.onChange,placeholder:"Enter your modifiable properties"})}),d.jsx(Ce,{})]})})]})},Qx=({basePath:e,readOnly:t})=>{const{control:r}=Ze();return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:r,name:`${e}["$schema"]`,render:({field:n})=>d.jsxs(xe,{children:[d.jsx(we,{children:"$schema"}),d.jsx(ke,{children:d.jsx(Te,{placeholder:"e.g., http://json-schema.org/draft/2020-12/schema",disabled:t,...n,value:n.value??"http://json-schema.org/draft/2020-12/schema"})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}["$id"]`,render:({field:n})=>d.jsxs(xe,{children:[d.jsx(we,{children:"$id"}),d.jsx(ke,{children:d.jsx(Te,{disabled:t,...n,value:n.value??""})}),d.jsx(Ce,{})]})})]})};var ew=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tw=ew.reduce((e,t)=>{const r=Aa(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),rw="Separator",Dm="horizontal",nw=["horizontal","vertical"],Mm=S.forwardRef((e,t)=>{const{decorative:r,orientation:n=Dm,...s}=e,o=sw(n)?n:Dm,i=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return d.jsx(tw.div,{"data-orientation":o,...i,...s,ref:t})});Mm.displayName=rw;function sw(e){return nw.includes(e)}var ow=Mm;function aw({className:e,orientation:t="horizontal",decorative:r=!0,...n}){return d.jsx(ow,{"data-slot":"separator",decorative:r,orientation:t,className:_e("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}const iw=({theme:e,basePath:t,readOnly:r})=>{const{watch:n}=Ze(),s=n(`${t}.type`),o=()=>{switch(s){case"number":return d.jsx(c0,{theme:e,basePath:t,readOnly:r});case"integer":return d.jsx(f0,{theme:e,basePath:t,readOnly:r});case"string":return d.jsx(l0,{theme:e,basePath:t,readOnly:r});case"boolean":return d.jsx(u0,{theme:e,basePath:t,readOnly:r});case"array":return d.jsx(d0,{theme:e,basePath:t,readOnly:r});case"object":return d.jsx(Xx,{theme:e,basePath:t,readOnly:r});default:return d.jsx(d.Fragment,{children:`Settings for type ${s} are not yet implemented.`})}};return d.jsxs("div",{children:[t==="root"&&d.jsxs(d.Fragment,{children:[d.jsx(Qx,{theme:e,basePath:t,readOnly:r}),d.jsx(aw,{className:"my-4"})]}),o()]})};function cw({...e}){return d.jsx(Gu,{"data-slot":"dialog",...e})}function lw({...e}){return d.jsx(Zu,{"data-slot":"dialog-portal",...e})}function uw({className:e,...t}){return d.jsx(Ku,{"data-slot":"dialog-overlay",className:_e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function dw({className:e,children:t,showCloseButton:r=!0,...n}){return d.jsxs(lw,{"data-slot":"dialog-portal",children:[d.jsx(uw,{}),d.jsxs(Yu,{"data-slot":"dialog-content",className:_e("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,r&&d.jsxs(qa,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx(Hl,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function fw({className:e,...t}){return d.jsx("div",{"data-slot":"dialog-header",className:_e("flex flex-col gap-2 text-center sm:text-left",e),...t})}function mw({className:e,...t}){return d.jsx(Ju,{"data-slot":"dialog-title",className:_e("text-lg leading-none font-semibold",e),...t})}const hw=({theme:e,readOnly:t,className:r,isOpen:n,fieldPath:s,onClose:o})=>{const{getValues:a}=Ze(),i=s?a(s):null;return d.jsx(cw,{open:n,onOpenChange:c=>!c&&o(),children:d.jsxs(dw,{className:_e("bg-background text-foreground border-input",e,r),children:[d.jsx(fw,{children:d.jsxs(mw,{className:"capitalize",children:[i==null?void 0:i.type," Schema Settings"]})}),s&&d.jsx(iw,{basePath:s,theme:e,readOnly:t}),d.jsx(Xt,{onClick:o,variant:"default",children:"Close"})]})})},Vm=(e,t,r)=>{if(e&&"reportValidity"in e){const n=te(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},di=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Vm(n.ref,r,e):n&&n.refs&&n.refs.forEach(s=>Vm(s,r,e))}},Fm=(e,t)=>{t.shouldUseNativeValidation&&di(e,t);const r={};for(const n in e){const s=te(t.fields,n),o=Object.assign(e[n]||{},{ref:s&&s.ref});if(pw(t.names||Object.keys(e),n)){const a=Object.assign({},te(r,n));Ie(a,"root",o),Ie(r,n,a)}else Ie(r,n,o)}return r},pw=(e,t)=>{const r=Lm(t);return e.some(n=>Lm(n).match(`^${r}\\.\\d+`))};function Lm(e){return e.replace(/\]|\[/g,"")}function zm(e,t,r){function n(i,c){var l;Object.defineProperty(i,"_zod",{value:i._zod??{},enumerable:!1}),(l=i._zod).traits??(l.traits=new Set),i._zod.traits.add(e),t(i,c);for(const u in a.prototype)u in i||Object.defineProperty(i,u,{value:a.prototype[u].bind(i)});i._zod.constr=a,i._zod.def=c}const s=(r==null?void 0:r.Parent)??Object;class o extends s{}Object.defineProperty(o,"name",{value:e});function a(i){var c;const l=r!=null&&r.Parent?new o:this;n(l,i),(c=l._zod).deferred??(c.deferred=[]);for(const u of l._zod.deferred)u();return l}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:i=>{var c,l;return r!=null&&r.Parent&&i instanceof r.Parent?!0:(l=(c=i==null?void 0:i._zod)==null?void 0:c.traits)==null?void 0:l.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class gw extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const vw={};function qm(e){return vw}function yw(e,t){return typeof t=="bigint"?t.toString():t}const Um=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function _o(e){return typeof e=="string"?e:e==null?void 0:e.message}function Bm(e,t,r){var s,o,a,i,c,l;const n={...e,path:e.path??[]};if(!e.message){const u=_o((a=(o=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,e))??_o((i=t==null?void 0:t.error)==null?void 0:i.call(t,e))??_o((c=r.customError)==null?void 0:c.call(r,e))??_o((l=r.localeError)==null?void 0:l.call(r,e))??"Invalid input";n.message=u}return delete n.inst,delete n.continue,t!=null&&t.reportInput||delete n.input,n}const Wm=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,yw,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},bw=zm("$ZodError",Wm),Hm=zm("$ZodError",Wm,{Parent:Error}),_w=(e=>(t,r,n,s)=>{const o=n?Object.assign(n,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new gw;if(a.issues.length){const i=new((s==null?void 0:s.Err)??e)(a.issues.map(c=>Bm(c,o,qm())));throw Um(i,s==null?void 0:s.callee),i}return a.value})(Hm),xw=(e=>async(t,r,n,s)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const i=new((s==null?void 0:s.Err)??e)(a.issues.map(c=>Bm(c,o,qm())));throw Um(i,s==null?void 0:s.callee),i}return a.value})(Hm);function Gm(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function ww(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,a=n.path.join(".");if(!r[a])if("unionErrors"in n){var i=n.unionErrors[0].errors[0];r[a]={message:i.message,type:i.code}}else r[a]={message:o,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(h){return e.push(h)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=To(a,t,r,s,l?[].concat(l,n.message):n.message)}e.shift()}return r}function $w(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,a=n.path.join(".");if(!r[a])if(n.code==="invalid_union"&&n.errors.length>0){var i=n.errors[0][0];r[a]={message:i.message,type:i.code}}else r[a]={message:o,type:s};if(n.code==="invalid_union"&&n.errors.forEach(function(u){return u.forEach(function(h){return e.push(h)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=To(a,t,r,s,l?[].concat(l,n.message):n.message)}e.shift()}return r}function Sw(e,t,r){if(r===void 0&&(r={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,s,o){try{return Promise.resolve(Gm(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(a){return o.shouldUseNativeValidation&&di({},o),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return Array.isArray(i==null?void 0:i.issues)})(a))return{values:{},errors:Fm(ww(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,s,o){try{return Promise.resolve(Gm(function(){return Promise.resolve((r.mode==="sync"?_w:xw)(e,n,t)).then(function(a){return o.shouldUseNativeValidation&&di({},o),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return i instanceof bw})(a))return{values:{},errors:Fm($w(a.issues,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}var Oe;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const o={};for(const a of s)o[a]=a;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(i=>typeof s[s[i]]!="number"),a={};for(const i of o)a[i]=s[i];return e.objectValues(a)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&o.push(a);return o},e.find=(s,o)=>{for(const a of s)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Oe||(Oe={}));var Zm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Zm||(Zm={}));const ue=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),rr=e=>{switch(typeof e){case"undefined":return ue.undefined;case"string":return ue.string;case"number":return Number.isNaN(e)?ue.nan:ue.number;case"boolean":return ue.boolean;case"function":return ue.function;case"bigint":return ue.bigint;case"symbol":return ue.symbol;case"object":return Array.isArray(e)?ue.array:e===null?ue.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ue.promise:typeof Map<"u"&&e instanceof Map?ue.map:typeof Set<"u"&&e instanceof Set?ue.set:typeof Date<"u"&&e instanceof Date?ue.date:ue.object;default:return ue.unknown}},Q=Oe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ft extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let i=n,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(i[l]=i[l]||{_errors:[]},i[l]._errors.push(r(a))):i[l]=i[l]||{_errors:[]},i=i[l],c++}}};return s(this),n}static assert(t){if(!(t instanceof Ft))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];r[o]=r[o]||[],r[o].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Ft.create=e=>new Ft(e);const fi=(e,t)=>{let r;switch(e.code){case Q.invalid_type:e.received===ue.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Q.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Oe.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:r=`Unrecognized key(s) in object: ${Oe.joinValues(e.keys,", ")}`;break;case Q.invalid_union:r="Invalid input";break;case Q.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Oe.joinValues(e.options)}`;break;case Q.invalid_enum_value:r=`Invalid enum value. Expected ${Oe.joinValues(e.options)}, received '${e.received}'`;break;case Q.invalid_arguments:r="Invalid function arguments";break;case Q.invalid_return_type:r="Invalid function return type";break;case Q.invalid_date:r="Invalid date";break;case Q.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Oe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Q.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Q.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Q.custom:r="Invalid input";break;case Q.invalid_intersection_types:r="Intersection results could not be merged";break;case Q.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Q.not_finite:r="Number must be finite";break;default:r=t.defaultError,Oe.assertNever(e)}return{message:r}};let Ew=fi;function kw(){return Ew}const Cw=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],a={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let i="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)i=l(a,{data:t,defaultError:i}).message;return{...s,path:o,message:i}};function ae(e,t){const r=kw(),n=Cw({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===fi?void 0:fi].filter(s=>!!s)});e.common.issues.push(n)}class Xe{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return ve;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const o=await s.key,a=await s.value;n.push({key:o,value:a})}return Xe.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:o,value:a}=s;if(o.status==="aborted"||a.status==="aborted")return ve;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(n[o.value]=a.value)}return{status:t.value,value:n}}}const ve=Object.freeze({status:"aborted"}),bn=e=>({status:"dirty",value:e}),ut=e=>({status:"valid",value:e}),Km=e=>e.status==="aborted",Ym=e=>e.status==="dirty",Br=e=>e.status==="valid",xo=e=>typeof Promise<"u"&&e instanceof Promise;var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(fe||(fe={}));class jt{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Jm=(e,t)=>{if(Br(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Ft(e.common.issues);return this._error=r,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(a,i)=>{const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??i.defaultError}:typeof i.data>"u"?{message:c??n??i.defaultError}:a.code!=="invalid_type"?{message:i.defaultError}:{message:c??r??i.defaultError}},description:s}}class Ae{get description(){return this._def.description}_getType(t){return rr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:rr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Xe,ctx:{common:t.parent.common,data:t.data,parsedType:rr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(xo(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)},s=this._parseSync({data:t,path:n.path,parent:n});return Jm(n,s)}"~validate"(t){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:r});return Br(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(s=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>Br(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(xo(s)?s:Promise.resolve(s));return Jm(n,o)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const a=t(s),i=()=>o.addIssue({code:Q.custom,...n(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(i(),!1)):a?!0:(i(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Zr({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return sr.create(this,this._def)}nullable(){return Kr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Nt.create(this)}promise(){return ko.create(this,this._def)}or(t){return $o.create([this,t],this._def)}and(t){return So.create(this,t,this._def)}transform(t){return new Zr({...$e(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new yi({...$e(this._def),innerType:this,defaultValue:r,typeName:pe.ZodDefault})}brand(){return new Yw({typeName:pe.ZodBranded,type:this,...$e(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new bi({...$e(this._def),innerType:this,catchValue:r,typeName:pe.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return _i.create(this,t)}readonly(){return xi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const jw=/^c[^\s-]{8,}$/i,Nw=/^[0-9a-z]+$/,Rw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Aw=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Pw=/^[a-z0-9_-]{21}$/i,Tw=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ow=/^[-+]?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)?)??$/,Iw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Dw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mi;const Mw=/^(?:(?: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])$/,Vw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Fw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Lw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zw=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,qw=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Xm="((\\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])))",Uw=new RegExp(`^${Xm}$`);function Qm(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Bw(e){return new RegExp(`^${Qm(e)}$`)}function Ww(e){let t=`${Xm}T${Qm(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Hw(e,t){return!!((t==="v4"||!t)&&Mw.test(e)||(t==="v6"||!t)&&Fw.test(e))}function Gw(e,t){if(!Tw.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function Zw(e,t){return!!((t==="v4"||!t)&&Vw.test(e)||(t==="v6"||!t)&&Lw.test(e))}class Lt extends Ae{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ue.string){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_type,expected:ue.string,received:o.parsedType}),ve}const n=new Xe;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,i=t.data.length<o.value;(a||i)&&(s=this._getOrReturnCtx(t,s),a?ae(s,{code:Q.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&ae(s,{code:Q.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Iw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"email",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")mi||(mi=new RegExp(Dw,"u")),mi.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"emoji",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Aw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"uuid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Pw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"nanoid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")jw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cuid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Nw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cuid2",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Rw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"ulid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ae(s,{validation:"url",code:Q.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"regex",code:Q.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Ww(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?Uw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Bw(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Ow.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"duration",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Hw(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"ip",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?Gw(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"jwt",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?Zw(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cidr",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?zw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"base64",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?qw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"base64url",code:Q.invalid_string,message:o.message}),n.dirty()):Oe.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:Q.invalid_string,...fe.errToObj(n)})}_addCheck(t){return new Lt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...fe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...fe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...fe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...fe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...fe.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...fe.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...fe.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...fe.errToObj(r)})}nonempty(t){return this.min(1,fe.errToObj(t))}trim(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Lt.create=e=>new Lt({checks:[],typeName:pe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$e(e)});function Kw(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return o%a/10**s}class Wr extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ue.number){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_type,expected:ue.number,received:o.parsedType}),ve}let n;const s=new Xe;for(const o of this._def.checks)o.kind==="int"?Oe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?Kw(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.not_finite,message:o.message}),s.dirty()):Oe.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,fe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,fe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,fe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,fe.toString(r))}setLimit(t,r,n,s){return new Wr({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:fe.toString(s)}]})}_addCheck(t){return new Wr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Oe.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}Wr.create=e=>new Wr({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class _n extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ue.bigint)return this._getInvalidInput(t);let n;const s=new Xe;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Oe.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return ae(r,{code:Q.invalid_type,expected:ue.bigint,received:r.parsedType}),ve}gte(t,r){return this.setLimit("min",t,!0,fe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,fe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,fe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,fe.toString(r))}setLimit(t,r,n,s){return new _n({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:fe.toString(s)}]})}_addCheck(t){return new _n({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}_n.create=e=>new _n({checks:[],typeName:pe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$e(e)});class hi extends Ae{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ue.boolean){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.boolean,received:n.parsedType}),ve}return ut(t.data)}}hi.create=e=>new hi({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class wo extends Ae{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ue.date){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_type,expected:ue.date,received:o.parsedType}),ve}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_date}),ve}const n=new Xe;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Oe.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new wo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:fe.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}wo.create=e=>new wo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...$e(e)});class eh extends Ae{_parse(t){if(this._getType(t)!==ue.symbol){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.symbol,received:n.parsedType}),ve}return ut(t.data)}}eh.create=e=>new eh({typeName:pe.ZodSymbol,...$e(e)});class th extends Ae{_parse(t){if(this._getType(t)!==ue.undefined){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.undefined,received:n.parsedType}),ve}return ut(t.data)}}th.create=e=>new th({typeName:pe.ZodUndefined,...$e(e)});class rh extends Ae{_parse(t){if(this._getType(t)!==ue.null){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.null,received:n.parsedType}),ve}return ut(t.data)}}rh.create=e=>new rh({typeName:pe.ZodNull,...$e(e)});class pi extends Ae{constructor(){super(...arguments),this._any=!0}_parse(t){return ut(t.data)}}pi.create=e=>new pi({typeName:pe.ZodAny,...$e(e)});class nh extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}}nh.create=e=>new nh({typeName:pe.ZodUnknown,...$e(e)});class nr extends Ae{_parse(t){const r=this._getOrReturnCtx(t);return ae(r,{code:Q.invalid_type,expected:ue.never,received:r.parsedType}),ve}}nr.create=e=>new nr({typeName:pe.ZodNever,...$e(e)});class sh extends Ae{_parse(t){if(this._getType(t)!==ue.undefined){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.void,received:n.parsedType}),ve}return ut(t.data)}}sh.create=e=>new sh({typeName:pe.ZodVoid,...$e(e)});class Nt extends Ae{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==ue.array)return ae(r,{code:Q.invalid_type,expected:ue.array,received:r.parsedType}),ve;if(s.exactLength!==null){const a=r.data.length>s.exactLength.value,i=r.data.length<s.exactLength.value;(a||i)&&(ae(r,{code:a?Q.too_big:Q.too_small,minimum:i?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(ae(r,{code:Q.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(ae(r,{code:Q.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,i)=>s.type._parseAsync(new jt(r,a,r.path,i)))).then(a=>Xe.mergeArray(n,a));const o=[...r.data].map((a,i)=>s.type._parseSync(new jt(r,a,r.path,i)));return Xe.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new Nt({...this._def,minLength:{value:t,message:fe.toString(r)}})}max(t,r){return new Nt({...this._def,maxLength:{value:t,message:fe.toString(r)}})}length(t,r){return new Nt({...this._def,exactLength:{value:t,message:fe.toString(r)}})}nonempty(t){return this.min(1,t)}}Nt.create=(e,t)=>new Nt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...$e(t)});function Hr(e){if(e instanceof We){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=sr.create(Hr(n))}return new We({...e._def,shape:()=>t})}else return e instanceof Nt?new Nt({...e._def,type:Hr(e.element)}):e instanceof sr?sr.create(Hr(e.unwrap())):e instanceof Kr?Kr.create(Hr(e.unwrap())):e instanceof gr?gr.create(e.items.map(t=>Hr(t))):e}class We extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Oe.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ue.object){const l=this._getOrReturnCtx(t);return ae(l,{code:Q.invalid_type,expected:ue.object,received:l.parsedType}),ve}const{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof nr&&this._def.unknownKeys==="strip"))for(const l in s.data)a.includes(l)||i.push(l);const c=[];for(const l of a){const u=o[l],h=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new jt(s,h,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof nr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of i)c.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(l==="strict")i.length>0&&(ae(s,{code:Q.unrecognized_keys,keys:i}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of i){const h=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new jt(s,h,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const h=await u.key,p=await u.value;l.push({key:h,value:p,alwaysSet:u.alwaysSet})}return l}).then(l=>Xe.mergeObjectSync(n,l)):Xe.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new We({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,a;const s=((a=(o=this._def).errorMap)==null?void 0:a.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:fe.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new We({...this._def,unknownKeys:"strip"})}passthrough(){return new We({...this._def,unknownKeys:"passthrough"})}extend(t){return new We({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new We({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new We({...this._def,catchall:t})}pick(t){const r={};for(const n of Oe.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new We({...this._def,shape:()=>r})}omit(t){const r={};for(const n of Oe.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new We({...this._def,shape:()=>r})}deepPartial(){return Hr(this)}partial(t){const r={};for(const n of Oe.objectKeys(this.shape)){const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new We({...this._def,shape:()=>r})}required(t){const r={};for(const n of Oe.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof sr;)o=o._def.innerType;r[n]=o}return new We({...this._def,shape:()=>r})}keyof(){return ih(Oe.objectKeys(this.shape))}}We.create=(e,t)=>new We({shape:()=>e,unknownKeys:"strip",catchall:nr.create(),typeName:pe.ZodObject,...$e(t)}),We.strictCreate=(e,t)=>new We({shape:()=>e,unknownKeys:"strict",catchall:nr.create(),typeName:pe.ZodObject,...$e(t)}),We.lazycreate=(e,t)=>new We({shape:e,unknownKeys:"strip",catchall:nr.create(),typeName:pe.ZodObject,...$e(t)});class $o extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return r.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(i=>new Ft(i.ctx.common.issues));return ae(r,{code:Q.invalid_union,unionErrors:a}),ve}if(r.common.async)return Promise.all(n.map(async o=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(s);{let o;const a=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(c=>new Ft(c));return ae(r,{code:Q.invalid_union,unionErrors:i}),ve}}get options(){return this._def.options}}$o.create=(e,t)=>new $o({options:e,typeName:pe.ZodUnion,...$e(t)});function gi(e,t){const r=rr(e),n=rr(t);if(e===t)return{valid:!0,data:e};if(r===ue.object&&n===ue.object){const s=Oe.objectKeys(t),o=Oe.objectKeys(e).filter(i=>s.indexOf(i)!==-1),a={...e,...t};for(const i of o){const c=gi(e[i],t[i]);if(!c.valid)return{valid:!1};a[i]=c.data}return{valid:!0,data:a}}else if(r===ue.array&&n===ue.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const a=e[o],i=t[o],c=gi(a,i);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===ue.date&&n===ue.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class So extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(o,a)=>{if(Km(o)||Km(a))return ve;const i=gi(o.value,a.value);return i.valid?((Ym(o)||Ym(a))&&r.dirty(),{status:r.value,value:i.data}):(ae(n,{code:Q.invalid_intersection_types}),ve)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>s(o,a)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}So.create=(e,t,r)=>new So({left:e,right:t,typeName:pe.ZodIntersection,...$e(r)});class gr extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.array)return ae(n,{code:Q.invalid_type,expected:ue.array,received:n.parsedType}),ve;if(n.data.length<this._def.items.length)return ae(n,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&n.data.length>this._def.items.length&&(ae(n,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((a,i)=>{const c=this._def.items[i]||this._def.rest;return c?c._parse(new jt(n,a,n.path,i)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>Xe.mergeArray(r,a)):Xe.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new gr({...this._def,rest:t})}}gr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new gr({items:e,typeName:pe.ZodTuple,rest:null,...$e(t)})};class Eo extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.object)return ae(n,{code:Q.invalid_type,expected:ue.object,received:n.parsedType}),ve;const s=[],o=this._def.keyType,a=this._def.valueType;for(const i in n.data)s.push({key:o._parse(new jt(n,i,n.path,i)),value:a._parse(new jt(n,n.data[i],n.path,i)),alwaysSet:i in n.data});return n.common.async?Xe.mergeObjectAsync(r,s):Xe.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Ae?new Eo({keyType:t,valueType:r,typeName:pe.ZodRecord,...$e(n)}):new Eo({keyType:Lt.create(),valueType:t,typeName:pe.ZodRecord,...$e(r)})}}class oh extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.map)return ae(n,{code:Q.invalid_type,expected:ue.map,received:n.parsedType}),ve;const s=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([i,c],l)=>({key:s._parse(new jt(n,i,n.path,[l,"key"])),value:o._parse(new jt(n,c,n.path,[l,"value"]))}));if(n.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return ve;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),i.set(l.value,u.value)}return{status:r.value,value:i}})}else{const i=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return ve;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),i.set(l.value,u.value)}return{status:r.value,value:i}}}}oh.create=(e,t,r)=>new oh({valueType:t,keyType:e,typeName:pe.ZodMap,...$e(r)});class xn extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.set)return ae(n,{code:Q.invalid_type,expected:ue.set,received:n.parsedType}),ve;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(ae(n,{code:Q.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(ae(n,{code:Q.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return ve;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const i=[...n.data.values()].map((c,l)=>o._parse(new jt(n,c,n.path,l)));return n.common.async?Promise.all(i).then(c=>a(c)):a(i)}min(t,r){return new xn({...this._def,minSize:{value:t,message:fe.toString(r)}})}max(t,r){return new xn({...this._def,maxSize:{value:t,message:fe.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}xn.create=(e,t)=>new xn({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...$e(t)});class vi extends Ae{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}vi.create=(e,t)=>new vi({getter:e,typeName:pe.ZodLazy,...$e(t)});class ah extends Ae{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ae(r,{received:r.data,code:Q.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}ah.create=(e,t)=>new ah({value:e,typeName:pe.ZodLiteral,...$e(t)});function ih(e,t){return new Gr({values:e,typeName:pe.ZodEnum,...$e(t)})}class Gr extends Ae{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ae(r,{expected:Oe.joinValues(n),received:r.parsedType,code:Q.invalid_type}),ve}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ae(r,{received:r.data,code:Q.invalid_enum_value,options:n}),ve}return ut(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Gr.create(t,{...this._def,...r})}exclude(t,r=this._def){return Gr.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Gr.create=ih;class ch extends Ae{_parse(t){const r=Oe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==ue.string&&n.parsedType!==ue.number){const s=Oe.objectValues(r);return ae(n,{expected:Oe.joinValues(s),received:n.parsedType,code:Q.invalid_type}),ve}if(this._cache||(this._cache=new Set(Oe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=Oe.objectValues(r);return ae(n,{received:n.data,code:Q.invalid_enum_value,options:s}),ve}return ut(t.data)}get enum(){return this._def.values}}ch.create=(e,t)=>new ch({values:e,typeName:pe.ZodNativeEnum,...$e(t)});class ko extends Ae{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ue.promise&&r.common.async===!1)return ae(r,{code:Q.invalid_type,expected:ue.promise,received:r.parsedType}),ve;const n=r.parsedType===ue.promise?r.data:Promise.resolve(r.data);return ut(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ko.create=(e,t)=>new ko({type:e,typeName:pe.ZodPromise,...$e(t)});class Zr extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:a=>{ae(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const a=s.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async i=>{if(r.value==="aborted")return ve;const c=await this._def.schema._parseAsync({data:i,path:n.path,parent:n});return c.status==="aborted"?ve:c.status==="dirty"||r.value==="dirty"?bn(c.value):c});{if(r.value==="aborted")return ve;const i=this._def.schema._parseSync({data:a,path:n.path,parent:n});return i.status==="aborted"?ve:i.status==="dirty"||r.value==="dirty"?bn(i.value):i}}if(s.type==="refinement"){const a=i=>{const c=s.refinement(i,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?ve:(i.status==="dirty"&&r.dirty(),a(i.value),{status:r.value,value:i.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>i.status==="aborted"?ve:(i.status==="dirty"&&r.dirty(),a(i.value).then(()=>({status:r.value,value:i.value}))))}if(s.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Br(a))return ve;const i=s.transform(a.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:i}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Br(a)?Promise.resolve(s.transform(a.value,o)).then(i=>({status:r.value,value:i})):ve);Oe.assertNever(s)}}Zr.create=(e,t,r)=>new Zr({schema:e,typeName:pe.ZodEffects,effect:t,...$e(r)}),Zr.createWithPreprocess=(e,t,r)=>new Zr({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...$e(r)});class sr extends Ae{_parse(t){return this._getType(t)===ue.undefined?ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}sr.create=(e,t)=>new sr({innerType:e,typeName:pe.ZodOptional,...$e(t)});class Kr extends Ae{_parse(t){return this._getType(t)===ue.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Kr.create=(e,t)=>new Kr({innerType:e,typeName:pe.ZodNullable,...$e(t)});class yi extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===ue.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}yi.create=(e,t)=>new yi({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class bi extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return xo(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}bi.create=(e,t)=>new bi({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class lh extends Ae{_parse(t){if(this._getType(t)!==ue.nan){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.nan,received:n.parsedType}),ve}return{status:"valid",value:t.data}}}lh.create=e=>new lh({typeName:pe.ZodNaN,...$e(e)});class Yw extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class _i extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?ve:o.status==="dirty"?(r.dirty(),bn(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?ve:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new _i({in:t,out:r,typeName:pe.ZodPipeline})}}class xi extends Ae{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Br(s)&&(s.value=Object.freeze(s.value)),s);return xo(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}xi.create=(e,t)=>new xi({innerType:e,typeName:pe.ZodReadonly,...$e(t)});var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const _t=Lt.create,ct=Wr.create,Co=hi.create,uh=pi.create;nr.create;const wn=Nt.create,wi=We.create,dh=$o.create;So.create,gr.create;const Jw=Eo.create,$i=vi.create,Xw=Gr.create;ko.create,sr.create,Kr.create;const Yr=wi({type:Xw(["string","number","integer","boolean","object","array"]).optional(),title:_t().optional(),description:_t().optional(),default:uh().optional(),minimum:ct().optional(),maximum:ct().optional(),exclusiveMin:ct().optional(),exclusiveMax:ct().optional(),multipleOf:ct().optional(),minLength:ct().optional(),maxLength:ct().optional(),minContains:ct().optional(),maxContains:ct().optional(),minProperties:ct().optional(),maxProperties:ct().optional(),isModifiable:Co().optional(),"x-modifiable":wn(_t()).optional(),pattern:_t().optional(),format:_t().optional(),minItems:ct().optional(),maxItems:ct().optional(),uniqueItems:Co().optional(),enum:wn(uh()).optional(),$id:_t().optional(),$schema:_t().optional()}).extend({properties:$i(()=>Jw(_t(),Yr)).optional(),items:$i(()=>dh([Yr,wn(Yr)])).optional(),required:wn(_t()).optional(),additionalProperties:$i(()=>dh([Co(),Yr])).optional()}),Qw=wi({root:Yr,properties:wn(wi({id:_t(),key:_t().min(1),isRequired:Co(),schema:Yr}))}),e$=e=>{const t=o=>{const a={...o};if(Array.isArray(a.properties)){const i={},c=[];a.properties.forEach(l=>{l.key&&(i[l.key]=t(l.schema),l.isRequired&&c.push(l.key))}),a.properties=i,c.length>0&&(a.required=c)}return typeof a.items=="object"&&a.items!==null&&!Array.isArray(a.items)?a.items=t(a.items):Array.isArray(a.items)&&(a.items=a.items.map(i=>t(i))),a},r={...t(e.root)},n={},s=[];return e.properties.forEach(o=>{o.key&&(n[o.key]=t(o.schema),o.isRequired&&s.push(o.key))}),Object.keys(n).length>0&&(r.properties=n),s.length>0&&(r.required=s),r},t$=e=>{const t=i=>{const c={...i};if(typeof c.properties=="object"&&!Array.isArray(c.properties)){const l=[];Object.keys(c.properties).forEach(u=>{var p;const h=c.properties[u];l.push({id:nn(6),key:u,isRequired:((p=c.required)==null?void 0:p.includes(u))||!1,schema:t(h)})}),c.properties=l}return typeof c.items=="object"&&c.items!==null&&!Array.isArray(c.items)?c.items=t(c.items):Array.isArray(c.items)&&(c.items=c.items.map(l=>t(l))),c},{properties:r,required:n,...s}=e,a=t({properties:r,required:n});return{root:{...s,...a.root},properties:a.properties||[]}},r$=({rootType:e="object",defaultValue:t})=>{const r=nn(6),n=Dh({resolver:Sw(Qw),defaultValues:t?t$(t):{root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:r,key:`field_${r}`,isRequired:!1,schema:{type:"number"}}]:[]}}),s=n.watch(),o=Z.useMemo(()=>e$(s),[s]);return{methods:n,jsonSchema:o}},n$=({textAreaRef:e,triggerAutoSize:t,maxHeight:r=Number.MAX_SAFE_INTEGER,minHeight:n=0})=>{const[s,o]=S.useState(!0);S.useEffect(()=>{const i=e.current;if(i){s&&(i.style.minHeight=`${n+6}px`,r>n&&(i.style.maxHeight=`${r}px`),o(!1)),i.style.height=`${n+6}px`;const c=i.scrollHeight;c>r?i.style.height=`${r}px`:i.style.height=`${c+6}px`}},[e.current,t])},fh=S.forwardRef(({maxHeight:e=Number.MAX_SAFE_INTEGER,minHeight:t=52,className:r,onChange:n,value:s,...o},a)=>{const i=S.useRef(null),[c,l]=S.useState("");return n$({textAreaRef:i,triggerAutoSize:c,maxHeight:e,minHeight:t}),Z.useImperativeHandle(a,()=>({textArea:i.current,focus:()=>{var u;return(u=i==null?void 0:i.current)==null?void 0:u.focus()},maxHeight:e,minHeight:t})),S.useEffect(()=>{l(s)},[o==null?void 0:o.defaultValue,s]),d.jsx("textarea",{...o,value:s,ref:i,className:_e("flex w-full rounded-md border border-input bg-transparent dark:bg-input/30 px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),onChange:u=>{l(u.target.value),n==null||n(u)}})});fh.displayName="AutosizeTextarea";const s$=({rootType:e="object",readOnly:t=!1,theme:r="light",styles:n,onChange:s,defaultValue:o})=>{const{methods:a,jsonSchema:i}=r$({rootType:e,defaultValue:o}),{setError:c,clearErrors:l,getValues:u}=a,[h,p]=Z.useState(null);Z.useEffect(()=>{s&&s(i)},[i,s]),Z.useEffect(()=>{const j=vm(i);JSON.stringify(j)!==JSON.stringify(h)&&p(j)},[i,h]),Z.useEffect(()=>{if(l(),h){const j=u("properties");h.forEach(I=>{const U=I.instancePath.split("/").filter(Boolean);if(U[0]==="properties"&&U.length>=3){const D=(j==null?void 0:j.findIndex(V=>V.key===U[1]))??-1;D!==-1&&c(`properties.${D}.schema.${U[2]}`,{type:"ajv",message:I.message})}else U.length>0&&c(`root.${U[0]}`,{type:"ajv",message:I.message})})}},[h,u,c,l]),Z.useEffect(()=>{if(!o){const j=nn(6),I={root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:j,key:`field_${j}`,isRequired:!1,schema:{type:"number"}}]:[]};a.reset(I)}},[e,a,o]);const{fields:v,append:w,remove:y}=Qi({control:a.control,name:"properties",keyName:"fieldId"}),m=()=>{const j=nn(6);w({id:j,key:`field_${j}`,isRequired:!1,schema:{type:"string"}})},[_,f]=Z.useState({isOpen:!1,fieldPath:null}),b=j=>{f({isOpen:!0,fieldPath:j})},x={...cs,...n,output:{...cs.output,...n==null?void 0:n.output},form:{...cs.form,...n==null?void 0:n.form},settings:{...cs.settings,...n==null?void 0:n.settings}},g=Z.useRef(null),[$,E]=Z.useState("overflow-hidden");return Z.useEffect(()=>{var I;const j=(I=g.current)==null?void 0:I.textArea;j&&(j.scrollHeight>j.clientHeight?E("overflow-y-auto"):E("overflow-hidden"))},[i]),d.jsxs(_h,{...a,children:[d.jsx("div",{className:_e("bg-background text-foreground flex flex-col",r,Nu[x.spacing]),children:d.jsxs("div",{className:_e("bg-background text-foreground flex",r,Gb[x.output.position],Nu[x.spacing]),children:[d.jsxs("div",{className:_e("p-4 pr-2 flex flex-col gap-2 border border-input rounded-lg overflow-y-auto",Va[x.form.width],ju[x.form.height]),children:[d.jsx(Bb,{theme:r,readOnly:t,rootType:e,onAddField:m,onOpenSettings:b}),e==="object"&&d.jsx(Z_,{theme:r,readOnly:t,fields:v,onRemove:y,onOpenSettings:b}),e==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input",children:d.jsx(ds,{theme:r,readOnly:t,fieldPath:"root.items",onRemove:()=>{},onOpenSettings:b,isSimpleType:!1,isRootLevel:!1})})]}),h?d.jsxs("div",{className:_e("p-6 bg-background text-foreground border border-input rounded-lg overflow-y-auto overflow-x-auto",Va[x.output.width],ju[x.output.height]),children:[d.jsx("p",{className:"text-lg",children:"JSON Schema Errors"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:`The generated JSON Schema has ${h==null?void 0:h.length}
|
|
145
|
-
|
|
58
|
+
deps: ${u}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[l,u]=s(c);a(c,l),i(c,u)}};function s({schema:c}){const l={},u={};for(const p in c){if(p==="__proto__")continue;const h=Array.isArray(c[p])?l:u;h[p]=c[p]}return[l,u]}function a(c,l=c.schema){const{gen:u,data:p,it:h}=c;if(Object.keys(l).length===0)return;const v=u.let("missing");for(const w in l){const y=l[w];if(y.length===0)continue;const m=(0,n.propertyInData)(u,p,w,h.opts.ownProperties);c.setParams({property:w,depsCount:y.length,deps:y.join(", ")}),h.allErrors?u.if(m,()=>{for(const _ of y)(0,n.checkReportMissingProp)(c,_)}):(u.if((0,t._)`${m} && (${(0,n.checkMissingProp)(c,y,v)})`),(0,n.reportMissingProp)(c,v),u.else())}}e.validatePropertyDeps=a;function i(c,l=c.schema){const{gen:u,data:p,keyword:h,it:v}=c,w=u.name("valid");for(const y in l)(0,r.alwaysValidSchema)(v,l[y])||(u.if((0,n.propertyInData)(u,p,y,v.opts.ownProperties),()=>{const m=c.subschema({keyword:h,schemaProp:y},w);c.mergeValidEvaluated(m,w)},()=>u.var(w,!0)),c.ok(w))}e.validateSchemaDeps=i,e.default=o})(Ya)),Ya}var Do={},$f;function G0(){if($f)return Do;$f=1,Object.defineProperty(Do,"__esModule",{value:!0});const e=pe(),t=ke(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},code(o){const{gen:s,schema:a,data:i,it:c}=o;if((0,t.alwaysValidSchema)(c,a))return;const l=s.name("valid");s.forIn("key",i,u=>{o.setParams({propertyName:u}),o.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),s.if((0,e.not)(l),()=>{o.error(!0),c.allErrors||s.break()})}),o.ok(l)}};return Do.default=n,Do}var Mo={},Sf;function Ef(){if(Sf)return Mo;Sf=1,Object.defineProperty(Mo,"__esModule",{value:!0});const e=gt(),t=pe(),r=ht(),n=ke(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:i,schema:c,parentSchema:l,data:u,errsCount:p,it:h}=a;if(!p)throw new Error("ajv implementation error");const{allErrors:v,opts:w}=h;if(h.props=!0,w.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(h,c))return;const y=(0,e.allSchemaProperties)(l.properties),m=(0,e.allSchemaProperties)(l.patternProperties);_(),a.ok((0,t._)`${p} === ${r.default.errors}`);function _(){i.forIn("key",u,E=>{!y.length&&!m.length?$(E):i.if(f(E),()=>$(E))})}function f(E){let k;if(y.length>8){const C=(0,n.schemaRefOrVal)(h,l.properties,"properties");k=(0,e.isOwnProperty)(i,C,E)}else y.length?k=(0,t.or)(...y.map(C=>(0,t._)`${E} === ${C}`)):k=t.nil;return m.length&&(k=(0,t.or)(k,...m.map(C=>(0,t._)`${(0,e.usePattern)(a,C)}.test(${E})`))),(0,t.not)(k)}function b(E){i.code((0,t._)`delete ${u}[${E}]`)}function $(E){if(w.removeAdditional==="all"||w.removeAdditional&&c===!1){b(E);return}if(c===!1){a.setParams({additionalProperty:E}),a.error(),v||i.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(h,c)){const k=i.name("valid");w.removeAdditional==="failing"?(g(E,k,!1),i.if((0,t.not)(k),()=>{a.reset(),b(E)})):(g(E,k),v||i.if((0,t.not)(k),()=>i.break()))}}function g(E,k,C){const O={keyword:"additionalProperties",dataProp:E,dataPropType:n.Type.Str};C===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(O,k)}}};return Mo.default=s,Mo}var zo={},kf;function J0(){if(kf)return zo;kf=1,Object.defineProperty(zo,"__esModule",{value:!0});const e=sn(),t=gt(),r=ke(),n=Ef(),o={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:a,schema:i,parentSchema:c,data:l,it:u}=s;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(i);for(const m of p)u.definedProperties.add(m);u.opts.unevaluated&&p.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(p),u.props));const h=p.filter(m=>!(0,r.alwaysValidSchema)(u,i[m]));if(h.length===0)return;const v=a.name("valid");for(const m of h)w(m)?y(m):(a.if((0,t.propertyInData)(a,l,m,u.opts.ownProperties)),y(m),u.allErrors||a.else().var(v,!0),a.endIf()),s.it.definedProperties.add(m),s.ok(v);function w(m){return u.opts.useDefaults&&!u.compositeRule&&i[m].default!==void 0}function y(m){s.subschema({keyword:"properties",schemaProp:m,dataProp:m},v)}}};return zo.default=o,zo}var jo={},xf;function Y0(){if(xf)return jo;xf=1,Object.defineProperty(jo,"__esModule",{value:!0});const e=gt(),t=pe(),r=ke(),n=ke(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:a,schema:i,data:c,parentSchema:l,it:u}=s,{opts:p}=u,h=(0,e.allSchemaProperties)(i),v=h.filter($=>(0,r.alwaysValidSchema)(u,i[$]));if(h.length===0||v.length===h.length&&(!u.opts.unevaluated||u.props===!0))return;const w=p.strictSchema&&!p.allowMatchingProperties&&l.properties,y=a.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:m}=u;_();function _(){for(const $ of h)w&&f($),u.allErrors?b($):(a.var(y,!0),b($),a.if(y))}function f($){for(const g in w)new RegExp($).test(g)&&(0,r.checkStrictMode)(u,`property ${g} matches pattern ${$} (use allowMatchingProperties)`)}function b($){a.forIn("key",c,g=>{a.if((0,t._)`${(0,e.usePattern)(s,$)}.test(${g})`,()=>{const E=v.includes($);E||s.subschema({keyword:"patternProperties",schemaProp:$,dataProp:g,dataPropType:n.Type.Str},y),u.opts.unevaluated&&m!==!0?a.assign((0,t._)`${m}[${g}]`,!0):!E&&!u.allErrors&&a.if((0,t.not)(y),()=>a.break())})})}}};return jo.default=o,jo}var Fo={},Cf;function X0(){if(Cf)return Fo;Cf=1,Object.defineProperty(Fo,"__esModule",{value:!0});const e=ke(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:o,it:s}=r;if((0,e.alwaysValidSchema)(s,o)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Fo.default=t,Fo}var Vo={},Pf;function Q0(){if(Pf)return Vo;Pf=1,Object.defineProperty(Vo,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:gt().validateUnion,error:{message:"must match a schema in anyOf"}};return Vo.default=t,Vo}var Lo={},Nf;function ew(){if(Nf)return Lo;Nf=1,Object.defineProperty(Lo,"__esModule",{value:!0});const e=pe(),t=ke(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},code(o){const{gen:s,schema:a,parentSchema:i,it:c}=o;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&i.discriminator)return;const l=a,u=s.let("valid",!1),p=s.let("passing",null),h=s.name("_valid");o.setParams({passing:p}),s.block(v),o.result(u,()=>o.reset(),()=>o.error(!0));function v(){l.forEach((w,y)=>{let m;(0,t.alwaysValidSchema)(c,w)?s.var(h,!0):m=o.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},h),y>0&&s.if((0,e._)`${h} && ${u}`).assign(u,!1).assign(p,(0,e._)`[${p}, ${y}]`).else(),s.if(h,()=>{s.assign(u,!0),s.assign(p,y),m&&o.mergeEvaluated(m,e.Name)})})}}};return Lo.default=n,Lo}var Ro={},Af;function tw(){if(Af)return Ro;Af=1,Object.defineProperty(Ro,"__esModule",{value:!0});const e=ke(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:o,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");const a=n.name("valid");o.forEach((i,c)=>{if((0,e.alwaysValidSchema)(s,i))return;const l=r.subschema({keyword:"allOf",schemaProp:c},a);r.ok(a),r.mergeEvaluated(l)})}};return Ro.default=t,Ro}var qo={},Tf;function rw(){if(Tf)return qo;Tf=1,Object.defineProperty(qo,"__esModule",{value:!0});const e=pe(),t=ke(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:a,parentSchema:i,it:c}=s;i.then===void 0&&i.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=o(c,"then"),u=o(c,"else");if(!l&&!u)return;const p=a.let("valid",!0),h=a.name("_valid");if(v(),s.reset(),l&&u){const y=a.let("ifClause");s.setParams({ifClause:y}),a.if(h,w("then",y),w("else",y))}else l?a.if(h,w("then")):a.if((0,e.not)(h),w("else"));s.pass(p,()=>s.error(!0));function v(){const y=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);s.mergeEvaluated(y)}function w(y,m){return()=>{const _=s.subschema({keyword:y},h);a.assign(p,h),s.mergeValidEvaluated(_,p),m?a.assign(m,(0,e._)`${y}`):s.setParams({ifClause:y})}}}};function o(s,a){const i=s.schema[a];return i!==void 0&&!(0,t.alwaysValidSchema)(s,i)}return qo.default=n,qo}var Uo={},If;function nw(){if(If)return Uo;If=1,Object.defineProperty(Uo,"__esModule",{value:!0});const e=ke(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:o}){n.if===void 0&&(0,e.checkStrictMode)(o,`"${r}" without "if" is ignored`)}};return Uo.default=t,Uo}var Of;function Df(){if(Of)return Ao;Of=1,Object.defineProperty(Ao,"__esModule",{value:!0});const e=mf(),t=W0(),r=vf(),n=H0(),o=K0(),s=Xa(),a=G0(),i=Ef(),c=J0(),l=Y0(),u=X0(),p=Q0(),h=ew(),v=tw(),w=rw(),y=nw();function m(_=!1){const f=[u.default,p.default,h.default,v.default,w.default,y.default,a.default,i.default,s.default,c.default,l.default];return _?f.push(t.default,n.default):f.push(e.default,r.default),f.push(o.default),f}return Ao.default=m,Ao}var Zo={},zr={},Mf;function zf(){if(Mf)return zr;Mf=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.dynamicAnchor=void 0;const e=pe(),t=ht(),r=fo(),n=Ga(),o={keyword:"$dynamicAnchor",schemaType:"string",code:i=>s(i,i.schema)};function s(i,c){const{gen:l,it:u}=i;u.schemaEnv.root.dynamicAnchors[c]=!0;const p=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`,h=u.errSchemaPath==="#"?u.validateName:a(i);l.if((0,e._)`!${p}`,()=>l.assign(p,h))}zr.dynamicAnchor=s;function a(i){const{schemaEnv:c,schema:l,self:u}=i.it,{root:p,baseId:h,localRefs:v,meta:w}=c.root,{schemaId:y}=u.opts,m=new r.SchemaEnv({schema:l,schemaId:y,root:p,baseId:h,localRefs:v,meta:w});return r.compileSchema.call(u,m),(0,n.getValidate)(i,m)}return zr.default=o,zr}var jr={},jf;function Ff(){if(jf)return jr;jf=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.dynamicRef=void 0;const e=pe(),t=ht(),r=Ga(),n={keyword:"$dynamicRef",schemaType:"string",code:s=>o(s,s.schema)};function o(s,a){const{gen:i,keyword:c,it:l}=s;if(a[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const u=a.slice(1);if(l.allErrors)p();else{const v=i.let("valid",!1);p(v),s.ok(v)}function p(v){if(l.schemaEnv.root.dynamicAnchors[u]){const w=i.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(u)}`);i.if(w,h(w,v),h(l.validateName,v))}else h(l.validateName,v)()}function h(v,w){return w?()=>i.block(()=>{(0,r.callRef)(s,v),i.let(w,!0)}):()=>(0,r.callRef)(s,v)}}return jr.dynamicRef=o,jr.default=n,jr}var Bo={},Vf;function ow(){if(Vf)return Bo;Vf=1,Object.defineProperty(Bo,"__esModule",{value:!0});const e=zf(),t=ke(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return Bo.default=r,Bo}var Wo={},Lf;function sw(){if(Lf)return Wo;Lf=1,Object.defineProperty(Wo,"__esModule",{value:!0});const e=Ff(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return Wo.default=t,Wo}var Rf;function aw(){if(Rf)return Zo;Rf=1,Object.defineProperty(Zo,"__esModule",{value:!0});const e=zf(),t=Ff(),r=ow(),n=sw(),o=[e.default,t.default,r.default,n.default];return Zo.default=o,Zo}var Ho={},Ko={},qf;function iw(){if(qf)return Ko;qf=1,Object.defineProperty(Ko,"__esModule",{value:!0});const e=Xa(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return Ko.default=t,Ko}var Go={},Uf;function cw(){if(Uf)return Go;Uf=1,Object.defineProperty(Go,"__esModule",{value:!0});const e=Xa(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return Go.default=t,Go}var Jo={},Zf;function lw(){if(Zf)return Jo;Zf=1,Object.defineProperty(Jo,"__esModule",{value:!0});const e=ke(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:o}){n.contains===void 0&&(0,e.checkStrictMode)(o,`"${r}" without "contains" is ignored`)}};return Jo.default=t,Jo}var Bf;function uw(){if(Bf)return Ho;Bf=1,Object.defineProperty(Ho,"__esModule",{value:!0});const e=iw(),t=cw(),r=lw(),n=[e.default,t.default,r.default];return Ho.default=n,Ho}var Yo={},Xo={},Wf;function dw(){if(Wf)return Xo;Wf=1,Object.defineProperty(Xo,"__esModule",{value:!0});const e=pe(),t=ke(),r=ht(),o={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:s})=>(0,e._)`{unevaluatedProperty: ${s.unevaluatedProperty}}`},code(s){const{gen:a,schema:i,data:c,errsCount:l,it:u}=s;if(!l)throw new Error("ajv implementation error");const{allErrors:p,props:h}=u;h instanceof e.Name?a.if((0,e._)`${h} !== true`,()=>a.forIn("key",c,m=>a.if(w(h,m),()=>v(m)))):h!==!0&&a.forIn("key",c,m=>h===void 0?v(m):a.if(y(h,m),()=>v(m))),u.props=!0,s.ok((0,e._)`${l} === ${r.default.errors}`);function v(m){if(i===!1){s.setParams({unevaluatedProperty:m}),s.error(),p||a.break();return}if(!(0,t.alwaysValidSchema)(u,i)){const _=a.name("valid");s.subschema({keyword:"unevaluatedProperties",dataProp:m,dataPropType:t.Type.Str},_),p||a.if((0,e.not)(_),()=>a.break())}}function w(m,_){return(0,e._)`!${m} || !${m}[${_}]`}function y(m,_){const f=[];for(const b in m)m[b]===!0&&f.push((0,e._)`${_} !== ${b}`);return(0,e.and)(...f)}}};return Xo.default=o,Xo}var Qo={},Hf;function fw(){if(Hf)return Qo;Hf=1,Object.defineProperty(Qo,"__esModule",{value:!0});const e=pe(),t=ke(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{gen:s,schema:a,data:i,it:c}=o,l=c.items||0;if(l===!0)return;const u=s.const("len",(0,e._)`${i}.length`);if(a===!1)o.setParams({len:l}),o.fail((0,e._)`${u} > ${l}`);else if(typeof a=="object"&&!(0,t.alwaysValidSchema)(c,a)){const h=s.var("valid",(0,e._)`${u} <= ${l}`);s.if((0,e.not)(h),()=>p(h,l)),o.ok(h)}c.items=!0;function p(h,v){s.forRange("i",v,u,w=>{o.subschema({keyword:"unevaluatedItems",dataProp:w,dataPropType:t.Type.Num},h),c.allErrors||s.if((0,e.not)(h),()=>s.break())})}}};return Qo.default=n,Qo}var Kf;function pw(){if(Kf)return Yo;Kf=1,Object.defineProperty(Yo,"__esModule",{value:!0});const e=dw(),t=fw(),r=[e.default,t.default];return Yo.default=r,Yo}var es={},ts={},Gf;function hw(){if(Gf)return ts;Gf=1,Object.defineProperty(ts,"__esModule",{value:!0});const e=pe(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,o){const{gen:s,data:a,$data:i,schema:c,schemaCode:l,it:u}=n,{opts:p,errSchemaPath:h,schemaEnv:v,self:w}=u;if(!p.validateFormats)return;i?y():m();function y(){const _=s.scopeValue("formats",{ref:w.formats,code:p.code.formats}),f=s.const("fDef",(0,e._)`${_}[${l}]`),b=s.let("fType"),$=s.let("format");s.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>s.assign(b,(0,e._)`${f}.type || "string"`).assign($,(0,e._)`${f}.validate`),()=>s.assign(b,(0,e._)`"string"`).assign($,f)),n.fail$data((0,e.or)(g(),E()));function g(){return p.strictSchema===!1?e.nil:(0,e._)`${l} && !${$}`}function E(){const k=v.$async?(0,e._)`(${f}.async ? await ${$}(${a}) : ${$}(${a}))`:(0,e._)`${$}(${a})`,C=(0,e._)`(typeof ${$} == "function" ? ${k} : ${$}.test(${a}))`;return(0,e._)`${$} && ${$} !== true && ${b} === ${o} && !${C}`}}function m(){const _=w.formats[c];if(!_){g();return}if(_===!0)return;const[f,b,$]=E(_);f===o&&n.pass(k());function g(){if(p.strictSchema===!1){w.logger.warn(C());return}throw new Error(C());function C(){return`unknown format "${c}" ignored in schema at path "${h}"`}}function E(C){const O=C instanceof RegExp?(0,e.regexpCode)(C):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(c)}`:void 0,V=s.scopeValue("formats",{key:c,ref:C,code:O});return typeof C=="object"&&!(C instanceof RegExp)?[C.type||"string",C.validate,(0,e._)`${V}.validate`]:["string",C,V]}function k(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${$}(${a})`}return typeof b=="function"?(0,e._)`${$}(${a})`:(0,e._)`${$}.test(${a})`}}}};return ts.default=r,ts}var Jf;function Yf(){if(Jf)return es;Jf=1,Object.defineProperty(es,"__esModule",{value:!0});const t=[hw().default];return es.default=t,es}var cr={},Xf;function Qf(){return Xf||(Xf=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.contentVocabulary=cr.metadataVocabulary=void 0,cr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],cr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),cr}var ep;function mw(){if(ep)return ho;ep=1,Object.defineProperty(ho,"__esModule",{value:!0});const e=Xd(),t=pf(),r=Df(),n=aw(),o=uw(),s=pw(),a=Yf(),i=Qf(),c=[n.default,e.default,t.default,(0,r.default)(!0),a.default,i.metadataVocabulary,i.contentVocabulary,o.default,s.default];return ho.default=c,ho}var rs={},ln={},tp;function gw(){if(tp)return ln;tp=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(ln.DiscrError=e={})),ln}var rp;function np(){if(rp)return rs;rp=1,Object.defineProperty(rs,"__esModule",{value:!0});const e=pe(),t=gw(),r=fo(),n=an(),o=ke(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:i,tagName:c}})=>i===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:i,tag:c,tagName:l}})=>(0,e._)`{error: ${i}, tag: ${l}, tagValue: ${c}}`},code(i){const{gen:c,data:l,schema:u,parentSchema:p,it:h}=i,{oneOf:v}=p;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");const w=u.propertyName;if(typeof w!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const y=c.let("valid",!1),m=c.const("tag",(0,e._)`${l}${(0,e.getProperty)(w)}`);c.if((0,e._)`typeof ${m} == "string"`,()=>_(),()=>i.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:w})),i.ok(y);function _(){const $=b();c.if(!1);for(const g in $)c.elseIf((0,e._)`${m} === ${g}`),c.assign(y,f($[g]));c.else(),i.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:w}),c.endIf()}function f($){const g=c.name("valid"),E=i.subschema({keyword:"oneOf",schemaProp:$},g);return i.mergeEvaluated(E,e.Name),g}function b(){var $;const g={},E=C(p);let k=!0;for(let z=0;z<v.length;z++){let j=v[z];if(j?.$ref&&!(0,o.schemaHasRulesButRef)(j,h.self.RULES)){const Z=j.$ref;if(j=r.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,Z),j instanceof r.SchemaEnv&&(j=j.schema),j===void 0)throw new n.default(h.opts.uriResolver,h.baseId,Z)}const R=($=j?.properties)===null||$===void 0?void 0:$[w];if(typeof R!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${w}"`);k=k&&(E||C(j)),O(R,z)}if(!k)throw new Error(`discriminator: "${w}" must be required`);return g;function C({required:z}){return Array.isArray(z)&&z.includes(w)}function O(z,j){if(z.const)V(z.const,j);else if(z.enum)for(const R of z.enum)V(R,j);else throw new Error(`discriminator: "properties/${w}" must have "const" or "enum"`)}function V(z,j){if(typeof z!="string"||z in g)throw new Error(`discriminator: "${w}" values must be unique strings`);g[z]=j}}}};return rs.default=a,rs}var ns={};const vw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},yw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},bw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},_w={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},ww={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},$w={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},Sw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},Ew={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};var op;function kw(){if(op)return ns;op=1,Object.defineProperty(ns,"__esModule",{value:!0});const e=vw,t=yw,r=bw,n=_w,o=ww,s=$w,a=Sw,i=Ew,c=["/properties"];function l(u){return[e,t,r,n,o,p(this,s),a,p(this,i)].forEach(h=>this.addMetaSchema(h,void 0,!1)),this;function p(h,v){return u?h.$dataMetaSchema(v,c):v}}return ns.default=l,ns}var sp;function xw(){return sp||(sp=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=Kd(),n=mw(),o=np(),s=kw(),a="https://json-schema.org/draft/2020-12/schema";class i extends r.default{constructor(v={}){super({...v,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:v,meta:w}=this.opts;w&&(s.default.call(this,v),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=i,e.exports=t=i,e.exports.Ajv2020=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var c=sn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=pe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=lo();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var p=an();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})(ro,ro.exports)),ro.exports}var Cw=xw();const Pw=gd(Cw);var os={exports:{}},Qa={},ap;function Nw(){return ap||(ap=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(z,j){return{validate:z,compare:j}}e.fullFormats={date:t(s,a),time:t(c(!0),l),"date-time":t(h(!0),v),"iso-time":t(c(),u),"iso-date-time":t(h(),w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:V,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:b,int32:{type:"number",validate:E},int64:{type:"number",validate:k},float:{type:"number",validate:C},double:{type:"number",validate:C},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,w),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(z){return z%4===0&&(z%100!==0||z%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(z){const j=n.exec(z);if(!j)return!1;const R=+j[1],Z=+j[2],ne=+j[3];return Z>=1&&Z<=12&&ne>=1&&ne<=(Z===2&&r(R)?29:o[Z])}function a(z,j){if(z&&j)return z>j?1:z<j?-1:0}const i=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(z){return function(R){const Z=i.exec(R);if(!Z)return!1;const ne=+Z[1],G=+Z[2],oe=+Z[3],F=Z[4],fe=Z[5]==="-"?-1:1,H=+(Z[6]||0),I=+(Z[7]||0);if(H>23||I>59||z&&!F)return!1;if(ne<=23&&G<=59&&oe<60)return!0;const K=G-I*fe,D=ne-H*fe-(K<0?1:0);return(D===23||D===-1)&&(K===59||K===-1)&&oe<61}}function l(z,j){if(!(z&&j))return;const R=new Date("2020-01-01T"+z).valueOf(),Z=new Date("2020-01-01T"+j).valueOf();if(R&&Z)return R-Z}function u(z,j){if(!(z&&j))return;const R=i.exec(z),Z=i.exec(j);if(R&&Z)return z=R[1]+R[2]+R[3],j=Z[1]+Z[2]+Z[3],z>j?1:z<j?-1:0}const p=/t|\s/i;function h(z){const j=c(z);return function(Z){const ne=Z.split(p);return ne.length===2&&s(ne[0])&&j(ne[1])}}function v(z,j){if(!(z&&j))return;const R=new Date(z).valueOf(),Z=new Date(j).valueOf();if(R&&Z)return R-Z}function w(z,j){if(!(z&&j))return;const[R,Z]=z.split(p),[ne,G]=j.split(p),oe=a(R,ne);if(oe!==void 0)return oe||l(Z,G)}const y=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _(z){return y.test(z)&&m.test(z)}const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function b(z){return f.lastIndex=0,f.test(z)}const $=-2147483648,g=2**31-1;function E(z){return Number.isInteger(z)&&z<=g&&z>=$}function k(z){return Number.isInteger(z)}function C(){return!0}const O=/[^\\]\\Z/;function V(z){if(O.test(z))return!1;try{return new RegExp(z),!0}catch{return!1}}})(Qa)),Qa}var ei={},ss={exports:{}},as={},ip;function Aw(){if(ip)return as;ip=1,Object.defineProperty(as,"__esModule",{value:!0});const e=Xd(),t=pf(),r=Df(),n=Yf(),o=Qf(),s=[e.default,t.default,(0,r.default)(),n.default,o.metadataVocabulary,o.contentVocabulary];return as.default=s,as}const Tw={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var cp;function Iw(){return cp||(cp=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Kd(),n=Aw(),o=np(),s=Tw,a=["/properties"],i="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(w,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=sn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=pe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var p=lo();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var h=an();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(ss,ss.exports)),ss.exports}var lp;function Ow(){return lp||(lp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Iw(),r=pe(),n=r.operators,o={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:i,schemaCode:c})=>(0,r.str)`should be ${o[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,r._)`{comparison: ${o[i].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(i){const{gen:c,data:l,schemaCode:u,keyword:p,it:h}=i,{opts:v,self:w}=h;if(!v.validateFormats)return;const y=new t.KeywordCxt(h,w.RULES.all.format.definition,"format");y.$data?m():_();function m(){const b=c.scopeValue("formats",{ref:w.formats,code:v.code.formats}),$=c.const("fmt",(0,r._)`${b}[${y.schemaCode}]`);i.fail$data((0,r.or)((0,r._)`typeof ${$} != "object"`,(0,r._)`${$} instanceof RegExp`,(0,r._)`typeof ${$}.compare != "function"`,f($)))}function _(){const b=y.schema,$=w.formats[b];if(!$||$===!0)return;if(typeof $!="object"||$ instanceof RegExp||typeof $.compare!="function")throw new Error(`"${p}": format "${b}" does not define "compare" function`);const g=c.scopeValue("formats",{key:b,ref:$,code:v.code.formats?(0,r._)`${v.code.formats}${(0,r.getProperty)(b)}`:void 0});i.fail$data(f(g))}function f(b){return(0,r._)`${b}.compare(${l}, ${u}) ${o[p].fail} 0`}},dependencies:["format"]};const a=i=>(i.addKeyword(e.formatLimitDefinition),i);e.default=a})(ei)),ei}var up;function Dw(){return up||(up=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Nw(),n=Ow(),o=pe(),s=new o.Name("fullFormats"),a=new o.Name("fastFormats"),i=(l,u={keywords:!0})=>{if(Array.isArray(u))return c(l,u,r.fullFormats,s),l;const[p,h]=u.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,s],v=u.formats||r.formatNames;return c(l,v,p,h),u.keywords&&(0,n.default)(l),l};i.get=(l,u="full")=>{const h=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!h)throw new Error(`Unknown format "${l}"`);return h};function c(l,u,p,h){var v,w;(v=(w=l.opts.code).formats)!==null&&v!==void 0||(w.formats=(0,o._)`require("ajv-formats/dist/formats").${h}`);for(const y of u)l.addFormat(y,p[y])}e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i})(os,os.exports)),os.exports}var Mw=Dw();const zw=gd(Mw),jw="https://json-schema.org/draft/2020-12/schema",ti=new Pw;zw(ti);function dp(e){return ti.validate(jw,e)?null:ti.errors||[]}function Fw({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:ge("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var ri="rovingFocusGroup.onEntryFocus",Vw={bubbles:!1,cancelable:!0},un="RovingFocusGroup",[ni,fp,Lw]=Ji(un),[Rw,pp]=yt(un,[Lw]),[qw,Uw]=Rw(un),hp=S.forwardRef((e,t)=>d.jsx(ni.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(ni.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Zw,{...e,ref:t})})}));hp.displayName=un;var Zw=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...p}=e,h=S.useRef(null),v=Ne(t,h),w=Us(s),[y,m]=tr({prop:a,defaultProp:i??null,onChange:c,caller:un}),[_,f]=S.useState(!1),b=jt(l),$=fp(r),g=S.useRef(!1),[E,k]=S.useState(0);return S.useEffect(()=>{const C=h.current;if(C)return C.addEventListener(ri,b),()=>C.removeEventListener(ri,b)},[b]),d.jsx(qw,{scope:r,orientation:n,dir:w,loop:o,currentTabStopId:y,onItemFocus:S.useCallback(C=>m(C),[m]),onItemShiftTab:S.useCallback(()=>f(!0),[]),onFocusableItemAdd:S.useCallback(()=>k(C=>C+1),[]),onFocusableItemRemove:S.useCallback(()=>k(C=>C-1),[]),children:d.jsx(Se.div,{tabIndex:_||E===0?-1:0,"data-orientation":n,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:me(e.onMouseDown,()=>{g.current=!0}),onFocus:me(e.onFocus,C=>{const O=!g.current;if(C.target===C.currentTarget&&O&&!_){const V=new CustomEvent(ri,Vw);if(C.currentTarget.dispatchEvent(V),!V.defaultPrevented){const z=$().filter(G=>G.focusable),j=z.find(G=>G.active),R=z.find(G=>G.id===y),ne=[j,R,...z].filter(Boolean).map(G=>G.ref.current);vp(ne,u)}}g.current=!1}),onBlur:me(e.onBlur,()=>f(!1))})})}),mp="RovingFocusGroupItem",gp=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=Vt(),l=s||c,u=Uw(mp,r),p=u.currentTabStopId===l,h=fp(r),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:y}=u;return S.useEffect(()=>{if(n)return v(),()=>w()},[n,v,w]),d.jsx(ni.ItemSlot,{scope:r,id:l,focusable:n,active:o,children:d.jsx(Se.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:me(e.onMouseDown,m=>{n?u.onItemFocus(l):m.preventDefault()}),onFocus:me(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:me(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const _=Hw(m,u.orientation,u.dir);if(_!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let b=h().filter($=>$.focusable).map($=>$.ref.current);if(_==="last")b.reverse();else if(_==="prev"||_==="next"){_==="prev"&&b.reverse();const $=b.indexOf(m.currentTarget);b=u.loop?Kw(b,$+1):b.slice($+1)}setTimeout(()=>vp(b))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:y!=null}):a})})});gp.displayName=mp;var Bw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ww(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Hw(e,t,r){const n=Ww(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Bw[n]}function vp(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Kw(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Gw=hp,Jw=gp,oi="Radio",[Yw,yp]=yt(oi),[Xw,Qw]=Yw(oi),bp=S.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:s,disabled:a,value:i="on",onCheck:c,form:l,...u}=e,[p,h]=S.useState(null),v=Ne(t,m=>h(m)),w=S.useRef(!1),y=p?l||!!p.closest("form"):!0;return d.jsxs(Xw,{scope:r,checked:o,disabled:a,children:[d.jsx(Se.button,{type:"button",role:"radio","aria-checked":o,"data-state":Sp(o),"data-disabled":a?"":void 0,disabled:a,value:i,...u,ref:v,onClick:me(e.onClick,m=>{o||c?.(),y&&(w.current=m.isPropagationStopped(),w.current||m.stopPropagation())})}),y&&d.jsx($p,{control:p,bubbles:!w.current,name:n,value:i,checked:o,required:s,disabled:a,form:l,style:{transform:"translateX(-100%)"}})]})});bp.displayName=oi;var _p="RadioIndicator",wp=S.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,s=Qw(_p,r);return d.jsx(Wt,{present:n||s.checked,children:d.jsx(Se.span,{"data-state":Sp(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});wp.displayName=_p;var e$="RadioBubbleInput",$p=S.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const a=S.useRef(null),i=Ne(a,s),c=la(r),l=aa(t);return S.useEffect(()=>{const u=a.current;if(!u)return;const p=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&v){const w=new Event("click",{bubbles:n});v.call(u,r),u.dispatchEvent(w)}},[c,r,n]),d.jsx(Se.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});$p.displayName=e$;function Sp(e){return e?"checked":"unchecked"}var t$=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],is="RadioGroup",[r$]=yt(is,[pp,yp]),Ep=pp(),kp=yp(),[n$,o$]=r$(is),xp=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:s,required:a=!1,disabled:i=!1,orientation:c,dir:l,loop:u=!0,onValueChange:p,...h}=e,v=Ep(r),w=Us(l),[y,m]=tr({prop:s,defaultProp:o??null,onChange:p,caller:is});return d.jsx(n$,{scope:r,name:n,required:a,disabled:i,value:y,onValueChange:m,children:d.jsx(Gw,{asChild:!0,...v,orientation:c,dir:w,loop:u,children:d.jsx(Se.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:w,...h,ref:t})})})});xp.displayName=is;var Cp="RadioGroupItem",Pp=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,s=o$(Cp,r),a=s.disabled||n,i=Ep(r),c=kp(r),l=S.useRef(null),u=Ne(t,l),p=s.value===o.value,h=S.useRef(!1);return S.useEffect(()=>{const v=y=>{t$.includes(y.key)&&(h.current=!0)},w=()=>h.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",w),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",w)}},[]),d.jsx(Jw,{asChild:!0,...i,focusable:!a,active:p,children:d.jsx(bp,{disabled:a,required:s.required,checked:p,...c,...o,name:s.name,ref:u,onCheck:()=>s.onValueChange(o.value),onKeyDown:me(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:me(o.onFocus,()=>{h.current&&l.current?.click()})})})});Pp.displayName=Cp;var s$="RadioGroupIndicator",Np=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=kp(r);return d.jsx(wp,{...o,...n,ref:t})});Np.displayName=s$;var a$=xp,i$=Pp,c$=Np;function l$({className:e,...t}){return d.jsx(a$,{"data-slot":"radio-group",className:ge("grid gap-3",e),...t})}function si({className:e,...t}){return d.jsx(i$,{"data-slot":"radio-group-item",className:ge("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(c$,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(Ty,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const u$=({basePath:e,readOnly:t})=>{const{control:r,setValue:n,getValues:o}=Be(),[s,a]=J.useState(JSON.stringify(o(`${e}.additionalProperties`),null,2)),[i,c]=J.useState(null);Hr({control:r,name:`${e}.isModifiable`});const l=Hr({control:r,name:`${e}.additionalProperties`});J.useEffect(()=>{c(null),a(JSON.stringify(l,null,2))},[l]);let u;typeof l=="boolean"?u=l?"true":"false":typeof l=="object"&&l!==null?u="schema":u="true";const p=h=>{const v=`${e}.additionalProperties`;if(h==="true")n(v,!0);else if(h==="false")n(v,!1);else{const w={type:"string"};n(v,w),a(JSON.stringify(w,null,2))}};return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ee,{control:r,name:`${e}.minProperties`,render:({field:h})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Properties"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,value:h.value??"",onChange:v=>h.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:r,name:`${e}.maxProperties`,render:({field:h})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Properties"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,value:h.value??"",onChange:v=>h.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx($e,{})]})})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(ye,{children:"Additional Properties"}),d.jsxs(l$,{value:u,onValueChange:p,className:"flex space-x-4 pt-2",disabled:t,children:[d.jsxs(ve,{className:"flex items-center space-x-2",children:[d.jsx(si,{value:"true",id:"ap-true"}),d.jsx(ye,{htmlFor:"ap-true",className:"font-normal",children:"Allow (true)"})]}),d.jsxs(ve,{className:"flex items-center space-x-2",children:[d.jsx(si,{value:"false",id:"ap-false"}),d.jsx(ye,{htmlFor:"ap-false",className:"font-normal",children:"Disallow (false)"})]}),d.jsxs(ve,{className:"flex items-center space-x-2",children:[d.jsx(si,{value:"schema",id:"ap-schema"}),d.jsx(ye,{htmlFor:"ap-schema",className:"font-normal",children:"Specify Schema"})]})]}),d.jsx($e,{})]}),u==="schema"&&d.jsxs(ve,{children:[d.jsx(we,{children:d.jsx(Fw,{"data-testid":"schema-textarea",rows:6,disabled:t,className:"font-mono",value:s,onChange:h=>{const v=h.target.value;a(v);try{const w=JSON.parse(v),y=dp(w);if(y){const m=y.map(_=>`${_.instancePath} - ${_.message}`);c(m)}else n(`${e}.additionalProperties`,w)}catch{c(["Invalid schema structure."])}}})}),i&&i.length>0&&d.jsx("div",{className:"mt-2 text-sm font-medium text-destructive",children:i.map((h,v)=>d.jsx("p",{children:h},v))})]}),d.jsx(Ee,{control:r,name:`${e}."x-modifiable"`,render:({field:h})=>d.jsxs(ve,{className:"mt-2",children:[d.jsx(ye,{children:"Modifiable Properties"}),d.jsx(we,{children:d.jsx(nn,{disabled:t,value:h.value||[],onValueChange:h.onChange,placeholder:"Enter your modifiable properties"})}),d.jsx($e,{})]})})]})},d$=({basePath:e,readOnly:t})=>{const{control:r}=Be();return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(Ee,{control:r,name:`${e}["$schema"]`,render:({field:n})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"$schema"}),d.jsx(we,{children:d.jsx(Ce,{placeholder:"e.g., http://json-schema.org/draft/2020-12/schema",disabled:t,...n,value:n.value??"http://json-schema.org/draft/2020-12/schema"})}),d.jsx($e,{})]})}),d.jsx(Ee,{control:r,name:`${e}["$id"]`,render:({field:n})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"$id"}),d.jsx(we,{children:d.jsx(Ce,{disabled:t,...n,value:n.value??""})}),d.jsx($e,{})]})})]})};var f$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],p$=f$.reduce((e,t)=>{const r=xa(`Primitive.${t}`),n=S.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),h$="Separator",Ap="horizontal",m$=["horizontal","vertical"],Tp=S.forwardRef((e,t)=>{const{decorative:r,orientation:n=Ap,...o}=e,s=g$(n)?n:Ap,i=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return d.jsx(p$.div,{"data-orientation":s,...i,...o,ref:t})});Tp.displayName=h$;function g$(e){return m$.includes(e)}var v$=Tp;function y$({className:e,orientation:t="horizontal",decorative:r=!0,...n}){return d.jsx(v$,{"data-slot":"separator",decorative:r,orientation:t,className:ge("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}const b$=({theme:e,basePath:t,readOnly:r})=>{const{watch:n}=Be(),o=n(`${t}.type`),s=()=>{switch(o){case"number":return d.jsx(_0,{theme:e,basePath:t,readOnly:r});case"integer":return d.jsx(E0,{theme:e,basePath:t,readOnly:r});case"string":return d.jsx(w0,{theme:e,basePath:t,readOnly:r});case"boolean":return d.jsx($0,{theme:e,basePath:t,readOnly:r});case"array":return d.jsx(S0,{theme:e,basePath:t,readOnly:r});case"object":return d.jsx(u$,{theme:e,basePath:t,readOnly:r});default:return d.jsx(d.Fragment,{children:`Settings for type ${o} are not yet implemented.`})}};return d.jsxs("div",{children:[t==="root"&&d.jsxs(d.Fragment,{children:[d.jsx(d$,{theme:e,basePath:t,readOnly:r}),d.jsx(y$,{className:"my-4"})]}),s()]})};function _$({...e}){return d.jsx(Lu,{"data-slot":"dialog",...e})}function w$({...e}){return d.jsx(Ru,{"data-slot":"dialog-portal",...e})}function $$({className:e,...t}){return d.jsx(qu,{"data-slot":"dialog-overlay",className:ge("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function S$({className:e,children:t,showCloseButton:r=!0,...n}){return d.jsxs(w$,{"data-slot":"dialog-portal",children:[d.jsx($$,{}),d.jsxs(Uu,{"data-slot":"dialog-content",className:ge("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,r&&d.jsxs(ja,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx(Vl,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function E$({className:e,...t}){return d.jsx("div",{"data-slot":"dialog-header",className:ge("flex flex-col gap-2 text-center sm:text-left",e),...t})}function k$({className:e,...t}){return d.jsx(Zu,{"data-slot":"dialog-title",className:ge("text-lg leading-none font-semibold",e),...t})}const x$=({theme:e,readOnly:t,className:r,isOpen:n,fieldPath:o,onClose:s})=>{const{getValues:a}=Be(),i=o?a(o):null;return d.jsx(_$,{open:n,onOpenChange:c=>!c&&s(),children:d.jsxs(S$,{className:ge("bg-background text-foreground border-input",e,r),children:[d.jsx(E$,{children:d.jsxs(k$,{className:"capitalize",children:[i?.type," Schema Settings"]})}),o&&d.jsx(b$,{basePath:o,theme:e,readOnly:t}),d.jsx(Bt,{onClick:s,variant:"default",children:"Close"})]})})},Ip=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ee(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},ai=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Ip(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Ip(o,r,e))}},Op=(e,t)=>{t.shouldUseNativeValidation&&ai(e,t);const r={};for(const n in e){const o=ee(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(C$(t.names||Object.keys(e),n)){const a=Object.assign({},ee(r,n));Pe(a,"root",s),Pe(r,n,a)}else Pe(r,n,s)}return r},C$=(e,t)=>{const r=Dp(t);return e.some(n=>Dp(n).match(`^${r}\\.\\d+`))};function Dp(e){return e.replace(/\]|\[/g,"")}function B(e,t,r){function n(i,c){if(i._zod||Object.defineProperty(i,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),i._zod.traits.has(e))return;i._zod.traits.add(e),t(i,c);const l=a.prototype,u=Object.keys(l);for(let p=0;p<u.length;p++){const h=u[p];h in i||(i[h]=l[h].bind(i))}}const o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function a(i){var c;const l=r?.Parent?new s:this;n(l,i),(c=l._zod).deferred??(c.deferred=[]);for(const u of l._zod.deferred)u();return l}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:i=>r?.Parent&&i instanceof r.Parent?!0:i?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class Fr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Mp extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const zp={};function Gt(e){return zp}function P$(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function ii(e,t){return typeof t=="bigint"?t.toString():t}function ci(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function li(e){return e==null}function ui(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function N$(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){const c=n.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const s=r>o?r:o,a=Number.parseInt(e.toFixed(s).replace(".","")),i=Number.parseInt(t.toFixed(s).replace(".",""));return a%i/10**s}const jp=Symbol("evaluating");function Ae(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==jp)return n===void 0&&(n=jp,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function lr(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ur(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Fp(e){return JSON.stringify(e)}function A$(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Vp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function cs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const T$=ci(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Vr(e){if(cs(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(cs(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Lp(e){return Vr(e)?{...e}:Array.isArray(e)?[...e]:e}const I$=new Set(["string","number","symbol"]);function ls(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jt(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function de(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function O$(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const D$={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function M$(e,t){const r=e._zod.def,n=ur(e._zod.def,{get shape(){const o={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(o[s]=r.shape[s])}return lr(this,"shape",o),o},checks:[]});return Jt(e,n)}function z$(e,t){const r=e._zod.def,n=ur(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete o[s]}return lr(this,"shape",o),o},checks:[]});return Jt(e,n)}function j$(e,t){if(!Vr(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=ur(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return lr(this,"shape",s),s},checks:[]});return Jt(e,o)}function F$(e,t){if(!Vr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return lr(this,"shape",n),n},checks:e._zod.def.checks};return Jt(e,r)}function V$(e,t){const r=ur(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return lr(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Jt(e,r)}function L$(e,t,r){const n=ur(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=e?new e({type:"optional",innerType:o[a]}):o[a])}else for(const a in o)s[a]=e?new e({type:"optional",innerType:o[a]}):o[a];return lr(this,"shape",s),s},checks:[]});return Jt(t,n)}function R$(e,t,r){const n=ur(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const a in r){if(!(a in s))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)s[a]=new e({type:"nonoptional",innerType:o[a]});return lr(this,"shape",s),s},checks:[]});return Jt(t,n)}function Lr(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Rr(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function us(e){return typeof e=="string"?e:e?.message}function Yt(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=us(e.inst?._zod.def?.error?.(e))??us(t?.error?.(e))??us(r.customError?.(e))??us(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function di(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function dn(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Rp=(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,ii,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},fi=B("$ZodError",Rp),ds=B("$ZodError",Rp,{Parent:Error});function q$(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function U$(e,t=r=>r.message){const r={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let a=r,i=0;for(;i<s.path.length;){const c=s.path[i];i===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(t(s))):a[c]=a[c]||{_errors:[]},a=a[c],i++}}};return n(e),r}const fs=e=>(t,r,n,o)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new Fr;if(a.issues.length){const i=new(o?.Err??e)(a.issues.map(c=>Yt(c,s,Gt())));throw Vp(i,o?.callee),i}return a.value},Z$=fs(ds),ps=e=>async(t,r,n,o)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const i=new(o?.Err??e)(a.issues.map(c=>Yt(c,s,Gt())));throw Vp(i,o?.callee),i}return a.value},B$=ps(ds),hs=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Fr;return s.issues.length?{success:!1,error:new(e??fi)(s.issues.map(a=>Yt(a,o,Gt())))}:{success:!0,data:s.value}},W$=hs(ds),ms=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(a=>Yt(a,o,Gt())))}:{success:!0,data:s.value}},H$=ms(ds),K$=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return fs(e)(t,r,o)},G$=e=>(t,r,n)=>fs(e)(t,r,n),J$=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ps(e)(t,r,o)},Y$=e=>async(t,r,n)=>ps(e)(t,r,n),X$=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return hs(e)(t,r,o)},Q$=e=>(t,r,n)=>hs(e)(t,r,n),eS=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ms(e)(t,r,o)},tS=e=>async(t,r,n)=>ms(e)(t,r,n),rS=/^[cC][^\s-]{8,}$/,nS=/^[0-9a-z]+$/,oS=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sS=/^[0-9a-vA-V]{20}$/,aS=/^[A-Za-z0-9]{27}$/,iS=/^[a-zA-Z0-9_-]{21}$/,cS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,lS=/^([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})$/,qp=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,uS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,dS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function fS(){return new RegExp(dS,"u")}const pS=/^(?:(?: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])$/,hS=/^(([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}|:))$/,mS=/^((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])$/,gS=/^(([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])$/,vS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Up=/^[A-Za-z0-9_-]*$/,yS=/^\+(?:[0-9]){6,14}[0-9]$/,Zp="(?:(?:\\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])))",bS=new RegExp(`^${Zp}$`);function Bp(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function _S(e){return new RegExp(`^${Bp(e)}$`)}function wS(e){const t=Bp({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Zp}T(?:${n})$`)}const $S=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},SS=/^-?\d+$/,ES=/^-?\d+(?:\.\d+)?/,kS=/^(?:true|false)$/i,xS=/^[^A-Z]*$/,CS=/^[^a-z]*$/,Xe=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Wp={number:"number",bigint:"bigint",object:"date"},Hp=B("$ZodCheckLessThan",(e,t)=>{Xe.init(e,t);const r=Wp[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Kp=B("$ZodCheckGreaterThan",(e,t)=>{Xe.init(e,t);const r=Wp[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),PS=B("$ZodCheckMultipleOf",(e,t)=>{Xe.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):N$(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),NS=B("$ZodCheckNumberFormat",(e,t)=>{Xe.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,s]=D$[t.format];e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,i.minimum=o,i.maximum=s,r&&(i.pattern=SS)}),e._zod.check=a=>{const i=a.value;if(r){if(!Number.isInteger(i)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:i,inst:e});return}if(!Number.isSafeInteger(i)){i>0?a.issues.push({input:i,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):a.issues.push({input:i,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}i<o&&a.issues.push({origin:"number",input:i,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),i>s&&a.issues.push({origin:"number",input:i,code:"too_big",maximum:s,inst:e})}}),AS=B("$ZodCheckMaxLength",(e,t)=>{var r;Xe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!li(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const a=di(o);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),TS=B("$ZodCheckMinLength",(e,t)=>{var r;Xe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!li(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const a=di(o);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),IS=B("$ZodCheckLengthEquals",(e,t)=>{var r;Xe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!li(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,s=o.length;if(s===t.length)return;const a=di(o),i=s>t.length;n.issues.push({origin:a,...i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),gs=B("$ZodCheckStringFormat",(e,t)=>{var r,n;Xe.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),OS=B("$ZodCheckRegex",(e,t)=>{gs.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),DS=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=xS),gs.init(e,t)}),MS=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=CS),gs.init(e,t)}),zS=B("$ZodCheckIncludes",(e,t)=>{Xe.init(e,t);const r=ls(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),jS=B("$ZodCheckStartsWith",(e,t)=>{Xe.init(e,t);const r=new RegExp(`^${ls(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),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})}}),FS=B("$ZodCheckEndsWith",(e,t)=>{Xe.init(e,t);const r=new RegExp(`.*${ls(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),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})}}),VS=B("$ZodCheckOverwrite",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class LS{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
|
|
59
|
+
`).filter(a=>a),o=Math.min(...n.map(a=>a.length-a.trimStart().length)),s=n.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of s)this.content.push(a)}compile(){const t=Function,r=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...r,o.join(`
|
|
60
|
+
`))}}const RS={major:4,minor:1,patch:13},Me=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=RS;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(a,i,c)=>{let l=Lr(a),u;for(const p of i){if(p._zod.def.when){if(!p._zod.def.when(a))continue}else if(l)continue;const h=a.issues.length,v=p._zod.check(a);if(v instanceof Promise&&c?.async===!1)throw new Fr;if(u||v instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await v,a.issues.length!==h&&(l||(l=Lr(a,h)))});else{if(a.issues.length===h)continue;l||(l=Lr(a,h))}}return u?u.then(()=>a):a},s=(a,i,c)=>{if(Lr(a))return a.aborted=!0,a;const l=o(i,n,c);if(l instanceof Promise){if(c.async===!1)throw new Fr;return l.then(u=>e._zod.parse(u,c))}return e._zod.parse(l,c)};e._zod.run=(a,i)=>{if(i.skipChecks)return e._zod.parse(a,i);if(i.direction==="backward"){const l=e._zod.parse({value:a.value,issues:[]},{...i,skipChecks:!0});return l instanceof Promise?l.then(u=>s(u,a,i)):s(l,a,i)}const c=e._zod.parse(a,i);if(c instanceof Promise){if(i.async===!1)throw new Fr;return c.then(l=>o(l,n,i))}return o(c,n,i)}}e["~standard"]={validate:o=>{try{const s=W$(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return H$(e,o).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),pi=B("$ZodString",(e,t)=>{Me.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??$S(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ze=B("$ZodStringFormat",(e,t)=>{gs.init(e,t),pi.init(e,t)}),qS=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=lS),ze.init(e,t)}),US=B("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=qp(n))}else t.pattern??(t.pattern=qp());ze.init(e,t)}),ZS=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=uS),ze.init(e,t)}),BS=B("$ZodURL",(e,t)=>{ze.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),WS=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=fS()),ze.init(e,t)}),HS=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=iS),ze.init(e,t)}),KS=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=rS),ze.init(e,t)}),GS=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=nS),ze.init(e,t)}),JS=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=oS),ze.init(e,t)}),YS=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=sS),ze.init(e,t)}),XS=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=aS),ze.init(e,t)}),QS=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=wS(t)),ze.init(e,t)}),eE=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=bS),ze.init(e,t)}),tE=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=_S(t)),ze.init(e,t)}),rE=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=cS),ze.init(e,t)}),nE=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=pS),ze.init(e,t),e._zod.bag.format="ipv4"}),oE=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=hS),ze.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),sE=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=mS),ze.init(e,t)}),aE=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=gS),ze.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[o,s]=n;if(!s)throw new Error;const a=Number(s);if(`${a}`!==s)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Gp(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const iE=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=vS),ze.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Gp(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function cE(e){if(!Up.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Gp(r)}const lE=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Up),ze.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{cE(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),uE=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=yS),ze.init(e,t)});function dE(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const fE=B("$ZodJWT",(e,t)=>{ze.init(e,t),e._zod.check=r=>{dE(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Jp=B("$ZodNumber",(e,t)=>{Me.init(e,t),e._zod.pattern=e._zod.bag.pattern??ES,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),r}}),pE=B("$ZodNumberFormat",(e,t)=>{NS.init(e,t),Jp.init(e,t)}),hE=B("$ZodBoolean",(e,t)=>{Me.init(e,t),e._zod.pattern=kS,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),mE=B("$ZodAny",(e,t)=>{Me.init(e,t),e._zod.parse=r=>r}),gE=B("$ZodUnknown",(e,t)=>{Me.init(e,t),e._zod.parse=r=>r}),vE=B("$ZodNever",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Yp(e,t,r){e.issues.length&&t.issues.push(...Rr(r,e.issues)),t.value[r]=e.value}const yE=B("$ZodArray",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const s=[];for(let a=0;a<o.length;a++){const i=o[a],c=t.element._zod.run({value:i,issues:[]},n);c instanceof Promise?s.push(c.then(l=>Yp(l,r,a))):Yp(c,r,a)}return s.length?Promise.all(s).then(()=>r):r}});function vs(e,t,r,n){e.issues.length&&t.issues.push(...Rr(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function Xp(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=O$(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Qp(e,t,r,n,o,s){const a=[],i=o.keySet,c=o.catchall._zod,l=c.def.type;for(const u in t){if(i.has(u))continue;if(l==="never"){a.push(u);continue}const p=c.run({value:t[u],issues:[]},n);p instanceof Promise?e.push(p.then(h=>vs(h,r,u,t))):vs(p,r,u,t)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}const bE=B("$ZodObject",(e,t)=>{if(Me.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const i=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...i};return Object.defineProperty(t,"shape",{value:c}),c}})}const n=ci(()=>Xp(t));Ae(e._zod,"propValues",()=>{const i=t.shape,c={};for(const l in i){const u=i[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(const p of u.values)c[l].add(p)}}return c});const o=cs,s=t.catchall;let a;e._zod.parse=(i,c)=>{a??(a=n.value);const l=i.value;if(!o(l))return i.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),i;i.value={};const u=[],p=a.shape;for(const h of a.keys){const w=p[h]._zod.run({value:l[h],issues:[]},c);w instanceof Promise?u.push(w.then(y=>vs(y,i,h,l))):vs(w,i,h,l)}return s?Qp(u,l,i,c,n.value,e):u.length?Promise.all(u).then(()=>i):i}}),_E=B("$ZodObjectJIT",(e,t)=>{bE.init(e,t);const r=e._zod.parse,n=ci(()=>Xp(t)),o=h=>{const v=new LS(["shape","payload","ctx"]),w=n.value,y=b=>{const $=Fp(b);return`shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`};v.write("const input = payload.value;");const m=Object.create(null);let _=0;for(const b of w.keys)m[b]=`key_${_++}`;v.write("const newResult = {};");for(const b of w.keys){const $=m[b],g=Fp(b);v.write(`const ${$} = ${y(b)};`),v.write(`
|
|
61
|
+
if (${$}.issues.length) {
|
|
62
|
+
payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
|
|
63
|
+
...iss,
|
|
64
|
+
path: iss.path ? [${g}, ...iss.path] : [${g}]
|
|
65
|
+
})));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
if (${$}.value === undefined) {
|
|
70
|
+
if (${g} in input) {
|
|
71
|
+
newResult[${g}] = undefined;
|
|
72
|
+
}
|
|
73
|
+
} else {
|
|
74
|
+
newResult[${g}] = ${$}.value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
`)}v.write("payload.value = newResult;"),v.write("return payload;");const f=v.compile();return(b,$)=>f(h,b,$)};let s;const a=cs,i=!zp.jitless,l=i&&T$.value,u=t.catchall;let p;e._zod.parse=(h,v)=>{p??(p=n.value);const w=h.value;return a(w)?i&&l&&v?.async===!1&&v.jitless!==!0?(s||(s=o(t.shape)),h=s(h,v),u?Qp([],w,h,v,p,e):h):r(h,v):(h.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),h)}});function eh(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Lr(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(a=>Yt(a,n,Gt())))}),t)}const wE=B("$ZodUnion",(e,t)=>{Me.init(e,t),Ae(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ae(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ae(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Ae(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>ui(s.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(r)return n(o,s);let a=!1;const i=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},s);if(l instanceof Promise)i.push(l),a=!0;else{if(l.issues.length===0)return l;i.push(l)}}return a?Promise.all(i).then(c=>eh(c,o,e,s)):eh(i,o,e,s)}}),$E=B("$ZodIntersection",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,s=t.left._zod.run({value:o,issues:[]},n),a=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([c,l])=>th(r,c,l)):th(r,s,a)}});function hi(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Vr(e)&&Vr(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(const s of n){const a=hi(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};o[s]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],s=t[n],a=hi(o,s);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function th(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Lr(e))return e;const n=hi(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const SE=B("$ZodRecord",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Vr(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;const s=[],a=t.keyType._zod.values;if(a){r.value={};const i=new Set;for(const l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){i.add(typeof l=="number"?l.toString():l);const u=t.valueType._zod.run({value:o[l],issues:[]},n);u instanceof Promise?s.push(u.then(p=>{p.issues.length&&r.issues.push(...Rr(l,p.issues)),r.value[l]=p.value})):(u.issues.length&&r.issues.push(...Rr(l,u.issues)),r.value[l]=u.value)}let c;for(const l in o)i.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{r.value={};for(const i of Reflect.ownKeys(o)){if(i==="__proto__")continue;const c=t.keyType._zod.run({value:i,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(u=>Yt(u,n,Gt())),input:i,path:[i],inst:e}),r.value[c.value]=c.value;continue}const l=t.valueType._zod.run({value:o[i],issues:[]},n);l instanceof Promise?s.push(l.then(u=>{u.issues.length&&r.issues.push(...Rr(i,u.issues)),r.value[c.value]=u.value})):(l.issues.length&&r.issues.push(...Rr(i,l.issues)),r.value[c.value]=l.value)}}return s.length?Promise.all(s).then(()=>r):r}}),EE=B("$ZodEnum",(e,t)=>{Me.init(e,t);const r=P$(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>I$.has(typeof o)).map(o=>typeof o=="string"?ls(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:r,input:a,inst:e}),o}}),kE=B("$ZodTransform",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Mp(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(r.value=a,r));if(o instanceof Promise)throw new Fr;return r.value=o,r}});function rh(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const xE=B("$ZodOptional",(e,t)=>{Me.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ae(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${ui(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>rh(s,r.value)):rh(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),CE=B("$ZodNullable",(e,t)=>{Me.init(e,t),Ae(e._zod,"optin",()=>t.innerType._zod.optin),Ae(e._zod,"optout",()=>t.innerType._zod.optout),Ae(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${ui(r.source)}|null)$`):void 0}),Ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),PE=B("$ZodDefault",(e,t)=>{Me.init(e,t),e._zod.optin="optional",Ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>nh(s,t)):nh(o,t)}});function nh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const NE=B("$ZodPrefault",(e,t)=>{Me.init(e,t),e._zod.optin="optional",Ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),AE=B("$ZodNonOptional",(e,t)=>{Me.init(e,t),Ae(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>oh(s,e)):oh(o,e)}});function oh(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const TE=B("$ZodCatch",(e,t)=>{Me.init(e,t),Ae(e._zod,"optin",()=>t.innerType._zod.optin),Ae(e._zod,"optout",()=>t.innerType._zod.optout),Ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(a=>Yt(a,n,Gt()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>Yt(s,n,Gt()))},input:r.value}),r.issues=[]),r)}}),IE=B("$ZodPipe",(e,t)=>{Me.init(e,t),Ae(e._zod,"values",()=>t.in._zod.values),Ae(e._zod,"optin",()=>t.in._zod.optin),Ae(e._zod,"optout",()=>t.out._zod.optout),Ae(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(a=>ys(a,t.in,n)):ys(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>ys(s,t.out,n)):ys(o,t.out,n)}});function ys(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const OE=B("$ZodReadonly",(e,t)=>{Me.init(e,t),Ae(e._zod,"propValues",()=>t.innerType._zod.propValues),Ae(e._zod,"values",()=>t.innerType._zod.values),Ae(e._zod,"optin",()=>t.innerType?._zod?.optin),Ae(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(sh):sh(o)}});function sh(e){return e.value=Object.freeze(e.value),e}const DE=B("$ZodLazy",(e,t)=>{Me.init(e,t),Ae(e._zod,"innerType",()=>t.getter()),Ae(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ae(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ae(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ae(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),ME=B("$ZodCustom",(e,t)=>{Xe.init(e,t),Me.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>ah(s,r,n,e));ah(o,r,n,e)}});function ah(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(dn(o))}}var ih;class zE{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function jE(){return new zE}(ih=globalThis).__zod_globalRegistry??(ih.__zod_globalRegistry=jE());const bs=globalThis.__zod_globalRegistry;function FE(e,t){return new e({type:"string",...de(t)})}function VE(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...de(t)})}function ch(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...de(t)})}function LE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...de(t)})}function RE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...de(t)})}function qE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...de(t)})}function UE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...de(t)})}function ZE(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...de(t)})}function BE(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...de(t)})}function WE(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...de(t)})}function HE(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...de(t)})}function KE(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...de(t)})}function GE(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...de(t)})}function JE(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...de(t)})}function YE(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...de(t)})}function XE(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...de(t)})}function QE(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...de(t)})}function ek(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...de(t)})}function tk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...de(t)})}function rk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...de(t)})}function nk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...de(t)})}function ok(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...de(t)})}function sk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...de(t)})}function ak(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...de(t)})}function ik(e,t){return new e({type:"string",format:"date",check:"string_format",...de(t)})}function ck(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...de(t)})}function lk(e,t){return new e({type:"string",format:"duration",check:"string_format",...de(t)})}function uk(e,t){return new e({type:"number",checks:[],...de(t)})}function dk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...de(t)})}function fk(e,t){return new e({type:"boolean",...de(t)})}function pk(e){return new e({type:"any"})}function hk(e){return new e({type:"unknown"})}function mk(e,t){return new e({type:"never",...de(t)})}function lh(e,t){return new Hp({check:"less_than",...de(t),value:e,inclusive:!1})}function mi(e,t){return new Hp({check:"less_than",...de(t),value:e,inclusive:!0})}function uh(e,t){return new Kp({check:"greater_than",...de(t),value:e,inclusive:!1})}function gi(e,t){return new Kp({check:"greater_than",...de(t),value:e,inclusive:!0})}function dh(e,t){return new PS({check:"multiple_of",...de(t),value:e})}function fh(e,t){return new AS({check:"max_length",...de(t),maximum:e})}function _s(e,t){return new TS({check:"min_length",...de(t),minimum:e})}function ph(e,t){return new IS({check:"length_equals",...de(t),length:e})}function gk(e,t){return new OS({check:"string_format",format:"regex",...de(t),pattern:e})}function vk(e){return new DS({check:"string_format",format:"lowercase",...de(e)})}function yk(e){return new MS({check:"string_format",format:"uppercase",...de(e)})}function bk(e,t){return new zS({check:"string_format",format:"includes",...de(t),includes:e})}function _k(e,t){return new jS({check:"string_format",format:"starts_with",...de(t),prefix:e})}function wk(e,t){return new FS({check:"string_format",format:"ends_with",...de(t),suffix:e})}function qr(e){return new VS({check:"overwrite",tx:e})}function $k(e){return qr(t=>t.normalize(e))}function Sk(){return qr(e=>e.trim())}function Ek(){return qr(e=>e.toLowerCase())}function kk(){return qr(e=>e.toUpperCase())}function xk(){return qr(e=>A$(e))}function Ck(e,t,r){return new e({type:"array",element:t,...de(r)})}function Pk(e,t,r){return new e({type:"custom",check:"custom",fn:t,...de(r)})}function Nk(e){const t=Ak(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(dn(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(dn(o))}},e(r.value,r)));return t}function Ak(e,t){const r=new Xe({check:"custom",...de(t)});return r._zod.check=e,r}function hh(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function Tk(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,a=n.path.join(".");if(!r[a])if("unionErrors"in n){var i=n.unionErrors[0].errors[0];r[a]={message:i.message,type:i.code}}else r[a]={message:s,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(p){return e.push(p)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=Ps(a,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function Ik(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,a=n.path.join(".");if(!r[a])if(n.code==="invalid_union"&&n.errors.length>0){var i=n.errors[0][0];r[a]={message:i.message,type:i.code}}else r[a]={message:s,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(u){return u.forEach(function(p){return e.push(p)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=Ps(a,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function Ok(e,t,r){if(r===void 0&&(r={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,o,s){try{return Promise.resolve(hh(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(a){return s.shouldUseNativeValidation&&ai({},s),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return Array.isArray(i?.issues)})(a))return{values:{},errors:Op(Tk(a.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw a}))}catch(a){return Promise.reject(a)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,s){try{return Promise.resolve(hh(function(){return Promise.resolve((r.mode==="sync"?Z$:B$)(e,n,t)).then(function(a){return s.shouldUseNativeValidation&&ai({},s),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return i instanceof fi})(a))return{values:{},errors:Op(Ik(a.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const Dk=B("ZodISODateTime",(e,t)=>{QS.init(e,t),Fe.init(e,t)});function Mk(e){return ak(Dk,e)}const zk=B("ZodISODate",(e,t)=>{eE.init(e,t),Fe.init(e,t)});function jk(e){return ik(zk,e)}const Fk=B("ZodISOTime",(e,t)=>{tE.init(e,t),Fe.init(e,t)});function Vk(e){return ck(Fk,e)}const Lk=B("ZodISODuration",(e,t)=>{rE.init(e,t),Fe.init(e,t)});function Rk(e){return lk(Lk,e)}const at=B("ZodError",(e,t)=>{fi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>U$(e,r)},flatten:{value:r=>q$(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ii,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ii,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),qk=fs(at),Uk=ps(at),Zk=hs(at),Bk=ms(at),Wk=K$(at),Hk=G$(at),Kk=J$(at),Gk=Y$(at),Jk=X$(at),Yk=Q$(at),Xk=eS(at),Qk=tS(at),je=B("ZodType",(e,t)=>(Me.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(ur(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]})),e.clone=(r,n)=>Jt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>qk(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Zk(e,r,n),e.parseAsync=async(r,n)=>Uk(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Bk(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Wk(e,r,n),e.decode=(r,n)=>Hk(e,r,n),e.encodeAsync=async(r,n)=>Kk(e,r,n),e.decodeAsync=async(r,n)=>Gk(e,r,n),e.safeEncode=(r,n)=>Jk(e,r,n),e.safeDecode=(r,n)=>Yk(e,r,n),e.safeEncodeAsync=async(r,n)=>Xk(e,r,n),e.safeDecodeAsync=async(r,n)=>Qk(e,r,n),e.refine=(r,n)=>e.check(Wx(r,n)),e.superRefine=r=>e.check(Hx(r)),e.overwrite=r=>e.check(qr(r)),e.optional=()=>Sh(e),e.nullable=()=>Eh(e),e.nullish=()=>Sh(Eh(e)),e.nonoptional=r=>Fx(e,r),e.array=()=>Ur(e),e.or=r=>yi([e,r]),e.and=r=>Px(e,r),e.transform=r=>xh(e,Ix(r)),e.default=r=>Mx(e,r),e.prefault=r=>jx(e,r),e.catch=r=>Lx(e,r),e.pipe=r=>xh(e,r),e.readonly=()=>Ux(e),e.describe=r=>{const n=e.clone();return bs.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return bs.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return bs.get(e);const n=e.clone();return bs.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),mh=B("_ZodString",(e,t)=>{pi.init(e,t),je.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(gk(...n)),e.includes=(...n)=>e.check(bk(...n)),e.startsWith=(...n)=>e.check(_k(...n)),e.endsWith=(...n)=>e.check(wk(...n)),e.min=(...n)=>e.check(_s(...n)),e.max=(...n)=>e.check(fh(...n)),e.length=(...n)=>e.check(ph(...n)),e.nonempty=(...n)=>e.check(_s(1,...n)),e.lowercase=n=>e.check(vk(n)),e.uppercase=n=>e.check(yk(n)),e.trim=()=>e.check(Sk()),e.normalize=(...n)=>e.check($k(...n)),e.toLowerCase=()=>e.check(Ek()),e.toUpperCase=()=>e.check(kk()),e.slugify=()=>e.check(xk())}),ex=B("ZodString",(e,t)=>{pi.init(e,t),mh.init(e,t),e.email=r=>e.check(VE(tx,r)),e.url=r=>e.check(ZE(rx,r)),e.jwt=r=>e.check(sk(vx,r)),e.emoji=r=>e.check(BE(nx,r)),e.guid=r=>e.check(ch(gh,r)),e.uuid=r=>e.check(LE(ws,r)),e.uuidv4=r=>e.check(RE(ws,r)),e.uuidv6=r=>e.check(qE(ws,r)),e.uuidv7=r=>e.check(UE(ws,r)),e.nanoid=r=>e.check(WE(ox,r)),e.guid=r=>e.check(ch(gh,r)),e.cuid=r=>e.check(HE(sx,r)),e.cuid2=r=>e.check(KE(ax,r)),e.ulid=r=>e.check(GE(ix,r)),e.base64=r=>e.check(rk(hx,r)),e.base64url=r=>e.check(nk(mx,r)),e.xid=r=>e.check(JE(cx,r)),e.ksuid=r=>e.check(YE(lx,r)),e.ipv4=r=>e.check(XE(ux,r)),e.ipv6=r=>e.check(QE(dx,r)),e.cidrv4=r=>e.check(ek(fx,r)),e.cidrv6=r=>e.check(tk(px,r)),e.e164=r=>e.check(ok(gx,r)),e.datetime=r=>e.check(Mk(r)),e.date=r=>e.check(jk(r)),e.time=r=>e.check(Vk(r)),e.duration=r=>e.check(Rk(r))});function vt(e){return FE(ex,e)}const Fe=B("ZodStringFormat",(e,t)=>{ze.init(e,t),mh.init(e,t)}),tx=B("ZodEmail",(e,t)=>{ZS.init(e,t),Fe.init(e,t)}),gh=B("ZodGUID",(e,t)=>{qS.init(e,t),Fe.init(e,t)}),ws=B("ZodUUID",(e,t)=>{US.init(e,t),Fe.init(e,t)}),rx=B("ZodURL",(e,t)=>{BS.init(e,t),Fe.init(e,t)}),nx=B("ZodEmoji",(e,t)=>{WS.init(e,t),Fe.init(e,t)}),ox=B("ZodNanoID",(e,t)=>{HS.init(e,t),Fe.init(e,t)}),sx=B("ZodCUID",(e,t)=>{KS.init(e,t),Fe.init(e,t)}),ax=B("ZodCUID2",(e,t)=>{GS.init(e,t),Fe.init(e,t)}),ix=B("ZodULID",(e,t)=>{JS.init(e,t),Fe.init(e,t)}),cx=B("ZodXID",(e,t)=>{YS.init(e,t),Fe.init(e,t)}),lx=B("ZodKSUID",(e,t)=>{XS.init(e,t),Fe.init(e,t)}),ux=B("ZodIPv4",(e,t)=>{nE.init(e,t),Fe.init(e,t)}),dx=B("ZodIPv6",(e,t)=>{oE.init(e,t),Fe.init(e,t)}),fx=B("ZodCIDRv4",(e,t)=>{sE.init(e,t),Fe.init(e,t)}),px=B("ZodCIDRv6",(e,t)=>{aE.init(e,t),Fe.init(e,t)}),hx=B("ZodBase64",(e,t)=>{iE.init(e,t),Fe.init(e,t)}),mx=B("ZodBase64URL",(e,t)=>{lE.init(e,t),Fe.init(e,t)}),gx=B("ZodE164",(e,t)=>{uE.init(e,t),Fe.init(e,t)}),vx=B("ZodJWT",(e,t)=>{fE.init(e,t),Fe.init(e,t)}),vh=B("ZodNumber",(e,t)=>{Jp.init(e,t),je.init(e,t),e.gt=(n,o)=>e.check(uh(n,o)),e.gte=(n,o)=>e.check(gi(n,o)),e.min=(n,o)=>e.check(gi(n,o)),e.lt=(n,o)=>e.check(lh(n,o)),e.lte=(n,o)=>e.check(mi(n,o)),e.max=(n,o)=>e.check(mi(n,o)),e.int=n=>e.check(yh(n)),e.safe=n=>e.check(yh(n)),e.positive=n=>e.check(uh(0,n)),e.nonnegative=n=>e.check(gi(0,n)),e.negative=n=>e.check(lh(0,n)),e.nonpositive=n=>e.check(mi(0,n)),e.multipleOf=(n,o)=>e.check(dh(n,o)),e.step=(n,o)=>e.check(dh(n,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ot(e){return uk(vh,e)}const yx=B("ZodNumberFormat",(e,t)=>{pE.init(e,t),vh.init(e,t)});function yh(e){return dk(yx,e)}const bx=B("ZodBoolean",(e,t)=>{hE.init(e,t),je.init(e,t)});function $s(e){return fk(bx,e)}const _x=B("ZodAny",(e,t)=>{mE.init(e,t),je.init(e,t)});function bh(){return pk(_x)}const wx=B("ZodUnknown",(e,t)=>{gE.init(e,t),je.init(e,t)});function _h(){return hk(wx)}const $x=B("ZodNever",(e,t)=>{vE.init(e,t),je.init(e,t)});function Sx(e){return mk($x,e)}const Ex=B("ZodArray",(e,t)=>{yE.init(e,t),je.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(_s(r,n)),e.nonempty=r=>e.check(_s(1,r)),e.max=(r,n)=>e.check(fh(r,n)),e.length=(r,n)=>e.check(ph(r,n)),e.unwrap=()=>e.element});function Ur(e,t){return Ck(Ex,e,t)}const kx=B("ZodObject",(e,t)=>{_E.init(e,t),je.init(e,t),Ae(e,"shape",()=>t.shape),e.keyof=()=>wh(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:_h()}),e.loose=()=>e.clone({...e._zod.def,catchall:_h()}),e.strict=()=>e.clone({...e._zod.def,catchall:Sx()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>j$(e,r),e.safeExtend=r=>F$(e,r),e.merge=r=>V$(e,r),e.pick=r=>M$(e,r),e.omit=r=>z$(e,r),e.partial=(...r)=>L$($h,e,r[0]),e.required=(...r)=>R$(kh,e,r[0])});function vi(e,t){const r={type:"object",shape:e??{},...de(t)};return new kx(r)}const xx=B("ZodUnion",(e,t)=>{wE.init(e,t),je.init(e,t),e.options=t.options});function yi(e,t){return new xx({type:"union",options:e,...de(t)})}const Cx=B("ZodIntersection",(e,t)=>{$E.init(e,t),je.init(e,t)});function Px(e,t){return new Cx({type:"intersection",left:e,right:t})}const Nx=B("ZodRecord",(e,t)=>{SE.init(e,t),je.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ax(e,t,r){return new Nx({type:"record",keyType:e,valueType:t,...de(r)})}const bi=B("ZodEnum",(e,t)=>{EE.init(e,t),je.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const s={};for(const a of n)if(r.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new bi({...t,checks:[],...de(o),entries:s})},e.exclude=(n,o)=>{const s={...t.entries};for(const a of n)if(r.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new bi({...t,checks:[],...de(o),entries:s})}});function wh(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new bi({type:"enum",entries:r,...de(t)})}const Tx=B("ZodTransform",(e,t)=>{kE.init(e,t),je.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Mp(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(dn(s,r.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(dn(a))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function Ix(e){return new Tx({type:"transform",transform:e})}const $h=B("ZodOptional",(e,t)=>{xE.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Sh(e){return new $h({type:"optional",innerType:e})}const Ox=B("ZodNullable",(e,t)=>{CE.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Eh(e){return new Ox({type:"nullable",innerType:e})}const Dx=B("ZodDefault",(e,t)=>{PE.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Mx(e,t){return new Dx({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Lp(t)}})}const zx=B("ZodPrefault",(e,t)=>{NE.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType});function jx(e,t){return new zx({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Lp(t)}})}const kh=B("ZodNonOptional",(e,t)=>{AE.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Fx(e,t){return new kh({type:"nonoptional",innerType:e,...de(t)})}const Vx=B("ZodCatch",(e,t)=>{TE.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Lx(e,t){return new Vx({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Rx=B("ZodPipe",(e,t)=>{IE.init(e,t),je.init(e,t),e.in=t.in,e.out=t.out});function xh(e,t){return new Rx({type:"pipe",in:e,out:t})}const qx=B("ZodReadonly",(e,t)=>{OE.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ux(e){return new qx({type:"readonly",innerType:e})}const Zx=B("ZodLazy",(e,t)=>{DE.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.getter()});function _i(e){return new Zx({type:"lazy",getter:e})}const Bx=B("ZodCustom",(e,t)=>{ME.init(e,t),je.init(e,t)});function Wx(e,t={}){return Pk(Bx,e,t)}function Hx(e){return Nk(e)}const Zr=vi({type:wh(["string","number","integer","boolean","object","array"]).optional(),title:vt().optional(),description:vt().optional(),default:bh().optional(),minimum:ot().optional(),maximum:ot().optional(),exclusiveMin:ot().optional(),exclusiveMax:ot().optional(),multipleOf:ot().optional(),minLength:ot().optional(),maxLength:ot().optional(),minContains:ot().optional(),maxContains:ot().optional(),minProperties:ot().optional(),maxProperties:ot().optional(),isModifiable:$s().optional(),"x-modifiable":Ur(vt()).optional(),pattern:vt().optional(),format:vt().optional(),minItems:ot().optional(),maxItems:ot().optional(),uniqueItems:$s().optional(),enum:Ur(bh()).optional(),$id:vt().optional(),$schema:vt().optional()}).extend({properties:_i(()=>Ax(vt(),Zr)).optional(),items:_i(()=>yi([Zr,Ur(Zr)])).optional(),required:Ur(vt()).optional(),additionalProperties:_i(()=>yi([$s(),Zr])).optional()}),Kx=vi({root:Zr,properties:Ur(vi({id:vt(),key:vt().min(1),isRequired:$s(),schema:Zr}))}),Gx=e=>{const t=s=>{const a={...s};if(Array.isArray(a.properties)){const i={},c=[];a.properties.forEach(l=>{l.key&&(i[l.key]=t(l.schema),l.isRequired&&c.push(l.key))}),a.properties=i,c.length>0&&(a.required=c)}return typeof a.items=="object"&&a.items!==null&&!Array.isArray(a.items)?a.items=t(a.items):Array.isArray(a.items)&&(a.items=a.items.map(i=>t(i))),a},r={...t(e.root)},n={},o=[];return e.properties.forEach(s=>{s.key&&(n[s.key]=t(s.schema),s.isRequired&&o.push(s.key))}),Object.keys(n).length>0&&(r.properties=n),o.length>0&&(r.required=o),r},Jx=e=>{const t=i=>{const c={...i};if(typeof c.properties=="object"&&!Array.isArray(c.properties)){const l=[];Object.keys(c.properties).forEach(u=>{const p=c.properties[u];l.push({id:Gr(6),key:u,isRequired:c.required?.includes(u)||!1,schema:t(p)})}),c.properties=l}return typeof c.items=="object"&&c.items!==null&&!Array.isArray(c.items)?c.items=t(c.items):Array.isArray(c.items)&&(c.items=c.items.map(l=>t(l))),c},{properties:r,required:n,...o}=e,a=t({properties:r,required:n});return{root:{...o,...a.root},properties:a.properties||[]}},Yx=({rootType:e="object",defaultValue:t})=>{const r=Gr(6),n=Kh({resolver:Ok(Kx),defaultValues:t?Jx(t):{root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:r,key:`field_${r}`,isRequired:!1,schema:{type:"number"}}]:[]}}),o=n.watch(),s=J.useMemo(()=>Gx(o),[o]);return{methods:n,jsonSchema:s}},Xx=({textAreaRef:e,triggerAutoSize:t,maxHeight:r=Number.MAX_SAFE_INTEGER,minHeight:n=0})=>{const[o,s]=S.useState(!0);S.useEffect(()=>{const i=e.current;if(i){o&&(i.style.minHeight=`${n+6}px`,r>n&&(i.style.maxHeight=`${r}px`),s(!1)),i.style.height=`${n+6}px`;const c=i.scrollHeight;c>r?i.style.height=`${r}px`:i.style.height=`${c+6}px`}},[e.current,t])},Ch=S.forwardRef(({maxHeight:e=Number.MAX_SAFE_INTEGER,minHeight:t=52,className:r,onChange:n,value:o,...s},a)=>{const i=S.useRef(null),[c,l]=S.useState("");return Xx({textAreaRef:i,triggerAutoSize:c,maxHeight:e,minHeight:t}),J.useImperativeHandle(a,()=>({textArea:i.current,focus:()=>i?.current?.focus(),maxHeight:e,minHeight:t})),S.useEffect(()=>{l(o)},[s?.defaultValue,o]),d.jsx("textarea",{...s,value:o,ref:i,className:ge("flex w-full rounded-md border border-input bg-transparent dark:bg-input/30 px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),onChange:u=>{l(u.target.value),n?.(u)}})});Ch.displayName="AutosizeTextarea";const Qx=({rootType:e="object",readOnly:t=!1,theme:r="light",styles:n,onChange:o,defaultValue:s})=>{const{methods:a,jsonSchema:i}=Yx({rootType:e,defaultValue:s}),{setError:c,clearErrors:l,watch:u}=a,p=u("properties"),[h,v]=J.useState(null);J.useEffect(()=>{o&&o(i)},[i,o]),J.useEffect(()=>{const O=dp(i);JSON.stringify(O)!==JSON.stringify(h)&&v(O)},[i,h]),J.useEffect(()=>{l(),h&&h.forEach(O=>{const V=O.instancePath.split("/").filter(Boolean);if(V[0]==="properties"&&V.length>=3){const z=p?.findIndex(j=>j.key===V[1])??-1;z!==-1&&c(`properties.${z}.schema.${V[2]}`,{type:"ajv",message:O.message})}else V.length>0&&c(`root.${V[0]}`,{type:"ajv",message:O.message})})},[h,p,c,l]),J.useEffect(()=>{if(!s){const O=Gr(6),V={root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:O,key:`field_${O}`,isRequired:!1,schema:{type:"number"}}]:[]};a.reset(V)}},[e,a,s]);const{fields:w,append:y,remove:m}=Wi({control:a.control,name:"properties",keyName:"fieldId"}),_=()=>{const O=Gr(6);y({id:O,key:`field_${O}`,isRequired:!1,schema:{type:"string"}})},[f,b]=J.useState({isOpen:!1,fieldPath:null}),$=O=>{b({isOpen:!0,fieldPath:O})},g={...Jn,...n,output:{...Jn.output,...n?.output},form:{...Jn.form,...n?.form},settings:{...Jn.settings,...n?.settings}},E=J.useRef(null),[k,C]=J.useState("overflow-hidden");return J.useEffect(()=>{const O=E.current?.textArea;O&&(O.scrollHeight>O.clientHeight?C("overflow-y-auto"):C("overflow-hidden"))},[i]),d.jsxs(Ih,{...a,children:[d.jsx("div",{className:ge("bg-background text-foreground flex flex-col",r,$u[g.spacing]),children:d.jsxs("div",{className:ge("bg-background text-foreground flex",r,s_[g.output.position],$u[g.spacing]),children:[d.jsxs("div",{className:ge("p-4 pr-2 flex flex-col gap-2 border border-input rounded-lg overflow-y-auto",Oa[g.form.width],wu[g.form.height]),children:[d.jsx(r_,{theme:r,readOnly:t,rootType:e,onAddField:_,onOpenSettings:$}),e==="object"&&d.jsx(a0,{theme:r,readOnly:t,fields:w,onRemove:m,onOpenSettings:$}),e==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input",children:d.jsx(Qn,{theme:r,readOnly:t,fieldPath:"root.items",onRemove:()=>{},onOpenSettings:$,isSimpleType:!1,isRootLevel:!1})})]}),h?d.jsxs("div",{className:ge("p-6 bg-background text-foreground border border-input rounded-lg overflow-y-auto overflow-x-auto",Oa[g.output.width],wu[g.output.height]),children:[d.jsx("p",{className:"text-lg",children:"JSON Schema Errors"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:`The generated JSON Schema has ${h?.length}
|
|
78
|
+
${h?.length>1?"errors.":"error."}`}),d.jsx("ul",{className:"mt-4 flex flex-col gap-2",children:h?.map((O,V)=>d.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[d.jsxs(md,{variant:"destructive",className:"font-mono",children:["root",O.instancePath]}),d.jsx("span",{children:O.message})]},V))})]}):g.output.showJson&&d.jsx(Ch,{ref:E,readOnly:!0,maxHeight:n_[g.output.height],value:JSON.stringify(i,null,2),className:ge("font-mono",Oa[g.output.width],k)})]})}),d.jsx(x$,{theme:r,readOnly:t,isOpen:f.isOpen,fieldPath:f.fieldPath,className:o_[g.settings.width],onClose:()=>b({isOpen:!1,fieldPath:null})})]})};kt.JsonSchemaEditor=Qx,Object.defineProperty(kt,Symbol.toStringTag,{value:"Module"})}));
|