@naisys/erp 3.0.0-beta.3
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.
Potentially problematic release.
This version of @naisys/erp might be problematic. Click here for more details.
- package/bin/naisys-erp +2 -0
- package/client-dist/android-chrome-192x192.png +0 -0
- package/client-dist/android-chrome-512x512.png +0 -0
- package/client-dist/apple-touch-icon.png +0 -0
- package/client-dist/assets/index-45dVo30p.css +1 -0
- package/client-dist/assets/index-Dffms7F_.js +168 -0
- package/client-dist/assets/naisys-logo-CzoPnn5I.webp +0 -0
- package/client-dist/favicon.ico +0 -0
- package/client-dist/index.html +42 -0
- package/client-dist/site.webmanifest +22 -0
- package/dist/api-reference.d.ts +10 -0
- package/dist/api-reference.js +101 -0
- package/dist/audit.d.ts +5 -0
- package/dist/audit.js +14 -0
- package/dist/auth-middleware.d.ts +18 -0
- package/dist/auth-middleware.js +203 -0
- package/dist/dbConfig.d.ts +5 -0
- package/dist/dbConfig.js +10 -0
- package/dist/erpDb.d.ts +10 -0
- package/dist/erpDb.js +34 -0
- package/dist/erpServer.d.ts +10 -0
- package/dist/erpServer.js +321 -0
- package/dist/error-handler.d.ts +7 -0
- package/dist/error-handler.js +17 -0
- package/dist/generated/prisma/client.d.ts +154 -0
- package/dist/generated/prisma/client.js +35 -0
- package/dist/generated/prisma/commonInputTypes.d.ts +637 -0
- package/dist/generated/prisma/commonInputTypes.js +11 -0
- package/dist/generated/prisma/enums.d.ts +59 -0
- package/dist/generated/prisma/enums.js +60 -0
- package/dist/generated/prisma/internal/class.d.ts +406 -0
- package/dist/generated/prisma/internal/class.js +50 -0
- package/dist/generated/prisma/internal/prismaNamespace.d.ts +2722 -0
- package/dist/generated/prisma/internal/prismaNamespace.js +366 -0
- package/dist/generated/prisma/models/Attachment.d.ts +1455 -0
- package/dist/generated/prisma/models/Attachment.js +2 -0
- package/dist/generated/prisma/models/AuditLog.d.ts +1359 -0
- package/dist/generated/prisma/models/AuditLog.js +2 -0
- package/dist/generated/prisma/models/Field.d.ts +1880 -0
- package/dist/generated/prisma/models/Field.js +2 -0
- package/dist/generated/prisma/models/FieldAttachment.d.ts +1245 -0
- package/dist/generated/prisma/models/FieldAttachment.js +2 -0
- package/dist/generated/prisma/models/FieldRecord.d.ts +1625 -0
- package/dist/generated/prisma/models/FieldRecord.js +2 -0
- package/dist/generated/prisma/models/FieldSet.d.ts +1577 -0
- package/dist/generated/prisma/models/FieldSet.js +2 -0
- package/dist/generated/prisma/models/FieldValue.d.ts +1908 -0
- package/dist/generated/prisma/models/FieldValue.js +2 -0
- package/dist/generated/prisma/models/Item.d.ts +1858 -0
- package/dist/generated/prisma/models/Item.js +2 -0
- package/dist/generated/prisma/models/ItemInstance.d.ts +1987 -0
- package/dist/generated/prisma/models/ItemInstance.js +2 -0
- package/dist/generated/prisma/models/LaborTicket.d.ts +1867 -0
- package/dist/generated/prisma/models/LaborTicket.js +2 -0
- package/dist/generated/prisma/models/Operation.d.ts +2578 -0
- package/dist/generated/prisma/models/Operation.js +2 -0
- package/dist/generated/prisma/models/OperationDependency.d.ts +1434 -0
- package/dist/generated/prisma/models/OperationDependency.js +2 -0
- package/dist/generated/prisma/models/OperationFieldRef.d.ts +1539 -0
- package/dist/generated/prisma/models/OperationFieldRef.js +2 -0
- package/dist/generated/prisma/models/OperationRun.d.ts +2563 -0
- package/dist/generated/prisma/models/OperationRun.js +2 -0
- package/dist/generated/prisma/models/OperationRunComment.d.ts +1366 -0
- package/dist/generated/prisma/models/OperationRunComment.js +2 -0
- package/dist/generated/prisma/models/Order.d.ts +1931 -0
- package/dist/generated/prisma/models/Order.js +2 -0
- package/dist/generated/prisma/models/OrderRevision.d.ts +1962 -0
- package/dist/generated/prisma/models/OrderRevision.js +2 -0
- package/dist/generated/prisma/models/OrderRun.d.ts +2310 -0
- package/dist/generated/prisma/models/OrderRun.js +2 -0
- package/dist/generated/prisma/models/SchemaVersion.d.ts +985 -0
- package/dist/generated/prisma/models/SchemaVersion.js +2 -0
- package/dist/generated/prisma/models/Session.d.ts +1213 -0
- package/dist/generated/prisma/models/Session.js +2 -0
- package/dist/generated/prisma/models/Step.d.ts +2180 -0
- package/dist/generated/prisma/models/Step.js +2 -0
- package/dist/generated/prisma/models/StepRun.d.ts +1963 -0
- package/dist/generated/prisma/models/StepRun.js +2 -0
- package/dist/generated/prisma/models/User.d.ts +11819 -0
- package/dist/generated/prisma/models/User.js +2 -0
- package/dist/generated/prisma/models/UserPermission.d.ts +1348 -0
- package/dist/generated/prisma/models/UserPermission.js +2 -0
- package/dist/generated/prisma/models/WorkCenter.d.ts +1657 -0
- package/dist/generated/prisma/models/WorkCenter.js +2 -0
- package/dist/generated/prisma/models/WorkCenterUser.d.ts +1390 -0
- package/dist/generated/prisma/models/WorkCenterUser.js +2 -0
- package/dist/generated/prisma/models.d.ts +28 -0
- package/dist/generated/prisma/models.js +2 -0
- package/dist/hateoas.d.ts +7 -0
- package/dist/hateoas.js +61 -0
- package/dist/route-helpers.d.ts +318 -0
- package/dist/route-helpers.js +220 -0
- package/dist/routes/admin.d.ts +3 -0
- package/dist/routes/admin.js +147 -0
- package/dist/routes/audit.d.ts +3 -0
- package/dist/routes/audit.js +36 -0
- package/dist/routes/auth.d.ts +3 -0
- package/dist/routes/auth.js +112 -0
- package/dist/routes/dispatch.d.ts +3 -0
- package/dist/routes/dispatch.js +174 -0
- package/dist/routes/inventory.d.ts +3 -0
- package/dist/routes/inventory.js +70 -0
- package/dist/routes/item-fields.d.ts +3 -0
- package/dist/routes/item-fields.js +220 -0
- package/dist/routes/item-instances.d.ts +3 -0
- package/dist/routes/item-instances.js +426 -0
- package/dist/routes/items.d.ts +3 -0
- package/dist/routes/items.js +252 -0
- package/dist/routes/labor-tickets.d.ts +3 -0
- package/dist/routes/labor-tickets.js +268 -0
- package/dist/routes/operation-dependencies.d.ts +3 -0
- package/dist/routes/operation-dependencies.js +170 -0
- package/dist/routes/operation-field-refs.d.ts +3 -0
- package/dist/routes/operation-field-refs.js +263 -0
- package/dist/routes/operation-run-comments.d.ts +3 -0
- package/dist/routes/operation-run-comments.js +108 -0
- package/dist/routes/operation-run-transitions.d.ts +3 -0
- package/dist/routes/operation-run-transitions.js +249 -0
- package/dist/routes/operation-runs.d.ts +112 -0
- package/dist/routes/operation-runs.js +299 -0
- package/dist/routes/operations.d.ts +3 -0
- package/dist/routes/operations.js +283 -0
- package/dist/routes/order-revision-transitions.d.ts +3 -0
- package/dist/routes/order-revision-transitions.js +86 -0
- package/dist/routes/order-revisions.d.ts +51 -0
- package/dist/routes/order-revisions.js +327 -0
- package/dist/routes/order-run-transitions.d.ts +3 -0
- package/dist/routes/order-run-transitions.js +215 -0
- package/dist/routes/order-runs.d.ts +58 -0
- package/dist/routes/order-runs.js +335 -0
- package/dist/routes/orders.d.ts +3 -0
- package/dist/routes/orders.js +262 -0
- package/dist/routes/root.d.ts +3 -0
- package/dist/routes/root.js +123 -0
- package/dist/routes/schemas.d.ts +3 -0
- package/dist/routes/schemas.js +31 -0
- package/dist/routes/step-field-attachments.d.ts +3 -0
- package/dist/routes/step-field-attachments.js +231 -0
- package/dist/routes/step-fields.d.ts +100 -0
- package/dist/routes/step-fields.js +315 -0
- package/dist/routes/step-run-fields.d.ts +3 -0
- package/dist/routes/step-run-fields.js +438 -0
- package/dist/routes/step-run-transitions.d.ts +3 -0
- package/dist/routes/step-run-transitions.js +113 -0
- package/dist/routes/step-runs.d.ts +332 -0
- package/dist/routes/step-runs.js +324 -0
- package/dist/routes/steps.d.ts +3 -0
- package/dist/routes/steps.js +283 -0
- package/dist/routes/user-permissions.d.ts +3 -0
- package/dist/routes/user-permissions.js +100 -0
- package/dist/routes/users.d.ts +57 -0
- package/dist/routes/users.js +381 -0
- package/dist/routes/work-centers.d.ts +3 -0
- package/dist/routes/work-centers.js +280 -0
- package/dist/schema-registry.d.ts +3 -0
- package/dist/schema-registry.js +45 -0
- package/dist/services/attachment-service.d.ts +33 -0
- package/dist/services/attachment-service.js +118 -0
- package/dist/services/field-ref-service.d.ts +96 -0
- package/dist/services/field-ref-service.js +74 -0
- package/dist/services/field-service.d.ts +49 -0
- package/dist/services/field-service.js +114 -0
- package/dist/services/field-value-service.d.ts +61 -0
- package/dist/services/field-value-service.js +256 -0
- package/dist/services/item-instance-service.d.ts +152 -0
- package/dist/services/item-instance-service.js +155 -0
- package/dist/services/item-service.d.ts +47 -0
- package/dist/services/item-service.js +56 -0
- package/dist/services/labor-ticket-service.d.ts +40 -0
- package/dist/services/labor-ticket-service.js +148 -0
- package/dist/services/log-file-service.d.ts +4 -0
- package/dist/services/log-file-service.js +11 -0
- package/dist/services/operation-dependency-service.d.ts +33 -0
- package/dist/services/operation-dependency-service.js +30 -0
- package/dist/services/operation-run-comment-service.d.ts +17 -0
- package/dist/services/operation-run-comment-service.js +26 -0
- package/dist/services/operation-run-service.d.ts +126 -0
- package/dist/services/operation-run-service.js +347 -0
- package/dist/services/operation-service.d.ts +47 -0
- package/dist/services/operation-service.js +132 -0
- package/dist/services/order-revision-service.d.ts +53 -0
- package/dist/services/order-revision-service.js +264 -0
- package/dist/services/order-run-service.d.ts +138 -0
- package/dist/services/order-run-service.js +356 -0
- package/dist/services/order-service.d.ts +15 -0
- package/dist/services/order-service.js +68 -0
- package/dist/services/revision-diff-service.d.ts +3 -0
- package/dist/services/revision-diff-service.js +194 -0
- package/dist/services/step-run-service.d.ts +172 -0
- package/dist/services/step-run-service.js +106 -0
- package/dist/services/step-service.d.ts +104 -0
- package/dist/services/step-service.js +89 -0
- package/dist/services/user-service.d.ts +185 -0
- package/dist/services/user-service.js +132 -0
- package/dist/services/work-center-service.d.ts +29 -0
- package/dist/services/work-center-service.js +106 -0
- package/dist/supervisorAuth.d.ts +3 -0
- package/dist/supervisorAuth.js +16 -0
- package/dist/userService.d.ts +20 -0
- package/dist/userService.js +118 -0
- package/package.json +69 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function te(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),te(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=te(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(ee(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ne(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},N={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=N,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,M)}catch(e){M(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function ne(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ne(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var re=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ae=[],oe=-1;function se(e){return{current:e}}function ce(e){0>oe||(e.current=ae[oe],ae[oe]=null,oe--)}function le(e,t){oe++,ae[oe]=e.current,e.current=t}var ue=se(null),de=se(null),fe=se(null),pe=se(null);function me(e,t){switch(le(fe,t),le(de,e),le(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$d(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$d(t),e=ef(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ce(ue),le(ue,e)}function he(){ce(ue),ce(de),ce(fe)}function ge(e){e.memoizedState!==null&&le(pe,e);var t=ue.current,n=ef(t,e.type);t!==n&&(le(de,e),le(ue,n))}function _e(e){de.current===e&&(ce(ue),ce(de)),pe.current===e&&(ce(pe),up._currentValue=ie)}var ve,ye;function be(e){if(ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||``,ye=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+ve+e+ye}var xe=!1;function Se(e,t){if(!e||xe)return``;xe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{xe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?be(n):``}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be(`Lazy`);case 13:return e.child!==t&&t!==null?be(`Suspense Fallback`):be(`Suspense`);case 19:return be(`SuspenseList`);case 0:case 15:return Se(e.type,!1);case 11:return Se(e.type.render,!1);case 1:return Se(e.type,!0);case 31:return be(`Activity`);default:return``}}function we(e){try{var t=``,n=null;do t+=Ce(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Te=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,P=t.unstable_now,Ae=t.unstable_getCurrentPriorityLevel,je=t.unstable_ImmediatePriority,Me=t.unstable_UserBlockingPriority,Ne=t.unstable_NormalPriority,Pe=t.unstable_LowPriority,Fe=t.unstable_IdlePriority,Ie=t.log,Le=t.unstable_setDisableYieldValue,Re=null,ze=null;function Be(e){if(typeof Ie==`function`&&Le(e),ze&&typeof ze.setStrictMode==`function`)try{ze.setStrictMode(Re,e)}catch{}}var Ve=Math.clz32?Math.clz32:We,He=Math.log,Ue=Math.LN2;function We(e){return e>>>=0,e===0?32:31-(He(e)/Ue|0)|0}var Ge=256,Ke=262144,qe=4194304;function Je(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ye(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Je(n))):i=Je(o):i=Je(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Je(n))):i=Je(o)):i=Je(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Xe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qe(){var e=qe;return qe<<=1,!(qe&62914560)&&(qe=4194304),e}function $e(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function et(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function F(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ve(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&tt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function tt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ve(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function nt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ve(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function rt(e,t){var n=t&-t;return n=n&42?1:it(n),(n&(e.suspendedLanes|t))===0?n:0}function it(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function at(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function I(){var e=N.p;return e===0?(e=window.event,e===void 0?32:Ep(e.type)):e}function ot(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var st=Math.random().toString(36).slice(2),ct=`__reactFiber$`+st,lt=`__reactProps$`+st,ut=`__reactContainer$`+st,dt=`__reactEvents$`+st,ft=`__reactListeners$`+st,pt=`__reactHandles$`+st,mt=`__reactResources$`+st,ht=`__reactMarker$`+st;function gt(e){delete e[ct],delete e[lt],delete e[dt],delete e[ft],delete e[pt]}function _t(e){var t=e[ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ut]||n[ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Cf(e);e!==null;){if(n=e[ct])return n;e=Cf(e)}return t}e=n,n=e.parentNode}return null}function vt(e){if(e=e[ct]||e[ut]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function bt(e){var t=e[mt];return t||=e[mt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function xt(e){e[ht]=!0}var St=new Set,Ct={};function wt(e,t){Tt(e,t),Tt(e+`Capture`,t)}function Tt(e,t){for(Ct[e]=t,e=0;e<t.length;e++)St.add(t[e])}var Et=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Dt={},Ot={};function kt(e){return Te.call(Ot,e)?!0:Te.call(Dt,e)?!1:Et.test(e)?Ot[e]=!0:(Dt[e]=!0,!1)}function At(e,t,n){if(kt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function jt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Mt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Nt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ft(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function It(e){if(!e._valueTracker){var t=Pt(e)?`checked`:`value`;e._valueTracker=Ft(e,t,``+e[t])}}function Lt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Pt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Rt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var zt=/[\n"\\]/g;function Bt(e){return e.replace(zt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Vt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Nt(t)):e.value!==``+Nt(t)&&(e.value=``+Nt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ut(e,o,Nt(n)):Ut(e,o,Nt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Nt(s):e.removeAttribute(`name`)}function Ht(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){It(e);return}n=n==null?``:``+Nt(n),t=t==null?n:``+Nt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),It(e)}function Ut(e,t,n){t===`number`&&Rt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Wt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Nt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Gt(e,t,n){if(t!=null&&(t=``+Nt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Nt(n)}function Kt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(re(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Nt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),It(e)}function qt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Yt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Jt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Xt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Yt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Yt(e,o,t[o])}function Zt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Qt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),$t=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function en(e){return $t.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function tn(){}var nn=null;function rn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var an=null,on=null;function sn(e){var t=vt(e);if(t&&(e=t.stateNode)){var n=e[lt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Vt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Bt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[lt]||null;if(!a)throw Error(i(90));Vt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Lt(r)}break a;case`textarea`:Gt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Wt(e,!!n.multiple,t,!1)}}}var cn=!1;function ln(e,t,n){if(cn)return e(t,n);cn=!0;try{return e(t)}finally{if(cn=!1,(an!==null||on!==null)&&(Au(),an&&(t=an,e=on,on=an=null,sn(t),e)))for(t=0;t<e.length;t++)sn(e[t])}}function un(e,t){var n=e.stateNode;if(n===null)return null;var r=n[lt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var dn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),fn=!1;if(dn)try{var pn={};Object.defineProperty(pn,`passive`,{get:function(){fn=!0}}),window.addEventListener(`test`,pn,pn),window.removeEventListener(`test`,pn,pn)}catch{fn=!1}var mn=null,hn=null,gn=null;function _n(){if(gn)return gn;var e,t=hn,n=t.length,r,i=`value`in mn?mn.value:mn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return gn=i.slice(e,1<r?1-r:void 0)}function vn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yn(){return!0}function bn(){return!1}function xn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?yn:bn,this.isPropagationStopped=bn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=yn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=yn)},persist:function(){},isPersistent:yn}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cn=xn(Sn),wn=m({},Sn,{view:0,detail:0}),Tn=xn(wn),En,Dn,On,kn=m({},wn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==On&&(On&&e.type===`mousemove`?(En=e.screenX-On.screenX,Dn=e.screenY-On.screenY):Dn=En=0,On=e),En)},movementY:function(e){return`movementY`in e?e.movementY:Dn}}),An=xn(kn),jn=xn(m({},kn,{dataTransfer:0})),Mn=xn(m({},wn,{relatedTarget:0})),Nn=xn(m({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0})),Pn=xn(m({},Sn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Fn=xn(m({},Sn,{data:0})),In={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Ln={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Rn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rn[e])?!!t[e]:!1}function Bn(){return zn}var Vn=xn(m({},wn,{key:function(e){if(e.key){var t=In[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=vn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Ln[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bn,charCode:function(e){return e.type===`keypress`?vn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?vn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Hn=xn(m({},kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Un=xn(m({},wn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bn})),Wn=xn(m({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Gn=xn(m({},kn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Kn=xn(m({},Sn,{newState:0,oldState:0})),qn=[9,13,27,32],Jn=dn&&`CompositionEvent`in window,Yn=null;dn&&`documentMode`in document&&(Yn=document.documentMode);var Xn=dn&&`TextEvent`in window&&!Yn,Zn=dn&&(!Jn||Yn&&8<Yn&&11>=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=_n(),gn=hn=mn=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Zn&&t.locale!==`ko`?null:t.data;default:return null}}var ar={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ar[e.type]:t===`textarea`}function sr(e,t,n,r){an?on?on.push(r):on=[r]:an=r,t=Rd(t,`onChange`),0<t.length&&(n=new Cn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var cr=null,lr=null;function ur(e){Ad(e,0)}function dr(e){if(Lt(yt(e)))return e}function fr(e,t){if(e===`change`)return t}var pr=!1;if(dn){var mr;if(dn){var hr=`oninput`in document;if(!hr){var gr=document.createElement(`div`);gr.setAttribute(`oninput`,`return;`),hr=typeof gr.oninput==`function`}mr=hr}else mr=!1;pr=mr&&(!document.documentMode||9<document.documentMode)}function _r(){cr&&(cr.detachEvent(`onpropertychange`,vr),lr=cr=null)}function vr(e){if(e.propertyName===`value`&&dr(lr)){var t=[];sr(t,lr,e,rn(e)),ln(ur,t)}}function yr(e,t,n){e===`focusin`?(_r(),cr=t,lr=n,cr.attachEvent(`onpropertychange`,vr)):e===`focusout`&&_r()}function br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return dr(lr)}function xr(e,t){if(e===`click`)return dr(t)}function Sr(e,t){if(e===`input`||e===`change`)return dr(t)}function Cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var wr=typeof Object.is==`function`?Object.is:Cr;function Tr(e,t){if(wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Te.call(t,i)||!wr(e[i],t[i]))return!1}return!0}function Er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dr(e,t){var n=Er(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=dn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Rt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Rd(Nr,`onSelect`),0<r.length&&(t=new Cn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Mr)))}function Lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Rr={animationend:Lr(`Animation`,`AnimationEnd`),animationiteration:Lr(`Animation`,`AnimationIteration`),animationstart:Lr(`Animation`,`AnimationStart`),transitionrun:Lr(`Transition`,`TransitionRun`),transitionstart:Lr(`Transition`,`TransitionStart`),transitioncancel:Lr(`Transition`,`TransitionCancel`),transitionend:Lr(`Transition`,`TransitionEnd`)},zr={},Br={};dn&&(Br=document.createElement(`div`).style,`AnimationEvent`in window||(delete Rr.animationend.animation,delete Rr.animationiteration.animation,delete Rr.animationstart.animation),`TransitionEvent`in window||delete Rr.transitionend.transition);function Vr(e){if(zr[e])return zr[e];if(!Rr[e])return e;var t=Rr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Br)return zr[e]=t[n];return e}var Hr=Vr(`animationend`),Ur=Vr(`animationiteration`),Wr=Vr(`animationstart`),Gr=Vr(`transitionrun`),Kr=Vr(`transitionstart`),qr=Vr(`transitioncancel`),Jr=Vr(`transitionend`),Yr=new Map,Xr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Xr.push(`scrollEnd`);function Zr(e,t){Yr.set(e,t),wt(t,[e])}var Qr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},$r=[],ei=0,ti=0;function ni(){for(var e=ei,t=ti=ei=0;t<e;){var n=$r[t];$r[t++]=null;var r=$r[t];$r[t++]=null;var i=$r[t];$r[t++]=null;var a=$r[t];if($r[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&L(n,i,a)}}function ri(e,t,n,r){$r[ei++]=e,$r[ei++]=t,$r[ei++]=n,$r[ei++]=r,ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ii(e,t,n,r){return ri(e,t,n,r),oi(e)}function ai(e,t){return ri(e,null,null,t),oi(e)}function L(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ve(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function oi(e){if(50<Su)throw Su=0,Cu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function ci(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(e,t,n,r){return new ci(e,t,n,r)}function ui(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var n=e.alternate;return n===null?(n=li(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function fi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function pi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ui(e)&&(s=1);else if(typeof e==`string`)s=tp(e,n,ue.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=li(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return mi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=li(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=li(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=li(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=li(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function mi(e,t,n,r){return e=li(7,e,r,t),e.lanes=n,e}function hi(e,t,n){return e=li(6,e,null,t),e.lanes=n,e}function gi(e){var t=li(18,null,null,0);return t.stateNode=e,t}function _i(e,t,n){return t=li(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vi=new WeakMap;function yi(e,t){if(typeof e==`object`&&e){var n=vi.get(e);return n===void 0?(t={value:e,source:t,stack:we(t)},vi.set(e,t),t):n}return{value:e,source:t,stack:we(t)}}var bi=[],xi=0,Si=null,Ci=0,wi=[],Ti=0,Ei=null,Di=1,Oi=``;function ki(e,t){bi[xi++]=Ci,bi[xi++]=Si,Si=e,Ci=t}function Ai(e,t,n){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Ei=e;var r=Di;e=Oi;var i=32-Ve(r)-1;r&=~(1<<i),n+=1;var a=32-Ve(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Di=1<<32-Ve(t)+i|n<<i|r,Oi=a+e}else Di=1<<a|n<<i|r,Oi=e}function ji(e){e.return!==null&&(ki(e,1),Ai(e,1,0))}function Mi(e){for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null;for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Oi=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null}function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Di=t.id,Oi=t.overflow,Ei=e}var Pi=null,Fi=null,Ii=!1,Li=null,Ri=!1,zi=Error(i(519));function Bi(e){throw Wi(yi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function R(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ct]=e,t[lt]=r,n){case`dialog`:jd(`cancel`,t),jd(`close`,t);break;case`iframe`:case`object`:case`embed`:jd(`load`,t);break;case`video`:case`audio`:for(n=0;n<Od.length;n++)jd(Od[n],t);break;case`source`:jd(`error`,t);break;case`img`:case`image`:case`link`:jd(`error`,t),jd(`load`,t);break;case`details`:jd(`toggle`,t);break;case`input`:jd(`invalid`,t),Ht(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:jd(`invalid`,t);break;case`textarea`:jd(`invalid`,t),Kt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Ud(t.textContent,n)?(r.popover!=null&&(jd(`beforetoggle`,t),jd(`toggle`,t)),r.onScroll!=null&&jd(`scroll`,t),r.onScrollEnd!=null&&jd(`scrollend`,t),r.onClick!=null&&(t.onclick=tn),t=!0):t=!1,t||Bi(e,!0)}function Vi(e){for(Pi=e.return;Pi;)switch(Pi.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:Pi=Pi.return}}function Hi(e){if(e!==Pi)return!1;if(!Ii)return Vi(e),Ii=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||tf(e.type,e.memoizedProps)),n=!n),n&&Fi&&Bi(e),Vi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=Sf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=Sf(e)}else t===27?(t=Fi,uf(e.type)?(e=xf,xf=null,Fi=e):Fi=t):Fi=Pi?bf(e.stateNode.nextSibling):null;return!0}function z(){Fi=Pi=null,Ii=!1}function Ui(){var e=Li;return e!==null&&(cu===null?cu=e:cu.push.apply(cu,e),Li=null),e}function Wi(e){Li===null?Li=[e]:Li.push(e)}var Gi=se(null),Ki=null,qi=null;function Ji(e,t,n){le(Gi,t._currentValue),t._currentValue=n}function Yi(e){e._currentValue=Gi.current,ce(Gi)}function Xi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Zi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Xi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Xi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Qi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===pe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[up]:e.push(up))}a=a.return}e!==null&&Zi(t,e,n,r),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ea(e){Ki=e,qi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ta(e){return ra(Ki,e)}function na(e,t){return Ki===null&&ea(e),ra(e,t)}function ra(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},qi===null){if(e===null)throw Error(i(308));qi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qi=qi.next=t;return n}var ia=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},aa=t.unstable_scheduleCallback,oa=t.unstable_NormalPriority,sa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ca(){return{controller:new ia,data:new Map,refCount:0}}function la(e){e.refCount--,e.refCount===0&&aa(oa,function(){e.controller.abort()})}var ua=null,da=0,fa=0,pa=null;function ma(e,t){if(ua===null){var n=ua=[];da=0,fa=Sd(),pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return da++,t.then(ha,ha),t}function ha(){if(--da===0&&ua!==null){pa!==null&&(pa.status=`fulfilled`);var e=ua;ua=null,fa=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ga(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var _a=M.S;M.S=function(e,t){du=P(),typeof t==`object`&&t&&typeof t.then==`function`&&ma(e,t),_a!==null&&_a(e,t)};var va=se(null);function ya(){var e=va.current;return e===null?Kl.pooledCache:e}function ba(e,t){t===null?le(va,va.current):le(va,t.pool)}function xa(){var e=ya();return e===null?null:{parent:sa._currentValue,pool:e}}var Sa=Error(i(460)),Ca=Error(i(474)),wa=Error(i(542)),Ta={then:function(){}};function Ea(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Da(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(tn,tn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e;default:if(typeof t.status==`string`)t.then(tn,tn);else{if(e=Kl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e}throw ka=t,Sa}}function Oa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ka=e,Sa):e}}var ka=null;function Aa(){if(ka===null)throw Error(i(459));var e=ka;return ka=null,e}function ja(e){if(e===Sa||e===wa)throw Error(i(483))}var Ma=null,Na=0;function Pa(e){var t=Na;return Na+=1,Ma===null&&(Ma=[]),Da(Ma,e,t)}function Fa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ia(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function La(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=di(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=hi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Oa(i)===t.type)?(t=a(t,n.props),Fa(t,n),t.return=e,t):(t=pi(n.type,n.key,n.props,null,e.mode,r),Fa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=_i(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=mi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=hi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=pi(t.type,t.key,t.props,null,e.mode,n),Fa(n,t),n.return=e,n;case v:return t=_i(t,e.mode,n),t.return=e,t;case O:return t=Oa(t),f(e,t,n)}if(re(t)||ee(t))return t=mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Pa(t),n);if(t.$$typeof===C)return f(e,na(e,t),n);Ia(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Oa(n),p(e,t,n,r)}if(re(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Pa(n),r);if(n.$$typeof===C)return p(e,t,na(e,n),r);Ia(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Oa(r),m(e,t,n,r,i)}if(re(r)||ee(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Pa(r),i);if(r.$$typeof===C)return m(e,t,n,na(t,r),i);Ia(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ii&&ki(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ii&&ki(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ii&&ki(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ii&&ki(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ii&&ki(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ii&&ki(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Oa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Fa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=mi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=pi(o.type,o.key,o.props,null,e.mode,c),Fa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=_i(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Oa(o),b(e,r,o,c)}if(re(o))return h(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Pa(o),c);if(o.$$typeof===C)return b(e,r,na(e,o),c);Ia(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=b(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ra=La(!0),za=La(!1),Ba=!1;function Va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ha(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Gl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),L(e,null,n),t}return ri(e,r,t,n),oi(e)}function Ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}function Ka(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var qa=!1;function Ja(){if(qa){var e=pa;if(e!==null)throw e}}function Ya(e,t,n,r){qa=!1;var i=e.updateQueue;Ba=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Jl&f)===f:(r&f)===f){f!==0&&f===fa&&(qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Ba=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),nu|=o,e.lanes=o,e.memoizedState=d}}function Xa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Xa(n[e],t)}var Qa=se(null),$a=se(0);function eo(e,t){e=eu,le($a,e),le(Qa,t),eu=e|t.baseLanes}function to(){le($a,eu),le(Qa,Qa.current)}function no(){eu=$a.current,ce(Qa),ce($a)}var ro=se(null),io=null;function ao(e){var t=e.alternate;le(uo,uo.current&1),le(ro,e),io===null&&(t===null||Qa.current!==null||t.memoizedState!==null)&&(io=e)}function oo(e){le(uo,uo.current),le(ro,e),io===null&&(io=e)}function so(e){e.tag===22?(le(uo,uo.current),le(ro,e),io===null&&(io=e)):co(e)}function co(){le(uo,uo.current),le(ro,ro.current)}function lo(e){ce(ro),io===e&&(io=null),ce(uo)}var uo=se(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||_f(n)||vf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var po=0,mo=null,ho=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return po=a,mo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Us:Ws,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){M.H=Hs;var t=ho!==null&&ho.next!==null;if(po=0,go=ho=mo=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||sc||(e=e.dependencies,e!==null&&$i(e)&&(sc=!0))}function Oo(e,t,n,r){mo=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=Gs,o=t(n,r)}while(vo);return o}function ko(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(ho===null?null:ho.memoizedState)!==e&&(mo.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}po=0,go=ho=mo=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?mo.memoizedState=go=e:go=go.next=e,go}function Po(){if(ho===null){var e=mo.alternate;e=e===null?null:e.memoizedState}else e=ho.next;var t=go===null?mo.memoizedState:go.next;if(t!==null)go=t,ho=e;else{if(e===null)throw mo.alternate===null?Error(i(467)):Error(i(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},go===null?mo.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=Da(So,e,t),t=mo,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Us:Ws),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===C)return ta(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=mo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=mo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),mo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),ho,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(po&f)===f:(Jl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===fa&&(d=!0);else if((po&p)===p){u=u.next,p===fa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,mo.lanes|=p,nu|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,mo.lanes|=f,nu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!wr(o,e.memoizedState)&&(sc=!0,d&&(n=pa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);wr(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=mo,a=Po(),o=Ii;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!wr((ho||a).memoizedState,n);if(s&&(a.memoizedState=n,sc=!0),a=a.queue,ms(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),Kl===null)throw Error(i(349));o||po&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=mo.updateQueue,t===null?(t=Fo(),mo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wr(e,n)}catch{return!0}}function Jo(e){var t=ai(e,2);t!==null&&Eu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){Be(!0);try{n()}finally{Be(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,ho,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(zs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(Ii){var n=Kl.formState;if(n!==null){a:{var r=mo;if(Ii){if(Fi){b:{for(var i=Fi,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=bf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Fi=bf(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Is.bind(null,mo,r),r.dispatch=n,r=Yo(!1),a=Rs.bind(null,mo,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,mo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),ho,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Sa?wa:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(mo.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=ho;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=mo.updateQueue,t===null&&(t=Fo(),mo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function us(){return Po().memoizedState}function ds(e,t,n,r){var i=No();mo.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function fs(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;ho!==null&&r!==null&&To(r,ho.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(mo.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function ps(e,t){ds(8390656,8,e,t)}function ms(e,t){fs(2048,8,e,t)}function hs(e){mo.flags|=4;var t=mo.updateQueue;if(t===null)t=Fo(),mo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gs(e){var t=Po().memoizedState;return hs({ref:t,nextImpl:e}),function(){if(Gl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function _s(e,t){return fs(4,2,e,t)}function vs(e,t){return fs(4,4,e,t)}function ys(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bs(e,t,n){n=n==null?null:n.concat([e]),fs(4,4,ys.bind(null,t,e),n)}function xs(){}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){Be(!0);try{e()}finally{Be(!1)}}return n.memoizedState=[r,t],r}function ws(e,t,n){return n===void 0||po&1073741824&&!(Jl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Tu(),mo.lanes|=e,nu|=e,n)}function Ts(e,t,n,r){return wr(n,t)?n:Qa.current===null?!(po&42)||po&1073741824&&!(Jl&261930)?(sc=!0,e.memoizedState=n):(e=Tu(),mo.lanes|=e,nu|=e,t):(e=ws(e,n,r),wr(e,t)||(sc=!0),e)}function Es(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,Rs(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,ga(c,r),wu(e)):Ls(e,t,r,wu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},wu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ks(e).queue;Es(e,a,t,ie,n===null?Ds:function(){return As(e),n(r)})}function ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},wu())}function js(){return ta(up)}function Ms(){return Po().memoizedState}function Ns(){return Po().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=wu();e=Ua(n);var r=Wa(t,e,n);r!==null&&(Eu(r,t,n),Ga(r,t,n)),t={cache:ca()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=wu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=ii(e,t,n,r),n!==null&&(Eu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,wu())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),Kl===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return Eu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:Sd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&Eu(t,e,2)}function zs(e){var t=e.alternate;return e===mo||t!==null&&t===mo}function Bs(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}var Hs={readContext:ta,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Hs.useEffectEvent=wo;var Us={readContext:ta,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:ta,useEffect:ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){Be(!0);try{e()}finally{Be(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){Be(!0);try{n(t)}finally{Be(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Fs.bind(null,mo,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Is.bind(null,mo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xs,useDeferredValue:function(e,t){return ws(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=Es.bind(null,mo,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=mo,a=No();if(Ii){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Kl===null)throw Error(i(349));Jl&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ps(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=Kl.identifierPrefix;if(Ii){var n=Oi,r=Di;n=(r&~(1<<32-Ve(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:js,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,mo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ps.bind(null,mo)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(Gl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:ta,use:Lo,useCallback:Ss,useContext:ta,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Bo,useRef:us,useState:function(){return Bo(zo)},useDebugValue:xs,useDeferredValue:function(e,t){return Ts(Po(),ho.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Ws.useEffectEvent=gs;var Gs={readContext:ta,use:Lo,useCallback:Ss,useContext:ta,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Ho,useRef:us,useState:function(){return Ho(zo)},useDebugValue:xs,useDeferredValue:function(e,t){var n=Po();return ho===null?ws(n,e,t):Ts(n,ho.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return ho===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Gs.useEffectEvent=gs;function Ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wu(),i=Ua(r);i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(Eu(t,e,r),Ga(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wu(),i=Ua(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(Eu(t,e,r),Ga(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wu(),r=Ua(n);r.tag=2,t!=null&&(r.callback=t),t=Wa(e,r,n),t!==null&&(Eu(t,e,n),Ga(t,e,n))}};function Js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Tr(n,r)||!Tr(i,a):!0}function Ys(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qs.enqueueReplaceState(t,t.state,null)}function Xs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Zs(e){Qr(e)}function Qs(e){console.error(e)}function $s(e){Qr(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){return n=Ua(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=Ua(e),e.tag=3,e}function ic(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(mu===null?mu=new Set([this]):mu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Qi(t,n,a,!0),n=ro.current,n!==null){switch(n.tag){case 31:case 13:return io===null?Lu():n.alternate===null&&tu===0&&(tu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),nd(e,r,a)),!1;case 22:return n.flags|=65536,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),nd(e,r,a)),!1}throw Error(i(435,n.tag))}return nd(e,r,a),Lu(),!1}if(Ii)return t=ro.current,t===null?(r!==zi&&(t=Error(i(423),{cause:r}),Wi(yi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=yi(r,n),a=nc(e.stateNode,r,a),Ka(e,a),tu!==4&&(tu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==zi&&(e=Error(i(422),{cause:r}),Wi(yi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=yi(o,n),su===null?su=[o]:su.push(o),tu!==4&&(tu=2),t===null)return!0;r=yi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=nc(n.stateNode,r,e),Ka(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(mu===null||!mu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=rc(a),ic(a,e,n,r),Ka(n,a),!1}n=n.return}while(n!==null);return!1}var oc=Error(i(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?za(t,null,n,r):Ra(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ea(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(Ii&&s&&ji(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ui(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Tr:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=di(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Tr(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return yc(e,t,n,r,i)}function fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ba(t,a===null?null:a.cachePool),a===null?to():eo(t,a),so(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ba(t,null),to(),co(t)):(ba(t,a.cachePool),eo(t,a),co(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=ya();return a=a===null?null:{parent:sa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ba(t,null),to(),so(t),e!==null&&Qi(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ra(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,lo(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ii){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(oo(t),(e=Fi)?(e=gf(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(oo(t),a)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(sc||Qi(e,t,n,!1),a=(n&e.childLanes)!==0,sc||a){if(r=Kl,r!==null&&(s=rt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ai(e,s),Eu(r,e,s),oc;Lu(),t=gc(e,t,n)}else e=o.treeContext,Fi=bf(s.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=hc(t,r),t.flags|=4096;return t}return e=di(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function yc(e,t,n,r,i){return ea(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(Ii&&r&&ji(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return ea(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!sc?(jo(e,t,a),Nc(e,t,a)):(Ii&&r&&ji(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(ea(t),t.stateNode===null){var a=si,o=n.contextType;typeof o==`object`&&o&&(a=ta(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Va(t),o=n.contextType,a.context=typeof o==`object`&&o?ta(o):si,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ks(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&qs.enqueueReplaceState(a,a.state,null),Ya(t,r,a,i),Ja(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=si,typeof u==`object`&&u&&(o=ta(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ys(t,a,r,o),Ba=!1;var f=t.memoizedState;a.state=f,Ya(t,r,a,i),Ja(),l=t.memoizedState,s||f!==l||Ba?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Ba||Js(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ha(e,t),o=t.memoizedProps,u=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=si,typeof l==`object`&&l&&(c=ta(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ys(t,a,r,c),Ba=!1,f=t.memoizedState,a.state=f,Ya(t,r,a,i),Ja();var p=t.memoizedState;o!==d||f!==p||Ba||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Ba||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&$i(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,vc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ra(t,e.child,null,i),t.child=Ra(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Sc(e,t,n,r){return z(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:xa()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=au),e}function Ec(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(uo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ii){if(a?ao(t):co(t),(e=Fi)?(e=gf(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return vf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(co(t),a=t.mode,c=Oc({mode:`hidden`,children:c},a),r=mi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(ao(t),Dc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ao(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(co(t),c=r.fallback,a=t.mode,r=Oc({mode:`visible`,children:r.children},a),c=mi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ra(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(co(t),t.child=e.child,t.flags|=128,t=null);else if(ao(t),vf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Wi({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(sc||Qi(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=Kl,s!==null&&(r=rt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ai(e,r),Eu(s,e,r),oc;_f(c)||Lu(),t=kc(e,t,n)}else _f(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Fi=bf(c.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=Dc(t,r.children),t.flags|=4096);return t}return a?(co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=di(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=mi(c,a,n,null),c.flags|=2):c=di(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(a=c.cachePool,a===null?a=xa():(l=sa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(ao(t),n=e.child,e=n.sibling,n=di(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Dc(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=li(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return Ra(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xi(e.return,t,n)}function jc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=uo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,le(uo,o),cc(e,t,r,n),r=Ii?Ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ac(e,n,t);else if(e.tag===19)Ac(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Qi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&$i(e))):!0}function Fc(e,t,n){switch(t.tag){case 3:me(t,t.stateNode.containerInfo),Ji(t,sa,e.memoizedState.cache),z();break;case 27:case 5:ge(t);break;case 4:me(t,t.stateNode.containerInfo);break;case 10:Ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ao(t),e=Nc(e,t,n),e===null?null:e.sibling):Ec(e,t,n):(ao(t),t.flags|=128,null);ao(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Qi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),le(uo,uo.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:Ji(t,sa,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!Pc(e,n)&&!(t.flags&128))return sc=!1,Fc(e,t,n);sc=!!(e.flags&131072)}else sc=!1,Ii&&t.flags&1048576&&Ai(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e==`function`)ui(e)?(r=Xs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=lc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=ne(e)||e,Error(i(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Xs(r,t.pendingProps),xc(e,t,r,a,n);case 3:a:{if(me(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ha(e,t),Ya(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ji(t,sa,r),r!==o.cache&&Zi(t,[sa],n,!0),Ja(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sc(e,t,r,n);break a}else if(r!==a){a=yi(Error(i(424)),t),Wi(a),t=Sc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Fi=bf(e.firstChild),Pi=t,Ii=!0,Li=null,Ri=!0,n=za(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(z(),r===a){t=Nc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=Vf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ii||(n=t.type,e=t.pendingProps,r=Qd(fe.current).createElement(n),r[ct]=t,r[lt]=e,Kd(r,n,e),xt(r),t.stateNode=r):t.memoizedState=Vf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&Ii&&(r=t.stateNode=wf(t.type,t.pendingProps,fe.current),Pi=t,Ri=!0,a=Fi,uf(t.type)?(xf=a,Fi=bf(r.firstChild)):Fi=a),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ii&&((a=r=Fi)&&(r=mf(r,t.type,t.pendingProps,Ri),r===null?a=!1:(t.stateNode=r,Pi=t,Fi=bf(r.firstChild),Ri=!1,a=!0)),a||Bi(t)),ge(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,tf(a,o)?r=null:s!==null&&tf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),up._currentValue=a),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&Ii&&((e=n=Fi)&&(n=hf(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,Pi=t,Fi=null,e=!0)),e||Bi(t)),null;case 13:return Ec(e,t,n);case 4:return me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ra(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ji(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ea(t),a=ta(a),r=r(a),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return ea(t),r=ta(sa),e===null?(a=ya(),a===null&&(a=Kl,o=ca(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Va(t),Ji(t,sa,a)):((e.lanes&n)!==0&&(Ha(e,t),Ya(t,null,null,n),Ja()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ji(t,sa,r),r!==a.cache&&Zi(t,[sa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ji(t,sa,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Lc(e){e.flags|=4}function Rc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Pu())e.flags|=8192;else throw ka=Ta,Ca}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!np(t))if(Pu())e.flags|=8192;else throw ka=Ta,Ca}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Qe(),e.lanes|=t,ou|=t)}function Vc(e,t){if(!Ii)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Hc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Uc(e,t,n){var r=t.pendingProps;switch(Mi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hc(t),null;case 1:return Hc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Yi(sa),he(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ui())),Hc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(Hc(t),Rc(t,a,null,r,n)):(Hc(t),zc(t,o))):o?o===e.memoizedState?(Hc(t),t.flags&=-16777217):(Lc(t),Hc(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),Hc(t),Rc(t,a,e,r,n)),null;case 27:if(_e(t),n=fe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}e=ue.current,Hi(t)?R(t,e):(e=wf(a,r,n),t.stateNode=e,Lc(t))}return Hc(t),null;case 5:if(_e(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}if(o=ue.current,Hi(t))R(t,o);else{var s=Qd(fe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ct]=t,o[lt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Kd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return Hc(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Pi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ud(e.nodeValue,n)),e||Bi(t,!0)}else e=Qd(e).createTextNode(r),e[ct]=t,t.stateNode=e}return Hc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Hi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ct]=t}else z(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),e=!1}else n=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(t),null);if(t.flags&128)throw Error(i(558))}return Hc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Hi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ct]=t}else z(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),a=!1}else a=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),Hc(t),null);case 4:return he(),e===null&&Pd(t.stateNode.containerInfo),Hc(t),null;case 10:return Yi(t.type),Hc(t),null;case 19:if(ce(uo),r=t.memoizedState,r===null)return Hc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Vc(r,!1);else{if(tu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return le(uo,uo.current&1|2),Ii&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&P()>fu&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304)}else{if(!a)if(e=fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ii)return Hc(t),null}else 2*P()-r.renderingStartTime>fu&&n!==536870912&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Hc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=P(),e.sibling=null,n=uo.current,le(uo,a?n&1|2:n&1),Ii&&ki(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Hc(t),t.subtreeFlags&6&&(t.flags|=8192)):Hc(t),n=t.updateQueue,n!==null&&Bc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ce(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yi(sa),Hc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Wc(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(sa),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(lo(t),t.alternate===null)throw Error(i(340));z()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));z()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(uo),null;case 4:return he(),null;case 10:return Yi(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&ce(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yi(sa),null;case 25:return null;default:return null}}function Gc(e,t){switch(Mi(t),t.tag){case 3:Yi(sa),he();break;case 26:case 27:case 5:_e(t);break;case 4:he();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:ce(uo);break;case 10:Yi(t.type);break;case 22:case 23:lo(t),no(),e!==null&&ce(va);break;case 24:Yi(sa)}}function Kc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){td(t,t.return,e)}}function qc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){td(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){td(t,t.return,e)}}function Jc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Za(t,n)}catch(t){td(e,e.return,t)}}}function Yc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){td(e,t,n)}}function Xc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){td(e,t,n)}}function Zc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){td(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){td(e,t,n)}else n.current=null}function Qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){td(e,e.return,t)}}function $c(e,t,n){try{var r=e.stateNode;qd(r,e.type,n,t),r[lt]=t}catch(t){td(e,e.return,t)}}function el(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&uf(e.type)||e.tag===4}function tl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||el(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&uf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=tn));else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kd(t,r,n),t[ct]=e,t[lt]=n}catch(t){td(e,e.return,t)}}var al=!1,ol=!1,sl=!1,cl=typeof WeakSet==`function`?WeakSet:Set,ll=null;function ul(e,t){if(e=e.containerInfo,Xd=yp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},yp=!1,ll=t;ll!==null;)if(t=ll,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ll=e;else for(;ll!==null;){switch(t=ll,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Xs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){td(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)pf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:pf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ll=e;break}ll=t.return}}function dl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:El(e,n),r&4&&Kc(5,n);break;case 1:if(El(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){td(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){td(n,n.return,e)}}r&64&&Jc(n),r&512&&Xc(n,n.return);break;case 3:if(El(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Za(e,t)}catch(e){td(n,n.return,e)}}break;case 27:t===null&&r&4&&il(n);case 26:case 5:El(e,n),t===null&&r&4&&Qc(n),r&512&&Xc(n,n.return);break;case 12:El(e,n);break;case 31:El(e,n),r&4&&_l(e,n);break;case 13:El(e,n),r&4&&vl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ad.bind(null,n),yf(e,n))));break;case 22:if(r=n.memoizedState!==null||al,!r){t=t!==null&&t.memoizedState!==null||ol,i=al;var a=ol;al=r,(ol=t)&&!a?Ol(e,n,(n.subtreeFlags&8772)!=0):El(e,n),al=i,ol=a}break;case 30:break;default:El(e,n)}}function fl(e){var t=e.alternate;t!==null&&(e.alternate=null,fl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&>(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pl=null,ml=!1;function hl(e,t,n){for(n=n.child;n!==null;)gl(e,t,n),n=n.sibling}function gl(e,t,n){if(ze&&typeof ze.onCommitFiberUnmount==`function`)try{ze.onCommitFiberUnmount(Re,n)}catch{}switch(n.tag){case 26:ol||Zc(n,t),hl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ol||Zc(n,t);var r=pl,i=ml;uf(n.type)&&(pl=n.stateNode,ml=!1),hl(e,t,n),Tf(n.stateNode),pl=r,ml=i;break;case 5:ol||Zc(n,t);case 6:if(r=pl,i=ml,pl=null,hl(e,t,n),pl=r,ml=i,pl!==null)if(ml)try{(pl.nodeType===9?pl.body:pl.nodeName===`HTML`?pl.ownerDocument.body:pl).removeChild(n.stateNode)}catch(e){td(n,t,e)}else try{pl.removeChild(n.stateNode)}catch(e){td(n,t,e)}break;case 18:pl!==null&&(ml?(e=pl,df(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wp(e)):df(pl,n.stateNode));break;case 4:r=pl,i=ml,pl=n.stateNode.containerInfo,ml=!0,hl(e,t,n),pl=r,ml=i;break;case 0:case 11:case 14:case 15:qc(2,n,t),ol||qc(4,n,t),hl(e,t,n);break;case 1:ol||(Zc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Yc(n,t,r)),hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:ol=(r=ol)||n.memoizedState!==null,hl(e,t,n),ol=r;break;default:hl(e,t,n)}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wp(e)}catch(e){td(t,t.return,e)}}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wp(e)}catch(e){td(t,t.return,e)}}function yl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cl),t;default:throw Error(i(435,e.tag))}}function bl(e,t){var n=yl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=od.bind(null,e,t);t.then(r,r)}})}function xl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(uf(c.type)){pl=c.stateNode,ml=!1;break a}break;case 5:pl=c.stateNode,ml=!1;break a;case 3:case 4:pl=c.stateNode.containerInfo,ml=!0;break a}c=c.return}if(pl===null)throw Error(i(160));gl(o,s,a),pl=null,ml=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cl(t,e),t=t.sibling}var Sl=null;function Cl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xl(t,e),wl(e),r&4&&(qc(3,e,e.return),Kc(3,e),qc(5,e,e.return));break;case 1:xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&64&&al&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Sl;if(xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ht]||o[ct]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Kd(o,r,n),o[ct]=e,xt(o),r=o;break a;case`link`:var s=$f(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Kd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=$f(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Kd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ct]=e,xt(o),r=o}e.stateNode=r}else ep(a,e.type,e.stateNode);else e.stateNode=Jf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&$c(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?ep(a,e.type,e.stateNode):Jf(a,r,e.memoizedProps))}break;case 27:xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),n!==null&&r&4&&$c(e,e.memoizedProps,n.memoizedProps);break;case 5:if(xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),e.flags&32){a=e.stateNode;try{qt(a,``)}catch(t){td(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,$c(e,a,n===null?a:n.memoizedProps)),r&1024&&(sl=!0);break;case 6:if(xl(t,e),wl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){td(e,e.return,t)}}break;case 3:if(Qf=null,a=Sl,Sl=Of(t.containerInfo),xl(t,e),Sl=a,wl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wp(t.containerInfo)}catch(t){td(e,e.return,t)}sl&&(sl=!1,Tl(e));break;case 4:r=Sl,Sl=Of(e.stateNode.containerInfo),xl(t,e),wl(e),Sl=r;break;case 12:xl(t,e),wl(e);break;case 31:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 13:xl(t,e),wl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(uu=P()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=al,d=ol;if(al=u||a,ol=d||l,xl(t,e),ol=d,al=u,wl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||al||ol||Dl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){td(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){td(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ff(m,!0):ff(l.stateNode,!1)}catch(e){td(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,bl(e,n))));break;case 19:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 30:break;case 21:break;default:xl(t,e),wl(e)}}function wl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(el(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;rl(e,tl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(qt(o,``),n.flags&=-33),rl(e,tl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;nl(e,tl(e),s);break;default:throw Error(i(161))}}catch(t){td(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function El(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dl(e,t.alternate,t),t=t.sibling}function Dl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qc(4,t,t.return),Dl(t);break;case 1:Zc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Yc(t,t.return,n),Dl(t);break;case 27:Tf(t.stateNode);case 26:case 5:Zc(t,t.return),Dl(t);break;case 22:t.memoizedState===null&&Dl(t);break;case 30:Dl(t);break;default:Dl(t)}e=e.sibling}}function Ol(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Ol(i,a,n),Kc(4,a);break;case 1:if(Ol(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){td(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Xa(c[i],s)}catch(e){td(r,r.return,e)}}n&&o&64&&Jc(a),Xc(a,a.return);break;case 27:il(a);case 26:case 5:Ol(i,a,n),n&&r===null&&o&4&&Qc(a),Xc(a,a.return);break;case 12:Ol(i,a,n);break;case 31:Ol(i,a,n),n&&o&4&&_l(i,a);break;case 13:Ol(i,a,n),n&&o&4&&vl(i,a);break;case 22:a.memoizedState===null&&Ol(i,a,n),Xc(a,a.return);break;case 30:break;default:Ol(i,a,n)}t=t.sibling}}function kl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&la(n))}function Al(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e))}function jl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ml(e,t,n,r),t=t.sibling}function Ml(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:jl(e,t,n,r),i&2048&&Kc(9,t);break;case 1:jl(e,t,n,r);break;case 3:jl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e)));break;case 12:if(i&2048){jl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){td(t,t.return,e)}}else jl(e,t,n,r);break;case 31:jl(e,t,n,r);break;case 13:jl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?jl(e,t,n,r):(a._visibility|=2,Nl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?jl(e,t,n,r):Pl(e,t),i&2048&&kl(o,t);break;case 24:jl(e,t,n,r),i&2048&&Al(t.alternate,t);break;default:jl(e,t,n,r)}}function Nl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Nl(a,o,s,c,i),Kc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Nl(a,o,s,c,i)):u._visibility&2?Nl(a,o,s,c,i):Pl(a,o),i&&l&2048&&kl(o.alternate,o);break;case 24:Nl(a,o,s,c,i),i&&l&2048&&Al(o.alternate,o);break;default:Nl(a,o,s,c,i)}t=t.sibling}}function Pl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Pl(n,r),i&2048&&kl(r.alternate,r);break;case 24:Pl(n,r),i&2048&&Al(r.alternate,r);break;default:Pl(n,r)}t=t.sibling}}var Fl=8192;function Il(e,t,n){if(e.subtreeFlags&Fl)for(e=e.child;e!==null;)Ll(e,t,n),e=e.sibling}function Ll(e,t,n){switch(e.tag){case 26:Il(e,t,n),e.flags&Fl&&e.memoizedState!==null&&rp(n,Sl,e.memoizedState,e.memoizedProps);break;case 5:Il(e,t,n);break;case 3:case 4:var r=Sl;Sl=Of(e.stateNode.containerInfo),Il(e,t,n),Sl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Fl,Fl=16777216,Il(e,t,n),Fl=r):Il(e,t,n));break;default:Il(e,t,n)}}function Rl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Hl(r,e)}Rl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Bl(e),e=e.sibling}function Bl(e){switch(e.tag){case 0:case 11:case 15:zl(e),e.flags&2048&&qc(9,e,e.return);break;case 3:zl(e);break;case 12:zl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vl(e)):zl(e);break;default:zl(e)}}function Vl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Hl(r,e)}Rl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qc(8,t,t.return),Vl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Vl(t));break;default:Vl(t)}e=e.sibling}}function Hl(e,t){for(;ll!==null;){var n=ll;switch(n.tag){case 0:case 11:case 15:qc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:la(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ll=r;else a:for(n=e;ll!==null;){r=ll;var i=r.sibling,a=r.return;if(fl(r),r===n){ll=null;break a}if(i!==null){i.return=a,ll=i;break a}ll=a}}}var Ul={getCacheForType:function(e){var t=ta(sa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ta(sa).controller.signal}},Wl=typeof WeakMap==`function`?WeakMap:Map,Gl=0,Kl=null,ql=null,Jl=0,Yl=0,Xl=null,Zl=!1,Ql=!1,$l=!1,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=0,su=null,cu=null,lu=!1,uu=0,du=0,fu=1/0,pu=null,mu=null,hu=0,gu=null,_u=null,vu=0,yu=0,bu=null,xu=null,Su=0,Cu=null;function wu(){return Gl&2&&Jl!==0?Jl&-Jl:M.T===null?I():Sd()}function Tu(){if(au===0)if(!(Jl&536870912)||Ii){var e=Ke;Ke<<=1,!(Ke&3932160)&&(Ke=262144),au=e}else au=536870912;return e=ro.current,e!==null&&(e.flags|=32),au}function Eu(e,t,n){(e===Kl&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)&&(Mu(e,0),ku(e,Jl,au,!1)),et(e,n),(!(Gl&2)||e!==Kl)&&(e===Kl&&(!(Gl&2)&&(ru|=n),tu===4&&ku(e,Jl,au,!1)),md(e))}function Du(e,t,n){if(Gl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Xe(e,t),a=r?Bu(e,t):Ru(e,t,!0),o=r;do{if(a===0){Ql&&!r&&ku(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Ou(n)){a=Ru(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=su;var l=c.current.memoizedState.isDehydrated;if(l&&(Mu(c,s).flags|=256),s=Ru(c,s,!1),s!==2){if($l&&!l){c.errorRecoveryDisabledLanes|=o,ru|=o,a=4;break a}o=cu,cu=a,o!==null&&(cu===null?cu=o:cu.push.apply(cu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Mu(e,0),ku(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:ku(r,t,au,!Zl);break a;case 2:cu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=uu+300-P(),10<a)){if(ku(r,t,au,!Zl),Ye(r,0,!0)!==0)break a;vu=t,r.timeoutHandle=af(B.bind(null,r,n,cu,pu,lu,t,au,ru,ou,Zl,o,`Throttled`,-0,0),a);break a}B(r,n,cu,pu,lu,t,au,ru,ou,Zl,o,null,-0,0)}}break}while(1);md(e)}function B(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tn},Ll(t,a,d);var m=(a&62914560)===a?uu-P():(a&4194048)===a?du-P():0;if(m=ap(d,m),m!==null){vu=a,e.cancelPendingCommit=m(qu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),ku(e,a,o,!l);return}}qu(e,t,a,n,r,i,o,s,c)}function Ou(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!wr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ku(e,t,n,r){t&=~iu,t&=~ru,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ve(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&tt(e,n,t)}function Au(){return Gl&6?!0:(hd(0,!1),!1)}function ju(){if(ql!==null){if(Yl===0)var e=ql.return;else e=ql,qi=Ki=null,Mo(e),Ma=null,Na=0,e=ql;for(;e!==null;)Gc(e.alternate,e),e=e.return;ql=null}}function Mu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,of(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),vu=0,ju(),Kl=e,ql=n=di(e.current,null),Jl=t,Yl=0,Xl=null,Zl=!1,Ql=Xe(e,t),$l=!1,ou=au=iu=ru=nu=tu=0,cu=su=null,lu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ve(r),a=1<<i;t|=e[i],r&=~a}return eu=t,ni(),n}function Nu(e,t){mo=null,M.H=Hs,t===Sa||t===wa?(t=Aa(),Yl=3):t===Ca?(t=Aa(),Yl=4):Yl=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Xl=t,ql===null&&(tu=1,ec(e,yi(t,e.current)))}function Pu(){var e=ro.current;return e===null?!0:(Jl&4194048)===Jl?io===null:(Jl&62914560)===Jl||Jl&536870912?e===io:!1}function Fu(){var e=M.H;return M.H=Hs,e===null?Hs:e}function Iu(){var e=M.A;return M.A=Ul,e}function Lu(){tu=4,Zl||(Jl&4194048)!==Jl&&ro.current!==null||(Ql=!0),!(nu&134217727)&&!(ru&134217727)||Kl===null||ku(Kl,Jl,au,!1)}function Ru(e,t,n){var r=Gl;Gl|=2;var i=Fu(),a=Iu();(Kl!==e||Jl!==t)&&(pu=null,Mu(e,t)),t=!1;var o=tu;a:do try{if(Yl!==0&&ql!==null){var s=ql,c=Xl;switch(Yl){case 8:ju(),o=6;break a;case 3:case 2:case 9:case 6:ro.current===null&&(t=!0);var l=Yl;if(Yl=0,Xl=null,Wu(e,s,c,l),n&&Ql){o=0;break a}break;default:l=Yl,Yl=0,Xl=null,Wu(e,s,c,l)}}zu(),o=tu;break}catch(t){Nu(e,t)}while(1);return t&&e.shellSuspendCounter++,qi=Ki=null,Gl=r,M.H=i,M.A=a,ql===null&&(Kl=null,Jl=0,ni()),o}function zu(){for(;ql!==null;)Hu(ql)}function Bu(e,t){var n=Gl;Gl|=2;var r=Fu(),a=Iu();Kl!==e||Jl!==t?(pu=null,fu=P()+500,Mu(e,t)):Ql=Xe(e,t);a:do try{if(Yl!==0&&ql!==null){t=ql;var o=Xl;b:switch(Yl){case 1:Yl=0,Xl=null,Wu(e,t,o,1);break;case 2:case 9:if(Ea(o)){Yl=0,Xl=null,Uu(t);break}t=function(){Yl!==2&&Yl!==9||Kl!==e||(Yl=7),md(e)},o.then(t,t);break a;case 3:Yl=7;break a;case 4:Yl=5;break a;case 7:Ea(o)?(Yl=0,Xl=null,Uu(t)):(Yl=0,Xl=null,Wu(e,t,o,7));break;case 5:var s=null;switch(ql.tag){case 26:s=ql.memoizedState;case 5:case 27:var c=ql;if(s?np(s):c.stateNode.complete){Yl=0,Xl=null;var l=c.sibling;if(l!==null)ql=l;else{var u=c.return;u===null?ql=null:(ql=u,Gu(u))}break b}}Yl=0,Xl=null,Wu(e,t,o,5);break;case 6:Yl=0,Xl=null,Wu(e,t,o,6);break;case 8:ju(),tu=6;break a;default:throw Error(i(462))}}Vu();break}catch(t){Nu(e,t)}while(1);return qi=Ki=null,M.H=r,M.A=a,Gl=n,ql===null?(Kl=null,Jl=0,ni(),tu):0}function Vu(){for(;ql!==null&&!Oe();)Hu(ql)}function Hu(e){var t=Ic(e.alternate,e,eu);e.memoizedProps=e.pendingProps,t===null?Gu(e):ql=t}function Uu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,Jl);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,Jl);break;case 5:Mo(t);default:Gc(n,t),t=ql=fi(t,eu),t=Ic(n,t,eu)}e.memoizedProps=e.pendingProps,t===null?Gu(e):ql=t}function Wu(e,t,n,r){qi=Ki=null,Mo(t),Ma=null,Na=0;var i=t.return;try{if(ac(e,i,t,n,Jl)){tu=1,ec(e,yi(n,e.current)),ql=null;return}}catch(t){if(i!==null)throw ql=i,t;tu=1,ec(e,yi(n,e.current)),ql=null;return}t.flags&32768?(Ii||r===1?e=!0:Ql||Jl&536870912?e=!1:(Zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ro.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ku(t,e)):Gu(t)}function Gu(e){var t=e;do{if(t.flags&32768){Ku(t,Zl);return}e=t.return;var n=Uc(t.alternate,t,eu);if(n!==null){ql=n;return}if(t=t.sibling,t!==null){ql=t;return}ql=t=e}while(t!==null);tu===0&&(tu=5)}function Ku(e,t){do{var n=Wc(e.alternate,e);if(n!==null){n.flags&=32767,ql=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ql=e;return}ql=e=n}while(e!==null);tu=6,ql=null}function qu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Qu();while(hu!==0);if(Gl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ti,F(e,n,o,s,c,l),e===Kl&&(ql=Kl=null,Jl=0),_u=t,gu=e,vu=n,yu=o,bu=a,xu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,sd(Ne,function(){return $u(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=M.T,M.T=null,a=N.p,N.p=2,s=Gl,Gl|=4;try{ul(e,t,n)}finally{Gl=s,N.p=a,M.T=r}}hu=1,Ju(),Yu(),Xu()}}function Ju(){if(hu===1){hu=0;var e=gu,t=_u,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Gl;Gl|=4;try{Cl(t,e);var a=Zd,o=kr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Or(s.ownerDocument.documentElement,s)){if(c!==null&&Ar(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}yp=!!Xd,Zd=Xd=null}finally{Gl=i,N.p=r,M.T=n}}e.current=t,hu=2}}function Yu(){if(hu===2){hu=0;var e=gu,t=_u,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Gl;Gl|=4;try{dl(e,t.alternate,t)}finally{Gl=i,N.p=r,M.T=n}}hu=3}}function Xu(){if(hu===4||hu===3){hu=0,ke();var e=gu,t=_u,n=vu,r=xu;t.subtreeFlags&10256||t.flags&10256?hu=5:(hu=0,_u=gu=null,Zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(mu=null),at(n),t=t.stateNode,ze&&typeof ze.onCommitFiberRoot==`function`)try{ze.onCommitFiberRoot(Re,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=M.T,i=N.p,N.p=2,M.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{M.T=t,N.p=i}}vu&3&&Qu(),md(e),i=e.pendingLanes,n&261930&&i&42?e===Cu?Su++:(Su=0,Cu=e):Su=0,hd(0,!1)}}function Zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,la(t)))}function Qu(){return Ju(),Yu(),Xu(),$u()}function $u(){if(hu!==5)return!1;var e=gu,t=yu;yu=0;var n=at(vu),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=bu,bu=null;var o=gu,s=vu;if(hu=0,_u=gu=null,vu=0,Gl&6)throw Error(i(331));var c=Gl;if(Gl|=4,Bl(o.current),Ml(o,o.current,s,n),Gl=c,hd(0,!1),ze&&typeof ze.onPostCommitFiberRoot==`function`)try{ze.onPostCommitFiberRoot(Re,o)}catch{}return!0}finally{N.p=a,M.T=r,Zu(e,t)}}function ed(e,t,n){t=yi(n,t),t=nc(e.stateNode,t,2),e=Wa(e,t,2),e!==null&&(et(e,2),md(e))}function td(e,t,n){if(e.tag===3)ed(e,e,n);else for(;t!==null;){if(t.tag===3){ed(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(mu===null||!mu.has(r))){e=yi(n,e),n=rc(2),r=Wa(t,n,2),r!==null&&(ic(n,r,t,e),et(r,2),md(r));break}}t=t.return}}function nd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Wl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||($l=!0,i.add(n),e=rd.bind(null,e,t,n),t.then(e,e))}function rd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Kl===e&&(Jl&n)===n&&(tu===4||tu===3&&(Jl&62914560)===Jl&&300>P()-uu?!(Gl&2)&&Mu(e,0):iu|=n,ou===Jl&&(ou=0)),md(e)}function id(e,t){t===0&&(t=Qe()),e=ai(e,t),e!==null&&(et(e,t),md(e))}function ad(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function od(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),id(e,n)}function sd(e,t){return Ee(e,t)}var cd=null,ld=null,ud=!1,dd=!1,fd=!1,pd=0;function md(e){e!==ld&&e.next===null&&(ld===null?cd=ld=e:ld=ld.next=e),dd=!0,ud||(ud=!0,xd())}function hd(e,t){if(!fd&&dd){fd=!0;do for(var n=!1,r=cd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ve(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,bd(r,a))}else a=Jl,a=Ye(r,r===Kl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Xe(r,a)||(n=!0,bd(r,a));r=r.next}while(n);fd=!1}}function gd(){_d()}function _d(){dd=ud=!1;var e=0;pd!==0&&rf()&&(e=pd);for(var t=P(),n=null,r=cd;r!==null;){var i=r.next,a=vd(r,t);a===0?(r.next=null,n===null?cd=i:n.next=i,i===null&&(ld=n)):(n=r,(e!==0||a&3)&&(dd=!0)),r=i}hu!==0&&hu!==5||hd(e,!1),pd!==0&&(pd=0)}function vd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ve(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ze(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Kl,n=Jl,n=Ye(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&De(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Xe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&De(r),at(n)){case 2:case 8:n=Me;break;case 32:n=Ne;break;case 268435456:n=Fe;break;default:n=Ne}return r=yd.bind(null,e),n=Ee(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&De(r),e.callbackPriority=2,e.callbackNode=null,2}function yd(e,t){if(hu!==0&&hu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Qu()&&e.callbackNode!==n)return null;var r=Jl;return r=Ye(e,e===Kl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Du(e,r,t),vd(e,P()),e.callbackNode!=null&&e.callbackNode===n?yd.bind(null,e):null)}function bd(e,t){if(Qu())return null;Du(e,t,!0)}function xd(){cf(function(){Gl&6?Ee(je,gd):_d()})}function Sd(){if(pd===0){var e=fa;e===0&&(e=Ge,Ge<<=1,!(Ge&261888)&&(Ge=256)),pd=e}return pd}function Cd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:en(``+e)}function wd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Td(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Cd((i[lt]||null).action),o=r.submitter;o&&(t=(t=o[lt]||null)?Cd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Cn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(pd!==0){var e=o?wd(i,o):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?wd(i,o):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Ed=0;Ed<Xr.length;Ed++){var Dd=Xr[Ed];Zr(Dd.toLowerCase(),`on`+(Dd[0].toUpperCase()+Dd.slice(1)))}Zr(Hr,`onAnimationEnd`),Zr(Ur,`onAnimationIteration`),Zr(Wr,`onAnimationStart`),Zr(`dblclick`,`onDoubleClick`),Zr(`focusin`,`onFocus`),Zr(`focusout`,`onBlur`),Zr(Gr,`onTransitionRun`),Zr(Kr,`onTransitionStart`),Zr(qr,`onTransitionCancel`),Zr(Jr,`onTransitionEnd`),Tt(`onMouseEnter`,[`mouseout`,`mouseover`]),Tt(`onMouseLeave`,[`mouseout`,`mouseover`]),Tt(`onPointerEnter`,[`pointerout`,`pointerover`]),Tt(`onPointerLeave`,[`pointerout`,`pointerover`]),wt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),wt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),wt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),wt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Od=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),kd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Od));function Ad(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}}}}function jd(e,t){var n=t[dt];n===void 0&&(n=t[dt]=new Set);var r=e+`__bubble`;n.has(r)||(Fd(t,e,2,!1),n.add(r))}function Md(e,t,n){var r=0;t&&(r|=4),Fd(n,e,r,t)}var Nd=`_reactListening`+Math.random().toString(36).slice(2);function Pd(e){if(!e[Nd]){e[Nd]=!0,St.forEach(function(t){t!==`selectionchange`&&(kd.has(t)||Md(t,!1,e),Md(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nd]||(t[Nd]=!0,Md(`selectionchange`,!1,t))}}function Fd(e,t,n,r){switch(Ep(t)){case 2:var i=bp;break;case 8:i=xp;break;default:i=Sp}n=i.bind(null,t,n,e),i=void 0,!fn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Id(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=_t(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}ln(function(){var r=a,i=rn(n),s=[];a:{var c=Yr.get(e);if(c!==void 0){var l=Cn,u=e;switch(e){case`keypress`:if(vn(n)===0)break a;case`keydown`:case`keyup`:l=Vn;break;case`focusin`:u=`focus`,l=Mn;break;case`focusout`:u=`blur`,l=Mn;break;case`beforeblur`:case`afterblur`:l=Mn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=An;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Un;break;case Hr:case Ur:case Wr:l=Nn;break;case Jr:l=Wn;break;case`scroll`:case`scrollend`:l=Tn;break;case`wheel`:l=Gn;break;case`copy`:case`cut`:case`paste`:l=Pn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Hn;break;case`toggle`:case`beforetoggle`:l=Kn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=un(m,p),g!=null&&d.push(Ld(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==nn&&(u=n.relatedTarget||n.fromElement)&&(_t(u)||u[ut]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?_t(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=An,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Hn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:yt(l),h=u==null?c:yt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,_t(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=zd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Bd(s,c,l,d,!1),u!==null&&f!==null&&Bd(s,f,u,d,!0)}}a:{if(c=r?yt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=fr;else if(or(c))if(pr)v=Sr;else{v=br;var y=yr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Zt(r.elementType)&&(v=fr):v=xr;if(v&&=v(e,r)){sr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ut(c,`number`,c.value)}switch(y=r?yt(r):window,e){case`focusin`:(or(y)||y.contentEditable===`true`)&&(Mr=y,Nr=r,Pr=null);break;case`focusout`:Pr=Nr=Mr=null;break;case`mousedown`:Fr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Fr=!1,Ir(s,n,i);break;case`selectionchange`:if(jr)break;case`keydown`:case`keyup`:Ir(s,n,i)}var b;if(Jn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else nr?er(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Zn&&n.locale!==`ko`&&(nr||x!==`onCompositionStart`?x===`onCompositionEnd`&&nr&&(b=_n()):(mn=i,hn=`value`in mn?mn.value:mn.textContent,nr=!0)),y=Rd(r,x),0<y.length&&(x=new Fn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=tr(n),b!==null&&(x.data=b)))),(b=Xn?rr(e,n):ir(e,n))&&(x=Rd(r,`onBeforeInput`),0<x.length&&(y=new Fn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Td(s,e,r,n,i)}Ad(s,t)})}function Ld(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Rd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=un(e,n),i!=null&&r.unshift(Ld(e,i,a)),i=un(e,t),i!=null&&r.push(Ld(e,i,a))),e.tag===3)return r;e=e.return}return[]}function zd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Bd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=un(n,a),l!=null&&o.unshift(Ld(n,l,c))):i||(l=un(n,a),l!=null&&o.push(Ld(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Vd=/\r\n?/g,V=/\u0000|\uFFFD/g;function Hd(e){return(typeof e==`string`?e:``+e).replace(Vd,`
|
|
9
|
+
`).replace(V,``)}function Ud(e,t){return t=Hd(t),Hd(e)===t}function Wd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&qt(e,``+r);break;case`className`:jt(e,`class`,r);break;case`tabIndex`:jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:jt(e,n,r);break;case`style`:Xt(e,r,o);break;case`data`:if(t!==`object`){jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=en(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Wd(e,t,`name`,a.name,a,null),Wd(e,t,`formEncType`,a.formEncType,a,null),Wd(e,t,`formMethod`,a.formMethod,a,null),Wd(e,t,`formTarget`,a.formTarget,a,null)):(Wd(e,t,`encType`,a.encType,a,null),Wd(e,t,`method`,a.method,a,null),Wd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=en(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=tn);break;case`onScroll`:r!=null&&jd(`scroll`,e);break;case`onScrollEnd`:r!=null&&jd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=en(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:jd(`beforetoggle`,e),jd(`toggle`,e),At(e,`popover`,r);break;case`xlinkActuate`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:At(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Qt.get(n)||n,At(e,n,r))}}function Gd(e,t,n,r,a,o){switch(n){case`style`:Xt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&qt(e,``+r);break;case`onScroll`:r!=null&&jd(`scroll`,e);break;case`onScrollEnd`:r!=null&&jd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=tn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ct.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[lt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):At(e,n,r)}}}function Kd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:jd(`error`,e),jd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Wd(e,t,o,s,n,null)}}a&&Wd(e,t,`srcSet`,n.srcSet,n,null),r&&Wd(e,t,`src`,n.src,n,null);return;case`input`:jd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Wd(e,t,r,d,n,null)}}Ht(e,o,c,l,u,s,a,!1);return;case`select`:for(a in jd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Wd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Wt(e,!!r,n,!0):Wt(e,!!r,t,!1);return;case`textarea`:for(s in jd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Wd(e,t,s,c,n,null)}Kt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Wd(e,t,l,r,n,null)}return;case`dialog`:jd(`beforetoggle`,e),jd(`toggle`,e),jd(`cancel`,e),jd(`close`,e);break;case`iframe`:case`object`:jd(`load`,e);break;case`video`:case`audio`:for(r=0;r<Od.length;r++)jd(Od[r],e);break;case`image`:jd(`error`,e),jd(`load`,e);break;case`details`:jd(`toggle`,e);break;case`embed`:case`source`:case`link`:jd(`error`,e),jd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Wd(e,t,u,r,n,null)}return;default:if(Zt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Gd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Wd(e,t,c,r,n,null))}function qd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Wd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Wd(e,t,p,m,r,f)}}Vt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Wd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Wd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Wt(e,!!n,n?[]:``,!1):Wt(e,!!n,t,!0)):Wt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Wd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Wd(e,t,s,a,r,o)}Gt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Wd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Wd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Wd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Wd(e,t,u,p,r,m)}return;default:if(Zt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Gd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Gd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Wd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Wd(e,t,f,p,r,m)}function Jd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Yd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Jd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Xd=null,Zd=null;function Qd(e){return e.nodeType===9?e:e.ownerDocument}function $d(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function ef(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function tf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nf=null;function rf(){var e=window.event;return e&&e.type===`popstate`?e===nf?!1:(nf=e,!0):(nf=null,!1)}var af=typeof setTimeout==`function`?setTimeout:void 0,of=typeof clearTimeout==`function`?clearTimeout:void 0,sf=typeof Promise==`function`?Promise:void 0,cf=typeof queueMicrotask==`function`?queueMicrotask:sf===void 0?af:function(e){return sf.resolve(null).then(e).catch(lf)};function lf(e){setTimeout(function(){throw e})}function uf(e){return e===`head`}function df(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Wp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Tf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Tf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ht]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Tf(e.ownerDocument.body);n=i}while(n);Wp(t)}function ff(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function pf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:pf(n),gt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function mf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ht])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=bf(e.nextSibling),e===null)break}return null}function hf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=bf(e.nextSibling),e===null))return null;return e}function gf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=bf(e.nextSibling),e===null))return null;return e}function _f(e){return e.data===`$?`||e.data===`$~`}function vf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function yf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function bf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var xf=null;function Sf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return bf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Cf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function wf(e,t,n){switch(t=Qd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Tf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gt(e)}var Ef=new Map,Df=new Set;function Of(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kf=N.d;N.d={f:Af,r:jf,D:Pf,C:Ff,L:If,m:Lf,X:zf,S:Rf,M:Bf};function Af(){var e=kf.f(),t=Au();return e||t}function jf(e){var t=vt(e);t!==null&&t.tag===5&&t.type===`form`?As(t):kf.r(e)}var Mf=typeof document>`u`?null:document;function Nf(e,t,n){var r=Mf;if(r&&typeof t==`string`&&t){var i=Bt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Df.has(i)||(Df.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Pf(e){kf.D(e),Nf(`dns-prefetch`,e,null)}function Ff(e,t){kf.C(e,t),Nf(`preconnect`,e,t)}function If(e,t,n){kf.L(e,t,n);var r=Mf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Bt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Bt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Bt(n.imageSizes)+`"]`)):i+=`[href="`+Bt(e)+`"]`;var a=i;switch(t){case`style`:a=Hf(e);break;case`script`:a=Kf(e)}Ef.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Ef.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Uf(a))||t===`script`&&r.querySelector(qf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Lf(e,t){kf.m(e,t);var n=Mf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Bt(r)+`"][href="`+Bt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Kf(e)}if(!Ef.has(a)&&(e=m({rel:`modulepreload`,href:e},t),Ef.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(qf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),xt(r),n.head.appendChild(r)}}}function Rf(e,t,n){kf.S(e,t,n);var r=Mf;if(r&&e){var i=bt(r).hoistableStyles,a=Hf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Uf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Ef.get(a))&&Xf(e,n);var c=o=r.createElement(`link`);xt(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Yf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function zf(e,t){kf.X(e,t);var n=Mf;if(n&&e){var r=bt(n).hoistableScripts,i=Kf(e),a=r.get(i);a||(a=n.querySelector(qf(i)),a||(e=m({src:e,async:!0},t),(t=Ef.get(i))&&Zf(e,t),a=n.createElement(`script`),xt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t){kf.M(e,t);var n=Mf;if(n&&e){var r=bt(n).hoistableScripts,i=Kf(e),a=r.get(i);a||(a=n.querySelector(qf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=Ef.get(i))&&Zf(e,t),a=n.createElement(`script`),xt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vf(e,t,n,r){var a=(a=fe.current)?Of(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Hf(n.href),n=bt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Hf(n.href);var o=bt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Uf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Ef.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ef.set(e,n),o||Gf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Kf(n),n=bt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Hf(e){return`href="`+Bt(e)+`"`}function Uf(e){return`link[rel="stylesheet"][`+e+`]`}function Wf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Gf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),xt(t),e.head.appendChild(t))}function Kf(e){return`[src="`+Bt(e)+`"]`}function qf(e){return`script[async]`+e}function Jf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Bt(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Kd(r,`style`,a),Yf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Hf(n.href);var o=e.querySelector(Uf(a));if(o)return t.state.loading|=4,t.instance=o,xt(o),o;r=Wf(n),(a=Ef.get(a))&&Xf(r,a),o=(e.ownerDocument||e).createElement(`link`),xt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,Yf(o,n.precedence,e),t.instance=o;case`script`:return o=Kf(n.src),(a=e.querySelector(qf(o)))?(t.instance=a,xt(a),a):(r=n,(a=Ef.get(o))&&(r=m({},n),Zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),xt(a),Kd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Yf(r,n.precedence,e));return t.instance}function Yf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Xf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Qf=null;function $f(e,t,n){if(Qf===null){var r=new Map,i=Qf=new Map;i.set(n,r)}else i=Qf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ht]||a[ct]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function ep(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function tp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function np(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function rp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Hf(r.href),a=t.querySelector(Uf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=op.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=Wf(r),(i=Ef.get(i))&&Xf(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=op.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ip=0;function ap(e,t){return e.stylesheets&&e.count===0&&cp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ip===0&&(ip=62500*Yd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ip?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function op(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sp=null;function cp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sp=new Map,t.forEach(lp,e),sp=null,op.call(e))}function lp(e,t){if(!(t.state.loading&4)){var n=sp.get(e);if(n)var r=n.get(null);else{n=new Map,sp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=op.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var up={$$typeof:C,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function dp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$e(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$e(0),this.hiddenUpdates=$e(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function fp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=li(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Va(a),e}function pp(e){return e?(e=si,e):si}function mp(e,t,n,r,i,a){i=pp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ua(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Wa(e,r,t),n!==null&&(Eu(n,e,t),Ga(n,e,t))}function hp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){hp(e,t),(e=e.alternate)&&hp(e,t)}function _p(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&Eu(t,e,67108864),gp(e,67108864)}}function vp(e){if(e.tag===13||e.tag===31){var t=wu();t=it(t);var n=ai(e,t);n!==null&&Eu(n,e,t),gp(e,t)}}var yp=!0;function bp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,Sp(e,t,n,r)}finally{N.p=a,M.T=i}}function xp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,Sp(e,t,n,r)}finally{N.p=a,M.T=i}}function Sp(e,t,n,r){if(yp){var i=Cp(r);if(i===null)Id(e,t,r,wp,n),Fp(e,r);else if(Lp(i,e,t,n,r))r.stopPropagation();else if(Fp(e,r),t&4&&-1<Pp.indexOf(e)){for(;i!==null;){var a=vt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Je(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ve(o);s.entanglements[1]|=c,o&=~c}md(a),!(Gl&6)&&(fu=P()+500,hd(0,!1))}}break;case 31:case 13:s=ai(a,2),s!==null&&Eu(s,a,2),Au(),gp(a,2)}if(a=Cp(r),a===null&&Id(e,t,r,wp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Id(e,t,r,null,n)}}function Cp(e){return e=rn(e),Tp(e)}var wp=null;function Tp(e){if(wp=null,e=_t(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wp=e,null}function Ep(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ae()){case je:return 2;case Me:return 8;case Ne:case Pe:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var Dp=!1,Op=null,kp=null,Ap=null,jp=new Map,Mp=new Map,Np=[],Pp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Fp(e,t){switch(e){case`focusin`:case`focusout`:Op=null;break;case`dragenter`:case`dragleave`:kp=null;break;case`mouseover`:case`mouseout`:Ap=null;break;case`pointerover`:case`pointerout`:jp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mp.delete(t.pointerId)}}function Ip(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=vt(t),t!==null&&_p(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lp(e,t,n,r,i){switch(t){case`focusin`:return Op=Ip(Op,e,t,n,r,i),!0;case`dragenter`:return kp=Ip(kp,e,t,n,r,i),!0;case`mouseover`:return Ap=Ip(Ap,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jp.set(a,Ip(jp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mp.set(a,Ip(Mp.get(a)||null,e,t,n,r,i)),!0}return!1}function Rp(e){var t=_t(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ot(e.priority,function(){vp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ot(e.priority,function(){vp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function H(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);nn=r,n.target.dispatchEvent(r),nn=null}else return t=vt(n),t!==null&&_p(t),e.blockedOn=n,!1;t.shift()}return!0}function zp(e,t,n){H(e)&&n.delete(t)}function Bp(){Dp=!1,Op!==null&&H(Op)&&(Op=null),kp!==null&&H(kp)&&(kp=null),Ap!==null&&H(Ap)&&(Ap=null),jp.forEach(zp),Mp.forEach(zp)}function Vp(e,n){e.blockedOn===n&&(e.blockedOn=null,Dp||(Dp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bp)))}var Hp=null;function Up(e){Hp!==e&&(Hp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hp===e&&(Hp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Tp(r||n)===null)continue;break}var a=vt(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wp(e){function t(t){return Vp(t,e)}Op!==null&&Vp(Op,e),kp!==null&&Vp(kp,e),Ap!==null&&Vp(Ap,e),jp.forEach(t),Mp.forEach(t);for(var n=0;n<Np.length;n++){var r=Np[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Np.length&&(n=Np[0],n.blockedOn===null);)Rp(n),n.blockedOn===null&&Np.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[lt]||null;if(typeof a==`function`)o||Up(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[lt]||null)s=o.formAction;else if(Tp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Up(n)}}}function Gp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Kp(e){this._internalRoot=e}qp.prototype.render=Kp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mp(n,wu(),e,t,null,null)},qp.prototype.unmount=Kp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mp(e.current,2,null,e,null,null),Au(),t[ut]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=I();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Np.length&&t!==0&&t<Np[n].priority;n++);Np.splice(n,0,e),n===0&&Rp(e)}};var Jp=n.version;if(Jp!==`19.2.4`)throw Error(i(527,Jp,`19.2.4`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Re=Xp.inject(Yp),ze=Xp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Zs,s=Qs,c=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fp(e,1,!1,null,null,n,r,null,o,s,c,Gp),e[ut]=t.current,Pd(e),new Kp(t)}})),_=l(o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()}))(),1),v=l(d()),y=function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},y.apply(this,arguments)};function b(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function x(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var S=`right-scroll-bar-position`,C=`width-before-scroll-bar`,w=`with-scroll-bars-hidden`,T=`--removed-body-scroll-bar-size`;function E(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function D(e,t){var n=(0,v.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var O=typeof window<`u`?v.useLayoutEffect:v.useEffect,k=new WeakMap;function A(e,t){var n=D(t||null,function(t){return e.forEach(function(e){return E(e,t)})});return O(function(){var t=k.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||E(e,null)}),i.forEach(function(e){r.has(e)||E(e,a)})}k.set(n,e)},[e]),n}function j(e){return e}function ee(e,t){t===void 0&&(t=j);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function te(e){e===void 0&&(e={});var t=ee(null);return t.options=y({async:!0,ssr:!1},e),t}var ne=function(e){var t=e.sideCar,n=b(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return v.createElement(r,y({},n))};ne.isSideCarExport=!0;function re(e,t){return e.useMedium(t),ne}var M=te(),N=function(){},ie=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:N,onWheelCapture:N,onTouchMoveCapture:N}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,x=_===void 0?`div`:_,S=e.gapMode,C=b(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),w=f,T=A([n,t]),E=y(y({},C),i);return v.createElement(v.Fragment,null,u&&v.createElement(w,{sideCar:M,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:S}),o?v.cloneElement(v.Children.only(s),y(y({},E),{ref:T})):v.createElement(x,y({},E,{className:c,ref:T}),s))});ie.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ie.classNames={fullWidth:C,zeroRight:S};var ae,oe=function(){if(ae)return ae;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function se(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=oe();return t&&e.setAttribute(`nonce`,t),e}function ce(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function le(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ue=function(){var e=0,t=null;return{add:function(n){e==0&&(t=se())&&(ce(t,n),le(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},de=function(){var e=ue();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fe=function(){var e=de();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},pe={left:0,top:0,right:0,gap:0},me=function(e){return parseInt(e||``,10)||0},he=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[me(n),me(r),me(i)]},ge=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return pe;var t=he(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},_e=fe(),ve=`data-scroll-locked`,ye=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
10
|
+
.${w} {
|
|
11
|
+
overflow: hidden ${r};
|
|
12
|
+
padding-right: ${s}px ${r};
|
|
13
|
+
}
|
|
14
|
+
body[${ve}] {
|
|
15
|
+
overflow: hidden ${r};
|
|
16
|
+
overscroll-behavior: contain;
|
|
17
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
18
|
+
padding-left: ${i}px;
|
|
19
|
+
padding-top: ${a}px;
|
|
20
|
+
padding-right: ${o}px;
|
|
21
|
+
margin-left:0;
|
|
22
|
+
margin-top:0;
|
|
23
|
+
margin-right: ${s}px ${r};
|
|
24
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.${S} {
|
|
28
|
+
right: ${s}px ${r};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.${C} {
|
|
32
|
+
margin-right: ${s}px ${r};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.${S} .${S} {
|
|
36
|
+
right: 0 ${r};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.${C} .${C} {
|
|
40
|
+
margin-right: 0 ${r};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body[${ve}] {
|
|
44
|
+
${T}: ${s}px;
|
|
45
|
+
}
|
|
46
|
+
`},be=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},xe=function(){v.useEffect(function(){return document.body.setAttribute(ve,(be()+1).toString()),function(){var e=be()-1;e<=0?document.body.removeAttribute(ve):document.body.setAttribute(ve,e.toString())}},[])},Se=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;xe();var a=v.useMemo(function(){return ge(i)},[i]);return v.createElement(_e,{styles:ye(a,!t,i,n?``:`!important`)})},Ce=!1;if(typeof window<`u`)try{var we=Object.defineProperty({},`passive`,{get:function(){return Ce=!0,!0}});window.addEventListener(`test`,we,we),window.removeEventListener(`test`,we,we)}catch{Ce=!1}var Te=Ce?{passive:!1}:!1,Ee=function(e){return e.tagName===`TEXTAREA`},De=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Ee(e)&&n[t]===`visible`)},Oe=function(e){return De(e,`overflowY`)},ke=function(e){return De(e,`overflowX`)},P=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Me(e,r)){var i=Ne(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ae=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},je=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Me=function(e,t){return e===`v`?Oe(t):ke(t)},Ne=function(e,t){return e===`v`?Ae(t):je(t)},Pe=function(e,t){return e===`h`&&t===`rtl`?-1:1},Fe=function(e,t,n,r,i){var a=Pe(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Ne(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Me(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ie=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Le=function(e){return[e.deltaX,e.deltaY]},Re=function(e){return e&&`current`in e?e.current:e},ze=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Be=function(e){return`
|
|
47
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
48
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
49
|
+
`},Ve=0,He=[];function Ue(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(Ve++)[0],a=v.useState(fe)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=x([e.lockRef.current],(e.shards||[]).map(Re),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ie(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=P(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=P(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Fe(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(!(!He.length||He[He.length-1]!==a)){var r=`deltaY`in n?Le(n):Ie(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ze(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Re).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:We(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=Ie(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,Le(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,Ie(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return He.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Te),document.addEventListener(`touchmove`,c,Te),document.addEventListener(`touchstart`,u,Te),function(){He=He.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Te),document.removeEventListener(`touchmove`,c,Te),document.removeEventListener(`touchstart`,u,Te)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:Be(i)}):null,p?v.createElement(Se,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function We(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ge=re(M,Ue),Ke=v.forwardRef(function(e,t){return v.createElement(ie,y({},e,{ref:t,sideCar:Ge}))});Ke.classNames=ie.classNames;function qe(e){return Object.keys(e)}function Je(e){return e&&typeof e==`object`&&!Array.isArray(e)}function Ye(e,t){let n={...e},r=t;return Je(e)&&Je(t)&&Object.keys(t).forEach(t=>{Je(r[t])&&t in e?n[t]=Ye(n[t],r[t]):n[t]=r[t]}),n}function Xe(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Ze(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function Qe(e){let t=Ze(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function $e(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function et(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?$e(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?$e(n):n}}return r}return n}var F=et(`rem`,{shouldScale:!0}),tt=et(`em`);function nt(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function rt(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}function it(e){return Array.isArray(e)||e===null?!1:typeof e==`object`?e.type!==v.Fragment:!1}var at=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),I=o(((e,t)=>{t.exports=at()}))();function ot(e){let t=(0,v.createContext)(null);return[({children:e,value:n})=>(0,I.jsx)(t.Provider,{value:n,children:e}),()=>{let n=(0,v.useContext)(t);if(n===null)throw Error(e);return n}]}function st(e=null){let t=(0,v.createContext)(e);return[({children:e,value:n})=>(0,I.jsx)(t.Provider,{value:n,children:e}),()=>(0,v.useContext)(t)]}function ct(e,t){return n=>{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}function lt(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function ut(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function dt(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].disabled)return e}return e}function ft(e,t,n){return lt(e,n)===lt(t,n)}function pt({parentSelector:e,siblingSelector:t,onKeyDown:n,loop:r=!0,activateOnFocus:i=!1,dir:a=`rtl`,orientation:o}){return s=>{n?.(s);let c=Array.from(lt(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>ft(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=dt(l,c,r),d=ut(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),!c[0].disabled&&c[0].focus();break;case`End`:{s.stopPropagation(),s.preventDefault();let e=c.length-1;!c[e].disabled&&c[e].focus();break}}}}var mt={app:100,modal:200,popover:300,overlay:400,max:9999};function ht(e){return mt[e]}var gt=()=>{};function _t(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||gt:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function vt(e,t=`size`,n=!0){if(e!==void 0)return rt(e)?n?F(e):e:`var(--${t}-${e})`}function yt(e){return vt(e,`mantine-spacing`)}function bt(e){return e===void 0?`var(--mantine-radius-default)`:vt(e,`mantine-radius`)}function xt(e){return vt(e,`mantine-font-size`)}function St(e){return vt(e,`mantine-line-height`,!1)}function Ct(e){if(e)return vt(e,`mantine-shadow`,!1)}function wt(e,t){return n=>{e?.(n),t?.(n)}}function Tt(e,t){return e in t?Qe(t[e]):Qe(e)}function Et(e,t){let n=e.map(e=>({value:e,px:Tt(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function Dt(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Ot(e,t,n){return n?Array.from(lt(n,t)?.querySelectorAll(e)||[]).findIndex(e=>e===n):null}function kt(e,t,n){return t===void 0&&n===void 0?e:t!==void 0&&n===void 0?Math.max(e,t):t===void 0&&n!==void 0?Math.min(e,n):Math.min(Math.max(e,t),n)}function At(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function jt(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i<r;i+=1){let r=n[i];if(!(r in t)||e[r]!==t[r]&&!(Number.isNaN(e[r])&&Number.isNaN(t[r])))return!1}return!0}function Mt(e){let t=(0,v.useRef)(e);return(0,v.useEffect)(()=>{t.current=e}),(0,v.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function Nt(e,t){let{delay:n,flushOnUnmount:r,leading:i}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1}:t,a=Mt(e),o=(0,v.useRef)(0),s=(0,v.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(o.current);let r=e._isFirstCall;e._isFirstCall=!1;function s(){window.clearTimeout(o.current),o.current=0,e._isFirstCall=!0}if(i&&r){a(...t),e.flush=()=>{o.current!==0&&(s(),a(...t))},e.cancel=()=>{s()},o.current=window.setTimeout(()=>{s()},n);return}if(i&&!r){e.flush=()=>{o.current!==0&&(s(),a(...t))},e.cancel=()=>{s()},o.current=window.setTimeout(()=>{s()},n);return}let c=()=>{o.current!==0&&(s(),a(...t))};e.flush=c,e.cancel=()=>{s()},o.current=window.setTimeout(c,n)},{flush:()=>{},cancel:()=>{},_isFirstCall:!0});return e},[a,n,i]);return(0,v.useEffect)(()=>()=>{r?s.flush():s.cancel()},[s,r]),s}var Pt=[`mousedown`,`touchstart`];function Ft(e,t,n){let r=(0,v.useRef)(null),i=t||Pt;return(0,v.useEffect)(()=>{let t=t=>{let{target:i}=t??{};if(Array.isArray(n)){let r=!document.body.contains(i)&&i?.tagName!==`HTML`;n.every(e=>!!e&&!t.composedPath().includes(e))&&!r&&e(t)}else r.current&&!r.current.contains(i)&&e(t)};return i.forEach(e=>document.addEventListener(e,t)),()=>{i.forEach(e=>document.removeEventListener(e,t))}},[r,e,n]),r}function It(e,t){try{return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function Lt(e,t){return typeof window<`u`&&`matchMedia`in window?window.matchMedia(e).matches:!1}function Rt(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,v.useState)(n?t:Lt(e));return(0,v.useEffect)(()=>{try{let t=window.matchMedia(e);return i(t.matches),It(t,e=>i(e.matches))}catch{return}},[e]),r||!1}function zt(e,t,n={leading:!1}){let[r,i]=(0,v.useState)(e),a=(0,v.useRef)(!1),o=(0,v.useRef)(null),s=(0,v.useRef)(!1),c=(0,v.useCallback)(()=>window.clearTimeout(o.current),[]);return(0,v.useEffect)(()=>{a.current&&(!s.current&&n.leading?(s.current=!0,i(e)):(c(),o.current=window.setTimeout(()=>{s.current=!1,i(e)},t)))},[e,n.leading,t]),(0,v.useEffect)(()=>(a.current=!0,c),[]),[r,c]}var Bt=typeof document<`u`?v.useLayoutEffect:v.useEffect;function Vt(e,t){let n=(0,v.useRef)(!1);(0,v.useEffect)(()=>()=>{n.current=!1},[]),(0,v.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}function Ht({opened:e,shouldReturnFocus:t=!0}){let n=(0,v.useRef)(null),r=()=>{n.current&&`focus`in n.current&&typeof n.current.focus==`function`&&n.current?.focus({preventScroll:!0})};return Vt(()=>{let i=-1,a=e=>{e.key===`Tab`&&window.clearTimeout(i)};return document.addEventListener(`keydown`,a),e?n.current=document.activeElement:t&&(i=window.setTimeout(r,10)),()=>{window.clearTimeout(i),document.removeEventListener(`keydown`,a)}},[e,t]),r}var Ut=/input|select|textarea|button|object/,Wt=`a, input, select, textarea, button, object, [tabindex]`;function Gt(e){return e.style.display===`none`}function Kt(e){if(e.getAttribute(`aria-hidden`)||e.getAttribute(`hidden`)||e.getAttribute(`type`)===`hidden`)return!1;let t=e;for(;t&&!(t===document.body||t.nodeType===11);){if(Gt(t))return!1;t=t.parentNode}return!0}function qt(e){let t=e.getAttribute(`tabindex`);return t===null&&(t=void 0),parseInt(t,10)}function Jt(e){let t=e.nodeName.toLowerCase(),n=!Number.isNaN(qt(e));return(Ut.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&Kt(e)}function Yt(e){let t=qt(e);return(Number.isNaN(t)||t>=0)&&Jt(e)}function Xt(e){return Array.from(e.querySelectorAll(Wt)).filter(Yt)}function Zt(e,t){let n=Xt(e);if(!n.length){t.preventDefault();return}let r=n[t.shiftKey?0:n.length-1],i=e.getRootNode(),a=r===i.activeElement||e===i.activeElement,o=i.activeElement;if(o.tagName===`INPUT`&&o.getAttribute(`type`)===`radio`&&(a=n.filter(e=>e.getAttribute(`type`)===`radio`&&e.getAttribute(`name`)===o.getAttribute(`name`)).includes(r)),!a)return;t.preventDefault();let s=n[t.shiftKey?n.length-1:0];s&&s.focus()}function Qt(e=!0){let t=(0,v.useRef)(null),n=e=>{let t=e.querySelector(`[data-autofocus]`);if(!t){let n=Array.from(e.querySelectorAll(Wt));t=n.find(Yt)||n.find(Jt)||null,!t&&Jt(e)&&(t=e)}t&&t.focus({preventScroll:!0})},r=(0,v.useCallback)(r=>{e&&r!==null&&t.current!==r&&(r?(setTimeout(()=>{r.getRootNode()&&n(r)}),t.current=r):t.current=null)},[e]);return(0,v.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));let r=e=>{e.key===`Tab`&&t.current&&Zt(t.current,e)};return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[e]),r}var $t=e=>(e+1)%1e6;function en(){let[,e]=(0,v.useReducer)($t,0);return e}var tn=v.default.useId||(()=>void 0);function nn(){let e=tn();return e?`mantine-${e.replace(/:/g,``)}`:``}function rn(e){let t=nn(),[n,r]=(0,v.useState)(t);return Bt(()=>{r(At())},[]),typeof e==`string`?e:typeof window>`u`?t:n}function an(e,t,n){(0,v.useEffect)(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}function on(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function sn(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=on(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():on(e,null)}),t.clear()}}}function cn(...e){return(0,v.useCallback)(sn(...e),e)}function ln({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,v.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function un(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var dn=`dots`;function fn({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:i=1,onChange:a}){let o=Math.max(Math.trunc(e),0),[s,c]=ln({value:r,onChange:a,defaultValue:i,finalValue:i}),l=e=>{c(e<=0?1:e>o?o:e)};return{range:(0,v.useMemo)(()=>{if(t*2+3+n*2>=o)return un(1,o);let e=Math.max(s-t,n),r=Math.min(s+t,o-n),i=e>n+2,a=r<o-(n+1);if(!i&&a)return[...un(1,t*2+n+2),dn,...un(o-(n-1),o)];if(i&&!a){let e=n+1+2*t;return[...un(1,n),dn,...un(o-e,o)]}return[...un(1,n),dn,...un(e,r),dn,...un(o-n+1,o)]},[o,t,s]),active:s,setPage:l,next:()=>l(s+1),previous:()=>l(s-1),first:()=>l(1),last:()=>l(o)}}function pn(e,t){return Rt(`(prefers-reduced-motion: reduce)`,e,t)}function mn(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!jt(e[n],t[n]))return!1;return!0}function hn(e){let t=(0,v.useRef)([]),n=(0,v.useRef)(0);return mn(t.current,e)||(t.current=e,n.current+=1),[n.current]}function gn(e,t){(0,v.useEffect)(e,hn(t))}function _n(e=!1,t={}){let[n,r]=(0,v.useState)(e),i=(0,v.useCallback)(()=>{r(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),a=(0,v.useCallback)(()=>{r(e=>e&&(t.onClose?.(),!1))},[t.onClose]);return[n,{open:i,close:a,toggle:(0,v.useCallback)(()=>{n?a():i()},[a,i,n])}]}function vn(e,t,n={autoInvoke:!1}){let r=(0,v.useRef)(null),i=(0,v.useCallback)((...n)=>{r.current||=window.setTimeout(()=>{e(n),r.current=null},t)},[t]),a=(0,v.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,v.useEffect)(()=>(n.autoInvoke&&i(),a),[a,i]),{start:i,clear:a}}function yn(e){let t=(0,v.useRef)(void 0);return(0,v.useEffect)(()=>{t.current=e},[e]),t.current}function bn(e,t,n){let r=(0,v.useRef)(null),i=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let a=typeof n==`function`?n():n;return(a||i.current)&&(r.current=new MutationObserver(e),r.current.observe(a||i.current,t)),()=>{r.current?.disconnect()}},[e,t]),i}function xn(){let[e,t]=(0,v.useState)(!1);return(0,v.useEffect)(()=>t(!0),[]),e}function Sn(){return typeof process<`u`?`production`:`development`}function Cn(e){return e?.props?.ref}function wn(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=wn(e,n.shadowRoot);if(t)return t}}return null}function Tn(e,t=document){let n=[],r=t.querySelectorAll(e);n.push(...Array.from(r));let i=t.querySelectorAll(`*`);for(let t=0;t<i.length;t+=1){let r=i[t];if(r.shadowRoot){let t=Tn(e,r.shadowRoot);n.push(...t)}}return n}function En(e){if(!e)return document;let t=e.getRootNode();return t instanceof ShadowRoot||t instanceof Document?t:document}function Dn(e){let t=v.Children.toArray(e);return t.length!==1||!it(t[0])?null:t[0]}function On(e){return e}function kn(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=kn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function An(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=kn(e))&&(r&&(r+=` `),r+=t);return r}var jn={};function Mn(e){let t={};return e.forEach(e=>{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=An(t[e],n):t[e]=n})}),t}function Nn({theme:e,classNames:t,props:n,stylesCtx:r}){return Mn((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||jn))}function Pn({theme:e,styles:t,props:n,stylesCtx:r}){return(Array.isArray(t)?t:[t]).reduce((t,i)=>typeof i==`function`?{...t,...i(e,n,r)}:{...t,...i},{})}var Fn=(0,v.createContext)(null);function In(){let e=(0,v.useContext)(Fn);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function Ln(){return In().cssVariablesResolver}function Rn(){return In().classNamesPrefix}function zn(){return In().getStyleNonce}function Bn(){return In().withStaticClasses}function Vn(){return In().headless}function Hn(){return In().stylesTransform?.sx}function Un(){return In().stylesTransform?.styles}function Wn(){return In().env||`default`}function Gn(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function Kn(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function qn(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function Jn(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function Yn(e){return Gn(e)?Kn(e):e.startsWith(`rgb`)?qn(e):e.startsWith(`hsl`)?Jn(e):{r:0,g:0,b:0,a:1}}function Xn(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=Yn(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function Zn(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function Qn(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function $n(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function er(e){if(e.startsWith(`oklch(`))return($n(e)||0)/100;let{r:t,g:n,b:r}=Yn(e),i=t/255,a=n/255,o=r/255,s=Qn(i),c=Qn(a),l=Qn(o);return .2126*s+.7152*c+.0722*l}function tr(e,t=.179){return e.startsWith(`var(`)?!1:er(e)>t}function nr({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:tr(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:tr(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:tr(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][Zn(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:tr(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:tr(e,t.luminanceThreshold),shade:a,variable:void 0}}function rr(e,t){let n=nr({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function ir(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=rr(n.from,t),i=rr(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function ar(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=Yn(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var or=ar,sr=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=nr({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let t=o&&a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:t,border:`${F(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:t,border:`${F(1)} solid transparent`}:{background:e,hover:Xn(e,.1),color:t,border:`${F(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${F(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:ar(n,.1),hover:ar(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${F(1)} solid transparent`}}return{background:ar(e,.1),hover:ar(e,.12),color:e,border:`${F(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${F(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:ar(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${F(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:ar(e,.05),color:e,border:`${F(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${F(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:ar(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${F(1)} solid transparent`}}return{background:`transparent`,hover:ar(e,.12),color:e,border:`${F(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${F(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${F(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${F(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:Xn(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${F(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Xn(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${F(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Xn(t.white,.01),color:e,border:`${F(1)} solid transparent`}:n===`gradient`?{background:ir(r,t),hover:ir(r,t),color:`var(--mantine-color-white)`,border:`none`}:n===`default`?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${F(1)} solid var(--mantine-color-default-border)`}:{}},cr={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},lr=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,ur={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:cr,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:sr,autoContrast:!1,luminanceThreshold:.3,fontFamily:lr,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`sm`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:lr,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:F(34),lineHeight:`1.3`},h2:{fontSize:F(26),lineHeight:`1.35`},h3:{fontSize:F(22),lineHeight:`1.4`},h4:{fontSize:F(18),lineHeight:`1.45`},h5:{fontSize:F(16),lineHeight:`1.5`},h6:{fontSize:F(14),lineHeight:`1.5`}}},fontSizes:{xs:F(12),sm:F(14),md:F(16),lg:F(18),xl:F(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},radius:{xs:F(2),sm:F(4),md:F(8),lg:F(16),xl:F(32)},spacing:{xs:F(10),sm:F(12),md:F(16),lg:F(20),xl:F(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${F(1)} ${F(3)} rgba(0, 0, 0, 0.05), 0 ${F(1)} ${F(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${F(1)} ${F(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${F(10)} ${F(15)} ${F(-5)}, rgba(0, 0, 0, 0.04) 0 ${F(7)} ${F(7)} ${F(-5)}`,md:`0 ${F(1)} ${F(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${F(20)} ${F(25)} ${F(-5)}, rgba(0, 0, 0, 0.04) 0 ${F(10)} ${F(10)} ${F(-5)}`,lg:`0 ${F(1)} ${F(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${F(28)} ${F(23)} ${F(-7)}, rgba(0, 0, 0, 0.04) 0 ${F(12)} ${F(12)} ${F(-7)}`,xl:`0 ${F(1)} ${F(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${F(36)} ${F(28)} ${F(-7)}, rgba(0, 0, 0, 0.04) 0 ${F(17)} ${F(17)} ${F(-7)}`},other:{},components:{}};function dr(e){return e===`auto`||e===`dark`||e===`light`}function fr({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return dr(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&dr(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}var pr=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,mr=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function hr(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function gr(e){if(!(e.primaryColor in e.colors))throw Error(pr);if(typeof e.primaryShade==`object`&&(!hr(e.primaryShade.dark)||!hr(e.primaryShade.light))||typeof e.primaryShade==`number`&&!hr(e.primaryShade))throw Error(mr)}function _r(e,t){if(!t)return gr(e),e;let n=Ye(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings.fontFamily=t.fontFamily),gr(n),n}var vr=(0,v.createContext)(null),yr=()=>(0,v.useContext)(vr)||ur;function br(){let e=(0,v.useContext)(vr);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function xr({theme:e,children:t,inherit:n=!0}){let r=yr(),i=(0,v.useMemo)(()=>_r(n?r:ur,e),[e,r,n]);return(0,I.jsx)(vr.Provider,{value:i,children:t})}xr.displayName=`@mantine/core/MantineThemeProvider`;function Sr(){let e=br(),t=zn(),n=qe(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=Qe(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:tt(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:tt(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,I.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function Cr(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function wr(e,t){let n=t?[t]:[`:root`,`:host`],r=Cr(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=Cr(e.dark),o=Cr(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}
|
|
50
|
+
|
|
51
|
+
${a?`${s(`dark`)}{${a}}`:``}
|
|
52
|
+
|
|
53
|
+
${o?`${s(`light`)}{${o}}`:``}`}function Tr({color:e,theme:t,autoContrast:n}){return(typeof n==`boolean`?n:t.autoContrast)&&nr({color:e||t.primaryColor,theme:t}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Er(e,t){return Tr({color:e.colors[e.primaryColor][Zn(e,t)],theme:e,autoContrast:null})}function Dr({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=Zn(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:or(e.colors[t][n],.1),[`--mantine-color-${r}-light-hover`]:or(e.colors[t][n],.12),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:or(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=Zn(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:or(e.colors[t][Math.max(0,a-2)],.15),[`--mantine-color-${r}-light-hover`]:or(e.colors[t][Math.max(0,a-2)],.2),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${Math.max(a-5,0)})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:or(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function Or(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function kr(e,t,n){qe(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var Ar=e=>{let t=Zn(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:F(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":Er(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":Er(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};kr(r.variables,e.breakpoints,`breakpoint`),kr(r.variables,e.spacing,`spacing`),kr(r.variables,e.fontSizes,`font-size`),kr(r.variables,e.lineHeights,`line-height`),kr(r.variables,e.shadows,`shadow`),kr(r.variables,e.radius,`radius`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),qe(e.colors).forEach(t=>{let n=e.colors[t];if(Or(n)){Object.assign(r.light,Dr({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,Dr({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0}));return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,Dr({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,Dr({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return qe(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function jr({theme:e,generator:t}){let n=Ar(e),r=t?.(e);return r?Ye(n,r):n}var Mr=Ar(ur);function Nr(e){let t={variables:{},light:{},dark:{}};return qe(e.variables).forEach(n=>{Mr.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),qe(e.light).forEach(n=>{Mr.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),qe(e.dark).forEach(n=>{Mr.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function Pr(e){return wr({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function Fr({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=br(),r=zn(),i=jr({theme:n,generator:Ln()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=wr(a?Nr(i):i,e);return o?(0,I.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:Pr(e)}`}}):null}Fr.displayName=`@mantine/CssVariables`;function Ir(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function Lr({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,v.useRef)(null),[a,o]=(0,v.useState)(()=>e.get(t)),s=r||a,c=(0,v.useCallback)(t=>{r||(Ir(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,v.useCallback)(()=>{o(t),Ir(t,n),e.clear()},[e.clear,t]);return(0,v.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),Bt(()=>{Ir(e.get(t),n)},[]),(0,v.useEffect)(()=>{if(r)return Ir(r,n),()=>{};r===void 0&&Ir(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&Ir(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}function Rr({respectReducedMotion:e,getRootElement:t}){Bt(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function zr({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=fr(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h}){let{colorScheme:g,setColorScheme:_,clearColorScheme:v}=Lr({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return Rr({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,I.jsx)(Fn.Provider,{value:{colorScheme:g,setColorScheme:_,clearColorScheme:v,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h},children:(0,I.jsxs)(xr,{theme:e,children:[o&&(0,I.jsx)(Fr,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,I.jsx)(Sr,{}),t]})})}zr.displayName=`@mantine/core/MantineProvider`;function Br({children:e,theme:t,env:n}){return(0,I.jsx)(Fn.Provider,{value:{colorScheme:`auto`,setColorScheme:()=>{},clearColorScheme:()=>{},getRootElement:()=>document.documentElement,classNamesPrefix:`mantine`,cssVariablesSelector:`:root`,withStaticClasses:!1,headless:!0,env:n},children:(0,I.jsx)(xr,{theme:t,children:e})})}Br.displayName=`@mantine/core/HeadlessMantineProvider`;function Vr({classNames:e,styles:t,props:n,stylesCtx:r}){let i=br();return{resolvedClassNames:Nn({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:Pn({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var Hr={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function Ur({theme:e,options:t,unstyled:n}){return An(t?.focusable&&!n&&(e.focusClassName||Hr[e.focusRing]),t?.active&&!n&&e.activeClassName)}function Wr({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return Nn({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function Gr({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return Nn({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function Kr({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function qr({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function Jr({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function Yr({themeName:e,theme:t,selector:n,props:r,stylesCtx:i}){return e.map(e=>Nn({theme:t,classNames:t.components[e]?.classNames,props:r,stylesCtx:i})?.[n])}function Xr({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function Zr({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,classNames:a,classes:o,unstyled:s,className:c,rootSelector:l,props:u,stylesCtx:d,withStaticClasses:f,headless:p,transformedStyles:m}){return An(Ur({theme:e,options:t,unstyled:s||p}),Yr({theme:e,themeName:n,selector:r,props:u,stylesCtx:d}),Xr({options:t,classes:o,selector:r,unstyled:s}),Gr({selector:r,stylesCtx:d,theme:e,classNames:a,props:u}),Gr({selector:r,stylesCtx:d,theme:e,classNames:m,props:u}),Wr({selector:r,stylesCtx:d,options:t,props:u,theme:e}),Kr({rootSelector:l,selector:r,className:c}),qr({selector:r,classes:o,unstyled:s||p}),f&&!p&&Jr({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function Qr({theme:e,themeName:t,props:n,stylesCtx:r,selector:i}){return t.map(t=>Pn({theme:e,styles:e.components[t]?.styles,props:n,stylesCtx:r})[i]).reduce((e,t)=>({...e,...t}),{})}function $r({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...$r({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function ei(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...nt(t[n])}}),e),{})}function ti({vars:e,varsResolver:t,theme:n,props:r,stylesCtx:i,selector:a,themeName:o,headless:s}){return ei([s?{}:t?.(n,r,i),...o.map(e=>n.components?.[e]?.vars?.(n,r,i)),e?.(n,r,i)])?.[a]}function ni({theme:e,themeName:t,selector:n,options:r,props:i,stylesCtx:a,rootSelector:o,styles:s,style:c,vars:l,varsResolver:u,headless:d,withStylesTransform:f}){return{...!f&&Qr({theme:e,themeName:t,props:i,stylesCtx:a,selector:n}),...!f&&Pn({theme:e,styles:s,props:i,stylesCtx:a})[n],...!f&&Pn({theme:e,styles:r?.styles,props:r?.props||i,stylesCtx:a})[n],...ti({theme:e,props:i,stylesCtx:a,vars:l,varsResolver:u,selector:n,themeName:t,headless:d}),...o===n?$r({style:c,theme:e}):null,...$r({style:r?.style,theme:e})}}function ri({props:e,stylesCtx:t,themeName:n}){let r=br(),i=Un()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function ii({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=br(),m=Rn(),h=Bn(),g=Vn(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=ri({props:n,stylesCtx:r,themeName:_});return(e,b)=>({className:Zr({theme:p,options:b,themeName:_,selector:e,classNamesPrefix:m,classNames:c,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([b?.styles,l])}),style:ni({theme:p,themeName:_,selector:e,options:b,props:n,stylesCtx:r,rootSelector:o,styles:l,style:a,vars:u,varsResolver:d,headless:g,withStylesTransform:v}),...f?.[e]})}function ai(e,t){return typeof e==`boolean`?e:t.autoContrast}function L(e,t,n){let r=br(),i=r.components[e]?.defaultProps,a=typeof i==`function`?i(r):i;return{...t,...a,...nt(n)}}function oi(e){return qe(e).reduce((t,n)=>e[n]===void 0?t:`${t}${Xe(n)}:${e[n]};`,``).trim()}function si({selector:e,styles:t,media:n,container:r}){let i=t?oi(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${oi(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${oi(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function ci(e){let t=zn();return(0,I.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:t?.(),dangerouslySetInnerHTML:{__html:si(e)}})}function li(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,p:u,px:d,py:f,pt:p,pb:m,pl:h,pr:g,pe:_,ps:v,bd:y,bdrs:b,bg:x,c:S,opacity:C,ff:w,fz:T,fw:E,lts:D,ta:O,lh:k,fs:A,tt:j,td:ee,w:te,miw:ne,maw:re,h:M,mih:N,mah:ie,bgsz:ae,bgp:oe,bgr:se,bga:ce,pos:le,top:ue,left:de,bottom:fe,right:pe,inset:me,display:he,flex:ge,hiddenFrom:_e,visibleFrom:ve,lightHidden:ye,darkHidden:be,sx:xe,...Se}=e;return{styleProps:nt({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,p:u,px:d,py:f,pt:p,pb:m,pl:h,pr:g,pe:_,ps:v,bd:y,bg:x,c:S,opacity:C,ff:w,fz:T,fw:E,lts:D,ta:O,lh:k,fs:A,tt:j,td:ee,w:te,miw:ne,maw:re,h:M,mih:N,mah:ie,bgsz:ae,bgp:oe,bgr:se,bga:ce,pos:le,top:ue,left:de,bottom:fe,right:pe,inset:me,display:he,flex:ge,bdrs:b,hiddenFrom:_e,visibleFrom:ve,lightHidden:ye,darkHidden:be,sx:xe}),rest:Se}}var ui={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function di(e,t){let n=nr({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function fi(e,t){let n=nr({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:di(e,t)}function pi(e,t){if(typeof e==`number`)return F(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${F(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${di(i.join(` `),t)}`),a.trim()}return e}var mi={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function hi(e){return typeof e==`string`&&e in mi?mi[e]:e}var gi=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function _i(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&gi.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?F(e):e}function vi(e){return e}var yi=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function bi(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&yi.includes(e)?`var(--mantine-${e}-line-height)`:e}function xi(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?F(e):e}function Si(e){return typeof e==`number`?F(e):e}function Ci(e,t){if(typeof e==`number`)return F(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return F(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var wi={color:di,textColor:fi,fontSize:_i,spacing:Ci,radius:xi,identity:vi,size:Si,lineHeight:bi,fontFamily:hi,border:pi};function Ti(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function Ei({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(Ti(e))-Number(Ti(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function Di(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return!(t.length===1&&t[0]===`base`)}function Oi(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function ki(e){return typeof e==`object`&&e?qe(e).filter(e=>e!==`base`):[]}function Ai(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function ji({styleProps:e,data:t,theme:n}){return Ei(qe(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=Oi(e[i]);if(!Di(e[i]))return o.forEach(e=>{r.inlineStyles[e]=wi[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=ki(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=wi[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:wi[a.type](Ai(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Mi(){return`__m__-${(0,v.useId)().replace(/[:«»]/g,``)}`}function Ni(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Ni(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Pi(e){return e}function Fi(e){return e.startsWith(`data-`)?e:`data-${e}`}function Ii(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[Fi(n)]=e[n]),t},{})}function Li(e){return e?typeof e==`string`?{[Fi(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...Li(t)}),{}):Ii(e):null}function Ri(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Ri(n,t)}),{}):typeof e==`function`?e(t):e??{}}function zi({theme:e,style:t,vars:n,styleProps:r}){let i=Ri(t,e),a=Ri(n,e);return{...i,...a,...r}}var Bi=(0,v.forwardRef)(({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,...p},m)=>{let h=br(),g=e||`div`,{styleProps:_,rest:v}=li(p),y=Hn()?.()?.(_.sx),b=Mi(),x=ji({styleProps:_,theme:h,data:ui}),S={ref:m,style:zi({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:An(r,y,{[b]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":rt(o)?void 0:o||void 0,size:f,...Li(a),...v};return(0,I.jsxs)(I.Fragment,{children:[x.hasResponsiveStyles&&(0,I.jsx)(ci,{selector:`.${b}`,styles:x.styles,media:x.media}),typeof d==`function`?d(S):(0,I.jsx)(g,{...S})]})});Bi.displayName=`@mantine/core/Box`;var R=Pi(Bi);function Vi(e){return e}function Hi(e){let t=e;return e=>{let n=(0,v.forwardRef)((n,r)=>(0,I.jsx)(t,{...e,...n,ref:r}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n}}function z(e){let t=(0,v.forwardRef)(e);return t.extend=Vi,t.withProps=e=>{let n=(0,v.forwardRef)((n,r)=>(0,I.jsx)(t,{...e,...n,ref:r}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function Ui(e){let t=(0,v.forwardRef)(e);return t.withProps=e=>{let n=(0,v.forwardRef)((n,r)=>(0,I.jsx)(t,{...e,...n,ref:r}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Vi,t}var Wi=(0,v.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function Gi(){return(0,v.useContext)(Wi)}var Ki=l(h(),1);function qi(e){if(!e||typeof e==`string`)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Ji(e){return e?.current?e.current.scrollHeight:`auto`}var Yi=typeof window<`u`&&window.requestAnimationFrame,Xi=0,Zi=e=>({height:0,overflow:`hidden`,...e?{}:{display:`none`}});function Qi({transitionDuration:e,transitionTimingFunction:t=`ease`,onTransitionEnd:n=()=>{},opened:r,keepMounted:i=!1}){let a=(0,v.useRef)(null),o=Zi(i),[s,c]=(0,v.useState)(r?{}:o),l=e=>{(0,Ki.flushSync)(()=>c(e))},u=e=>{l(t=>({...t,...e}))};function d(n){let r=e||qi(n);return{transition:`height ${r}ms ${t}, opacity ${r}ms ${t}`}}Vt(()=>{typeof Yi==`function`&&Yi(r?()=>{u({willChange:`height`,display:`block`,overflow:`hidden`}),Yi(()=>{let e=Ji(a);u({...d(e),height:e})})}:()=>{let e=Ji(a);u({...d(e),willChange:`height`,height:e}),Yi(()=>u({height:Xi,overflow:`hidden`}))})},[r]);let f=e=>{if(!(e.target!==a.current||e.propertyName!==`height`))if(r){let e=Ji(a);e===s.height?l({}):u({height:e}),n()}else s.height===Xi&&(l(o),n())};function p({style:e={},refKey:t=`ref`,...n}={}){let i=n[t],o={"aria-hidden":!r,...n,[t]:sn(a,i),onTransitionEnd:f,style:{boxSizing:`border-box`,...e,...s}};return o.inert=!r,o}return p}var $i={transitionDuration:200,transitionTimingFunction:`ease`,animateOpacity:!0},ea=z((e,t)=>{let{children:n,in:r,transitionDuration:i,transitionTimingFunction:a,style:o,onTransitionEnd:s,animateOpacity:c,keepMounted:l,...u}=L(`Collapse`,$i,e),d=br(),f=pn(),p=d.respectReducedMotion&&f?0:i,m=Qi({opened:r,transitionDuration:p,transitionTimingFunction:a,onTransitionEnd:s,keepMounted:l});return p===0?r?(0,I.jsx)(R,{...u,children:n}):null:(0,I.jsx)(R,{...m({style:{opacity:r||!c?1:0,transition:c?`opacity ${p}ms ${a}`:`none`,...Ni(o,d)},ref:t,...u}),children:n})});ea.displayName=`@mantine/core/Collapse`;function ta(){return typeof window<`u`}function na(e){return aa(e)?(e.nodeName||``).toLowerCase():`#document`}function ra(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ia(e){return((aa(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function aa(e){return ta()?e instanceof Node||e instanceof ra(e).Node:!1}function oa(e){return ta()?e instanceof Element||e instanceof ra(e).Element:!1}function sa(e){return ta()?e instanceof HTMLElement||e instanceof ra(e).HTMLElement:!1}function ca(e){return!ta()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ra(e).ShadowRoot}function la(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ba(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ua(e){return/^(table|td|th)$/.test(na(e))}function da(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var fa=/transform|translate|scale|rotate|perspective|filter/,pa=/paint|layout|strict|content/,ma=e=>!!e&&e!==`none`,ha;function ga(e){let t=oa(e)?ba(e):e;return ma(t.transform)||ma(t.translate)||ma(t.scale)||ma(t.rotate)||ma(t.perspective)||!va()&&(ma(t.backdropFilter)||ma(t.filter))||fa.test(t.willChange||``)||pa.test(t.contain||``)}function _a(e){let t=Sa(e);for(;sa(t)&&!ya(t);){if(ga(t))return t;if(da(t))return null;t=Sa(t)}return null}function va(){return ha??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ha}function ya(e){return/^(html|body|#document)$/.test(na(e))}function ba(e){return ra(e).getComputedStyle(e)}function xa(e){return oa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sa(e){if(na(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ca(e)&&e.host||ia(e);return ca(t)?t.host:t}function Ca(e){let t=Sa(e);return ya(t)?e.ownerDocument?e.ownerDocument.body:e.body:sa(t)&&la(t)?t:Ca(t)}function wa(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ca(e),i=r===e.ownerDocument?.body,a=ra(r);if(i){let e=Ta(a);return t.concat(a,a.visualViewport||[],la(r)?r:[],e&&n?wa(e):[])}else return t.concat(r,wa(r,[],n))}function Ta(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Ea=[`top`,`right`,`bottom`,`left`],Da=Math.min,Oa=Math.max,ka=Math.round,Aa=Math.floor,ja=e=>({x:e,y:e}),Ma={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Na(e,t,n){return Oa(e,Da(t,n))}function Pa(e,t){return typeof e==`function`?e(t):e}function Fa(e){return e.split(`-`)[0]}function Ia(e){return e.split(`-`)[1]}function La(e){return e===`x`?`y`:`x`}function Ra(e){return e===`y`?`height`:`width`}function za(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ba(e){return La(za(e))}function Va(e,t,n){n===void 0&&(n=!1);let r=Ia(e),i=Ba(e),a=Ra(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Xa(o)),[o,Xa(o)]}function Ha(e){let t=Xa(e);return[Ua(e),t,Ua(t)]}function Ua(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Wa=[`left`,`right`],Ga=[`right`,`left`],Ka=[`top`,`bottom`],qa=[`bottom`,`top`];function Ja(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ga:Wa:t?Wa:Ga;case`left`:case`right`:return t?Ka:qa;default:return[]}}function Ya(e,t,n,r){let i=Ia(e),a=Ja(Fa(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ua)))),a}function Xa(e){let t=Fa(e);return Ma[t]+e.slice(t.length)}function Za(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qa(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Za(e)}function $a(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function eo(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function to(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function no(){return/apple/i.test(navigator.vendor)}function ro(){return eo().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function io(){return to().includes(`jsdom/`)}var ao=`data-floating-ui-focusable`,oo=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function so(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function co(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ca(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function lo(e){return`composedPath`in e?e.composedPath()[0]:e.target}function uo(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function fo(e){return e.matches(`html,body`)}function po(e){return e?.ownerDocument||document}function mo(e){return sa(e)&&e.matches(oo)}function ho(e){if(!e||io())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function go(e){return e?e.hasAttribute(ao)?e:e.querySelector(`[`+ao+`]`)||e:null}function _o(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,..._o(e,t.id,n)])}function vo(e){return`nativeEvent`in e}function yo(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var bo=typeof document<`u`?v.useLayoutEffect:function(){},xo={...v};function So(e){let t=v.useRef(e);return bo(()=>{t.current=e}),t}var Co=xo.useInsertionEffect||(e=>e());function wo(e){let t=v.useRef(()=>{});return Co(()=>{t.current=e}),v.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function To(e,t,n){let{reference:r,floating:i}=e,a=za(t),o=Ba(t),s=Ra(o),c=Fa(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ia(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Eo(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Pa(t,e),p=Qa(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=$a(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=$a(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Do=50,Oo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Eo},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=To(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Do&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=To(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ko=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Pa(e,t)||{};if(l==null)return{};let d=Qa(u),f={x:n,y:r},p=Ba(i),m=Ra(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Da(d[_],T),D=Da(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Na(O,A,k),ee=!c.arrow&&Ia(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,te=ee?A<O?A-O:A-k:0;return{[p]:f[p]+te,data:{[p]:j,centerOffset:A-j-te,...ee&&{alignmentOffset:te}},reset:ee}}}),Ao=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Pa(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Fa(r),_=za(o),v=Fa(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Xa(o)]:Ha(o)),x=p!==`none`;!d&&x&&b.push(...Ya(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Va(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==za(t))||T.every(e=>za(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=za(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function jo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mo(e){return Ea.some(t=>e[t]>=0)}var No=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Pa(e,t);switch(i){case`referenceHidden`:{let e=jo(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Mo(e)}}}case`escaped`:{let e=jo(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Mo(e)}}}default:return{}}}}};function Po(e){let t=Da(...e.map(e=>e.left)),n=Da(...e.map(e=>e.top)),r=Oa(...e.map(e=>e.right)),i=Oa(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function Fo(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>$a(Po(e)))}var Io=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=Pa(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=Fo(u),f=$a(Po(u)),p=Qa(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(za(n)===`y`){let e=d[0],t=d[d.length-1],r=Fa(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=Fa(n)===`left`,t=Oa(...d.map(e=>e.right)),r=Da(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Lo=new Set([`left`,`top`]);async function Ro(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Fa(n),s=Ia(n),c=za(n)===`y`,l=Lo.has(o)?-1:1,u=a&&c?-1:1,d=Pa(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var zo=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ro(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Bo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Pa(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=za(Fa(i)),p=La(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Na(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Na(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Vo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Pa(e,t),u={x:n,y:r},d=za(i),f=La(d),p=u[f],m=u[d],h=Pa(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Lo.has(Fa(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ho=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Pa(e,t),u=await o.detectOverflow(t,l),d=Fa(i),f=Ia(i),p=za(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Da(h-u[g],v),x=Da(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Oa(u.left,0),t=Oa(u.right,0),n=Oa(u.top,0),r=Oa(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Oa(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Oa(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Uo(e){let t=ba(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=sa(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ka(n)!==a||ka(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Wo(e){return oa(e)?e:e.contextElement}function Go(e){let t=Wo(e);if(!sa(t))return ja(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Uo(t),o=(a?ka(n.width):n.width)/r,s=(a?ka(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ko=ja(0);function qo(e){let t=ra(e);return!va()||!t.visualViewport?Ko:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ra(e)?!1:t}function Yo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Wo(e),o=ja(1);t&&(r?oa(r)&&(o=Go(r)):o=Go(e));let s=Jo(a,n,r)?qo(a):ja(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=ra(a),t=r&&oa(r)?ra(r):r,n=e,i=Ta(n);for(;i&&r&&t!==n;){let e=Go(i),t=i.getBoundingClientRect(),r=ba(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ra(i),i=Ta(n)}}return $a({width:u,height:d,x:c,y:l})}function Xo(e,t){let n=xa(e).scrollLeft;return t?t.left+n:Yo(ia(e)).left+n}function Zo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Xo(e,n),y:n.top+t.scrollTop}}function Qo(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=ia(r),s=t?da(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ja(1),u=ja(0),d=sa(r);if((d||!d&&!a)&&((na(r)!==`body`||la(o))&&(c=xa(r)),d)){let e=Yo(r);l=Go(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Zo(o,c):ja(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function $o(e){return Array.from(e.getClientRects())}function es(e){let t=ia(e),n=xa(e),r=e.ownerDocument.body,i=Oa(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Oa(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Xo(e),s=-n.scrollTop;return ba(r).direction===`rtl`&&(o+=Oa(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var ts=25;function ns(e,t){let n=ra(e),r=ia(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=va();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Xo(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=ts&&(a-=o)}else l<=ts&&(a+=l);return{width:a,height:o,x:s,y:c}}function rs(e,t){let n=Yo(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=sa(e)?Go(e):ja(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function is(e,t,n){let r;if(t===`viewport`)r=ns(e,n);else if(t===`document`)r=es(ia(e));else if(oa(t))r=rs(t,n);else{let n=qo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return $a(r)}function as(e,t){let n=Sa(e);return n===t||!oa(n)||ya(n)?!1:ba(n).position===`fixed`||as(n,t)}function os(e,t){let n=t.get(e);if(n)return n;let r=wa(e,[],!1).filter(e=>oa(e)&&na(e)!==`body`),i=null,a=ba(e).position===`fixed`,o=a?Sa(e):e;for(;oa(o)&&!ya(o);){let t=ba(o),n=ga(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||la(o)&&!n&&as(e,o))?r=r.filter(e=>e!==o):i=t,o=Sa(o)}return t.set(e,r),r}function ss(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?da(t)?[]:os(t,this._c):[].concat(n),r],o=is(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=is(t,a[e],i);s=Oa(n.top,s),c=Da(n.right,c),l=Da(n.bottom,l),u=Oa(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function cs(e){let{width:t,height:n}=Uo(e);return{width:t,height:n}}function ls(e,t,n){let r=sa(t),i=ia(t),a=n===`fixed`,o=Yo(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ja(0);function l(){c.x=Xo(i)}if(r||!r&&!a)if((na(t)!==`body`||la(i))&&(s=xa(t)),r){let e=Yo(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Zo(i,s):ja(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function us(e){return ba(e).position===`static`}function ds(e,t){if(!sa(e)||ba(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return ia(e)===n&&(n=n.ownerDocument.body),n}function fs(e,t){let n=ra(e);if(da(e))return n;if(!sa(e)){let t=Sa(e);for(;t&&!ya(t);){if(oa(t)&&!us(t))return t;t=Sa(t)}return n}let r=ds(e,t);for(;r&&ua(r)&&us(r);)r=ds(r,t);return r&&ya(r)&&us(r)&&!ga(r)?n:r||_a(e)||n}var ps=async function(e){let t=this.getOffsetParent||fs,n=this.getDimensions,r=await n(e.floating);return{reference:ls(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ms(e){return ba(e).direction===`rtl`}var hs={convertOffsetParentRelativeRectToViewportRelativeRect:Qo,getDocumentElement:ia,getClippingRect:ss,getOffsetParent:fs,getElementRects:ps,getClientRects:$o,getDimensions:cs,getScale:Go,isElement:oa,isRTL:ms};function gs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _s(e,t){let n=null,r,i=ia(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Aa(d),h=Aa(i.clientWidth-(u+f)),g=Aa(i.clientHeight-(d+p)),_=Aa(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Oa(0,Da(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!gs(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function vs(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Wo(e),u=i||a?[...l?wa(l):[],...t?wa(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?_s(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Yo(e):null;c&&g();function g(){let t=Yo(e);h&&!gs(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ys=zo,bs=Bo,xs=Ao,Ss=Ho,Cs=No,ws=ko,Ts=Io,Es=Vo,Ds=(e,t,n)=>{let r=new Map,i={platform:hs,...n},a={...i.platform,_c:r};return Oo(e,t,{...i,platform:a})},Os=typeof document<`u`?v.useLayoutEffect:function(){};function ks(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ks(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ks(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function As(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function js(e,t){let n=As(e);return Math.round(t*n)/n}function Ms(e){let t=v.useRef(e);return Os(()=>{t.current=e}),t}function Ns(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);ks(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=v.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=v.useRef(null),w=v.useRef(null),T=v.useRef(u),E=c!=null,D=Ms(c),O=Ms(i),k=Ms(l),A=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Ds(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!ks(T.current,t)&&(T.current=t,Ki.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Os(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=v.useRef(!1);Os(()=>(j.current=!0,()=>{j.current=!1}),[]),Os(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let ee=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),te=v.useMemo(()=>({reference:x,floating:S}),[x,S]),ne=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!te.floating)return e;let t=js(te.floating,u.x),r=js(te.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...As(te.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,te.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:A,refs:ee,elements:te,floatingStyles:ne}),[u,A,ee,te,ne])}var Ps=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ws({element:r.current,padding:i}).fn(n):r?ws({element:r,padding:i}).fn(n):{}}}},Fs=(e,t)=>{let n=ys(e);return{name:n.name,fn:n.fn,options:[e,t]}},Is=(e,t)=>{let n=bs(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ls=(e,t)=>({fn:Es(e).fn,options:[e,t]}),Rs=(e,t)=>{let n=xs(e);return{name:n.name,fn:n.fn,options:[e,t]}},zs=(e,t)=>{let n=Ss(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bs=(e,t)=>{let n=Cs(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vs=(e,t)=>{let n=Ts(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hs=(e,t)=>{let n=Ps(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Us(e){let t=v.useRef(void 0),n=v.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return v.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var Ws=`data-floating-ui-focusable`,Gs=`active`,Ks=`selected`,qs=`ArrowLeft`,Js=`ArrowRight`,Ys=`ArrowUp`,Xs=`ArrowDown`,Zs=[qs,Js],Qs=[Ys,Xs];[...Zs,...Qs];var $s={...v},ec=!1,tc=0,nc=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+ tc++;function rc(){let[e,t]=v.useState(()=>ec?nc():void 0);return bo(()=>{e??t(nc())},[]),v.useEffect(()=>{ec=!0},[]),e}var ic=$s.useId||rc;function ac(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var oc=v.createContext(null),sc=v.createContext(null),cc=()=>v.useContext(oc)?.id||null,lc=()=>v.useContext(sc);function uc(e){return`data-floating-ui-`+e}function dc(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var fc=uc(`safe-polygon`);function pc(e,t,n){if(n&&!yo(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function mc(e){return typeof e==`function`?e():e}function hc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=lc(),m=cc(),h=So(l),g=So(c),_=So(n),y=So(d),b=v.useRef(),x=v.useRef(-1),S=v.useRef(),C=v.useRef(-1),w=v.useRef(!0),T=v.useRef(!1),E=v.useRef(()=>{}),D=v.useRef(!1),O=wo(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});v.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(dc(x),dc(C),w.current=!0,D.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),v.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){O()&&r(!1,e,`hover`)}let t=po(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,O]);let k=v.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=pc(g.current,`close`,b.current);i&&!S.current?(dc(x),x.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(dc(x),r(!1,e,n))},[g,r]),A=wo(()=>{E.current(),S.current=void 0}),j=wo(()=>{if(T.current){let e=po(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(fc),T.current=!1}}),ee=wo(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);v.useEffect(()=>{if(!s)return;function e(e){if(dc(x),w.current=!1,u&&!yo(b.current)||mc(y.current)>0&&!pc(g.current,`open`))return;let t=pc(g.current,`open`,b.current);t?x.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(ee()){j();return}E.current();let t=po(o.floating);if(dc(C),D.current=!1,h.current&&i.current.floatingContext){n||dc(x),S.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),ee()||k(e,!0,`safe-polygon`)}});let r=S.current;t.addEventListener(`mousemove`,r),E.current=()=>{t.removeEventListener(`mousemove`,r)};return}(b.current!==`touch`||!co(o.floating,e.relatedTarget))&&k(e)}function a(e){ee()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),ee()||k(e)}})(e))}function c(){dc(x)}function l(e){ee()||k(e,!1)}if(oa(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,k,A,j,r,n,_,p,g,h,i,ee,y]),bo(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&O()){T.current=!0;let e=o.floating;if(oa(o.domReference)&&e){var t;let n=po(o.floating).body;n.setAttribute(fc,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,O]),bo(()=>{n||(b.current=void 0,D.current=!1,A(),j())},[n,A,j]),v.useEffect(()=>()=>{A(),dc(x),dc(C),j()},[s,o.domReference,A,j]);let te=v.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!w.current&&!_.current&&r(!0,t,`hover`)}u&&!yo(b.current)||n||mc(y.current)===0||D.current&&e.movementX**2+e.movementY**2<2||(dc(C),b.current===`touch`?i():(D.current=!0,C.current=window.setTimeout(i,mc(y.current))))}}},[u,r,n,_,y]);return v.useMemo(()=>s?{reference:te}:{},[s,te])}var gc=()=>{},_c=v.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:gc,setState:gc,isInstantPhase:!1}),vc=()=>v.useContext(_c);function yc(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=v.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=v.useRef(null),s=v.useCallback(e=>{a({currentId:e})},[]);return bo(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,I.jsx)(_c.Provider,{value:v.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function bc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=vc(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return bo(()=>{o&&l&&(f({delay:{open:1,close:pc(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),bo(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),bo(()=>{o&&(u===gc||!n||u(s))},[o,n,u,s]),c}var xc={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Sc={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Cc=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function wc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=lc(),g=wo(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,y=v.useRef(!1),{escapeKey:b,outsidePress:x}=Cc(p),{escapeKey:S,outsidePress:C}=Cc(m),w=v.useRef(!1),T=wo(e=>{if(!n||!o||!s||e.key!==`Escape`||w.current)return;let t=a.current.floatingContext?.nodeId,i=h?_o(h.nodesRef.current,t):[];if(!b&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,vo(e)?e.nativeEvent:e,`escape-key`)}),E=wo(e=>{var t;let n=()=>{var t;T(e),(t=lo(e))==null||t.removeEventListener(`keydown`,n)};(t=lo(e))==null||t.addEventListener(`keydown`,n)}),D=wo(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=y.current;if(y.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=lo(e),s=`[`+uc(`inert`)+`]`,c=po(i.floating).querySelectorAll(s),u=oa(o)?o:null;for(;u&&!ya(u);){let e=Sa(u);if(ya(e)||!oa(e))break;u=e}if(c.length&&oa(o)&&!fo(o)&&!co(o,i.floating)&&Array.from(c).every(e=>!co(u,e)))return;if(sa(o)&&A){let t=ya(o),n=ba(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&_o(h.nodesRef.current,d).some(t=>uo(e,t.context?.elements.floating));if(uo(e,i.floating)||uo(e,i.domReference)||f)return;let p=h?_o(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),O=wo(e=>{var t;let n=()=>{var t;D(e),(t=lo(e))==null||t.removeEventListener(l,n)};(t=lo(e))==null||t.addEventListener(l,n)});v.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=b,a.current.__outsidePressBubbles=x;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),w.current=!0}function u(){e=window.setTimeout(()=>{w.current=!1},va()?5:0)}let d=po(i.floating);s&&(d.addEventListener(`keydown`,S?E:T,S),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,C?O:D,C);let p=[];return f&&(oa(i.domReference)&&(p=wa(i.domReference)),oa(i.floating)&&(p=p.concat(wa(i.floating))),!oa(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(wa(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{s&&(d.removeEventListener(`keydown`,S?E:T,S),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,C?O:D,C),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,b,x,T,S,E,D,C,O]),v.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let k=v.useMemo(()=>({onKeyDown:T,...u&&{[xc[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[T,r,u,d]),A=v.useMemo(()=>{function e(e){e.button===0&&(y.current=!0)}return{onKeyDown:T,onMouseDown:e,onMouseUp:e,[Sc[l]]:()=>{a.current.insideReactTree=!0}}},[T,l,a]);return v.useMemo(()=>o?{reference:k,floating:A}:{},[o,k,A])}function Tc(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=ic(),a=v.useRef({}),[o]=v.useState(()=>ac()),s=cc()!=null,[c,l]=v.useState(r.reference),u=wo((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=v.useMemo(()=>({setPositionReference:l}),[]),f=v.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return v.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Ec(e){e===void 0&&(e={});let{nodeId:t}=e,n=Tc({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=v.useState(null),[s,c]=v.useState(null),l=i?.domReference||a,u=v.useRef(null),d=lc();bo(()=>{l&&(u.current=l)},[l]);let f=Ns({...e,elements:{...i,...s&&{reference:s}}}),p=v.useCallback(e=>{let t=oa(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=v.useCallback(e=>{(oa(e)||e===null)&&(u.current=e,o(e)),(oa(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!oa(e))&&f.refs.setReference(e)},[f.refs]),h=v.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=v.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=v.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return bo(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),v.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}function Dc(){return ro()&&no()}function Oc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=v.useRef(!1),u=v.useRef(-1),d=v.useRef(!0);v.useEffect(()=>{if(!s)return;let e=ra(o.domReference);function t(){!n&&sa(o.domReference)&&o.domReference===so(po(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),Dc()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),Dc()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),v.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),v.useEffect(()=>()=>{dc(u)},[]);let f=v.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=lo(e.nativeEvent);if(c&&oa(t)){if(Dc()&&!e.relatedTarget){if(!d.current&&!mo(t))return}else if(!ho(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=oa(t)&&t.hasAttribute(uc(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=so(o.domReference?o.domReference.ownerDocument:document);!t&&e===o.domReference||co(a.current.floatingContext?.refs.floating.current,e)||co(o.domReference,e)||i||r(!1,n,`focus`)})}}),[a,o.domReference,r,c]);return v.useMemo(()=>s?{reference:f}:{},[s,f])}function kc(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[Gs]:t,[Ks]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Ws]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[Gs,Ks].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function Ac(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=v.useCallback(t=>kc(t,e,`reference`),t),a=v.useCallback(t=>kc(t,e,`floating`),n),o=v.useCallback(t=>kc(t,e,`item`),r);return v.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var jc=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Mc(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=ic(),c=r.domReference?.id||s,l=v.useMemo(()=>go(r.floating)?.id||i,[r.floating,i]),u=jc.get(o)??o,d=cc()!=null,f=v.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=v.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=v.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return v.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}var Nc={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`},[Pc,Fc]=ot(`ScrollArea.Root component was not found in tree`);function Ic(e,t){let n=Mt(t);Bt(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var Lc=(0,v.forwardRef)((e,t)=>{let{style:n,...r}=e,i=Fc(),[a,o]=(0,v.useState)(0),[s,c]=(0,v.useState)(0),l=!!(a&&s);return Ic(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),Ic(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,I.jsx)(`div`,{...r,ref:t,style:{...n,width:a,height:s}}):null}),Rc=(0,v.forwardRef)((e,t)=>{let n=Fc(),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,I.jsx)(Lc,{...e,ref:t}):null}),zc={scrollHideDelay:1e3,type:`hover`},Bc=(0,v.forwardRef)((e,t)=>{let{type:n,scrollHideDelay:r,scrollbars:i,getStyles:a,...o}=L(`ScrollAreaRoot`,zc,e),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(0),[b,x]=(0,v.useState)(0),[S,C]=(0,v.useState)(!1),[w,T]=(0,v.useState)(!1),E=cn(t,e=>c(e));return(0,I.jsx)(Pc,{value:{type:n,scrollHideDelay:r,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:S,onScrollbarXEnabledChange:C,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:x,getStyles:a},children:(0,I.jsx)(R,{...o,ref:E,__vars:{"--sa-corner-width":i===`xy`?`${_}px`:`0px`,"--sa-corner-height":i===`xy`?`${b}px`:`0px`}})})});Bc.displayName=`@mantine/core/ScrollAreaRoot`;function Vc(e,t){let n=e/t;return Number.isNaN(n)?0:n}function Hc(e){let t=Vc(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Uc(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Wc(e,[t,n]){return Math.min(n,Math.max(t,e))}function Gc(e,t,n=`ltr`){let r=Hc(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=Wc(e,n===`ltr`?[0,o]:[o*-1,0]);return Uc([0,o],[0,s])(c)}function Kc(e,t,n,r=`ltr`){let i=Hc(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return Uc([c,l],d)(e)}function qc(e,t){return e>0&&e<t}function Jc(e){return e?parseInt(e,10):0}function Yc(e,t,{checkForDefaultPrevented:n=!0}={}){return r=>{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[Xc,Zc]=ot(`ScrollAreaScrollbar was not found in tree`),Qc=(0,v.forwardRef)((e,t)=>{let{sizes:n,hasThumb:r,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:s,onDragScroll:c,onWheelScroll:l,onResize:u,...d}=e,f=Fc(),[p,m]=(0,v.useState)(null),h=cn(t,e=>m(e)),g=(0,v.useRef)(null),_=(0,v.useRef)(``),{viewport:y}=f,b=n.content-n.viewport,x=Mt(l),S=Mt(s),C=Nt(u,10),w=e=>{g.current&&c({x:e.clientX-g.current.left,y:e.clientY-g.current.top})};return(0,v.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&x(e,b)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[y,p,b,x]),(0,v.useEffect)(S,[n,S]),Ic(p,C),Ic(f.content,C),(0,I.jsx)(Xc,{value:{scrollbar:p,hasThumb:r,onThumbChange:Mt(i),onThumbPointerUp:Mt(a),onThumbPositionChange:S,onThumbPointerDown:Mt(o)},children:(0,I.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:Yc(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,w(e))}),onPointerMove:Yc(e.onPointerMove,w),onPointerUp:Yc(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}),$c=(0,v.forwardRef)((e,t)=>{let{sizes:n,onSizesChange:r,style:i,...a}=e,o=Fc(),[s,c]=(0,v.useState)(),l=(0,v.useRef)(null),u=cn(t,l,o.onScrollbarXChange);return(0,v.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,I.jsx)(Qc,{"data-orientation":`horizontal`,...a,ref:u,sizes:n,style:{...i,"--sa-thumb-width":`${Hc(n)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),qc(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Jc(s.paddingLeft),paddingEnd:Jc(s.paddingRight)}})}})});$c.displayName=`@mantine/core/ScrollAreaScrollbarX`;var el=(0,v.forwardRef)((e,t)=>{let{sizes:n,onSizesChange:r,style:i,...a}=e,o=Fc(),[s,c]=(0,v.useState)(),l=(0,v.useRef)(null),u=cn(t,l,o.onScrollbarYChange);return(0,v.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,I.jsx)(Qc,{...a,"data-orientation":`vertical`,ref:u,sizes:n,style:{"--sa-thumb-height":`${Hc(n)}px`,...i},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),qc(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Jc(s.paddingTop),paddingEnd:Jc(s.paddingBottom)}})}})});el.displayName=`@mantine/core/ScrollAreaScrollbarY`;var tl=(0,v.forwardRef)((e,t)=>{let{orientation:n=`vertical`,...r}=e,{dir:i}=Gi(),a=Fc(),o=(0,v.useRef)(null),s=(0,v.useRef)(0),[c,l]=(0,v.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Vc(c.viewport,c.content),d={...r,sizes:c,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:e=>{o.current=e},onThumbPointerUp:()=>{s.current=0},onThumbPointerDown:e=>{s.current=e}},f=(e,t)=>Kc(e,s.current,c,t);return n===`horizontal`?(0,I.jsx)($c,{...d,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){let e=a.viewport.scrollLeft,t=Gc(e,c,i);o.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=f(e,i))}}):n===`vertical`?(0,I.jsx)(el,{...d,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){let e=a.viewport.scrollTop,t=Gc(e,c);c.scrollbar.size===0?o.current.style.setProperty(`--thumb-opacity`,`0`):o.current.style.setProperty(`--thumb-opacity`,`1`),o.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=f(e))}}):null});tl.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;var nl=(0,v.forwardRef)((e,t)=>{let n=Fc(),{forceMount:r,...i}=e,[a,o]=(0,v.useState)(!1),s=e.orientation===`horizontal`,c=Nt(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return Ic(n.viewport,c),Ic(n.content,c),r||a?(0,I.jsx)(tl,{"data-state":a?`visible`:`hidden`,...i,ref:t}):null});nl.displayName=`@mantine/core/ScrollAreaScrollbarAuto`;var rl=(0,v.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=Fc(),[a,o]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{let{scrollArea:e}=i,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),n||a?(0,I.jsx)(nl,{"data-state":a?`visible`:`hidden`,...r,ref:t}):null});rl.displayName=`@mantine/core/ScrollAreaScrollbarHover`;var il=(0,v.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=Fc(),a=e.orientation===`horizontal`,[o,s]=(0,v.useState)(`hidden`),c=Nt(()=>s(`idle`),100);return(0,v.useEffect)(()=>{if(o===`idle`){let e=window.setTimeout(()=>s(`hidden`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[o,i.scrollHideDelay]),(0,v.useEffect)(()=>{let{viewport:e}=i,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(s(`scrolling`),c()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c]),n||o!==`hidden`?(0,I.jsx)(tl,{"data-state":o===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:Yc(e.onPointerEnter,()=>s(`interacting`)),onPointerLeave:Yc(e.onPointerLeave,()=>s(`idle`))}):null}),al=(0,v.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=Fc(),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return(0,v.useEffect)(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,I.jsx)(rl,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,I.jsx)(il,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,I.jsx)(nl,{...r,ref:t,forceMount:n}):i.type===`always`?(0,I.jsx)(tl,{...r,ref:t}):null});al.displayName=`@mantine/core/ScrollAreaScrollbar`;function ol(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}var sl=(0,v.forwardRef)((e,t)=>{let{style:n,...r}=e,i=Fc(),a=Zc(),{onThumbPositionChange:o}=a,s=cn(t,e=>a.onThumbChange(e)),c=(0,v.useRef)(void 0),l=Nt(()=>{c.current&&=(c.current(),void 0)},100);return(0,v.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{l(),c.current||(c.current=ol(e,o),o())};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,I.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...n},onPointerDownCapture:Yc(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:Yc(e.onPointerUp,a.onThumbPointerUp)})});sl.displayName=`@mantine/core/ScrollAreaThumb`;var cl=(0,v.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=Zc();return n||i.hasThumb?(0,I.jsx)(sl,{ref:t,...r}):null});cl.displayName=`@mantine/core/ScrollAreaThumb`;var ll=(0,v.forwardRef)(({children:e,style:t,onWheel:n,...r},i)=>{let a=Fc(),o=cn(i,a.onViewportChange),s=e=>{if(n?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,I.jsx)(R,{...r,ref:o,onWheel:s,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,I.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})});ll.displayName=`@mantine/core/ScrollAreaViewport`;var ul={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},dl=On((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":F(t),"--scrollarea-over-scroll-behavior":i}}}),fl=z((e,t)=>{let n=L(`ScrollArea`,ul,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,scrollbarSize:c,vars:l,type:u,scrollHideDelay:d,viewportProps:f,viewportRef:p,onScrollPositionChange:m,children:h,offsetScrollbars:g,scrollbars:_,onBottomReached:y,onTopReached:b,overscrollBehavior:x,attributes:S,...C}=n,[w,T]=(0,v.useState)(!1),[E,D]=(0,v.useState)(!1),[O,k]=(0,v.useState)(!1),A=ii({name:`ScrollArea`,props:n,classes:Nc,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:S,vars:l,varsResolver:dl}),j=(0,v.useRef)(null),ee=Us([p,j]);return(0,v.useEffect)(()=>{if(!j.current||g!==`present`)return;let e=j.current,t=new ResizeObserver(()=>{let{scrollHeight:t,clientHeight:n,scrollWidth:r,clientWidth:i}=e;D(t>n),k(r>i)});return t.observe(e),()=>t.disconnect()},[j,g]),(0,I.jsxs)(Bc,{getStyles:A,type:u===`never`?`always`:u,scrollHideDelay:d,ref:t,scrollbars:_,...A(`root`),...C,children:[(0,I.jsx)(ll,{...f,...A(`viewport`,{style:f?.style}),ref:ee,"data-offset-scrollbars":g===!0?`xy`:g||void 0,"data-scrollbars":_||void 0,"data-horizontal-hidden":g===`present`&&!O?`true`:void 0,"data-vertical-hidden":g===`present`&&!E?`true`:void 0,onScroll:e=>{f?.onScroll?.(e),m?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;t-(n-r)>=-.8&&y?.(),t===0&&b?.()},children:h}),(_===`xy`||_===`x`)&&(0,I.jsx)(al,{...A(`scrollbar`),orientation:`horizontal`,"data-hidden":u===`never`||g===`present`&&!O?!0:void 0,forceMount:!0,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),children:(0,I.jsx)(cl,{...A(`thumb`)})}),(_===`xy`||_===`y`)&&(0,I.jsx)(al,{...A(`scrollbar`),orientation:`vertical`,"data-hidden":u===`never`||g===`present`&&!E?!0:void 0,forceMount:!0,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),children:(0,I.jsx)(cl,{...A(`thumb`)})}),(0,I.jsx)(Rc,{...A(`corner`),"data-hovered":w||void 0,"data-hidden":u===`never`||void 0})]})});fl.displayName=`@mantine/core/ScrollArea`;var pl=z((e,t)=>{let{children:n,classNames:r,styles:i,scrollbarSize:a,scrollHideDelay:o,type:s,dir:c,offsetScrollbars:l,overscrollBehavior:u,viewportRef:d,onScrollPositionChange:f,unstyled:p,variant:m,viewportProps:h,scrollbars:g,style:_,vars:y,onBottomReached:b,onTopReached:x,onOverflowChange:S,...C}=L(`ScrollAreaAutosize`,ul,e),w=(0,v.useRef)(null),T=Us([d,w]),[E,D]=(0,v.useState)(!1),O=(0,v.useRef)(!1);return(0,v.useEffect)(()=>{if(!S)return;let e=w.current;if(!e)return;let t=()=>{let t=e.scrollHeight>e.clientHeight;t!==E&&(O.current?S?.(t):(O.current=!0,t&&S?.(!0)),D(t))};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[S,E]),(0,I.jsx)(R,{...C,ref:t,style:[{display:`flex`,overflow:`hidden`},_],children:(0,I.jsx)(R,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...g===`y`&&{minWidth:0},...g===`x`&&{minHeight:0},...g===`xy`&&{minWidth:0,minHeight:0},...g===!1&&{minWidth:0,minHeight:0}},children:(0,I.jsx)(fl,{classNames:r,styles:i,scrollHideDelay:o,scrollbarSize:a,type:s,dir:c,offsetScrollbars:l,overscrollBehavior:u,viewportRef:T,onScrollPositionChange:f,unstyled:p,variant:m,viewportProps:h,vars:y,scrollbars:g,onBottomReached:b,onTopReached:x,"data-autosize":`true`,children:n})})})});fl.classes=Nc,pl.displayName=`@mantine/core/ScrollAreaAutosize`,pl.classes=Nc,fl.Autosize=pl;var ml={root:`m_87cf2631`},hl={__staticSelector:`UnstyledButton`},gl=Ui((e,t)=>{let n=L(`UnstyledButton`,hl,e),{className:r,component:i=`button`,__staticSelector:a,unstyled:o,classNames:s,styles:c,style:l,attributes:u,...d}=n;return(0,I.jsx)(R,{...ii({name:a,props:n,classes:ml,className:r,style:l,classNames:s,styles:c,unstyled:o,attributes:u})(`root`,{focusable:!0}),component:i,ref:t,type:i===`button`?`button`:void 0,...d})});gl.classes=ml,gl.displayName=`@mantine/core/UnstyledButton`;var _l={root:`m_515a97f8`},vl=z((e,t)=>{let n=L(`VisuallyHidden`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,attributes:l,...u}=n;return(0,I.jsx)(R,{component:`span`,ref:t,...ii({name:`VisuallyHidden`,classes:_l,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:l})(`root`),...u})});vl.classes=_l,vl.displayName=`@mantine/core/VisuallyHidden`;var yl={root:`m_1b7284a3`},bl=On((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:bt(t),"--paper-shadow":Ct(n)}})),xl=Ui((e,t)=>{let n=L(`Paper`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,withBorder:c,vars:l,radius:u,shadow:d,variant:f,mod:p,attributes:m,...h}=n,g=ii({name:`Paper`,props:n,classes:yl,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:m,vars:l,varsResolver:bl});return(0,I.jsx)(R,{ref:t,mod:[{"data-with-border":c},p],...g(`root`),variant:f,...h})});xl.classes=yl,xl.displayName=`@mantine/core/Paper`;function Sl(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function Cl(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var wl={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function Tl({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[wl[c]]:r},d=-t/2;return c===`left`?{...u,...Sl(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...Sl(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...Cl(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...Cl(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}var El=(0,v.forwardRef)(({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l},u)=>{let{dir:d}=Gi();return a?(0,I.jsx)(`div`,{...l,ref:u,style:{...c,...Tl({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:d,arrowX:o,arrowY:s})}}):null});El.displayName=`@mantine/core/FloatingArrow`;function Dl(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}var Ol={root:`m_9814e45f`},kl={zIndex:ht(`modal`)},Al=On((e,{gradient:t,color:n,backgroundOpacity:r,blur:i,radius:a,zIndex:o})=>({root:{"--overlay-bg":t||(n!==void 0||r!==void 0)&&ar(n||`#000`,r??.6)||void 0,"--overlay-filter":i?`blur(${F(i)})`:void 0,"--overlay-radius":a===void 0?void 0:bt(a),"--overlay-z-index":o?.toString()}})),jl=Ui((e,t)=>{let n=L(`Overlay`,kl,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,fixed:l,center:u,children:d,radius:f,zIndex:p,gradient:m,blur:h,color:g,backgroundOpacity:_,mod:v,attributes:y,...b}=n;return(0,I.jsx)(R,{ref:t,...ii({name:`Overlay`,props:n,classes:Ol,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:y,vars:c,varsResolver:Al})(`root`),mod:[{center:u,fixed:l},v],...b,children:d})});jl.classes=Ol,jl.displayName=`@mantine/core/Overlay`;function Ml(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function Nl({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||Ml(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=Ml(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return Ml(n)}var Pl={reuseTargetNode:!0},Fl=z((e,t)=>{let{children:n,target:r,reuseTargetNode:i,...a}=L(`Portal`,Pl,e),[o,s]=(0,v.useState)(!1),c=(0,v.useRef)(null);return Bt(()=>(s(!0),c.current=Nl({target:r,reuseTargetNode:i,...a}),on(t,c.current),!r&&!i&&c.current&&document.body.appendChild(c.current),()=>{!r&&!i&&c.current&&document.body.removeChild(c.current)}),[r]),!o||!c.current?null:(0,Ki.createPortal)((0,I.jsx)(I.Fragment,{children:n}),c.current)});Fl.displayName=`@mantine/core/Portal`;var Il=z(({withinPortal:e=!0,children:t,...n},r)=>Wn()===`test`||!e?(0,I.jsx)(I.Fragment,{children:t}):(0,I.jsx)(Fl,{ref:r,...n,children:t}));Il.displayName=`@mantine/core/OptionalPortal`;var Ll=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),Rl={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...Ll(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...Ll(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...Ll(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...Ll(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...Ll(`top`),common:{transformOrigin:`top right`}}},zl={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function Bl({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in Rl?{transitionProperty:Rl[e].transitionProperty,...i,...Rl[e].common,...Rl[e][zl[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[zl[t]]}}function Vl({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=br(),d=pn(),f=u.respectReducedMotion?d:!1,[p,m]=(0,v.useState)(f?0:e),[h,g]=(0,v.useState)(r?`entered`:`exited`),_=(0,v.useRef)(-1),y=(0,v.useRef)(-1),b=(0,v.useRef)(-1);function x(){window.clearTimeout(_.current),window.clearTimeout(y.current),cancelAnimationFrame(b.current)}let S=n=>{x();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):b.current=requestAnimationFrame(()=>{Ki.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),b.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},C=e=>{if(x(),typeof(e?c:l)!=`number`){S(e);return}y.current=window.setTimeout(()=>{S(e)},e?c:l)};return Vt(()=>{C(r)},[r]),(0,v.useEffect)(()=>()=>{x()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function Hl({keepMounted:e,transition:t=`fade`,duration:n=250,exitDuration:r=n,mounted:i,children:a,timingFunction:o=`ease`,onExit:s,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f}){let p=Wn(),{transitionDuration:m,transitionStatus:h,transitionTimingFunction:g}=Vl({mounted:i,exitDuration:r,duration:n,timingFunction:o,onExit:s,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f});return m===0||p===`test`?i?(0,I.jsx)(I.Fragment,{children:a({})}):e?a({display:`none`}):null:h===`exited`?e?a({display:`none`}):null:(0,I.jsx)(I.Fragment,{children:a(Bl({transition:t,duration:m,state:h,timingFunction:g}))})}Hl.displayName=`@mantine/core/Transition`;var[Ul,Wl]=ot(`Popover component was not found in the tree`),Gl={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`};function Kl({children:e,active:t=!0,refProp:n=`ref`,innerRef:r}){let i=cn(Qt(t),r),a=Dn(e);return a?(0,v.cloneElement)(a,{[n]:i}):e}function ql(e){return(0,I.jsx)(vl,{tabIndex:-1,"data-autofocus":!0,...e})}Kl.displayName=`@mantine/core/FocusTrap`,ql.displayName=`@mantine/core/FocusTrapInitialFocus`,Kl.InitialFocus=ql;var Jl=z((e,t)=>{let n=L(`PopoverDropdown`,null,e),{className:r,style:i,vars:a,children:o,onKeyDownCapture:s,variant:c,classNames:l,styles:u,...d}=n,f=Wl(),p=Ht({opened:f.opened,shouldReturnFocus:f.returnFocus}),m=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:`dialog`,tabIndex:-1}:{},h=cn(t,f.floating);return f.disabled?null:(0,I.jsx)(Il,{...f.portalProps,withinPortal:f.withinPortal,children:(0,I.jsx)(Hl,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||`fade`,duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,exitDuration:typeof f.transitionProps?.exitDuration==`number`?f.transitionProps.exitDuration:f.transitionProps?.duration,children:e=>(0,I.jsx)(Kl,{active:f.trapFocus&&f.opened,innerRef:h,children:(0,I.jsxs)(R,{...m,...d,variant:c,onKeyDownCapture:_t(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:p,onKeyDown:s}),"data-position":f.placement,"data-fixed":f.floatingStrategy===`fixed`||void 0,...f.getStyles(`dropdown`,{className:r,props:n,classNames:l,styles:u,style:[{...e,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width===`target`?void 0:F(f.width),...f.referenceHidden?{display:`none`}:null},f.resolvedStyles.dropdown,u?.dropdown,i]}),children:[o,(0,I.jsx)(El,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles(`arrow`,{props:n,classNames:l,styles:u})})]})})})})});Jl.classes=Gl,Jl.displayName=`@mantine/core/PopoverDropdown`;var Yl={refProp:`ref`,popupType:`dialog`},Xl=z((e,t)=>{let{children:n,refProp:r,popupType:i,...a}=L(`PopoverTarget`,Yl,e),o=Dn(n);if(!o)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let s=a,c=Wl(),l=cn(c.reference,Cn(o),t),u=c.withRoles?{"aria-haspopup":i,"aria-expanded":c.opened,"aria-controls":c.opened?c.getDropdownId():void 0,id:c.getTargetId()}:{},d=o.props;return(0,v.cloneElement)(o,{...s,...u,...c.targetProps,className:An(c.targetProps.className,s.className,d.className),[r]:l,...c.controlled?null:{onClick:()=>{c.onToggle(),d.onClick?.()}}})});Xl.displayName=`@mantine/core/PopoverTarget`;function Zl(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Ql(e,t,n){let r=Zl(e.middlewares),i=[Fs(e.offset),Bs()];return e.dropdownVisible&&n!==`test`&&e.preventPositionChangeWhenVisible&&(r.flip=!1),r.flip&&i.push(typeof r.flip==`boolean`?Rs():Rs(r.flip)),r.shift&&i.push(Is(typeof r.shift==`boolean`?{limiter:Ls(),padding:5}:{limiter:Ls(),padding:5,...r.shift})),r.inline&&i.push(typeof r.inline==`boolean`?Vs():Vs(r.inline)),i.push(Hs({element:e.arrowRef,padding:e.arrowOffset})),(r.size||e.width===`target`)&&i.push(zs({...typeof r.size==`boolean`?{}:r.size,apply({rects:n,availableWidth:i,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};r.size&&(typeof r.size==`object`&&r.size.apply?r.size.apply({rects:n,availableWidth:i,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${i}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),i}function $l(e){let t=Wn(),[n,r]=ln({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),i=(0,v.useRef)(n),a=()=>{n&&!e.disabled&&r(!1)},o=()=>{e.disabled||r(!n)},s=Ec({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:Ql(e,()=>s,t),whileElementsMounted:e.keepMounted?void 0:vs});return(0,v.useEffect)(()=>{if(!(!s.refs.reference.current||!s.refs.floating.current)&&n)return vs(s.refs.reference.current,s.refs.floating.current,s.update)},[n,s.update]),Vt(()=>{e.onPositionChange?.(s.placement),e.positionRef.current=s.placement},[s.placement,e.preventPositionChangeWhenVisible]),Vt(()=>{n!==i.current&&(n?e.onOpen?.():e.onClose?.()),i.current=n},[n,e.onClose,e.onOpen]),Bt(()=>{let t=-1;return n&&(t=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(t)}},[n,e.position]),{floating:s,controlled:typeof e.opened==`boolean`,opened:n,onClose:a,onToggle:o}}var eu={position:`bottom`,offset:8,positionDependencies:[],transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:[`mousedown`,`touchstart`],zIndex:ht(`popover`),__staticSelector:`Popover`,width:`max-content`},tu=On((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:bt(t),"--popover-shadow":Ct(n)}}));function nu(e){let t=L(`Popover`,eu,e),{children:n,position:r,offset:i,onPositionChange:a,positionDependencies:o,opened:s,transitionProps:c,onExitTransitionEnd:l,onEnterTransitionEnd:u,width:d,middlewares:f,withArrow:p,arrowSize:m,arrowOffset:h,arrowRadius:g,arrowPosition:_,unstyled:y,classNames:b,styles:x,closeOnClickOutside:S,withinPortal:C,portalProps:w,closeOnEscape:T,clickOutsideEvents:E,trapFocus:D,onClose:O,onDismiss:k,onOpen:A,onChange:j,zIndex:ee,radius:te,shadow:ne,id:re,defaultOpened:M,__staticSelector:N,withRoles:ie,disabled:ae,returnFocus:oe,variant:se,keepMounted:ce,vars:le,floatingStrategy:ue,withOverlay:de,overlayProps:fe,hideDetached:pe,attributes:me,preventPositionChangeWhenVisible:he,...ge}=t,_e=ii({name:N,props:t,classes:Gl,classNames:b,styles:x,unstyled:y,attributes:me,rootSelector:`dropdown`,vars:le,varsResolver:tu}),{resolvedStyles:ve}=Vr({classNames:b,styles:x,props:t}),[ye,be]=(0,v.useState)(s??M??!1),xe=(0,v.useRef)(r),Se=(0,v.useRef)(null),[Ce,we]=(0,v.useState)(null),[Te,Ee]=(0,v.useState)(null),{dir:De}=Gi(),Oe=Wn(),ke=rn(re),P=$l({middlewares:f,width:d,position:Dl(De,r),offset:typeof i==`number`?i+(p?m/2:0):i,arrowRef:Se,arrowOffset:h,onPositionChange:a,positionDependencies:o,opened:s,defaultOpened:M,onChange:j,onOpen:A,onClose:O,onDismiss:k,strategy:ue,dropdownVisible:ye,setDropdownVisible:be,positionRef:xe,disabled:ae,preventPositionChangeWhenVisible:he,keepMounted:ce});Ft(()=>{S&&(P.onClose(),k?.())},E,[Ce,Te]);let Ae=(0,v.useCallback)(e=>{we(e),P.floating.refs.setReference(e)},[P.floating.refs.setReference]),je=(0,v.useCallback)(e=>{Ee(e),P.floating.refs.setFloating(e)},[P.floating.refs.setFloating]),Me=(0,v.useCallback)(()=>{c?.onExited?.(),l?.(),be(!1),he||(xe.current=r)},[c?.onExited,l,he,r]),Ne=(0,v.useCallback)(()=>{c?.onEntered?.(),u?.()},[c?.onEntered,u]);return(0,I.jsxs)(Ul,{value:{returnFocus:oe,disabled:ae,controlled:P.controlled,reference:Ae,floating:je,x:P.floating.x,y:P.floating.y,arrowX:P.floating?.middlewareData?.arrow?.x,arrowY:P.floating?.middlewareData?.arrow?.y,opened:P.opened,arrowRef:Se,transitionProps:{...c,onExited:Me,onEntered:Ne},width:d,withArrow:p,arrowSize:m,arrowOffset:h,arrowRadius:g,arrowPosition:_,placement:P.floating.placement,trapFocus:D,withinPortal:C,portalProps:w,zIndex:ee,radius:te,shadow:ne,closeOnEscape:T,onDismiss:k,onClose:P.onClose,onToggle:P.onToggle,getTargetId:()=>`${ke}-target`,getDropdownId:()=>`${ke}-dropdown`,withRoles:ie,targetProps:ge,__staticSelector:N,classNames:b,styles:x,unstyled:y,variant:se,keepMounted:ce,getStyles:_e,resolvedStyles:ve,floatingStrategy:ue,referenceHidden:pe&&Oe!==`test`?P.floating.middlewareData.hide?.referenceHidden:!1},children:[n,de&&(0,I.jsx)(Hl,{transition:`fade`,mounted:P.opened,duration:c?.duration||250,exitDuration:c?.exitDuration||250,children:e=>(0,I.jsx)(Il,{withinPortal:C,children:(0,I.jsx)(jl,{...fe,..._e(`overlay`,{className:fe?.className,style:[e,fe?.style]})})})})]})}nu.Target=Xl,nu.Dropdown=Jl,nu.displayName=`@mantine/core/Popover`,nu.extend=e=>e;var ru={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},iu=(0,v.forwardRef)(({className:e,...t},n)=>(0,I.jsxs)(R,{component:`span`,className:An(ru.barsLoader,e),...t,ref:n,children:[(0,I.jsx)(`span`,{className:ru.bar}),(0,I.jsx)(`span`,{className:ru.bar}),(0,I.jsx)(`span`,{className:ru.bar})]}));iu.displayName=`@mantine/core/Bars`;var au=(0,v.forwardRef)(({className:e,...t},n)=>(0,I.jsxs)(R,{component:`span`,className:An(ru.dotsLoader,e),...t,ref:n,children:[(0,I.jsx)(`span`,{className:ru.dot}),(0,I.jsx)(`span`,{className:ru.dot}),(0,I.jsx)(`span`,{className:ru.dot})]}));au.displayName=`@mantine/core/Dots`;var ou=(0,v.forwardRef)(({className:e,...t},n)=>(0,I.jsx)(R,{component:`span`,className:An(ru.ovalLoader,e),...t,ref:n}));ou.displayName=`@mantine/core/Oval`;var su={bars:iu,oval:ou,dots:au},cu={loaders:su,type:`oval`},lu=On((e,{size:t,color:n})=>({root:{"--loader-size":vt(t,`loader-size`),"--loader-color":n?rr(n,e):void 0}})),uu=z((e,t)=>{let n=L(`Loader`,cu,e),{size:r,color:i,type:a,vars:o,className:s,style:c,classNames:l,styles:u,unstyled:d,loaders:f,variant:p,children:m,attributes:h,...g}=n,_=ii({name:`Loader`,props:n,classes:ru,className:s,style:c,classNames:l,styles:u,unstyled:d,attributes:h,vars:o,varsResolver:lu});return m?(0,I.jsx)(R,{..._(`root`),ref:t,...g,children:m}):(0,I.jsx)(R,{..._(`root`),ref:t,component:f[a],variant:p,size:r,...g})});uu.defaultLoaders=su,uu.classes=ru,uu.displayName=`@mantine/core/Loader`;var du={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},fu={orientation:`horizontal`},pu=On((e,{borderWidth:t})=>({group:{"--ai-border-width":F(t)}})),mu=z((e,t)=>{let n=L(`ActionIconGroup`,fu,e),{className:r,style:i,classNames:a,styles:o,unstyled:s,orientation:c,vars:l,borderWidth:u,variant:d,mod:f,attributes:p,...m}=L(`ActionIconGroup`,fu,e);return(0,I.jsx)(R,{...ii({name:`ActionIconGroup`,props:n,classes:du,className:r,style:i,classNames:a,styles:o,unstyled:s,attributes:p,vars:l,varsResolver:pu,rootSelector:`group`})(`group`),ref:t,variant:d,mod:[{"data-orientation":c},f],role:`group`,...m})});mu.classes=du,mu.displayName=`@mantine/core/ActionIconGroup`;var hu=On((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":vt(o,`section-height`),"--section-padding-x":vt(o,`section-padding-x`),"--section-fz":xt(o),"--section-radius":t===void 0?void 0:bt(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),gu=z((e,t)=>{let n=L(`ActionIconGroupSection`,null,e),{className:r,style:i,classNames:a,styles:o,unstyled:s,vars:c,variant:l,gradient:u,radius:d,autoContrast:f,attributes:p,...m}=n;return(0,I.jsx)(R,{...ii({name:`ActionIconGroupSection`,props:n,classes:du,className:r,style:i,classNames:a,styles:o,unstyled:s,attributes:p,vars:c,varsResolver:hu,rootSelector:`groupSection`})(`groupSection`),ref:t,variant:l,...m})});gu.classes=du,gu.displayName=`@mantine/core/ActionIconGroupSection`;var _u=On((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":vt(t,`ai-size`),"--ai-radius":n===void 0?void 0:bt(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),vu=Ui((e,t)=>{let n=L(`ActionIcon`,null,e),{className:r,unstyled:i,variant:a,classNames:o,styles:s,style:c,loading:l,loaderProps:u,size:d,color:f,radius:p,__staticSelector:m,gradient:h,vars:g,children:_,disabled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=n,w=ii({name:[`ActionIcon`,m],props:n,className:r,style:c,classes:du,classNames:o,styles:s,unstyled:i,attributes:S,vars:g,varsResolver:_u});return(0,I.jsxs)(gl,{...w(`root`,{active:!v&&!l&&!y}),...C,unstyled:i,variant:a,size:d,disabled:v||l,ref:t,mod:[{loading:l,disabled:v||y},x],children:[typeof l==`boolean`&&(0,I.jsx)(Hl,{mounted:l,transition:`slide-down`,duration:150,children:e=>(0,I.jsx)(R,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,I.jsx)(uu,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...u})})}),(0,I.jsx)(R,{component:`span`,mod:{loading:l},...w(`icon`),children:_})]})});vu.classes=du,vu.displayName=`@mantine/core/ActionIcon`,vu.Group=mu,vu.GroupSection=gu;var yu=(0,v.forwardRef)(({size:e=`var(--cb-icon-size, 70%)`,style:t,...n},r)=>(0,I.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},ref:r,...n,children:(0,I.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})}));yu.displayName=`@mantine/core/CloseIcon`;var bu={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},xu={variant:`subtle`},Su=On((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":vt(t,`cb-size`),"--cb-radius":n===void 0?void 0:bt(n),"--cb-icon-size":F(r)}})),Cu=Ui((e,t)=>{let n=L(`CloseButton`,xu,e),{iconSize:r,children:i,vars:a,radius:o,className:s,classNames:c,style:l,styles:u,unstyled:d,"data-disabled":f,disabled:p,variant:m,icon:h,mod:g,attributes:_,__staticSelector:v,...y}=n,b=ii({name:v||`CloseButton`,props:n,className:s,style:l,classes:bu,classNames:c,styles:u,unstyled:d,attributes:_,vars:a,varsResolver:Su});return(0,I.jsxs)(gl,{ref:t,...y,unstyled:d,variant:m,disabled:p,mod:[{disabled:p||f},g],...b(`root`,{variant:m,active:!p&&!f}),children:[h||(0,I.jsx)(yu,{}),i]})});Cu.classes=bu,Cu.displayName=`@mantine/core/CloseButton`;function wu(e){return v.Children.toArray(e).filter(Boolean)}var Tu={root:`m_4081bf90`},Eu={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},Du=On((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":yt(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),B=z((e,t)=>{let n=L(`Group`,Eu,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,children:c,gap:l,align:u,justify:d,wrap:f,grow:p,preventGrowOverflow:m,vars:h,variant:g,__size:_,mod:v,attributes:y,...b}=n,x=wu(c),S=x.length,C=yt(l??`md`);return(0,I.jsx)(R,{...ii({name:`Group`,props:n,stylesCtx:{childWidth:`calc(${100/S}% - (${C} - ${C} / ${S}))`},className:i,style:a,classes:Tu,classNames:r,styles:o,unstyled:s,attributes:y,vars:h,varsResolver:Du})(`root`),ref:t,variant:g,mod:[{grow:p},v],size:_,...b,children:x})});B.classes=Tu,B.displayName=`@mantine/core/Group`;var[Ou,ku]=ot(`ModalBase component was not found in tree`);function Au({opened:e,transitionDuration:t}){let[n,r]=(0,v.useState)(e),i=(0,v.useRef)(-1),a=pn()?0:t;return(0,v.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function ju({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:a,returnFocus:o}){let s=rn(e),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),f=Au({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return an(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&a()},{capture:!0}),Ht({opened:n,shouldReturnFocus:r&&o}),{_id:s,titleMounted:c,bodyMounted:u,shouldLockScroll:f,setTitleMounted:l,setBodyMounted:d}}var Mu=(0,v.forwardRef)(({keepMounted:e,opened:t,onClose:n,id:r,transitionProps:i,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:s,closeOnEscape:c,returnFocus:l,closeOnClickOutside:u,withinPortal:d,portalProps:f,lockScroll:p,children:m,zIndex:h,shadow:g,padding:_,__vars:v,unstyled:y,removeScrollProps:b,...x},S)=>{let{_id:C,titleMounted:w,bodyMounted:T,shouldLockScroll:E,setTitleMounted:D,setBodyMounted:O}=ju({id:r,transitionProps:i,opened:t,trapFocus:s,closeOnEscape:c,onClose:n,returnFocus:l}),{key:k,...A}=b||{};return(0,I.jsx)(Il,{...f,withinPortal:d,children:(0,I.jsx)(Ou,{value:{opened:t,onClose:n,closeOnClickOutside:u,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...i,keepMounted:e},getTitleId:()=>`${C}-title`,getBodyId:()=>`${C}-body`,titleMounted:w,bodyMounted:T,setTitleMounted:D,setBodyMounted:O,trapFocus:s,closeOnEscape:c,zIndex:h,unstyled:y},children:(0,I.jsx)(Ke,{enabled:E&&p,...A,children:(0,I.jsx)(R,{ref:S,...x,__vars:{...v,"--mb-z-index":(h||ht(`modal`)).toString(),"--mb-shadow":Ct(g),"--mb-padding":yt(_)},children:m})},k)})})});Mu.displayName=`@mantine/core/ModalBase`;var Nu={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function Pu(){let e=ku();return(0,v.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Fu=(0,v.forwardRef)(({className:e,...t},n)=>{let r=Pu(),i=ku();return(0,I.jsx)(R,{ref:n,...t,id:r,className:An({[Nu.body]:!i.unstyled},e)})});Fu.displayName=`@mantine/core/ModalBaseBody`;var Iu=(0,v.forwardRef)(({className:e,onClick:t,...n},r)=>{let i=ku();return(0,I.jsx)(Cu,{ref:r,...n,onClick:e=>{i.onClose(),t?.(e)},className:An({[Nu.close]:!i.unstyled},e),unstyled:i.unstyled})});Iu.displayName=`@mantine/core/ModalBaseCloseButton`;var Lu=(0,v.forwardRef)(({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,...a},o)=>{let s=ku();return(0,I.jsx)(Hl,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,I.jsx)(`div`,{...n,className:An({[Nu.inner]:!s.unstyled},n.className),children:(0,I.jsx)(Kl,{active:s.opened&&s.trapFocus,innerRef:o,children:(0,I.jsx)(xl,{...a,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:An({[Nu.content]:!s.unstyled},t),unstyled:s.unstyled,children:a.children})})})})});Lu.displayName=`@mantine/core/ModalBaseContent`;var Ru=(0,v.forwardRef)(({className:e,...t},n)=>{let r=ku();return(0,I.jsx)(R,{component:`header`,ref:n,className:An({[Nu.header]:!r.unstyled},e),...t})});Ru.displayName=`@mantine/core/ModalBaseHeader`;var zu={duration:200,timingFunction:`ease`,transition:`fade`};function Bu(e){let t=ku();return{...zu,...t.transitionProps,...e}}var Vu=(0,v.forwardRef)(({onClick:e,transitionProps:t,style:n,visible:r,...i},a)=>{let o=ku(),s=Bu(t);return(0,I.jsx)(Hl,{mounted:r===void 0?o.opened:r,...s,transition:`fade`,children:t=>(0,I.jsx)(jl,{ref:a,fixed:!0,style:[n,t],zIndex:o.zIndex,unstyled:o.unstyled,onClick:t=>{e?.(t),o.closeOnClickOutside&&o.onClose()},...i})})});Vu.displayName=`@mantine/core/ModalBaseOverlay`;function Hu(){let e=ku();return(0,v.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}var Uu=(0,v.forwardRef)(({className:e,...t},n)=>{let r=Hu(),i=ku();return(0,I.jsx)(R,{component:`h2`,ref:n,className:An({[Nu.title]:!i.unstyled},e),...t,id:r})});Uu.displayName=`@mantine/core/ModalBaseTitle`;function Wu({children:e}){return(0,I.jsx)(I.Fragment,{children:e})}var[Gu,Ku]=st({size:`sm`}),qu={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,description:`m_fe47ce59`},Ju=z((e,t)=>{let n=L(`InputClearButton`,null,e),{size:r,variant:i,vars:a,classNames:o,styles:s,...c}=n,l=Ku(),{resolvedClassNames:u,resolvedStyles:d}=Vr({classNames:o,styles:s,props:n});return(0,I.jsx)(Cu,{variant:i||`transparent`,ref:t,size:r||l?.size||`sm`,classNames:u,styles:d,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...c.style},...c})});Ju.displayName=`@mantine/core/InputClearButton`;var Yu={xs:7,sm:8,md:10,lg:12,xl:15};function Xu({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`}){let a=e&&t;return a&&(n||r)?(0,I.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:Yu[i]},children:[a,n||r]}):n===null?null:n||a||r}var[Zu,Qu]=st({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),$u=On((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${xt(t)} - ${F(2)})`}})),ed=z((e,t)=>{let n=L(`InputDescription`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,size:l,__staticSelector:u,__inheritStyles:d=!0,attributes:f,variant:p,...m}=L(`InputDescription`,null,n),h=Qu(),g=ii({name:[`InputWrapper`,u],props:n,classes:qu,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:f,rootSelector:`description`,vars:c,varsResolver:$u});return(0,I.jsx)(R,{component:`p`,ref:t,variant:p,size:l,...(d&&h?.getStyles||g)(`description`,h?.getStyles?{className:i,style:a}:void 0),...m})});ed.classes=qu,ed.displayName=`@mantine/core/InputDescription`;var td=On((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${xt(t)} - ${F(2)})`}})),nd=z((e,t)=>{let n=L(`InputError`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,size:l,attributes:u,__staticSelector:d,__inheritStyles:f=!0,variant:p,...m}=n,h=ii({name:[`InputWrapper`,d],props:n,classes:qu,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:u,rootSelector:`error`,vars:c,varsResolver:td}),g=Qu();return(0,I.jsx)(R,{component:`p`,ref:t,variant:p,size:l,...(f&&g?.getStyles||h)(`error`,g?.getStyles?{className:i,style:a}:void 0),...m})});nd.classes=qu,nd.displayName=`@mantine/core/InputError`;var rd={labelElement:`label`},id=On((e,{size:t})=>({label:{"--input-label-size":xt(t),"--input-asterisk-color":void 0}})),ad=z((e,t)=>{let n=L(`InputLabel`,rd,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,labelElement:l,size:u,required:d,htmlFor:f,onMouseDown:p,children:m,__staticSelector:h,variant:g,mod:_,attributes:v,...y}=L(`InputLabel`,rd,n),b=ii({name:[`InputWrapper`,h],props:n,classes:qu,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:v,rootSelector:`label`,vars:c,varsResolver:id}),x=Qu(),S=x?.getStyles||b;return(0,I.jsxs)(R,{...S(`label`,x?.getStyles?{className:i,style:a}:void 0),component:l,variant:g,size:u,ref:t,htmlFor:l===`label`?f:void 0,mod:[{required:d},_],onMouseDown:e=>{p?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...y,children:[m,d&&(0,I.jsx)(`span`,{...S(`required`),"aria-hidden":!0,children:` *`})]})});ad.classes=qu,ad.displayName=`@mantine/core/InputLabel`;var od=z((e,t)=>{let n=L(`InputPlaceholder`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,__staticSelector:l,variant:u,error:d,mod:f,attributes:p,...m}=n;return(0,I.jsx)(R,{...ii({name:[`InputPlaceholder`,l],props:n,classes:qu,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:p,rootSelector:`placeholder`})(`placeholder`),mod:[{error:!!d},f],component:`span`,variant:u,ref:t,...m})});od.classes=qu,od.displayName=`@mantine/core/InputPlaceholder`;function sd(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var cd={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},ld=On((e,{size:t})=>({label:{"--input-label-size":xt(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${xt(t)} - ${F(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${xt(t)} - ${F(2)})`}})),ud=z((e,t)=>{let n=L(`InputWrapper`,cd,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,size:l,variant:u,__staticSelector:d,inputContainer:f,inputWrapperOrder:p,label:m,error:h,description:g,labelProps:_,descriptionProps:y,errorProps:b,labelElement:x,children:S,withAsterisk:C,id:w,required:T,__stylesApiProps:E,mod:D,attributes:O,...k}=n,A=ii({name:[`InputWrapper`,d],props:E||n,classes:qu,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:O,vars:c,varsResolver:ld}),j={size:l,variant:u,__staticSelector:d},ee=rn(w),te=typeof C==`boolean`?C:T,ne=b?.id||`${ee}-error`,re=y?.id||`${ee}-description`,M=ee,N=!!h&&typeof h!=`boolean`,ie=!!g,ae=`${N?ne:``} ${ie?re:``}`,oe=ae.trim().length>0?ae.trim():void 0,se=_?.id||`${ee}-label`,ce=m&&(0,I.jsx)(ad,{labelElement:x,id:se,htmlFor:M,required:te,...j,..._,children:m},`label`),le=ie&&(0,I.jsx)(ed,{...y,...j,size:y?.size||j.size,id:y?.id||re,children:g},`description`),ue=(0,I.jsx)(v.Fragment,{children:f(S)},`input`),de=N&&(0,v.createElement)(nd,{...b,...j,size:b?.size||j.size,key:`error`,id:b?.id||ne},h),fe=p.map(e=>{switch(e){case`label`:return ce;case`input`:return ue;case`description`:return le;case`error`:return de;default:return null}});return(0,I.jsx)(Zu,{value:{getStyles:A,describedBy:oe,inputId:M,labelId:se,...sd(p,{hasDescription:ie,hasError:N})},children:(0,I.jsx)(R,{ref:t,variant:u,size:l,mod:[{error:!!h},D],...A(`root`),...k,children:fe})})});ud.classes=qu,ud.displayName=`@mantine/core/InputWrapper`;var dd={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,size:`sm`},fd=On((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":vt(t.size,`input-height`),"--input-fz":xt(t.size),"--input-radius":t.radius===void 0?void 0:bt(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:F(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:F(t.rightSectionWidth),"--input-padding-y":t.multiline?vt(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),pd=Ui((e,t)=>{let n=L(`Input`,dd,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,required:c,__staticSelector:l,__stylesApiProps:u,size:d,wrapperProps:f,error:p,disabled:m,leftSection:h,leftSectionProps:g,leftSectionWidth:_,rightSection:v,rightSectionProps:y,rightSectionWidth:b,rightSectionPointerEvents:x,leftSectionPointerEvents:S,variant:C,vars:w,pointer:T,multiline:E,radius:D,id:O,withAria:k,withErrorStyles:A,mod:j,inputSize:ee,attributes:te,__clearSection:ne,__clearable:re,__defaultRightSection:M,...N}=n,{styleProps:ie,rest:ae}=li(N),oe=Qu(),se={offsetBottom:oe?.offsetBottom,offsetTop:oe?.offsetTop},ce=ii({name:[`Input`,l],props:u||n,classes:qu,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:te,stylesCtx:se,rootSelector:`wrapper`,vars:w,varsResolver:fd}),le=k?{required:c,disabled:m,"aria-invalid":!!p,"aria-describedby":oe?.describedBy,id:oe?.inputId||O}:{},ue=Xu({__clearable:re,__clearSection:ne,rightSection:v,__defaultRightSection:M,size:d});return(0,I.jsx)(Gu,{value:{size:d||`sm`},children:(0,I.jsxs)(R,{...ce(`wrapper`),...ie,...f,mod:[{error:!!p&&A,pointer:T,disabled:m,multiline:E,"data-with-right-section":!!ue,"data-with-left-section":!!h},j],variant:C,size:d,children:[h&&(0,I.jsx)(`div`,{...g,"data-position":`left`,...ce(`section`,{className:g?.className,style:g?.style}),children:h}),(0,I.jsx)(R,{component:`input`,...ae,...le,ref:t,required:c,mod:{disabled:m,error:!!p&&A},variant:C,__size:ee,...ce(`input`)}),ue&&(0,I.jsx)(`div`,{...y,"data-position":`right`,...ce(`section`,{className:y?.className,style:y?.style}),children:ue})]})})});pd.classes=qu,pd.Wrapper=ud,pd.Label=ad,pd.Error=nd,pd.Description=ed,pd.Placeholder=od,pd.ClearButton=Ju,pd.displayName=`@mantine/core/Input`;function md(e,t,n){let r=L(e,t,n),{label:i,description:a,error:o,required:s,classNames:c,styles:l,className:u,unstyled:d,__staticSelector:f,__stylesApiProps:p,errorProps:m,labelProps:h,descriptionProps:g,wrapperProps:_,id:v,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,vars:T,mod:E,attributes:D,...O}=r,{styleProps:k,rest:A}=li(O),j={label:i,description:a,error:o,required:s,classNames:c,className:u,__staticSelector:f,__stylesApiProps:p||r,errorProps:m,labelProps:h,descriptionProps:g,unstyled:d,styles:l,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,id:v,mod:E,attributes:D,..._};return{...A,classNames:c,styles:l,unstyled:d,wrapperProps:{...j,...k},inputProps:{required:s,classNames:c,styles:l,unstyled:d,size:y,__staticSelector:f,__stylesApiProps:p||r,error:o,variant:w,id:v,attributes:D}}}var hd={__staticSelector:`InputBase`,withAria:!0,size:`sm`},gd=Ui((e,t)=>{let{inputProps:n,wrapperProps:r,...i}=md(`InputBase`,hd,e);return(0,I.jsx)(pd.Wrapper,{...r,children:(0,I.jsx)(pd,{...n,...i,ref:t})})});gd.classes={...pd.classes,...pd.Wrapper.classes},gd.displayName=`@mantine/core/InputBase`;var _d={root:`m_96b553a6`};function vd(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function yd({target:e,parent:t,ref:n,displayAfterTransitionEnd:r}){let i=(0,v.useRef)(-1),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(typeof r==`boolean`?r:!1),l=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=window.getComputedStyle(e),o=window.getComputedStyle(t),s=Jc(a.borderTopWidth)+Jc(o.borderTopWidth),c=Jc(a.borderLeftWidth)+Jc(o.borderLeftWidth),l={top:r.top-i.top-s,left:r.left-i.left-c,width:r.width,height:r.height};n.current.style.transform=`translateY(${l.top}px) translateX(${l.left}px)`,n.current.style.width=`${l.width}px`,n.current.style.height=`${l.height}px`},u=()=>{window.clearTimeout(i.current),n.current&&(n.current.style.transitionDuration=`0ms`),l(),i.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},d=(0,v.useRef)(null),f=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(l(),e)return d.current=new ResizeObserver(u),d.current.observe(e),t&&(f.current=new ResizeObserver(u),f.current.observe(t)),()=>{d.current?.disconnect(),f.current?.disconnect()}},[t,e]),(0,v.useEffect)(()=>{if(t){let e=e=>{vd(e.target,t)&&(u(),c(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),vn(()=>{Sn()!==`test`&&o(!0)},20,{autoInvoke:!0}),bn(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&u()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:a,hidden:s}}var bd=On((e,{transitionDuration:t})=>({root:{"--transition-duration":typeof t==`number`?`${t}ms`:t}})),xd=z((e,t)=>{let n=L(`FloatingIndicator`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,target:l,parent:u,transitionDuration:d,mod:f,displayAfterTransitionEnd:p,attributes:m,...h}=n,g=ii({name:`FloatingIndicator`,classes:_d,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:m,vars:c,varsResolver:bd}),_=(0,v.useRef)(null),{initialized:y,hidden:b}=yd({target:l,parent:u,ref:_,displayAfterTransitionEnd:p}),x=cn(t,_);return!l||!u?null:(0,I.jsx)(R,{ref:x,mod:[{initialized:y,hidden:b},f],...g(`root`),...h})});xd.displayName=`@mantine/core/FloatingIndicator`,xd.classes=_d;function Sd({open:e,close:t,openDelay:n,closeDelay:r}){let i=(0,v.useRef)(-1),a=(0,v.useRef)(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(a.current)};return(0,v.useEffect)(()=>o,[]),{openDropdown:()=>{o(),n===0||n===void 0?e():i.current=window.setTimeout(e,n)},closeDropdown:()=>{o(),r===0||r===void 0?t():a.current=window.setTimeout(t,r)}}}var[Cd,wd]=ot(`Accordion component was not found in the tree`),Td={root:`m_9bdbb667`,panel:`m_df78851f`,content:`m_4ba554d4`,itemTitle:`m_8fa820a0`,control:`m_4ba585b8`,"control--default":`m_6939a5e9`,"control--contained":`m_4271d21b`,label:`m_df3ffa0f`,chevron:`m_3f35ae96`,icon:`m_9bd771fe`,item:`m_9bd7b098`,"item--default":`m_fe19b709`,"item--contained":`m_1f921b3b`,"item--filled":`m_2cdf939a`,"item--separated":`m_9f59b069`};function Ed({style:e,size:t=16,...n}){return(0,I.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:F(t),height:F(t),display:`block`},...n,children:(0,I.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}Ed.displayName=`@mantine/core/AccordionChevron`;var[Dd,Od]=ot(`Accordion.Item component was not found in the tree`),kd=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,chevron:s,icon:c,onClick:l,onKeyDown:u,children:d,disabled:f,mod:p,...m}=L(`AccordionControl`,null,e),{value:h}=Od(),g=wd(),_=g.isItemActive(h),v=typeof g.order==`number`,y=`h${g.order}`,b=(0,I.jsxs)(gl,{...m,...g.getStyles(`control`,{className:r,classNames:n,style:i,styles:a,variant:g.variant}),unstyled:g.unstyled,mod:[`accordion-control`,{active:_,"chevron-position":g.chevronPosition,disabled:f},p],ref:t,onClick:e=>{l?.(e),g.onChange(h)},type:`button`,disabled:f,"aria-expanded":_,"aria-controls":g.getRegionId(h),id:g.getControlId(h),onKeyDown:pt({siblingSelector:`[data-accordion-control]`,parentSelector:`[data-accordion]`,activateOnFocus:!1,loop:g.loop,orientation:`vertical`,onKeyDown:u}),children:[(0,I.jsx)(R,{component:`span`,mod:{rotate:!g.disableChevronRotation&&_,position:g.chevronPosition},...g.getStyles(`chevron`,{classNames:n,styles:a}),children:s||g.chevron}),(0,I.jsx)(`span`,{...g.getStyles(`label`,{classNames:n,styles:a}),children:d}),c&&(0,I.jsx)(R,{component:`span`,mod:{"chevron-position":g.chevronPosition},...g.getStyles(`icon`,{classNames:n,styles:a}),children:c})]});return v?(0,I.jsx)(y,{...g.getStyles(`itemTitle`,{classNames:n,styles:a}),children:b}):b});kd.displayName=`@mantine/core/AccordionControl`,kd.classes=Td;var Ad=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,value:s,mod:c,...l}=L(`AccordionItem`,null,e),u=wd();return(0,I.jsx)(Dd,{value:{value:s},children:(0,I.jsx)(R,{ref:t,mod:[{active:u.isItemActive(s)},c],...u.getStyles(`item`,{className:r,classNames:n,styles:a,style:i,variant:u.variant}),...l})})});Ad.displayName=`@mantine/core/AccordionItem`,Ad.classes=Td;var jd=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,children:s,...c}=L(`AccordionPanel`,null,e),{value:l}=Od(),u=wd();return(0,I.jsx)(ea,{ref:t,...u.getStyles(`panel`,{className:r,classNames:n,style:i,styles:a}),...c,in:u.isItemActive(l),transitionDuration:u.transitionDuration??200,role:`region`,id:u.getRegionId(l),"aria-labelledby":u.getControlId(l),children:(0,I.jsx)(`div`,{...u.getStyles(`content`,{classNames:n,styles:a}),children:s})})});jd.displayName=`@mantine/core/AccordionPanel`,jd.classes=Td;var Md={multiple:!1,disableChevronRotation:!1,chevronPosition:`right`,variant:`default`,chevronSize:`auto`,chevronIconSize:16},Nd=On((e,{transitionDuration:t,chevronSize:n,radius:r})=>({root:{"--accordion-transition-duration":t===void 0?void 0:`${t}ms`,"--accordion-chevron-size":n===void 0?void 0:F(n),"--accordion-radius":r===void 0?void 0:bt(r)}}));function Pd(e){let t=L(`Accordion`,Md,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,multiple:l,value:u,defaultValue:d,onChange:f,id:p,loop:m,transitionDuration:h,disableChevronRotation:g,chevronPosition:_,chevronSize:v,order:y,chevron:b,variant:x,radius:S,chevronIconSize:C,attributes:w,...T}=t,E=rn(p),[D,O]=ln({value:u,defaultValue:d,finalValue:l?[]:null,onChange:f}),k=e=>Array.isArray(D)?D.includes(e):e===D,A=e=>{O(Array.isArray(D)?D.includes(e)?D.filter(t=>t!==e):[...D,e]:e===D?null:e)},j=ii({name:`Accordion`,classes:Td,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,varsResolver:Nd});return(0,I.jsx)(Cd,{value:{isItemActive:k,onChange:A,getControlId:ct(`${E}-control`,`Accordion.Item component was rendered with invalid value or without value`),getRegionId:ct(`${E}-panel`,`Accordion.Item component was rendered with invalid value or without value`),chevron:b===null?null:b||(0,I.jsx)(Ed,{size:C}),transitionDuration:h,disableChevronRotation:g,chevronPosition:_,order:y,loop:m,getStyles:j,variant:x,unstyled:o},children:(0,I.jsx)(R,{...j(`root`),id:E,...T,variant:x,"data-accordion":!0,children:c})})}Pd.extend=e=>e,Pd.withProps=Hi(Pd),Pd.classes=Td,Pd.displayName=`@mantine/core/Accordion`,Pd.Item=Ad,Pd.Panel=jd,Pd.Control=kd,Pd.Chevron=Ed;var Fd={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},Id=On((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:bt(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),Ld=z((e,t)=>{let n=L(`Alert`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,radius:l,color:u,title:d,children:f,id:p,icon:m,withCloseButton:h,onClose:g,closeButtonLabel:_,variant:v,autoContrast:y,role:b,attributes:x,...S}=n,C=ii({name:`Alert`,classes:Fd,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:x,vars:c,varsResolver:Id}),w=rn(p),T=d&&`${w}-title`||void 0,E=`${w}-body`;return(0,I.jsx)(R,{id:w,...C(`root`,{variant:v}),variant:v,ref:t,role:b||`alert`,...S,"aria-describedby":f?E:void 0,"aria-labelledby":d?T:void 0,children:(0,I.jsxs)(`div`,{...C(`wrapper`),children:[m&&(0,I.jsx)(`div`,{...C(`icon`),children:m}),(0,I.jsxs)(`div`,{...C(`body`),children:[d&&(0,I.jsx)(`div`,{...C(`title`),"data-with-close-button":h||void 0,children:(0,I.jsx)(`span`,{id:T,...C(`label`),children:d})}),f&&(0,I.jsx)(`div`,{id:E,...C(`message`),"data-variant":v,children:f})]}),h&&(0,I.jsx)(Cu,{...C(`closeButton`),onClick:g,variant:`transparent`,size:16,iconSize:16,"aria-label":_,unstyled:s})]})})});Ld.classes=Fd,Ld.displayName=`@mantine/core/Alert`;var Rd={root:`m_b6d8b162`};function zd(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var Bd={inherit:!1},Vd=On((e,{variant:t,lineClamp:n,gradient:r,size:i,color:a})=>({root:{"--text-fz":xt(i),"--text-lh":St(i),"--text-gradient":t===`gradient`?ir(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-color":a?rr(a,e):void 0}})),V=Ui((e,t)=>{let n=L(`Text`,Bd,e),{lineClamp:r,truncate:i,inline:a,inherit:o,gradient:s,span:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=n;return(0,I.jsx)(R,{...ii({name:[`Text`,l],props:n,classes:Rd,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:Vd})(`root`,{focusable:!0}),ref:t,component:c?`span`:`p`,variant:g,mod:[{"data-truncate":zd(i),"data-line-clamp":typeof r==`number`,"data-inline":a,"data-inherit":o},_],size:v,...b})});V.classes=Rd,V.displayName=`@mantine/core/Text`;var Hd={root:`m_849cf0da`},Ud={underline:`hover`},Wd=Ui((e,t)=>{let{underline:n,className:r,unstyled:i,mod:a,...o}=L(`Anchor`,Ud,e);return(0,I.jsx)(V,{component:`a`,ref:t,className:An({[Hd.root]:!i},r),...o,mod:[{underline:n},a],__staticSelector:`Anchor`,unstyled:i})});Wd.classes=Hd,Wd.displayName=`@mantine/core/Anchor`;var[Gd,Kd]=ot(`AppShell was not found in tree`),qd={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},Jd=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,withBorder:c,zIndex:l,mod:u,...d}=L(`AppShellAside`,null,e),f=Kd();return f.disabled?null:(0,I.jsx)(R,{component:`aside`,ref:t,mod:[{"with-border":c??f.withBorder},u],...f.getStyles(`aside`,{className:An({[Ke.classNames.zeroRight]:f.offsetScrollbars},r),classNames:n,styles:a,style:i}),...d,__vars:{"--app-shell-aside-z-index":`calc(${l??f.zIndex} + 1)`}})});Jd.classes=qd,Jd.displayName=`@mantine/core/AppShellAside`;var Yd=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,withBorder:c,zIndex:l,mod:u,...d}=L(`AppShellFooter`,null,e),f=Kd();return f.disabled?null:(0,I.jsx)(R,{component:`footer`,ref:t,mod:[{"with-border":c??f.withBorder},u],...f.getStyles(`footer`,{className:An({[Ke.classNames.zeroRight]:f.offsetScrollbars},r),classNames:n,styles:a,style:i}),...d,__vars:{"--app-shell-footer-z-index":(l??f.zIndex)?.toString()}})});Yd.classes=qd,Yd.displayName=`@mantine/core/AppShellFooter`;var Xd=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,withBorder:c,zIndex:l,mod:u,...d}=L(`AppShellHeader`,null,e),f=Kd();return f.disabled?null:(0,I.jsx)(R,{component:`header`,ref:t,mod:[{"with-border":c??f.withBorder},u],...f.getStyles(`header`,{className:An({[Ke.classNames.zeroRight]:f.offsetScrollbars},r),classNames:n,styles:a,style:i}),...d,__vars:{"--app-shell-header-z-index":(l??f.zIndex)?.toString()}})});Xd.classes=qd,Xd.displayName=`@mantine/core/AppShellHeader`;var Zd=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`AppShellMain`,null,e);return(0,I.jsx)(R,{component:`main`,ref:t,...Kd().getStyles(`main`,{className:r,style:i,classNames:n,styles:a}),...s})});Zd.classes=qd,Zd.displayName=`@mantine/core/AppShellMain`;function Qd(e){return typeof e==`object`?e.base:e}function $d(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function ef(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function tf({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),$d(o)){let t=F(Qd(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(ef(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=F(o.base),e[`--app-shell-aside-offset`]=F(o.base)),qe(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=F(o[e]),t[e][`--app-shell-aside-offset`]=F(o[e]))})),r?.breakpoint&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=Tt(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function nf({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),$d(i)){let t=F(Qd(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}ef(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=F(i.base),a&&(e[`--app-shell-footer-offset`]=F(i.base))),qe(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=F(i[e]),a&&(t[e][`--app-shell-footer-offset`]=F(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function rf({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),$d(i)){let t=F(Qd(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}ef(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=F(i.base),a&&(e[`--app-shell-header-offset`]=F(i.base))),qe(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=F(i[e]),a&&(t[e][`--app-shell-header-offset`]=F(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function af({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),$d(o)){let t=F(Qd(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(ef(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=F(o.base),e[`--app-shell-navbar-offset`]=F(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=F(o.base))),qe(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=F(o[e]),t[e][`--app-shell-navbar-offset`]=F(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=F(o[e])))})),r?.breakpoint&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=Tt(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function of(e){return Number(e)===0?`0px`:yt(e)}function sf({padding:e,baseStyles:t,minMediaStyles:n}){$d(e)&&(t[`--app-shell-padding`]=of(Qd(e))),ef(e)&&(e.base&&(t[`--app-shell-padding`]=of(e.base)),qe(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=of(e[t]))}))}function cf({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),af({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),tf({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),rf({baseStyles:l,minMediaStyles:s,header:t,mode:o}),nf({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),sf({baseStyles:l,minMediaStyles:s,padding:i});let u=Et(qe(s),a.breakpoints).map(e=>({query:`(min-width: ${tt(e.px)})`,styles:s[e.value]})),d=Et(qe(c),a.breakpoints).map(e=>({query:`(max-width: ${tt(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function lf({navbar:e,header:t,aside:n,footer:r,padding:i,mode:a,selector:o}){let s=br(),c=In(),{media:l,baseStyles:u}=cf({navbar:e,header:t,footer:r,aside:n,padding:i,theme:s,mode:a});return(0,I.jsx)(ci,{media:l,styles:u,selector:o||c.cssVariablesSelector})}var uf=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,withBorder:c,zIndex:l,mod:u,...d}=L(`AppShellNavbar`,null,e),f=Kd();return f.disabled?null:(0,I.jsx)(R,{component:`nav`,ref:t,mod:[{"with-border":c??f.withBorder},u],...f.getStyles(`navbar`,{className:r,classNames:n,styles:a,style:i}),...d,__vars:{"--app-shell-navbar-z-index":`calc(${l??f.zIndex} + 1)`}})});uf.classes=qd,uf.displayName=`@mantine/core/AppShellNavbar`;var df=Ui((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,grow:s,mod:c,...l}=L(`AppShellSection`,null,e),u=Kd();return(0,I.jsx)(R,{ref:t,mod:[{grow:s},c],...u.getStyles(`section`,{className:r,style:i,classNames:n,styles:a}),...l})});df.classes=qd,df.displayName=`@mantine/core/AppShellSection`;function ff({transitionDuration:e,disabled:t}){let[n,r]=(0,v.useState)(!0),i=(0,v.useRef)(-1),a=(0,v.useRef)(-1);return an(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,v.startTransition)(()=>{r(!1)}),200)}),Bt(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,v.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var pf={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:ht(`app`),mode:`fixed`},mf=On((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),hf=z((e,t)=>{let n=L(`AppShell`,pf,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,navbar:l,withBorder:u,padding:d,transitionDuration:f,transitionTimingFunction:p,header:m,zIndex:h,layout:g,disabled:_,aside:v,footer:y,offsetScrollbars:b=!0,mode:x,mod:S,attributes:C,id:w,...T}=n,E=ii({name:`AppShell`,classes:qd,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:C,vars:c,varsResolver:mf}),D=ff({disabled:_,transitionDuration:f}),O=rn(w);return(0,I.jsxs)(Gd,{value:{getStyles:E,withBorder:u,zIndex:h,disabled:_,offsetScrollbars:b,mode:x},children:[(0,I.jsx)(lf,{navbar:l,header:m,aside:v,footer:y,padding:d,mode:x,selector:x===`static`?`#${O}`:void 0}),(0,I.jsx)(R,{ref:t,...E(`root`),mod:[{resizing:D,layout:g,disabled:_,mode:x},S],id:O,...T})]})});hf.classes=qd,hf.displayName=`@mantine/core/AppShell`,hf.Navbar=uf,hf.Header=Xd,hf.Main=Zd,hf.Aside=Jd,hf.Footer=Yd,hf.Section=df;function gf(e){return typeof e==`string`?{value:e,label:e}:`value`in e&&!(`label`in e)?{value:e.value,label:e.value,disabled:e.disabled}:typeof e==`number`?{value:e.toString(),label:e.toString()}:`group`in e?{group:e.group,items:e.items.map(e=>gf(e))}:e}function _f(e){return e?e.map(e=>gf(e)):[]}function vf(e){return e.reduce((e,t)=>`group`in t?{...e,...vf(t.items)}:(e[t.value]=t,e),{})}var yf={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},bf={error:null},xf=On((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":vt(t,`combobox-chevron-size`),"--combobox-chevron-color":n?rr(n,e):void 0}})),Sf=z((e,t)=>{let n=L(`ComboboxChevron`,bf,e),{size:r,error:i,style:a,className:o,classNames:s,styles:c,unstyled:l,vars:u,mod:d,...f}=n,p=ii({name:`ComboboxChevron`,classes:yf,props:n,style:a,className:o,classNames:s,styles:c,unstyled:l,vars:u,varsResolver:xf,rootSelector:`chevron`});return(0,I.jsx)(R,{component:`svg`,...f,...p(`chevron`),size:r,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:i},d],ref:t,children:(0,I.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});Sf.classes=yf,Sf.displayName=`@mantine/core/ComboboxChevron`;var[Cf,wf]=ot(`Combobox component was not found in tree`),Tf=(0,v.forwardRef)(({size:e,onMouseDown:t,onClick:n,onClear:r,...i},a)=>(0,I.jsx)(pd.ClearButton,{ref:a,tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:e=>{e.preventDefault(),t?.(e)},onClick:e=>{r(),n?.(e)}}));Tf.displayName=`@mantine/core/ComboboxClearButton`;var Ef=z((e,t)=>{let{classNames:n,styles:r,className:i,style:a,hidden:o,...s}=L(`ComboboxDropdown`,null,e),c=wf();return(0,I.jsx)(nu.Dropdown,{...s,ref:t,role:`presentation`,"data-hidden":o||void 0,...c.getStyles(`dropdown`,{className:i,style:a,classNames:n,styles:r})})});Ef.classes=yf,Ef.displayName=`@mantine/core/ComboboxDropdown`;var Df={refProp:`ref`},Of=z((e,t)=>{let{children:n,refProp:r}=L(`ComboboxDropdownTarget`,Df,e);if(wf(),!it(n))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,I.jsx)(nu.Target,{ref:t,refProp:r,children:n})});Of.displayName=`@mantine/core/ComboboxDropdownTarget`;var kf=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`ComboboxEmpty`,null,e);return(0,I.jsx)(R,{ref:t,...wf().getStyles(`empty`,{className:r,classNames:n,styles:a,style:i}),...s})});kf.classes=yf,kf.displayName=`@mantine/core/ComboboxEmpty`;function Af({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:n,withExpandedAttribute:r,targetType:i,autoComplete:a}){let o=wf(),[s,c]=(0,v.useState)(null),l=n=>{if(e?.(n),!o.readOnly&&t){if(n.nativeEvent.isComposing)return;if(n.nativeEvent.code===`ArrowDown`&&(n.preventDefault(),o.store.dropdownOpened?c(o.store.selectNextOption()):(o.store.openDropdown(`keyboard`),c(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),n.nativeEvent.code===`ArrowUp`&&(n.preventDefault(),o.store.dropdownOpened?c(o.store.selectPreviousOption()):(o.store.openDropdown(`keyboard`),c(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),n.nativeEvent.code===`Enter`||n.nativeEvent.code===`NumpadEnter`){if(n.nativeEvent.keyCode===229)return;let e=o.store.getSelectedOptionIndex();o.store.dropdownOpened&&e!==-1?(n.preventDefault(),o.store.clickSelectedOption()):i===`button`&&(n.preventDefault(),o.store.openDropdown(`keyboard`))}n.key===`Escape`&&o.store.closeDropdown(`keyboard`),n.nativeEvent.code===`Space`&&i===`button`&&(n.preventDefault(),o.store.toggleDropdown(`keyboard`))}};return{...n?{"aria-haspopup":`listbox`,"aria-expanded":r?!!(o.store.listId&&o.store.dropdownOpened):void 0,"aria-controls":o.store.dropdownOpened&&o.store.listId?o.store.listId:void 0,"aria-activedescendant":o.store.dropdownOpened&&s||void 0,autoComplete:a,"data-expanded":o.store.dropdownOpened||void 0,"data-mantine-stop-propagation":o.store.dropdownOpened||void 0}:{},onKeyDown:l}}var jf={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Mf=z((e,t)=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,...l}=L(`ComboboxEventsTarget`,jf,e),u=Dn(n);if(!u)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=wf();return(0,v.cloneElement)(u,{...Af({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:u.props.onKeyDown,autoComplete:c}),...l,[r]:cn(t,d.store.targetRef,Cn(u))})});Mf.displayName=`@mantine/core/ComboboxEventsTarget`;var Nf=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`ComboboxFooter`,null,e);return(0,I.jsx)(R,{ref:t,...wf().getStyles(`footer`,{className:r,classNames:n,style:i,styles:a}),...s,onMouseDown:e=>{e.preventDefault()}})});Nf.classes=yf,Nf.displayName=`@mantine/core/ComboboxFooter`;var Pf=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,children:s,label:c,id:l,...u}=L(`ComboboxGroup`,null,e),d=wf(),f=rn(l);return(0,I.jsxs)(R,{ref:t,role:`group`,"aria-labelledby":c?f:void 0,...d.getStyles(`group`,{className:r,classNames:n,style:i,styles:a}),...u,children:[c&&(0,I.jsx)(`div`,{id:f,...d.getStyles(`groupLabel`,{classNames:n,styles:a}),children:c}),s]})});Pf.classes=yf,Pf.displayName=`@mantine/core/ComboboxGroup`;var Ff=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`ComboboxHeader`,null,e);return(0,I.jsx)(R,{ref:t,...wf().getStyles(`header`,{className:r,classNames:n,style:i,styles:a}),...s,onMouseDown:e=>{e.preventDefault()}})});Ff.classes=yf,Ff.displayName=`@mantine/core/ComboboxHeader`;function If({value:e,valuesDivider:t=`,`,...n}){return(0,I.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e||``,...n})}If.displayName=`@mantine/core/ComboboxHiddenInput`;var Lf=z((e,t)=>{let n=L(`ComboboxOption`,null,e),{classNames:r,className:i,style:a,styles:o,vars:s,onClick:c,id:l,active:u,onMouseDown:d,onMouseOver:f,disabled:p,selected:m,mod:h,...g}=n,_=wf(),y=(0,v.useId)(),b=l||y;return(0,I.jsx)(R,{..._.getStyles(`option`,{className:i,classNames:r,styles:o,style:a}),...g,ref:t,id:b,mod:[`combobox-option`,{"combobox-active":u,"combobox-disabled":p,"combobox-selected":m},h],role:`option`,onClick:e=>{p?e.preventDefault():(_.onOptionSubmit?.(n.value,n),c?.(e))},onMouseDown:e=>{e.preventDefault(),d?.(e)},onMouseOver:e=>{_.resetSelectionOnOptionHover&&_.store.resetSelectedOption(),f?.(e)}})});Lf.classes=yf,Lf.displayName=`@mantine/core/ComboboxOption`;var Rf=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,id:o,onMouseDown:s,labelledBy:c,...l}=L(`ComboboxOptions`,null,e),u=wf(),d=rn(o);return(0,v.useEffect)(()=>{u.store.setListId(d)},[d]),(0,I.jsx)(R,{ref:t,...u.getStyles(`options`,{className:r,style:i,classNames:n,styles:a}),...l,id:d,role:`listbox`,"aria-labelledby":c,onMouseDown:e=>{e.preventDefault(),s?.(e)}})});Rf.classes=yf,Rf.displayName=`@mantine/core/ComboboxOptions`;var zf={withAriaAttributes:!0,withKeyboardNavigation:!0},Bf=z((e,t)=>{let{classNames:n,styles:r,unstyled:i,vars:a,withAriaAttributes:o,onKeyDown:s,withKeyboardNavigation:c,size:l,...u}=L(`ComboboxSearch`,zf,e),d=wf(),f=d.getStyles(`search`),p=Af({targetType:`input`,withAriaAttributes:o,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:s,autoComplete:`off`});return(0,I.jsx)(pd,{ref:cn(t,d.store.searchRef),classNames:[{input:f.className},n],styles:[{input:f.style},r],size:l||d.size,...p,...u,__staticSelector:`Combobox`})});Bf.classes=yf,Bf.displayName=`@mantine/core/ComboboxSearch`;var Vf={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Hf=z((e,t)=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,...l}=L(`ComboboxTarget`,Vf,e),u=Dn(n);if(!u)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=wf(),f=(0,v.cloneElement)(u,{...Af({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:u.props.onKeyDown,autoComplete:c}),...l});return(0,I.jsx)(nu.Target,{ref:cn(t,d.store.targetRef),children:f})});Hf.displayName=`@mantine/core/ComboboxTarget`;function Uf(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Wf(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Gf(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute(`data-combobox-disabled`))return t;return-1}function Kf({defaultOpened:e,opened:t,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:a=!0,scrollBehavior:o=`instant`}={}){let[s,c]=ln({value:t,defaultValue:e,finalValue:!1,onChange:n}),l=(0,v.useRef)(null),u=(0,v.useRef)(-1),d=(0,v.useRef)(null),f=(0,v.useRef)(null),p=(0,v.useRef)(-1),m=(0,v.useRef)(-1),h=(0,v.useRef)(-1),g=(0,v.useCallback)((e=`unknown`)=>{s||(c(!0),i?.(e))},[c,i,s]),_=(0,v.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),y=(0,v.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),b=(0,v.useCallback)(()=>{let e=En(f.current),t=wn(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),x=(0,v.useCallback)(e=>{let t=En(f.current),n=wn(`#${l.current}`,t),r=n?Tn(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(b(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,b]),S=(0,v.useCallback)(()=>{let e=En(f.current),t=wn(`#${l.current} [data-combobox-active]`,e);return x(t?Tn(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t):0)},[x]),C=(0,v.useCallback)(()=>{let e=En(f.current),t=Tn(`#${l.current} [data-combobox-option]`,e);return x(Wf(u.current,t,a))},[x,a]),w=(0,v.useCallback)(()=>{let e=En(f.current),t=Tn(`#${l.current} [data-combobox-option]`,e);return x(Uf(u.current,t,a))},[x,a]),T=(0,v.useCallback)(()=>{let e=En(f.current);return x(Gf(Tn(`#${l.current} [data-combobox-option]`,e)))},[x]),E=(0,v.useCallback)((e=`selected`,t)=>{h.current=window.setTimeout(()=>{let n=En(f.current),r=Tn(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),D=(0,v.useCallback)(()=>{u.current=-1,b()},[b]),O=(0,v.useCallback)(()=>{let e=En(f.current);(Tn(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),k=(0,v.useCallback)(e=>{l.current=e},[]),A=(0,v.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),j=(0,v.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),ee=(0,v.useCallback)(()=>u.current,[]);return(0,v.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:y,selectedOptionIndex:u.current,getSelectedOptionIndex:ee,selectOption:x,selectFirstOption:T,selectActiveOption:S,selectNextOption:C,selectPreviousOption:w,resetSelectedOption:D,updateSelectedOptionIndex:E,listId:l.current,setListId:k,clickSelectedOption:O,searchRef:d,focusSearchInput:A,targetRef:f,focusTarget:j}}var qf={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},Jf=On((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":xt(t),"--combobox-option-padding":vt(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:F(n),"--combobox-option-fz":xt(t),"--combobox-option-padding":vt(t,`combobox-option-padding`)}}));function Yf(e){let t=L(`Combobox`,qf,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,...g}=t,_=Kf(),v=o||_,y=ii({name:p||`Combobox`,classes:yf,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:Jf}),b=()=>{l?.(),v.closeDropdown()};return(0,I.jsx)(Cf,{value:{getStyles:y,store:v,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m},children:(0,I.jsx)(nu,{opened:v.dropdownOpened,preventPositionChangeWhenVisible:!1,...g,onChange:e=>!e&&b(),withRoles:!1,unstyled:i,children:a})})}Yf.extend=e=>e,Yf.classes=yf,Yf.displayName=`@mantine/core/Combobox`,Yf.Target=Hf,Yf.Dropdown=Ef,Yf.Options=Rf,Yf.Option=Lf,Yf.Search=Bf,Yf.Empty=kf,Yf.Chevron=Sf,Yf.Footer=Nf,Yf.Header=Ff,Yf.EventsTarget=Mf,Yf.DropdownTarget=Of,Yf.Group=Pf,Yf.ClearButton=Tf,Yf.HiddenInput=If;var Xf={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},Zf=Xf,Qf=(0,v.forwardRef)(({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x},S)=>{let C=ii({name:e,props:t,className:n,style:_,classes:Xf,classNames:r,styles:i,unstyled:a,attributes:b});return(0,I.jsx)(R,{...C(`root`),ref:S,__vars:{"--label-fz":xt(f),"--label-lh":vt(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,I.jsxs)(R,{component:m,htmlFor:m===`label`?l:void 0,...C(`body`),children:[o,(0,I.jsxs)(`div`,{...C(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,I.jsx)(R,{component:h,htmlFor:h===`label`?l:void 0,...C(`label`),"data-disabled":u||void 0,children:s}),c&&(0,I.jsx)(pd.Description,{size:f,__inheritStyles:!1,...C(`description`),children:c}),d&&typeof d!=`boolean`&&(0,I.jsx)(pd.Error,{size:f,__inheritStyles:!1,...C(`error`),children:d})]})]})})});Qf.displayName=`@mantine/core/InlineInput`;var $f={root:`m_bf2d988c`,inner:`m_26062bec`,input:`m_26063560`,icon:`m_bf295423`,"input--outline":`m_215c4542`},ep=(0,v.createContext)(null),tp=ep.Provider,np=()=>(0,v.useContext)(ep),[rp,ip]=st(),ap={card:`m_26775b0a`},op={withBorder:!0},sp=On((e,{radius:t})=>({card:{"--card-radius":bt(t)}})),cp=z((e,t)=>{let n=L(`CheckboxCard`,op,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,checked:l,mod:u,withBorder:d,value:f,onClick:p,defaultChecked:m,onChange:h,attributes:g,..._}=n,v=ii({name:`CheckboxCard`,classes:ap,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:g,vars:c,varsResolver:sp,rootSelector:`card`}),y=np(),[b,x]=ln({value:typeof l==`boolean`?l:y?y.value.includes(f||``):void 0,defaultValue:m,finalValue:!1,onChange:h});return(0,I.jsx)(rp,{value:{checked:b},children:(0,I.jsx)(gl,{ref:t,mod:[{"with-border":d,checked:b},u],...v(`card`),..._,role:`checkbox`,"aria-checked":b,onClick:e=>{p?.(e),y?.onChange(f||``),x(!b)}})})});cp.displayName=`@mantine/core/CheckboxCard`,cp.classes=ap;function lp({children:e,role:t}){let n=Qu();return n?(0,I.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,I.jsx)(I.Fragment,{children:e})}var up=z((e,t)=>{let{value:n,defaultValue:r,onChange:i,size:a,wrapperProps:o,children:s,readOnly:c,disabled:l,...u}=L(`CheckboxGroup`,null,e),[d,f]=ln({value:n,defaultValue:r,finalValue:[],onChange:i});return(0,I.jsx)(tp,{value:{value:d,onChange:e=>{let t=typeof e==`string`?e:e.currentTarget.value;!c&&f(d.includes(t)?d.filter(e=>e!==t):[...d,t])},size:a,disabled:l},children:(0,I.jsx)(pd.Wrapper,{size:a,ref:t,...o,...u,labelElement:`div`,__staticSelector:`CheckboxGroup`,children:(0,I.jsx)(lp,{role:`group`,children:s})})})});up.classes=pd.Wrapper.classes,up.displayName=`@mantine/core/CheckboxGroup`;function dp({size:e,style:t,...n}){return(0,I.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:F(e),height:F(e),...t},"aria-hidden":!0,...n,children:(0,I.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function fp({indeterminate:e,...t}){return e?(0,I.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 32 6`,"aria-hidden":!0,...t,children:(0,I.jsx)(`rect`,{width:`32`,height:`6`,fill:`currentColor`,rx:`3`})}):(0,I.jsx)(dp,{...t})}var pp={indicator:`m_5e5256ee`,icon:`m_1b1c543a`,"indicator--outline":`m_76e20374`},mp={icon:fp,variant:`filled`},hp=On((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=nr({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--checkbox-size":vt(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:bt(t),"--checkbox-color":a===`outline`?c:rr(n,e),"--checkbox-icon-color":i?rr(i,e):ai(o,e)?Tr({color:n,theme:e,autoContrast:o}):void 0}}}),gp=z((e,t)=>{let n=L(`CheckboxIndicator`,mp,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,icon:l,indeterminate:u,radius:d,color:f,iconColor:p,autoContrast:m,checked:h,mod:g,variant:_,disabled:v,attributes:y,...b}=n,x=ii({name:`CheckboxIndicator`,classes:pp,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:y,vars:c,varsResolver:hp,rootSelector:`indicator`}),S=ip(),C=typeof h==`boolean`||typeof u==`boolean`?h||u:S?.checked||!1;return(0,I.jsx)(R,{ref:t,...x(`indicator`,{variant:_}),variant:_,mod:[{checked:C,disabled:v},g],...b,children:(0,I.jsx)(l,{indeterminate:u,...x(`icon`)})})});gp.displayName=`@mantine/core/CheckboxIndicator`,gp.classes=pp;var _p={labelPosition:`right`,icon:fp,variant:`filled`},vp=On((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=nr({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--checkbox-size":vt(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:bt(t),"--checkbox-color":a===`outline`?c:rr(n,e),"--checkbox-icon-color":i?rr(i,e):ai(o,e)?Tr({color:n,theme:e,autoContrast:o}):void 0}}}),yp=z((e,t)=>{let n=L(`Checkbox`,_p,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,color:l,label:u,id:d,size:f,radius:p,wrapperProps:m,checked:h,labelPosition:g,description:_,error:y,disabled:b,variant:x,indeterminate:S,icon:C,rootRef:w,iconColor:T,onChange:E,autoContrast:D,mod:O,attributes:k,...A}=n,j=np(),ee=f||j?.size,te=ii({name:`Checkbox`,props:n,classes:$f,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:k,vars:c,varsResolver:vp}),{styleProps:ne,rest:re}=li(A),M=rn(d),N={checked:j?.value.includes(re.value)??h,onChange:e=>{j?.onChange(e),E?.(e)},disabled:j?.disabled??b},ie=(0,v.useRef)(null),ae=t||ie;return(0,v.useEffect)(()=>{ae&&`current`in ae&&ae.current&&(ae.current.indeterminate=S||!1,S?ae.current.setAttribute(`data-indeterminate`,`true`):ae.current.removeAttribute(`data-indeterminate`))},[S,ae]),(0,I.jsx)(Qf,{...te(`root`),__staticSelector:`Checkbox`,__stylesApiProps:n,id:M,size:ee,labelPosition:g,label:u,description:_,error:y,disabled:N.disabled,classNames:r,styles:o,unstyled:s,"data-checked":N.checked||h||void 0,variant:x,ref:w,mod:O,inert:re.inert,...ne,...m,children:(0,I.jsxs)(R,{...te(`inner`),mod:{"data-label-position":g},children:[(0,I.jsx)(R,{component:`input`,id:M,ref:ae,mod:{error:!!y},...te(`input`,{focusable:!0,variant:x}),...re,...N,inert:re.inert,type:`checkbox`}),(0,I.jsx)(C,{indeterminate:S,...te(`icon`)})]})})});yp.classes={...$f,...Zf},yp.displayName=`@mantine/core/Checkbox`,yp.Group=up,yp.Indicator=gp,yp.Card=cp;function bp(e){return`group`in e}function xp({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a<e.length;a+=1){let o=e[a];if(i.length===n)return i;bp(o)&&i.push({group:o.group,items:xp({options:o.items,search:t,limit:n-i.length})}),bp(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function Sp(e){if(e.length===0)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function Cp(e,t=new Set){if(Array.isArray(e))for(let n of e)if(bp(n))Cp(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(typeof n.value!=`string`)throw Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof n.value}`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function wp(e,t){return Array.isArray(e)?e.includes(t):e===t}function Tp({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!bp(e)){let s=wp(r,e.value),c=t&&(s?(0,I.jsx)(dp,{className:yf.optionsDropdownCheckIcon}):n?(0,I.jsx)(`div`,{className:yf.optionsDropdownCheckPlaceholder}):null),l=(0,I.jsxs)(I.Fragment,{children:[i===`left`&&c,(0,I.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,I.jsx)(Yf.Option,{value:e.value,disabled:e.disabled,className:An({[yf.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,I.jsx)(Tp,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},e.value));return(0,I.jsx)(Yf.Group,{label:e.group,children:s})}function Ep({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,withScrollArea:s=!0,filterOptions:c=!0,withCheckIcon:l=!1,withAlignedLabels:u=!1,value:d,checkIconPosition:f,nothingFoundMessage:p,unstyled:m,labelId:h,renderOption:g,scrollAreaProps:_,"aria-label":v}){Cp(e);let y=typeof i==`string`?(r||xp)({options:e,search:c?i:``,limit:a??1/0}):e,b=Sp(y),x=y.map(e=>(0,I.jsx)(Tp,{data:e,withCheckIcon:l,withAlignedLabels:u,value:d,checkIconPosition:f,unstyled:m,renderOption:g},bp(e)?e.group:e.value));return(0,I.jsx)(Yf.Dropdown,{hidden:t||n&&b,"data-composed":!0,children:(0,I.jsxs)(Yf.Options,{labelledBy:h,"aria-label":v,children:[s?(0,I.jsx)(fl.Autosize,{mah:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,..._,children:x}):x,b&&p&&(0,I.jsx)(Yf.Empty,{children:p})]})})}var Dp=z((e,t)=>{let n=L(`Autocomplete`,null,e),{classNames:r,styles:i,unstyled:a,vars:o,dropdownOpened:s,defaultDropdownOpened:c,onDropdownClose:l,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:p,onChange:m,data:h,value:g,defaultValue:_,selectFirstOptionOnChange:y,selectFirstOptionOnDropdownOpen:b,onOptionSubmit:x,comboboxProps:S,readOnly:C,disabled:w,filter:T,limit:E,withScrollArea:D,maxDropdownHeight:O,size:k,id:A,renderOption:j,autoComplete:ee,scrollAreaProps:te,onClear:ne,clearButtonProps:re,error:M,clearable:N,rightSection:ie,autoSelectOnBlur:ae,openOnFocus:oe=!0,attributes:se,...ce}=n,le=rn(A),ue=_f(h),de=vf(ue),[fe,pe]=ln({value:g,defaultValue:_,finalValue:``,onChange:m}),me=Kf({opened:s,defaultOpened:c,onDropdownOpen:()=>{u?.(),b&&me.selectFirstOption()},onDropdownClose:()=>{l?.(),setTimeout(me.resetSelectedOption,0)}}),he=e=>{pe(e),me.resetSelectedOption()},{resolvedClassNames:ge,resolvedStyles:_e}=Vr({props:n,styles:i,classNames:r});(0,v.useEffect)(()=>{y&&me.selectFirstOption()},[y,fe]);let ve=(0,I.jsx)(Yf.ClearButton,{...re,onClear:()=>{he(``),ne?.()}});return(0,I.jsxs)(Yf,{store:me,__staticSelector:`Autocomplete`,classNames:ge,styles:_e,unstyled:a,readOnly:C,size:k,attributes:se,keepMounted:ae,onOptionSubmit:e=>{x?.(e),he(de[e].label),me.closeDropdown()},...S,children:[(0,I.jsx)(Yf.Target,{autoComplete:ee,children:(0,I.jsx)(gd,{ref:t,...ce,size:k,__staticSelector:`Autocomplete`,__clearSection:ve,__clearable:N&&!!fe&&!w&&!C,rightSection:ie,disabled:w,readOnly:C,value:fe,error:M,onChange:e=>{he(e.currentTarget.value),me.openDropdown(),y&&me.selectFirstOption()},onFocus:e=>{oe&&me.openDropdown(),d?.(e)},onBlur:e=>{ae&&me.clickSelectedOption(),me.closeDropdown(),f?.(e)},onClick:e=>{me.openDropdown(),p?.(e)},classNames:ge,styles:_e,unstyled:a,attributes:se,id:le})}),(0,I.jsx)(Ep,{data:ue,hidden:C||w,filter:T,search:fe,limit:E,hiddenWhenEmpty:!0,withScrollArea:D,maxDropdownHeight:O,unstyled:a,labelId:ce.label?`${le}-label`:void 0,"aria-label":ce.label?void 0:ce[`aria-label`],renderOption:j,scrollAreaProps:te})]})});Dp.classes={...gd.classes,...Yf.classes},Dp.displayName=`@mantine/core/Autocomplete`;var Op={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},kp=On((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":vt(a,`badge-height`),"--badge-padding-x":vt(a,`badge-padding-x`),"--badge-fz":vt(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:bt(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?rr(n,e):void 0}}}),Ap=Ui((e,t)=>{let n=L(`Badge`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,radius:l,color:u,gradient:d,leftSection:f,rightSection:p,children:m,variant:h,fullWidth:g,autoContrast:_,circle:v,mod:y,attributes:b,...x}=n,S=ii({name:`Badge`,props:n,classes:Op,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:b,vars:c,varsResolver:kp});return(0,I.jsxs)(R,{variant:h,mod:[{block:g,circle:v,"with-right-section":!!p,"with-left-section":!!f},y],...S(`root`,{variant:h}),ref:t,...x,children:[f&&(0,I.jsx)(`span`,{...S(`section`),"data-position":`left`,children:f}),(0,I.jsx)(`span`,{...S(`label`),children:m}),p&&(0,I.jsx)(`span`,{...S(`section`),"data-position":`right`,children:p})]})});Ap.classes=Op,Ap.displayName=`@mantine/core/Badge`;var jp={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},Mp={orientation:`horizontal`},Np=On((e,{borderWidth:t})=>({group:{"--button-border-width":F(t)}})),Pp=z((e,t)=>{let n=L(`ButtonGroup`,Mp,e),{className:r,style:i,classNames:a,styles:o,unstyled:s,orientation:c,vars:l,borderWidth:u,variant:d,mod:f,attributes:p,...m}=L(`ButtonGroup`,Mp,e);return(0,I.jsx)(R,{...ii({name:`ButtonGroup`,props:n,classes:jp,className:r,style:i,classNames:a,styles:o,unstyled:s,attributes:p,vars:l,varsResolver:Np,rootSelector:`group`})(`group`),ref:t,variant:d,mod:[{"data-orientation":c},f],role:`group`,...m})});Pp.classes=jp,Pp.displayName=`@mantine/core/ButtonGroup`;var Fp=On((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":vt(o,`section-height`),"--section-padding-x":vt(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?xt(o.replace(`compact-`,``)):xt(o),"--section-radius":t===void 0?void 0:bt(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),Ip=z((e,t)=>{let n=L(`ButtonGroupSection`,null,e),{className:r,style:i,classNames:a,styles:o,unstyled:s,vars:c,variant:l,gradient:u,radius:d,autoContrast:f,attributes:p,...m}=n;return(0,I.jsx)(R,{...ii({name:`ButtonGroupSection`,props:n,classes:jp,className:r,style:i,classNames:a,styles:o,unstyled:s,attributes:p,vars:c,varsResolver:Fp,rootSelector:`groupSection`})(`groupSection`),ref:t,variant:l,...m})});Ip.classes=jp,Ip.displayName=`@mantine/core/ButtonGroupSection`;var Lp={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${F(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},Rp=On((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":vt(a,`button-height`),"--button-padding-x":vt(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?xt(a.replace(`compact-`,``)):xt(a),"--button-radius":t===void 0?void 0:bt(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),H=Ui((e,t)=>{let n=L(`Button`,null,e),{style:r,vars:i,className:a,color:o,disabled:s,children:c,leftSection:l,rightSection:u,fullWidth:d,variant:f,radius:p,loading:m,loaderProps:h,gradient:g,classNames:_,styles:v,unstyled:y,"data-disabled":b,autoContrast:x,mod:S,attributes:C,...w}=n,T=ii({name:`Button`,props:n,classes:jp,className:a,style:r,classNames:_,styles:v,unstyled:y,attributes:C,vars:i,varsResolver:Rp}),E=!!l,D=!!u;return(0,I.jsxs)(gl,{ref:t,...T(`root`,{active:!s&&!m&&!b}),unstyled:y,variant:f,disabled:s||m,mod:[{disabled:s||b,loading:m,block:d,"with-left-section":E,"with-right-section":D},S],...w,children:[typeof m==`boolean`&&(0,I.jsx)(Hl,{mounted:m,transition:Lp,duration:150,children:e=>(0,I.jsx)(R,{component:`span`,...T(`loader`,{style:e}),"aria-hidden":!0,children:(0,I.jsx)(uu,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...h})})}),(0,I.jsxs)(`span`,{...T(`inner`),children:[l&&(0,I.jsx)(R,{component:`span`,...T(`section`),mod:{position:`left`},children:l}),(0,I.jsx)(R,{component:`span`,mod:{loading:m},...T(`label`),children:c}),u&&(0,I.jsx)(R,{component:`span`,...T(`section`),mod:{position:`right`},children:u})]})]})});H.classes=jp,H.displayName=`@mantine/core/Button`,H.Group=Pp,H.GroupSection=Ip;var[zp,Bp]=ot(`Card component was not found in tree`),Vp={root:`m_e615b15f`,section:`m_599a2148`},Hp=Ui((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,withBorder:s,inheritPadding:c,mod:l,...u}=L(`CardSection`,null,e),d=Bp();return(0,I.jsx)(R,{ref:t,mod:[{"with-border":s,"inherit-padding":c},l],...d.getStyles(`section`,{className:r,style:i,styles:a,classNames:n}),...u})});Hp.classes=Vp,Hp.displayName=`@mantine/core/CardSection`;var Up=On((e,{padding:t})=>({root:{"--card-padding":yt(t)}})),Wp=Ui((e,t)=>{let n=L(`Card`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,children:l,padding:u,attributes:d,...f}=n,p=ii({name:`Card`,props:n,classes:Vp,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:d,vars:c,varsResolver:Up}),m=v.Children.toArray(l),h=m.map((e,t)=>typeof e==`object`&&e&&`type`in e&&e.type===Hp?(0,v.cloneElement)(e,{"data-first-section":t===0||void 0,"data-last-section":t===m.length-1||void 0}):e);return(0,I.jsx)(zp,{value:{getStyles:p},children:(0,I.jsx)(xl,{ref:t,unstyled:s,...p(`root`),...f,children:h})})});Wp.classes=Vp,Wp.displayName=`@mantine/core/Card`,Wp.Section=Hp;var Gp={root:`m_4451eb3a`},Kp=Ui((e,t)=>{let n=L(`Center`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,inline:l,mod:u,attributes:d,...f}=n,p=ii({name:`Center`,props:n,classes:Gp,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:d,vars:c});return(0,I.jsx)(R,{ref:t,mod:[{inline:l},u],...p(`root`),...f})});Kp.classes=Gp,Kp.displayName=`@mantine/core/Center`;var qp={root:`m_b183c0a2`},Jp=On((e,{color:t})=>({root:{"--code-bg":t?rr(t,e):void 0}})),Yp=z((e,t)=>{let n=L(`Code`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,color:l,block:u,variant:d,mod:f,attributes:p,...m}=n,h=ii({name:`Code`,props:n,classes:qp,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:p,vars:c,varsResolver:Jp});return(0,I.jsx)(R,{component:u?`pre`:`code`,variant:d,ref:t,mod:[{block:u},f],...h(`root`),...m,dir:`ltr`})});Yp.classes=qp,Yp.displayName=`@mantine/core/Code`;var Xp={root:`m_7485cace`},Zp=On((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:vt(t,`container-size`)}})),Qp=z((e,t)=>{let n=L(`Container`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,fluid:l,mod:u,attributes:d,strategy:f,...p}=n,m=ii({name:`Container`,classes:Xp,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:d,vars:c,varsResolver:Zp});return(0,I.jsx)(R,{ref:t,mod:[{fluid:l,strategy:f||`block`},u],...m(`root`),...p})});Qp.classes=Xp,Qp.displayName=`@mantine/core/Container`;var $p={root:`m_3eebeb36`,label:`m_9e365f20`},em={orientation:`horizontal`},tm=On((e,{color:t,variant:n,size:r})=>({root:{"--divider-color":t?rr(t,e):void 0,"--divider-border-style":n,"--divider-size":vt(r,`divider-size`)}})),nm=z((e,t)=>{let n=L(`Divider`,em,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,color:l,orientation:u,label:d,labelPosition:f,mod:p,attributes:m,...h}=n,g=ii({name:`Divider`,classes:$p,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:m,vars:c,varsResolver:tm});return(0,I.jsx)(R,{ref:t,mod:[{orientation:u,"with-label":!!d},p],...g(`root`),...h,role:`separator`,children:d&&(0,I.jsx)(R,{component:`span`,mod:{position:f},...g(`label`),children:d})})});nm.classes=$p,nm.displayName=`@mantine/core/Divider`;var rm={root:`m_f11b401e`,header:`m_5a7c2c9`,content:`m_b8a05bbd`,inner:`m_31cd769a`},[im,am]=ot(`Drawer component was not found in tree`),om=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`DrawerBody`,null,e);return(0,I.jsx)(Fu,{ref:t,...am().getStyles(`body`,{classNames:n,style:i,styles:a,className:r}),...s})});om.classes=rm,om.displayName=`@mantine/core/DrawerBody`;var sm=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`DrawerCloseButton`,null,e);return(0,I.jsx)(Iu,{ref:t,...am().getStyles(`close`,{classNames:n,style:i,styles:a,className:r}),...s})});sm.classes=rm,sm.displayName=`@mantine/core/DrawerCloseButton`;var cm=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,children:s,radius:c,__hidden:l,...u}=L(`DrawerContent`,null,e),d=am(),f=d.scrollAreaComponent||Wu;return(0,I.jsx)(Lu,{...d.getStyles(`content`,{className:r,style:i,styles:a,classNames:n}),innerProps:d.getStyles(`inner`,{className:r,style:i,styles:a,classNames:n}),ref:t,...u,radius:c||d.radius||0,"data-hidden":l||void 0,children:(0,I.jsx)(f,{style:{height:`calc(100vh - var(--drawer-offset) * 2)`},children:s})})});cm.classes=rm,cm.displayName=`@mantine/core/DrawerContent`;var lm=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`DrawerHeader`,null,e);return(0,I.jsx)(Ru,{ref:t,...am().getStyles(`header`,{classNames:n,style:i,styles:a,className:r}),...s})});lm.classes=rm,lm.displayName=`@mantine/core/DrawerHeader`;var um=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`DrawerOverlay`,null,e);return(0,I.jsx)(Vu,{ref:t,...am().getStyles(`overlay`,{classNames:n,style:i,styles:a,className:r}),...s})});um.classes=rm,um.displayName=`@mantine/core/DrawerOverlay`;function dm(e){switch(e){case`top`:return`flex-start`;case`bottom`:return`flex-end`;default:return}}function fm(e){if(e===`top`||e===`bottom`)return`0 0 calc(100% - var(--drawer-offset, 0rem) * 2)`}var pm={top:`slide-down`,bottom:`slide-up`,left:`slide-right`,right:`slide-left`},mm={top:`slide-down`,bottom:`slide-up`,right:`slide-right`,left:`slide-left`},hm={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ht(`modal`),position:`left`},gm=On((e,{position:t,size:n,offset:r})=>({root:{"--drawer-size":vt(n,`drawer-size`),"--drawer-flex":fm(t),"--drawer-height":t===`left`||t===`right`?void 0:`var(--drawer-size)`,"--drawer-align":dm(t),"--drawer-justify":t===`right`?`flex-end`:void 0,"--drawer-offset":F(r)}})),_m=z((e,t)=>{let n=L(`DrawerRoot`,hm,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,scrollAreaComponent:l,position:u,transitionProps:d,radius:f,attributes:p,...m}=n,{dir:h}=Gi(),g=ii({name:`Drawer`,classes:rm,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:p,vars:c,varsResolver:gm}),_=(h===`rtl`?mm:pm)[u];return(0,I.jsx)(im,{value:{scrollAreaComponent:l,getStyles:g,radius:f},children:(0,I.jsx)(Mu,{ref:t,...g(`root`),transitionProps:{transition:_,...d},"data-offset-scrollbars":l===fl.Autosize||void 0,unstyled:s,...m})})});_m.classes=rm,_m.displayName=`@mantine/core/DrawerRoot`;var[vm,ym]=st();function bm({children:e}){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(ht(`modal`));return(0,I.jsx)(vm,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}bm.displayName=`@mantine/core/DrawerStack`;var xm=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`DrawerTitle`,null,e);return(0,I.jsx)(Uu,{ref:t,...am().getStyles(`title`,{classNames:n,style:i,styles:a,className:r}),...s})});xm.classes=rm,xm.displayName=`@mantine/core/DrawerTitle`;var Sm={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ht(`modal`),withOverlay:!0,withCloseButton:!0},Cm=z((e,t)=>{let{title:n,withOverlay:r,overlayProps:i,withCloseButton:a,closeButtonProps:o,children:s,opened:c,stackId:l,zIndex:u,...d}=L(`Drawer`,Sm,e),f=ym(),p=!!n||a,m=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l)}:{},h=r===!1?!1:l&&f?f.currentId===l:c;return(0,v.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||ht(`modal`)):f.removeModal(l))},[c,l,u]),(0,I.jsxs)(_m,{ref:t,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...m,children:[r&&(0,I.jsx)(um,{visible:h,transitionProps:f&&l?{duration:0}:void 0,...i}),(0,I.jsxs)(cm,{__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,I.jsxs)(lm,{children:[n&&(0,I.jsx)(xm,{children:n}),a&&(0,I.jsx)(sm,{...o})]}),(0,I.jsx)(om,{children:s})]})]})});Cm.classes=rm,Cm.displayName=`@mantine/core/Drawer`,Cm.Root=_m,Cm.Overlay=um,Cm.Content=cm,Cm.Body=om,Cm.Header=lm,Cm.Title=xm,Cm.CloseButton=sm,Cm.Stack=bm;var wm={multiple:!1},Tm=(0,v.forwardRef)((e,t)=>{let{onChange:n,children:r,multiple:i,accept:a,name:o,form:s,resetRef:c,disabled:l,capture:u,inputProps:d,...f}=L(`FileButton`,wm,e),p=(0,v.useRef)(null),m=()=>{!l&&p.current?.click()};return on(c,()=>{p.current&&(p.current.value=``)}),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`input`,{style:{display:`none`},type:`file`,accept:a,multiple:i,onChange:e=>{if(e.currentTarget.files===null)return n(i?[]:null);n(i?Array.from(e.currentTarget.files):e.currentTarget.files[0]||null)},ref:cn(t,p),name:o,form:s,capture:u,...d}),r({onClick:m,...f})]})});Tm.displayName=`@mantine/core/FileButton`;var Em={root:`m_9e117634`},Dm=On((e,{radius:t,fit:n})=>({root:{"--image-radius":t===void 0?void 0:bt(t),"--image-object-fit":n}})),Om=Ui((e,t)=>{let n=L(`Image`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,onError:l,src:u,radius:d,fit:f,fallbackSrc:p,mod:m,attributes:h,...g}=n,[_,y]=(0,v.useState)(!u);(0,v.useEffect)(()=>y(!u),[u]);let b=ii({name:`Image`,classes:Em,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:h,vars:c,varsResolver:Dm});return _&&p?(0,I.jsx)(R,{component:`img`,ref:t,src:p,...b(`root`),onError:l,mod:[`fallback`,m],...g}):(0,I.jsx)(R,{component:`img`,ref:t,...b(`root`),src:u,onError:e=>{l?.(e),y(!0)},mod:m,...g})});Om.classes=Em,Om.displayName=`@mantine/core/Image`;function km(){return km=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},km.apply(null,arguments)}function Am(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var jm=v.useLayoutEffect,Mm=function(e){var t=v.useRef(e);return jm(function(){t.current=e}),t},Nm=function(e,t){if(typeof e==`function`){e(t);return}e.current=t},Pm=function(e,t){var n=v.useRef();return v.useCallback(function(r){e.current=r,n.current&&Nm(n.current,null),n.current=t,t&&Nm(t,r)},[t])},Fm={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},Im=function(e){Object.keys(Fm).forEach(function(t){e.style.setProperty(t,Fm[t],`important`)})},Lm=null,Rm=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize};function zm(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Lm||(Lm=document.createElement(`textarea`),Lm.setAttribute(`tabindex`,`-1`),Lm.setAttribute(`aria-hidden`,`true`),Im(Lm)),Lm.parentNode===null&&document.body.appendChild(Lm);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;Lm.style[t]=o[t]}),Im(Lm),Lm.value=t;var c=Rm(Lm,e);Lm.value=t,c=Rm(Lm,e),Lm.value=`x`;var l=Lm.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}var Bm=function(){},Vm=function(e,t){return e.reduce(function(e,n){return e[n]=t[n],e},{})},Hm=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Um=!!document.documentElement.currentStyle,Wm=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n=Vm(Hm,t),r=n.boxSizing;return r===``?null:(Um&&r===`border-box`&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+`px`),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})};function Gm(e,t,n){var r=Mm(n);v.useLayoutEffect(function(){var n=function(e){return r.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var Km=function(e,t){Gm(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})},qm=function(e){Gm(window,`resize`,e)},Jm=function(e){Gm(document.fonts,`loadingdone`,e)},Ym=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],Xm=v.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?Bm:a,s=e.onHeightChange,c=s===void 0?Bm:s,l=Am(e,Ym),u=l.value!==void 0,d=v.useRef(null),f=Pm(d,t),p=v.useRef(0),m=v.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:Wm(e);if(t){m.current=t;var a=zm(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return v.useLayoutEffect(h),Km(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),qm(h),Jm(h),v.createElement(`textarea`,km({},l,{onChange:function(e){u||h(),o(e)},ref:f}))}),Zm={size:`sm`},Qm=z((e,t)=>{let{autosize:n,maxRows:r,minRows:i,__staticSelector:a,resize:o,...s}=L(`Textarea`,Zm,e),c=n&&Sn()!==`test`,l=c?{maxRows:r,minRows:i}:{};return(0,I.jsx)(gd,{component:c?Xm:`textarea`,ref:t,...s,__staticSelector:a||`Textarea`,multiline:!0,"data-no-overflow":n&&r===void 0||void 0,__vars:{"--input-resize":o},...l})});Qm.classes=gd.classes,Qm.displayName=`@mantine/core/Textarea`;var[$m,eh]=ot(`Menu component was not found in the tree`),th={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,itemLabel:`m_5476e0d3`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},nh=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`MenuDivider`,null,e);return(0,I.jsx)(R,{ref:t,...eh().getStyles(`divider`,{className:r,style:i,styles:a,classNames:n}),...s})});nh.classes=th,nh.displayName=`@mantine/core/MenuDivider`;var rh=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onKeyDown:l,children:u,...d}=L(`MenuDropdown`,null,e),f=(0,v.useRef)(null),p=eh(),m=wt(l,e=>{(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),f.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),h=wt(s,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.openDropdown()),g=wt(c,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.closeDropdown());return(0,I.jsxs)(nu.Dropdown,{...d,onMouseEnter:h,onMouseLeave:g,role:`menu`,"aria-orientation":`vertical`,ref:cn(t,f),...p.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:m,children:[p.withInitialFocusPlaceholder&&(0,I.jsx)(`div`,{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),u]})});rh.classes=th,rh.displayName=`@mantine/core/MenuDropdown`;var[ih,ah]=st(),oh=Ui((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,color:s,closeMenuOnClick:c,leftSection:l,rightSection:u,children:d,disabled:f,"data-disabled":p,...m}=L(`MenuItem`,null,e),h=eh(),g=ah(),_=br(),{dir:y}=Gi(),b=(0,v.useRef)(null),x=m,S=wt(x.onClick,()=>{p||(typeof c==`boolean`?c&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),C=s?_.variantColorResolver({color:s,theme:_,variant:`light`}):void 0,w=s?nr({color:s,theme:_}):null,T=wt(x.onKeyDown,e=>{e.key===`ArrowLeft`&&g&&(g.close(),g.focusParentItem())});return(0,I.jsxs)(gl,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:cn(b,t),role:`menuitem`,disabled:f,"data-menu-item":!0,"data-disabled":f||p||void 0,"data-mantine-stop-propagation":!0,onClick:S,onKeyDown:pt({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:y,orientation:`vertical`,onKeyDown:T}),__vars:{"--menu-item-color":w?.isThemeColor&&w?.shade===void 0?`var(--mantine-color-${w.color}-6)`:C?.color,"--menu-item-hover":C?.hover},children:[l&&(0,I.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:l}),d&&(0,I.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:a,classNames:n}),children:d}),u&&(0,I.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:u})]})});oh.classes=th,oh.displayName=`@mantine/core/MenuItem`;var sh=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`MenuLabel`,null,e);return(0,I.jsx)(R,{ref:t,...eh().getStyles(`label`,{className:r,style:i,styles:a,classNames:n}),...s})});sh.classes=th,sh.displayName=`@mantine/core/MenuLabel`;var ch=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onKeyDown:l,children:u,...d}=L(`MenuSubDropdown`,null,e),f=(0,v.useRef)(null),p=eh(),m=ah(),h=wt(s,m?.open),g=wt(c,m?.close);return(0,I.jsx)(nu.Dropdown,{...d,onMouseEnter:h,onMouseLeave:g,role:`menu`,"aria-orientation":`vertical`,ref:cn(t,f),...p.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:u})});ch.classes=th,ch.displayName=`@mantine/core/MenuSubDropdown`;var lh=Ui((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,color:s,leftSection:c,rightSection:l,children:u,disabled:d,"data-disabled":f,closeMenuOnClick:p,...m}=L(`MenuSubItem`,null,e),h=eh(),g=ah(),_=br(),{dir:y}=Gi(),b=(0,v.useRef)(null),x=m,S=s?_.variantColorResolver({color:s,theme:_,variant:`light`}):void 0,C=s?nr({color:s,theme:_}):null,w=wt(x.onKeyDown,e=>{e.key===`ArrowRight`&&(g?.open(),g?.focusFirstItem()),e.key===`ArrowLeft`&&g?.parentContext&&(g.parentContext.close(),g.parentContext.focusParentItem())}),T=wt(x.onClick,()=>{!f&&p&&h.closeDropdownImmediately()}),E=wt(x.onMouseEnter,g?.open),D=wt(x.onMouseLeave,g?.close);return(0,I.jsxs)(gl,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:cn(b,t),role:`menuitem`,disabled:d,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":d||f||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:E,onMouseLeave:D,onClick:T,onKeyDown:pt({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:y,orientation:`vertical`,onKeyDown:w}),__vars:{"--menu-item-color":C?.isThemeColor&&C?.shade===void 0?`var(--mantine-color-${C.color}-6)`:S?.color,"--menu-item-hover":S?.hover},children:[c&&(0,I.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:c}),u&&(0,I.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:a,classNames:n}),children:u}),(0,I.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:l||(0,I.jsx)(Ed,{...h.getStyles(`chevron`),size:14})})]})});lh.classes=th,lh.displayName=`@mantine/core/MenuSubItem`;function uh({children:e,refProp:t}){if(!it(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return eh(),(0,I.jsx)(nu.Target,{refProp:t,popupType:`menu`,children:e})}uh.displayName=`@mantine/core/MenuSubTarget`;var dh={offset:0,position:`right-start`,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function fh(e){let{children:t,closeDelay:n,openDelay:r,...i}=L(`MenuSub`,dh,e),a=rn(),[o,{open:s,close:c}]=_n(!1),l=ah(),{openDropdown:u,closeDropdown:d}=Sd({open:s,close:c,closeDelay:n,openDelay:r});return(0,I.jsx)(ih,{value:{opened:o,close:d,open:u,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${a}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${a}-target`)?.focus()},16),parentContext:l},children:(0,I.jsx)(nu,{opened:o,withinPortal:!1,withArrow:!1,id:a,...i,children:t})})}fh.extend=e=>e,fh.displayName=`@mantine/core/MenuSub`,fh.Target=uh,fh.Dropdown=ch,fh.Item=lh;var ph={refProp:`ref`},mh=(0,v.forwardRef)((e,t)=>{let{children:n,refProp:r,...i}=L(`MenuTarget`,ph,e),a=Dn(n);if(!a)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let o=eh(),s=a.props,c=wt(s.onClick,()=>{o.trigger===`click`?o.toggleDropdown():o.trigger===`click-hover`&&(o.setOpenedViaClick(!0),o.opened||o.openDropdown())}),l=wt(s.onMouseEnter,()=>(o.trigger===`hover`||o.trigger===`click-hover`)&&o.openDropdown()),u=wt(s.onMouseLeave,()=>{(o.trigger===`hover`||o.trigger===`click-hover`&&!o.openedViaClick)&&o.closeDropdown()});return(0,I.jsx)(nu.Target,{refProp:r,popupType:`menu`,ref:t,...i,children:(0,v.cloneElement)(a,{onClick:c,onMouseEnter:l,onMouseLeave:u,"data-expanded":o.opened?!0:void 0})})});mh.displayName=`@mantine/core/MenuTarget`;var hh={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1};function gh(e){let t=L(`Menu`,hh,e),{children:n,onOpen:r,onClose:i,opened:a,defaultOpened:o,trapFocus:s,onChange:c,closeOnItemClick:l,loop:u,closeOnEscape:d,trigger:f,openDelay:p,closeDelay:m,classNames:h,styles:g,unstyled:_,variant:y,vars:b,menuItemTabIndex:x,keepMounted:S,withInitialFocusPlaceholder:C,attributes:w,...T}=t,E=ii({name:`Menu`,classes:th,props:t,classNames:h,styles:g,unstyled:_,attributes:w}),[D,O]=ln({value:a,defaultValue:o,finalValue:!1,onChange:c}),[k,A]=(0,v.useState)(!1),j=()=>{O(!1),A(!1),D&&i?.()},ee=()=>{O(!0),!D&&r?.()},te=()=>{D?j():ee()},{openDropdown:ne,closeDropdown:re}=Sd({open:ee,close:j,closeDelay:m,openDelay:p}),M=e=>Ot(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:N,resolvedStyles:ie}=Vr({classNames:h,styles:g,props:t});return(0,I.jsx)($m,{value:{getStyles:E,opened:D,toggleDropdown:te,getItemIndex:M,openedViaClick:k,setOpenedViaClick:A,closeOnItemClick:l,closeDropdown:f===`click`?j:re,openDropdown:f===`click`?ee:ne,closeDropdownImmediately:j,loop:u,trigger:f,unstyled:_,menuItemTabIndex:x,withInitialFocusPlaceholder:C},children:(0,I.jsx)(nu,{returnFocus:!0,...T,opened:D,onChange:te,defaultOpened:o,trapFocus:S?!1:s,closeOnEscape:d,__staticSelector:`Menu`,classNames:N,styles:ie,unstyled:_,variant:y,keepMounted:S,children:n})})}gh.extend=e=>e,gh.withProps=Hi(gh),gh.classes=th,gh.displayName=`@mantine/core/Menu`,gh.Item=oh,gh.Label=sh,gh.Dropdown=rh,gh.Target=mh,gh.Divider=nh,gh.Sub=fh;var _h={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},[vh,yh]=ot(`Modal component was not found in tree`),bh=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`ModalBody`,null,e);return(0,I.jsx)(Fu,{ref:t,...yh().getStyles(`body`,{classNames:n,style:i,styles:a,className:r}),...s})});bh.classes=_h,bh.displayName=`@mantine/core/ModalBody`;var xh=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`ModalCloseButton`,null,e);return(0,I.jsx)(Iu,{ref:t,...yh().getStyles(`close`,{classNames:n,style:i,styles:a,className:r}),...s})});xh.classes=_h,xh.displayName=`@mantine/core/ModalCloseButton`;var Sh=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,children:s,__hidden:c,...l}=L(`ModalContent`,null,e),u=yh(),d=u.scrollAreaComponent||Wu;return(0,I.jsx)(Lu,{...u.getStyles(`content`,{className:r,style:i,styles:a,classNames:n}),innerProps:u.getStyles(`inner`,{className:r,style:i,styles:a,classNames:n}),"data-full-screen":u.fullScreen||void 0,"data-modal-content":!0,"data-hidden":c||void 0,ref:t,...l,children:(0,I.jsx)(d,{style:{maxHeight:u.fullScreen?`100dvh`:`calc(100dvh - (${F(u.yOffset)} * 2))`},children:s})})});Sh.classes=_h,Sh.displayName=`@mantine/core/ModalContent`;var Ch=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`ModalHeader`,null,e);return(0,I.jsx)(Ru,{ref:t,...yh().getStyles(`header`,{classNames:n,style:i,styles:a,className:r}),...s})});Ch.classes=_h,Ch.displayName=`@mantine/core/ModalHeader`;var wh=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`ModalOverlay`,null,e);return(0,I.jsx)(Vu,{ref:t,...yh().getStyles(`overlay`,{classNames:n,style:i,styles:a,className:r}),...s})});wh.classes=_h,wh.displayName=`@mantine/core/ModalOverlay`;var Th={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ht(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},Eh=On((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:bt(t),"--modal-size":vt(n,`modal-size`),"--modal-y-offset":F(r),"--modal-x-offset":F(i)}})),Dh=z((e,t)=>{let n=L(`ModalRoot`,Th,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,yOffset:l,scrollAreaComponent:u,radius:d,fullScreen:f,centered:p,xOffset:m,__staticSelector:h,attributes:g,..._}=n,v=ii({name:h,classes:_h,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:g,vars:c,varsResolver:Eh});return(0,I.jsx)(vh,{value:{yOffset:l,scrollAreaComponent:u,getStyles:v,fullScreen:f},children:(0,I.jsx)(Mu,{ref:t,...v(`root`),"data-full-screen":f||void 0,"data-centered":p||void 0,"data-offset-scrollbars":u===fl.Autosize||void 0,unstyled:s,..._})})});Dh.classes=_h,Dh.displayName=`@mantine/core/ModalRoot`;var[Oh,kh]=st();function Ah({children:e}){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(ht(`modal`));return(0,I.jsx)(Oh,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}Ah.displayName=`@mantine/core/ModalStack`;var jh=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=L(`ModalTitle`,null,e);return(0,I.jsx)(Uu,{ref:t,...yh().getStyles(`title`,{classNames:n,style:i,styles:a,className:r}),...s})});jh.classes=_h,jh.displayName=`@mantine/core/ModalTitle`;var Mh={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ht(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},Nh=z((e,t)=>{let{title:n,withOverlay:r,overlayProps:i,withCloseButton:a,closeButtonProps:o,children:s,radius:c,opened:l,stackId:u,zIndex:d,...f}=L(`Modal`,Mh,e),p=kh(),m=!!n||a,h=p&&u?{closeOnEscape:p.currentId===u,trapFocus:p.currentId===u,zIndex:p.getZIndex(u)}:{},g=r===!1?!1:u&&p?p.currentId===u:l;return(0,v.useEffect)(()=>{p&&u&&(l?p.addModal(u,d||ht(`modal`)):p.removeModal(u))},[l,u,d]),(0,I.jsxs)(Dh,{ref:t,radius:c,opened:l,zIndex:p&&u?p.getZIndex(u):d,...f,...h,children:[r&&(0,I.jsx)(wh,{visible:g,transitionProps:p&&u?{duration:0}:void 0,...i}),(0,I.jsxs)(Sh,{radius:c,__hidden:p&&u&&l?u!==p.currentId:!1,children:[m&&(0,I.jsxs)(Ch,{children:[n&&(0,I.jsx)(jh,{children:n}),a&&(0,I.jsx)(xh,{...o})]}),(0,I.jsx)(bh,{children:s})]})]})});Nh.classes=_h,Nh.displayName=`@mantine/core/Modal`,Nh.Root=Dh,Nh.Overlay=wh,Nh.Content=Sh,Nh.Body=bh,Nh.Header=Ch,Nh.Title=jh,Nh.CloseButton=xh,Nh.Stack=Ah;var Ph={root:`m_a513464`,icon:`m_a4ceffb`,loader:`m_b0920b15`,body:`m_a49ed24`,title:`m_3feedf16`,description:`m_3d733a3a`,closeButton:`m_919a4d88`},Fh={withCloseButton:!0},Ih=On((e,{radius:t,color:n})=>({root:{"--notification-radius":t===void 0?void 0:bt(t),"--notification-color":n?rr(n,e):void 0}})),Lh=z((e,t)=>{let n=L(`Notification`,Fh,e),{className:r,color:i,radius:a,loading:o,withCloseButton:s,withBorder:c,title:l,icon:u,children:d,onClose:f,closeButtonProps:p,classNames:m,style:h,styles:g,unstyled:_,vars:v,mod:y,loaderProps:b,role:x,attributes:S,...C}=n,w=ii({name:`Notification`,classes:Ph,props:n,className:r,style:h,classNames:m,styles:g,unstyled:_,attributes:S,vars:v,varsResolver:Ih});return(0,I.jsxs)(R,{...w(`root`),mod:[{"data-with-icon":!!u||o,"data-with-border":c},y],ref:t,role:x||`alert`,...C,children:[u&&!o&&(0,I.jsx)(`div`,{...w(`icon`),children:u}),o&&(0,I.jsx)(uu,{size:28,color:i,...b,...w(`loader`)}),(0,I.jsxs)(`div`,{...w(`body`),children:[l&&(0,I.jsx)(`div`,{...w(`title`),children:l}),(0,I.jsx)(R,{...w(`description`),mod:{"data-with-title":!!l},children:d})]}),s&&(0,I.jsx)(Cu,{iconSize:16,color:`gray`,...p,unstyled:_,onClick:f,...w(`closeButton`)})]})});Lh.classes=Ph,Lh.displayName=`@mantine/core/Notification`;function Rh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var zh;(function(e){e.event=`event`,e.props=`prop`})(zh||={});function Bh(){}function Vh(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r),n)}}function Hh(e){return!!(e||``).match(/\d/)}function Uh(e){return e==null}function Wh(e){return typeof e==`number`&&isNaN(e)}function Gh(e){return Uh(e)||Wh(e)||typeof e==`number`&&!isFinite(e)}function Kh(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,`\\$&`)}function qh(e){switch(e){case`lakh`:return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case`wan`:return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Jh(e,t,n){var r=qh(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,`$1`+t)}function Yh(e){var t=(0,v.useRef)(e);return t.current=e,(0,v.useRef)(function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}).current}function Xh(e,t){t===void 0&&(t=!0);var n=e[0]===`-`,r=n&&t;e=e.replace(`-`,``);var i=e.split(`.`);return{beforeDecimal:i[0],afterDecimal:i[1]||``,hasNegation:n,addNegation:r}}function Zh(e){if(!e)return e;var t=e[0]===`-`;t&&(e=e.substring(1,e.length));var n=e.split(`.`),r=n[0].replace(/^0+/,``)||`0`,i=n[1]||``;return(t?`-`:``)+r+(i?`.`+i:``)}function Qh(e,t,n){for(var r=``,i=n?`0`:``,a=0;a<=t-1;a++)r+=e[a]||i;return r}function $h(e,t){return Array(t+1).join(e)}function eg(e){var t=e+``,n=t[0]===`-`?`-`:``;n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(`.`,``);var o=1+a,s=i.length;return o<0?i=`0.`+$h(`0`,Math.abs(o))+i:o>=s?i+=$h(`0`,o-s):i=(i.substring(0,o)||`0`)+`.`+i.substring(o),n+i}function tg(e,t,n){if([``,`-`].indexOf(e)!==-1)return e;var r=(e.indexOf(`.`)!==-1||n)&&t,i=Xh(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,c=parseFloat(`0.`+(o||`0`)),l=(o.length<=t?`0.`+o:c.toFixed(t)).split(`.`),u=a;a&&Number(l[0])&&(u=a.split(``).reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},l[0]));var d=Qh(l[1]||``,t,n),f=s?`-`:``,p=r?`.`:``;return``+f+u+p+d}function ng(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(`character`,t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var rg=Vh(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),ig=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function ag(e,t,n){return Math.min(Math.max(e,t),n)}function og(e){return Math.max(e.selectionStart,e.selectionEnd)}function sg(){return typeof navigator<`u`&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function cg(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:``}}function lg(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function ug(e,t,n,r,i,a,o){o===void 0&&(o=lg);var s=i.findIndex(function(e){return e}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r+=c.length);for(var l=n.length,u=e.length,d={},f=Array(l),p=0;p<l;p++){f[p]=-1;for(var m=0,h=u;m<h;m++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m})&&d[m]!==!0){f[p]=m,d[m]=!0;break}}for(var g=r;g<l&&(f[g]===-1||!a(n[g]));)g++;var _=g===l||f[g]===-1?u:f[g];for(g=r-1;g>0&&f[g]===-1;)g--;var v=g===-1||f[g]===-1?0:f[g]+1;return v>_?_:r-v<_-r?v:_}function dg(e,t,n,r){var i=e.length;if(t=ag(t,0,i),r===`left`){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function fg(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(Hh(e[n])||Hh(e[n-1]));return t}function pg(e,t,n,r,i,a){a===void 0&&(a=Bh);var o=Yh(function(e,t){var n,a;return Gh(e)?(a=``,n=``):typeof e==`number`||t?(a=typeof e==`number`?eg(e):e,n=r(a)):(a=i(e,void 0),n=r(a)),{formattedValue:n,numAsString:a}}),s=(0,v.useState)(function(){return o(Uh(e)?t:e,n)}),c=s[0],l=s[1],u=function(e,t){e.formattedValue!==c.formattedValue&&l({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)},d=e,f=n;Uh(e)&&(d=c.numAsString,f=!0);var p=o(d,f);return(0,v.useMemo)(function(){l(p)},[p.formattedValue]),[c,u]}function mg(e){return e.replace(/[^0-9]/g,``)}function hg(e){return e}function gg(e){var t=e.type;t===void 0&&(t=`text`);var n=e.displayType;n===void 0&&(n=`input`);var r=e.customInput,i=e.renderText,a=e.getInputRef,o=e.format;o===void 0&&(o=hg);var s=e.removeFormatting;s===void 0&&(s=mg);var c=e.defaultValue,l=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=Bh);var p=e.onKeyDown;p===void 0&&(p=Bh);var m=e.onMouseUp;m===void 0&&(m=Bh);var h=e.onFocus;h===void 0&&(h=Bh);var g=e.onBlur;g===void 0&&(g=Bh);var _=e.value,y=e.getCaretBoundary;y===void 0&&(y=fg);var b=e.isValidInputCharacter;b===void 0&&(b=Hh);var x=e.isCharacterSame,S=Rh(e,[`type`,`displayType`,`customInput`,`renderText`,`getInputRef`,`format`,`removeFormatting`,`defaultValue`,`valueIsNumericString`,`onValueChange`,`isAllowed`,`onChange`,`onKeyDown`,`onMouseUp`,`onFocus`,`onBlur`,`value`,`getCaretBoundary`,`isValidInputCharacter`,`isCharacterSame`]),C=pg(_,c,!!l,o,s,u),w=C[0],T=w.formattedValue,E=w.numAsString,D=C[1],O=(0,v.useRef)(),k=(0,v.useRef)({formattedValue:T,numAsString:E}),A=function(e,t){k.current={formattedValue:e.formattedValue,numAsString:e.value},D(e,t)},j=(0,v.useState)(!1),ee=j[0],te=j[1],ne=(0,v.useRef)(null),re=(0,v.useRef)({setCaretTimeout:null,focusTimeout:null});(0,v.useEffect)(function(){return te(!0),function(){clearTimeout(re.current.setCaretTimeout),clearTimeout(re.current.focusTimeout)}},[]);var M=o,N=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},ie=function(e,t,n){e.selectionStart===0&&e.selectionEnd===e.value.length||(ng(e,t),re.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&ng(e,t)},0))},ae=function(e,t,n){return dg(e,t,y(e),n)},oe=function(e,t,n){var r=y(t),i=ug(t,T,e,n,r,b,x);return i=dg(t,i,r),i},se=function(e){var t=e.formattedValue;t===void 0&&(t=``);var n=e.input,r=e.source,i=e.event,a=e.numAsString,o;if(n){var s=e.inputValue||n.value,c=og(n);n.value=t,o=oe(s,t,c),o!==void 0&&ie(n,o,t)}t!==T&&A(N(t,a),{event:i,source:r})};(0,v.useEffect)(function(){var e=k.current,t=e.formattedValue,n=e.numAsString;(T!==t||E!==n)&&A(N(T,E),{event:void 0,source:zh.props})},[T,E]);var ce=ne.current?og(ne.current):void 0;(typeof window<`u`?v.useLayoutEffect:v.useEffect)(function(){var e=ne.current;if(T!==k.current.formattedValue&&e){var t=oe(k.current.formattedValue,T,ce);e.value=T,ie(e,t,T)}},[T]);var le=function(e,t,n){var r=t.target,i=O.current?ig(O.current,r.selectionEnd):rg(T,e),a=Object.assign(Object.assign({},i),{lastValue:T}),o=s(e,a),c=M(o);if(o=s(c,void 0),d&&!d(N(c,o))){var l=t.target,u=oe(e,T,og(l));return l.value=T,ie(l,u,T),!1}return se({formattedValue:c,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},ue=function(e,t){t===void 0&&(t=0),O.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},de=function(e){var t=e.target.value;le(t,e,zh.event)&&f(e),O.current=void 0},fe=function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o;n===`ArrowLeft`||n===`Backspace`?o=Math.max(r-1,0):n===`ArrowRight`?o=Math.min(r+1,a.length):n===`Delete`&&(o=r);var s=0;n===`Delete`&&r===i&&(s=1);var c=n===`ArrowLeft`||n===`ArrowRight`;if(o===void 0||r!==i&&!c){p(e),ue(t,s);return}var l=o;c?(l=ae(a,o,n===`ArrowLeft`?`left`:`right`),l!==o&&e.preventDefault()):n===`Delete`&&!b(a[o])?l=ae(a,o,`right`):n===`Backspace`&&!b(a[o])&&(l=ae(a,o,`left`)),l!==o&&ie(t,l,a),p(e),ue(t,s)},pe=function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(r===void 0&&(r=``),e===n){var i=ae(r,e);i!==e&&ie(t,i,r)}};n(),requestAnimationFrame(function(){n()}),m(e),ue(t)},me=function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;ne.current=t,re.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o=ae(a,r);o!==r&&!(r===0&&i===a.length)&&ie(t,o,a),h(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},he=function(e){ne.current=null,clearTimeout(re.current.focusTimeout),clearTimeout(re.current.setCaretTimeout),g(e)},ge=ee&&sg()?`numeric`:void 0,_e=Object.assign({inputMode:ge},S,{type:t,value:T,onChange:de,onKeyDown:fe,onMouseUp:pe,onFocus:me,onBlur:he});if(n===`text`)return i?v.createElement(v.Fragment,null,i(T,S)||null):v.createElement(`span`,Object.assign({},S,{ref:a}),T);if(r){var ve=r;return v.createElement(ve,Object.assign({},_e,{ref:a}))}return v.createElement(`input`,Object.assign({},_e,{ref:a}))}function _g(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i=``);var a=t.suffix;a===void 0&&(a=``);var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s=`thousand`),e===``||e===`-`)return e;var c=vg(t),l=c.thousandSeparator,u=c.decimalSeparator,d=n!==0&&e.indexOf(`.`)!==-1||n&&r,f=Xh(e,o),p=f.beforeDecimal,m=f.afterDecimal,h=f.addNegation;return n!==void 0&&(m=Qh(m,n,!!r)),l&&(p=Jh(p,l,s)),i&&(p=i+p),a&&(m+=a),h&&(p=`-`+p),e=p+(d&&u||``)+m,e}function vg(e){var t=e.decimalSeparator;t===void 0&&(t=`.`);var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=`,`),r||=[t,`.`],{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function yg(e,t){e===void 0&&(e=``);var n=RegExp(`(-)`),r=RegExp(`(-)(.)*(-)`),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,``),i&&!a&&t&&(e=`-`+e),e}function bg(e,t){return RegExp(`(^-)|[0-9]|`+Kh(e),t?`g`:void 0)}function xg(e,t,n){return e===``?!0:!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e==`string`&&!isNaN(Number(e))}function Sg(e,t,n){var r;t===void 0&&(t=cg(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a=``);var o=n.suffix;o===void 0&&(o=``);var s=n.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=vg(n),p=f.allowedDecimalSeparators,m=f.decimalSeparator,h=e[d]===m;if(Hh(e)&&(e===a||e===o)&&t.lastValue===``)return e;if(d-u===1&&p.indexOf(e[u])!==-1){var g=s===0?``:m;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var _=function(e,t,n){var r=!1,i=!1;a.startsWith(`-`)?r=!1:e.startsWith(`--`)?(r=!1,i=!0):o.startsWith(`-`)&&e.length===o.length?r=!1:e[0]===`-`&&(r=!0);var s=r?1:0;return i&&(s=2),s&&(e=e.substring(s),t-=s,n-=s),{value:e,start:t,end:n,hasNegation:r}},v=_(e,u,d),y=v.hasNegation;r=v,e=r.value,u=r.start,d=r.end;var b=_(t.lastValue,c.start,c.end),x=b.start,S=b.end,C=b.value,w=e.substring(u,d);e.length&&C.length&&(x>C.length-o.length||S<a.length)&&!(w&&o.startsWith(w))&&(e=C);var T=0;e.startsWith(a)?T+=a.length:u<a.length&&(T=u),e=e.substring(T),d-=T;var E=e.length,D=e.length-o.length;e.endsWith(o)?E=D:(d>D||d>e.length-o.length)&&(E=d),e=e.substring(0,E),e=yg(y?`-`+e:e,i),e=(e.match(bg(m,!0))||[]).join(``);var O=e.indexOf(m);e=e.replace(new RegExp(Kh(m),`g`),function(e,t){return t===O?`.`:``});var k=Xh(e,i),A=k.beforeDecimal,j=k.afterDecimal,ee=k.addNegation;return l.end-l.start<c.end-c.start&&A===``&&h&&!parseFloat(j)&&(e=ee?`-`:``),e}function Cg(e,t){var n=t.prefix;n===void 0&&(n=``);var r=t.suffix;r===void 0&&(r=``);var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]===`-`;i.fill(!1,0,n.length+(a?1:0));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function wg(e){var t=vg(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i=``);var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw Error(`
|
|
54
|
+
Decimal separator can't be same as thousand separator.
|
|
55
|
+
thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
56
|
+
decimalSeparator: `+r+` (default value for decimalSeparator is .)
|
|
57
|
+
`);return i.startsWith(`-`)&&a&&(console.error(`
|
|
58
|
+
Prefix can't start with '-' when allowNegative is true.
|
|
59
|
+
prefix: `+i+`
|
|
60
|
+
allowNegative: `+a+`
|
|
61
|
+
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function Tg(e){e=wg(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=Bh);var a=e.onBlur;a===void 0&&(a=Bh);var o=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l=``);var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,p=e.onValueChange,m=Rh(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=vg(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return _g(t,e)},y=function(t,n){return Sg(t,n,e)},b=Uh(d)?u:d,x=f??xg(b,l,t);Uh(d)?Uh(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return Gh(e)?e:(typeof e==`number`&&(e=eg(e)),x&&typeof s==`number`?tg(e,s,!!c):e)},C=pg(S(d),S(u),!!x,v,y,p),w=C[0],T=w.numAsString,E=w.formattedValue,D=C[1];return Object.assign(Object.assign({},m),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===g?!0:Hh(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],u=r[a],f=rg(n,t).to,p=function(e){return y(e).indexOf(`.`)+l.length};return d===0&&c&&s&&t[f.start]===g&&p(t)<i&&p(r)>a?!1:i>=f.start&&i<f.end&&_&&_.includes(o)&&u===g?!0:o===u},onValueChange:D,format:v,removeFormatting:y,getCaretBoundary:function(t){return Cg(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,u=t.selectionEnd,d=t.value;if(d===void 0&&(d=``),(r===`Backspace`||r===`Delete`)&&u<l.length){e.preventDefault();return}if(a!==u){i(e);return}r===`Backspace`&&d[0]===`-`&&a===l.length+1&&n&&ng(t,1),s&&c&&(r===`Backspace`&&d[a-1]===g?(ng(t,a-1),e.preventDefault()):r===`Delete`&&d[a]===g&&e.preventDefault()),_?.includes(r)&&d[a]===g&&ng(t,a+1);var f=o===!0?`,`:o;r===`Backspace`&&d[a-1]===f&&ng(t,a-1),r===`Delete`&&d[a]===f&&ng(t,a+1),i(e)},onBlur:function(t){var n=T;n.match(/\d/g)||(n=``),r||(n=Zh(n)),c&&s&&(n=tg(n,s,c)),n!==T&&D({formattedValue:_g(n,e),value:n,floatValue:parseFloat(n)},{event:t,source:zh.event}),a(t)}})}function Eg(e){var t=Tg(e);return v.createElement(gg,Object.assign({},t))}var Dg={root:`m_e2f5cd4e`,controls:`m_95e17d22`,control:`m_80b4b171`};function Og({direction:e,style:t,...n}){return(0,I.jsx)(`svg`,{style:{width:`var(--ni-chevron-size)`,height:`var(--ni-chevron-size)`,transform:e===`up`?`rotate(180deg)`:void 0,...t},viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...n,children:(0,I.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var kg=/^(0\.0*|-0(\.0*)?)$/,Ag=/^-?0\d+(\.\d+)?\.?$/,jg=/\.\d*0$/,Mg=/^-?\d+\.$/;function Ng(e){return typeof e==`string`&&e!==``&&!Number.isNaN(Number(e))}function Pg(e){return typeof e==`number`?e<2**53-1:e===``||Ng(e)&&Number(e)<2**53-1}function Fg(e){return e.toString().replace(`.`,``).length}function Ig(e,t){return(typeof e==`number`?e<2**53-1:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&Fg(t)<14&&t!==``}function Lg(e,t,n){return e===void 0?!0:(t===void 0||e>=t)&&(n===void 0||e<=n)}var Rg={step:1,clampBehavior:`blur`,allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[`.`,`,`]},zg=On((e,{size:t})=>({controls:{"--ni-chevron-size":vt(t,`ni-chevron-size`)}}));function Bg(e,t,n){let r=e.toString(),i=Mg.test(r),a=r.replace(/^0+(?=\d)/,``),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>2**53-1)return t===void 0?a:t;let s=kt(o,n,t);return i?`${s.toString().replace(/^0+(?=\d)/,``)}.`:s}var Vg=z((e,t)=>{let n=L(`NumberInput`,Rg,e),{className:r,classNames:i,styles:a,unstyled:o,vars:s,onChange:c,onValueChange:l,value:u,defaultValue:d,max:f,min:p,step:m,hideControls:h,rightSection:g,isAllowed:_,clampBehavior:y,onBlur:b,allowDecimal:x,decimalScale:S,onKeyDown:C,onKeyDownCapture:w,handlersRef:T,startValue:E,disabled:D,rightSectionPointerEvents:O,allowNegative:k,readOnly:A,size:j,rightSectionWidth:ee,stepHoldInterval:te,stepHoldDelay:ne,allowLeadingZeros:re,withKeyboardEvents:M,trimLeadingZeroesOnBlur:N,allowedDecimalSeparators:ie,attributes:ae,...oe}=n,se=ii({name:`NumberInput`,classes:Dg,props:n,classNames:i,styles:a,unstyled:o,attributes:ae,vars:s,varsResolver:zg}),{resolvedClassNames:ce,resolvedStyles:le}=Vr({classNames:i,styles:a,props:n}),[ue,de]=ln({value:u,defaultValue:d,finalValue:``,onChange:c}),fe=ne!==void 0&&te!==void 0,pe=(0,v.useRef)(null),me=(0,v.useRef)(null),he=(0,v.useRef)(0),ge=(e,t)=>{t.source===`event`&&de(Ig(e.floatValue,e.value)&&!kg.test(e.value)&&!(re&&Ag.test(e.value))&&!jg.test(e.value)&&!Mg.test(e.value)?e.floatValue:e.value),l?.(e,t)},_e=e=>{let t=String(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},ve=e=>{pe.current&&e!==void 0&&pe.current.setSelectionRange(e,e)},ye=(0,v.useRef)(gt);ye.current=()=>{if(!Pg(ue))return;let e,t=_e(ue),n=_e(m),r=Math.max(t,n),i=10**r;if(!Ng(ue)&&(typeof ue!=`number`||Number.isNaN(ue)))e=kt(E,p,f);else if(f!==void 0){let t=(Math.round(Number(ue)*i)+Math.round(m*i))/i;e=t<=f?t:f}else e=(Math.round(Number(ue)*i)+Math.round(m*i))/i;let a=e.toFixed(r);de(parseFloat(a)),l?.({floatValue:parseFloat(a),formattedValue:a,value:a},{source:`increment`}),setTimeout(()=>ve(pe.current?.value.length),0)};let be=(0,v.useRef)(gt);be.current=()=>{if(!Pg(ue))return;let e,t=p===void 0?k?-(2**53-1):0:p,n=_e(ue),r=_e(m),i=Math.max(n,r),a=10**i;if(!Ng(ue)&&typeof ue!=`number`||Number.isNaN(ue))e=kt(E,t,f);else{let n=(Math.round(Number(ue)*a)-Math.round(m*a))/a;e=t!==void 0&&n<t?t:n}let o=e.toFixed(i);de(parseFloat(o)),l?.({floatValue:parseFloat(o),formattedValue:o,value:o},{source:`decrement`}),setTimeout(()=>ve(pe.current?.value.length),0)};let xe=e=>{let t=e.clipboardData.getData(`text`),n=oe.decimalSeparator||`.`,r=(ie||[`.`,`,`]).filter(e=>e!==n);if(r.some(e=>t.includes(e))){e.preventDefault();let i=t;r.forEach(e=>{i=i.split(e).join(n)});let a=pe.current;if(a){let e=a.selectionStart??0,t=a.selectionEnd??0,n=a.value,r=n.substring(0,e)+i+n.substring(t);(Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(a,r),a.dispatchEvent(new Event(`change`,{bubbles:!0}));let o=e+i.length;setTimeout(()=>ve(o),0)}}oe.onPaste?.(e)},Se=e=>{C?.(e),!(A||!M)&&(e.key===`ArrowUp`&&(e.preventDefault(),ye.current?.()),e.key===`ArrowDown`&&(e.preventDefault(),be.current?.()))},Ce=e=>{if(w?.(e),e.key===`Backspace`){let t=pe.current;t&&t.selectionStart===0&&t.selectionStart===t.selectionEnd&&(e.preventDefault(),window.setTimeout(()=>ve(0),0))}},we=e=>{let t=ue;y===`blur`&&typeof t==`number`&&(t=kt(t,p,f)),N&&typeof t==`string`&&_e(t)<15&&(t=Bg(t,f,p)),ue!==t&&de(t),b?.(e)};on(T,{increment:ye.current,decrement:be.current});let Te=e=>{e?ye.current?.():be.current?.(),he.current+=1},Ee=e=>{if(Te(e),fe){let t=typeof te==`number`?te:te(he.current);me.current=window.setTimeout(()=>Ee(e),t)}},De=(e,t)=>{e.preventDefault(),pe.current?.focus(),Te(t),fe&&(me.current=window.setTimeout(()=>Ee(t),ne))},Oe=()=>{me.current&&window.clearTimeout(me.current),me.current=null,he.current=0},ke=(0,I.jsxs)(`div`,{...se(`controls`),children:[(0,I.jsx)(gl,{...se(`control`),tabIndex:-1,"aria-hidden":!0,disabled:D||typeof ue==`number`&&f!==void 0&&ue>=f,mod:{direction:`up`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{De(e,!0)},onPointerUp:Oe,onPointerLeave:Oe,children:(0,I.jsx)(Og,{direction:`up`})}),(0,I.jsx)(gl,{...se(`control`),tabIndex:-1,"aria-hidden":!0,disabled:D||typeof ue==`number`&&p!==void 0&&ue<=p,mod:{direction:`down`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{De(e,!1)},onPointerUp:Oe,onPointerLeave:Oe,children:(0,I.jsx)(Og,{direction:`down`})})]});return(0,I.jsx)(gd,{component:Eg,allowNegative:k,className:An(Dg.root,r),size:j,inputMode:`decimal`,...oe,readOnly:A,disabled:D,value:ue,getInputRef:cn(t,pe),onValueChange:ge,rightSection:h||A||!Pg(ue)?g:g||ke,classNames:ce,styles:le,unstyled:o,__staticSelector:`NumberInput`,decimalScale:x?S:0,onPaste:xe,onKeyDown:Se,onKeyDownCapture:Ce,rightSectionPointerEvents:O??(D?`none`:void 0),rightSectionWidth:ee??`var(--ni-right-section-width-${j||`sm`})`,allowLeadingZeros:re,allowedDecimalSeparators:ie,onBlur:we,attributes:ae,isAllowed:e=>y===`strict`?_?_(e)&&Lg(e.floatValue,p,f):Lg(e.floatValue,p,f):_?_(e):!0})});Vg.classes={...gd.classes,...Dg},Vg.displayName=`@mantine/core/NumberInput`;var Hg={root:`m_4addd315`,control:`m_326d024a`,dots:`m_4ad7767d`},[Ug,Wg]=ot(`Pagination.Root component was not found in tree`),Gg={withPadding:!0},Kg=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,active:s,disabled:c,withPadding:l,mod:u,...d}=L(`PaginationControl`,Gg,e),f=Wg(),p=c||f.disabled;return(0,I.jsx)(gl,{ref:t,disabled:p,mod:[{active:s,disabled:p,"with-padding":l},u],...f.getStyles(`control`,{className:r,style:i,classNames:n,styles:a,active:!p}),...d})});Kg.classes=Hg,Kg.displayName=`@mantine/core/PaginationControl`;function qg({style:e,children:t,path:n,...r}){return(0,I.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`,...e},...r,children:(0,I.jsx)(`path`,{d:n,fill:`currentColor`})})}var Jg=e=>(0,I.jsx)(qg,{...e,path:`M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z`}),Yg=e=>(0,I.jsx)(qg,{...e,path:`M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z`}),Xg=e=>(0,I.jsx)(qg,{...e,path:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`}),Zg=e=>(0,I.jsx)(qg,{...e,path:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`}),Qg={icon:e=>(0,I.jsx)(qg,{...e,path:`M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z`})},$g=z((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,icon:s,...c}=L(`PaginationDots`,Qg,e);return(0,I.jsx)(R,{ref:t,...Wg().getStyles(`dots`,{className:r,style:i,styles:a,classNames:n}),...c,children:(0,I.jsx)(s,{style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});$g.classes=Hg,$g.displayName=`@mantine/core/PaginationDots`;function e_({icon:e,name:t,action:n,type:r}){let i={icon:e},a=(0,v.forwardRef)((e,a)=>{let{icon:o,...s}=L(t,i,e),c=Wg(),l=r===`next`?c.active===c.total:c.active===1;return(0,I.jsx)(Kg,{disabled:c.disabled||l,ref:a,onClick:c[n],withPadding:!1,...s,children:(0,I.jsx)(o,{className:`mantine-rotate-rtl`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});return a.displayName=`@mantine/core/${t}`,Pi(a)}var t_=e_({icon:Jg,name:`PaginationNext`,action:`onNext`,type:`next`}),n_=e_({icon:Yg,name:`PaginationPrevious`,action:`onPrevious`,type:`previous`}),r_=e_({icon:Xg,name:`PaginationFirst`,action:`onFirst`,type:`previous`}),i_=e_({icon:Zg,name:`PaginationLast`,action:`onLast`,type:`next`});function a_({dotsIcon:e}){let t=Wg();return(0,I.jsx)(I.Fragment,{children:t.range.map((n,r)=>n===`dots`?(0,I.jsx)($g,{icon:e},r):(0,I.jsx)(Kg,{active:n===t.active,"aria-current":n===t.active?`page`:void 0,onClick:()=>t.onChange(n),disabled:t.disabled,...t.getItemProps?.(n),children:t.getItemProps?.(n)?.children??n},r))})}a_.displayName=`@mantine/core/PaginationItems`;var o_={siblings:1,boundaries:1},s_=On((e,{size:t,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:bt(n),"--pagination-control-size":vt(t,`pagination-control-size`),"--pagination-control-fz":xt(t),"--pagination-active-bg":r?rr(r,e):void 0,"--pagination-active-color":ai(i,e)?Tr({color:r,theme:e,autoContrast:i}):void 0}})),c_=z((e,t)=>{let n=L(`PaginationRoot`,o_,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,total:l,value:u,defaultValue:d,onChange:f,disabled:p,siblings:m,boundaries:h,color:g,radius:_,onNextPage:v,onPreviousPage:y,onFirstPage:b,onLastPage:x,getItemProps:S,autoContrast:C,attributes:w,...T}=n,E=ii({name:`Pagination`,classes:Hg,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:w,vars:c,varsResolver:s_}),{range:D,setPage:O,next:k,previous:A,active:j,first:ee,last:te}=fn({page:u,initialPage:d,onChange:f,total:l,siblings:m,boundaries:h});return(0,I.jsx)(Ug,{value:{total:l,range:D,active:j,disabled:p,getItemProps:S,onChange:O,onNext:wt(v,k),onPrevious:wt(y,A),onFirst:wt(b,ee),onLast:wt(x,te),getStyles:E},children:(0,I.jsx)(R,{ref:t,...E(`root`),...T})})});c_.classes=Hg,c_.displayName=`@mantine/core/PaginationRoot`;var l_={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8},u_=z((e,t)=>{let{withEdges:n,withControls:r,getControlProps:i,nextIcon:a,previousIcon:o,lastIcon:s,firstIcon:c,dotsIcon:l,total:u,gap:d,hideWithOnePage:f,withPages:p,...m}=L(`Pagination`,l_,e);return u<=0||f&&u===1?null:(0,I.jsx)(c_,{ref:t,total:u,...m,children:(0,I.jsxs)(B,{gap:d,children:[n&&(0,I.jsx)(r_,{icon:c,...i?.(`first`)}),r&&(0,I.jsx)(n_,{icon:o,...i?.(`previous`)}),p&&(0,I.jsx)(a_,{dotsIcon:l}),r&&(0,I.jsx)(t_,{icon:a,...i?.(`next`)}),n&&(0,I.jsx)(i_,{icon:s,...i?.(`last`)})]})})});u_.classes=Hg,u_.displayName=`@mantine/core/Pagination`,u_.Root=c_,u_.Control=Kg,u_.Dots=$g,u_.First=r_,u_.Last=i_,u_.Next=t_,u_.Previous=n_,u_.Items=a_;var d_={root:`m_f61ca620`,input:`m_ccf8da4c`,innerInput:`m_f2d85dd2`,visibilityToggle:`m_b1072d44`},f_={visibilityToggleIcon:({reveal:e})=>(0,I.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`var(--psi-icon-size)`,height:`var(--psi-icon-size)`},children:(0,I.jsx)(`path`,{d:e?`M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z`:`M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})},p_=On((e,{size:t})=>({root:{"--psi-icon-size":vt(t,`psi-icon-size`),"--psi-button-size":vt(t,`psi-button-size`)}})),m_=z((e,t)=>{let n=L(`PasswordInput`,f_,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,required:l,error:u,leftSection:d,disabled:f,id:p,variant:m,inputContainer:h,description:g,label:_,size:v,errorProps:y,descriptionProps:b,labelProps:x,withAsterisk:S,inputWrapperOrder:C,wrapperProps:w,radius:T,rightSection:E,rightSectionWidth:D,rightSectionPointerEvents:O,leftSectionWidth:k,visible:A,defaultVisible:j,onVisibilityChange:ee,visibilityToggleIcon:te,visibilityToggleButtonProps:ne,rightSectionProps:re,leftSectionProps:M,leftSectionPointerEvents:N,withErrorStyles:ie,mod:ae,attributes:oe,...se}=n,ce=rn(p),[le,ue]=ln({value:A,defaultValue:j,finalValue:!1,onChange:ee}),de=()=>ue(!le),fe=ii({name:`PasswordInput`,classes:d_,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:oe,vars:c,varsResolver:p_}),{resolvedClassNames:pe,resolvedStyles:me}=Vr({classNames:r,styles:o,props:n}),{styleProps:he,rest:ge}=li(se),_e=y?.id||`${ce}-error`,ve=b?.id||`${ce}-description`,ye=`${u&&typeof u!=`boolean`?_e:``} ${g?ve:``}`,be=ye.trim().length>0?ye.trim():void 0,xe=(0,I.jsx)(vu,{...fe(`visibilityToggle`),disabled:f,radius:T,"aria-hidden":!ne,"aria-pressed":le,tabIndex:-1,...ne,variant:ne?.variant??`subtle`,color:`gray`,unstyled:s,onTouchEnd:e=>{e.preventDefault(),ne?.onTouchEnd?.(e),de()},onMouseDown:e=>{e.preventDefault(),ne?.onMouseDown?.(e),de()},onKeyDown:e=>{ne?.onKeyDown?.(e),e.key===` `&&(e.preventDefault(),de())},children:(0,I.jsx)(te,{reveal:le})});return(0,I.jsx)(pd.Wrapper,{required:l,id:ce,label:_,error:u,description:g,size:v,classNames:pe,styles:me,__staticSelector:`PasswordInput`,__stylesApiProps:n,unstyled:s,withAsterisk:S,inputWrapperOrder:C,inputContainer:h,variant:m,labelProps:{...x,htmlFor:ce},descriptionProps:{...b,id:ve},errorProps:{...y,id:_e},mod:ae,attributes:oe,...fe(`root`),...he,...w,children:(0,I.jsx)(pd,{component:`div`,error:u,leftSection:d,size:v,classNames:{...pe,input:An(d_.input,pe.input)},styles:me,radius:T,disabled:f,__staticSelector:`PasswordInput`,__stylesApiProps:n,rightSectionWidth:D,rightSection:E??xe,variant:m,unstyled:s,leftSectionWidth:k,rightSectionPointerEvents:O||`all`,rightSectionProps:re,leftSectionProps:M,leftSectionPointerEvents:N,withAria:!1,withErrorStyles:ie,attributes:oe,children:(0,I.jsx)(`input`,{required:l,"data-invalid":!!u||void 0,"data-with-left-section":!!d||void 0,...fe(`innerInput`),disabled:f,id:ce,ref:t,...ge,"aria-describedby":be,autoComplete:ge.autoComplete||`off`,type:le?`text`:`password`})})})});m_.classes={...gd.classes,...d_},m_.displayName=`@mantine/core/PasswordInput`;var h_={duration:100,transition:`fade`};function g_(e,t){return{...h_,...t,...e}}var __={tooltip:`m_1b3c8819`,arrow:`m_f898399f`};function v_({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,v.useState)(n),a=(0,v.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=Ec({placement:t,middleware:[Is({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,v.useCallback)(({clientX:e,clientY:t})=>{l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,v.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=wa(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var y_={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:ht(`popover`)},b_=On((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:bt(t),"--tooltip-bg":n?rr(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),x_=z((e,t)=>{let n=L(`TooltipFloating`,y_,e),{children:r,refProp:i,withinPortal:a,style:o,className:s,classNames:c,styles:l,unstyled:u,radius:d,color:f,label:p,offset:m,position:h,multiline:g,zIndex:_,disabled:y,defaultOpened:b,variant:x,vars:S,portalProps:C,attributes:w,...T}=n,E=br(),D=ii({name:`TooltipFloating`,props:n,classes:__,className:s,style:o,classNames:c,styles:l,unstyled:u,attributes:w,rootSelector:`tooltip`,vars:S,varsResolver:b_}),{handleMouseMove:O,x:k,y:A,opened:j,boundaryRef:ee,floating:te,setOpened:ne}=v_({offset:m,position:h,defaultOpened:b}),re=Dn(r);if(!re)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let M=cn(ee,Cn(re),t),N=re.props,ie=e=>{N.onMouseEnter?.(e),O(e),ne(!0)},ae=e=>{N.onMouseLeave?.(e),ne(!1)};return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Il,{...C,withinPortal:a,children:(0,I.jsx)(R,{...T,...D(`tooltip`,{style:{...Ni(o,E),zIndex:_,display:!y&&j?`block`:`none`,top:(A&&Math.round(A))??``,left:(k&&Math.round(k))??``}}),variant:x,ref:te,mod:{multiline:g},children:p})}),(0,v.cloneElement)(re,{...N,[i]:M,onMouseEnter:ie,onMouseLeave:ae})]})});x_.classes=__,x_.displayName=`@mantine/core/TooltipFloating`;var S_=(0,v.createContext)(!1),C_=S_.Provider,w_=()=>(0,v.useContext)(S_),T_={openDelay:0,closeDelay:0};function E_(e){let{openDelay:t,closeDelay:n,children:r}=L(`TooltipGroup`,T_,e);return(0,I.jsx)(C_,{value:!0,children:(0,I.jsx)(yc,{delay:{open:t,close:n},children:r})})}E_.displayName=`@mantine/core/TooltipGroup`,E_.extend=e=>e;function D_(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function O_(e){let t=D_(e.middlewares),n=[Fs(e.offset)];return t.shift&&n.push(Is(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?Rs():Rs(t.flip)),n.push(Hs({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?Vs():Vs(t.inline)):e.inline&&n.push(Vs()),n}function k_(e){let[t,n]=(0,v.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=w_(),a=rn(),o=(0,v.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=Ec({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:O_(e),whileElementsMounted:vs}),{delay:m,currentId:h,setCurrentId:g}=bc(l,{id:a}),{getReferenceProps:_,getFloatingProps:y}=Ac([hc(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch}),Oc(l,{enabled:e.events?.focus,visibleOnly:!0}),Mc(l,{role:`tooltip`}),wc(l,{enabled:e.opened===void 0})]);Vt(()=>{e.onPositionChange?.(d)},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:y,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var A_={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:ht(`popover`),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},j_=On((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:bt(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),M_=z((e,t)=>{let n=L(`Tooltip`,A_,e),{children:r,position:i,refProp:a,label:o,openDelay:s,closeDelay:c,onPositionChange:l,opened:u,defaultOpened:d,withinPortal:f,radius:p,color:m,classNames:h,styles:g,unstyled:_,style:y,className:b,withArrow:x,arrowSize:S,arrowOffset:C,arrowRadius:w,arrowPosition:T,offset:E,transitionProps:D,multiline:O,events:k,zIndex:A,disabled:j,positionDependencies:ee,onClick:te,onMouseEnter:ne,onMouseLeave:re,inline:M,variant:N,keepMounted:ie,vars:ae,portalProps:oe,mod:se,floatingStrategy:ce,middlewares:le,autoContrast:ue,attributes:de,target:fe,...pe}=L(`Tooltip`,A_,n),{dir:me}=Gi(),he=(0,v.useRef)(null),ge=k_({position:Dl(me,i),closeDelay:c,openDelay:s,onPositionChange:l,opened:u,defaultOpened:d,events:k,arrowRef:he,arrowOffset:C,offset:typeof E==`number`?E+(x?S/2:0):E,positionDependencies:[...ee,fe??r],inline:M,strategy:ce,middlewares:le});(0,v.useEffect)(()=>{let e=fe instanceof HTMLElement?fe:typeof fe==`string`?document.querySelector(fe):fe?.current||null;e&&ge.reference(e)},[fe,ge]);let _e=ii({name:`Tooltip`,props:n,classes:__,className:b,style:y,classNames:h,styles:g,unstyled:_,attributes:de,rootSelector:`tooltip`,vars:ae,varsResolver:j_}),ve=Dn(r);if(!fe&&!ve)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);if(fe){let e=g_(D,{duration:100,transition:`fade`});return(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(Il,{...oe,withinPortal:f,children:(0,I.jsx)(Hl,{...e,keepMounted:ie,mounted:!j&&!!ge.opened,duration:ge.isGroupPhase?10:e.duration,children:e=>(0,I.jsxs)(R,{...pe,"data-fixed":ce===`fixed`||void 0,variant:N,mod:[{multiline:O},se],...ge.getFloatingProps({ref:ge.floating,className:_e(`tooltip`).className,style:{..._e(`tooltip`).style,...e,zIndex:A,top:ge.y??0,left:ge.x??0}}),children:[o,(0,I.jsx)(El,{ref:he,arrowX:ge.arrowX,arrowY:ge.arrowY,visible:x,position:ge.placement,arrowSize:S,arrowOffset:C,arrowRadius:w,arrowPosition:T,..._e(`arrow`)})]})})})})}let ye=ve.props,be=cn(ge.reference,Cn(ve),t),xe=g_(D,{duration:100,transition:`fade`});return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Il,{...oe,withinPortal:f,children:(0,I.jsx)(Hl,{...xe,keepMounted:ie,mounted:!j&&!!ge.opened,duration:ge.isGroupPhase?10:xe.duration,children:e=>(0,I.jsxs)(R,{...pe,"data-fixed":ce===`fixed`||void 0,variant:N,mod:[{multiline:O},se],...ge.getFloatingProps({ref:ge.floating,className:_e(`tooltip`).className,style:{..._e(`tooltip`).style,...e,zIndex:A,top:ge.y??0,left:ge.x??0}}),children:[o,(0,I.jsx)(El,{ref:he,arrowX:ge.arrowX,arrowY:ge.arrowY,visible:x,position:ge.placement,arrowSize:S,arrowOffset:C,arrowRadius:w,arrowPosition:T,..._e(`arrow`)})]})})}),(0,v.cloneElement)(ve,ge.getReferenceProps({onClick:te,onMouseEnter:ne,onMouseLeave:re,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...ye,className:An(b,ye.className),[a]:be}))]})});M_.classes=__,M_.displayName=`@mantine/core/Tooltip`,M_.Floating=x_,M_.Group=E_;var N_={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},P_={withItemsBorders:!0},F_=On((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:bt(t),"--sc-color":n?rr(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":vt(i,`sc-padding`),"--sc-font-size":xt(i)}})),I_=z((e,t)=>{let n=L(`SegmentedControl`,P_,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,data:l,value:u,defaultValue:d,onChange:f,size:p,name:m,disabled:h,readOnly:g,fullWidth:_,orientation:y,radius:b,color:x,transitionDuration:S,transitionTimingFunction:C,variant:w,autoContrast:T,withItemsBorders:E,mod:D,attributes:O,...k}=n,A=ii({name:`SegmentedControl`,props:n,classes:N_,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:O,vars:c,varsResolver:F_}),j=br(),ee=l.map(e=>typeof e==`string`?{label:e,value:e}:e),te=xn(),[ne,re]=(0,v.useState)(At()),[M,N]=(0,v.useState)(null),[ie,ae]=(0,v.useState)({}),oe=(e,t)=>{ie[t]=e,ae(ie)},[se,ce]=ln({value:u,defaultValue:d,finalValue:Array.isArray(l)?ee.find(e=>!e.disabled)?.value??l[0]?.value??null:null,onChange:f}),le=rn(m),ue=ee.map(e=>(0,v.createElement)(R,{...A(`control`),mod:{active:se===e.value,orientation:y},key:e.value},(0,v.createElement)(`input`,{...A(`input`),disabled:h||e.disabled,type:`radio`,name:le,value:e.value,id:`${le}-${e.value}`,checked:se===e.value,onChange:()=>!g&&ce(e.value),"data-focus-ring":j.focusRing,key:`${e.value}-input`}),(0,v.createElement)(R,{component:`label`,...A(`label`),mod:{active:se===e.value&&!(h||e.disabled),disabled:h||e.disabled,"read-only":g},htmlFor:`${le}-${e.value}`,ref:t=>oe(t,e.value),__vars:{"--sc-label-color":x===void 0?void 0:Tr({color:x,theme:j,autoContrast:T})},key:`${e.value}-label`},(0,I.jsx)(`span`,{...A(`innerLabel`),children:e.label})))),de=cn(t,e=>N(e));return gn(()=>{re(At())},[l.length]),l.length===0?null:(0,I.jsxs)(R,{...A(`root`),variant:w,size:p,ref:de,mod:[{"full-width":_,orientation:y,initialized:te,"with-items-borders":E},D],...k,role:`radiogroup`,"data-disabled":h,children:[typeof se==`string`&&(0,I.jsx)(xd,{target:ie[se],parent:M,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...A(`indicator`)},ne),ue]})});I_.classes=N_,I_.displayName=`@mantine/core/SegmentedControl`;var L_={withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},R_=z((e,t)=>{let n=L(`Select`,L_,e),{classNames:r,styles:i,unstyled:a,vars:o,dropdownOpened:s,defaultDropdownOpened:c,onDropdownClose:l,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:p,onChange:m,data:h,value:g,defaultValue:_,selectFirstOptionOnChange:y,selectFirstOptionOnDropdownOpen:b,onOptionSubmit:x,comboboxProps:S,readOnly:C,disabled:w,filter:T,limit:E,withScrollArea:D,maxDropdownHeight:O,size:k,searchable:A,rightSection:j,checkIconPosition:ee,withCheckIcon:te,withAlignedLabels:ne,nothingFoundMessage:re,name:M,form:N,searchValue:ie,defaultSearchValue:ae,onSearchChange:oe,allowDeselect:se,error:ce,rightSectionPointerEvents:le,id:ue,clearable:de,clearButtonProps:fe,hiddenInputProps:pe,renderOption:me,onClear:he,autoComplete:ge,scrollAreaProps:_e,__defaultRightSection:ve,__clearSection:ye,__clearable:be,chevronColor:xe,autoSelectOnBlur:Se,openOnFocus:Ce,attributes:we,...Te}=n,Ee=(0,v.useMemo)(()=>_f(h),[h]),De=(0,v.useRef)({}),Oe=(0,v.useMemo)(()=>vf(Ee),[Ee]),ke=rn(ue),[P,Ae,je]=ln({value:g,defaultValue:_,finalValue:null,onChange:m}),Me=typeof P==`string`?P in Oe?Oe[P]:De.current[P]:void 0,Ne=yn(Me),[Pe,Fe,Ie]=ln({value:ie,defaultValue:ae,finalValue:Me?Me.label:``,onChange:oe}),Le=Kf({opened:s,defaultOpened:c,onDropdownOpen:()=>{u?.(),b?Le.selectFirstOption():Le.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{l?.(),setTimeout(Le.resetSelectedOption,0)}}),Re=e=>{Fe(e),Le.resetSelectedOption()},{resolvedClassNames:ze,resolvedStyles:Be}=Vr({props:n,styles:i,classNames:r});(0,v.useEffect)(()=>{y&&Le.selectFirstOption()},[y,Pe]),(0,v.useEffect)(()=>{g===null&&Re(``),typeof g==`string`&&Me&&(Ne?.value!==Me.value||Ne?.label!==Me.label)&&Re(Me.label)},[g,Me]),(0,v.useEffect)(()=>{!je&&!Ie&&Re(typeof P==`string`?P in Oe?Oe[P]?.label:De.current[P]?.label||``:``)},[Oe,P]),(0,v.useEffect)(()=>{P&&P in Oe&&(De.current[P]=Oe[P])},[Oe,P]);let Ve=(0,I.jsx)(Yf.ClearButton,{...fe,onClear:()=>{Ae(null,null),Re(``),he?.()}}),He=de&&!!P&&!w&&!C;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(Yf,{store:Le,__staticSelector:`Select`,classNames:ze,styles:Be,unstyled:a,readOnly:C,size:k,attributes:we,keepMounted:Se,onOptionSubmit:e=>{x?.(e);let t=se&&Oe[e].value===P?null:Oe[e],n=t?t.value:null;n!==P&&Ae(n,t),!je&&Re(typeof n==`string`&&t?.label||``),Le.closeDropdown()},...S,children:[(0,I.jsx)(Yf.Target,{targetType:A?`input`:`button`,autoComplete:ge,children:(0,I.jsx)(gd,{id:ke,ref:t,__defaultRightSection:(0,I.jsx)(Yf.Chevron,{size:k,error:ce,unstyled:a,color:xe}),__clearSection:Ve,__clearable:He,rightSection:j,rightSectionPointerEvents:le||`none`,...Te,size:k,__staticSelector:`Select`,disabled:w,readOnly:C||!A,value:Pe,onChange:e=>{Re(e.currentTarget.value),Le.openDropdown(),y&&Le.selectFirstOption()},onFocus:e=>{Ce&&A&&Le.openDropdown(),d?.(e)},onBlur:e=>{Se&&Le.clickSelectedOption(),A&&Le.closeDropdown();let t=typeof P==`string`&&(P in Oe?Oe[P]:De.current[P]);Re(t&&t.label||``),f?.(e)},onClick:e=>{A?Le.openDropdown():Le.toggleDropdown(),p?.(e)},classNames:ze,styles:Be,unstyled:a,pointer:!A,error:ce,attributes:we})}),(0,I.jsx)(Ep,{data:Ee,hidden:C||w,filter:T,search:Pe,limit:E,hiddenWhenEmpty:!re,withScrollArea:D,maxDropdownHeight:O,filterOptions:!!A&&Me?.label!==Pe,value:P,checkIconPosition:ee,withCheckIcon:te,withAlignedLabels:ne,nothingFoundMessage:re,unstyled:a,labelId:Te.label?`${ke}-label`:void 0,"aria-label":Te.label?void 0:Te[`aria-label`],renderOption:me,scrollAreaProps:_e})]}),(0,I.jsx)(Yf.HiddenInput,{value:P,name:M,form:N,disabled:w,...pe})]})});R_.classes={...gd.classes,...Yf.classes},R_.displayName=`@mantine/core/Select`;var z_={container:`m_925c2d2c`,root:`m_2415a157`};function B_({spacing:e,verticalSpacing:t,cols:n,selector:r}){let i=br(),a=t===void 0?e:t,o=nt({"--sg-spacing-x":yt(Dt(e)),"--sg-spacing-y":yt(Dt(a)),"--sg-cols":Dt(n)?.toString()}),s=qe(i.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=yt(e[r])),typeof a==`object`&&a[r]!==void 0&&(t[r][`--sg-spacing-y`]=yt(a[r])),typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,I.jsx)(ci,{styles:o,media:Et(qe(s),i.breakpoints).filter(e=>qe(s[e.value]).length>0).map(e=>({query:`(min-width: ${i.breakpoints[e.value]})`,styles:s[e.value]})),selector:r})}function V_(e){return typeof e==`object`&&e?qe(e):[]}function H_(e){return e.sort((e,t)=>Qe(e)-Qe(t))}function U_({spacing:e,verticalSpacing:t,cols:n}){return H_(Array.from(new Set([...V_(e),...V_(t),...V_(n)])))}function W_({spacing:e,verticalSpacing:t,cols:n,selector:r}){let i=t===void 0?e:t,a=nt({"--sg-spacing-x":yt(Dt(e)),"--sg-spacing-y":yt(Dt(i)),"--sg-cols":Dt(n)?.toString()}),o=U_({spacing:e,verticalSpacing:t,cols:n}),s=o.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=yt(e[r])),typeof i==`object`&&i[r]!==void 0&&(t[r][`--sg-spacing-y`]=yt(i[r])),typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,I.jsx)(ci,{styles:a,container:o.map(e=>({query:`simple-grid (min-width: ${e})`,styles:s[e]})),selector:r})}var G_={cols:1,spacing:`md`,type:`media`},K_=z((e,t)=>{let n=L(`SimpleGrid`,G_,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,cols:l,verticalSpacing:u,spacing:d,type:f,attributes:p,...m}=n,h=ii({name:`SimpleGrid`,classes:z_,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:p,vars:c}),g=Mi();return f===`container`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(W_,{...n,selector:`.${g}`}),(0,I.jsx)(`div`,{...h(`container`),children:(0,I.jsx)(R,{ref:t,...h(`root`,{className:g}),...m})})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(B_,{...n,selector:`.${g}`}),(0,I.jsx)(R,{ref:t,...h(`root`,{className:g}),...m})]})});K_.classes=z_,K_.displayName=`@mantine/core/SimpleGrid`;var q_={root:`m_6d731127`},J_={gap:`md`,align:`stretch`,justify:`flex-start`},Y_=On((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":yt(t),"--stack-align":n,"--stack-justify":r}})),U=z((e,t)=>{let n=L(`Stack`,J_,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,align:l,justify:u,gap:d,variant:f,attributes:p,...m}=n;return(0,I.jsx)(R,{ref:t,...ii({name:`Stack`,props:n,classes:q_,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:p,vars:c,varsResolver:Y_})(`root`),variant:f,...m})});U.classes=q_,U.displayName=`@mantine/core/Stack`;var X_={root:`m_5f93f3bb`,input:`m_926b4011`,track:`m_9307d992`,thumb:`m_93039a1d`,trackLabel:`m_8277e082`},Z_=(0,v.createContext)(null),Q_=Z_.Provider,$_=()=>(0,v.useContext)(Z_),ev=z((e,t)=>{let{value:n,defaultValue:r,onChange:i,size:a,wrapperProps:o,children:s,readOnly:c,disabled:l,...u}=L(`SwitchGroup`,null,e),[d,f]=ln({value:n,defaultValue:r,finalValue:[],onChange:i});return(0,I.jsx)(Q_,{value:{value:d,onChange:e=>{let t=e.currentTarget.value;!c&&f(d.includes(t)?d.filter(e=>e!==t):[...d,t])},size:a,disabled:l},children:(0,I.jsx)(pd.Wrapper,{size:a,ref:t,...o,...u,labelElement:`div`,__staticSelector:`SwitchGroup`,children:(0,I.jsx)(lp,{role:`group`,children:s})})})});ev.classes=pd.Wrapper.classes,ev.displayName=`@mantine/core/SwitchGroup`;var tv={labelPosition:`right`,withThumbIndicator:!0},nv=On((e,{radius:t,color:n,size:r})=>({root:{"--switch-radius":t===void 0?void 0:bt(t),"--switch-height":vt(r,`switch-height`),"--switch-width":vt(r,`switch-width`),"--switch-thumb-size":vt(r,`switch-thumb-size`),"--switch-label-font-size":vt(r,`switch-label-font-size`),"--switch-track-label-padding":vt(r,`switch-track-label-padding`),"--switch-color":n?rr(n,e):void 0}})),rv=z((e,t)=>{let n=L(`Switch`,tv,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,color:l,label:u,offLabel:d,onLabel:f,id:p,size:m,radius:h,wrapperProps:g,thumbIcon:_,checked:v,defaultChecked:y,onChange:b,labelPosition:x,description:S,error:C,disabled:w,variant:T,rootRef:E,mod:D,withThumbIndicator:O,attributes:k,...A}=n,j=$_(),ee=m||j?.size,te=ii({name:`Switch`,props:n,classes:X_,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:k,vars:c,varsResolver:nv}),{styleProps:ne,rest:re}=li(A),M=rn(p),N={checked:j?.value.includes(re.value)??v,onChange:e=>{j?.onChange(e),b?.(e)},disabled:j?.disabled??w},[ie,ae]=ln({value:N.checked??v,defaultValue:y,finalValue:!1});return(0,I.jsxs)(Qf,{...te(`root`),__staticSelector:`Switch`,__stylesApiProps:n,id:M,size:ee,labelPosition:x,label:u,description:S,error:C,disabled:N.disabled,bodyElement:`label`,labelElement:`span`,classNames:r,styles:o,unstyled:s,"data-checked":N.checked,variant:T,ref:E,mod:D,inert:re.inert,...ne,...g,children:[(0,I.jsx)(`input`,{...re,...N,checked:ie,"data-checked":N.checked,onChange:e=>{N.onChange?.(e),ae(e.currentTarget.checked)},id:M,ref:t,type:`checkbox`,role:`switch`,inert:re.inert,...te(`input`)}),(0,I.jsxs)(R,{"aria-hidden":`true`,component:`span`,mod:{error:C,"label-position":x,"without-labels":!f&&!d},...te(`track`),children:[(0,I.jsx)(R,{component:`span`,mod:{"reduce-motion":!0,"with-thumb-indicator":O&&!_},...te(`thumb`),children:_}),(0,I.jsx)(`span`,{...te(`trackLabel`),children:ie?f:d})]})]})});rv.classes={...X_,...Zf},rv.displayName=`@mantine/core/Switch`,rv.Group=ev;var[iv,av]=ot(`Table component was not found in the tree`),ov={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function sv(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function cv(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=z((r,i)=>{let a=L(n,{},r),{classNames:o,className:s,style:c,styles:l,...u}=a,d=av();return(0,I.jsx)(R,{component:e,ref:i,...sv(d,t),...d.getStyles(e,{className:s,classNames:o,style:c,styles:l,props:a}),...u})});return r.displayName=`@mantine/core/${n}`,r.classes=ov,r}var lv=cv(`th`,{columnBorder:!0}),uv=cv(`td`,{columnBorder:!0}),dv=cv(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),fv=cv(`thead`,{stickyHeader:!0}),pv=cv(`tbody`),mv=cv(`tfoot`),hv=cv(`caption`,{captionSide:!0});function gv({data:e}){return(0,I.jsxs)(I.Fragment,{children:[e.caption&&(0,I.jsx)(hv,{children:e.caption}),e.head&&(0,I.jsx)(fv,{children:(0,I.jsx)(dv,{children:e.head.map((e,t)=>(0,I.jsx)(lv,{children:e},t))})}),e.body&&(0,I.jsx)(pv,{children:e.body.map((e,t)=>(0,I.jsx)(dv,{children:e.map((e,t)=>(0,I.jsx)(uv,{children:e},t))},t))}),e.foot&&(0,I.jsx)(mv,{children:(0,I.jsx)(dv,{children:e.foot.map((e,t)=>(0,I.jsx)(lv,{children:e},t))})})]})}gv.displayName=`@mantine/core/TableDataRenderer`;var _v={type:`scrollarea`},vv=On((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":F(t),"--table-max-height":F(n),"--table-overflow":r===`native`?`auto`:void 0}})),yv=z((e,t)=>{let n=L(`TableScrollContainer`,_v,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,children:l,minWidth:u,maxHeight:d,type:f,scrollAreaProps:p,attributes:m,...h}=n,g=ii({name:`TableScrollContainer`,classes:ov,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:m,vars:c,varsResolver:vv,rootSelector:`scrollContainer`});return(0,I.jsx)(R,{component:f===`scrollarea`?fl:`div`,...f===`scrollarea`?d?{offsetScrollbars:`xy`,...p}:{offsetScrollbars:`x`,...p}:{},ref:t,...g(`scrollContainer`),...h,children:(0,I.jsx)(`div`,{...g(`scrollContainerInner`),children:l})})});yv.classes=ov,yv.displayName=`@mantine/core/TableScrollContainer`;var bv={withRowBorders:!0,verticalSpacing:7},xv=On((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":yt(r),"--table-vertical-spacing":yt(i),"--table-border-color":a?rr(a,e):void 0,"--table-striped-color":c&&o?rr(o,e):void 0,"--table-highlight-on-hover-color":l&&s?rr(s,e):void 0,"--table-sticky-header-offset":d?F(u):void 0}})),W=z((e,t)=>{let n=L(`Table`,bv,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,horizontalSpacing:l,verticalSpacing:u,captionSide:d,stripedColor:f,highlightOnHoverColor:p,striped:m,highlightOnHover:h,withColumnBorders:g,withRowBorders:_,withTableBorder:v,borderColor:y,layout:b,variant:x,data:S,children:C,stickyHeader:w,stickyHeaderOffset:T,mod:E,tabularNums:D,attributes:O,...k}=n,A=ii({name:`Table`,props:n,className:i,style:a,classes:ov,classNames:r,styles:o,unstyled:s,attributes:O,rootSelector:`table`,vars:c,varsResolver:xv});return(0,I.jsx)(iv,{value:{getStyles:A,stickyHeader:w,striped:m===!0?`odd`:m||void 0,highlightOnHover:h,withColumnBorders:g,withRowBorders:_,captionSide:d||`bottom`},children:(0,I.jsx)(R,{component:`table`,variant:x,ref:t,mod:[{"data-with-table-border":v,"data-tabular-nums":D},E],...A(`table`),...k,children:C||!!S&&(0,I.jsx)(gv,{data:S})})})});W.classes=ov,W.displayName=`@mantine/core/Table`,W.Td=uv,W.Th=lv,W.Tr=dv,W.Thead=fv,W.Tbody=pv,W.Tfoot=mv,W.Caption=hv,W.ScrollContainer=yv,W.DataRenderer=gv;var[Sv,Cv]=ot(`Tabs component was not found in the tree`),wv={root:`m_89d60db1`,"list--default":`m_576c9d4`,list:`m_89d33d6d`,tab:`m_4ec4dce6`,panel:`m_b0c91715`,tabSection:`m_fc420b1f`,tabLabel:`m_42bbd1ae`,"tab--default":`m_539e827b`,"list--outline":`m_6772fbd5`,"tab--outline":`m_b59ab47c`,"tab--pills":`m_c3381914`},Tv=z((e,t)=>{let n=L(`TabsList`,null,e),{children:r,className:i,grow:a,justify:o,classNames:s,styles:c,style:l,mod:u,...d}=n,f=Cv();return(0,I.jsx)(R,{...d,...f.getStyles(`list`,{className:i,style:l,classNames:s,styles:c,props:n,variant:f.variant}),ref:t,role:`tablist`,variant:f.variant,mod:[{grow:a,orientation:f.orientation,placement:f.orientation===`vertical`&&f.placement,inverted:f.inverted},u],"aria-orientation":f.orientation,__vars:{"--tabs-justify":o},children:r})});Tv.classes=wv,Tv.displayName=`@mantine/core/TabsList`;var Ev=z((e,t)=>{let n=L(`TabsPanel`,null,e),{children:r,className:i,value:a,classNames:o,styles:s,style:c,mod:l,keepMounted:u,...d}=n,f=Cv(),p=f.value===a,m=f.keepMounted||u||p?r:null;return(0,I.jsx)(R,{...f.getStyles(`panel`,{className:i,classNames:o,styles:s,style:[c,p?void 0:{display:`none`}],props:n}),ref:t,mod:[{orientation:f.orientation},l],role:`tabpanel`,id:f.getPanelId(a),"aria-labelledby":f.getTabId(a),...d,children:m})});Ev.classes=wv,Ev.displayName=`@mantine/core/TabsPanel`;var Dv=z((e,t)=>{let n=L(`TabsTab`,null,e),{className:r,children:i,rightSection:a,leftSection:o,value:s,onClick:c,onKeyDown:l,disabled:u,color:d,style:f,classNames:p,styles:m,vars:h,mod:g,tabIndex:_,...v}=n,y=br(),{dir:b}=Gi(),x=Cv(),S=s===x.value,C=e=>{x.onChange(x.allowTabDeactivation&&s===x.value?null:s),c?.(e)},w={classNames:p,styles:m,props:n};return(0,I.jsxs)(gl,{...x.getStyles(`tab`,{className:r,style:f,variant:x.variant,...w}),disabled:u,unstyled:x.unstyled,variant:x.variant,mod:[{active:S,disabled:u,orientation:x.orientation,inverted:x.inverted,placement:x.orientation===`vertical`&&x.placement},g],ref:t,role:`tab`,id:x.getTabId(s),"aria-selected":S,tabIndex:_===void 0?S||x.value===null?0:-1:_,"aria-controls":x.getPanelId(s),onClick:C,__vars:{"--tabs-color":d?rr(d,y):void 0},onKeyDown:pt({siblingSelector:`[role="tab"]`,parentSelector:`[role="tablist"]`,activateOnFocus:x.activateTabWithKeyboard,loop:x.loop,orientation:x.orientation||`horizontal`,dir:b,onKeyDown:l}),...v,children:[o&&(0,I.jsx)(`span`,{...x.getStyles(`tabSection`,w),"data-position":`left`,children:o}),i&&(0,I.jsx)(`span`,{...x.getStyles(`tabLabel`,w),children:i}),a&&(0,I.jsx)(`span`,{...x.getStyles(`tabSection`,w),"data-position":`right`,children:a})]})});Dv.classes=wv,Dv.displayName=`@mantine/core/TabsTab`;var Ov=`Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value`,kv={keepMounted:!0,orientation:`horizontal`,loop:!0,activateTabWithKeyboard:!0,variant:`default`,placement:`left`},Av=On((e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":bt(t),"--tabs-color":rr(n,e),"--tabs-text-color":ai(r,e)?Tr({color:n,theme:e,autoContrast:r}):void 0}})),jv=z((e,t)=>{let n=L(`Tabs`,kv,e),{defaultValue:r,value:i,onChange:a,orientation:o,children:s,loop:c,id:l,activateTabWithKeyboard:u,allowTabDeactivation:d,variant:f,color:p,radius:m,inverted:h,placement:g,keepMounted:_,classNames:v,styles:y,unstyled:b,className:x,style:S,vars:C,autoContrast:w,mod:T,attributes:E,...D}=n,O=rn(l),[k,A]=ln({value:i,defaultValue:r,finalValue:null,onChange:a}),j=ii({name:`Tabs`,props:n,classes:wv,className:x,style:S,classNames:v,styles:y,unstyled:b,attributes:E,vars:C,varsResolver:Av});return(0,I.jsx)(Sv,{value:{placement:g,value:k,orientation:o,id:O,loop:c,activateTabWithKeyboard:u,getTabId:ct(`${O}-tab`,Ov),getPanelId:ct(`${O}-panel`,Ov),onChange:A,allowTabDeactivation:d,variant:f,color:p,radius:m,inverted:h,keepMounted:_,unstyled:b,getStyles:j},children:(0,I.jsx)(R,{ref:t,id:O,variant:f,mod:[{orientation:o,inverted:o===`horizontal`&&h,placement:o===`vertical`&&g},T],...j(`root`),...D,children:s})})});jv.classes=wv,jv.displayName=`@mantine/core/Tabs`,jv.Tab=Dv,jv.Panel=Ev,jv.List=Tv;var Mv=z((e,t)=>(0,I.jsx)(gd,{component:`input`,ref:t,...L(`TextInput`,null,e),__staticSelector:`TextInput`}));Mv.classes=gd.classes,Mv.displayName=`@mantine/core/TextInput`;var Nv=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],Pv=[`xs`,`sm`,`md`,`lg`,`xl`];function Fv(e,t){let n=t===void 0?`h${e}`:t;return Nv.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:Pv.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:F(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var Iv={root:`m_8a5d1357`},Lv={order:1},Rv=On((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=Fv(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),zv=z((e,t)=>{let n=L(`Title`,Lv,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,order:c,vars:l,size:u,variant:d,lineClamp:f,textWrap:p,mod:m,attributes:h,...g}=n,_=ii({name:`Title`,props:n,classes:Iv,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:h,vars:l,varsResolver:Rv});return[1,2,3,4,5,6].includes(c)?(0,I.jsx)(R,{..._(`root`),component:`h${c}`,variant:d,ref:t,mod:[{order:c,"data-line-clamp":typeof f==`number`},m],size:u,...g}):null});zv.classes=Iv,zv.displayName=`@mantine/core/Title`;var Bv=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))}));function Vv({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:i}){switch(e){case`up`:return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=i[t-1][i[t-1].length-1]-1?i[t-1].length-1:i[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case`down`:return n===i[t].length-1||n===i[t].length-2&&r>=i[t][i[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case`left`:return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:i[t-1].length-1,cellIndex:i[t-1][i[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:i[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case`right`:return n===i[t].length-1&&r===i[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===i[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function Hv({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=Vv({direction:t,size:a,rowIndex:r,cellIndex:i,levelIndex:n});if(!o)return;let s=e.current?.[o.levelIndex]?.[o.rowIndex]?.[o.cellIndex];s&&(s.disabled||s.getAttribute(`data-hidden`)||s.getAttribute(`data-outside`)?Hv({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function Uv(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function Wv(e){return e.current?.map(e=>e.map(e=>e.length))}function Gv({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=Uv(i.key);a&&(i.preventDefault(),Hv({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:Wv(e)}))}var G=l(Bv(),1);function Kv(e,t){let n=e?(0,G.default)(e):(0,G.default)();if(t===``)return n.format(`YYYY-MM-DD HH:mm:ss`);let[r,i,a=0]=t.split(`:`).map(Number);return n=n.set(`hour`,r),n=n.set(`minute`,i),n=n.set(`second`,a),n=n.set(`millisecond`,0),n.format(`YYYY-MM-DD HH:mm:ss`)}function qv(e){return e==null||e===``?e:(0,G.default)(e).format(`YYYY-MM-DD`)}function Jv(e){return e==null||e===``?e:(0,G.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function Yv({minDate:e,maxDate:t}){let n=(0,G.default)();return!e&&!t?qv(n):e&&(0,G.default)(n).isBefore(e)?qv(e):t&&(0,G.default)(n).isAfter(t)?qv(t):qv(n)}function Xv(e,t,n){return!e&&!t?Jv(n):e&&(0,G.default)(n).isBefore(e)?Jv(e):t&&(0,G.default)(n).isAfter(t)?Jv(t):Jv(n)}var Zv={locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1},Qv=(0,v.createContext)(Zv);function $v({settings:e,children:t}){return(0,I.jsx)(Qv.Provider,{value:{...Zv,...e},children:t})}function ey(){let e=(0,v.useContext)(Qv),t=(0,v.useCallback)(t=>t||e.locale,[e.locale]),n=(0,v.useCallback)(t=>typeof t==`number`?t:e.firstDayOfWeek,[e.firstDayOfWeek]),r=(0,v.useCallback)(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=(0,v.useCallback)(t=>typeof t==`string`?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function ty({value:e,type:t,withTime:n}){let r=n?Jv:qv;if(t===`range`&&Array.isArray(e)){let t=r(e[0]),n=r(e[1]);return t?n?`${t} \u2013 ${n}`:`${t} \u2013`:``}return t===`multiple`&&Array.isArray(e)?e.filter(Boolean).join(`, `):!Array.isArray(e)&&e?r(e):``}function ny({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,I.jsx)(`input`,{type:`hidden`,value:ty({value:e,type:t,withTime:i}),name:n,form:r})}ny.displayName=`@mantine/dates/HiddenDatesInput`;function ry(e){return e<10?`0${e}`:`${e}`}var iy=e=>Number(e.toFixed(0)[0]),ay=(0,v.forwardRef)(({value:e,min:t,max:n,onChange:r,focusable:i,step:a,onNextInput:o,onPreviousInput:s,onFocus:c,readOnly:l,allowTemporaryZero:u=!1,placeholder:d=`--`,...f},p)=>{let m=iy(n),h=n+1-a,g=e=>{if(l)return;let i=e.replace(/\D/g,``);if(i!==``){let a=parseInt(i,10),s=u&&a===0&&t>0?0:kt(a,t,n);r(s),(s>m||e.startsWith(`00`))&&o?.()}},_=i=>{l||((i.key===`0`||i.key===`Num0`)&&e===0&&(i.preventDefault(),o?.()),i.key===`Home`&&(i.preventDefault(),r(t)),i.key===`End`&&(i.preventDefault(),r(n)),(i.key===`Backspace`||i.key===`Delete`)&&(i.preventDefault(),e===null?s?.():r(null)),i.key===`ArrowRight`&&(i.preventDefault(),o?.()),i.key===`ArrowLeft`&&(i.preventDefault(),s?.()),i.key===`ArrowUp`&&(i.preventDefault(),r(e===null?t:kt(e+a,t,h))),i.key===`ArrowDown`&&(i.preventDefault(),r(e===null?h:kt(e-a,t,h))))};return(0,I.jsx)(`input`,{ref:p,type:`text`,role:`spinbutton`,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":e===null?0:e,"data-empty":e===null||void 0,inputMode:`numeric`,placeholder:d,value:e===null?``:ry(e),onChange:e=>g(e.currentTarget.value),onKeyDown:_,onFocus:e=>{e.currentTarget.select(),c?.(e)},onClick:e=>{e.stopPropagation(),e.currentTarget.select()},onMouseDown:e=>e.stopPropagation(),...f})});ay.displayName=`@mantine/dates/SpinInput`;var[oy,sy]=ot(`TimeInput component was not found in the component tree`),cy=(0,v.forwardRef)(({labels:e,value:t,onChange:n,className:r,style:i,onPreviousInput:a,readOnly:o,onMouseDown:s,onTouchStart:c,inputType:l,...u},d)=>{let f=sy(),p=r=>{o||(r.key===`Home`&&(r.preventDefault(),n(e.am)),r.key===`End`&&(r.preventDefault(),n(e.pm)),(r.key===`Backspace`||r.key===`Delete`)&&(r.preventDefault(),t===null?a?.():n(null)),r.key===`ArrowLeft`&&(r.preventDefault(),a?.()),(r.key===`ArrowUp`||r.key===`ArrowDown`)&&(r.preventDefault(),n(t===e.am?e.pm:e.am)),r.code===`KeyA`&&(r.preventDefault(),n(e.am)),r.code===`KeyP`&&(r.preventDefault(),n(e.pm)))};if(l===`input`){let e=t||`--`,n=e.length+1;return(0,I.jsx)(`input`,{...f.getStyles(`field`,{className:r,style:i}),ref:d,value:e,size:n,readOnly:!0,onChange:()=>{},onClick:(e=>e.stopPropagation()),onKeyDown:p,onMouseDown:e=>{e.stopPropagation(),s?.(e)},"data-am-pm":!0,...u})}return(0,I.jsxs)(`select`,{...f.getStyles(`field`,{className:r,style:i}),ref:d,value:t||``,onChange:e=>!o&&n(e.target.value||null),onClick:e=>e.stopPropagation(),onKeyDown:p,onMouseDown:e=>{e.stopPropagation(),s?.(e)},"data-am-pm":!0,...u,children:[(0,I.jsx)(`option`,{value:``,children:`--`}),(0,I.jsx)(`option`,{value:e.am,children:e.am}),(0,I.jsx)(`option`,{value:e.pm,children:e.pm})]})});cy.displayName=`@mantine/dates/AmPmInput`;function ly({value:e,active:t,onSelect:n}){let r=sy();return(0,I.jsx)(gl,{mod:{active:t},onClick:()=>n(e),onMouseDown:e=>e.preventDefault(),"data-value":e,tabIndex:-1,...r.getStyles(`control`),children:typeof e==`number`?ry(e):e})}ly.displayName=`@mantine/dates/TimeControl`;function uy({labels:e,value:t,onSelect:n}){let r=sy(),i=[e.am,e.pm].map(e=>(0,I.jsx)(ly,{value:e,active:t===e,onSelect:n},e));return(0,I.jsx)(`div`,{...r.getStyles(`controlsList`),children:i})}uy.displayName=`@mantine/dates/AmPmControlsList`;function dy(e,t){if(!e||!t)return!1;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom&&n.left>=r.left&&n.right<=r.right}function fy(e,t,n){let r=[];for(let i=e;i<=t;i+=n)r.push(i);return r}function py({min:e,max:t,step:n,value:r,onSelect:i,reversed:a}){let o=sy(),s=(0,v.useRef)(null),c=fy(e,t,n),l=(a?c.reverse():c).map(e=>(0,I.jsx)(ly,{value:e,active:r===e,onSelect:i},e));return(0,v.useEffect)(()=>{r!==null&&requestAnimationFrame(()=>{let e=s.current?.querySelector(`[data-value="${r}"]`);dy(e,s.current)||e?.scrollIntoView({block:`nearest`})})},[r]),(0,I.jsx)(fl,{h:o.maxDropdownContentHeight,type:`never`,viewportRef:s,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,I.jsx)(`div`,{...o.getStyles(`controlsList`),children:l})})}py.displayName=`@mantine/dates/TimeControlsList`;var my={fieldsRoot:`m_7a8f1e6d`,fieldsGroup:`m_d6bb0a54`,controlsList:`m_b97ecb26`,controlsListGroup:`m_31fe42f9`,dropdown:`m_9c4817c3`,control:`m_154c536b`,presetControl:`m_7be09d0c`,presetsGroup:`m_7d00001d`,presetsGroupLabel:`m_d8d918d7`,field:`m_6b43ba88`};function hy(e){let[t=null,n=null,r=null]=e.split(`:`).map(Number);return{hours:t,minutes:n,seconds:r}}function gy({time:e,compare:t,withSeconds:n}){let r=hy(e),i=hy(t);return n?r.hours===i.hours&&r.minutes===i.minutes&&r.seconds===i.seconds:r.hours===i.hours&&r.minutes===i.minutes}function _y(e,t){return`${e.getHours()}:${e.getMinutes()}${t?`:${e.getSeconds()}`:``}`}function vy({value:e,format:t,amPmLabels:n,withSeconds:r}){let i=hy(typeof e==`string`?e:_y(e,r));if(i.hours===null||i.minutes===null)return null;if(t===`24h`)return`${ry(i.hours)}:${ry(i.minutes)}${r?`:${ry(i.seconds||0)}`:``}`;let a=i.hours>=12;return`${i.hours%12==0?12:i.hours%12}:${ry(i.minutes)}${r?`:${ry(i.seconds||0)}`:``} ${a?n.pm:n.am}`}function yy({value:e,format:t=`24h`,amPmLabels:n={am:`AM`,pm:`PM`},withSeconds:r=!1}){return(0,I.jsx)(I.Fragment,{children:vy({value:e,format:t,amPmLabels:n,withSeconds:r})})}yy.displayName=`@mantine/dates/TimeValue`;function by({value:e,active:t,onChange:n,format:r,amPmLabels:i,withSeconds:a}){let o=sy();return(0,I.jsx)(gl,{mod:{active:t},onClick:()=>n(e),...o.getStyles(`presetControl`),children:(0,I.jsx)(yy,{withSeconds:a,value:e,format:r,amPmLabels:i})})}by.displayName=`@mantine/dates/TimePresetControl`;function xy({value:e,data:t,onChange:n,format:r,amPmLabels:i,withSeconds:a}){let o=sy(),s=t.values.map(t=>(0,I.jsx)(by,{value:t,format:r,amPmLabels:i,withSeconds:a,active:gy({time:t,compare:e,withSeconds:a}),onChange:n},t));return(0,I.jsxs)(`div`,{...o.getStyles(`presetsGroup`),children:[(0,I.jsx)(`div`,{...o.getStyles(`presetsGroupLabel`),children:t.label}),(0,I.jsx)(K_,{cols:a?2:3,spacing:4,children:s})]})}xy.displayName=`@mantine/dates/TimePresetGroup`;function Sy({presets:e,format:t,amPmLabels:n,withSeconds:r,value:i,onChange:a}){let o=sy();if(e.length===0)return null;if(typeof e[0]==`string`){let s=e.map(e=>(0,I.jsx)(by,{value:e,format:t,amPmLabels:n,withSeconds:r,active:gy({time:e,compare:i,withSeconds:r}),onChange:a},e));return(0,I.jsx)(fl.Autosize,{mah:o.maxDropdownContentHeight,type:`never`,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,I.jsx)(`div`,{...o.getStyles(`presetsRoot`),children:(0,I.jsx)(K_,{cols:r?2:3,spacing:4,children:s})})})}let s=e.map((e,o)=>(0,I.jsx)(xy,{data:e,value:i,format:t,amPmLabels:n,withSeconds:r,onChange:a},o));return(0,I.jsx)(fl.Autosize,{mah:o.maxDropdownContentHeight,type:`never`,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,I.jsx)(`div`,{...o.getStyles(`presetsRoot`),children:s})})}Sy.displayName=`@mantine/dates/TimePresets`;function Cy(e){let[t=0,n=0,r=0]=e.split(`:`).map(Number);return t*3600+n*60+r}function wy(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return{timeString:`${ry(t)}:${ry(n)}:${ry(r)}`,hours:t,minutes:n,seconds:r}}function Ty(e,t,n){let r=Cy(e),i=t?Cy(t):-1/0,a=n?Cy(n):1/0;return wy(Math.max(i,Math.min(r,a)))}function Ey({hours:e,minutes:t,seconds:n,amPmLabels:r}){if(e===null)return{hours:null,minutes:null,seconds:null,amPm:null};let i=e>=12?r.pm:r.am;return{hours:e%12==0?12:e%12,minutes:typeof t==`number`?t:null,seconds:typeof n==`number`?n:null,amPm:i}}function Dy({time:e,format:t,amPmLabels:n}){if(e===``)return{hours:null,minutes:null,seconds:null,amPm:null};let{hours:r,minutes:i,seconds:a}=hy(e),o={hours:r,minutes:i,seconds:a};return t===`12h`?Ey({...o,amPmLabels:n}):{...o,amPm:null}}function Oy({hours:e,minutes:t,seconds:n,amPm:r,amPmLabels:i,withSeconds:a}){let o=e;return r===i.pm&&e!==12?o+=12:r===i.am&&e===12&&(o=0),`${ry(o)}:${ry(t)}${a?`:${ry(n||0)}`:``}`}function ky({hours:e,minutes:t,seconds:n,format:r,withSeconds:i,amPm:a,amPmLabels:o}){return e===null||t===null||i&&n===null?{valid:!1,value:``}:r===`24h`?{valid:!0,value:`${ry(e)}:${ry(t)}${i?`:${ry(n)}`:``}`}:a===null?{valid:!1,value:``}:{valid:!0,value:Oy({hours:e,minutes:t,seconds:n,amPm:a,amPmLabels:o,withSeconds:i})}}function Ay({value:e,defaultValue:t,onChange:n,format:r,amPmLabels:i,withSeconds:a=!1,min:o,max:s,clearable:c,readOnly:l,disabled:u,pasteSplit:d}){let f=Dy({time:e||t||``,amPmLabels:i,format:r}),p=ky({hours:f.hours,minutes:f.minutes,seconds:f.seconds,format:r,withSeconds:a,amPm:f.amPm,amPmLabels:i}),m=(0,v.useRef)(!0),h=(0,v.useRef)(!p.valid),[g,_]=(0,v.useState)(f.hours),[y,b]=(0,v.useState)(f.minutes),[x,S]=(0,v.useState)(f.seconds),[C,w]=(0,v.useState)(f.amPm),T=c&&!l&&!u&&(g!==null||y!==null||x!==null||C!==null),E=(0,v.useRef)(null),D=(0,v.useRef)(null),O=(0,v.useRef)(null),k=(0,v.useRef)(null),A=e=>{e===`hours`&&E.current?.focus(),e===`minutes`&&D.current?.focus(),e===`seconds`&&O.current?.focus(),e===`amPm`&&k.current?.focus()},j=(e,t)=>{let o=ky({hours:g,minutes:y,seconds:x,amPm:C,[e]:t,format:r,withSeconds:a,amPmLabels:i});o.valid?(m.current=!1,h.current=!1,e===`hours`&&_(t),e===`minutes`&&b(t),e===`seconds`&&S(t),e===`amPm`&&w(t),n?.(o.value)):(m.current=!1,h.current||=(n?.(``),!0))},ee=e=>{m.current=!1;let t=Dy({time:e,amPmLabels:i,format:r});_(t.hours),b(t.minutes),S(t.seconds),w(t.amPm),h.current=!ky({...t,format:r,withSeconds:a,amPmLabels:i}).valid,n?.(e)},te=e=>{let t=e;r===`12h`&&typeof e==`number`&&e>12&&(t=(e-1)%12+1),_(t),j(`hours`,t),A(`hours`)},ne=e=>{b(e),j(`minutes`,e),A(`minutes`)},re=e=>{S(e),j(`seconds`,e),A(`seconds`)},M=e=>{w(e),j(`amPm`,e),A(`amPm`)},N=()=>{m.current=!1,_(null),b(null),S(null),w(null),n?.(``),h.current=!0,A(`hours`)},ie=e=>{e.preventDefault();let t=e.clipboardData.getData(`text`),c=(d||Dy)({time:t,format:r,amPmLabels:i}),l=ky({...c,format:r,withSeconds:a,amPmLabels:i});if(l.valid){m.current=!1;let e=Ty(l.value,o||`00:00:00`,s||`23:59:59`);n?.(e.timeString),_(c.hours),b(c.minutes),S(c.seconds),w(c.amPm)}},ae=ky({hours:g,minutes:y,seconds:x,format:r,withSeconds:a,amPm:C,amPmLabels:i});return Vt(()=>{if(e===``){m.current=!1,_(null),b(null),S(null),w(null),m.current=!0;return}if(m.current&&typeof e==`string`){let t=Dy({time:e||``,amPmLabels:i,format:r});_(t.hours),b(t.minutes),S(t.seconds),w(t.amPm)}m.current=!0},[e]),{refs:{hours:E,minutes:D,seconds:O,amPm:k},values:{hours:g,minutes:y,seconds:x,amPm:C},setHours:te,setMinutes:ne,setSeconds:re,setAmPm:M,focus:A,clear:N,onPaste:ie,setTimeString:ee,isClearable:T,hiddenInputValue:ae.value}}var jy={hoursStep:1,minutesStep:1,secondsStep:1,format:`24h`,amPmLabels:{am:`AM`,pm:`PM`},pasteSplit:Dy,maxDropdownContentHeight:200,hoursPlaceholder:`--`,minutesPlaceholder:`--`,secondsPlaceholder:`--`},My=On((e,{size:t})=>({dropdown:{"--control-font-size":xt(t)}})),Ny=z((e,t)=>{let n=L(`TimePicker`,jy,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,onClick:l,format:u,value:d,defaultValue:f,onChange:p,hoursStep:m,minutesStep:h,secondsStep:g,withSeconds:_,hoursInputLabel:y,minutesInputLabel:b,secondsInputLabel:x,amPmInputLabel:S,amPmLabels:C,clearable:w,onMouseDown:T,onFocusCapture:E,onBlurCapture:D,min:O,max:k,popoverProps:A,withDropdown:j,rightSection:ee,onFocus:te,onBlur:ne,clearButtonProps:re,hoursInputProps:M,minutesInputProps:N,secondsInputProps:ie,amPmSelectProps:ae,readOnly:oe,disabled:se,size:ce,name:le,form:ue,hiddenInputProps:de,labelProps:fe,pasteSplit:pe,hoursRef:me,minutesRef:he,secondsRef:ge,amPmRef:_e,presets:ve,maxDropdownContentHeight:ye,scrollAreaProps:be,attributes:xe,reverseTimeControlsList:Se,hoursPlaceholder:Ce,minutesPlaceholder:we,secondsPlaceholder:Te,...Ee}=n,{resolvedClassNames:De,resolvedStyles:Oe}=Vr({classNames:r,styles:o,props:n}),ke=ii({name:`TimePicker`,classes:my,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:xe,vars:c,varsResolver:My}),P=Ay({value:d,defaultValue:f,onChange:p,format:u,amPmLabels:C,withSeconds:_,min:O,max:k,clearable:w,disabled:se,readOnly:oe,pasteSplit:pe}),Ae=cn(P.refs.hours,me),je=cn(P.refs.minutes,he),Me=cn(P.refs.seconds,ge),Ne=cn(P.refs.amPm,_e),Pe=rn(),Fe=(0,v.useRef)(!1),[Ie,Le]=(0,v.useState)(!1),Re=e=>{Fe.current||(Fe.current=!0,te?.(e))},ze=e=>{if(!e.currentTarget.contains(e.relatedTarget)){let t=P.values,n=ky({...t,format:u,amPmLabels:C,withSeconds:!!_});if(n.valid&&(O||k)){let e=Ty(n.value,O,k);e.timeString!==n.value&&P.setTimeString(e.timeString)}Fe.current=!1,ne?.(e)}};return(0,I.jsx)(oy,{value:{getStyles:ke,scrollAreaProps:be,maxDropdownContentHeight:ye},children:(0,I.jsxs)(nu,{opened:Ie,transitionProps:{duration:0},position:`bottom-start`,withRoles:!1,disabled:se||oe||!j,...A,children:[(0,I.jsx)(nu.Target,{children:(0,I.jsxs)(gd,{component:`div`,size:ce,disabled:se,ref:t,onClick:e=>{l?.(e),P.focus(`hours`)},onMouseDown:e=>{e.preventDefault(),T?.(e)},onFocusCapture:e=>{Le(!0),E?.(e)},onBlurCapture:e=>{Le(!1),D?.(e)},rightSection:ee||P.isClearable&&(0,I.jsx)(Cu,{...re,size:ce,onClick:e=>{P.clear(),re?.onClick?.(e)},onMouseDown:e=>{e.preventDefault(),re?.onMouseDown?.(e)}}),labelProps:{htmlFor:Pe,...fe},style:a,className:i,classNames:De,styles:Oe,__staticSelector:`TimePicker`,...Ee,children:[(0,I.jsx)(`div`,{...ke(`fieldsRoot`),dir:`ltr`,children:(0,I.jsxs)(`div`,{...ke(`fieldsGroup`),onBlur:ze,children:[(0,I.jsx)(ay,{id:Pe,...M,...ke(`field`,{className:M?.className,style:M?.style}),value:P.values.hours,onChange:P.setHours,onNextInput:()=>P.focus(`minutes`),min:u===`12h`?1:0,max:u===`12h`?12:23,allowTemporaryZero:u===`12h`,focusable:!0,step:m,ref:Ae,"aria-label":y,readOnly:oe,disabled:se,onPaste:P.onPaste,onFocus:e=>{Re(e),M?.onFocus?.(e)},onBlur:e=>{let t=e.currentTarget.value;u===`12h`&&(t?parseInt(t,10):null)===0&&P.setHours(12),M?.onBlur?.(e)},placeholder:Ce}),(0,I.jsx)(`span`,{children:`:`}),(0,I.jsx)(ay,{...N,...ke(`field`,{className:N?.className,style:N?.style}),value:P.values.minutes,onChange:P.setMinutes,min:0,max:59,focusable:!0,step:h,ref:je,onPreviousInput:()=>P.focus(`hours`),onNextInput:()=>_?P.focus(`seconds`):P.focus(`amPm`),"aria-label":b,tabIndex:-1,readOnly:oe,disabled:se,onPaste:P.onPaste,onFocus:e=>{Re(e),N?.onFocus?.(e)},placeholder:we}),_&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{children:`:`}),(0,I.jsx)(ay,{...ie,...ke(`field`,{className:ie?.className,style:ie?.style}),value:P.values.seconds,onChange:P.setSeconds,min:0,max:59,focusable:!0,step:g,ref:Me,onPreviousInput:()=>P.focus(`minutes`),onNextInput:()=>P.focus(`amPm`),"aria-label":x,tabIndex:-1,readOnly:oe,disabled:se,onPaste:P.onPaste,onFocus:e=>{Re(e),ie?.onFocus?.(e)},placeholder:Te})]}),u===`12h`&&(0,I.jsx)(cy,{...ae,inputType:j?`input`:`select`,labels:C,value:P.values.amPm,onChange:P.setAmPm,ref:Ne,"aria-label":S,onPreviousInput:()=>_?P.focus(`seconds`):P.focus(`minutes`),readOnly:oe,disabled:se,tabIndex:-1,onPaste:P.onPaste,onFocus:e=>{Re(e),ae?.onFocus?.(e)}})]})}),(0,I.jsx)(`input`,{type:`hidden`,name:le,form:ue,value:P.hiddenInputValue,...de})]})}),(0,I.jsx)(nu.Dropdown,{...ke(`dropdown`),onMouseDown:e=>e.preventDefault(),children:ve?(0,I.jsx)(Sy,{value:P.hiddenInputValue,onChange:P.setTimeString,format:u,presets:ve,amPmLabels:C,withSeconds:_||!1}):(0,I.jsxs)(`div`,{...ke(`controlsListGroup`),children:[(0,I.jsx)(py,{min:u===`12h`?1:0,max:u===`12h`?12:23,step:m,value:P.values.hours,onSelect:P.setHours,reversed:Se}),(0,I.jsx)(py,{min:0,max:59,step:h,value:P.values.minutes,onSelect:P.setMinutes,reversed:Se}),_&&(0,I.jsx)(py,{min:0,max:59,step:g,value:P.values.seconds,onSelect:P.setSeconds,reversed:Se}),u===`12h`&&(0,I.jsx)(uy,{labels:C,value:P.values.amPm,onSelect:P.setAmPm})]})})]})})});Ny.displayName=`@mantine/dates/TimePicker`,Ny.classes=my;var Py={day:`m_396ce5cb`},Fy=On((e,{size:t})=>({day:{"--day-size":vt(t,`day-size`)}})),Iy=z((e,t)=>{let n=L(`Day`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,date:l,disabled:u,__staticSelector:d,weekend:f,outside:p,selected:m,renderDay:h,inRange:g,firstInRange:_,lastInRange:v,hidden:y,static:b,highlightToday:x,attributes:S,...C}=n;return(0,I.jsx)(gl,{...ii({name:d||`Day`,classes:Py,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:S,vars:c,varsResolver:Fy,rootSelector:`day`})(`day`,{style:y?{display:`none`}:void 0}),component:b?`div`:`button`,ref:t,disabled:u,"data-today":(0,G.default)(l).isSame(new Date,`day`)||void 0,"data-hidden":y||void 0,"data-highlight-today":x||void 0,"data-disabled":u||void 0,"data-weekend":!u&&!p&&f||void 0,"data-outside":!u&&p||void 0,"data-selected":!u&&m||void 0,"data-in-range":g&&!u||void 0,"data-first-in-range":_&&!u||void 0,"data-last-in-range":v&&!u||void 0,"data-static":b||void 0,unstyled:s,...C,children:h?.(l)||(0,G.default)(l).date()})});Iy.classes=Py,Iy.displayName=`@mantine/dates/Day`;function Ly({locale:e,format:t=`dd`,firstDayOfWeek:n=1}){let r=(0,G.default)().day(n),i=[];for(let n=0;n<7;n+=1)typeof t==`string`?i.push((0,G.default)(r).add(n,`days`).locale(e).format(t)):i.push(t((0,G.default)(r).add(n,`days`).format(`YYYY-MM-DD`)));return i}var Ry={weekday:`m_18a3eca`},zy=On((e,{size:t})=>({weekdaysRow:{"--wr-fz":xt(t),"--wr-spacing":yt(t)}})),By=z((e,t)=>{let n=L(`WeekdaysRow`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,locale:l,firstDayOfWeek:u,weekdayFormat:d,cellComponent:f=`th`,__staticSelector:p,withWeekNumbers:m,attributes:h,...g}=n,_=ii({name:p||`WeekdaysRow`,classes:Ry,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:h,vars:c,varsResolver:zy,rootSelector:`weekdaysRow`}),v=ey(),y=Ly({locale:v.getLocale(l),format:d,firstDayOfWeek:v.getFirstDayOfWeek(u)}).map((e,t)=>(0,I.jsx)(f,{..._(`weekday`),children:e},t));return(0,I.jsxs)(R,{component:`tr`,ref:t,..._(`weekdaysRow`),...g,children:[m&&(0,I.jsx)(f,{..._(`weekday`),children:`#`}),y]})});By.classes=Ry,By.displayName=`@mantine/dates/WeekdaysRow`;function Vy(e,t=1){let n=(0,G.default)(e);if(!n.isValid())return n;let r=t===0?6:t-1;for(;n.day()!==r;)n=n.add(1,`day`);return n.format(`YYYY-MM-DD`)}function Hy(e,t=1){let n=(0,G.default)(e);for(;n.day()!==t;)n=n.subtract(1,`day`);return n.format(`YYYY-MM-DD`)}function Uy({month:e,firstDayOfWeek:t=1,consistentWeeks:n}){let r=(0,G.default)((0,G.default)(e).subtract((0,G.default)(e).date()-1,`day`).format(`YYYY-M-D`)),i=r.format(`YYYY-MM-DD`),a=Vy(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,G.default)(Hy(i,t));for(;(0,G.default)(s).isBefore(a,`day`);){let e=[];for(let t=0;t<7;t+=1)e.push(s.format(`YYYY-MM-DD`)),s=s.add(1,`day`);o.push(e)}if(n&&o.length<6){let e=o[o.length-1],t=e[e.length-1],n=(0,G.default)(t).add(1,`day`);for(;o.length<6;){let e=[];for(let t=0;t<7;t+=1)e.push(n.format(`YYYY-MM-DD`)),n=n.add(1,`day`);o.push(e)}}return o}function Wy(e,t){return(0,G.default)(e).format(`YYYY-MM`)===(0,G.default)(t).format(`YYYY-MM`)}function Gy(e,t){return t?(0,G.default)(e).isAfter((0,G.default)(t).subtract(1,`day`),`day`):!0}function Ky(e,t){return t?(0,G.default)(e).isBefore((0,G.default)(t).add(1,`day`),`day`):!0}function qy({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>Ky(e,n)&&Gy(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||Wy(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,G.default)().isSame(e,`date`))||s[0]}var Jy=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))}))(),1);G.default.extend(Jy.default);function Yy(e){return(0,G.default)(e.find(e=>(0,G.default)(e).day()===1)).isoWeek()}var Xy={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},Zy={withCellSpacing:!0},Qy=On((e,{size:t})=>({weekNumber:{"--wn-fz":xt(t),"--wn-size":vt(t,`wn-size`)}})),$y=z((e,t)=>{let n=L(`Month`,Zy,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,__staticSelector:l,locale:u,firstDayOfWeek:d,weekdayFormat:f,month:p,weekendDays:m,getDayProps:h,excludeDate:g,minDate:_,maxDate:v,renderDay:y,hideOutsideDates:b,hideWeekdays:x,getDayAriaLabel:S,static:C,__getDayRef:w,__onDayKeyDown:T,__onDayClick:E,__onDayMouseEnter:D,__preventFocus:O,__stopPropagation:k,withCellSpacing:A,size:j,highlightToday:ee,withWeekNumbers:te,attributes:ne,...re}=n,M=ii({name:l||`Month`,classes:Xy,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:ne,vars:c,varsResolver:Qy,rootSelector:`month`}),N=ey(),ie=Uy({month:p,firstDayOfWeek:N.getFirstDayOfWeek(d),consistentWeeks:N.consistentWeeks}),ae=qy({dates:ie,minDate:qv(_),maxDate:qv(v),getDayProps:h,excludeDate:g,hideOutsideDates:b,month:p}),{resolvedClassNames:oe,resolvedStyles:se}=Vr({classNames:r,styles:o,props:n}),ce=ie.map((e,t)=>{let n=e.map((e,n)=>{let r=!Wy(e,p),i=S?.(e)||(0,G.default)(e).locale(u||N.locale).format(`D MMMM YYYY`),a=h?.(e),o=(0,G.default)(e).isSame(ae,`date`);return(0,I.jsx)(`td`,{...M(`monthCell`),"data-with-spacing":A||void 0,children:(0,I.jsx)(Iy,{__staticSelector:l||`Month`,classNames:oe,styles:se,unstyled:s,"data-mantine-stop-propagation":k||void 0,highlightToday:ee,renderDay:y,date:e,size:j,weekend:N.getWeekendDays(m).includes((0,G.default)(e).get(`day`)),outside:r,hidden:b?r:!1,"aria-label":i,static:C,disabled:g?.(e)||!Ky(e,qv(v))||!Gy(e,qv(_)),ref:e=>{e&&w?.(t,n,e)},...a,onKeyDown:r=>{a?.onKeyDown?.(r),T?.(r,{rowIndex:t,cellIndex:n,date:e})},onMouseEnter:t=>{a?.onMouseEnter?.(t),D?.(t,e)},onClick:t=>{a?.onClick?.(t),E?.(t,e)},onMouseDown:e=>{a?.onMouseDown?.(e),O&&e.preventDefault()},tabIndex:O||!o?-1:0})},e.toString())});return(0,I.jsxs)(`tr`,{...M(`monthRow`),children:[te&&(0,I.jsx)(`td`,{...M(`weekNumber`),children:Yy(e)}),n]},t)});return(0,I.jsxs)(R,{component:`table`,...M(`month`),size:j,ref:t,...re,children:[!x&&(0,I.jsx)(`thead`,{...M(`monthThead`),children:(0,I.jsx)(By,{__staticSelector:l||`Month`,locale:u,firstDayOfWeek:d,weekdayFormat:f,size:j,classNames:oe,styles:se,unstyled:s,withWeekNumbers:te})}),(0,I.jsx)(`tbody`,{...M(`monthTbody`),children:ce})]})});$y.classes=Xy,$y.displayName=`@mantine/dates/Month`;var eb={pickerControl:`m_dc6a3c71`},tb=On((e,{size:t})=>({pickerControl:{"--dpc-fz":xt(t),"--dpc-size":vt(t,`dpc-size`)}})),nb=z((e,t)=>{let n=L(`PickerControl`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,firstInRange:l,lastInRange:u,inRange:d,__staticSelector:f,selected:p,disabled:m,attributes:h,...g}=n;return(0,I.jsx)(gl,{...ii({name:f||`PickerControl`,classes:eb,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:h,vars:c,varsResolver:tb,rootSelector:`pickerControl`})(`pickerControl`),ref:t,unstyled:s,"data-picker-control":!0,"data-selected":p&&!m||void 0,"data-disabled":m||void 0,"data-in-range":d&&!m&&!p||void 0,"data-first-in-range":l&&!m||void 0,"data-last-in-range":u&&!m||void 0,disabled:m,...g})});nb.classes=eb,nb.displayName=`@mantine/dates/PickerControl`;function rb({year:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,G.default)(e).isBefore(t,`year`)||n&&(0,G.default)(e).isAfter(n,`year`))}function ib({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!rb({year:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,G.default)().isSame(e,`year`))||i[0]}function ab(e){let t=(0,G.default)(e).year(),n=t-t%10,r=0,i=[[],[],[],[]];for(let e=0;e<4;e+=1){let t=e===3?1:3;for(let a=0;a<t;a+=1)i[e].push((0,G.default)(new Date(n+r,0)).format(`YYYY-MM-DD`)),r+=1}return i}var ob={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},sb={yearsListFormat:`YYYY`,withCellSpacing:!0},cb=z((e,t)=>{let n=L(`YearsList`,sb,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,decade:l,yearsListFormat:u,locale:d,minDate:f,maxDate:p,getYearControlProps:m,__staticSelector:h,__getControlRef:g,__onControlKeyDown:_,__onControlClick:v,__onControlMouseEnter:y,__preventFocus:b,__stopPropagation:x,withCellSpacing:S,size:C,attributes:w,...T}=n,E=ii({name:h||`YearsList`,classes:ob,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:w,vars:c,rootSelector:`yearsList`}),D=ey(),O=ab(l),k=ib({years:O,minDate:f,maxDate:p,getYearControlProps:m}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=m?.(e),i=(0,G.default)(e).isSame(k,`year`);return(0,I.jsx)(`td`,{...E(`yearsListCell`),"data-with-spacing":S||void 0,children:(0,I.jsx)(nb,{...E(`yearsListControl`),size:C,unstyled:s,"data-mantine-stop-propagation":x||void 0,disabled:rb({year:e,minDate:f,maxDate:p}),ref:e=>{e&&g?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),_?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),v?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),y?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),b&&e.preventDefault()},tabIndex:b||!i?-1:0,children:r?.children??(0,G.default)(e).locale(D.getLocale(d)).format(u)})},n)});return(0,I.jsx)(`tr`,{...E(`yearsListRow`),children:n},t)});return(0,I.jsx)(R,{component:`table`,ref:t,size:C,...E(`yearsList`),...T,children:(0,I.jsx)(`tbody`,{children:A})})});cb.classes=ob,cb.displayName=`@mantine/dates/YearsList`;function lb({month:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,G.default)(e).isBefore(t,`month`)||n&&(0,G.default)(e).isAfter(n,`month`))}function ub({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!lb({month:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,G.default)().isSame(e,`month`))||i[0]}function db(e){let t=(0,G.default)(e).startOf(`year`).toDate(),n=[[],[],[],[]],r=0;for(let e=0;e<4;e+=1)for(let i=0;i<3;i+=1)n[e].push((0,G.default)(t).add(r,`months`).format(`YYYY-MM-DD`)),r+=1;return n}var fb={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},pb={monthsListFormat:`MMM`,withCellSpacing:!0},mb=z((e,t)=>{let n=L(`MonthsList`,pb,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,__staticSelector:l,year:u,monthsListFormat:d,locale:f,minDate:p,maxDate:m,getMonthControlProps:h,__getControlRef:g,__onControlKeyDown:_,__onControlClick:v,__onControlMouseEnter:y,__preventFocus:b,__stopPropagation:x,withCellSpacing:S,size:C,attributes:w,...T}=n,E=ii({name:l||`MonthsList`,classes:fb,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:w,vars:c,rootSelector:`monthsList`}),D=ey(),O=db(u),k=ub({months:O,minDate:qv(p),maxDate:qv(m),getMonthControlProps:h}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=h?.(e),i=(0,G.default)(e).isSame(k,`month`);return(0,I.jsx)(`td`,{...E(`monthsListCell`),"data-with-spacing":S||void 0,children:(0,I.jsx)(nb,{...E(`monthsListControl`),size:C,unstyled:s,__staticSelector:l||`MonthsList`,"data-mantine-stop-propagation":x||void 0,disabled:lb({month:e,minDate:qv(p),maxDate:qv(m)}),ref:e=>{e&&g?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),_?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),v?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),y?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),b&&e.preventDefault()},tabIndex:b||!i?-1:0,children:r?.children??(0,G.default)(e).locale(D.getLocale(f)).format(d)})},n)});return(0,I.jsx)(`tr`,{...E(`monthsListRow`),children:n},t)});return(0,I.jsx)(R,{component:`table`,ref:t,size:C,...E(`monthsList`),...T,children:(0,I.jsx)(`tbody`,{children:A})})});mb.classes=fb,mb.displayName=`@mantine/dates/MonthsList`;var hb={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},gb={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},_b=On((e,{size:t})=>({calendarHeader:{"--dch-control-size":vt(t,`dch-control-size`),"--dch-fz":xt(t)}})),vb=z((e,t)=>{let n=L(`CalendarHeader`,gb,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,nextIcon:l,previousIcon:u,nextLabel:d,previousLabel:f,onNext:p,onPrevious:m,onLevelClick:h,label:g,nextDisabled:_,previousDisabled:y,hasNextLevel:b,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,__staticSelector:T,__preventFocus:E,__stopPropagation:D,attributes:O,...k}=n,A=ii({name:T||`CalendarHeader`,classes:hb,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:O,vars:c,varsResolver:_b,rootSelector:`calendarHeader`}),j=E?e=>e.preventDefault():void 0,ee=C&&(0,v.createElement)(gl,{...A(`calendarHeaderControl`),key:`previous`,"data-direction":`previous`,"aria-label":f,onClick:m,unstyled:s,onMouseDown:j,disabled:y,"data-disabled":y||void 0,tabIndex:E||y?-1:0,"data-mantine-stop-propagation":D||void 0},u||(0,I.jsx)(Ed,{...A(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),te=(0,v.createElement)(gl,{component:b?`button`:`div`,...A(`calendarHeaderLevel`),key:`level`,onClick:b?h:void 0,unstyled:s,onMouseDown:b?j:void 0,disabled:!b,"data-static":!b||void 0,"aria-label":x,tabIndex:E||!b?-1:0,"data-mantine-stop-propagation":D||void 0},g),ne=S&&(0,v.createElement)(gl,{...A(`calendarHeaderControl`),key:`next`,"data-direction":`next`,"aria-label":d,onClick:p,unstyled:s,onMouseDown:j,disabled:_,"data-disabled":_||void 0,tabIndex:E||_?-1:0,"data-mantine-stop-propagation":D||void 0},l||(0,I.jsx)(Ed,{...A(`calendarHeaderControlIcon`),"data-direction":`next`,size:`45%`})),re=w.map(e=>e===`previous`?ee:e===`level`?te:e===`next`?ne:null);return(0,I.jsx)(R,{...A(`calendarHeader`),ref:t,...k,children:re})});vb.classes=hb,vb.displayName=`@mantine/dates/CalendarHeader`;function yb(e){let t=ab(e);return[t[0][0],t[3][0]]}var bb={decadeLabelFormat:`YYYY`},xb=z((e,t)=>{let{decade:n,locale:r,minDate:i,maxDate:a,yearsListFormat:o,getYearControlProps:s,__getControlRef:c,__onControlKeyDown:l,__onControlClick:u,__onControlMouseEnter:d,withCellSpacing:f,__preventFocus:p,nextIcon:m,previousIcon:h,nextLabel:g,previousLabel:_,onNext:v,onPrevious:y,nextDisabled:b,previousDisabled:x,levelControlAriaLabel:S,withNext:C,withPrevious:w,headerControlsOrder:T,decadeLabelFormat:E,classNames:D,styles:O,unstyled:k,__staticSelector:A,__stopPropagation:j,size:ee,attributes:te,...ne}=L(`DecadeLevel`,bb,e),re=ey(),[M,N]=yb(n),ie={__staticSelector:A||`DecadeLevel`,classNames:D,styles:O,unstyled:k,size:ee,attributes:te},ae=typeof b==`boolean`?b:a?!(0,G.default)(N).endOf(`year`).isBefore(a):!1,oe=typeof x==`boolean`?x:i?!(0,G.default)(M).startOf(`year`).isAfter(i):!1,se=(e,t)=>(0,G.default)(e).locale(r||re.locale).format(t);return(0,I.jsxs)(R,{"data-decade-level":!0,size:ee,ref:t,...ne,children:[(0,I.jsx)(vb,{label:typeof E==`function`?E(M,N):`${se(M,E)} \u2013 ${se(N,E)}`,__preventFocus:p,__stopPropagation:j,nextIcon:m,previousIcon:h,nextLabel:g,previousLabel:_,onNext:v,onPrevious:y,nextDisabled:ae,previousDisabled:oe,hasNextLevel:!1,levelControlAriaLabel:S,withNext:C,withPrevious:w,headerControlsOrder:T,...ie}),(0,I.jsx)(cb,{decade:n,locale:r,minDate:i,maxDate:a,yearsListFormat:o,getYearControlProps:s,__getControlRef:c,__onControlKeyDown:l,__onControlClick:u,__onControlMouseEnter:d,__preventFocus:p,__stopPropagation:j,withCellSpacing:f,...ie})]})});xb.classes={...cb.classes,...vb.classes},xb.displayName=`@mantine/dates/DecadeLevel`;var Sb={yearLabelFormat:`YYYY`},Cb=z((e,t)=>{let{year:n,locale:r,minDate:i,maxDate:a,monthsListFormat:o,getMonthControlProps:s,__getControlRef:c,__onControlKeyDown:l,__onControlClick:u,__onControlMouseEnter:d,withCellSpacing:f,__preventFocus:p,nextIcon:m,previousIcon:h,nextLabel:g,previousLabel:_,onNext:v,onPrevious:y,onLevelClick:b,nextDisabled:x,previousDisabled:S,hasNextLevel:C,levelControlAriaLabel:w,withNext:T,withPrevious:E,headerControlsOrder:D,yearLabelFormat:O,__staticSelector:k,__stopPropagation:A,size:j,classNames:ee,styles:te,unstyled:ne,attributes:re,...M}=L(`YearLevel`,Sb,e),N=ey(),ie={__staticSelector:k||`YearLevel`,classNames:ee,styles:te,unstyled:ne,size:j,attributes:re},ae=typeof x==`boolean`?x:a?!(0,G.default)(n).endOf(`year`).isBefore(a):!1,oe=typeof S==`boolean`?S:i?!(0,G.default)(n).startOf(`year`).isAfter(i):!1;return(0,I.jsxs)(R,{"data-year-level":!0,size:j,ref:t,...M,children:[(0,I.jsx)(vb,{label:typeof O==`function`?O(n):(0,G.default)(n).locale(r||N.locale).format(O),__preventFocus:p,__stopPropagation:A,nextIcon:m,previousIcon:h,nextLabel:g,previousLabel:_,onNext:v,onPrevious:y,onLevelClick:b,nextDisabled:ae,previousDisabled:oe,hasNextLevel:C,levelControlAriaLabel:w,withNext:T,withPrevious:E,headerControlsOrder:D,...ie}),(0,I.jsx)(mb,{year:n,locale:r,minDate:i,maxDate:a,monthsListFormat:o,getMonthControlProps:s,__getControlRef:c,__onControlKeyDown:l,__onControlClick:u,__onControlMouseEnter:d,__preventFocus:p,__stopPropagation:A,withCellSpacing:f,...ie})]})});Cb.classes={...vb.classes,...mb.classes},Cb.displayName=`@mantine/dates/YearLevel`;var wb={monthLabelFormat:`MMMM YYYY`},Tb=z((e,t)=>{let{month:n,locale:r,firstDayOfWeek:i,weekdayFormat:a,weekendDays:o,getDayProps:s,excludeDate:c,minDate:l,maxDate:u,renderDay:d,hideOutsideDates:f,hideWeekdays:p,getDayAriaLabel:m,__getDayRef:h,__onDayKeyDown:g,__onDayClick:_,__onDayMouseEnter:v,withCellSpacing:y,highlightToday:b,withWeekNumbers:x,__preventFocus:S,__stopPropagation:C,nextIcon:w,previousIcon:T,nextLabel:E,previousLabel:D,onNext:O,onPrevious:k,onLevelClick:A,nextDisabled:j,previousDisabled:ee,hasNextLevel:te,levelControlAriaLabel:ne,withNext:re,withPrevious:M,headerControlsOrder:N,monthLabelFormat:ie,classNames:ae,styles:oe,unstyled:se,__staticSelector:ce,size:le,static:ue,attributes:de,...fe}=L(`MonthLevel`,wb,e),pe=ey(),me={__staticSelector:ce||`MonthLevel`,classNames:ae,styles:oe,unstyled:se,size:le,attributes:de},he=typeof j==`boolean`?j:u?!(0,G.default)(n).endOf(`month`).isBefore(u):!1,ge=typeof ee==`boolean`?ee:l?!(0,G.default)(n).startOf(`month`).isAfter(l):!1;return(0,I.jsxs)(R,{"data-month-level":!0,size:le,ref:t,...fe,children:[(0,I.jsx)(vb,{label:typeof ie==`function`?ie(n):(0,G.default)(n).locale(r||pe.locale).format(ie),__preventFocus:S,__stopPropagation:C,nextIcon:w,previousIcon:T,nextLabel:E,previousLabel:D,onNext:O,onPrevious:k,onLevelClick:A,nextDisabled:he,previousDisabled:ge,hasNextLevel:te,levelControlAriaLabel:ne,withNext:re,withPrevious:M,headerControlsOrder:N,...me}),(0,I.jsx)($y,{month:n,locale:r,firstDayOfWeek:i,weekdayFormat:a,weekendDays:o,getDayProps:s,excludeDate:c,minDate:l,maxDate:u,renderDay:d,hideOutsideDates:f,hideWeekdays:p,getDayAriaLabel:m,__getDayRef:h,__onDayKeyDown:g,__onDayClick:_,__onDayMouseEnter:v,__preventFocus:S,__stopPropagation:C,static:ue,withCellSpacing:y,highlightToday:b,withWeekNumbers:x,...me})]})});Tb.classes={...$y.classes,...vb.classes},Tb.displayName=`@mantine/dates/MonthLevel`;var Eb={levelsGroup:`m_30b26e33`},Db=z((e,t)=>{let n=L(`LevelsGroup`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,__staticSelector:l,attributes:u,...d}=n;return(0,I.jsx)(R,{ref:t,...ii({name:l||`LevelsGroup`,classes:Eb,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:u,vars:c,rootSelector:`levelsGroup`})(`levelsGroup`),...d})});Db.classes=Eb,Db.displayName=`@mantine/dates/LevelsGroup`;var Ob={numberOfColumns:1},kb=z((e,t)=>{let{decade:n,locale:r,minDate:i,maxDate:a,yearsListFormat:o,getYearControlProps:s,__onControlClick:c,__onControlMouseEnter:l,withCellSpacing:u,__preventFocus:d,nextIcon:f,previousIcon:p,nextLabel:m,previousLabel:h,onNext:g,onPrevious:_,nextDisabled:y,previousDisabled:b,headerControlsOrder:x,classNames:S,styles:C,unstyled:w,__staticSelector:T,__stopPropagation:E,numberOfColumns:D,levelControlAriaLabel:O,decadeLabelFormat:k,size:A,vars:j,attributes:ee,...te}=L(`DecadeLevelGroup`,Ob,e),ne=(0,v.useRef)([]),re=Array(D).fill(0).map((e,t)=>{let v=(0,G.default)(n).add(t*10,`years`).format(`YYYY-MM-DD`);return(0,I.jsx)(xb,{size:A,yearsListFormat:o,decade:v,withNext:t===D-1,withPrevious:t===0,decadeLabelFormat:k,__onControlClick:c,__onControlMouseEnter:l,__onControlKeyDown:(e,n)=>Gv({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:ne}),__getControlRef:(e,n,r)=>{Array.isArray(ne.current[t])||(ne.current[t]=[]),Array.isArray(ne.current[t][e])||(ne.current[t][e]=[]),ne.current[t][e][n]=r},levelControlAriaLabel:typeof O==`function`?O(v):O,locale:r,minDate:i,maxDate:a,__preventFocus:d,__stopPropagation:E,nextIcon:f,previousIcon:p,nextLabel:m,previousLabel:h,onNext:g,onPrevious:_,nextDisabled:y,previousDisabled:b,getYearControlProps:s,__staticSelector:T||`DecadeLevelGroup`,classNames:S,styles:C,unstyled:w,withCellSpacing:u,headerControlsOrder:x,attributes:ee},t)});return(0,I.jsx)(Db,{classNames:S,styles:C,__staticSelector:T||`DecadeLevelGroup`,ref:t,size:A,unstyled:w,attributes:ee,...te,children:re})});kb.classes={...Db.classes,...xb.classes},kb.displayName=`@mantine/dates/DecadeLevelGroup`;var Ab={numberOfColumns:1},jb=z((e,t)=>{let{year:n,locale:r,minDate:i,maxDate:a,monthsListFormat:o,getMonthControlProps:s,__onControlClick:c,__onControlMouseEnter:l,withCellSpacing:u,__preventFocus:d,nextIcon:f,previousIcon:p,nextLabel:m,previousLabel:h,onNext:g,onPrevious:_,onLevelClick:y,nextDisabled:b,previousDisabled:x,hasNextLevel:S,headerControlsOrder:C,classNames:w,styles:T,unstyled:E,__staticSelector:D,__stopPropagation:O,numberOfColumns:k,levelControlAriaLabel:A,yearLabelFormat:j,size:ee,vars:te,attributes:ne,...re}=L(`YearLevelGroup`,Ab,e),M=(0,v.useRef)([]),N=Array(k).fill(0).map((e,t)=>{let v=(0,G.default)(n).add(t,`years`).format(`YYYY-MM-DD`);return(0,I.jsx)(Cb,{size:ee,monthsListFormat:o,year:v,withNext:t===k-1,withPrevious:t===0,yearLabelFormat:j,__stopPropagation:O,__onControlClick:c,__onControlMouseEnter:l,__onControlKeyDown:(e,n)=>Gv({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:M}),__getControlRef:(e,n,r)=>{Array.isArray(M.current[t])||(M.current[t]=[]),Array.isArray(M.current[t][e])||(M.current[t][e]=[]),M.current[t][e][n]=r},levelControlAriaLabel:typeof A==`function`?A(v):A,locale:r,minDate:i,maxDate:a,__preventFocus:d,nextIcon:f,previousIcon:p,nextLabel:m,previousLabel:h,onNext:g,onPrevious:_,onLevelClick:y,nextDisabled:b,previousDisabled:x,hasNextLevel:S,getMonthControlProps:s,classNames:w,styles:T,unstyled:E,__staticSelector:D||`YearLevelGroup`,withCellSpacing:u,headerControlsOrder:C,attributes:ne},t)});return(0,I.jsx)(Db,{classNames:w,styles:T,__staticSelector:D||`YearLevelGroup`,ref:t,size:ee,unstyled:E,attributes:ne,...re,children:N})});jb.classes={...Cb.classes,...Db.classes},jb.displayName=`@mantine/dates/YearLevelGroup`;var Mb={numberOfColumns:1},Nb=z((e,t)=>{let{month:n,locale:r,firstDayOfWeek:i,weekdayFormat:a,weekendDays:o,getDayProps:s,excludeDate:c,minDate:l,maxDate:u,renderDay:d,hideOutsideDates:f,hideWeekdays:p,getDayAriaLabel:m,__onDayClick:h,__onDayMouseEnter:g,withCellSpacing:_,highlightToday:y,withWeekNumbers:b,__preventFocus:x,nextIcon:S,previousIcon:C,nextLabel:w,previousLabel:T,onNext:E,onPrevious:D,onLevelClick:O,nextDisabled:k,previousDisabled:A,hasNextLevel:j,headerControlsOrder:ee,classNames:te,styles:ne,unstyled:re,numberOfColumns:M,levelControlAriaLabel:N,monthLabelFormat:ie,__staticSelector:ae,__stopPropagation:oe,size:se,static:ce,vars:le,attributes:ue,...de}=L(`MonthLevelGroup`,Mb,e),fe=(0,v.useRef)([]),pe=Array(M).fill(0).map((e,t)=>{let v=(0,G.default)(n).add(t,`months`).format(`YYYY-MM-DD`);return(0,I.jsx)(Tb,{month:v,withNext:t===M-1,withPrevious:t===0,monthLabelFormat:ie,__stopPropagation:oe,__onDayClick:h,__onDayMouseEnter:g,__onDayKeyDown:(e,n)=>Gv({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:fe}),__getDayRef:(e,n,r)=>{Array.isArray(fe.current[t])||(fe.current[t]=[]),Array.isArray(fe.current[t][e])||(fe.current[t][e]=[]),fe.current[t][e][n]=r},levelControlAriaLabel:typeof N==`function`?N(v):N,locale:r,firstDayOfWeek:i,weekdayFormat:a,weekendDays:o,getDayProps:s,excludeDate:c,minDate:l,maxDate:u,renderDay:d,hideOutsideDates:f,hideWeekdays:p,getDayAriaLabel:m,__preventFocus:x,nextIcon:S,previousIcon:C,nextLabel:w,previousLabel:T,onNext:E,onPrevious:D,onLevelClick:O,nextDisabled:k,previousDisabled:A,hasNextLevel:j,classNames:te,styles:ne,unstyled:re,__staticSelector:ae||`MonthLevelGroup`,size:se,static:ce,withCellSpacing:_,highlightToday:y,withWeekNumbers:b,headerControlsOrder:ee,attributes:ue},t)});return(0,I.jsx)(Db,{classNames:te,styles:ne,__staticSelector:ae||`MonthLevelGroup`,ref:t,size:se,attributes:ue,...de,children:pe})});Nb.classes={...Db.classes,...Tb.classes},Nb.displayName=`@mantine/dates/MonthLevelGroup`;var Pb={input:`m_6fa5e2aa`},Fb=z((e,t)=>{let{inputProps:n,wrapperProps:r,placeholder:i,classNames:a,styles:o,unstyled:s,popoverProps:c,modalProps:l,dropdownType:u,children:d,formattedValue:f,dropdownHandlers:p,dropdownOpened:m,onClick:h,clearable:g,onClear:_,clearButtonProps:v,rightSection:y,shouldClear:b,readOnly:x,disabled:S,value:C,name:w,form:T,type:E,onDropdownClose:D,withTime:O,...k}=md(`PickerInputBase`,{size:`sm`},e),A=(0,I.jsx)(pd.ClearButton,{onClick:_,unstyled:s,...v}),j=()=>{E===`range`&&Array.isArray(C)&&C[0]&&!C[1]&&_(),p.close()};return(0,I.jsxs)(I.Fragment,{children:[u===`modal`&&!x&&(0,I.jsx)(Nh,{opened:m,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:s,...l,children:d}),(0,I.jsx)(pd.Wrapper,{...r,children:(0,I.jsxs)(nu,{position:`bottom-start`,opened:m,trapFocus:!0,returnFocus:!1,unstyled:s,onClose:D,...c,disabled:c?.disabled||u===`modal`||x,onChange:e=>{e||(c?.onClose?.(),j())},children:[(0,I.jsx)(nu.Target,{children:(0,I.jsx)(pd,{"data-dates-input":!0,"data-read-only":x||void 0,disabled:S,component:`button`,type:`button`,multiline:!0,onClick:e=>{h?.(e),p.toggle()},__clearSection:A,__clearable:g&&b&&!x&&!S,rightSection:y,...n,ref:t,classNames:{...a,input:An(Pb.input,a?.input)},...k,children:f||(0,I.jsx)(pd.Placeholder,{error:n.error,unstyled:s,classNames:a,styles:o,__staticSelector:n.__staticSelector,children:i})})}),(0,I.jsx)(nu.Dropdown,{"data-dates-dropdown":!0,children:d})]})}),(0,I.jsx)(ny,{value:C,name:w,form:T,type:E,withTime:O})]})});Fb.classes=Pb,Fb.displayName=`@mantine/dates/PickerInputBase`;var Ib=e=>e===`range`?[null,null]:e===`multiple`?[]:null,Lb=(e,t)=>{let n=t?Jv:qv;return Array.isArray(e)?e.map(n):n(e)};function Rb({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,v.useRef)(e),[o,s,c]=ln({value:Lb(t,i),defaultValue:Lb(n,i),finalValue:Ib(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?Ib(e):n,s(l))),[l,s,c]}function zb(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function Bb(e){return e===0?`month`:e===1?`year`:`decade`}function Vb(e,t,n){return Bb(kt(zb(e,0),zb(t,0),zb(n,2)))}var Hb={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Ub=z((e,t)=>{let n=L(`Calendar`,Hb,e),{vars:r,maxLevel:i,minLevel:a,defaultLevel:o,level:s,onLevelChange:c,date:l,defaultDate:u,onDateChange:d,numberOfColumns:f,columnsToScroll:p,ariaLabels:m,nextLabel:h,previousLabel:g,onYearSelect:_,onMonthSelect:y,onYearMouseEnter:b,onMonthMouseEnter:x,headerControlsOrder:S,__updateDateOnYearSelect:C,__updateDateOnMonthSelect:w,__setDateRef:T,__setLevelRef:E,firstDayOfWeek:D,weekdayFormat:O,weekendDays:k,getDayProps:A,excludeDate:j,renderDay:ee,hideOutsideDates:te,hideWeekdays:ne,getDayAriaLabel:re,monthLabelFormat:M,nextIcon:N,previousIcon:ie,__onDayClick:ae,__onDayMouseEnter:oe,withCellSpacing:se,highlightToday:ce,withWeekNumbers:le,monthsListFormat:ue,getMonthControlProps:de,yearLabelFormat:fe,yearsListFormat:pe,getYearControlProps:me,decadeLabelFormat:he,classNames:ge,styles:_e,unstyled:ve,minDate:ye,maxDate:be,locale:xe,__staticSelector:Se,size:Ce,__preventFocus:we,__stopPropagation:Te,onNextDecade:Ee,onPreviousDecade:De,onNextYear:Oe,onPreviousYear:ke,onNextMonth:P,onPreviousMonth:Ae,static:je,enableKeyboardNavigation:Me,attributes:Ne,...Pe}=n,{resolvedClassNames:Fe,resolvedStyles:Ie}=Vr({classNames:ge,styles:_e,props:n}),[Le,Re]=ln({value:s?Vb(s,a,i):void 0,defaultValue:o?Vb(o,a,i):void 0,finalValue:Vb(void 0,a,i),onChange:c}),[ze,Be]=Rb({type:`default`,value:qv(l),defaultValue:qv(u),onChange:d});(0,v.useImperativeHandle)(T,()=>e=>{Be(e)}),(0,v.useImperativeHandle)(E,()=>e=>{Re(e)});let Ve={__staticSelector:Se||`Calendar`,styles:Ie,classNames:Fe,unstyled:ve,size:Ce,attributes:Ne},He=p||f||1,Ue=new Date,We=ye&&(0,G.default)(Ue).isAfter(ye)?ye:(0,G.default)(Ue).format(`YYYY-MM-DD`),Ge=ze||We,Ke=()=>{let e=(0,G.default)(Ge).add(He,`month`).format(`YYYY-MM-DD`);P?.(e),Be(e)},qe=()=>{let e=(0,G.default)(Ge).subtract(He,`month`).format(`YYYY-MM-DD`);Ae?.(e),Be(e)},Je=()=>{let e=(0,G.default)(Ge).add(He,`year`).format(`YYYY-MM-DD`);Oe?.(e),Be(e)},Ye=()=>{let e=(0,G.default)(Ge).subtract(He,`year`).format(`YYYY-MM-DD`);ke?.(e),Be(e)},Xe=()=>{let e=(0,G.default)(Ge).add(10*He,`year`).format(`YYYY-MM-DD`);Ee?.(e),Be(e)},Ze=()=>{let e=(0,G.default)(Ge).subtract(10*He,`year`).format(`YYYY-MM-DD`);De?.(e),Be(e)},Qe=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(!Me||je)return;let e=e=>{if(!Qe.current?.contains(document.activeElement))return;let t=e.ctrlKey||e.metaKey,n=e.shiftKey;switch(e.key){case`ArrowUp`:t&&n?(e.preventDefault(),Ze()):t&&(e.preventDefault(),Ye());break;case`ArrowDown`:t&&n?(e.preventDefault(),Xe()):t&&(e.preventDefault(),Je());break;case`y`:case`Y`:Le===`month`&&(e.preventDefault(),Re(`year`));break}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[Me,je,Le,Je,Ye,Xe,Ze]),(0,I.jsxs)(R,{ref:e=>{Qe.current=e,typeof t==`function`?t(e):t&&(t.current=e)},size:Ce,"data-calendar":!0,...Pe,children:[Le===`month`&&(0,I.jsx)(Nb,{month:Ge,minDate:ye,maxDate:be,firstDayOfWeek:D,weekdayFormat:O,weekendDays:k,getDayProps:A,excludeDate:j,renderDay:ee,hideOutsideDates:te,hideWeekdays:ne,getDayAriaLabel:re,onNext:Ke,onPrevious:qe,hasNextLevel:i!==`month`,onLevelClick:()=>Re(`year`),numberOfColumns:f,locale:xe,levelControlAriaLabel:m?.monthLevelControl,nextLabel:m?.nextMonth??h,nextIcon:N,previousLabel:m?.previousMonth??g,previousIcon:ie,monthLabelFormat:M,__onDayClick:ae,__onDayMouseEnter:oe,__preventFocus:we,__stopPropagation:Te,static:je,withCellSpacing:se,highlightToday:ce,withWeekNumbers:le,headerControlsOrder:S,...Ve}),Le===`year`&&(0,I.jsx)(jb,{year:Ge,numberOfColumns:f,minDate:ye,maxDate:be,monthsListFormat:ue,getMonthControlProps:de,locale:xe,onNext:Je,onPrevious:Ye,hasNextLevel:i!==`month`&&i!==`year`,onLevelClick:()=>Re(`decade`),levelControlAriaLabel:m?.yearLevelControl,nextLabel:m?.nextYear??h,nextIcon:N,previousLabel:m?.previousYear??g,previousIcon:ie,yearLabelFormat:fe,__onControlMouseEnter:x,__onControlClick:(e,t)=>{w&&Be(t),Re(Vb(`month`,a,i)),y?.(t)},__preventFocus:we,__stopPropagation:Te,withCellSpacing:se,headerControlsOrder:S,...Ve}),Le===`decade`&&(0,I.jsx)(kb,{decade:Ge,minDate:ye,maxDate:be,yearsListFormat:pe,getYearControlProps:me,locale:xe,onNext:Xe,onPrevious:Ze,numberOfColumns:f,nextLabel:m?.nextDecade??h,nextIcon:N,previousLabel:m?.previousDecade??g,previousIcon:ie,decadeLabelFormat:he,__onControlMouseEnter:b,__onControlClick:(e,t)=>{C&&Be(t),Re(Vb(`year`,a,i)),_?.(t)},__preventFocus:we,__stopPropagation:Te,withCellSpacing:se,headerControlsOrder:S,...Ve})]})});Ub.classes={...kb.classes,...jb.classes,...Nb.classes},Ub.displayName=`@mantine/dates/Calendar`;function Wb(e){let{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,__setLevelRef:j,withWeekNumbers:ee,headerControlsOrder:te,firstDayOfWeek:ne,weekdayFormat:re,weekendDays:M,getDayProps:N,excludeDate:ie,renderDay:ae,hideOutsideDates:oe,hideWeekdays:se,getDayAriaLabel:ce,monthLabelFormat:le,monthsListFormat:ue,getMonthControlProps:de,yearLabelFormat:fe,yearsListFormat:pe,getYearControlProps:me,decadeLabelFormat:he,allowSingleDateInRange:ge,allowDeselect:_e,minDate:ve,maxDate:ye,locale:be,...xe}=e;return{calendarProps:{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,withWeekNumbers:ee,headerControlsOrder:te,firstDayOfWeek:ne,weekdayFormat:re,weekendDays:M,getDayProps:N,excludeDate:ie,renderDay:ae,hideOutsideDates:oe,hideWeekdays:se,getDayAriaLabel:ce,monthLabelFormat:le,monthsListFormat:ue,getMonthControlProps:de,yearLabelFormat:fe,yearsListFormat:pe,getYearControlProps:me,decadeLabelFormat:he,allowSingleDateInRange:ge,allowDeselect:_e,minDate:ve,maxDate:ye,locale:be},others:xe}}function Gb(e,t){let n=[...t].sort((e,t)=>(0,G.default)(e).isAfter((0,G.default)(t))?1:-1);return(0,G.default)(n[0]).startOf(`day`).subtract(1,`ms`).isBefore(e)&&(0,G.default)(n[1]).endOf(`day`).add(1,`ms`).isAfter(e)}function Kb({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=Rb({type:e,value:n,defaultValue:r,onChange:i}),[u,d]=(0,v.useState)(e===`range`&&c[0]&&!c[1]?c[0]:null),[f,p]=(0,v.useState)(null),m=n=>{if(e===`range`){if(u&&!c[1]){if((0,G.default)(n).isSame(u,t)&&!a){d(null),p(null),l([null,null]);return}let e=[n,u];e.sort((e,t)=>(0,G.default)(e).isAfter((0,G.default)(t))?1:-1),l(e),p(null),d(null);return}if(c[0]&&!c[1]&&(0,G.default)(n).isSame(c[0],t)&&!a){d(null),p(null),l([null,null]);return}l([n,null]),p(null),d(n);return}if(e===`multiple`){c.some(e=>(0,G.default)(e).isSame(n,t))?l(c.filter(e=>!(0,G.default)(e).isSame(n,t))):l([...c,n]);return}c&&o&&(0,G.default)(n).isSame(c,t)?l(null):l(n)},h=e=>u&&f?Gb(e,[f,u]):c[0]&&c[1]?Gb(e,c):!1,g=e===`range`?e=>{s?.(e),p(null)}:s,_=e=>c[0]&&(0,G.default)(e).isSame(c[0],t)?!(f&&(0,G.default)(f).isBefore(c[0])):!1,y=e=>c[1]?(0,G.default)(e).isSame(c[1],t):!c[0]||!f?!1:(0,G.default)(f).isBefore(c[0])&&(0,G.default)(e).isSame(c[0],t),b=n=>{if(e===`range`)return{selected:c.some(e=>e&&(0,G.default)(e).isSame(n,t)),inRange:h(n),firstInRange:_(n),lastInRange:y(n),"data-autofocus":!!c[0]&&(0,G.default)(c[0]).isSame(n,t)||void 0};if(e===`multiple`)return{selected:c.some(e=>e&&(0,G.default)(e).isSame(n,t)),"data-autofocus":!!c[0]&&(0,G.default)(c[0]).isSame(n,t)||void 0};let r=(0,G.default)(c).isSame(n,t);return{selected:r,"data-autofocus":r||void 0}},x=e===`range`&&u?p:()=>{};return(0,v.useEffect)(()=>{if(e===`range`)if(c[0]&&!c[1])d(c[0]);else{let e=c[0]==null&&c[1]==null,t=c[0]!=null&&c[1]!=null;(e||t)&&(d(null),p(null))}},[c]),{onDateChange:m,onRootMouseLeave:g,onHoveredDateChange:x,getControlProps:b,_value:c,setValue:l}}var qb={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},Jb=On((e,{size:t})=>({datePickerRoot:{"--preset-font-size":xt(t)}})),Yb={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},Xb=z((e,t)=>{let n=L(`DatePicker`,Yb,e),{allowDeselect:r,allowSingleDateInRange:i,value:a,defaultValue:o,onChange:s,onMouseLeave:c,classNames:l,styles:u,__staticSelector:d,__onDayClick:f,__onDayMouseEnter:p,__onPresetSelect:m,__stopPropagation:h,presets:g,className:_,style:y,unstyled:b,size:x,vars:S,attributes:C,...w}=n,{calendarProps:T,others:E}=Wb(w),D=(0,v.useRef)(null),O=(0,v.useRef)(null),k=ii({name:d||`DatePicker`,classes:qb,props:n,className:_,style:y,classNames:l,styles:u,unstyled:b,attributes:C,rootSelector:g?`datePickerRoot`:void 0,varsResolver:Jb,vars:S}),{onDateChange:A,onRootMouseLeave:j,onHoveredDateChange:ee,getControlProps:te,_value:ne,setValue:re}=Kb({type:E.type,level:`day`,allowDeselect:r,allowSingleDateInRange:i,value:a,defaultValue:o,onChange:s,onMouseLeave:c}),{resolvedClassNames:M,resolvedStyles:N}=Vr({classNames:l,styles:u,props:n}),ie=(0,I.jsx)(Ub,{ref:t,classNames:M,styles:N,__staticSelector:d||`DatePicker`,onMouseLeave:j,size:x,...T,...g?{}:E,__stopPropagation:h,__setDateRef:D,__setLevelRef:O,minLevel:T.minLevel||`month`,__onDayMouseEnter:(e,t)=>{ee(t),p?.(e,t)},__onDayClick:(e,t)=>{A(t),f?.(e,t)},getDayProps:e=>({...te(e),...T.getDayProps?.(e)}),getMonthControlProps:e=>({selected:typeof ne==`string`?Wy(e,ne):!1,...T.getMonthControlProps?.(e)}),getYearControlProps:e=>({selected:typeof ne==`string`?(0,G.default)(e).isSame(ne,`year`):!1,...T.getYearControlProps?.(e)}),hideOutsideDates:T.hideOutsideDates??T.numberOfColumns!==1,...g?{}:{className:_,style:y,attributes:C}});if(!g)return ie;let ae=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(D.current?.(t),O.current?.(`month`),m?m(t):re(e))},oe=g.map((e,t)=>(0,I.jsx)(gl,{...k(`presetButton`),onClick:()=>ae(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":h||void 0,children:e.label},t));return(0,I.jsxs)(R,{...k(`datePickerRoot`),size:x,...E,children:[(0,I.jsx)(`div`,{...k(`presetsList`),children:oe}),ie]})});Xb.classes=Ub.classes,Xb.displayName=`@mantine/dates/DatePicker`;function Zb(e){if(e===null)return null;let t=new Date(e);return Number.isNaN(t.getTime())||!e?null:(0,G.default)(t).format(`YYYY-MM-DD`)}function Qb({date:e,maxDate:t,minDate:n}){return!(e==null||Number.isNaN(new Date(e).getTime())||t&&(0,G.default)(e).isAfter(t,`date`)||n&&(0,G.default)(e).isBefore(n,`date`))}var $b={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},ex=z((e,t)=>{let{inputProps:n,wrapperProps:r,value:i,defaultValue:a,onChange:o,clearable:s,clearButtonProps:c,popoverProps:l,getDayProps:u,locale:d,valueFormat:f,dateParser:p,minDate:m,maxDate:h,fixOnBlur:g,onFocus:_,onBlur:y,onClick:b,onKeyDown:x,readOnly:S,name:C,form:w,rightSection:T,unstyled:E,classNames:D,styles:O,allowDeselect:k,date:A,defaultDate:j,onDateChange:ee,getMonthControlProps:te,getYearControlProps:ne,disabled:re,...M}=md(`DateInput`,$b,e),N=(0,v.useRef)(null),ie=(0,v.useRef)(null),[ae,oe]=(0,v.useState)(!1),{calendarProps:se,others:ce}=Wb(M),le=ey(),ue=p||(e=>{let t=(0,G.default)(e,f,le.getLocale(d)).toDate();return Number.isNaN(t.getTime())?Zb(e):(0,G.default)(t).format(`YYYY-MM-DD`)}),de=k===void 0?s:k,fe=e=>e?(0,G.default)(e).locale(le.getLocale(d)).format(f):``,[pe,me,he]=Rb({type:`default`,value:i,defaultValue:a,onChange:o}),[ge,_e]=Rb({type:`default`,value:A,defaultValue:a||j,onChange:ee});(0,v.useEffect)(()=>{he&&i!==null&&_e(i)},[he,i]);let[ve,ye]=(0,v.useState)(fe(pe));(0,v.useEffect)(()=>{ye(fe(pe))},[le.getLocale(d)]);let be=e=>{let t=e.currentTarget.value;if(ye(t),oe(!0),t.trim()===``&&(k||s))me(null);else{let e=ue(t);e&&Qb({date:e,minDate:m,maxDate:h})&&(me(e),_e(e))}},xe=e=>{y?.(e),oe(!1),g&&ye(fe(pe))},Se=e=>{_?.(e),oe(!0)},Ce=e=>{b?.(e),oe(!0)},we=e=>{e.key===`Escape`&&oe(!1),x?.(e)},Te=e=>({...u?.(e),selected:(0,G.default)(pe).isSame(e,`day`),onClick:t=>{u?.(e).onClick?.(t);let n=de&&(0,G.default)(pe).isSame(e,`day`)?null:e;me(n),!he&&n&&ye(fe(n)),oe(!1)}}),Ee=(0,I.jsx)(pd.ClearButton,{onClick:()=>{me(null),!he&&ye(``),oe(!1)},unstyled:E,...c}),De=s&&!!pe&&!S&&!re;return Vt(()=>{pe!==void 0&&!ae&&ye(fe(pe))},[pe]),Ft(()=>oe(!1),void 0,[N.current,ie.current]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(pd.Wrapper,{...r,__staticSelector:`DateInput`,ref:N,children:(0,I.jsxs)(nu,{opened:ae,trapFocus:!1,position:`bottom-start`,disabled:S||re,withRoles:!1,unstyled:E,...l,children:[(0,I.jsx)(nu.Target,{children:(0,I.jsx)(pd,{"data-dates-input":!0,"data-read-only":S||void 0,autoComplete:`off`,ref:t,value:ve,onChange:be,onBlur:xe,onFocus:Se,onClick:Ce,onKeyDown:we,readOnly:S,rightSection:T,__clearSection:Ee,__clearable:De,...n,...ce,disabled:re,__staticSelector:`DateInput`})}),(0,I.jsx)(nu.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:ie,children:(0,I.jsx)(Ub,{__staticSelector:`DateInput`,...se,classNames:D,styles:O,unstyled:E,__preventFocus:!0,minDate:m,maxDate:h,locale:d,getDayProps:Te,size:n.size,date:ge,onDateChange:_e,getMonthControlProps:e=>({selected:typeof pe==`string`?Wy(e,pe):!1,...te?.(e)}),getYearControlProps:e=>({selected:typeof pe==`string`?(0,G.default)(e).isSame(pe,`year`):!1,...ne?.(e)}),attributes:r.attributes})})]})}),(0,I.jsx)(ny,{name:C,form:w,value:pe,type:`default`})]})});ex.classes={...pd.classes,...Ub.classes},ex.displayName=`@mantine/dates/DateInput`;var tx={timeWrapper:`m_208d2562`,timeInput:`m_62ee059`};function nx({minDate:e,value:t}){let n=e?(0,G.default)(e).format(`HH:mm:ss`):null;return t&&e&&t===e?n??void 0:void 0}function rx({maxDate:e,value:t}){let n=e?(0,G.default)(e).format(`HH:mm:ss`):null;return t&&e&&t===e?n??void 0:void 0}var ix={dropdownType:`popover`,size:`sm`},ax=z((e,t)=>{let n=L(`DateTimePicker`,ix,e),{value:r,defaultValue:i,onChange:a,valueFormat:o,locale:s,classNames:c,styles:l,unstyled:u,timePickerProps:d,submitButtonProps:f,withSeconds:p,level:m,defaultLevel:h,size:g,variant:_,dropdownType:y,vars:b,minDate:x,maxDate:S,defaultDate:C,defaultTimeValue:w,presets:T,attributes:E,onDropdownClose:D,...O}=n,k=ii({name:`DateTimePicker`,classes:tx,props:n,classNames:c,styles:l,unstyled:u,attributes:E,vars:b}),{resolvedClassNames:A,resolvedStyles:j}=Vr({classNames:c,styles:l,props:n}),ee=o||(p?`DD/MM/YYYY HH:mm:ss`:`DD/MM/YYYY HH:mm`),te=(0,v.useRef)(null),ne=cn(te,d?.hoursRef),{calendarProps:{allowSingleDateInRange:re,...M},others:N}=Wb(O),ie=ey(),[ae,oe]=Rb({type:`default`,value:r,defaultValue:i,onChange:a,withTime:!0}),se=C||ae,ce=e=>e?(0,G.default)(e).format(p?`HH:mm:ss`:`HH:mm`):``,[le,ue]=(0,v.useState)(w||ce(ae)),[de,fe]=(0,v.useState)(m||h||`month`),[pe,me]=_n(!1),he=ae?(0,G.default)(ae).locale(ie.getLocale(s)).format(ee):``,ge=e=>{d?.onChange?.(e),ue(e),e&&oe(Kv(ae,e))},_e=e=>{e&&oe(Kv(Xv(x,S,e),le||w||``)),te.current?.focus()},ve=e=>{e.key===`Enter`&&(e.preventDefault(),me.close())};Vt(()=>{pe||ue(ce(ae))},[ae,pe]),Vt(()=>{pe&&fe(`month`)},[pe]);let ye=y===`popover`,be=()=>{let e=Xv(x,S,ae);ae&&ae!==e&&oe(Xv(x,S,ae)),D?.()};return(0,I.jsxs)(Fb,{formattedValue:he,dropdownOpened:O.disabled?!1:pe,dropdownHandlers:me,classNames:A,styles:j,unstyled:u,ref:t,onClear:()=>oe(null),shouldClear:!!ae,value:ae,size:g,variant:_,dropdownType:y,...N,type:`default`,__staticSelector:`DateTimePicker`,onDropdownClose:be,withTime:!0,attributes:E,children:[(0,I.jsx)(Xb,{...M,maxDate:S,minDate:x,size:g,variant:_,type:`default`,value:ae,defaultDate:se||Yv({maxDate:S,minDate:x}),onChange:_e,locale:s,classNames:A,styles:j,unstyled:u,__staticSelector:`DateTimePicker`,__stopPropagation:ye,level:m,defaultLevel:h,onLevelChange:e=>{fe(e),M.onLevelChange?.(e)},presets:T,__onPresetSelect:e=>{oe(e),e&&ue(ce(e))},attributes:E}),de===`month`&&(0,I.jsxs)(`div`,{...k(`timeWrapper`),children:[(0,I.jsx)(Ny,{value:le,withSeconds:p,unstyled:u,min:nx({minDate:x,value:ae}),max:rx({maxDate:S,value:ae}),...d,...k(`timeInput`,{className:d?.className,style:d?.style}),onChange:ge,onKeyDown:ve,size:g,"data-mantine-stop-propagation":ye||void 0,hoursRef:ne,attributes:E}),(0,I.jsx)(vu,{variant:`default`,size:`input-${g||`sm`}`,...k(`submitButton`,{className:f?.className,style:f?.style}),unstyled:u,"data-mantine-stop-propagation":ye||void 0,children:(0,I.jsx)(dp,{size:`30%`}),...f,onClick:e=>{f?.onClick?.(e),me.close(),be()}})]})]})});ax.classes={...tx,...Fb.classes,...Xb.classes},ax.displayName=`@mantine/dates/DateTimePicker`;function ox(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function sx(e){return(0,v.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}function cx(e,t,n){let r=[],i=[],a={};for(let o of e){let e=o.position||t;a[e]=a[e]||0,a[e]+=1,a[e]<=n?i.push(o):r.push(o)}return{notifications:i,queue:r}}var lx=ox({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5}),ux=(e=lx)=>sx(e);function dx(e,t){let n=e.getState(),r=cx(t([...n.notifications,...n.queue]),n.defaultPosition,n.limit);e.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function fx(e,t=lx){let n=e.id||At();return dx(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function px(e,t=lx){return dx(t,t=>t.filter(t=>t.id===e?(t.onClose?.(t),!1):!0)),e}function mx(e,t=lx){return dx(t,t=>t.map(t=>t.id===e.id?{...t,...e}:t)),e.id}function hx(e=lx){dx(e,()=>[])}function gx(e=lx){dx(e,t=>t.slice(0,e.getState().limit))}var _x={show:fx,hide:px,update:mx,clean:hx,cleanQueue:gx,updateState:dx};function vx(e,t){return vx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vx(e,t)}function yx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vx(e,t)}var bx={disabled:!1},xx=v.createContext(null),Sx=function(e){return e.scrollTop},Cx=`unmounted`,wx=`exited`,Tx=`entering`,Ex=`entered`,Dx=`exiting`,Ox=function(e){yx(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=wx,r.appearStatus=Tx):o=Ex:o=t.unmountOnExit||t.mountOnEnter?Cx:wx,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:wx}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=Tx):(n===`entering`||n===`entered`)&&(t=Dx)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Ki.default.findDOMNode(this);n&&Sx(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Cx})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Ki.default.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||bx.disabled){this.safeSetState({status:Ex},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Tx},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Ex},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Ki.default.findDOMNode(this);if(!t||bx.disabled){this.safeSetState({status:wx},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Dx},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:wx},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Ki.default.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Am(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return v.createElement(xx.Provider,{value:null},typeof n==`function`?n(e,r):v.cloneElement(v.Children.only(n),r))},t}(v.Component);Ox.contextType=xx,Ox.propTypes={};function kx(){}Ox.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kx,onEntering:kx,onEntered:kx,onExit:kx,onExiting:kx,onExited:kx},Ox.UNMOUNTED=Cx,Ox.EXITED=wx,Ox.ENTERING=Tx,Ox.ENTERED=Ex,Ox.EXITING=Dx;function Ax(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function jx(e,t){var n=function(e){return t&&(0,v.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&v.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function Mx(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Nx(e,t,n){return n[t]==null?e.props[t]:n[t]}function Px(e,t){return jx(e.children,function(n){return(0,v.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:Nx(n,`appear`,e),enter:Nx(n,`enter`,e),exit:Nx(n,`exit`,e)})})}function Fx(e,t,n){var r=jx(e.children),i=Mx(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,v.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,v.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,v.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:Nx(o,`exit`,e),enter:Nx(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,v.cloneElement)(o,{in:!1}):c&&s&&(0,v.isValidElement)(l)&&(i[a]=(0,v.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:Nx(o,`exit`,e),enter:Nx(o,`enter`,e)}))}}),i}var Ix=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Lx={component:`div`,childFactory:function(e){return e}},Rx=function(e){yx(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(Ax(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Px(e,r):Fx(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=jx(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=km({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Am(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Ix(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?v.createElement(xx.Provider,{value:i},a):v.createElement(xx.Provider,{value:i},v.createElement(t,r,a))},t}(v.Component);Rx.propTypes={},Rx.defaultProps=Lx;var zx=[`bottom-center`,`bottom-left`,`bottom-right`,`top-center`,`top-left`,`top-right`];function Bx(e,t){return e.reduce((e,n)=>(e[n.position||t].push(n),e),zx.reduce((e,t)=>(e[t]=[],e),{}))}var Vx={left:`translateX(-100%)`,right:`translateX(100%)`,"top-center":`translateY(-100%)`,"bottom-center":`translateY(100%)`},Hx={left:`translateX(0)`,right:`translateX(0)`,"top-center":`translateY(0)`,"bottom-center":`translateY(0)`};function Ux({state:e,maxHeight:t,position:n,transitionDuration:r}){let[i,a]=n.split(`-`),o=a===`center`?`${i}-center`:a,s={opacity:0,maxHeight:t,transform:Vx[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:`cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear`,transitionProperty:`opacity, transform, max-height`},c={opacity:1,transform:Hx[o]},l={opacity:0,maxHeight:0,transform:Vx[o]},u={entering:c,entered:c,exiting:l,exited:l};return{...s,...u[e]}}function Wx(e,t){return typeof t==`number`?t:t===!1||e===!1?!1:e}var Gx=(0,v.forwardRef)(({data:e,onHide:t,autoClose:n,...r},i)=>{let{autoClose:a,message:o,...s}=e,c=Wx(n,e.autoClose),l=(0,v.useRef)(-1),u=()=>window.clearTimeout(l.current),d=()=>{t(e.id),u()},f=()=>{typeof c==`number`&&(l.current=window.setTimeout(d,c))};return(0,v.useEffect)(()=>{e.onOpen?.(e)},[]),(0,v.useEffect)(()=>(f(),u),[c]),(0,I.jsx)(Lh,{...r,...s,onClose:d,ref:i,onMouseEnter:u,onMouseLeave:f,children:o})});Gx.displayName=`@mantine/notifications/NotificationContainer`;var Kx={root:`m_b37d9ac7`,notification:`m_5ed0edd0`},qx=Ox,Jx={position:`bottom-right`,autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:ht(`overlay`),store:lx,withinPortal:!0},Yx=On((e,{zIndex:t,containerWidth:n})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":F(n)}})),Xx=z((e,t)=>{let n=L(`Notifications`,Jx,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,position:l,autoClose:u,transitionDuration:d,containerWidth:f,notificationMaxHeight:p,limit:m,zIndex:h,store:g,portalProps:_,withinPortal:y,...b}=n,x=br(),S=ux(g),C=en(),w=pn(),T=(0,v.useRef)({}),E=(0,v.useRef)(0),D=x.respectReducedMotion&&w?1:d,O=ii({name:`Notifications`,classes:Kx,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,vars:c,varsResolver:Yx});(0,v.useEffect)(()=>{g?.updateState(e=>({...e,limit:m||5,defaultPosition:l}))},[m,l]),Vt(()=>{S.notifications.length>E.current&&setTimeout(()=>C(),0),E.current=S.notifications.length},[S.notifications]);let k=Bx(S.notifications,l),A=zx.reduce((e,t)=>(e[t]=k[t].map(({style:e,...n})=>(0,I.jsx)(qx,{timeout:D,onEnter:()=>T.current[n.id].offsetHeight,nodeRef:{current:T.current[n.id]},children:r=>(0,I.jsx)(Gx,{ref:e=>{e&&(T.current[n.id]=e)},data:n,onHide:e=>px(e,g),autoClose:u,...O(`notification`,{style:{...Ux({state:r,position:t,transitionDuration:D,maxHeight:p}),...e}})})},n.id)),e),{});return(0,I.jsxs)(Il,{withinPortal:y,..._,children:[(0,I.jsx)(R,{...O(`root`),"data-position":`top-center`,ref:t,...b,children:(0,I.jsx)(Rx,{children:A[`top-center`]})}),(0,I.jsx)(R,{...O(`root`),"data-position":`top-left`,...b,children:(0,I.jsx)(Rx,{children:A[`top-left`]})}),(0,I.jsx)(R,{...O(`root`,{className:Ke.classNames.fullWidth}),"data-position":`top-right`,...b,children:(0,I.jsx)(Rx,{children:A[`top-right`]})}),(0,I.jsx)(R,{...O(`root`,{className:Ke.classNames.fullWidth}),"data-position":`bottom-right`,...b,children:(0,I.jsx)(Rx,{children:A[`bottom-right`]})}),(0,I.jsx)(R,{...O(`root`),"data-position":`bottom-left`,...b,children:(0,I.jsx)(Rx,{children:A[`bottom-left`]})}),(0,I.jsx)(R,{...O(`root`),"data-position":`bottom-center`,...b,children:(0,I.jsx)(Rx,{children:A[`bottom-center`]})})]})});Xx.classes=Kx,Xx.displayName=`@mantine/notifications/Notifications`,Xx.show=_x.show,Xx.hide=_x.hide,Xx.update=_x.update,Xx.clean=_x.clean,Xx.cleanQueue=_x.cleanQueue,Xx.updateState=_x.updateState;var Zx=`modulepreload`,Qx=function(e){return`/erp/`+e},$x={},eS=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Qx(t,n),t in $x)return;$x[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Zx,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},tS=`popstate`;function nS(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function rS(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return cS(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:lS(t)}return dS(t,n,null,e)}function iS(e,t){if(e===!1||e==null)throw Error(t)}function aS(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function oS(){return Math.random().toString(36).substring(2,10)}function sS(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function cS(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?uS(t):t,state:n,key:t&&t.key||r||oS(),unstable_mask:i}}function lS({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function uS(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function dS(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=nS(e)?e:cS(h.location,e,t);n&&n(r,e),l=u()+1;let d=sS(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=nS(e)?e:cS(h.location,e,t);n&&n(r,e),l=u();let i=sS(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return fS(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(tS,d),c=e,()=>{i.removeEventListener(tS,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function fS(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),iS(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:lS(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function pS(e,t,n=`/`){return mS(e,t,n,!1)}function mS(e,t,n,r){let i=MS((typeof t==`string`?uS(t):t).pathname||`/`,n);if(i==null)return null;let a=gS(e);vS(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=jS(i);o=OS(a[e],t,r)}return o}function hS(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function gS(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;iS(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=BS([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(iS(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),gS(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ES(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of _S(e.path))a(e,t,!0,n)}),t}function _S(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=_S(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function vS(e){e.sort((e,t)=>e.score===t.score?DS(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var yS=/^:[\w-]+$/,bS=3,xS=2,SS=1,CS=10,wS=-2,TS=e=>e===`*`;function ES(e,t){let n=e.split(`/`),r=n.length;return n.some(TS)&&(r+=wS),t&&(r+=xS),n.filter(e=>!TS(e)).reduce((e,t)=>e+(yS.test(t)?bS:t===``?SS:CS),r)}function DS(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function OS(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=kS({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=kS({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:BS([a,u.pathname]),pathnameBase:VS(BS([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=BS([a,u.pathnameBase]))}return o}function kS(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=AS(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function AS(e,t=!1,n=!0){aS(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function jS(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return aS(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function MS(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var NS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function PS(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?uS(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?FS(n.substring(1),`/`):FS(n,t)):a=t,{pathname:a,search:HS(r),hash:US(i)}}function FS(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function IS(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function LS(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function RS(e){let t=LS(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function zS(e,t,n,r=!1){let i;typeof e==`string`?i=uS(e):(i={...e},iS(!i.pathname||!i.pathname.includes(`?`),IS(`?`,`pathname`,`search`,i)),iS(!i.pathname||!i.pathname.includes(`#`),IS(`#`,`pathname`,`hash`,i)),iS(!i.search||!i.search.includes(`#`),IS(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=PS(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var BS=e=>e.join(`/`).replace(/\/\/+/g,`/`),VS=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),HS=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,US=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,WS=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function GS(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function KS(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var qS=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function JS(e,t){let n=e;if(typeof n!=`string`||!NS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(qS)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=MS(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{aS(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var YS=v.createContext(null);YS.displayName=`DataRouter`;var XS=v.createContext(null);XS.displayName=`DataRouterState`;var ZS=v.createContext(!1),QS=v.createContext({isTransitioning:!1});QS.displayName=`ViewTransition`;var $S=v.createContext(new Map);$S.displayName=`Fetchers`;var eC=v.createContext(null);eC.displayName=`Await`;var tC=v.createContext(null);tC.displayName=`Navigation`;var nC=v.createContext(null);nC.displayName=`Location`;var rC=v.createContext({outlet:null,matches:[],isDataRoute:!1});rC.displayName=`Route`;var iC=v.createContext(null);iC.displayName=`RouteError`;var aC=`REACT_ROUTER_ERROR`,oC=`REDIRECT`,sC=`ROUTE_ERROR_RESPONSE`;function cC(e){if(e.startsWith(`${aC}:${oC}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function lC(e){if(e.startsWith(`${aC}:${sC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new WS(t.status,t.statusText,t.data)}catch{}}function uC(e,{relative:t}={}){iS(dC(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=v.useContext(tC),{hash:i,pathname:a,search:o}=xC(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:BS([n,a])),r.createHref({pathname:s,search:o,hash:i})}function dC(){return v.useContext(nC)!=null}function fC(){return iS(dC(),`useLocation() may be used only in the context of a <Router> component.`),v.useContext(nC).location}var pC=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function mC(e){v.useContext(tC).static||v.useLayoutEffect(e)}function hC(){let{isDataRoute:e}=v.useContext(rC);return e?BC():gC()}function gC(){iS(dC(),`useNavigate() may be used only in the context of a <Router> component.`);let e=v.useContext(YS),{basename:t,navigator:n}=v.useContext(tC),{matches:r}=v.useContext(rC),{pathname:i}=fC(),a=JSON.stringify(RS(r)),o=v.useRef(!1);return mC(()=>{o.current=!0}),v.useCallback((r,s={})=>{if(aS(o.current,pC),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=zS(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:BS([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var _C=v.createContext(null);function vC(){return v.useContext(_C)}function yC(e){let t=v.useContext(rC).outlet;return v.useMemo(()=>t&&v.createElement(_C.Provider,{value:e},t),[t,e])}function bC(){let{matches:e}=v.useContext(rC),t=e[e.length-1];return t?t.params:{}}function xC(e,{relative:t}={}){let{matches:n}=v.useContext(rC),{pathname:r}=fC(),i=JSON.stringify(RS(n));return v.useMemo(()=>zS(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function SC(e,t){return CC(e,t)}function CC(e,t,n){iS(dC(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=v.useContext(tC),{matches:i}=v.useContext(rC),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;HC(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
62
|
+
|
|
63
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=fC(),d;if(t){let e=typeof t==`string`?uS(t):t;iS(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=pS(e,{pathname:p});aS(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),aS(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=AC(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:BS([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:BS([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?v.createElement(nC.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function wC(){let e=zC(),t=GS(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=v.createElement(v.Fragment,null,v.createElement(`p`,null,`💿 Hey developer 👋`),v.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,v.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,v.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),v.createElement(v.Fragment,null,v.createElement(`h2`,null,`Unexpected Application Error!`),v.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?v.createElement(`pre`,{style:i},n):null,o)}var TC=v.createElement(wC,null),EC=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=lC(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:v.createElement(rC.Provider,{value:this.props.routeContext},v.createElement(iC.Provider,{value:e,children:this.props.component}));return this.context?v.createElement(OC,{error:e},t):t}};EC.contextType=ZS;var DC=new WeakMap;function OC({children:e,error:t}){let{basename:n}=v.useContext(tC);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=cC(t.digest);if(e){let r=DC.get(t);if(r)throw r;let i=JS(e.location,n);if(qS&&!DC.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw DC.set(t,n),n}return v.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function kC({routeContext:e,match:t,children:n}){let r=v.useContext(YS);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(rC.Provider,{value:e},n)}function AC(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);iS(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:KS(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||TC,o&&(s<0&&c===0?(HC(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?v.createElement(n.route.Component,null):n.route.element?n.route.element:e,v.createElement(kC,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?v.createElement(EC,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function jC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function MC(e){let t=v.useContext(YS);return iS(t,jC(e)),t}function NC(e){let t=v.useContext(XS);return iS(t,jC(e)),t}function PC(e){let t=v.useContext(rC);return iS(t,jC(e)),t}function FC(e){let t=PC(e),n=t.matches[t.matches.length-1];return iS(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function IC(){return FC(`useRouteId`)}function LC(){return NC(`useNavigation`).navigation}function RC(){let{matches:e,loaderData:t}=NC(`useMatches`);return v.useMemo(()=>e.map(e=>hS(e,t)),[e,t])}function zC(){let e=v.useContext(iC),t=NC(`useRouteError`),n=FC(`useRouteError`);return e===void 0?t.errors?.[n]:e}function BC(){let{router:e}=MC(`useNavigate`),t=FC(`useNavigate`),n=v.useRef(!1);return mC(()=>{n.current=!0}),v.useCallback(async(r,i={})=>{aS(n.current,pC),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var VC={};function HC(e,t,n){!t&&!VC[e]&&(VC[e]=!0,aS(!1,n))}v.useOptimistic,v.memo(UC);function UC({routes:e,future:t,state:n,isStatic:r,onError:i}){return CC(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function WC({to:e,replace:t,state:n,relative:r}){iS(dC(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=v.useContext(tC);aS(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=v.useContext(rC),{pathname:o}=fC(),s=hC(),c=zS(e,RS(a),o,r===`path`),l=JSON.stringify(c);return v.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function GC(e){return yC(e.context)}function KC(e){iS(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function qC({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){iS(!dC(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=v.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=uS(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=v.useMemo(()=>{let e=MS(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return aS(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:v.createElement(tC.Provider,{value:c},v.createElement(nC.Provider,{children:t,value:h}))}function JC({children:e,location:t}){return SC(YC(e),t)}function YC(e,t=[]){let n=[];return v.Children.forEach(e,(e,r)=>{if(!v.isValidElement(e))return;let i=[...t,r];if(e.type===v.Fragment){n.push.apply(n,YC(e.props.children,i));return}iS(e.type===KC,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),iS(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=YC(e.props.children,i)),n.push(a)}),n}var XC=`get`,ZC=`application/x-www-form-urlencoded`;function QC(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function $C(e){return QC(e)&&e.tagName.toLowerCase()===`button`}function ew(e){return QC(e)&&e.tagName.toLowerCase()===`form`}function tw(e){return QC(e)&&e.tagName.toLowerCase()===`input`}function nw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function rw(e,t){return e.button===0&&(!t||t===`_self`)&&!nw(e)}function iw(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function aw(e,t){let n=iw(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var ow=null;function sw(){if(ow===null)try{new FormData(document.createElement(`form`),0),ow=!1}catch{ow=!0}return ow}var cw=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function lw(e){return e!=null&&!cw.has(e)?(aS(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ZC}"`),null):e}function uw(e,t){let n,r,i,a,o;if(ew(e)){let o=e.getAttribute(`action`);r=o?MS(o,t):null,n=e.getAttribute(`method`)||XC,i=lw(e.getAttribute(`enctype`))||ZC,a=new FormData(e)}else if($C(e)||tw(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?MS(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||XC,i=lw(e.getAttribute(`formenctype`))||lw(o.getAttribute(`enctype`))||ZC,a=new FormData(o,e),!sw()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(QC(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=XC,r=null,i=ZC,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var dw={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},fw=/[&><\u2028\u2029]/g;function pw(e){return e.replace(fw,e=>dw[e])}function mw(e,t){if(e===!1||e==null)throw Error(t)}function hw(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&MS(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function gw(e,t){if(e.id in t)return t[e.id];try{let n=await eS(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function _w(e){return e!=null&&typeof e.page==`string`}function vw(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function yw(e,t,n){return ww((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await gw(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(vw).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function bw(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function xw(e,t,{includeHydrateFallback:n}={}){return Sw(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Sw(e){return[...new Set(e)]}function Cw(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ww(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!_w(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Cw(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Tw(){let e=v.useContext(YS);return mw(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ew(){let e=v.useContext(XS);return mw(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Dw=v.createContext(void 0);Dw.displayName=`FrameworkContext`;function Ow(){let e=v.useContext(Dw);return mw(e,`You must render this element inside a <HydratedRouter> element`),e}function kw(e,t){let n=v.useContext(Dw),[r,i]=v.useState(!1),[a,o]=v.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=v.useRef(null);v.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),v.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Aw(s,p),onBlur:Aw(c,m),onMouseEnter:Aw(l,p),onMouseLeave:Aw(u,m),onTouchStart:Aw(d,p)}]:[a,f,{}]:[!1,f,{}]}function Aw(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function jw({page:e,...t}){let{router:n}=Tw(),r=v.useMemo(()=>pS(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?v.createElement(Nw,{page:e,matches:r,...t}):null}function Mw(e){let{manifest:t,routeModules:n}=Ow(),[r,i]=v.useState([]);return v.useEffect(()=>{let r=!1;return yw(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Nw({page:e,matches:t,...n}){let r=fC(),{future:i,manifest:a,routeModules:o}=Ow(),{basename:s}=Tw(),{loaderData:c,matches:l}=Ew(),u=v.useMemo(()=>bw(e,t,l,a,r,`data`),[e,t,l,a,r]),d=v.useMemo(()=>bw(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=hw(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=v.useMemo(()=>xw(d,a),[d,a]),m=Mw(d);return v.createElement(v.Fragment,null,f.map(e=>v.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>v.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>v.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Pw(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Fw=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Fw&&(window.__reactRouterVersion=`7.13.1`)}catch{}function Iw({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=v.useRef();i.current??=rS({window:r,v5Compat:!0});let a=i.current,[o,s]=v.useState({action:a.action,location:a.location}),c=v.useCallback(e=>{n===!1?s(e):v.startTransition(()=>s(e))},[n]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.createElement(qC,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function Lw({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=v.useState({action:n.action,location:n.location}),o=v.useCallback(e=>{r===!1?a(e):v.startTransition(()=>a(e))},[r]);return v.useLayoutEffect(()=>n.listen(o),[n,o]),v.createElement(qC,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Lw.displayName=`unstable_HistoryRouter`;var Rw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zw=v.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:_}=v.useContext(tC),y=typeof l==`string`&&Rw.test(l),b=JS(l,h);l=b.to;let x=uC(l,{relative:r}),S=fC(),C=null;if(o){let e=zS(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:BS([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=kw(n,p),D=Kw(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=v.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Pw(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?v.createElement(v.Fragment,null,A,v.createElement(jw,{page:x})):A});zw.displayName=`Link`;var Bw=v.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=xC(a,{relative:c.relative}),d=fC(),f=v.useContext(XS),{navigator:p,basename:m}=v.useContext(tC),h=f!=null&&rT(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=MS(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return v.createElement(zw,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Bw.displayName=`NavLink`;var Vw=v.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=XC,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=v.useContext(tC),g=Xw(),_=Zw(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&Rw.test(s);return v.createElement(`form`,{ref:m,method:y,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?v.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Vw.displayName=`Form`;function Hw({getKey:e,storageKey:t,...n}){let r=v.useContext(Dw),{basename:i}=v.useContext(tC),a=fC(),o=RC();tT({getKey:e,storageKey:t});let s=v.useMemo(()=>{if(!r||!e)return null;let t=eT(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return v.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${pw(JSON.stringify(t||Qw))}, ${pw(JSON.stringify(s))})`}})}Hw.displayName=`ScrollRestoration`;function Uw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ww(e){let t=v.useContext(YS);return iS(t,Uw(e)),t}function Gw(e){let t=v.useContext(XS);return iS(t,Uw(e)),t}function Kw(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=hC(),d=fC(),f=xC(e,{relative:o});return v.useCallback(p=>{if(rw(p,t)){p.preventDefault();let t=n===void 0?lS(d)===lS(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?v.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function qw(e){aS(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(iw(e)),n=v.useRef(!1),r=fC(),i=v.useMemo(()=>aw(r.search,n.current?null:t.current),[r.search]),a=hC();return[i,v.useCallback((e,t)=>{let r=iw(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Jw=0,Yw=()=>`__${String(++Jw)}__`;function Xw(){let{router:e}=Ww(`useSubmit`),{basename:t}=v.useContext(tC),n=IC(),r=e.fetch,i=e.navigate;return v.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=uw(e,t);a.navigate===!1?await r(a.fetcherKey||Yw(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Zw(e,{relative:t}={}){let{basename:n}=v.useContext(tC),r=v.useContext(rC);iS(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...xC(e||`.`,{relative:t})},o=fC();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:BS([n,a.pathname])),lS(a)}var Qw=`react-router-scroll-positions`,$w={};function eT(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:MS(e.pathname,n)||e.pathname},t)),i??=e.key,i}function tT({getKey:e,storageKey:t}={}){let{router:n}=Ww(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Gw(`useScrollRestoration`),{basename:a}=v.useContext(tC),o=fC(),s=RC(),c=LC();v.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),nT(v.useCallback(()=>{if(c.state===`idle`){let t=eT(o,s,a,e);$w[t]=window.scrollY}try{sessionStorage.setItem(t||Qw,JSON.stringify($w))}catch(e){aS(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(v.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Qw);e&&($w=JSON.parse(e))}catch{}},[t]),v.useLayoutEffect(()=>{let t=n?.enableScrollRestoration($w,()=>window.scrollY,e?(t,n)=>eT(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),v.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{aS(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function nT(e,t){let{capture:n}=t||{};v.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function rT(e,{relative:t}={}){let n=v.useContext(QS);iS(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ww(`useViewTransitionState`),i=xC(e,{relative:t});if(!n.isTransitioning)return!1;let a=MS(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=MS(n.nextLocation.pathname,r)||n.nextLocation.pathname;return kS(i.pathname,o)!=null||kS(i.pathname,a)!=null}Object.freeze({status:`aborted`});function K(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var iT=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},aT=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},oT={};function sT(e){return e&&Object.assign(oT,e),oT}function cT(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function lT(e,t){return typeof t==`bigint`?t.toString():t}function uT(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function dT(e){return e==null}function fT(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function pT(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var mT=Symbol(`evaluating`);function hT(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==mT)return r===void 0&&(r=mT,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function gT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function _T(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function vT(e){return JSON.stringify(e)}function yT(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var bT=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function xT(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ST=uT(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function CT(e){if(xT(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(xT(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function wT(e){return CT(e)?{...e}:Array.isArray(e)?[...e]:e}var TT=new Set([`string`,`number`,`symbol`]);function ET(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function DT(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function OT(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function kT(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var AT={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function jT(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return DT(e,_T(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return gT(this,`shape`,e),e},checks:[]}))}function MT(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return DT(e,_T(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return gT(this,`shape`,r),r},checks:[]}))}function NT(e,t){if(!CT(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return DT(e,_T(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return gT(this,`shape`,n),n}}))}function PT(e,t){if(!CT(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return DT(e,_T(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return gT(this,`shape`,n),n}}))}function FT(e,t){return DT(e,_T(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return gT(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function IT(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return DT(t,_T(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return gT(this,`shape`,i),i},checks:[]}))}function LT(e,t,n){return DT(t,_T(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return gT(this,`shape`,i),i}}))}function RT(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function zT(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function BT(e){return typeof e==`string`?e:e?.message}function VT(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=BT(e.inst?._zod.def?.error?.(e))??BT(t?.error?.(e))??BT(n.customError?.(e))??BT(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function HT(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function UT(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var WT=(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,lT,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},GT=K(`$ZodError`,WT),KT=K(`$ZodError`,WT,{Parent:Error});function qT(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function JT(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var YT=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new iT;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>VT(e,a,sT())));throw bT(t,i?.callee),t}return o.value},XT=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>VT(e,a,sT())));throw bT(t,i?.callee),t}return o.value},ZT=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new iT;return a.issues.length?{success:!1,error:new(e??GT)(a.issues.map(e=>VT(e,i,sT())))}:{success:!0,data:a.value}},QT=ZT(KT),$T=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>VT(e,i,sT())))}:{success:!0,data:a.value}},eE=$T(KT),tE=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return YT(e)(t,n,i)},nE=e=>(t,n,r)=>YT(e)(t,n,r),rE=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return XT(e)(t,n,i)},iE=e=>async(t,n,r)=>XT(e)(t,n,r),aE=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ZT(e)(t,n,i)},oE=e=>(t,n,r)=>ZT(e)(t,n,r),sE=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return $T(e)(t,n,i)},cE=e=>async(t,n,r)=>$T(e)(t,n,r),lE=/^[cC][^\s-]{8,}$/,uE=/^[0-9a-z]+$/,dE=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fE=/^[0-9a-vA-V]{20}$/,pE=/^[A-Za-z0-9]{27}$/,mE=/^[a-zA-Z0-9_-]{21}$/,hE=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gE=/^([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})$/,_E=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,vE=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,yE=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function bE(){return new RegExp(yE,`u`)}var xE=/^(?:(?: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])$/,SE=/^(([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}|:))$/,CE=/^((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])$/,wE=/^(([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])$/,TE=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,EE=/^[A-Za-z0-9_-]*$/,DE=/^\+[1-9]\d{6,14}$/,OE=`(?:(?:\\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])))`,kE=RegExp(`^${OE}$`);function AE(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function jE(e){return RegExp(`^${AE(e)}$`)}function ME(e){let t=AE({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${OE}T(?:${r})$`)}var NE=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},PE=/^-?\d+$/,FE=/^-?\d+(?:\.\d+)?$/,IE=/^(?:true|false)$/i,LE=/^[^A-Z]*$/,RE=/^[^a-z]*$/,zE=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),BE={number:`number`,bigint:`bigint`,object:`date`},VE=K(`$ZodCheckLessThan`,(e,t)=>{zE.init(e,t);let n=BE[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),HE=K(`$ZodCheckGreaterThan`,(e,t)=>{zE.init(e,t);let n=BE[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),UE=K(`$ZodCheckMultipleOf`,(e,t)=>{zE.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):pT(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),WE=K(`$ZodCheckNumberFormat`,(e,t)=>{zE.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=AT[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=PE)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),GE=K(`$ZodCheckMaxLength`,(e,t)=>{var n;zE.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!dT(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=HT(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),KE=K(`$ZodCheckMinLength`,(e,t)=>{var n;zE.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!dT(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=HT(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),qE=K(`$ZodCheckLengthEquals`,(e,t)=>{var n;zE.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!dT(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=HT(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),JE=K(`$ZodCheckStringFormat`,(e,t)=>{var n,r;zE.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),YE=K(`$ZodCheckRegex`,(e,t)=>{JE.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),XE=K(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=LE,JE.init(e,t)}),ZE=K(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=RE,JE.init(e,t)}),QE=K(`$ZodCheckIncludes`,(e,t)=>{zE.init(e,t);let n=ET(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),$E=K(`$ZodCheckStartsWith`,(e,t)=>{zE.init(e,t);let n=RegExp(`^${ET(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),eD=K(`$ZodCheckEndsWith`,(e,t)=>{zE.init(e,t);let n=RegExp(`.*${ET(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),tD=K(`$ZodCheckOverwrite`,(e,t)=>{zE.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),nD=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
64
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
65
|
+
`))}},rD={major:4,minor:3,patch:6},iD=K(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rD;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=RT(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new iT;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=RT(e,t))});else{if(e.issues.length===t)continue;r||=RT(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(RT(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new iT;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new iT;return o.then(e=>t(e,r,a))}return t(o,r,a)}}hT(e,`~standard`,()=>({validate:t=>{try{let n=QT(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return eE(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),aD=K(`$ZodString`,(e,t)=>{iD.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??NE(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),oD=K(`$ZodStringFormat`,(e,t)=>{JE.init(e,t),aD.init(e,t)}),sD=K(`$ZodGUID`,(e,t)=>{t.pattern??=gE,oD.init(e,t)}),cD=K(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=_E(e)}else t.pattern??=_E();oD.init(e,t)}),lD=K(`$ZodEmail`,(e,t)=>{t.pattern??=vE,oD.init(e,t)}),uD=K(`$ZodURL`,(e,t)=>{oD.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),dD=K(`$ZodEmoji`,(e,t)=>{t.pattern??=bE(),oD.init(e,t)}),fD=K(`$ZodNanoID`,(e,t)=>{t.pattern??=mE,oD.init(e,t)}),pD=K(`$ZodCUID`,(e,t)=>{t.pattern??=lE,oD.init(e,t)}),mD=K(`$ZodCUID2`,(e,t)=>{t.pattern??=uE,oD.init(e,t)}),hD=K(`$ZodULID`,(e,t)=>{t.pattern??=dE,oD.init(e,t)}),gD=K(`$ZodXID`,(e,t)=>{t.pattern??=fE,oD.init(e,t)}),_D=K(`$ZodKSUID`,(e,t)=>{t.pattern??=pE,oD.init(e,t)}),vD=K(`$ZodISODateTime`,(e,t)=>{t.pattern??=ME(t),oD.init(e,t)}),yD=K(`$ZodISODate`,(e,t)=>{t.pattern??=kE,oD.init(e,t)}),bD=K(`$ZodISOTime`,(e,t)=>{t.pattern??=jE(t),oD.init(e,t)}),xD=K(`$ZodISODuration`,(e,t)=>{t.pattern??=hE,oD.init(e,t)}),SD=K(`$ZodIPv4`,(e,t)=>{t.pattern??=xE,oD.init(e,t),e._zod.bag.format=`ipv4`}),CD=K(`$ZodIPv6`,(e,t)=>{t.pattern??=SE,oD.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),wD=K(`$ZodCIDRv4`,(e,t)=>{t.pattern??=CE,oD.init(e,t)}),TD=K(`$ZodCIDRv6`,(e,t)=>{t.pattern??=wE,oD.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function ED(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var DD=K(`$ZodBase64`,(e,t)=>{t.pattern??=TE,oD.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{ED(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function OD(e){if(!EE.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return ED(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var kD=K(`$ZodBase64URL`,(e,t)=>{t.pattern??=EE,oD.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{OD(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),AD=K(`$ZodE164`,(e,t)=>{t.pattern??=DE,oD.init(e,t)});function jD(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var MD=K(`$ZodJWT`,(e,t)=>{oD.init(e,t),e._zod.check=n=>{jD(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ND=K(`$ZodNumber`,(e,t)=>{iD.init(e,t),e._zod.pattern=e._zod.bag.pattern??FE,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),PD=K(`$ZodNumberFormat`,(e,t)=>{WE.init(e,t),ND.init(e,t)}),FD=K(`$ZodBoolean`,(e,t)=>{iD.init(e,t),e._zod.pattern=IE,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),ID=K(`$ZodUnknown`,(e,t)=>{iD.init(e,t),e._zod.parse=e=>e}),LD=K(`$ZodNever`,(e,t)=>{iD.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function RD(e,t,n){e.issues.length&&t.issues.push(...zT(n,e.issues)),t.value[n]=e.value}var zD=K(`$ZodArray`,(e,t)=>{iD.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>RD(t,n,e))):RD(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function BD(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...zT(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function VD(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=kT(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function HD(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>BD(e,n,i,t,u))):BD(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var UD=K(`$ZodObject`,(e,t)=>{if(iD.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=uT(()=>VD(t));hT(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=xT,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>BD(n,t,e,s,r))):BD(i,t,e,s,r)}return i?HD(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),WD=K(`$ZodObjectJIT`,(e,t)=>{UD.init(e,t);let n=e._zod.parse,r=uT(()=>VD(t)),i=e=>{let t=new nD([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=vT(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=vT(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
66
|
+
if (${n}.issues.length) {
|
|
67
|
+
if (${o} in input) {
|
|
68
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
69
|
+
...iss,
|
|
70
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
71
|
+
})));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (${n}.value === undefined) {
|
|
76
|
+
if (${o} in input) {
|
|
77
|
+
newResult[${o}] = undefined;
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
newResult[${o}] = ${n}.value;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
`):t.write(`
|
|
84
|
+
if (${n}.issues.length) {
|
|
85
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
86
|
+
...iss,
|
|
87
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
88
|
+
})));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (${n}.value === undefined) {
|
|
92
|
+
if (${o} in input) {
|
|
93
|
+
newResult[${o}] = undefined;
|
|
94
|
+
}
|
|
95
|
+
} else {
|
|
96
|
+
newResult[${o}] = ${n}.value;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=xT,s=!oT.jitless,c=s&&ST.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?HD([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function GD(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!RT(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>VT(e,r,sT())))}),t)}var KD=K(`$ZodUnion`,(e,t)=>{iD.init(e,t),hT(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),hT(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),hT(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),hT(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>fT(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>GD(t,i,e,a)):GD(s,i,e,a)}}),qD=K(`$ZodIntersection`,(e,t)=>{iD.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>YD(e,t,n)):YD(e,i,a)}});function JD(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(CT(e)&&CT(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=JD(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=JD(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function YD(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),RT(e))return e;let o=JD(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var XD=K(`$ZodRecord`,(e,t)=>{iD.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!CT(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...zT(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...zT(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&FE.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>VT(e,r,sT())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...zT(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...zT(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),ZD=K(`$ZodEnum`,(e,t)=>{iD.init(e,t);let n=cT(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>TT.has(typeof e)).map(e=>typeof e==`string`?ET(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),QD=K(`$ZodTransform`,(e,t)=>{iD.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new aT(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new iT;return n.value=i,n}});function $D(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var eO=K(`$ZodOptional`,(e,t)=>{iD.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,hT(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),hT(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${fT(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>$D(t,e.value)):$D(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),tO=K(`$ZodExactOptional`,(e,t)=>{eO.init(e,t),hT(e._zod,`values`,()=>t.innerType._zod.values),hT(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),nO=K(`$ZodNullable`,(e,t)=>{iD.init(e,t),hT(e._zod,`optin`,()=>t.innerType._zod.optin),hT(e._zod,`optout`,()=>t.innerType._zod.optout),hT(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${fT(e.source)}|null)$`):void 0}),hT(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),rO=K(`$ZodDefault`,(e,t)=>{iD.init(e,t),e._zod.optin=`optional`,hT(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>iO(e,t)):iO(r,t)}});function iO(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var aO=K(`$ZodPrefault`,(e,t)=>{iD.init(e,t),e._zod.optin=`optional`,hT(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),oO=K(`$ZodNonOptional`,(e,t)=>{iD.init(e,t),hT(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>sO(t,e)):sO(i,e)}});function sO(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var cO=K(`$ZodCatch`,(e,t)=>{iD.init(e,t),hT(e._zod,`optin`,()=>t.innerType._zod.optin),hT(e._zod,`optout`,()=>t.innerType._zod.optout),hT(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>VT(e,n,sT()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>VT(e,n,sT()))},input:e.value}),e.issues=[]),e)}}),lO=K(`$ZodPipe`,(e,t)=>{iD.init(e,t),hT(e._zod,`values`,()=>t.in._zod.values),hT(e._zod,`optin`,()=>t.in._zod.optin),hT(e._zod,`optout`,()=>t.out._zod.optout),hT(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>uO(e,t.in,n)):uO(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>uO(e,t.out,n)):uO(r,t.out,n)}});function uO(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var dO=K(`$ZodReadonly`,(e,t)=>{iD.init(e,t),hT(e._zod,`propValues`,()=>t.innerType._zod.propValues),hT(e._zod,`values`,()=>t.innerType._zod.values),hT(e._zod,`optin`,()=>t.innerType?._zod?.optin),hT(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(fO):fO(r)}});function fO(e){return e.value=Object.freeze(e.value),e}var pO=K(`$ZodCustom`,(e,t)=>{zE.init(e,t),iD.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>mO(t,n,r,e));mO(i,n,r,e)}});function mO(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(UT(e))}}var hO,gO=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function _O(){return new gO}(hO=globalThis).__zod_globalRegistry??(hO.__zod_globalRegistry=_O());var vO=globalThis.__zod_globalRegistry;function yO(e,t){return new e({type:`string`,...OT(t)})}function bO(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...OT(t)})}function xO(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...OT(t)})}function SO(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...OT(t)})}function CO(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...OT(t)})}function wO(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...OT(t)})}function TO(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...OT(t)})}function EO(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...OT(t)})}function DO(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...OT(t)})}function OO(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...OT(t)})}function kO(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...OT(t)})}function AO(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...OT(t)})}function jO(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...OT(t)})}function MO(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...OT(t)})}function NO(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...OT(t)})}function PO(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...OT(t)})}function FO(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...OT(t)})}function IO(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...OT(t)})}function LO(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...OT(t)})}function RO(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...OT(t)})}function zO(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...OT(t)})}function BO(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...OT(t)})}function VO(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...OT(t)})}function HO(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...OT(t)})}function UO(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...OT(t)})}function WO(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...OT(t)})}function GO(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...OT(t)})}function KO(e,t){return new e({type:`number`,checks:[],...OT(t)})}function qO(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...OT(t)})}function JO(e,t){return new e({type:`boolean`,...OT(t)})}function YO(e){return new e({type:`unknown`})}function XO(e,t){return new e({type:`never`,...OT(t)})}function ZO(e,t){return new VE({check:`less_than`,...OT(t),value:e,inclusive:!1})}function QO(e,t){return new VE({check:`less_than`,...OT(t),value:e,inclusive:!0})}function $O(e,t){return new HE({check:`greater_than`,...OT(t),value:e,inclusive:!1})}function ek(e,t){return new HE({check:`greater_than`,...OT(t),value:e,inclusive:!0})}function tk(e,t){return new UE({check:`multiple_of`,...OT(t),value:e})}function nk(e,t){return new GE({check:`max_length`,...OT(t),maximum:e})}function rk(e,t){return new KE({check:`min_length`,...OT(t),minimum:e})}function ik(e,t){return new qE({check:`length_equals`,...OT(t),length:e})}function ak(e,t){return new YE({check:`string_format`,format:`regex`,...OT(t),pattern:e})}function ok(e){return new XE({check:`string_format`,format:`lowercase`,...OT(e)})}function sk(e){return new ZE({check:`string_format`,format:`uppercase`,...OT(e)})}function ck(e,t){return new QE({check:`string_format`,format:`includes`,...OT(t),includes:e})}function lk(e,t){return new $E({check:`string_format`,format:`starts_with`,...OT(t),prefix:e})}function uk(e,t){return new eD({check:`string_format`,format:`ends_with`,...OT(t),suffix:e})}function dk(e){return new tD({check:`overwrite`,tx:e})}function fk(e){return dk(t=>t.normalize(e))}function pk(){return dk(e=>e.trim())}function mk(){return dk(e=>e.toLowerCase())}function hk(){return dk(e=>e.toUpperCase())}function gk(){return dk(e=>yT(e))}function _k(e,t,n){return new e({type:`array`,element:t,...OT(n)})}function vk(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...OT(n)})}function yk(e){let t=bk(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(UT(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(UT(r))}},e(n.value,n)));return t}function bk(e,t){let n=new zE({check:`custom`,...OT(t)});return n._zod.check=e,n}function xk(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??vO,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function Sk(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Sk(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&Tk(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Ck(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
100
|
+
|
|
101
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function wk(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:Dk(t,`input`,e.processors),output:Dk(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Tk(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Tk(r.element,n);if(r.type===`set`)return Tk(r.valueType,n);if(r.type===`lazy`)return Tk(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return Tk(r.innerType,n);if(r.type===`intersection`)return Tk(r.left,n)||Tk(r.right,n);if(r.type===`record`||r.type===`map`)return Tk(r.keyType,n)||Tk(r.valueType,n);if(r.type===`pipe`)return Tk(r.in,n)||Tk(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Tk(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Tk(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Tk(e,n))return!0;return!!(r.rest&&Tk(r.rest,n))}return!1}var Ek=(e,t={})=>n=>{let r=xk({...n,processors:t});return Sk(e,r),Ck(r,e),wk(r,e)},Dk=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=xk({...i??{},target:a,io:t,processors:n});return Sk(e,o),Ck(o,e),wk(o,e)},Ok={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},kk=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Ok[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Ak=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},jk=(e,t,n,r)=>{n.type=`boolean`},Mk=(e,t,n,r)=>{n.not={}},Nk=(e,t,n,r)=>{let i=e._zod.def,a=cT(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Pk=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Fk=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Ik=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Sk(a.element,t,{...r,path:[...r.path,`items`]})},Lk=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Sk(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Sk(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Rk=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Sk(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},zk=(e,t,n,r)=>{let i=e._zod.def,a=Sk(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Sk(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Bk=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Sk(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=Sk(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Sk(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Vk=(e,t,n,r)=>{let i=e._zod.def,a=Sk(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Hk=(e,t,n,r)=>{let i=e._zod.def;Sk(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Uk=(e,t,n,r)=>{let i=e._zod.def;Sk(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Wk=(e,t,n,r)=>{let i=e._zod.def;Sk(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Gk=(e,t,n,r)=>{let i=e._zod.def;Sk(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Kk=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;Sk(a,t,r);let o=t.seen.get(e);o.ref=a},qk=(e,t,n,r)=>{let i=e._zod.def;Sk(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Jk=(e,t,n,r)=>{let i=e._zod.def;Sk(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Yk=K(`ZodISODateTime`,(e,t)=>{vD.init(e,t),xA.init(e,t)});function Xk(e){return HO(Yk,e)}var Zk=K(`ZodISODate`,(e,t)=>{yD.init(e,t),xA.init(e,t)});function Qk(e){return UO(Zk,e)}var $k=K(`ZodISOTime`,(e,t)=>{bD.init(e,t),xA.init(e,t)});function eA(e){return WO($k,e)}var tA=K(`ZodISODuration`,(e,t)=>{xD.init(e,t),xA.init(e,t)});function nA(e){return GO(tA,e)}var rA=(e,t)=>{GT.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>JT(e,t)},flatten:{value:t=>qT(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,lT,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,lT,2)}},isEmpty:{get(){return e.issues.length===0}}})};K(`ZodError`,rA);var iA=K(`ZodError`,rA,{Parent:Error}),aA=YT(iA),oA=XT(iA),sA=ZT(iA),cA=$T(iA),lA=tE(iA),uA=nE(iA),dA=rE(iA),fA=iE(iA),pA=aE(iA),mA=oE(iA),hA=sE(iA),gA=cE(iA),_A=K(`ZodType`,(e,t)=>(iD.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Dk(e,`input`),output:Dk(e,`output`)}}),e.toJSONSchema=Ek(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(_T(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>DT(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>aA(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>sA(e,t,n),e.parseAsync=async(t,n)=>oA(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>cA(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>lA(e,t,n),e.decode=(t,n)=>uA(e,t,n),e.encodeAsync=async(t,n)=>dA(e,t,n),e.decodeAsync=async(t,n)=>fA(e,t,n),e.safeEncode=(t,n)=>pA(e,t,n),e.safeDecode=(t,n)=>mA(e,t,n),e.safeEncodeAsync=async(t,n)=>hA(e,t,n),e.safeDecodeAsync=async(t,n)=>gA(e,t,n),e.refine=(t,n)=>e.check(Aj(t,n)),e.superRefine=t=>e.check(jj(t)),e.overwrite=t=>e.check(dk(t)),e.optional=()=>fj(e),e.exactOptional=()=>mj(e),e.nullable=()=>gj(e),e.nullish=()=>fj(gj(e)),e.nonoptional=t=>Sj(e,t),e.array=()=>QA(e),e.or=t=>nj([e,t]),e.and=t=>ij(e,t),e.transform=t=>Ej(e,uj(t)),e.default=t=>vj(e,t),e.prefault=t=>bj(e,t),e.catch=t=>wj(e,t),e.pipe=t=>Ej(e,t),e.readonly=()=>Oj(e),e.describe=t=>{let n=e.clone();return vO.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return vO.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return vO.get(e);let n=e.clone();return vO.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),vA=K(`_ZodString`,(e,t)=>{aD.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kk(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ak(...t)),e.includes=(...t)=>e.check(ck(...t)),e.startsWith=(...t)=>e.check(lk(...t)),e.endsWith=(...t)=>e.check(uk(...t)),e.min=(...t)=>e.check(rk(...t)),e.max=(...t)=>e.check(nk(...t)),e.length=(...t)=>e.check(ik(...t)),e.nonempty=(...t)=>e.check(rk(1,...t)),e.lowercase=t=>e.check(ok(t)),e.uppercase=t=>e.check(sk(t)),e.trim=()=>e.check(pk()),e.normalize=(...t)=>e.check(fk(...t)),e.toLowerCase=()=>e.check(mk()),e.toUpperCase=()=>e.check(hk()),e.slugify=()=>e.check(gk())}),yA=K(`ZodString`,(e,t)=>{aD.init(e,t),vA.init(e,t),e.email=t=>e.check(bO(SA,t)),e.url=t=>e.check(EO(TA,t)),e.jwt=t=>e.check(VO(BA,t)),e.emoji=t=>e.check(DO(EA,t)),e.guid=t=>e.check(xO(CA,t)),e.uuid=t=>e.check(SO(wA,t)),e.uuidv4=t=>e.check(CO(wA,t)),e.uuidv6=t=>e.check(wO(wA,t)),e.uuidv7=t=>e.check(TO(wA,t)),e.nanoid=t=>e.check(OO(DA,t)),e.guid=t=>e.check(xO(CA,t)),e.cuid=t=>e.check(kO(OA,t)),e.cuid2=t=>e.check(AO(kA,t)),e.ulid=t=>e.check(jO(AA,t)),e.base64=t=>e.check(RO(LA,t)),e.base64url=t=>e.check(zO(RA,t)),e.xid=t=>e.check(MO(jA,t)),e.ksuid=t=>e.check(NO(MA,t)),e.ipv4=t=>e.check(PO(NA,t)),e.ipv6=t=>e.check(FO(PA,t)),e.cidrv4=t=>e.check(IO(FA,t)),e.cidrv6=t=>e.check(LO(IA,t)),e.e164=t=>e.check(BO(zA,t)),e.datetime=t=>e.check(Xk(t)),e.date=t=>e.check(Qk(t)),e.time=t=>e.check(eA(t)),e.duration=t=>e.check(nA(t))});function bA(e){return yO(yA,e)}var xA=K(`ZodStringFormat`,(e,t)=>{oD.init(e,t),vA.init(e,t)}),SA=K(`ZodEmail`,(e,t)=>{lD.init(e,t),xA.init(e,t)}),CA=K(`ZodGUID`,(e,t)=>{sD.init(e,t),xA.init(e,t)}),wA=K(`ZodUUID`,(e,t)=>{cD.init(e,t),xA.init(e,t)}),TA=K(`ZodURL`,(e,t)=>{uD.init(e,t),xA.init(e,t)}),EA=K(`ZodEmoji`,(e,t)=>{dD.init(e,t),xA.init(e,t)}),DA=K(`ZodNanoID`,(e,t)=>{fD.init(e,t),xA.init(e,t)}),OA=K(`ZodCUID`,(e,t)=>{pD.init(e,t),xA.init(e,t)}),kA=K(`ZodCUID2`,(e,t)=>{mD.init(e,t),xA.init(e,t)}),AA=K(`ZodULID`,(e,t)=>{hD.init(e,t),xA.init(e,t)}),jA=K(`ZodXID`,(e,t)=>{gD.init(e,t),xA.init(e,t)}),MA=K(`ZodKSUID`,(e,t)=>{_D.init(e,t),xA.init(e,t)}),NA=K(`ZodIPv4`,(e,t)=>{SD.init(e,t),xA.init(e,t)}),PA=K(`ZodIPv6`,(e,t)=>{CD.init(e,t),xA.init(e,t)}),FA=K(`ZodCIDRv4`,(e,t)=>{wD.init(e,t),xA.init(e,t)}),IA=K(`ZodCIDRv6`,(e,t)=>{TD.init(e,t),xA.init(e,t)}),LA=K(`ZodBase64`,(e,t)=>{DD.init(e,t),xA.init(e,t)}),RA=K(`ZodBase64URL`,(e,t)=>{kD.init(e,t),xA.init(e,t)}),zA=K(`ZodE164`,(e,t)=>{AD.init(e,t),xA.init(e,t)}),BA=K(`ZodJWT`,(e,t)=>{MD.init(e,t),xA.init(e,t)}),VA=K(`ZodNumber`,(e,t)=>{ND.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ak(e,t,n,r),e.gt=(t,n)=>e.check($O(t,n)),e.gte=(t,n)=>e.check(ek(t,n)),e.min=(t,n)=>e.check(ek(t,n)),e.lt=(t,n)=>e.check(ZO(t,n)),e.lte=(t,n)=>e.check(QO(t,n)),e.max=(t,n)=>e.check(QO(t,n)),e.int=t=>e.check(WA(t)),e.safe=t=>e.check(WA(t)),e.positive=t=>e.check($O(0,t)),e.nonnegative=t=>e.check(ek(0,t)),e.negative=t=>e.check(ZO(0,t)),e.nonpositive=t=>e.check(QO(0,t)),e.multipleOf=(t,n)=>e.check(tk(t,n)),e.step=(t,n)=>e.check(tk(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function HA(e){return KO(VA,e)}var UA=K(`ZodNumberFormat`,(e,t)=>{PD.init(e,t),VA.init(e,t)});function WA(e){return qO(UA,e)}var GA=K(`ZodBoolean`,(e,t)=>{FD.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jk(e,t,n,r)});function KA(e){return JO(GA,e)}var qA=K(`ZodUnknown`,(e,t)=>{ID.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function JA(){return YO(qA)}var YA=K(`ZodNever`,(e,t)=>{LD.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mk(e,t,n,r)});function XA(e){return XO(YA,e)}var ZA=K(`ZodArray`,(e,t)=>{zD.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ik(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(rk(t,n)),e.nonempty=t=>e.check(rk(1,t)),e.max=(t,n)=>e.check(nk(t,n)),e.length=(t,n)=>e.check(ik(t,n)),e.unwrap=()=>e.element});function QA(e,t){return _k(ZA,e,t)}var $A=K(`ZodObject`,(e,t)=>{WD.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lk(e,t,n,r),hT(e,`shape`,()=>t.shape),e.keyof=()=>cj(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:JA()}),e.loose=()=>e.clone({...e._zod.def,catchall:JA()}),e.strict=()=>e.clone({...e._zod.def,catchall:XA()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>NT(e,t),e.safeExtend=t=>PT(e,t),e.merge=t=>FT(e,t),e.pick=t=>jT(e,t),e.omit=t=>MT(e,t),e.partial=(...t)=>IT(dj,e,t[0]),e.required=(...t)=>LT(xj,e,t[0])});function ej(e,t){return new $A({type:`object`,shape:e??{},...OT(t)})}var tj=K(`ZodUnion`,(e,t)=>{KD.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rk(e,t,n,r),e.options=t.options});function nj(e,t){return new tj({type:`union`,options:e,...OT(t)})}var rj=K(`ZodIntersection`,(e,t)=>{qD.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zk(e,t,n,r)});function ij(e,t){return new rj({type:`intersection`,left:e,right:t})}var aj=K(`ZodRecord`,(e,t)=>{XD.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bk(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function oj(e,t,n){return new aj({type:`record`,keyType:e,valueType:t,...OT(n)})}var sj=K(`ZodEnum`,(e,t)=>{ZD.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nk(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new sj({...t,checks:[],...OT(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new sj({...t,checks:[],...OT(r),entries:i})}});function cj(e,t){return new sj({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...OT(t)})}var lj=K(`ZodTransform`,(e,t)=>{QD.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fk(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new aT(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(UT(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(UT(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function uj(e){return new lj({type:`transform`,transform:e})}var dj=K(`ZodOptional`,(e,t)=>{eO.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fj(e){return new dj({type:`optional`,innerType:e})}var pj=K(`ZodExactOptional`,(e,t)=>{tO.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mj(e){return new pj({type:`optional`,innerType:e})}var hj=K(`ZodNullable`,(e,t)=>{nO.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gj(e){return new hj({type:`nullable`,innerType:e})}var _j=K(`ZodDefault`,(e,t)=>{rO.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function vj(e,t){return new _j({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():wT(t)}})}var yj=K(`ZodPrefault`,(e,t)=>{aO.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bj(e,t){return new yj({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():wT(t)}})}var xj=K(`ZodNonOptional`,(e,t)=>{oO.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Sj(e,t){return new xj({type:`nonoptional`,innerType:e,...OT(t)})}var Cj=K(`ZodCatch`,(e,t)=>{cO.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function wj(e,t){return new Cj({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Tj=K(`ZodPipe`,(e,t)=>{lO.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kk(e,t,n,r),e.in=t.in,e.out=t.out});function Ej(e,t){return new Tj({type:`pipe`,in:e,out:t})}var Dj=K(`ZodReadonly`,(e,t)=>{dO.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Oj(e){return new Dj({type:`readonly`,innerType:e})}var kj=K(`ZodCustom`,(e,t)=>{pO.init(e,t),_A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pk(e,t,n,r)});function Aj(e,t={}){return vk(kj,e,t)}function jj(e){return yk(e)}var Mj={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},Nj;(function(e){})(Nj||={}),ej({username:bA().min(1,`Username is required`).regex(/^[a-zA-Z0-9_-]+$/,`Must contain only letters, numbers, hyphens, and underscores`).describe(`The name the agent identifies itself with when communicating with other agents`),title:bA().describe(`Displayed to other agents to give context about this agent's role in the system`),agentPrompt:bA().min(1,`Agent prompt is required`).describe("Gives the agent instructions and/or purpose when starting up. Supports ${agent.*} and ${env.*} template variables"),spendLimitDollars:HA().min(0,`Must be non-negative`).optional().describe(`Spend limit in dollars for this agent. When set, this agent is exempt from the global spend limit. Defaults to the SPEND_LIMIT_DOLLARS variable`),spendLimitHours:HA().min(0,`Must be non-negative`).optional().describe(`Rolling time window in hours for spend limit, defaults to the SPEND_LIMIT_HOURS variable. If neither are set then the spend limit is fixed and not rolling`),tokenMax:HA().int(`Must be a whole number`).min(1,`Must be at least 1`).describe(`How many tokens this agent is allocated per session before it must end or compact the context`),shellModel:bA().min(1,`Shell model is required`).describe(`Primary LLM used for shell interactions`),imageModel:bA().optional().describe(`Model used for image generation`),mailEnabled:KA().optional().describe(`Show mail commands to the agent. Mail encourages verbose communication which can be distracting`),chatEnabled:KA().optional().describe(`Show chat commands to the agent. Chat encourages more concise communication`),webEnabled:KA().optional().describe(`Allow agent to browse the web with Lynx, a text based browser`),completeSessionEnabled:KA().optional().describe(`Allow the agent to end its session. Once ended, it can only be restarted explicitly or via mail if wakeOnMessage is enabled. Disable on root agents to prevent the system from going unresponsive`),debugPauseSeconds:HA().int(`Must be a whole number`).min(0,`Must be non-negative`).optional().describe(`Seconds to wait at the debug prompt before auto-continuing, only applies when the agent's console is in focus. Unset waits indefinitely for manual input`),wakeOnMessage:KA().optional().describe(`When mail or chat is received, start the agent automatically, or wake it from its wait state`),commandProtection:cj([`none`,`manual`,`semi-auto`,`auto`]).optional().describe(`None allows the LLM to run any command, Manual requires user confirmation for each command, and Auto uses a secondary LLM to try to validate a command is safe`),initialCommands:QA(bA()).optional().describe(`Shell commands to run at session start before the first LLM prompt, providing additional context to the agent`),multipleCommandsEnabled:KA().optional().describe(`Allow the LLM to run multiple commands per turn. Faster but the LLM may get ahead of itself and produce errors`),workspacesEnabled:KA().optional().describe(`Experimental: Allows the LLM to pin files to the end of the context. Each turn the agent sees the latest version without old versions taking up context space`),controlDesktop:KA().optional().describe(`Allow the agent to operate the desktop GUI. Requires a model with supportsComputerUse. Ideal screen resolution <= 1.1MP to avoid downscaling`)});var Pj;(function(e){e.OpenAI=`openai`,e.Google=`google`,e.Anthropic=`anthropic`,e.Mock=`mock`,e.None=`none`})(Pj||={});var Fj=ej({key:bA().min(1),label:bA().min(1),versionName:bA().min(1),apiType:cj(Pj),maxTokens:HA().int().positive(),baseUrl:bA().optional(),apiKeyVar:bA(),inputCost:HA().default(0),outputCost:HA().default(0),cacheWriteCost:HA().optional(),cacheReadCost:HA().optional(),cacheTtlSeconds:HA().int().positive().optional(),supportsVision:KA().optional(),supportsHearing:KA().optional(),supportsComputerUse:KA().optional()}).superRefine((e,t)=>{e.baseUrl&&![Pj.OpenAI,Pj.Anthropic,Pj.Google].includes(e.apiType)&&t.addIssue({code:Mj.custom,message:`baseUrl is only supported for OpenAI, Anthropic, and Google API types (got "${e.apiType}")`,path:[`baseUrl`]})}),Ij=ej({key:bA().min(1),label:bA().min(1),versionName:bA().min(1),size:bA().min(1),baseUrl:bA().optional(),apiKeyVar:bA(),cost:HA(),quality:cj([`standard`,`hd`,`high`,`medium`,`low`]).optional()});ej({llmModels:QA(Fj).optional(),imageModels:QA(Ij).optional()}),ej({apiType:cj(Pj),maxTokens:HA().int().positive(),baseUrl:bA().optional(),apiKeyVar:bA(),inputCost:HA().default(0),outputCost:HA().default(0),cacheWriteCost:HA().optional(),cacheReadCost:HA().optional(),cacheTtlSeconds:HA().int().positive().optional(),supportsVision:KA().optional(),supportsHearing:KA().optional(),supportsComputerUse:KA().optional()}),ej({size:bA().min(1),baseUrl:bA().optional(),apiKeyVar:bA(),cost:HA(),quality:cj([`standard`,`hd`,`high`,`medium`,`low`]).optional()}),Pj.None,Pj.None,Pj.None,Pj.Mock,Pj.Mock,Pj.Mock,Pj.OpenAI,Pj.OpenAI,Pj.OpenAI,Pj.OpenAI,Pj.OpenAI,Pj.OpenAI,Pj.Google,Pj.Google,Pj.Google,Pj.Anthropic,Pj.Anthropic,Pj.Anthropic;function Lj(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Rj(e,t,n){let r=e?.find(e=>e.rel===t);if(r&&!(r.disabled&&!n?.includeDisabled))return r}function zj(e,t){return e?.find(e=>e.rel===t)}function Bj(e){if(e)return Array.isArray(e)?e.join(`
|
|
102
|
+
`):e}var Vj=ej({rel:bA(),href:bA(),method:bA().optional(),title:bA().optional(),schema:bA().optional()}),Hj=ej({contentType:bA(),description:bA().optional(),fileFields:QA(bA())}),Uj=ej({rel:bA(),href:bA(),method:bA(),title:bA().optional(),schema:bA().optional(),body:oj(bA(),JA()).optional(),alternateEncoding:Hj.optional(),disabled:KA().optional(),disabledReason:nj([bA(),QA(bA())]).optional()}),Wj=ej({rel:bA(),hrefTemplate:bA(),method:bA(),title:bA().optional(),schema:bA().optional(),body:oj(bA(),JA()).optional(),alternateEncoding:Hj.optional()}),Gj=ej({rel:bA(),hrefTemplate:bA(),title:bA().optional()});ej({_links:QA(Vj),_actions:QA(Uj).optional()});var Kj=`/erp/assets/naisys-logo-CzoPnn5I.webp`,qj={outline:{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`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},Jj=(e,t,n,r)=>{let i=(0,v.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,v.createElement)(`svg`,{ref:u,...qj[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,v.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},Yj=Jj(`outline`,`alert-circle`,`AlertCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 8v4`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),Xj=Jj(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),Zj=Jj(`outline`,`api`,`Api`,[[`path`,{d:`M4 13h5`,key:`svg-0`}],[`path`,{d:`M12 16v-8h3a2 2 0 0 1 2 2v1a2 2 0 0 1 -2 2h-3`,key:`svg-1`}],[`path`,{d:`M20 8v8`,key:`svg-2`}],[`path`,{d:`M9 16v-5.5a2.5 2.5 0 0 0 -5 0v5.5`,key:`svg-3`}]]),Qj=Jj(`outline`,`arrow-back-up`,`ArrowBackUp`,[[`path`,{d:`M9 14l-4 -4l4 -4`,key:`svg-0`}],[`path`,{d:`M5 10h11a4 4 0 1 1 0 8h-1`,key:`svg-1`}]]),$j=Jj(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),eM=Jj(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),tM=Jj(`outline`,`eye`,`Eye`,[[`path`,{d:`M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`,key:`svg-0`}],[`path`,{d:`M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6`,key:`svg-1`}]]),nM=Jj(`outline`,`file`,`File`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}]]),rM=Jj(`outline`,`info-circle`,`InfoCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 9h.01`,key:`svg-1`}],[`path`,{d:`M11 12h1v4h1`,key:`svg-2`}]]),iM=Jj(`outline`,`layout-sidebar-left-collapse`,`LayoutSidebarLeftCollapse`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M9 4v16`,key:`svg-1`}],[`path`,{d:`M15 10l-2 2l2 2`,key:`svg-2`}]]),aM=Jj(`outline`,`layout-sidebar-left-expand`,`LayoutSidebarLeftExpand`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M9 4v16`,key:`svg-1`}],[`path`,{d:`M14 10l2 2l-2 2`,key:`svg-2`}]]),oM=Jj(`outline`,`list-details`,`ListDetails`,[[`path`,{d:`M13 5h8`,key:`svg-0`}],[`path`,{d:`M13 9h5`,key:`svg-1`}],[`path`,{d:`M13 15h8`,key:`svg-2`}],[`path`,{d:`M13 19h5`,key:`svg-3`}],[`path`,{d:`M3 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4`,key:`svg-4`}],[`path`,{d:`M3 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4`,key:`svg-5`}]]),sM=Jj(`outline`,`logout`,`Logout`,[[`path`,{d:`M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M9 12h12l-3 -3`,key:`svg-1`}],[`path`,{d:`M18 15l3 -3`,key:`svg-2`}]]),cM=Jj(`outline`,`note`,`Note`,[[`path`,{d:`M13 20l7 -7`,key:`svg-0`}],[`path`,{d:`M13 20v-6a1 1 0 0 1 1 -1h6v-7a2 2 0 0 0 -2 -2h-12a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7`,key:`svg-1`}]]),lM=Jj(`outline`,`plus`,`Plus`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M5 12l14 0`,key:`svg-1`}]]),uM=Jj(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),dM=Jj(`outline`,`upload`,`Upload`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 9l5 -5l5 5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),fM=Jj(`outline`,`user`,`User`,[[`path`,{d:`M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0`,key:`svg-0`}],[`path`,{d:`M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2`,key:`svg-1`}]]),pM=Jj(`outline`,`x`,`X`,[[`path`,{d:`M18 6l-12 12`,key:`svg-0`}],[`path`,{d:`M6 6l12 12`,key:`svg-1`}]]),mM=`/api/erp`,hM=class extends Error{statusCode;error;constructor(e,t,n){super(n),this.name=`ApiError`,this.statusCode=e,this.error=t}};function gM(e){let t=e instanceof Error?e.message:`An unexpected error occurred`;_x.show({title:`Error`,message:t,color:`red`,autoClose:5e3})}async function _M(e,t){let n=e.startsWith(`/`)?e:`${mM}/${e}`,r={...t?.headers};t?.body&&(r[`Content-Type`]=`application/json`);let i=await fetch(n,{...t,credentials:`include`,headers:r});if(i.status===204)return;i.status===401&&window.dispatchEvent(new CustomEvent(`erp:unauthorized`));let a=await i.json();if(!i.ok)throw new hM(a.statusCode??i.status,a.error??`Error`,a.message||`Request failed: ${i.status}`);return a}var q={get:e=>_M(e),post:(e,t)=>_M(e,{method:`POST`,body:JSON.stringify(t),headers:{Prefer:`return=representation`}}),put:(e,t)=>_M(e,{method:`PUT`,body:JSON.stringify(t),headers:{Prefer:`return=representation`}}),delete:e=>_M(e,{method:`DELETE`,headers:{Prefer:`return=representation`}}),upload:(e,t,n)=>{let r=new FormData;if(r.append(`file`,t),n)for(let[e,t]of Object.entries(n))r.append(e,t);let i=e.startsWith(`/`)?e:`${mM}/${e}`;return fetch(i,{method:`POST`,credentials:`include`,body:r}).then(async e=>{e.status===401&&window.dispatchEvent(new CustomEvent(`erp:unauthorized`));let t=await e.json();if(!e.ok)throw new hM(t.statusCode??e.status,t.error??`Error`,t.message||`Upload failed: ${e.status}`);return t})}},J={dispatch:`dispatch`,inventory:`inventory`,items:`items`,item:e=>`items/${e}`,itemFields:e=>`items/${e}/fields`,itemField:(e,t)=>`items/${e}/fields/${t}`,itemInstances:e=>`items/${e}/instances`,itemInstance:(e,t)=>`items/${e}/instances/${t}`,itemInstanceFieldValue:(e,t,n)=>`items/${e}/instances/${t}/fields/${n}`,itemInstanceDeleteSet:(e,t,n)=>`items/${e}/instances/${t}/sets/${n}`,orders:`orders`,order:e=>`orders/${e}`,orderRevs:e=>`orders/${e}/revs`,orderRev:(e,t)=>`orders/${e}/revs/${t}`,orderRevDiff:(e,t,n)=>`orders/${e}/revs/diff?from=${t}&to=${n}`,orderRevApprove:(e,t)=>`orders/${e}/revs/${t}/approve`,orderRevObsolete:(e,t)=>`orders/${e}/revs/${t}/obsolete`,orderRevOps:(e,t)=>`orders/${e}/revs/${t}/ops`,orderRevOp:(e,t,n)=>`orders/${e}/revs/${t}/ops/${n}`,orderRevOpSteps:(e,t,n)=>`orders/${e}/revs/${t}/ops/${n}/steps`,orderRevOpStep:(e,t,n,r)=>`orders/${e}/revs/${t}/ops/${n}/steps/${r}`,orderRevOpStepFields:(e,t,n,r)=>`orders/${e}/revs/${t}/ops/${n}/steps/${r}/fields`,orderRevOpStepField:(e,t,n,r,i)=>`orders/${e}/revs/${t}/ops/${n}/steps/${r}/fields/${i}`,orderRevOpFieldRefs:(e,t,n)=>`orders/${e}/revs/${t}/ops/${n}/field-refs`,orderRevOpFieldRef:(e,t,n,r)=>`orders/${e}/revs/${t}/ops/${n}/field-refs/${r}`,orderRevOpFieldRefAvailable:(e,t,n)=>`orders/${e}/revs/${t}/ops/${n}/field-refs/available`,orderRevOpDeps:(e,t,n)=>`orders/${e}/revs/${t}/ops/${n}/deps`,orderRevOpDep:(e,t,n,r)=>`orders/${e}/revs/${t}/ops/${n}/deps/${r}`,orderRuns:e=>`orders/${e}/runs`,orderRun:(e,t)=>`orders/${e}/runs/${t}`,orderRunStart:(e,t)=>`orders/${e}/runs/${t}/start`,orderRunClose:(e,t)=>`orders/${e}/runs/${t}/close`,orderRunCancel:(e,t)=>`orders/${e}/runs/${t}/cancel`,orderRunComplete:(e,t)=>`orders/${e}/runs/${t}/complete`,orderRunReopen:(e,t)=>`orders/${e}/runs/${t}/reopen`,users:`users`,user:e=>`users/${e}`,userPermissions:e=>`users/${e}/permissions`,userPermission:(e,t)=>`users/${e}/permissions/${t}`,operationRuns:(e,t)=>`orders/${e}/runs/${t}/ops`,operationRun:(e,t,n)=>`orders/${e}/runs/${t}/ops/${n}`,operationRunStart:(e,t,n)=>`orders/${e}/runs/${t}/ops/${n}/start`,operationRunComplete:(e,t,n)=>`orders/${e}/runs/${t}/ops/${n}/complete`,operationRunSkip:(e,t,n)=>`orders/${e}/runs/${t}/ops/${n}/skip`,operationRunFail:(e,t,n)=>`orders/${e}/runs/${t}/ops/${n}/fail`,operationRunReopen:(e,t,n)=>`orders/${e}/runs/${t}/ops/${n}/reopen`,stepRuns:(e,t,n,r)=>`orders/${e}/runs/${t}/ops/${n}/steps${r?`?includeFields=true`:``}`,stepRun:(e,t,n,r)=>`orders/${e}/runs/${t}/ops/${n}/steps/${r}`,stepRunComplete:(e,t,n,r)=>`orders/${e}/runs/${t}/ops/${n}/steps/${r}/complete`,stepRunReopen:(e,t,n,r)=>`orders/${e}/runs/${t}/ops/${n}/steps/${r}/reopen`,stepRunFieldValue:(e,t,n,r,i)=>`orders/${e}/runs/${t}/ops/${n}/steps/${r}/fields/${i}`,stepRunSetFieldValue:(e,t,n,r,i,a)=>`orders/${e}/runs/${t}/ops/${n}/steps/${r}/sets/${i}/fields/${a}`,stepRunDeleteSet:(e,t,n,r,i)=>`orders/${e}/runs/${t}/ops/${n}/steps/${r}/sets/${i}`,stepFieldAttachments:(e,t,n,r,i)=>`orders/${e}/runs/${t}/ops/${n}/steps/${r}/fields/${i}/attachments`,stepFieldSetAttachments:(e,t,n,r,i,a)=>`orders/${e}/runs/${t}/ops/${n}/steps/${r}/sets/${i}/fields/${a}/attachments`,stepFieldAttachmentDownload:(e,t,n,r,i,a)=>`orders/${e}/runs/${t}/ops/${n}/steps/${r}/fields/${i}/attachments/${a}`,laborTickets:(e,t,n)=>`orders/${e}/runs/${t}/ops/${n}/labor`,laborTicketClockIn:(e,t,n)=>`orders/${e}/runs/${t}/ops/${n}/labor/clock-in`,laborTicketClockOut:(e,t,n)=>`orders/${e}/runs/${t}/ops/${n}/labor/clock-out`,laborTicket:(e,t,n,r)=>`orders/${e}/runs/${t}/ops/${n}/labor/${r}`,operationRunComments:(e,t,n)=>`orders/${e}/runs/${t}/ops/${n}/comments`,workCenters:`work-centers`,workCenter:e=>`work-centers/${e}`,workCenterUsers:e=>`work-centers/${e}/users`,workCenterUser:(e,t)=>`work-centers/${e}/users/${t}`,usersFromAgent:`users/from-agent`,userRotateKey:e=>`users/${e}/rotate-key`,changePassword:`users/me/password`,audit:(e,t)=>`audit?entityType=${e}&entityId=${t}`,admin:`admin`,adminAttachments:`admin/attachments`,adminAttachmentDownload:e=>`/api/erp/admin/attachments/${e}`,adminLogs:(e,t)=>{let n=new URLSearchParams;e!=null&&n.set(`lines`,String(e)),t!=null&&n.set(`minLevel`,String(t));let r=n.toString();return`admin/logs${r?`?${r}`:``}`}},vM={login:(e,t)=>q.post(`/api/erp/auth/login`,{username:e,password:t}),logout:()=>q.post(`/api/erp/auth/logout`,{}),me:()=>q.get(`/api/erp/auth/me`)},yM=(0,v.createContext)(null),bM=({children:e})=>{let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(!0);(0,v.useEffect)(()=>{vM.me().then(n).catch(()=>n(null)).finally(()=>i(!1))},[]),(0,v.useEffect)(()=>{let e=()=>n(null);return window.addEventListener(`erp:unauthorized`,e),()=>window.removeEventListener(`erp:unauthorized`,e)},[]);let a=(0,v.useCallback)(async(e,t)=>{n((await vM.login(e,t)).user)},[]),o=(0,v.useCallback)(async()=>{await vM.logout(),n(null)},[]);return(0,I.jsx)(yM.Provider,{value:{user:t,loading:r,login:a,logout:o},children:e})};function xM(){let e=(0,v.useContext)(yM);if(!e)throw Error(`useAuth must be used within AuthProvider`);return e}function SM(e){if(!/^[0-9a-zA-Z-]+$/.test(e))throw Error(`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`)}var CM=typeof window<`u`?v.useLayoutEffect:v.useEffect;function wM(e,t){CM(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function TM(e,t){e&&SM(e),wM(`mantine-form:${e}:set-field-value`,e=>t.setFieldValue(e.detail.path,e.detail.value)),wM(`mantine-form:${e}:set-values`,e=>t.setValues(e.detail)),wM(`mantine-form:${e}:set-initial-values`,e=>t.setInitialValues(e.detail)),wM(`mantine-form:${e}:set-errors`,e=>t.setErrors(e.detail)),wM(`mantine-form:${e}:set-field-error`,e=>t.setFieldError(e.detail.path,e.detail.error)),wM(`mantine-form:${e}:clear-field-error`,e=>t.clearFieldError(e.detail)),wM(`mantine-form:${e}:clear-errors`,t.clearErrors),wM(`mantine-form:${e}:reset`,t.reset),wM(`mantine-form:${e}:validate`,t.validate),wM(`mantine-form:${e}:validate-field`,e=>t.validateField(e.detail)),wM(`mantine-form:${e}:reorder-list-item`,e=>t.reorderListItem(e.detail.path,e.detail.payload)),wM(`mantine-form:${e}:remove-list-item`,e=>t.removeListItem(e.detail.path,e.detail.index)),wM(`mantine-form:${e}:insert-list-item`,e=>t.insertListItem(e.detail.path,e.detail.item,e.detail.index)),wM(`mantine-form:${e}:set-dirty`,e=>t.setDirty(e.detail)),wM(`mantine-form:${e}:set-touched`,e=>t.setTouched(e.detail)),wM(`mantine-form:${e}:reset-dirty`,e=>t.resetDirty(e.detail)),wM(`mantine-form:${e}:reset-touched`,t.resetTouched)}function EM(e){return t=>{if(!t)e(t);else if(typeof t==`function`)e(t);else if(typeof t==`object`&&`nativeEvent`in t){let{currentTarget:n}=t;n instanceof HTMLInputElement?n.type===`checkbox`?e(n.checked):e(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&e(n.value)}else e(t)}}function DM(e){return typeof e!=`object`||!e?{}:Object.keys(e).reduce((t,n)=>{let r=e[n];return r!=null&&r!==!1&&(t[n]=r),t},{})}function OM(e){let[t,n]=(0,v.useState)(DM(e)),r=(0,v.useRef)(t),i=(0,v.useCallback)(e=>{n(t=>{let n=DM(typeof e==`function`?e(t):e);return r.current=n,n})},[]),a=(0,v.useCallback)(()=>i({}),[]),o=(0,v.useCallback)(e=>{r.current[e]!==void 0&&i(t=>{let n={...t};return delete n[e],n})},[t]);return{errorsState:t,setErrors:i,clearErrors:a,setFieldError:(0,v.useCallback)((e,t)=>{t==null||t===!1?o(e):r.current[e]!==t&&i(n=>({...n,[e]:t}))},[t]),clearFieldError:o}}function kM(e,t){if(typeof t!=`object`||!t)return{};let n={...t};return Object.keys(t).forEach(t=>{t.includes(`${String(e)}.`)&&delete n[t]}),n}function AM(e,t){let n=e.substring(t.length+1).split(`.`)[0];return parseInt(n,10)}function jM(e,t,n,r){if(t===void 0)return n;let i=`${String(e)}`,a=n;r===-1&&(a=kM(`${i}.${t}`,a));let o={...a},s=new Set;return Object.entries(a).filter(([e])=>{if(!e.startsWith(`${i}.`))return!1;let n=AM(e,i);return Number.isNaN(n)?!1:n>=t}).forEach(([e,t])=>{let n=AM(e,i),a=e.replace(`${i}.${n}`,`${i}.${n+r}`);o[a]=t,s.add(a),s.has(e)||delete o[e]}),o}function MM(e,{from:t,to:n},r){let i=`${e}.${t}`,a=`${e}.${n}`,o={...r},s=new Set;return Object.keys(r).forEach(e=>{if(s.has(e))return;let t,n;if(e.startsWith(i)?(t=e,n=e.replace(i,a)):e.startsWith(a)&&(t=e.replace(a,i),n=e),t&&n){let e=o[t],r=o[n];r===void 0?delete o[t]:o[t]=r,e===void 0?delete o[n]:o[n]=e,s.add(t),s.add(n)}}),o}function NM(e,t,n){typeof n.value==`object`&&(n.value=PM(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t===`__proto__`?Object.defineProperty(e,t,n):e[t]=n.value}function PM(e){if(typeof e!=`object`)return e;var t=0,n,r,i,a=Object.prototype.toString.call(e);if(a===`[object Object]`?i=Object.create(e.__proto__||null):a===`[object Array]`?i=Array(e.length):a===`[object Set]`?(i=new Set,e.forEach(function(e){i.add(PM(e))})):a===`[object Map]`?(i=new Map,e.forEach(function(e,t){i.set(PM(t),PM(e))})):a===`[object Date]`?i=new Date(+e):a===`[object RegExp]`?i=new RegExp(e.source,e.flags):a===`[object DataView]`?i=new e.constructor(PM(e.buffer)):a===`[object ArrayBuffer]`?i=e.slice(0):a.slice(-6)===`Array]`&&(i=new e.constructor(e)),i){for(r=Object.getOwnPropertySymbols(e);t<r.length;t++)NM(i,r[t],Object.getOwnPropertyDescriptor(e,r[t]));for(t=0,r=Object.getOwnPropertyNames(e);t<r.length;t++)Object.hasOwnProperty.call(i,n=r[t])&&i[n]===e[n]||NM(i,n,Object.getOwnPropertyDescriptor(e,n))}return i||e}function FM(e){return typeof e==`string`?e.split(`.`):[]}function IM(e,t){let n=FM(e);if(n.length===0||typeof t!=`object`||!t)return;let r=t[n[0]];for(let e=1;e<n.length&&r!=null;e+=1)r=r[n[e]];return r}function LM(e,t,n){let r=FM(e);if(r.length===0)return n;let i=PM(n);if(r.length===1)return i[r[0]]=t,i;let a=i[r[0]];for(let e=1;e<r.length-1;e+=1){if(a===void 0)return i;a=a[r[e]]}return a[r[r.length-1]]=t,i}function RM(e,{from:t,to:n},r){let i=IM(e,r);if(!Array.isArray(i))return r;let a=[...i],o=i[t];return a.splice(t,1),a.splice(n,0,o),LM(e,a,r)}function zM(e,t,n,r){let i=IM(e,r);if(!Array.isArray(i))return r;let a=[...i];return a.splice(typeof n==`number`?n:a.length,0,t),LM(e,a,r)}function BM(e,t,n){let r=IM(e,n);return Array.isArray(r)?LM(e,r.filter((e,n)=>n!==t),n):n}function VM(e,t,n,r){let i=IM(e,r);if(!Array.isArray(i)||i.length<=n)return r;let a=[...i];return a[n]=t,LM(e,a,r)}function HM({$values:e,$errors:t,$status:n}){return{reorderListItem:(0,v.useCallback)((r,i)=>{n.clearFieldDirty(r),t.setErrors(e=>MM(r,i,e)),e.setValues({values:RM(r,i,e.refValues.current),updateState:!0})},[]),removeListItem:(0,v.useCallback)((r,i)=>{n.clearFieldDirty(r),t.setErrors(e=>jM(r,i,e,-1)),e.setValues({values:BM(r,i,e.refValues.current),updateState:!0})},[]),insertListItem:(0,v.useCallback)((r,i,a)=>{n.clearFieldDirty(r),t.setErrors(e=>jM(r,a,e,1)),e.setValues({values:zM(r,i,a,e.refValues.current),updateState:!0})},[]),replaceListItem:(0,v.useCallback)((t,r,i)=>{n.clearFieldDirty(t),e.setValues({values:VM(t,i,r,e.refValues.current),updateState:!0})},[])}}var UM=o(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}));function WM(e,t){let n=Object.keys(e);if(typeof t==`string`){let r=n.filter(e=>e.startsWith(`${t}.`));return e[t]||r.some(t=>e[t])||!1}return n.some(t=>e[t])}var GM=l(UM(),1);function KM({initialDirty:e,initialTouched:t,mode:n,$values:r}){let[i,a]=(0,v.useState)(t),[o,s]=(0,v.useState)(e),c=(0,v.useRef)(t),l=(0,v.useRef)(e),u=(0,v.useCallback)(e=>{let t=typeof e==`function`?e(c.current):e;c.current=t,n===`controlled`&&a(t)},[]),d=(0,v.useCallback)((e,t=!1)=>{let r=typeof e==`function`?e(l.current):e;l.current=r,(n===`controlled`||t)&&s(r)},[]),f=(0,v.useCallback)(()=>u({}),[]),p=(0,v.useCallback)(e=>{let t=e?{...r.refValues.current,...e}:r.refValues.current;r.setValuesSnapshot(t),d({})},[]),m=(0,v.useCallback)((e,t)=>{u(n=>WM(n,e)===t?n:{...n,[e]:t})},[]),h=(0,v.useCallback)((e,t,n)=>{d(n=>WM(n,e)===t?n:{...n,[e]:t},n)},[]),g=(0,v.useCallback)((e,t)=>{let n=WM(l.current,e),i=!(0,GM.default)(IM(e,r.getValuesSnapshot()),t),a=kM(e,l.current);a[e]=i,d(a,n!==i)},[]);return{touchedState:i,dirtyState:o,touchedRef:c,dirtyRef:l,setTouched:u,setDirty:d,resetDirty:p,resetTouched:f,isTouched:(0,v.useCallback)(e=>WM(c.current,e),[]),setFieldTouched:m,setFieldDirty:h,setTouchedState:a,setDirtyState:s,clearFieldDirty:(0,v.useCallback)(e=>d(t=>{if(typeof e!=`string`)return t;let n=kM(e,t);return delete n[e],(0,GM.default)(n,t)?t:n}),[]),isDirty:(0,v.useCallback)(e=>{if(e){let t=IM(e,l.current);return typeof t==`boolean`?t:!(0,GM.default)(IM(e,r.refValues.current),IM(e,r.valuesSnapshot.current))}return Object.keys(l.current).length>0?WM(l.current):!(0,GM.default)(r.refValues.current,r.valuesSnapshot.current)},[]),getDirty:(0,v.useCallback)(()=>l.current,[]),getTouched:(0,v.useCallback)(()=>c.current,[]),setCalculatedFieldDirty:g}}function qM({initialValues:e,onValuesChange:t,mode:n}){let r=(0,v.useRef)(!1),[i,a]=(0,v.useState)(e||{}),o=(0,v.useRef)(i),s=(0,v.useRef)(i),c=(0,v.useCallback)(({values:e,subscribers:r,updateState:i=!0,mergeWithPreviousValues:s=!0})=>{let c=o.current,l=e instanceof Function?e(o.current):e,u=s?{...c,...l}:l;o.current=u,i&&(a(u),n===`uncontrolled`&&(o.current=u)),t?.(u,c),r?.filter(Boolean).forEach(e=>e({updatedValues:u,previousValues:c}))},[t]),l=(0,v.useCallback)(e=>{let t=IM(e.path,o.current),n=e.value instanceof Function?e.value(t):e.value;if(t!==n){let t=o.current,r=LM(e.path,n,o.current);c({values:r,updateState:e.updateState}),e.subscribers?.filter(Boolean).forEach(n=>n({path:e.path,updatedValues:r,previousValues:t}))}},[c]),u=(0,v.useCallback)(e=>{s.current=e},[]),d=(0,v.useCallback)((e,t)=>{r.current||(r.current=!0,c({values:e,updateState:n===`controlled`}),u(e),t())},[c]);return{initialized:r,stateValues:i,refValues:o,valuesSnapshot:s,setValues:c,setFieldValue:l,resetValues:(0,v.useCallback)(()=>{c({values:s.current,updateState:!0,mergeWithPreviousValues:!1})},[c]),setValuesSnapshot:u,initialize:d,getValues:(0,v.useCallback)(()=>o.current,[]),getValuesSnapshot:(0,v.useCallback)(()=>s.current,[]),resetField:(0,v.useCallback)((e,t)=>{let r=IM(e,s.current);r!==void 0&&l({path:e,value:r,updateState:n===`controlled`,subscribers:t})},[l,n])}}function JM({$status:e,cascadeUpdates:t}){let n=(0,v.useRef)({});return{subscribers:n,watch:(0,v.useCallback)((e,t)=>{(0,v.useEffect)(()=>(n.current[e]=n.current[e]||[],n.current[e].push(t),()=>{n.current[e]=n.current[e].filter(e=>e!==t)}),[t])},[]),getFieldSubscribers:(0,v.useCallback)(r=>{let i=n.current[r]?.map(t=>n=>t({previousValue:IM(r,n.previousValues),value:IM(r,n.updatedValues),touched:e.isTouched(r),dirty:e.isDirty(r)}))??[];if(t)for(let t in n.current)(t.startsWith(`${r}.`)||r.startsWith(`${t}.`))&&i.push(...n.current[t].map(n=>r=>n({previousValue:IM(t,r.previousValues),value:IM(t,r.updatedValues),touched:e.isTouched(t),dirty:e.isDirty(t)})));return i},[])}}function YM(e,t){return e?`${e}-${t.toString()}`:t.toString()}var XM=Symbol(`root-rule`);function ZM(e){let t=DM(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function QM(e,t,n=``,r={}){return typeof e!=`object`||!e?r:Object.keys(e).reduce((r,i)=>{let a=e[i],o=`${n===``?``:`${n}.`}${i}`,s=IM(o,t),c=!1;return typeof a==`function`&&(r[o]=a(s,t,o)),typeof a==`object`&&Array.isArray(s)&&(c=!0,s.forEach((e,n)=>QM(a,t,`${o}.${n}`,r)),XM in a&&(r[o]=a[XM](s,t,o))),typeof a==`object`&&typeof s==`object`&&s&&(c||QM(a,t,o,r),XM in a&&(r[o]=a[XM](s,t,o))),r},r)}function $M(e,t){return ZM(typeof e==`function`?e(t):QM(e,t))}function eN(e,t,n){if(typeof e!=`string`)return{hasError:!1,error:null};let r=$M(t,n),i=Object.keys(r.errors).find(t=>e.split(`.`).every((e,n)=>e===t.split(`.`)[n]));return{hasError:!!i,error:i?r.errors[i]:null}}var tN=`__MANTINE_FORM_INDEX__`;function nN(e,t){return t?typeof t==`boolean`?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${tN}`)):!1:!1}function rN({name:e,mode:t=`controlled`,initialValues:n,initialErrors:r={},initialDirty:i={},initialTouched:a={},clearInputErrorOnChange:o=!0,validateInputOnChange:s=!1,validateInputOnBlur:c=!1,onValuesChange:l,transformValues:u=(e=>e),enhanceGetInputProps:d,validate:f,onSubmitPreventDefault:p=`always`,touchTrigger:m=`change`,cascadeUpdates:h=!1}={}){let g=OM(r),_=qM({initialValues:n,onValuesChange:l,mode:t}),y=KM({initialDirty:i,initialTouched:a,$values:_,mode:t}),b=HM({$values:_,$errors:g,$status:y}),x=JM({$status:y,cascadeUpdates:h}),[S,C]=(0,v.useState)(0),[w,T]=(0,v.useState)({}),[E,D]=(0,v.useState)(!1),O=(0,v.useCallback)(()=>{_.resetValues(),g.clearErrors(),y.resetDirty(),y.resetTouched(),t===`uncontrolled`&&C(e=>e+1)},[]),k=(0,v.useCallback)(e=>{o&&g.clearErrors(),t===`uncontrolled`&&C(e=>e+1),Object.keys(x.subscribers.current).forEach(t=>{IM(t,_.refValues.current)!==IM(t,e)&&x.getFieldSubscribers(t).forEach(t=>t({previousValues:e,updatedValues:_.refValues.current}))})},[o]),A=(0,v.useCallback)(e=>{let n=_.refValues.current;_.initialize(e,()=>t===`uncontrolled`&&C(e=>e+1)),k(n)},[k]),j=(0,v.useCallback)((e,n,r)=>{let i=nN(e,s),a=n instanceof Function?n(IM(e,_.refValues.current)):n;y.setCalculatedFieldDirty(e,a),m===`change`&&y.setFieldTouched(e,!0),!i&&o&&g.clearFieldError(e),_.setFieldValue({path:e,value:n,updateState:t===`controlled`,subscribers:[...x.getFieldSubscribers(e),i?t=>{let n=eN(e,f,t.updatedValues);n.hasError?g.setFieldError(e,n.error):g.clearFieldError(e)}:null,r?.forceUpdate!==!1&&t!==`controlled`?()=>T(t=>({...t,[e]:(t[e]||0)+1})):null]})},[l,f]),ee=(0,v.useCallback)(e=>{let n=_.refValues.current;_.setValues({values:e,updateState:t===`controlled`}),k(n)},[l,k]),te=(0,v.useCallback)(()=>{let e=$M(f,_.refValues.current);return g.setErrors(e.errors),e},[f]),ne=(0,v.useCallback)(e=>{let t=eN(e,f,_.refValues.current);return t.hasError?g.setFieldError(e,t.error):g.clearFieldError(e),t},[f]),re=(n,{type:r=`input`,withError:i=!0,withFocus:a=!0,...o}={})=>{let s={onChange:EM(e=>j(n,e,{forceUpdate:!1})),"data-path":YM(e,n)};return i&&(s.error=g.errorsState[n]),r===`checkbox`?s[t===`controlled`?`checked`:`defaultChecked`]=IM(n,_.refValues.current):s[t===`controlled`?`value`:`defaultValue`]=IM(n,_.refValues.current),a&&(s.onFocus=()=>y.setFieldTouched(n,!0),s.onBlur=()=>{if(nN(n,c)){let e=eN(n,f,_.refValues.current);e.hasError?g.setFieldError(n,e.error):g.clearFieldError(n)}}),Object.assign(s,d?.({inputProps:s,field:n,options:{type:r,withError:i,withFocus:a,...o},form:le}))},M=(e,t)=>n=>{p===`always`&&n?.preventDefault();let r=te();if(r.hasErrors)p===`validation-failed`&&n?.preventDefault(),t?.(r.errors,_.refValues.current,n);else{let t=e?.(u(_.refValues.current),n);t instanceof Promise&&(D(!0),t.finally(()=>D(!1)))}},N=e=>u(e||_.refValues.current),ie=(0,v.useCallback)(e=>{e.preventDefault(),O()},[]),ae=(0,v.useCallback)(e=>e?!eN(e,f,_.refValues.current).hasError:!$M(f,_.refValues.current).hasErrors,[f]),oe=e=>`${S}-${String(e)}-${w[String(e)]||0}`,se=(0,v.useCallback)(t=>document.querySelector(`[data-path="${YM(e,t)}"]`),[]),ce=(0,v.useCallback)(e=>{_.resetField(e,[t===`controlled`?null:()=>T(t=>({...t,[e]:(t[e]||0)+1}))])},[_.resetField,t,T]),le={watch:x.watch,initialized:_.initialized.current,values:t===`uncontrolled`?_.refValues.current:_.stateValues,getValues:_.getValues,getInitialValues:_.getValuesSnapshot,setInitialValues:_.setValuesSnapshot,resetField:ce,initialize:A,setValues:ee,setFieldValue:j,submitting:E,setSubmitting:D,errors:g.errorsState,setErrors:g.setErrors,setFieldError:g.setFieldError,clearFieldError:g.clearFieldError,clearErrors:g.clearErrors,resetDirty:y.resetDirty,setTouched:y.setTouched,setDirty:y.setDirty,isTouched:y.isTouched,resetTouched:y.resetTouched,isDirty:y.isDirty,getTouched:y.getTouched,getDirty:y.getDirty,reorderListItem:b.reorderListItem,insertListItem:b.insertListItem,removeListItem:b.removeListItem,replaceListItem:b.replaceListItem,reset:O,validate:te,validateField:ne,getInputProps:re,onSubmit:M,onReset:ie,isValid:ae,getTransformedValues:N,key:oe,getInputNode:se};return TM(e,le),le}function iN({actions:e,rel:t,onClick:n,...r}){let i=Rj(e,t,{includeDisabled:!0});if(!i)return null;let a=(0,I.jsx)(H,{...r,disabled:i.disabled,onClick:i.disabled?void 0:n}),o=Bj(i.disabledReason);return o?(0,I.jsx)(M_,{label:o,multiline:!0,maw:350,style:{whiteSpace:`pre-line`},children:a}):a}var aN={outline:{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`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},oN=(e,t,n,r)=>{let i=(0,v.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,v.createElement)(`svg`,{ref:u,...aN[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,v.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},sN=oN(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),cN=oN(`outline`,`download`,`Download`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 11l5 5l5 -5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),lN=oN(`outline`,`eye-off`,`EyeOff`,[[`path`,{d:`M10.585 10.587a2 2 0 0 0 2.829 2.828`,key:`svg-0`}],[`path`,{d:`M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87`,key:`svg-1`}],[`path`,{d:`M3 3l18 18`,key:`svg-2`}]]),uN=oN(`outline`,`eye`,`Eye`,[[`path`,{d:`M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`,key:`svg-0`}],[`path`,{d:`M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6`,key:`svg-1`}]]),dN=oN(`outline`,`refresh`,`Refresh`,[[`path`,{d:`M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4`,key:`svg-0`}],[`path`,{d:`M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4`,key:`svg-1`}]]),fN=50,pN=({fetchAttachments:e,getDownloadUrl:t,extraColumns:n})=>{let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(1),l=(0,v.useCallback)(async()=>{o(!0);try{i(await e(s,fN))}catch{i(null)}finally{o(!1)}},[s,e]);(0,v.useEffect)(()=>{l()},[l]);let u=(e,n)=>{let r=document.createElement(`a`);r.href=t(e),r.download=n,r.click()},d=r?Math.ceil(r.total/r.pageSize):0;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(zv,{order:3,mt:`xl`,children:`Attachments`}),(0,I.jsxs)(B,{children:[(0,I.jsx)(H,{size:`xs`,variant:`light`,leftSection:(0,I.jsx)(dN,{size:14}),onClick:()=>l(),loading:a,children:`Refresh`}),r&&(0,I.jsxs)(V,{size:`sm`,c:`dimmed`,children:[r.total,` file`,r.total!==1&&`s`]})]}),a&&!r?(0,I.jsx)(U,{align:`center`,py:`md`,children:(0,I.jsx)(uu,{size:`sm`})}):r&&r.attachments.length>0?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(W,{striped:!0,highlightOnHover:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Filename`}),(0,I.jsx)(W.Th,{children:`Size`}),n?.map(e=>(0,I.jsx)(W.Th,{children:e.header},e.header)),(0,I.jsx)(W.Th,{children:`Uploaded By`}),(0,I.jsx)(W.Th,{children:`Date`}),(0,I.jsx)(W.Th,{})]})}),(0,I.jsx)(W.Tbody,{children:r.attachments.map(e=>(0,I.jsxs)(W.Tr,{style:{cursor:`pointer`},onClick:()=>u(e.id,e.filename),children:[(0,I.jsx)(W.Td,{children:e.filename}),(0,I.jsx)(W.Td,{children:Lj(e.fileSize)}),n?.map(t=>(0,I.jsx)(W.Td,{children:t.render(e)},t.header)),(0,I.jsx)(W.Td,{children:e.uploadedBy}),(0,I.jsx)(W.Td,{children:new Date(e.createdAt).toLocaleString()}),(0,I.jsx)(W.Td,{children:(0,I.jsx)(cN,{size:16})})]},e.id))})]}),d>1&&(0,I.jsx)(B,{justify:`center`,mt:`md`,children:(0,I.jsx)(u_,{total:d,value:s,onChange:c})})]}):(0,I.jsx)(V,{c:`dimmed`,ta:`center`,py:`md`,children:`No attachments found`})]})};function mN(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var hN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_N={};function vN(e,t){return((t||_N).jsx?gN:hN).test(e)}var yN=/[ \t\n\f\r]/g;function bN(e){return typeof e==`object`?e.type===`text`?xN(e.value):!1:xN(e)}function xN(e){return e.replace(yN,``)===``}var SN=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};SN.prototype.normal={},SN.prototype.property={},SN.prototype.space=void 0;function CN(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new SN(n,r,t)}function wN(e){return e.toLowerCase()}var TN=class{constructor(e,t){this.attribute=t,this.property=e}};TN.prototype.attribute=``,TN.prototype.booleanish=!1,TN.prototype.boolean=!1,TN.prototype.commaOrSpaceSeparated=!1,TN.prototype.commaSeparated=!1,TN.prototype.defined=!1,TN.prototype.mustUseProperty=!1,TN.prototype.number=!1,TN.prototype.overloadedBoolean=!1,TN.prototype.property=``,TN.prototype.spaceSeparated=!1,TN.prototype.space=void 0;var EN=s({boolean:()=>ON,booleanish:()=>kN,commaOrSpaceSeparated:()=>PN,commaSeparated:()=>NN,number:()=>jN,overloadedBoolean:()=>AN,spaceSeparated:()=>MN}),DN=0,ON=FN(),kN=FN(),AN=FN(),jN=FN(),MN=FN(),NN=FN(),PN=FN();function FN(){return 2**++DN}var IN=Object.keys(EN),LN=class extends TN{constructor(e,t,n,r){let i=-1;if(super(e,t),RN(this,`space`,r),typeof n==`number`)for(;++i<IN.length;){let e=IN[i];RN(this,IN[i],(n&EN[e])===EN[e])}}};LN.prototype.defined=!0;function RN(e,t,n){n&&(e[t]=n)}function zN(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new LN(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[wN(r)]=r,n[wN(a.attribute)]=r}return new SN(t,n,e.space)}var BN=zN({properties:{ariaActiveDescendant:null,ariaAtomic:kN,ariaAutoComplete:null,ariaBusy:kN,ariaChecked:kN,ariaColCount:jN,ariaColIndex:jN,ariaColSpan:jN,ariaControls:MN,ariaCurrent:null,ariaDescribedBy:MN,ariaDetails:null,ariaDisabled:kN,ariaDropEffect:MN,ariaErrorMessage:null,ariaExpanded:kN,ariaFlowTo:MN,ariaGrabbed:kN,ariaHasPopup:null,ariaHidden:kN,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:MN,ariaLevel:jN,ariaLive:null,ariaModal:kN,ariaMultiLine:kN,ariaMultiSelectable:kN,ariaOrientation:null,ariaOwns:MN,ariaPlaceholder:null,ariaPosInSet:jN,ariaPressed:kN,ariaReadOnly:kN,ariaRelevant:null,ariaRequired:kN,ariaRoleDescription:MN,ariaRowCount:jN,ariaRowIndex:jN,ariaRowSpan:jN,ariaSelected:kN,ariaSetSize:jN,ariaSort:null,ariaValueMax:jN,ariaValueMin:jN,ariaValueNow:jN,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function VN(e,t){return t in e?e[t]:t}function HN(e,t){return VN(e,t.toLowerCase())}var UN=zN({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:NN,acceptCharset:MN,accessKey:MN,action:null,allow:null,allowFullScreen:ON,allowPaymentRequest:ON,allowUserMedia:ON,alt:null,as:null,async:ON,autoCapitalize:null,autoComplete:MN,autoFocus:ON,autoPlay:ON,blocking:MN,capture:null,charSet:null,checked:ON,cite:null,className:MN,cols:jN,colSpan:null,content:null,contentEditable:kN,controls:ON,controlsList:MN,coords:jN|NN,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ON,defer:ON,dir:null,dirName:null,disabled:ON,download:AN,draggable:kN,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ON,formTarget:null,headers:MN,height:jN,hidden:AN,high:jN,href:null,hrefLang:null,htmlFor:MN,httpEquiv:MN,id:null,imageSizes:null,imageSrcSet:null,inert:ON,inputMode:null,integrity:null,is:null,isMap:ON,itemId:null,itemProp:MN,itemRef:MN,itemScope:ON,itemType:MN,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ON,low:jN,manifest:null,max:null,maxLength:jN,media:null,method:null,min:null,minLength:jN,multiple:ON,muted:ON,name:null,nonce:null,noModule:ON,noValidate:ON,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ON,optimum:jN,pattern:null,ping:MN,placeholder:null,playsInline:ON,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ON,referrerPolicy:null,rel:MN,required:ON,reversed:ON,rows:jN,rowSpan:jN,sandbox:MN,scope:null,scoped:ON,seamless:ON,selected:ON,shadowRootClonable:ON,shadowRootDelegatesFocus:ON,shadowRootMode:null,shape:null,size:jN,sizes:null,slot:null,span:jN,spellCheck:kN,src:null,srcDoc:null,srcLang:null,srcSet:null,start:jN,step:null,style:null,tabIndex:jN,target:null,title:null,translate:null,type:null,typeMustMatch:ON,useMap:null,value:kN,width:jN,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:MN,axis:null,background:null,bgColor:null,border:jN,borderColor:null,bottomMargin:jN,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ON,declare:ON,event:null,face:null,frame:null,frameBorder:null,hSpace:jN,leftMargin:jN,link:null,longDesc:null,lowSrc:null,marginHeight:jN,marginWidth:jN,noResize:ON,noHref:ON,noShade:ON,noWrap:ON,object:null,profile:null,prompt:null,rev:null,rightMargin:jN,rules:null,scheme:null,scrolling:kN,standby:null,summary:null,text:null,topMargin:jN,valueType:null,version:null,vAlign:null,vLink:null,vSpace:jN,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ON,disableRemotePlayback:ON,prefix:null,property:null,results:jN,security:null,unselectable:null},space:`html`,transform:HN}),WN=zN({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:PN,accentHeight:jN,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:jN,amplitude:jN,arabicForm:null,ascent:jN,attributeName:null,attributeType:null,azimuth:jN,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:jN,by:null,calcMode:null,capHeight:jN,className:MN,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:jN,diffuseConstant:jN,direction:null,display:null,dur:null,divisor:jN,dominantBaseline:null,download:ON,dx:null,dy:null,edgeMode:null,editable:null,elevation:jN,enableBackground:null,end:null,event:null,exponent:jN,externalResourcesRequired:null,fill:null,fillOpacity:jN,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:NN,g2:NN,glyphName:NN,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:jN,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:jN,horizOriginX:jN,horizOriginY:jN,id:null,ideographic:jN,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:jN,k:jN,k1:jN,k2:jN,k3:jN,k4:jN,kernelMatrix:PN,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:jN,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:jN,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:jN,overlineThickness:jN,paintOrder:null,panose1:null,path:null,pathLength:jN,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:MN,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:jN,pointsAtY:jN,pointsAtZ:jN,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:PN,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:PN,rev:PN,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:PN,requiredFeatures:PN,requiredFonts:PN,requiredFormats:PN,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:jN,specularExponent:jN,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:jN,strikethroughThickness:jN,string:null,stroke:null,strokeDashArray:PN,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:jN,strokeOpacity:jN,strokeWidth:null,style:null,surfaceScale:jN,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:PN,tabIndex:jN,tableValues:null,target:null,targetX:jN,targetY:jN,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:PN,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:jN,underlineThickness:jN,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:jN,values:null,vAlphabetic:jN,vMathematical:jN,vectorEffect:null,vHanging:jN,vIdeographic:jN,version:null,vertAdvY:jN,vertOriginX:jN,vertOriginY:jN,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:jN,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:VN}),GN=zN({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),KN=zN({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:HN}),qN=zN({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),JN={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},YN=/[A-Z]/g,XN=/-[a-z]/g,ZN=/^data[-\w.:]+$/i;function QN(e,t){let n=wN(t),r=t,i=TN;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ZN.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(XN,eP);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!XN.test(e)){let n=e.replace(YN,$N);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=LN}return new i(r,t)}function $N(e){return`-`+e.toLowerCase()}function eP(e){return e.charAt(1).toUpperCase()}var tP=CN([BN,UN,GN,KN,qN],`html`),nP=CN([BN,WN,GN,KN,qN],`svg`);function rP(e){return e.join(` `).trim()}var iP=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
103
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),aP=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(iP());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),oP=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),sP=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(aP()),r=oP();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),cP=uP(`end`),lP=uP(`start`);function uP(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function dP(e){let t=lP(e),n=cP(e);if(t&&n)return{start:t,end:n}}function fP(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?mP(e.position):`start`in e||`end`in e?mP(e):`line`in e||`column`in e?pP(e):``}function pP(e){return hP(e&&e.line)+`:`+hP(e&&e.column)}function mP(e){return pP(e&&e.start)+`-`+pP(e&&e.end)}function hP(e){return e&&typeof e==`number`?e:1}var gP=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=fP(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};gP.prototype.file=``,gP.prototype.name=``,gP.prototype.reason=``,gP.prototype.message=``,gP.prototype.stack=``,gP.prototype.column=void 0,gP.prototype.line=void 0,gP.prototype.ancestors=void 0,gP.prototype.cause=void 0,gP.prototype.fatal=void 0,gP.prototype.place=void 0,gP.prototype.ruleId=void 0,gP.prototype.source=void 0;var _P=l(sP(),1),vP={}.hasOwnProperty,yP=new Map,bP=/[A-Z]/g,xP=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),SP=new Set([`td`,`th`]),CP=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function wP(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=FP(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=PP(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?nP:tP,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=TP(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function TP(e,t,n){if(t.type===`element`)return EP(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return DP(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return kP(e,t,n);if(t.type===`mdxjsEsm`)return OP(e,t);if(t.type===`root`)return AP(e,t,n);if(t.type===`text`)return jP(e,t)}function EP(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=nP,e.schema=i),e.ancestors.push(t);let a=VP(e,t.tagName,!1),o=IP(e,t),s=RP(e,t);return xP.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!bN(e):!0})),MP(e,o,a,t),NP(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function DP(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}HP(e,t.position)}function OP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);HP(e,t.position)}function kP(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=nP,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:VP(e,t.name,!0),o=LP(e,t),s=RP(e,t);return MP(e,o,a,t),NP(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function AP(e,t,n){let r={};return NP(r,RP(e,t)),e.create(t,e.Fragment,r,n)}function jP(e,t){return t.value}function MP(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function NP(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function PP(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function FP(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=lP(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function IP(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&vP.call(t.properties,i)){let a=zP(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&SP.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function LP(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else HP(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else HP(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function RP(e,t){let n=[],r=-1,i=e.passKeys?new Map:yP;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=TP(e,a,o);s!==void 0&&n.push(s)}return n}function zP(e,t,n){let r=QN(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?mN(n):rP(n)),r.property===`style`){let t=typeof n==`object`?n:BP(e,String(n));return e.stylePropertyNameCase===`css`&&(t=UP(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?JN[r.property]||r.property:r.attribute,n]}}function BP(e,t){try{return(0,_P.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new gP("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=CP+`#cannot-parse-style-attribute`,r}}function VP(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=vN(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=vN(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return vP.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);HP(e)}function HP(e,t){let n=new gP("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=CP+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function UP(e){let t={},n;for(n in e)vP.call(e,n)&&(t[WP(n)]=e[n]);return t}function WP(e){let t=e.replace(bP,GP);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function GP(e){return`-`+e.toLowerCase()}var KP={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},qP={};function JP(e,t){let n=t||qP;return YP(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function YP(e,t,n){if(ZP(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return XP(e.children,t,n)}return Array.isArray(e)?XP(e,t,n):``}function XP(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=YP(e[i],t,n);return r.join(``)}function ZP(e){return!!(e&&typeof e==`object`)}var QP=document.createElement(`i`);function $P(e){let t=`&`+e+`;`;QP.innerHTML=t;let n=QP.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function eF(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function tF(e,t){return e.length>0?(eF(e,e.length,0,t),e):t}var nF={}.hasOwnProperty;function rF(e){let t={},n=-1;for(;++n<e.length;)iF(t,e[n]);return t}function iF(e,t){let n;for(n in t){let r=(nF.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){nF.call(r,a)||(r[a]=[]);let e=i[a];aF(r[a],Array.isArray(e)?e:e?[e]:[])}}}function aF(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);eF(e,0,0,r)}function oF(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function sF(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var cF=bF(/[A-Za-z]/),lF=bF(/[\dA-Za-z]/),uF=bF(/[#-'*+\--9=?A-Z^-~]/);function dF(e){return e!==null&&(e<32||e===127)}var fF=bF(/\d/),pF=bF(/[\dA-Fa-f]/),mF=bF(/[!-/:-@[-`{-~]/);function hF(e){return e!==null&&e<-2}function gF(e){return e!==null&&(e<0||e===32)}function _F(e){return e===-2||e===-1||e===32}var vF=bF(/\p{P}|\p{S}/u),yF=bF(/\s/);function bF(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function xF(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&lF(e.charCodeAt(n+1))&&lF(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function SF(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return _F(r)?(e.enter(n),s(r)):t(r)}function s(r){return _F(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var CF={tokenize:wF};function wF(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),SF(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return hF(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var TF={tokenize:DF},EF={tokenize:OF};function DF(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return eF(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(EF,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(EF,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return hF(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;eF(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function OF(e,t,n){return SF(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function kF(e){if(e===null||gF(e)||yF(e))return 1;if(vF(e))return 2}function AF(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var jF={name:`attention`,resolveAll:MF,tokenize:NF};function MF(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};PF(d,-c),PF(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=tF(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=tF(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=tF(l,AF(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=tF(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=tF(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,eF(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function NF(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=kF(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=kF(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function PF(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var FF={name:`autolink`,tokenize:IF};function IF(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return cF(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||lF(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||lF(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||dF(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):uF(t)?(e.consume(t),l):n(t)}function u(e){return lF(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||lF(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var LF={partial:!0,tokenize:RF};function RF(e,t,n){return r;function r(t){return _F(t)?SF(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||hF(e)?t(e):n(e)}}var zF={continuation:{tokenize:VF},exit:HF,name:`blockQuote`,tokenize:BF};function BF(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return _F(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function VF(e,t,n){let r=this;return i;function i(t){return _F(t)?SF(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(zF,t,n)(r)}}function HF(e){e.exit(`blockQuote`)}var UF={name:`characterEscape`,tokenize:WF};function WF(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return mF(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var GF={name:`characterReference`,tokenize:KF};function KF(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=lF,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=pF,u):(e.enter(`characterReferenceValue`),a=7,o=fF,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===lF&&!$P(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var qF={partial:!0,tokenize:XF},JF={concrete:!0,name:`codeFenced`,tokenize:YF};function YF(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),_F(t)?SF(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||hF(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(qF,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||hF(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):_F(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),SF(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||hF(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||hF(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&_F(t)?SF(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||hF(t)?e.check(qF,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||hF(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),_F(t)?SF(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),_F(t)?SF(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||hF(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function XF(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var ZF={name:`codeIndented`,tokenize:$F},QF={partial:!0,tokenize:eI};function $F(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),SF(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):hF(t)?e.attempt(QF,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||hF(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function eI(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):hF(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):SF(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):hF(e)?i(e):n(e)}}var tI={name:`codeText`,previous:rI,resolve:nI,tokenize:iI};function nI(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function rI(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function iI(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):hF(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||hF(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var aI=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&oI(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),oI(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),oI(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);oI(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);oI(this.left,t.reverse())}}};function oI(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function sI(e){let t={},n=-1,r,i,a,o,s,c,l,u=new aI(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,cI(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return eF(e,0,1/0,u.slice(0)),!l}function cI(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var lI={resolve:dI,tokenize:fI},uI={partial:!0,tokenize:pI};function dI(e){return sI(e),e}function fI(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):hF(t)?e.check(uI,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function pI(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),SF(e,a,`linePrefix`)}function a(i){if(i===null||hF(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function mI(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||dF(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||hF(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||gF(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||dF(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function hI(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):hF(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||hF(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!_F(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function gI(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):hF(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),SF(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||hF(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function _I(e,t){let n;return r;function r(i){return hF(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):_F(i)?SF(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var vI={name:`definition`,tokenize:bI},yI={partial:!0,tokenize:xI};function bI(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return hI.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=sF(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return gF(t)?_I(e,l)(t):l(t)}function l(t){return mI(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(yI,d,d)(t)}function d(t){return _F(t)?SF(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||hF(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function xI(e,t,n){return r;function r(t){return gF(t)?_I(e,i)(t):n(t)}function i(t){return gI(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return _F(t)?SF(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||hF(e)?t(e):n(e)}}var SI={name:`hardBreakEscape`,tokenize:CI};function CI(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return hF(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var wI={name:`headingAtx`,resolve:TI,tokenize:EI};function TI(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},eF(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function EI(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||gF(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||hF(n)?(e.exit(`atxHeading`),t(n)):_F(n)?SF(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||gF(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var DI=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),OI=[`pre`,`script`,`style`,`textarea`],kI={concrete:!0,name:`htmlFlow`,resolveTo:MI,tokenize:NI},AI={partial:!0,tokenize:FI},jI={partial:!0,tokenize:PI};function MI(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function NI(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:M):cF(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):cF(a)?(e.consume(a),i=4,r.interrupt?t:M):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:M):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return cF(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||gF(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&OI.includes(l)?(i=1,r.interrupt?t(s):O(s)):DI.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||lF(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return _F(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||cF(t)?(e.consume(t),b):_F(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||lF(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):_F(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):_F(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||hF(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||gF(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||_F(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||hF(t)?O(t):_F(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),ee):t===60&&i===1?(e.consume(t),te):t===62&&i===4?(e.consume(t),N):t===63&&i===3?(e.consume(t),M):t===93&&i===5?(e.consume(t),re):hF(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(AI,ie,k)(t)):t===null||hF(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(jI,A,ie)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||hF(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function ee(t){return t===45?(e.consume(t),M):O(t)}function te(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return OI.includes(n)?(e.consume(t),N):O(t)}return cF(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function re(t){return t===93?(e.consume(t),M):O(t)}function M(t){return t===62?(e.consume(t),N):t===45&&i===2?(e.consume(t),M):O(t)}function N(t){return t===null||hF(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),N)}function ie(n){return e.exit(`htmlFlow`),t(n)}}function PI(e,t,n){let r=this;return i;function i(t){return hF(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function FI(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(LF,t,n)}}var II={name:`htmlText`,tokenize:LI};function LI(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):cF(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):cF(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):hF(t)?(o=d,te(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ee(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):hF(t)?(o=h,te(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ee(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ee(t):hF(t)?(o=v,te(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):hF(t)?(o=y,te(t)):(e.consume(t),y)}function b(e){return e===62?ee(e):y(e)}function x(t){return cF(t)?(e.consume(t),S):n(t)}function S(t){return t===45||lF(t)?(e.consume(t),S):C(t)}function C(t){return hF(t)?(o=C,te(t)):_F(t)?(e.consume(t),C):ee(t)}function w(t){return t===45||lF(t)?(e.consume(t),w):t===47||t===62||gF(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ee):t===58||t===95||cF(t)?(e.consume(t),E):hF(t)?(o=T,te(t)):_F(t)?(e.consume(t),T):ee(t)}function E(t){return t===45||t===46||t===58||t===95||lF(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):hF(t)?(o=D,te(t)):_F(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):hF(t)?(o=O,te(t)):_F(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):hF(t)?(o=k,te(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||gF(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||gF(e)?T(e):n(e)}function ee(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function te(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return _F(t)?SF(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}var RI={name:`labelEnd`,resolveAll:HI,resolveTo:UI,tokenize:WI},zI={tokenize:GI},BI={tokenize:KI},VI={tokenize:qI};function HI(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&eF(e,0,e.length,n),e}function UI(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=tF(s,e.slice(a+1,a+r+3)),s=tF(s,[[`enter`,u,t]]),s=tF(s,AF(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=tF(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=tF(s,e.slice(o+1)),s=tF(s,[[`exit`,c,t]]),eF(e,a,e.length,s),e}function WI(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(sF(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(zI,u,o?u:d)(t):t===91?e.attempt(BI,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(VI,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function GI(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return gF(t)?_I(e,a)(t):a(t)}function a(t){return t===41?u(t):mI(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return gF(t)?_I(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?gI(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return gF(t)?_I(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function KI(e,t,n){let r=this;return i;function i(t){return hI.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(sF(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function qI(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var JI={name:`labelStartImage`,resolveAll:RI.resolveAll,tokenize:YI};function YI(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var XI={name:`labelStartLink`,resolveAll:RI.resolveAll,tokenize:ZI};function ZI(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var QI={name:`lineEnding`,tokenize:$I};function $I(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),SF(e,t,`linePrefix`)}}var eL={name:`thematicBreak`,tokenize:tL};function tL(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||hF(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),_F(t)?SF(e,s,`whitespace`)(t):s(t))}}var nL={continuation:{tokenize:oL},exit:cL,name:`list`,tokenize:aL},rL={partial:!0,tokenize:lL},iL={partial:!0,tokenize:sL};function aL(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:fF(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(eL,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return fF(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(LF,r.interrupt?n:u,e.attempt(rL,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return _F(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function oL(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(LF,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,SF(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!_F(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(iL,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,SF(e,e.attempt(nL,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function sL(e,t,n){let r=this;return SF(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function cL(e){e.exit(this.containerState.type)}function lL(e,t,n){let r=this;return SF(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!_F(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var uL={name:`setextUnderline`,resolveTo:dL,tokenize:fL};function dL(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function fL(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),_F(t)?SF(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||hF(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var pL={tokenize:mL};function mL(e){let t=this,n=e.attempt(LF,r,e.attempt(this.parser.constructs.flowInitial,i,SF(e,e.attempt(this.parser.constructs.flow,i,e.attempt(lI,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var hL={resolveAll:yL()},gL=vL(`string`),_L=vL(`text`);function vL(e){return{resolveAll:yL(e===`text`?bL:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function yL(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function bL(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var xL=s({attentionMarkers:()=>kL,contentInitial:()=>CL,disable:()=>AL,document:()=>SL,flow:()=>TL,flowInitial:()=>wL,insideSpan:()=>OL,string:()=>EL,text:()=>DL}),SL={42:nL,43:nL,45:nL,48:nL,49:nL,50:nL,51:nL,52:nL,53:nL,54:nL,55:nL,56:nL,57:nL,62:zF},CL={91:vI},wL={[-2]:ZF,[-1]:ZF,32:ZF},TL={35:wI,42:eL,45:[uL,eL],60:kI,61:uL,95:eL,96:JF,126:JF},EL={38:GF,92:UF},DL={[-5]:QI,[-4]:QI,[-3]:QI,33:JI,38:GF,42:jF,60:[FF,II],91:XI,92:[SI,UF],93:RI,95:jF,96:tI},OL={null:[jF,hL]},kL={null:[42,95]},AL={null:[]};function jL(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=tF(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=AF(a,l.events,l),l.events):[]}function f(e,t){return NL(p(e),t)}function p(e){return ML(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){hF(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&eF(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ML(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function NL(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
104
|
+
`;break;case-3:o=`\r
|
|
105
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function PL(e){let t={constructs:rF([xL,...(e||{}).extensions||[]]),content:n(CF),defined:[],document:n(TF),flow:n(pL),lazy:{},string:n(gL),text:n(_L)};return t;function n(e){return n;function n(n){return jL(t,e,n)}}}function FL(e){for(;!sI(e););return e}var IL=/[\0\t\n\r]/g;function LL(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(IL.lastIndex=u,c=IL.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var RL=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zL(e){return e.replace(RL,BL)}function BL(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return oF(n.slice(t?2:1),t?16:10)}return $P(n)||e}var VL={}.hasOwnProperty;function HL(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),UL(n)(FL(PL(n).document().write(LL()(e,t,!0))))}function UL(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(xe),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(_e),blockQuote:a(fe),characterEscape:T,characterReference:T,codeFenced:a(pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(pe,o),codeText:a(me,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(he),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ge),hardBreakEscape:a(ve),hardBreakTrailing:a(ve),htmlFlow:a(ye,o),htmlFlowData:T,htmlText:a(ye,o),htmlTextData:T,image:a(be),label:o,link:a(xe),listItem:a(Ce),listItemValue:f,listOrdered:a(Se,d),listUnordered:a(Se),paragraph:a(we),reference:ae,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(_e),strong:a(Te),thematicBreak:a(De)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:de,autolinkProtocol:ue,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:ce,characterReference:le,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(te),label:re,labelText:ne,lineEnding:D,link:c(ee),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:oe,resourceDestinationString:M,resourceTitleString:N,resource:ie,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};GL(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];VL.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||qL).call(a,void 0,e[0])}for(r.position={start:WL(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:WL(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:WL(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||qL).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+fP({start:e.start,end:e.end})+`): it’s not open`);n.position.end=WL(e.end)}function u(){return JP(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=sF(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Ee(),n.position={start:WL(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=WL(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=WL(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function te(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=zL(t),n.identifier=sF(t).toLowerCase()}function re(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function N(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ie(){this.data.inReference=void 0}function ae(){this.data.referenceType=`collapsed`}function oe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=sF(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function se(e){this.data.characterReferenceType=e.type}function ce(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=oF(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=$P(t);let i=this.stack[this.stack.length-1];i.value+=r}function le(e){let t=this.stack.pop();t.position.end=WL(e.end)}function ue(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function de(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function fe(){return{type:`blockquote`,children:[]}}function pe(){return{type:`code`,lang:null,meta:null,value:``}}function me(){return{type:`inlineCode`,value:``}}function he(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ge(){return{type:`emphasis`,children:[]}}function _e(){return{type:`heading`,depth:0,children:[]}}function ve(){return{type:`break`}}function ye(){return{type:`html`,value:``}}function be(){return{type:`image`,title:null,url:``,alt:null}}function xe(){return{type:`link`,title:null,url:``,children:[]}}function Se(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Ce(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function we(){return{type:`paragraph`,children:[]}}function Te(){return{type:`strong`,children:[]}}function Ee(){return{type:`text`,value:``}}function De(){return{type:`thematicBreak`}}}function WL(e){return{line:e.line,column:e.column,offset:e.offset}}function GL(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?GL(e,r):KL(e,r)}}function KL(e,t){let n;for(n in t)if(VL.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function qL(e,t){throw e?Error("Cannot close `"+e.type+"` ("+fP({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fP({start:t.start,end:t.end})+`) is open`):Error("Cannot close document, a token (`"+t.type+"`, "+fP({start:t.start,end:t.end})+`) is still open`)}function JL(e){let t=this;t.parser=n;function n(n){return HL(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function YL(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function XL(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
106
|
+
`}]}function ZL(e,t){let n=t.value?t.value+`
|
|
107
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function QL(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $L(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eR(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=xF(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function tR(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nR(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function rR(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function iR(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rR(e,t);let i={src:xF(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function aR(e,t){let n={src:xF(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function oR(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function sR(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rR(e,t);let i={href:xF(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function cR(e,t){let n={href:xF(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lR(e,t,n){let r=e.all(t),i=n?uR(n):dR(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
108
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
109
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function uR(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=dR(n[r])}return t}function dR(e){return e.spread??e.children.length>1}function fR(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function pR(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mR(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function hR(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gR(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=lP(t.children[1]),o=cP(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function _R(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function vR(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var yR=9,bR=32;function xR(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(SR(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(SR(t.slice(i),i>0,!1)),a.join(``)}function SR(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===yR||t===bR;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===yR||t===bR;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function CR(e,t){let n={type:`text`,value:xR(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wR(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var TR={blockquote:YL,break:XL,code:ZL,delete:QL,emphasis:$L,footnoteReference:eR,heading:tR,html:nR,imageReference:iR,image:aR,inlineCode:oR,linkReference:sR,link:cR,listItem:lR,list:fR,paragraph:pR,root:mR,strong:hR,table:gR,tableCell:vR,tableRow:_R,text:CR,thematicBreak:wR,toml:ER,yaml:ER,definition:ER,footnoteDefinition:ER};function ER(){}var DR=typeof self==`object`?self:globalThis,OR=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new DR[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new DR[a](o),i)};return r},kR=e=>OR(new Map,e)(0),AR=``,{toString:jR}={},{keys:MR}=Object,NR=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=jR.call(e).slice(8,-1);switch(n){case`Array`:return[1,AR];case`Object`:return[2,AR];case`Date`:return[3,AR];case`RegExp`:return[4,AR];case`Map`:return[5,AR];case`Set`:return[6,AR];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},PR=([e,t])=>e===0&&(t===`function`||t===`symbol`),FR=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=NR(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of MR(r))(e||!PR(NR(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(PR(NR(n))||PR(NR(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!PR(NR(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},IR=(e,{json:t,lossy:n}={})=>{let r=[];return FR(!(t||n),!!t,new Map,r)(e),r},LR=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?kR(IR(e,t)):structuredClone(e):(e,t)=>kR(IR(e,t));function RR(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function zR(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function BR(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||RR,r=e.options.footnoteBackLabel||zR,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=xF(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...LR(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
110
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
111
|
+
`}]}}var VR=(function(e){if(e==null)return KR;if(typeof e==`function`)return GR(e);if(typeof e==`object`)return Array.isArray(e)?HR(e):UR(e);if(typeof e==`string`)return WR(e);throw Error(`Expected function, string, or object as test`)});function HR(e){let t=[],n=-1;for(;++n<e.length;)t[n]=VR(e[n]);return GR(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function UR(e){let t=e;return GR(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function WR(e){return GR(t);function t(t){return t&&t.type===e}}function GR(e){return t;function t(t,n,r){return!!(qR(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function KR(){return!0}function qR(e){return typeof e==`object`&&!!e&&`type`in e}function JR(e){return e}var YR=[];function XR(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=VR(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+JR(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=YR,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=ZR(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function ZR(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?YR:[e]}function QR(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),XR(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var $R={}.hasOwnProperty,ez={};function tz(e,t){let n=t||ez,r=new Map,i=new Map,a={all:s,applyData:rz,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...TR,...n.handlers},one:o,options:n,patch:nz,wrap:az};return QR(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if($R.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=LR(n);return r.children=a.all(e),r}return LR(e)}return(a.options.unknownHandler||iz)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=oz(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=oz(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function nz(e,t){e.position&&(t.position=dP(e))}function rz(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,LR(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function iz(e,t){let n=t.data||{},r=`value`in t&&!($R.call(n,`hProperties`)||$R.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function az(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
112
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
113
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
114
|
+
`}),n}function oz(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function sz(e,t){let n=tz(e,t),r=n.one(e,void 0),i=BR(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
115
|
+
`},i)),a}function cz(e,t){return e&&`run`in e?async function(n,r){let i=sz(n,{file:r,...t});await e.run(i,r)}:function(n,r){return sz(n,{file:r,...e||t})}}function lz(e){if(e)throw e}var uz=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function dz(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function fz(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?pz(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function pz(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var mz={basename:hz,dirname:gz,extname:_z,join:vz,sep:`/`};function hz(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);xz(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function gz(e){if(xz(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function _z(e){xz(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function vz(...e){let t=-1,n;for(;++t<e.length;)xz(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:yz(n)}function yz(e){xz(e);let t=e.codePointAt(0)===47,n=bz(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function bz(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function xz(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Sz={cwd:Cz};function Cz(){return`/`}function wz(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Tz(e){if(typeof e==`string`)e=new URL(e);else if(!wz(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Ez(e)}function Ez(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Dz=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Oz=class{constructor(e){let t;t=e?wz(e)?{path:e}:typeof e==`string`||Mz(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Sz.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Dz.length;){let e=Dz[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Dz.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?mz.basename(this.path):void 0}set basename(e){Az(e,`basename`),kz(e,`basename`),this.path=mz.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?mz.dirname(this.path):void 0}set dirname(e){jz(this.basename,`dirname`),this.path=mz.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?mz.extname(this.path):void 0}set extname(e){if(kz(e,`extname`),jz(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=mz.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){wz(e)&&(e=Tz(e)),Az(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?mz.basename(this.path,this.extname):void 0}set stem(e){Az(e,`stem`),kz(e,`stem`),this.path=mz.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new gP(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function kz(e,t){if(e&&e.includes(mz.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+mz.sep+"`")}function Az(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function jz(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Mz(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Nz=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Pz=l(uz(),1),Fz={}.hasOwnProperty,Iz=new class e extends Nz{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=fz()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Pz.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(zz(`data`,this.frozen),this.namespace[e]=t,this):Fz.call(this.namespace,e)&&this.namespace[e]||void 0:e?(zz(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Hz(e),n=this.parser||this.Parser;return Lz(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Lz(`process`,this.parser||this.Parser),Rz(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Hz(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Wz(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Lz(`processSync`,this.parser||this.Parser),Rz(`processSync`,this.compiler||this.Compiler),this.process(e,r),Vz(`processSync`,`process`,t),n;function r(e,r){t=!0,lz(e),n=r}}run(e,t,n){Bz(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Hz(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Vz(`runSync`,`run`,n),r;function i(e,t){lz(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Hz(t),r=this.compiler||this.Compiler;return Rz(`stringify`,r),Bz(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(zz(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Pz.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];dz(o)&&dz(r)&&(r=(0,Pz.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Lz(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Rz(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function zz(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Bz(e){if(!dz(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Vz(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Hz(e){return Uz(e)?e:new Oz(e)}function Uz(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Wz(e){return typeof e==`string`||Gz(e)}function Gz(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Kz=[],qz={allowDangerousHtml:!0},Jz=/^(https?|ircs?|mailto|xmpp)$/i,Yz=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Xz(e){let t=Zz(e),n=Qz(e);return $z(t.runSync(t.parse(n),n),e)}function Zz(e){let t=e.rehypePlugins||Kz,n=e.remarkPlugins||Kz,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qz}:qz;return Iz().use(JL).use(n).use(cz,r).use(t)}function Qz(e){let t=e.children||``,n=new Oz;return typeof t==`string`?n.value=t:``+t,n}function $z(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||eB;for(let e of Yz)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return QR(e,l),wP(e,{Fragment:I.Fragment,components:i,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in KP)if(Object.hasOwn(KP,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=KP[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function eB(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Jz.test(e.slice(0,t))?e:``}function tB(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function nB(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function rB(e,t,n){let r=VR((n||{}).ignore||[]),i=iB(t),a=-1;for(;++a<i.length;)XR(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function iB(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([aB(e[0]),oB(e[1])])}return t}function aB(e){return typeof e==`string`?new RegExp(nB(e),`g`):e}function oB(e){return typeof e==`function`?e:function(){return e}}var sB=`phrasing`,cB=[`autolink`,`link`,`image`,`label`];function lB(){return{transforms:[_B],enter:{literalAutolink:dB,literalAutolinkEmail:fB,literalAutolinkHttp:fB,literalAutolinkWww:fB},exit:{literalAutolink:gB,literalAutolinkEmail:hB,literalAutolinkHttp:pB,literalAutolinkWww:mB}}}function uB(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:sB,notInConstruct:cB},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:sB,notInConstruct:cB},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:sB,notInConstruct:cB}]}}function dB(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function fB(e){this.config.enter.autolinkProtocol.call(this,e)}function pB(e){this.config.exit.autolinkProtocol.call(this,e)}function mB(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function hB(e){this.config.exit.autolinkEmail.call(this,e)}function gB(e){this.exit(e)}function _B(e){rB(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vB],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,yB]],{ignore:[`link`,`linkReference`]})}function vB(e,t,n,r,i){let a=``;if(!SB(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!bB(n)))return!1;let o=xB(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function yB(e,t,n,r){return!SB(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function bB(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function xB(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=tB(e,`(`),a=tB(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function SB(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||yF(n)||vF(n))&&(!t||n!==47)}MB.peek=jB;function CB(){this.buffer()}function wB(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function TB(){this.buffer()}function EB(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function DB(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=sF(this.sliceSerialize(e)).toLowerCase(),n.label=t}function OB(e){this.exit(e)}function kB(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=sF(this.sliceSerialize(e)).toLowerCase(),n.label=t}function AB(e){this.exit(e)}function jB(){return`[`}function MB(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function NB(){return{enter:{gfmFootnoteCallString:CB,gfmFootnoteCall:wB,gfmFootnoteDefinitionLabelString:TB,gfmFootnoteDefinition:EB},exit:{gfmFootnoteCallString:DB,gfmFootnoteCall:OB,gfmFootnoteDefinitionLabelString:kB,gfmFootnoteDefinition:AB}}}function PB(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:MB},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
116
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?IB:FB))),s(),o}}function FB(e,t,n){return t===0?e:IB(e,t,n)}function IB(e,t,n){return(n?``:` `)+e}var LB=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];HB.peek=UB;function RB(){return{canContainEols:[`delete`],enter:{strikethrough:BB},exit:{strikethrough:VB}}}function zB(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:LB}],handlers:{delete:HB}}}function BB(e){this.enter({type:`delete`,children:[]},e)}function VB(e){this.exit(e)}function HB(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function UB(){return`~`}function WB(e){return e.length}function GB(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||WB,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=KB(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=qB(r[d]);else{let e=qB(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
117
|
+
`)}function KB(e){return e==null?``:String(e)}function qB(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function JB(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),YB);return i(),o}function YB(e,t,n){return`>`+(n?``:` `)+e}function XB(e,t){return ZB(e,t.inConstruct,!0)&&!ZB(e,t.notInConstruct,!1)}function ZB(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function QB(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
118
|
+
`&&XB(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
119
|
+
`}function $B(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function eV(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function tV(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function nV(e,t,n,r){let i=tV(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(eV(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,rV);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max($B(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
120
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
121
|
+
`),a&&(u+=s.move(a+`
|
|
122
|
+
`)),u+=s.move(c),l(),u}function rV(e,t,n){return(n?``:` `)+e}function iV(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function aV(e,t,n,r){let i=iV(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
123
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function oV(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function sV(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function cV(e,t,n){let r=kF(e),i=kF(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}lV.peek=uV;function lV(e,t,n,r){let i=oV(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=cV(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=sV(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=cV(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+sV(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function uV(e,t,n){return n.options.emphasis||`*`}function dV(e,t){let n=!1;return QR(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&JP(e)&&(t.options.setext||n))}function fV(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(dV(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
124
|
+
`,after:`
|
|
125
|
+
`});return r(),t(),o+`
|
|
126
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
127
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
128
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=sV(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}pV.peek=mV;function pV(e){return e.value||``}function mV(){return`<`}hV.peek=gV;function hV(e,t,n,r){let i=iV(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function gV(){return`!`}_V.peek=vV;function _V(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function vV(){return`!`}yV.peek=bV;function yV(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function bV(){return"`"}function xV(e,t){let n=JP(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}SV.peek=CV;function SV(e,t,n,r){let i=iV(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(xV(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function CV(e,t,n){return xV(e,n)?`<`:`[`}wV.peek=TV;function wV(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function TV(){return`[`}function EV(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function DV(e){let t=EV(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function OV(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function kV(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function AV(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?OV(n):EV(n),s=e.ordered?o===`.`?`)`:`.`:DV(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),kV(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function jV(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function MV(e,t,n,r){let i=jV(n),a=n.bulletCurrent||EV(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function NV(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var PV=VR([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function FV(e,t,n,r){return(e.children.some(function(e){return PV(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function IV(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}LV.peek=RV;function LV(e,t,n,r){let i=IV(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=cV(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=sV(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=cV(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+sV(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function RV(e,t,n){return n.options.strong||`*`}function zV(e,t,n,r){return n.safe(e.value,r)}function BV(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function VV(e,t,n){let r=(kV(n)+(n.options.ruleSpaces?` `:``)).repeat(BV(n));return n.options.ruleSpaces?r.slice(0,-1):r}var HV={blockquote:JB,break:QB,code:nV,definition:aV,emphasis:lV,hardBreak:QB,heading:fV,html:pV,image:hV,imageReference:_V,inlineCode:yV,link:SV,linkReference:wV,list:AV,listItem:MV,paragraph:NV,root:FV,strong:LV,text:zV,thematicBreak:VV};function UV(){return{enter:{table:WV,tableData:JV,tableHeader:JV,tableRow:KV},exit:{codeText:YV,table:GV,tableData:qV,tableHeader:qV,tableRow:qV}}}function WV(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function GV(e){this.exit(e),this.data.inTable=void 0}function KV(e){this.enter({type:`tableRow`,children:[]},e)}function qV(e){this.exit(e)}function JV(e){this.enter({type:`tableCell`,children:[]},e)}function YV(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,XV));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function XV(e,t){return t===`|`?t:e}function ZV(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
129
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
130
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return GB(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=HV.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function QV(){return{exit:{taskListCheckValueChecked:eH,taskListCheckValueUnchecked:eH,paragraph:tH}}}function $V(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:nH}}}function eH(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function tH(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function nH(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=HV.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function rH(){return[lB(),NB(),RB(),UV(),QV()]}function iH(e){return{extensions:[uB(),PB(e),zB(),ZV(e),$V()]}}var aH={tokenize:yH,partial:!0},oH={tokenize:bH,partial:!0},sH={tokenize:xH,partial:!0},cH={tokenize:SH,partial:!0},lH={tokenize:CH,partial:!0},uH={name:`wwwAutolink`,tokenize:_H,previous:wH},dH={name:`protocolAutolink`,tokenize:vH,previous:TH},fH={name:`emailAutolink`,tokenize:gH,previous:EH},pH={};function mH(){return{text:pH}}for(var hH=48;hH<123;)pH[hH]=fH,hH++,hH===58?hH=65:hH===91&&(hH=97);pH[43]=fH,pH[45]=fH,pH[46]=fH,pH[95]=fH,pH[72]=[fH,dH],pH[104]=[fH,dH],pH[87]=[fH,uH],pH[119]=[fH,uH];function gH(e,t,n){let r=this,i,a;return o;function o(t){return!DH(t)||!EH.call(r,r.previous)||OH(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return DH(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(lH,u,l)(t):t===45||t===95||lF(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&cF(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function _H(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!wH.call(r,r.previous)||OH(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(aH,e.attempt(oH,e.attempt(sH,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function vH(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&TH.call(r,r.previous)&&!OH(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(cF(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||dF(t)||gF(t)||yF(t)||vF(t)?n(t):e.attempt(oH,e.attempt(sH,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function yH(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function bH(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(cH,c,s)(t):t===null||gF(t)||yF(t)||t!==45&&vF(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function xH(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(cH,t,a)(o):o===null||gF(o)||yF(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function SH(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||gF(o)||yF(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||gF(e)||yF(e)?t(e):r(e)}function a(e){return cF(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):cF(t)?(e.consume(t),o):n(t)}}function CH(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return lF(e)?n(e):t(e)}}function wH(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gF(e)}function TH(e){return!cF(e)}function EH(e){return!(e===47||DH(e))}function DH(e){return e===43||e===45||e===46||e===95||lF(e)}function OH(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var kH={tokenize:LH,partial:!0};function AH(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:PH,continuation:{tokenize:FH},exit:IH}},text:{91:{name:`gfmFootnoteCall`,tokenize:NH},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:jH,resolveTo:MH}}}}function jH(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=sF(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function MH(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function NH(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||gF(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(sF(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return gF(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function PH(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||gF(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=sF(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return gF(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),SF(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function FH(e,t,n){return e.check(LF,t,e.attempt(kH,t,n))}function IH(e){e.exit(`gfmFootnoteDefinition`)}function LH(e,t,n){let r=this;return SF(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function RH(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&eF(o,o.length,0,AF(s,e.slice(r+1,n),t)),eF(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),eF(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=kF(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=kF(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var zH=class{constructor(){this.map=[]}add(e,t,n){BH(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function BH(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function VH(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function HH(){return{flow:{null:{name:`table`,tokenize:UH,resolveAll:WH}}}}function UH(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):hF(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):_F(t)?SF(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||gF(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,_F(t)?SF(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return _F(t)?SF(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||hF(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return _F(t)?SF(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||hF(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||hF(n)?(e.exit(`tableRow`),t(n)):_F(n)?SF(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||gF(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function WH(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new zH;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(KH(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=GH(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=GH(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=GH(f,t,o,i,n,d)):(o[0]=o[1],d=GH(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&KH(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=VH(t.events,n))}return e}function GH(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},qH(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=qH(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=qH(t.events,n[2]),a=qH(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},qH(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function KH(e,t,n,r,i){let a=[],o=qH(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function qH(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var JH={name:`tasklistCheck`,tokenize:XH};function YH(){return{text:{91:JH}}}function XH(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return gF(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return hF(r)?t(r):_F(r)?e.check({tokenize:ZH},t,n)(r):n(r)}}function ZH(e,t,n){return SF(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function QH(e){return rF([mH(),AH(),RH(e),HH(),YH()])}var $H={};function eU(e){let t=this,n=e||$H,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(QH(n)),a.push(rH()),o.push(iH(n))}var tU={p:({children:e})=>(0,I.jsx)(`p`,{style:{marginBlockStart:`0.5em`,marginBlockEnd:`0.5em`},children:e}),blockquote:({children:e})=>(0,I.jsx)(`blockquote`,{style:{marginBlockStart:`0em`,marginBlockEnd:`0em`},children:e}),ul:({children:e})=>(0,I.jsx)(`ul`,{style:{margin:`0.25em 0`,paddingLeft:`1.5em`},children:e}),ol:({children:e})=>(0,I.jsx)(`ol`,{style:{margin:`0.25em 0`,paddingLeft:`1.5em`},children:e})},nU=({children:e})=>(0,I.jsx)(Xz,{remarkPlugins:[eU],components:tU,children:e}),rU=({value:e,onRotate:t,rotating:n})=>{let[r,i]=(0,v.useState)(!1);return(0,I.jsxs)(B,{gap:`xs`,align:`center`,children:[e?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Yp,{children:r?e:`••••••••••••••••`}),(0,I.jsx)(M_,{label:r?`Hide`:`Show`,children:(0,I.jsx)(vu,{variant:`subtle`,size:`sm`,onClick:()=>i(e=>!e),children:r?(0,I.jsx)(lN,{size:14}):(0,I.jsx)(uN,{size:14})})}),(0,I.jsx)(M_,{label:`Copy to clipboard`,children:(0,I.jsx)(vu,{variant:`subtle`,size:`sm`,onClick:()=>{navigator.clipboard.writeText(e),_x.show({title:`Copied`,message:`Copied to clipboard`,color:`green`})},children:(0,I.jsx)(sN,{size:14})})})]}):(0,I.jsx)(V,{c:`dimmed`,size:`sm`,children:`Not set`}),t&&(0,I.jsx)(M_,{label:e?`Rotate key`:`Generate API key`,children:(0,I.jsx)(vu,{variant:`subtle`,size:`sm`,loading:n,onClick:t,children:(0,I.jsx)(dN,{size:14})})})]})};function iU(e){return e>=60?{label:`FATAL`,color:`red`}:e>=50?{label:`ERROR`,color:`red`}:e>=40?{label:`WARN`,color:`yellow`}:e>=30?{label:`INFO`,color:`blue`}:e>=20?{label:`DEBUG`,color:`gray`}:{label:`TRACE`,color:`gray`}}var aU=({fetchLogs:e,logFiles:t})=>{let[n,r]=(0,v.useState)(t?.[0]?.value),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(`all`),u=(0,v.useCallback)(async(t,n)=>{s(!0);try{a(await e(t,n===`errors`?50:void 0))}catch{a(null)}finally{s(!1)}},[e]);return(0,v.useEffect)(()=>{u(n,c)},[n,c,u]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(zv,{order:3,mt:`xl`,children:`Server Logs`}),t&&(0,I.jsx)(jv,{value:n,onChange:e=>e&&r(e),children:(0,I.jsx)(jv.List,{children:t.map(e=>(0,I.jsx)(jv.Tab,{value:e.value,children:e.label},e.value))})}),(0,I.jsxs)(B,{children:[(0,I.jsx)(H,{size:`xs`,variant:`light`,leftSection:(0,I.jsx)(dN,{size:14}),onClick:()=>u(n,c),loading:o,children:`Refresh`}),(0,I.jsx)(I_,{size:`xs`,value:c,onChange:l,data:[{value:`all`,label:`All`},{value:`errors`,label:`Errors`}]}),i?.fileSize!=null&&(0,I.jsxs)(V,{size:`sm`,c:`dimmed`,children:[`File size: `,Lj(i.fileSize)]})]}),o&&!i?(0,I.jsx)(U,{align:`center`,py:`md`,children:(0,I.jsx)(uu,{size:`sm`})}):i&&i.entries.length>0?(0,I.jsx)(fl,{h:600,children:(0,I.jsx)(R,{style:{backgroundColor:`#1a1a1a`,borderRadius:4,padding:12,fontFamily:`monospace`,fontSize:13},children:[...i.entries].reverse().map((e,t)=>{let{label:n,color:r}=iU(e.level);return(0,I.jsxs)(B,{gap:`xs`,wrap:`nowrap`,align:`flex-start`,style:{lineHeight:1.6},children:[(0,I.jsx)(V,{size:`xs`,c:`dimmed`,style:{fontFamily:`monospace`,whiteSpace:`nowrap`},children:new Date(e.time).toLocaleString()}),(0,I.jsx)(Ap,{size:`xs`,color:r,variant:`filled`,style:{flexShrink:0},children:n}),(0,I.jsxs)(V,{size:`xs`,c:`gray.3`,style:{fontFamily:`monospace`,whiteSpace:`pre-wrap`,wordBreak:`break-all`},children:[e.msg,e.detail&&(0,I.jsxs)(`span`,{style:{color:`var(--mantine-color-dimmed)`},children:[` `,e.detail]})]})]},t)})})}):(0,I.jsx)(V,{c:`dimmed`,ta:`center`,py:`md`,children:`No log entries found`})]})};function oU(e){return t=>{let n=e.safeParse(t);if(n.success)return{};let r={};for(let e of n.error.issues){let t=e.path.map(String).join(`.`);t&&(r[t]||(r[t]=e.message))}return r}}Object.freeze({status:`aborted`});function Y(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var sU=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},cU=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},lU={};function uU(e){return e&&Object.assign(lU,e),lU}function dU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function fU(e,t){return typeof t==`bigint`?t.toString():t}function pU(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function mU(e){return e==null}function hU(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function gU(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var _U=Symbol(`evaluating`);function vU(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==_U)return r===void 0&&(r=_U,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function yU(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function bU(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function xU(e){return JSON.stringify(e)}function SU(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var CU=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function wU(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var TU=pU(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function EU(e){if(wU(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(wU(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function DU(e){return EU(e)?{...e}:Array.isArray(e)?[...e]:e}var OU=new Set([`string`,`number`,`symbol`]);function kU(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function AU(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function jU(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function MU(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var NU={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function PU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return AU(e,bU(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return yU(this,`shape`,e),e},checks:[]}))}function FU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return AU(e,bU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return yU(this,`shape`,r),r},checks:[]}))}function IU(e,t){if(!EU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return AU(e,bU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return yU(this,`shape`,n),n}}))}function LU(e,t){if(!EU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return AU(e,bU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return yU(this,`shape`,n),n}}))}function RU(e,t){return AU(e,bU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return yU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function zU(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return AU(t,bU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return yU(this,`shape`,i),i},checks:[]}))}function BU(e,t,n){return AU(t,bU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return yU(this,`shape`,i),i}}))}function VU(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function HU(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function UU(e){return typeof e==`string`?e:e?.message}function WU(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=UU(e.inst?._zod.def?.error?.(e))??UU(t?.error?.(e))??UU(n.customError?.(e))??UU(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function GU(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function KU(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var qU=(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,fU,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},JU=Y(`$ZodError`,qU),YU=Y(`$ZodError`,qU,{Parent:Error});function XU(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ZU(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var QU=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new sU;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>WU(e,a,uU())));throw CU(t,i?.callee),t}return o.value},$U=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>WU(e,a,uU())));throw CU(t,i?.callee),t}return o.value},eW=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new sU;return a.issues.length?{success:!1,error:new(e??JU)(a.issues.map(e=>WU(e,i,uU())))}:{success:!0,data:a.value}},tW=eW(YU),nW=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>WU(e,i,uU())))}:{success:!0,data:a.value}},rW=nW(YU),iW=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return QU(e)(t,n,i)},aW=e=>(t,n,r)=>QU(e)(t,n,r),oW=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return $U(e)(t,n,i)},sW=e=>async(t,n,r)=>$U(e)(t,n,r),cW=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return eW(e)(t,n,i)},lW=e=>(t,n,r)=>eW(e)(t,n,r),uW=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return nW(e)(t,n,i)},dW=e=>async(t,n,r)=>nW(e)(t,n,r),fW=/^[cC][^\s-]{8,}$/,pW=/^[0-9a-z]+$/,mW=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,hW=/^[0-9a-vA-V]{20}$/,gW=/^[A-Za-z0-9]{27}$/,_W=/^[a-zA-Z0-9_-]{21}$/,vW=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,yW=/^([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})$/,bW=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,xW=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,SW=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function CW(){return new RegExp(SW,`u`)}var wW=/^(?:(?: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])$/,TW=/^(([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}|:))$/,EW=/^((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])$/,DW=/^(([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])$/,OW=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,kW=/^[A-Za-z0-9_-]*$/,AW=/^\+[1-9]\d{6,14}$/,jW=`(?:(?:\\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])))`,MW=RegExp(`^${jW}$`);function NW(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function PW(e){return RegExp(`^${NW(e)}$`)}function FW(e){let t=NW({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${jW}T(?:${r})$`)}var IW=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},LW=/^-?\d+$/,RW=/^-?\d+(?:\.\d+)?$/,zW=/^(?:true|false)$/i,BW=/^null$/i,VW=/^undefined$/i,HW=/^[^A-Z]*$/,UW=/^[^a-z]*$/,WW=Y(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),GW={number:`number`,bigint:`bigint`,object:`date`},KW=Y(`$ZodCheckLessThan`,(e,t)=>{WW.init(e,t);let n=GW[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qW=Y(`$ZodCheckGreaterThan`,(e,t)=>{WW.init(e,t);let n=GW[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),JW=Y(`$ZodCheckMultipleOf`,(e,t)=>{WW.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):gU(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),YW=Y(`$ZodCheckNumberFormat`,(e,t)=>{WW.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=NU[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=LW)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),XW=Y(`$ZodCheckMaxLength`,(e,t)=>{var n;WW.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!mU(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=GU(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ZW=Y(`$ZodCheckMinLength`,(e,t)=>{var n;WW.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!mU(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=GU(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),QW=Y(`$ZodCheckLengthEquals`,(e,t)=>{var n;WW.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!mU(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=GU(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),$W=Y(`$ZodCheckStringFormat`,(e,t)=>{var n,r;WW.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),eG=Y(`$ZodCheckRegex`,(e,t)=>{$W.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),tG=Y(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=HW,$W.init(e,t)}),nG=Y(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=UW,$W.init(e,t)}),rG=Y(`$ZodCheckIncludes`,(e,t)=>{WW.init(e,t);let n=kU(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),iG=Y(`$ZodCheckStartsWith`,(e,t)=>{WW.init(e,t);let n=RegExp(`^${kU(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),aG=Y(`$ZodCheckEndsWith`,(e,t)=>{WW.init(e,t);let n=RegExp(`.*${kU(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),oG=Y(`$ZodCheckOverwrite`,(e,t)=>{WW.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),sG=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
131
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
132
|
+
`))}},cG={major:4,minor:3,patch:6},lG=Y(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=cG;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=VU(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new sU;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=VU(e,t))});else{if(e.issues.length===t)continue;r||=VU(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(VU(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new sU;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new sU;return o.then(e=>t(e,r,a))}return t(o,r,a)}}vU(e,`~standard`,()=>({validate:t=>{try{let n=tW(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return rW(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),uG=Y(`$ZodString`,(e,t)=>{lG.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??IW(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),dG=Y(`$ZodStringFormat`,(e,t)=>{$W.init(e,t),uG.init(e,t)}),fG=Y(`$ZodGUID`,(e,t)=>{t.pattern??=yW,dG.init(e,t)}),pG=Y(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=bW(e)}else t.pattern??=bW();dG.init(e,t)}),mG=Y(`$ZodEmail`,(e,t)=>{t.pattern??=xW,dG.init(e,t)}),hG=Y(`$ZodURL`,(e,t)=>{dG.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),gG=Y(`$ZodEmoji`,(e,t)=>{t.pattern??=CW(),dG.init(e,t)}),_G=Y(`$ZodNanoID`,(e,t)=>{t.pattern??=_W,dG.init(e,t)}),vG=Y(`$ZodCUID`,(e,t)=>{t.pattern??=fW,dG.init(e,t)}),yG=Y(`$ZodCUID2`,(e,t)=>{t.pattern??=pW,dG.init(e,t)}),bG=Y(`$ZodULID`,(e,t)=>{t.pattern??=mW,dG.init(e,t)}),xG=Y(`$ZodXID`,(e,t)=>{t.pattern??=hW,dG.init(e,t)}),SG=Y(`$ZodKSUID`,(e,t)=>{t.pattern??=gW,dG.init(e,t)}),CG=Y(`$ZodISODateTime`,(e,t)=>{t.pattern??=FW(t),dG.init(e,t)}),wG=Y(`$ZodISODate`,(e,t)=>{t.pattern??=MW,dG.init(e,t)}),TG=Y(`$ZodISOTime`,(e,t)=>{t.pattern??=PW(t),dG.init(e,t)}),EG=Y(`$ZodISODuration`,(e,t)=>{t.pattern??=vW,dG.init(e,t)}),DG=Y(`$ZodIPv4`,(e,t)=>{t.pattern??=wW,dG.init(e,t),e._zod.bag.format=`ipv4`}),OG=Y(`$ZodIPv6`,(e,t)=>{t.pattern??=TW,dG.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),kG=Y(`$ZodCIDRv4`,(e,t)=>{t.pattern??=EW,dG.init(e,t)}),AG=Y(`$ZodCIDRv6`,(e,t)=>{t.pattern??=DW,dG.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function jG(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var MG=Y(`$ZodBase64`,(e,t)=>{t.pattern??=OW,dG.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{jG(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function NG(e){if(!kW.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return jG(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var PG=Y(`$ZodBase64URL`,(e,t)=>{t.pattern??=kW,dG.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{NG(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),FG=Y(`$ZodE164`,(e,t)=>{t.pattern??=AW,dG.init(e,t)});function IG(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var LG=Y(`$ZodJWT`,(e,t)=>{dG.init(e,t),e._zod.check=n=>{IG(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),RG=Y(`$ZodNumber`,(e,t)=>{lG.init(e,t),e._zod.pattern=e._zod.bag.pattern??RW,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),zG=Y(`$ZodNumberFormat`,(e,t)=>{YW.init(e,t),RG.init(e,t)}),BG=Y(`$ZodBoolean`,(e,t)=>{lG.init(e,t),e._zod.pattern=zW,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),VG=Y(`$ZodUndefined`,(e,t)=>{lG.init(e,t),e._zod.pattern=VW,e._zod.values=new Set([void 0]),e._zod.optin=`optional`,e._zod.optout=`optional`,e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),HG=Y(`$ZodNull`,(e,t)=>{lG.init(e,t),e._zod.pattern=BW,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),UG=Y(`$ZodAny`,(e,t)=>{lG.init(e,t),e._zod.parse=e=>e}),WG=Y(`$ZodUnknown`,(e,t)=>{lG.init(e,t),e._zod.parse=e=>e}),GG=Y(`$ZodNever`,(e,t)=>{lG.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function KG(e,t,n){e.issues.length&&t.issues.push(...HU(n,e.issues)),t.value[n]=e.value}var qG=Y(`$ZodArray`,(e,t)=>{lG.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>KG(t,n,e))):KG(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function JG(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...HU(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function YG(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=MU(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function XG(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>JG(e,n,i,t,u))):JG(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var ZG=Y(`$ZodObject`,(e,t)=>{if(lG.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=pU(()=>YG(t));vU(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=wU,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>JG(n,t,e,s,r))):JG(i,t,e,s,r)}return i?XG(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),QG=Y(`$ZodObjectJIT`,(e,t)=>{ZG.init(e,t);let n=e._zod.parse,r=pU(()=>YG(t)),i=e=>{let t=new sG([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=xU(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=xU(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
133
|
+
if (${n}.issues.length) {
|
|
134
|
+
if (${o} in input) {
|
|
135
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
136
|
+
...iss,
|
|
137
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
138
|
+
})));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (${n}.value === undefined) {
|
|
143
|
+
if (${o} in input) {
|
|
144
|
+
newResult[${o}] = undefined;
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
newResult[${o}] = ${n}.value;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
`):t.write(`
|
|
151
|
+
if (${n}.issues.length) {
|
|
152
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
153
|
+
...iss,
|
|
154
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
155
|
+
})));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (${n}.value === undefined) {
|
|
159
|
+
if (${o} in input) {
|
|
160
|
+
newResult[${o}] = undefined;
|
|
161
|
+
}
|
|
162
|
+
} else {
|
|
163
|
+
newResult[${o}] = ${n}.value;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=wU,s=!lU.jitless,c=s&&TU.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?XG([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function $G(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!VU(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>WU(e,r,uU())))}),t)}var eK=Y(`$ZodUnion`,(e,t)=>{lG.init(e,t),vU(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),vU(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),vU(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),vU(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>hU(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>$G(t,i,e,a)):$G(s,i,e,a)}}),tK=Y(`$ZodIntersection`,(e,t)=>{lG.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>rK(e,t,n)):rK(e,i,a)}});function nK(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(EU(e)&&EU(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=nK(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=nK(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function rK(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),VU(e))return e;let o=nK(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var iK=Y(`$ZodEnum`,(e,t)=>{lG.init(e,t);let n=dU(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>OU.has(typeof e)).map(e=>typeof e==`string`?kU(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),aK=Y(`$ZodLiteral`,(e,t)=>{if(lG.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?kU(e):e?kU(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),oK=Y(`$ZodTransform`,(e,t)=>{lG.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new cU(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new sU;return n.value=i,n}});function sK(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var cK=Y(`$ZodOptional`,(e,t)=>{lG.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,vU(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),vU(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${hU(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>sK(t,e.value)):sK(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),lK=Y(`$ZodExactOptional`,(e,t)=>{cK.init(e,t),vU(e._zod,`values`,()=>t.innerType._zod.values),vU(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),uK=Y(`$ZodNullable`,(e,t)=>{lG.init(e,t),vU(e._zod,`optin`,()=>t.innerType._zod.optin),vU(e._zod,`optout`,()=>t.innerType._zod.optout),vU(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${hU(e.source)}|null)$`):void 0}),vU(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),dK=Y(`$ZodDefault`,(e,t)=>{lG.init(e,t),e._zod.optin=`optional`,vU(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>fK(e,t)):fK(r,t)}});function fK(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var pK=Y(`$ZodPrefault`,(e,t)=>{lG.init(e,t),e._zod.optin=`optional`,vU(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),mK=Y(`$ZodNonOptional`,(e,t)=>{lG.init(e,t),vU(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>hK(t,e)):hK(i,e)}});function hK(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var gK=Y(`$ZodCatch`,(e,t)=>{lG.init(e,t),vU(e._zod,`optin`,()=>t.innerType._zod.optin),vU(e._zod,`optout`,()=>t.innerType._zod.optout),vU(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>WU(e,n,uU()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>WU(e,n,uU()))},input:e.value}),e.issues=[]),e)}}),_K=Y(`$ZodPipe`,(e,t)=>{lG.init(e,t),vU(e._zod,`values`,()=>t.in._zod.values),vU(e._zod,`optin`,()=>t.in._zod.optin),vU(e._zod,`optout`,()=>t.out._zod.optout),vU(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>vK(e,t.in,n)):vK(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>vK(e,t.out,n)):vK(r,t.out,n)}});function vK(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var yK=Y(`$ZodReadonly`,(e,t)=>{lG.init(e,t),vU(e._zod,`propValues`,()=>t.innerType._zod.propValues),vU(e._zod,`values`,()=>t.innerType._zod.values),vU(e._zod,`optin`,()=>t.innerType?._zod?.optin),vU(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(bK):bK(r)}});function bK(e){return e.value=Object.freeze(e.value),e}var xK=Y(`$ZodCustom`,(e,t)=>{WW.init(e,t),lG.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>SK(t,n,r,e));SK(i,n,r,e)}});function SK(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(KU(e))}}var CK,wK=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function TK(){return new wK}(CK=globalThis).__zod_globalRegistry??(CK.__zod_globalRegistry=TK());var EK=globalThis.__zod_globalRegistry;function DK(e,t){return new e({type:`string`,...jU(t)})}function OK(e,t){return new e({type:`string`,coerce:!0,...jU(t)})}function kK(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...jU(t)})}function AK(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...jU(t)})}function jK(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...jU(t)})}function MK(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...jU(t)})}function NK(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...jU(t)})}function PK(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...jU(t)})}function FK(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...jU(t)})}function IK(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...jU(t)})}function LK(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...jU(t)})}function RK(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...jU(t)})}function zK(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...jU(t)})}function BK(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...jU(t)})}function VK(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...jU(t)})}function HK(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...jU(t)})}function UK(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...jU(t)})}function WK(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...jU(t)})}function GK(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...jU(t)})}function KK(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...jU(t)})}function qK(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...jU(t)})}function JK(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...jU(t)})}function YK(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...jU(t)})}function XK(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...jU(t)})}function ZK(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...jU(t)})}function QK(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...jU(t)})}function $K(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...jU(t)})}function eq(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...jU(t)})}function tq(e,t){return new e({type:`number`,checks:[],...jU(t)})}function nq(e,t){return new e({type:`number`,coerce:!0,checks:[],...jU(t)})}function rq(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...jU(t)})}function iq(e,t){return new e({type:`boolean`,...jU(t)})}function aq(e,t){return new e({type:`undefined`,...jU(t)})}function oq(e,t){return new e({type:`null`,...jU(t)})}function sq(e){return new e({type:`any`})}function cq(e){return new e({type:`unknown`})}function lq(e,t){return new e({type:`never`,...jU(t)})}function uq(e,t){return new KW({check:`less_than`,...jU(t),value:e,inclusive:!1})}function dq(e,t){return new KW({check:`less_than`,...jU(t),value:e,inclusive:!0})}function fq(e,t){return new qW({check:`greater_than`,...jU(t),value:e,inclusive:!1})}function pq(e,t){return new qW({check:`greater_than`,...jU(t),value:e,inclusive:!0})}function mq(e,t){return new JW({check:`multiple_of`,...jU(t),value:e})}function hq(e,t){return new XW({check:`max_length`,...jU(t),maximum:e})}function gq(e,t){return new ZW({check:`min_length`,...jU(t),minimum:e})}function _q(e,t){return new QW({check:`length_equals`,...jU(t),length:e})}function vq(e,t){return new eG({check:`string_format`,format:`regex`,...jU(t),pattern:e})}function yq(e){return new tG({check:`string_format`,format:`lowercase`,...jU(e)})}function bq(e){return new nG({check:`string_format`,format:`uppercase`,...jU(e)})}function xq(e,t){return new rG({check:`string_format`,format:`includes`,...jU(t),includes:e})}function Sq(e,t){return new iG({check:`string_format`,format:`starts_with`,...jU(t),prefix:e})}function Cq(e,t){return new aG({check:`string_format`,format:`ends_with`,...jU(t),suffix:e})}function wq(e){return new oG({check:`overwrite`,tx:e})}function Tq(e){return wq(t=>t.normalize(e))}function Eq(){return wq(e=>e.trim())}function Dq(){return wq(e=>e.toLowerCase())}function Oq(){return wq(e=>e.toUpperCase())}function kq(){return wq(e=>SU(e))}function Aq(e,t,n){return new e({type:`array`,element:t,...jU(n)})}function jq(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...jU(n)})}function Mq(e){let t=Nq(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(KU(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(KU(r))}},e(n.value,n)));return t}function Nq(e,t){let n=new WW({check:`custom`,...jU(t)});return n._zod.check=e,n}function Pq(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??EK,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function Fq(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Fq(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&Rq(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Iq(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
167
|
+
|
|
168
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Lq(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:Bq(t,`input`,e.processors),output:Bq(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Rq(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Rq(r.element,n);if(r.type===`set`)return Rq(r.valueType,n);if(r.type===`lazy`)return Rq(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return Rq(r.innerType,n);if(r.type===`intersection`)return Rq(r.left,n)||Rq(r.right,n);if(r.type===`record`||r.type===`map`)return Rq(r.keyType,n)||Rq(r.valueType,n);if(r.type===`pipe`)return Rq(r.in,n)||Rq(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Rq(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Rq(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Rq(e,n))return!0;return!!(r.rest&&Rq(r.rest,n))}return!1}var zq=(e,t={})=>n=>{let r=Pq({...n,processors:t});return Fq(e,r),Iq(r,e),Lq(r,e)},Bq=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Pq({...i??{},target:a,io:t,processors:n});return Fq(e,o),Iq(o,e),Lq(o,e)},Vq={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Hq=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Vq[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Uq=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},Wq=(e,t,n,r)=>{n.type=`boolean`},Gq=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Kq=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},qq=(e,t,n,r)=>{n.not={}},Jq=(e,t,n,r)=>{let i=e._zod.def,a=dU(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Yq=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Xq=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Zq=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Qq=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Fq(a.element,t,{...r,path:[...r.path,`items`]})},$q=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Fq(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Fq(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},eJ=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Fq(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},tJ=(e,t,n,r)=>{let i=e._zod.def,a=Fq(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Fq(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},nJ=(e,t,n,r)=>{let i=e._zod.def,a=Fq(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},rJ=(e,t,n,r)=>{let i=e._zod.def;Fq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},iJ=(e,t,n,r)=>{let i=e._zod.def;Fq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},aJ=(e,t,n,r)=>{let i=e._zod.def;Fq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},oJ=(e,t,n,r)=>{let i=e._zod.def;Fq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},sJ=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;Fq(a,t,r);let o=t.seen.get(e);o.ref=a},cJ=(e,t,n,r)=>{let i=e._zod.def;Fq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},lJ=(e,t,n,r)=>{let i=e._zod.def;Fq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},uJ=Y(`ZodISODateTime`,(e,t)=>{CG.init(e,t),FJ.init(e,t)});function dJ(e){return ZK(uJ,e)}var fJ=Y(`ZodISODate`,(e,t)=>{wG.init(e,t),FJ.init(e,t)});function pJ(e){return QK(fJ,e)}var mJ=Y(`ZodISOTime`,(e,t)=>{TG.init(e,t),FJ.init(e,t)});function hJ(e){return $K(mJ,e)}var gJ=Y(`ZodISODuration`,(e,t)=>{EG.init(e,t),FJ.init(e,t)});function _J(e){return eq(gJ,e)}var vJ=(e,t)=>{JU.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>ZU(e,t)},flatten:{value:t=>XU(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,fU,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,fU,2)}},isEmpty:{get(){return e.issues.length===0}}})};Y(`ZodError`,vJ);var yJ=Y(`ZodError`,vJ,{Parent:Error}),bJ=QU(yJ),xJ=$U(yJ),SJ=eW(yJ),CJ=nW(yJ),wJ=iW(yJ),TJ=aW(yJ),EJ=oW(yJ),DJ=sW(yJ),OJ=cW(yJ),kJ=lW(yJ),AJ=uW(yJ),jJ=dW(yJ),MJ=Y(`ZodType`,(e,t)=>(lG.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Bq(e,`input`),output:Bq(e,`output`)}}),e.toJSONSchema=zq(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(bU(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>AU(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>bJ(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>SJ(e,t,n),e.parseAsync=async(t,n)=>xJ(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>CJ(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>wJ(e,t,n),e.decode=(t,n)=>TJ(e,t,n),e.encodeAsync=async(t,n)=>EJ(e,t,n),e.decodeAsync=async(t,n)=>DJ(e,t,n),e.safeEncode=(t,n)=>OJ(e,t,n),e.safeDecode=(t,n)=>kJ(e,t,n),e.safeEncodeAsync=async(t,n)=>AJ(e,t,n),e.safeDecodeAsync=async(t,n)=>jJ(e,t,n),e.refine=(t,n)=>e.check(qY(t,n)),e.superRefine=t=>e.check(JY(t)),e.overwrite=t=>e.check(wq(t)),e.optional=()=>kY(e),e.exactOptional=()=>jY(e),e.nullable=()=>NY(e),e.nullish=()=>kY(NY(e)),e.nonoptional=t=>zY(e,t),e.array=()=>Q(e),e.or=t=>yY([e,t]),e.and=t=>xY(e,t),e.transform=t=>UY(e,DY(t)),e.default=t=>FY(e,t),e.prefault=t=>LY(e,t),e.catch=t=>VY(e,t),e.pipe=t=>UY(e,t),e.readonly=()=>GY(e),e.describe=t=>{let n=e.clone();return EK.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return EK.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return EK.get(e);let n=e.clone();return EK.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),NJ=Y(`_ZodString`,(e,t)=>{uG.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hq(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(vq(...t)),e.includes=(...t)=>e.check(xq(...t)),e.startsWith=(...t)=>e.check(Sq(...t)),e.endsWith=(...t)=>e.check(Cq(...t)),e.min=(...t)=>e.check(gq(...t)),e.max=(...t)=>e.check(hq(...t)),e.length=(...t)=>e.check(_q(...t)),e.nonempty=(...t)=>e.check(gq(1,...t)),e.lowercase=t=>e.check(yq(t)),e.uppercase=t=>e.check(bq(t)),e.trim=()=>e.check(Eq()),e.normalize=(...t)=>e.check(Tq(...t)),e.toLowerCase=()=>e.check(Dq()),e.toUpperCase=()=>e.check(Oq()),e.slugify=()=>e.check(kq())}),PJ=Y(`ZodString`,(e,t)=>{uG.init(e,t),NJ.init(e,t),e.email=t=>e.check(kK(IJ,t)),e.url=t=>e.check(FK(zJ,t)),e.jwt=t=>e.check(XK(eY,t)),e.emoji=t=>e.check(IK(BJ,t)),e.guid=t=>e.check(AK(LJ,t)),e.uuid=t=>e.check(jK(RJ,t)),e.uuidv4=t=>e.check(MK(RJ,t)),e.uuidv6=t=>e.check(NK(RJ,t)),e.uuidv7=t=>e.check(PK(RJ,t)),e.nanoid=t=>e.check(LK(VJ,t)),e.guid=t=>e.check(AK(LJ,t)),e.cuid=t=>e.check(RK(HJ,t)),e.cuid2=t=>e.check(zK(UJ,t)),e.ulid=t=>e.check(BK(WJ,t)),e.base64=t=>e.check(qK(ZJ,t)),e.base64url=t=>e.check(JK(QJ,t)),e.xid=t=>e.check(VK(GJ,t)),e.ksuid=t=>e.check(HK(KJ,t)),e.ipv4=t=>e.check(UK(qJ,t)),e.ipv6=t=>e.check(WK(JJ,t)),e.cidrv4=t=>e.check(GK(YJ,t)),e.cidrv6=t=>e.check(KK(XJ,t)),e.e164=t=>e.check(YK($J,t)),e.datetime=t=>e.check(dJ(t)),e.date=t=>e.check(pJ(t)),e.time=t=>e.check(hJ(t)),e.duration=t=>e.check(_J(t))});function X(e){return DK(PJ,e)}var FJ=Y(`ZodStringFormat`,(e,t)=>{dG.init(e,t),NJ.init(e,t)}),IJ=Y(`ZodEmail`,(e,t)=>{mG.init(e,t),FJ.init(e,t)}),LJ=Y(`ZodGUID`,(e,t)=>{fG.init(e,t),FJ.init(e,t)}),RJ=Y(`ZodUUID`,(e,t)=>{pG.init(e,t),FJ.init(e,t)}),zJ=Y(`ZodURL`,(e,t)=>{hG.init(e,t),FJ.init(e,t)}),BJ=Y(`ZodEmoji`,(e,t)=>{gG.init(e,t),FJ.init(e,t)}),VJ=Y(`ZodNanoID`,(e,t)=>{_G.init(e,t),FJ.init(e,t)}),HJ=Y(`ZodCUID`,(e,t)=>{vG.init(e,t),FJ.init(e,t)}),UJ=Y(`ZodCUID2`,(e,t)=>{yG.init(e,t),FJ.init(e,t)}),WJ=Y(`ZodULID`,(e,t)=>{bG.init(e,t),FJ.init(e,t)}),GJ=Y(`ZodXID`,(e,t)=>{xG.init(e,t),FJ.init(e,t)}),KJ=Y(`ZodKSUID`,(e,t)=>{SG.init(e,t),FJ.init(e,t)}),qJ=Y(`ZodIPv4`,(e,t)=>{DG.init(e,t),FJ.init(e,t)}),JJ=Y(`ZodIPv6`,(e,t)=>{OG.init(e,t),FJ.init(e,t)}),YJ=Y(`ZodCIDRv4`,(e,t)=>{kG.init(e,t),FJ.init(e,t)}),XJ=Y(`ZodCIDRv6`,(e,t)=>{AG.init(e,t),FJ.init(e,t)}),ZJ=Y(`ZodBase64`,(e,t)=>{MG.init(e,t),FJ.init(e,t)}),QJ=Y(`ZodBase64URL`,(e,t)=>{PG.init(e,t),FJ.init(e,t)}),$J=Y(`ZodE164`,(e,t)=>{FG.init(e,t),FJ.init(e,t)}),eY=Y(`ZodJWT`,(e,t)=>{LG.init(e,t),FJ.init(e,t)}),tY=Y(`ZodNumber`,(e,t)=>{RG.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uq(e,t,n,r),e.gt=(t,n)=>e.check(fq(t,n)),e.gte=(t,n)=>e.check(pq(t,n)),e.min=(t,n)=>e.check(pq(t,n)),e.lt=(t,n)=>e.check(uq(t,n)),e.lte=(t,n)=>e.check(dq(t,n)),e.max=(t,n)=>e.check(dq(t,n)),e.int=t=>e.check(rY(t)),e.safe=t=>e.check(rY(t)),e.positive=t=>e.check(fq(0,t)),e.nonnegative=t=>e.check(pq(0,t)),e.negative=t=>e.check(uq(0,t)),e.nonpositive=t=>e.check(dq(0,t)),e.multipleOf=(t,n)=>e.check(mq(t,n)),e.step=(t,n)=>e.check(mq(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Z(e){return tq(tY,e)}var nY=Y(`ZodNumberFormat`,(e,t)=>{zG.init(e,t),tY.init(e,t)});function rY(e){return rq(nY,e)}var iY=Y(`ZodBoolean`,(e,t)=>{BG.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wq(e,t,n,r)});function aY(e){return iq(iY,e)}var oY=Y(`ZodUndefined`,(e,t)=>{VG.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kq(e,t,n,r)});function sY(e){return aq(oY,e)}var cY=Y(`ZodNull`,(e,t)=>{HG.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gq(e,t,n,r)});function lY(e){return oq(cY,e)}var uY=Y(`ZodAny`,(e,t)=>{UG.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function dY(){return sq(uY)}var fY=Y(`ZodUnknown`,(e,t)=>{WG.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function pY(){return cq(fY)}var mY=Y(`ZodNever`,(e,t)=>{GG.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qq(e,t,n,r)});function hY(e){return lq(mY,e)}var gY=Y(`ZodArray`,(e,t)=>{qG.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qq(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(gq(t,n)),e.nonempty=t=>e.check(gq(1,t)),e.max=(t,n)=>e.check(hq(t,n)),e.length=(t,n)=>e.check(_q(t,n)),e.unwrap=()=>e.element});function Q(e,t){return Aq(gY,e,t)}var _Y=Y(`ZodObject`,(e,t)=>{QG.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$q(e,t,n,r),vU(e,`shape`,()=>t.shape),e.keyof=()=>CY(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:pY()}),e.loose=()=>e.clone({...e._zod.def,catchall:pY()}),e.strict=()=>e.clone({...e._zod.def,catchall:hY()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>IU(e,t),e.safeExtend=t=>LU(e,t),e.merge=t=>RU(e,t),e.pick=t=>PU(e,t),e.omit=t=>FU(e,t),e.partial=(...t)=>zU(OY,e,t[0]),e.required=(...t)=>BU(RY,e,t[0])});function $(e,t){return new _Y({type:`object`,shape:e??{},...jU(t)})}var vY=Y(`ZodUnion`,(e,t)=>{eK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eJ(e,t,n,r),e.options=t.options});function yY(e,t){return new vY({type:`union`,options:e,...jU(t)})}var bY=Y(`ZodIntersection`,(e,t)=>{tK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tJ(e,t,n,r)});function xY(e,t){return new bY({type:`intersection`,left:e,right:t})}var SY=Y(`ZodEnum`,(e,t)=>{iK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jq(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new SY({...t,checks:[],...jU(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new SY({...t,checks:[],...jU(r),entries:i})}});function CY(e,t){return new SY({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...jU(t)})}var wY=Y(`ZodLiteral`,(e,t)=>{aK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yq(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function TY(e,t){return new wY({type:`literal`,values:Array.isArray(e)?e:[e],...jU(t)})}var EY=Y(`ZodTransform`,(e,t)=>{oK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zq(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new cU(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(KU(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(KU(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function DY(e){return new EY({type:`transform`,transform:e})}var OY=Y(`ZodOptional`,(e,t)=>{cK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kY(e){return new OY({type:`optional`,innerType:e})}var AY=Y(`ZodExactOptional`,(e,t)=>{lK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jY(e){return new AY({type:`optional`,innerType:e})}var MY=Y(`ZodNullable`,(e,t)=>{uK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function NY(e){return new MY({type:`nullable`,innerType:e})}var PY=Y(`ZodDefault`,(e,t)=>{dK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function FY(e,t){return new PY({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():DU(t)}})}var IY=Y(`ZodPrefault`,(e,t)=>{pK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function LY(e,t){return new IY({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():DU(t)}})}var RY=Y(`ZodNonOptional`,(e,t)=>{mK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zY(e,t){return new RY({type:`nonoptional`,innerType:e,...jU(t)})}var BY=Y(`ZodCatch`,(e,t)=>{gK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function VY(e,t){return new BY({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var HY=Y(`ZodPipe`,(e,t)=>{_K.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sJ(e,t,n,r),e.in=t.in,e.out=t.out});function UY(e,t){return new HY({type:`pipe`,in:e,out:t})}var WY=Y(`ZodReadonly`,(e,t)=>{yK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function GY(e){return new WY({type:`readonly`,innerType:e})}var KY=Y(`ZodCustom`,(e,t)=>{xK.init(e,t),MJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xq(e,t,n,r)});function qY(e,t={}){return jq(KY,e,t)}function JY(e){return Mq(e)}function YY(e){return OK(PJ,e)}function XY(e){return nq(tY,e)}$({erpDbPath:X(),erpDbSize:Z().optional(),_actions:Q(Uj).optional()});var ZY=$({id:X(),filename:X(),fileSize:Z(),fileHash:X(),uploadedBy:X(),createdAt:X()});$({page:XY().optional().default(1),pageSize:XY().optional().default(50)}),$({attachments:Q(ZY),total:Z(),page:Z(),pageSize:Z(),_links:Q(Vj)});var QY=$({level:Z(),time:Z(),msg:X(),detail:X().optional()});$({lines:XY().optional().default(200),minLevel:XY().optional()}),$({entries:Q(QY),fileName:X(),fileSize:Z().optional()}),$({message:X()}),$({items:Q($({id:Z(),entityType:X(),entityId:Z(),action:X(),field:X(),oldValue:X().nullable(),newValue:X().nullable(),userId:Z(),createdAt:dJ()}))}),$({entityType:X(),entityId:XY().int()});var $Y=$({username:X().min(1),password:X().min(1)}).strict();$({user:$({id:Z(),username:X(),permissions:Q(X()).optional()})}),$({statusCode:Z().int(),error:X(),message:X()});var eX=CY([`string`,`number`,`date`,`datetime`,`yesNo`,`checkbox`,`attachment`]),tX=eX.enum,nX=$({id:Z(),fieldSetId:Z(),seqNo:Z(),label:X(),type:eX,isArray:aY(),required:aY(),createdAt:dJ(),createdBy:X(),updatedAt:dJ(),updatedBy:X(),_links:Q(Vj).optional(),_actions:Q(Uj).optional()}),rX=$({seqNo:Z().int().min(1).optional(),label:X().min(1).max(200),type:eX.optional(),isArray:aY().optional(),required:aY().optional()}).strict();$({items:Q(rX).min(1).max(100)});var iX=$({seqNo:Z().int().min(1).optional(),label:X().min(1).max(200).optional(),type:eX.optional(),isArray:aY().optional(),required:aY().optional()}).strict(),aX=$({items:Q(nX),total:Z(),nextSeqNo:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()}),oX=$({valid:aY(),error:X().optional()}),sX=$({id:X(),filename:X(),fileSize:Z(),downloadHref:X().optional()}),cX=YY(),lX=yY([Q(cX),cX]),uX=$({fieldId:Z(),fieldSeqNo:Z(),label:X(),type:X(),valueFormat:X(),required:aY(),setIndex:Z(),value:lX,attachments:Q(sX).optional(),validation:oX});$({attachmentId:X(),filename:X(),fileSize:Z()});var dX=$({id:Z(),operationRunId:Z(),stepId:Z(),seqNo:Z(),title:X(),instructions:X(),multiSet:aY(),completed:aY(),note:X().nullable(),fieldCount:Z().optional(),fieldValues:Q(uX).optional(),createdAt:dJ(),createdBy:X(),updatedAt:dJ(),updatedBy:X(),_links:Q(Vj).optional(),_actions:Q(Uj).optional(),_actionTemplates:Q(Wj).optional()}),fX=YY().max(2e3);$({value:yY([Q(fX),fX])}).strict(),$({fieldValues:Q($({fieldSeqNo:Z().int(),value:yY([Q(fX),fX])}))}).strict();var pX=$({items:Q(uX),total:Z()});uX.extend({_actions:Q(Uj).optional(),_actionTemplates:Q(Wj).optional()}),pX.extend({_actions:Q(Uj).optional(),_actionTemplates:Q(Wj).optional()}),$({setCount:Z(),_actions:Q(Uj).optional(),_actionTemplates:Q(Wj).optional()}),$({id:Z(),completed:aY(),note:X().nullable(),updatedAt:dJ(),updatedBy:X(),_actions:Q(Uj).optional(),_actionTemplates:Q(Wj).optional()}),$({includeFields:yY([TY(`true`),TY(`false`)]).transform(e=>e===`true`).optional()}),$({items:Q(dX),total:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()});var mX=$({seqNo:Z(),label:X(),type:eX}),hX=$({id:Z(),seqNo:Z(),title:X(),sourceOpSeqNo:Z(),sourceOpTitle:X(),sourceStepSeqNo:Z(),sourceStepTitle:X(),fields:Q(mX),createdAt:dJ(),createdBy:X(),_links:Q(Vj).optional(),_actions:Q(Uj).optional()});$({seqNo:Z().int().min(1).optional(),title:X().min(1).max(200),sourceOpSeqNo:Z().int().min(1),sourceStepSeqNo:Z().int().min(1)}).strict(),$({items:Q(hX),total:Z(),nextSeqNo:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()});var gX=$({seqNo:Z(),title:X(),sourceOpSeqNo:Z(),sourceOpTitle:X(),sourceStepSeqNo:Z(),sourceStepTitle:X(),multiSet:aY(),fieldValues:Q(uX)});$({page:XY().int().min(1).optional().default(1),pageSize:XY().int().min(1).max(100).optional().default(20),search:X().optional()}),$({items:Q($({id:Z(),itemKey:X(),key:X(),quantity:Z().nullable(),orderKey:X().nullable(),orderRunNo:Z().nullable(),createdAt:dJ()})),total:Z(),page:Z(),pageSize:Z(),_links:Q(Vj),_actionTemplates:Q(Wj).optional()});var _X=$({id:Z(),itemKey:X(),orderKey:X().nullable(),orderRunNo:Z().nullable(),key:X(),quantity:Z().nullable(),fieldValues:Q(uX),createdBy:X(),createdAt:dJ(),updatedBy:X(),updatedAt:dJ(),_links:Q(Vj).optional(),_actions:Q(Uj).optional(),_actionTemplates:Q(Wj).optional()});$({key:X().min(1).max(200),quantity:Z().nullable().optional(),orderRunId:Z().nullable().optional()}).strict(),$({key:X().min(1).max(200).optional(),quantity:Z().nullable().optional(),orderRunId:Z().nullable().optional()}).strict(),$({page:XY().int().min(1).optional().default(1),pageSize:XY().int().min(1).max(100).optional().default(20),search:X().optional()}),$({items:Q(_X),total:Z(),page:Z(),pageSize:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()});var vX=$({id:Z(),key:X(),description:X(),fields:aX,createdBy:X(),createdAt:dJ(),updatedBy:X(),updatedAt:dJ(),_links:Q(Vj).optional(),_actions:Q(Uj).optional()});$({key:X().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/,`Key must be alphanumeric with hyphens`),description:X().max(2e3).optional().default(``)}).strict(),$({key:X().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/,`Key must be alphanumeric with hyphens`).optional(),description:X().max(2e3).optional()}).strict(),$({page:XY().int().min(1).optional().default(1),pageSize:XY().int().min(1).max(100).optional().default(20),search:X().optional()}),$({items:Q(vX),total:Z(),page:Z(),pageSize:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()});var yX=$({id:Z(),operationRunId:Z(),userId:Z(),username:X(),runId:Z().nullable(),clockIn:dJ(),clockOut:dJ().nullable(),cost:Z().nullable(),createdAt:dJ(),createdBy:X(),updatedAt:dJ(),updatedBy:X(),_links:Q(Vj).optional()});$({userId:Z().int().optional(),ticketId:Z().int().optional()}).strict(),$({items:Q(yX),total:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional(),_actionTemplates:Q(Wj).optional()});var bX=$({seqNo:Z(),title:X()}),xX=$({seqNo:Z(),title:X()}),SX=$({id:Z(),orderRevId:Z(),seqNo:Z(),title:X(),description:X(),workCenterKey:X().nullable(),stepCount:Z().optional(),stepSummary:Q(xX).optional(),predecessors:Q(bX).optional(),createdAt:dJ(),createdBy:X(),updatedAt:dJ(),updatedBy:X(),_links:Q(Vj).optional(),_actions:Q(Uj).optional()}),CX=$({seqNo:Z().int().min(1).optional(),title:X().min(1).max(200),description:X().max(2e3).optional(),workCenterKey:X().max(100).nullable().optional(),predecessorSeqNos:Q(Z().int().min(1)).optional()}).strict(),wX=$({title:X().min(1).max(200).optional(),description:X().max(2e3).optional(),workCenterKey:X().max(100).nullable().optional(),seqNo:Z().int().min(1).optional()}).strict();$({items:Q(SX),total:Z(),nextSeqNo:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()});var TX=$({seqNo:Z(),title:X(),completed:aY()}),EX=CY([`blocked`,`pending`,`in_progress`,`completed`,`skipped`,`failed`]),DX=EX.enum,OX=$({id:Z(),orderRunId:Z(),operationId:Z(),seqNo:Z(),title:X(),description:X(),workCenterKey:X().nullable(),stepCount:Z().optional(),predecessors:Q(bX).optional(),status:EX,assignedTo:X().nullable(),cost:Z().nullable(),note:X().nullable(),completedAt:dJ().nullable(),stepSummary:Q(TX).optional(),fieldRefSummary:Q(gX).optional(),createdAt:dJ(),createdBy:X(),updatedAt:dJ(),updatedBy:X(),_links:Q(Vj).optional(),_actions:Q(Uj).optional()});$({assignedToId:Z().int().nullable().optional()}).strict(),yY([$({note:X().max(2e3).optional()}).strict(),lY(),sY()]).transform(e=>e??{}),$({id:Z(),status:EX,assignedTo:X().nullable(),cost:Z().nullable(),note:X().nullable(),completedAt:dJ().nullable(),updatedAt:dJ(),updatedBy:X(),_actions:Q(Uj).optional()}),$({items:Q(OX),total:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()});var kX=$({seqNo:Z(),title:X()}),AX=CY([`draft`,`approved`,`obsolete`]),jX=AX.enum,MX=$({id:Z(),orderId:Z(),revNo:Z(),status:AX,description:X(),changeSummary:X().nullable(),itemKey:X().nullable(),operationSummary:Q(kX).optional(),createdAt:dJ(),createdBy:X(),updatedAt:dJ(),updatedBy:X(),_links:Q(Vj).optional(),_actions:Q(Uj).optional()});$({description:X().max(2e3).optional(),changeSummary:X().max(2e3).optional()}).strict();var NX=$({description:X().max(2e3).optional(),changeSummary:X().max(2e3).optional()}).strict();$({page:XY().int().min(1).optional().default(1),pageSize:XY().int().min(1).max(100).optional().default(20),status:AX.optional(),includeObsolete:CY([`true`,`false`]).transform(e=>e===`true`).optional().default(!1)}),$({items:Q(MX),total:Z(),page:Z(),pageSize:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()});var PX=$({seqNo:Z(),title:X(),status:EX}),FX=CY([`released`,`started`,`closed`,`cancelled`]),IX=FX.enum,LX=CY([`low`,`medium`,`high`,`critical`]),RX=LX.enum,zX=$({id:Z(),runNo:Z(),orderId:Z(),orderKey:X(),revNo:Z(),itemKey:X().nullable(),instanceId:Z().nullable(),instanceKey:X().nullable(),status:FX,priority:LX,cost:Z().nullable(),dueAt:X().nullable(),releaseNote:X().nullable(),operationSummary:Q(PX).optional(),createdAt:dJ(),createdBy:X(),updatedAt:dJ(),updatedBy:X(),_links:Q(Vj).optional(),_actions:Q(Uj).optional()}),BX=$({revNo:Z().int().min(1).optional(),priority:LX.optional().default(`medium`),dueAt:X().regex(/^\d{4}-\d{2}-\d{2}$/,`Must be YYYY-MM-DD`),releaseNote:X().max(2e3).optional()}).strict(),VX=$({priority:LX.optional(),dueAt:X().regex(/^\d{4}-\d{2}-\d{2}$/,`Must be YYYY-MM-DD`).nullable().optional(),releaseNote:X().max(2e3).nullable().optional()}).strict();$({instanceKey:X().max(200).optional(),quantity:Z().nullable().optional(),fieldValues:Q($({fieldId:Z().int(),value:X().max(2e3),setIndex:Z().int().min(0).optional()})).optional()}).strict(),$({page:XY().int().min(1).optional().default(1),pageSize:XY().int().min(1).max(100).optional().default(20),status:FX.optional(),priority:LX.optional(),search:X().optional()}),$({items:Q(zX),total:Z(),page:Z(),pageSize:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()}),$({page:XY().int().min(1).optional().default(1),pageSize:XY().int().min(1).max(100).optional().default(20),status:EX.optional(),priority:LX.optional(),search:X().optional(),viewAs:X().optional(),canWork:yY([TY(`true`),TY(`false`)]).transform(e=>e===`true`).optional(),clockedIn:yY([TY(`true`),TY(`false`)]).transform(e=>e===`true`).optional()}),$({items:Q($({id:Z(),orderKey:X(),revNo:Z(),runNo:Z(),seqNo:Z(),title:X(),workCenterKey:X().nullable(),canWork:aY(),status:EX,priority:LX,assignedTo:X().nullable(),dueAt:X().nullable(),createdAt:dJ()})),total:Z(),page:Z(),pageSize:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actionTemplates:Q(Wj).optional()});var HX=$({_actions:Q(Uj).optional()}).extend({id:Z(),_links:Q(Vj).optional()});HX.extend({key:X()}),HX.extend({seqNo:Z()}),$({items:Q($({id:Z(),seqNo:Z()})),total:Z(),_actions:Q(Uj).optional()}),HX.extend({revNo:Z()}),HX.extend({runNo:Z()}),$({id:Z(),username:X(),apiKey:X().nullable().optional(),_links:Q(Vj).optional(),_actions:Q(Uj).optional()}),$({status:FX,_actions:Q(Uj).optional()}),$({status:EX,_actions:Q(Uj).optional()}),$({completed:aY(),_actions:Q(Uj).optional()}),$({status:AX,_actions:Q(Uj).optional()}),$({value:lX,validation:oX,_actions:Q(Uj).optional()}),$({items:Q($({fieldSeqNo:Z(),value:lX,validation:oX})),total:Z(),_actions:Q(Uj).optional()}),$({setCount:Z(),_actions:Q(Uj).optional()});var UX=$({id:Z(),predecessorSeqNo:Z(),predecessorTitle:X(),createdAt:dJ(),createdBy:X()}),WX=$({predecessorSeqNo:Z().int().min(1)}).strict();$({items:Q(UX),total:Z(),_links:Q(Vj),_actions:Q(Uj).optional(),_actionTemplates:Q(Wj).optional()});var GX=CY([`note`,`issue`,`feedback`]);GX.enum;var KX=$({id:Z(),operationRunId:Z(),type:GX,body:X(),createdAt:dJ(),createdBy:X(),_links:Q(Vj).optional()});$({type:GX.optional(),body:X().min(1).max(5e3)}).strict(),$({items:Q(KX),total:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()});var qX=CY([`active`,`archived`]),JX=qX.enum,YX=$({id:Z(),key:X(),description:X(),status:qX,itemKey:X().nullable(),createdBy:X(),createdAt:dJ(),updatedBy:X(),updatedAt:dJ(),_links:Q(Vj).optional(),_actions:Q(Uj).optional()}),XX=$({key:X().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/,`Key must be alphanumeric with hyphens`),description:X().max(2e3).optional().default(``),itemKey:X().max(100).optional()}).strict(),ZX=$({key:X().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/,`Key must be alphanumeric with hyphens`).optional(),description:X().max(2e3).optional(),status:qX.optional(),itemKey:X().max(100).nullable().optional()}).strict();$({page:XY().int().min(1).optional().default(1),pageSize:XY().int().min(1).max(100).optional().default(20),status:CY([`active`,`archived`]).optional(),search:X().optional()}),$({items:Q(YX),total:Z(),page:Z(),pageSize:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()});var QX=$({field:X(),from:yY([X(),Z(),aY(),lY()]),to:yY([X(),Z(),aY(),lY()])}),$X=CY([`added`,`removed`,`modified`,`unchanged`]),eZ=$({seqNo:Z(),label:X(),status:$X,changes:Q(QX).optional()}),tZ=$({seqNo:Z(),title:X(),status:$X,changes:Q(QX).optional(),fields:Q(eZ).optional()}),nZ=$({predecessorSeqNo:Z(),predecessorTitle:X(),status:CY([`added`,`removed`,`unchanged`])}),rZ=$({seqNo:Z(),title:X(),status:$X,changes:Q(QX).optional(),steps:Q(tZ).optional(),dependencies:Q(nZ).optional()});$({fromRevNo:Z(),toRevNo:Z(),revisionChanges:Q(QX),operations:Q(rZ)}),$({from:XY().int().min(1),to:XY().int().min(1)});var iZ=$({id:Z(),operationId:Z(),seqNo:Z(),title:X(),instructions:X(),multiSet:aY(),fieldCount:Z().optional(),createdAt:dJ(),createdBy:X(),updatedAt:dJ(),updatedBy:X(),fields:aX,_links:Q(Vj).optional(),_actions:Q(Uj).optional()}),aZ=$({seqNo:Z().int().min(1).optional(),title:X().max(200).optional(),instructions:X().max(1e4).optional(),multiSet:aY().optional()}).strict();$({items:Q(aZ).min(1).max(100)});var oZ=$({seqNo:Z().int().min(1).optional(),title:X().max(200).optional(),instructions:X().max(1e4).optional(),multiSet:aY().optional()}).strict();$({items:Q(iZ),total:Z(),nextSeqNo:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()});var sZ=CY([`erp_admin`,`order_planner`,`order_executor`,`order_manager`,`item_manager`]);sZ.enum;var cZ=X().min(1).max(64).regex(/^[a-zA-Z0-9_-]+$/,`Must contain only letters, numbers, hyphens, and underscores`);$({username:cZ,password:X().min(6)}).strict(),$({username:cZ.optional(),password:X().min(6).optional()}).strict(),$({permission:sZ}).strict(),$({agentId:Z().int()}).strict(),$({password:X().min(6)}).strict();var lZ=$({permission:sZ,grantedAt:X(),grantedBy:Z().nullable(),_actions:Q(dY()).optional()});$({id:Z(),username:X(),isAgent:aY(),createdAt:X(),updatedAt:X(),apiKey:X().nullable().optional(),permissions:Q(lZ),_links:Q(dY()).optional(),_actions:Q(dY()).optional()}),$({items:Q($({id:Z(),username:X(),isAgent:aY(),createdAt:X(),permissionCount:Z()})),total:Z(),page:Z(),pageSize:Z(),_links:Q(dY()).optional(),_linkTemplates:Q(dY()).optional(),_actions:Q(dY()).optional()}),$({page:XY().int().min(1).default(1),pageSize:XY().int().min(1).max(100).default(20),search:X().optional()});var uZ=$({userId:Z(),username:X(),createdAt:X(),createdBy:X().nullable(),_actions:Q(Uj).optional()});$({id:Z(),key:X(),description:X(),userAssignments:Q(uZ),createdAt:dJ(),createdBy:X(),updatedAt:dJ(),updatedBy:X(),_links:Q(Vj),_actions:Q(Uj).optional()}),$({key:X().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/,`Key must be alphanumeric with hyphens`),description:X().max(2e3).optional().default(``)}).strict(),$({key:X().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/,`Key must be alphanumeric with hyphens`).optional(),description:X().max(2e3).optional()}).strict(),$({username:X().min(1)}).strict(),$({page:XY().int().min(1).optional().default(1),pageSize:XY().int().min(1).max(100).optional().default(20),search:X().optional()}),$({items:Q($({id:Z(),key:X(),description:X(),userCount:Z(),createdAt:dJ(),createdBy:X(),updatedAt:dJ(),updatedBy:X()})),total:Z(),page:Z(),pageSize:Z(),_links:Q(Vj),_linkTemplates:Q(Gj).optional(),_actions:Q(Uj).optional()});var dZ=({opened:e,onClose:t})=>{let{login:n}=xM(),[r,i]=(0,v.useState)(!1),a=rN({initialValues:{username:``,password:``},validate:oU($Y)}),o=()=>{a.reset(),t()};return(0,I.jsx)(Nh,{opened:e,onClose:o,title:`Login`,children:(0,I.jsx)(`form`,{onSubmit:a.onSubmit(async e=>{i(!0);try{await n(e.username,e.password),window.location.reload()}catch(e){gM(e)}finally{i(!1)}}),children:(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsx)(Mv,{label:`Username`,...a.getInputProps(`username`),"data-autofocus":!0}),(0,I.jsx)(Mv,{label:`Password`,type:`password`,...a.getInputProps(`password`)}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:o,children:`Cancel`}),(0,I.jsx)(H,{type:`submit`,loading:r,children:`Login`})]})]})})})},fZ=[{label:`Items`,path:`/items`},{label:`Orders`,path:`/orders`},{label:`Work Centers`,path:`/work-centers`},{label:`Dispatch`,path:`/dispatch`},{label:`Inventory`,path:`/inventory`},{label:`Users`,path:`/users`},{label:`Admin`,path:`/admin`}],pZ=({supervisorAuth:e})=>{let[t,{toggle:n,close:r}]=_n(),[i,{open:a,close:o}]=_n(),s=hC(),c=fC(),{user:l,logout:u}=xM(),d=e=>c.pathname.startsWith(e),f=fZ.find(e=>d(e.path))?.label??`Orders`;return(0,I.jsxs)(hf,{header:{height:48},navbar:{width:250,breakpoint:`sm`,collapsed:{desktop:!0,mobile:!t}},padding:0,children:[(0,I.jsx)(hf.Header,{children:(0,I.jsxs)(B,{h:`100%`,px:`md`,wrap:`nowrap`,gap:`xs`,children:[(0,I.jsx)(gl,{onClick:n,hiddenFrom:`sm`,style:{flexShrink:0,display:`flex`,alignItems:`center`},children:(0,I.jsx)(`img`,{src:Kj,alt:`NAISYS`,style:{width:`36px`,height:`36px`}})}),(0,I.jsx)(R,{visibleFrom:`sm`,style:{flexShrink:0},children:(0,I.jsxs)(zw,{to:`/orders`,style:{textDecoration:`none`,color:`inherit`,display:`flex`,alignItems:`center`,gap:`0.5rem`,cursor:`pointer`},children:[(0,I.jsx)(`img`,{src:Kj,alt:`NAISYS`,style:{width:`36px`,height:`36px`}}),(0,I.jsx)(V,{size:`lg`,fw:500,children:`NAISYS`})]})}),(0,I.jsx)(gl,{hiddenFrom:`sm`,onClick:n,style:{flexShrink:0},children:(0,I.jsxs)(V,{size:`sm`,fw:600,children:[`NAISYS / `,f]})}),(0,I.jsxs)(B,{gap:6,visibleFrom:`sm`,wrap:`nowrap`,style:{flexShrink:0},children:[e&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(V,{size:`sm`,c:`dimmed`,component:`a`,href:`/supervisor/`,style:{cursor:`pointer`,textDecoration:`none`},children:`Supervisor`}),(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`|`})]}),(0,I.jsx)(V,{size:`sm`,fw:700,children:`ERP`})]}),(0,I.jsx)(B,{gap:`xs`,visibleFrom:`sm`,wrap:`nowrap`,style:{flex:1,minWidth:0,overflow:`hidden`},children:fZ.map(e=>(0,I.jsx)(gl,{component:zw,to:e.path,px:`sm`,py:4,style:t=>({borderRadius:t.radius.sm,flexShrink:0,backgroundColor:d(e.path)?`var(--mantine-color-dark-5)`:void 0}),children:(0,I.jsx)(V,{size:`sm`,fw:d(e.path)?600:400,c:d(e.path)?void 0:`dimmed`,children:e.label})},e.path))}),(0,I.jsx)(R,{hiddenFrom:`sm`,style:{flex:1}}),(0,I.jsx)(M_,{label:`API Reference`,children:(0,I.jsx)(vu,{variant:`subtle`,color:`gray`,component:`a`,href:`/erp/api-reference/`,visibleFrom:`sm`,style:{flexShrink:0},children:(0,I.jsx)(Zj,{size:`1.2rem`})})}),l?(0,I.jsxs)(gh,{position:`bottom-end`,withArrow:!0,children:[(0,I.jsx)(gh.Target,{children:(0,I.jsx)(H,{variant:`subtle`,size:`xs`,color:`gray`,style:{flexShrink:0},children:l.username})}),(0,I.jsxs)(gh.Dropdown,{children:[(0,I.jsx)(gh.Item,{leftSection:(0,I.jsx)(fM,{size:`0.9rem`}),onClick:()=>s(`/users/${l.username}`),children:`My User`}),(0,I.jsx)(gh.Item,{leftSection:(0,I.jsx)(sM,{size:`0.9rem`}),onClick:async()=>{await u(),window.location.reload()},children:`Logout`})]})]}):(0,I.jsx)(H,{size:`xs`,variant:`subtle`,onClick:a,style:{flexShrink:0},children:`Login`})]})}),(0,I.jsxs)(hf.Navbar,{p:`md`,children:[(0,I.jsxs)(B,{gap:6,px:`sm`,py:4,children:[e&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(V,{size:`sm`,c:`dimmed`,component:`a`,href:`/supervisor/`,style:{textDecoration:`none`},children:`Supervisor`}),(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`|`})]}),(0,I.jsx)(V,{size:`sm`,fw:700,children:`ERP`})]}),(0,I.jsx)(nm,{mb:4}),fZ.map(e=>(0,I.jsx)(gl,{component:zw,to:e.path,onClick:r,p:`sm`,mb:4,style:t=>({borderRadius:t.radius.sm,backgroundColor:d(e.path)?`var(--mantine-color-dark-5)`:void 0}),children:(0,I.jsx)(V,{size:`sm`,fw:d(e.path)?600:400,c:d(e.path)?void 0:`dimmed`,children:e.label})},e.path))]}),(0,I.jsxs)(hf.Main,{children:[!l&&(0,I.jsx)(Ld,{variant:`light`,color:`violet`,icon:(0,I.jsx)(tM,{size:`1rem`}),py:4,radius:0,styles:{wrapper:{justifyContent:`center`,alignItems:`center`},body:{flex:`initial`}},children:(0,I.jsx)(V,{size:`xs`,children:`Public read-only mode — login for full access`})}),(0,I.jsx)(GC,{context:{supervisorAuth:e}})]}),(0,I.jsx)(dZ,{opened:i,onClose:o})]})},mZ=()=>{let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(!0),i=(0,v.useCallback)(async()=>{r(!0);try{t(await q.get(J.admin))}catch{}finally{r(!1)}},[]);(0,v.useEffect)(()=>{i()},[i]);let a=e?!!Rj(e._actions,`view-logs`):!1,o=e?!!Rj(e._actions,`view-attachments`):!1,s=(0,v.useCallback)(async(e,t)=>q.get(J.adminLogs(void 0,t)),[]),c=(0,v.useCallback)(async(e,t)=>{let n=new URLSearchParams;return n.set(`page`,String(e)),n.set(`pageSize`,String(t)),q.get(`${J.adminAttachments}?${n}`)},[]),l=(0,v.useCallback)(e=>J.adminAttachmentDownload(e),[]);return(0,I.jsxs)(Qp,{size:`lg`,py:`xl`,w:`100%`,children:[(0,I.jsx)(zv,{order:2,mb:`lg`,children:`Admin`}),n?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):e?(0,I.jsxs)(jv,{defaultValue:`info`,children:[(0,I.jsxs)(jv.List,{children:[(0,I.jsx)(jv.Tab,{value:`info`,children:`Info`}),a&&(0,I.jsx)(jv.Tab,{value:`logs`,children:`Server Logs`}),o&&(0,I.jsx)(jv.Tab,{value:`attachments`,children:`Attachments`})]}),(0,I.jsx)(jv.Panel,{value:`info`,pt:`md`,children:(0,I.jsx)(W,{striped:!0,highlightOnHover:!0,children:(0,I.jsx)(W.Tbody,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Td,{fw:600,children:`ERP DB Path`}),(0,I.jsxs)(W.Td,{children:[e.erpDbPath,e.erpDbSize!=null&&` (${Lj(e.erpDbSize)})`]})]})})})}),a&&(0,I.jsx)(jv.Panel,{value:`logs`,pt:`md`,children:(0,I.jsx)(aU,{fetchLogs:s})}),o&&(0,I.jsx)(jv.Panel,{value:`attachments`,pt:`md`,children:(0,I.jsx)(pN,{fetchAttachments:c,getDownloadUrl:l})})]}):null]})},hZ=({value:e,onChange:t,onUserSelect:n,...r})=>{let[i]=zt(e,300),[a,o]=(0,v.useState)([]),s=(0,v.useCallback)(async e=>{try{let t=new URLSearchParams;t.set(`pageSize`,`10`),e&&t.set(`search`,e),o((await q.get(`${J.users}?${t}`)).items.map(e=>({id:e.id,username:e.username})))}catch{o([])}},[]);return(0,v.useEffect)(()=>{s(i)},[i,s]),(0,I.jsx)(Dp,{data:a.map(e=>e.username),value:e,onChange:t,onOptionSubmit:e=>{t(e);let r=a.find(t=>t.username===e);r&&n&&n(r)},...r})},gZ={display:`block`,color:`inherit`,textDecoration:`none`,padding:`var(--table-vertical-spacing) var(--table-horizontal-spacing, var(--mantine-spacing-xs))`},_Z={[DX.blocked]:`gray`,[DX.pending]:`blue`,[DX.in_progress]:`yellow`,[DX.completed]:`green`,[DX.skipped]:`gray`,[DX.failed]:`red`},vZ={low:`gray`,medium:`blue`,high:`orange`,critical:`red`},yZ=[{value:DX.pending,label:`Pending`},{value:DX.in_progress,label:`In Progress`},{value:DX.failed,label:`Failed`}],bZ=()=>{let[e,t]=qw(),n=Number(e.get(`page`))||1,r=e.get(`status`)||void 0,i=e.get(`priority`)||void 0,a=e.get(`search`)||``,o=e.get(`viewAs`)||``,s=e.get(`canWork`)===`true`,c=e.get(`clockedIn`)===`true`,[l,u]=(0,v.useState)(a),[d,f]=(0,v.useState)(o),[p]=zt(l,300),m=(0,v.useRef)(!0);(0,v.useEffect)(()=>{if(m.current){m.current=!1;return}t(e=>(p?e.set(`search`,p):e.delete(`search`),e.set(`page`,`1`),e))},[p,t]);let[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(!0),b=(0,v.useCallback)(async()=>{y(!0);try{let e=new URLSearchParams;e.set(`page`,String(n)),e.set(`pageSize`,`20`),r&&e.set(`status`,r),i&&e.set(`priority`,i),a&&e.set(`search`,a),o&&e.set(`viewAs`,o),s&&e.set(`canWork`,`true`),c&&e.set(`clockedIn`,`true`),g(await q.get(`${J.dispatch}?${e}`))}catch(e){gM(e)}finally{y(!1)}},[n,r,i,a,o,s,c]);(0,v.useEffect)(()=>{b()},[b]);let x=h?Math.ceil(h.total/h.pageSize):0;return(0,I.jsxs)(Qp,{size:`lg`,py:`xl`,children:[(0,I.jsx)(B,{justify:`space-between`,mb:`lg`,children:(0,I.jsx)(zv,{order:2,children:`Dispatch`})}),(0,I.jsxs)(B,{mb:`md`,children:[(0,I.jsx)(Mv,{placeholder:`Search...`,value:l,onChange:e=>u(e.currentTarget.value),style:{flex:1}}),(0,I.jsx)(R_,{placeholder:`All open`,data:yZ,value:r??null,onChange:e=>{t(t=>(e?t.set(`status`,e):t.delete(`status`),t.set(`page`,`1`),t))},clearable:!0}),(0,I.jsx)(R_,{placeholder:`All priorities`,data:LX.options.map(e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1)})),value:i??null,onChange:e=>{t(t=>(e?t.set(`priority`,e):t.delete(`priority`),t.set(`page`,`1`),t))},clearable:!0}),(0,I.jsx)(hZ,{placeholder:`View as user...`,value:d,onChange:e=>{f(e),e||t(e=>(e.delete(`viewAs`),e.set(`page`,`1`),e))},onUserSelect:e=>{f(e.username),t(t=>(t.set(`viewAs`,e.username),t.set(`page`,`1`),t))},w:180,size:`sm`}),(0,I.jsx)(yp,{label:`Can Work`,checked:s,onChange:e=>{t(t=>(e.currentTarget.checked?t.set(`canWork`,`true`):t.delete(`canWork`),t.set(`page`,`1`),t))}}),(0,I.jsx)(yp,{label:`Clocked In`,checked:c,onChange:e=>{t(t=>(e.currentTarget.checked?t.set(`clockedIn`,`true`):t.delete(`clockedIn`),t.set(`page`,`1`),t))}})]}),_?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):h&&h.items.length>0?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(W,{striped:!0,highlightOnHover:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Order / Run`}),(0,I.jsx)(W.Th,{children:`Operation`}),(0,I.jsx)(W.Th,{children:`Can Work`}),(0,I.jsx)(W.Th,{children:`Status`}),(0,I.jsx)(W.Th,{children:`Priority`}),(0,I.jsx)(W.Th,{children:`Assigned To`}),(0,I.jsx)(W.Th,{children:`Due`})]})}),(0,I.jsx)(W.Tbody,{children:h.items.map(e=>{let t=`/orders/${e.orderKey}/runs/${e.runNo}/ops/${e.seqNo}`;return(0,I.jsxs)(W.Tr,{style:{cursor:`pointer`},children:[(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsxs)(B,{gap:`xs`,wrap:`nowrap`,children:[(0,I.jsx)(V,{size:`sm`,ff:`monospace`,children:e.orderKey}),(0,I.jsxs)(Ap,{color:`violet`,variant:`light`,size:`sm`,children:[`R`,e.revNo]}),(0,I.jsxs)(V,{size:`sm`,ff:`monospace`,children:[`#`,e.runNo]})]})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsxs)(V,{size:`sm`,children:[(0,I.jsx)(V,{span:!0,ff:`monospace`,children:e.seqNo}),` — `,e.title]})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsx)(V,{size:`sm`,c:e.canWork?`green`:`red`,children:e.canWork?`Yes`:`No`})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsx)(Ap,{color:_Z[e.status]??`gray`,variant:`light`,children:e.status})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsx)(Ap,{color:vZ[e.priority]??`gray`,variant:`light`,children:e.priority})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:e.assignedTo??`—`})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:e.dueAt?new Date(e.dueAt).toLocaleDateString():`—`})})]},e.id)})})]}),x>1&&(0,I.jsx)(B,{justify:`center`,mt:`md`,children:(0,I.jsx)(u_,{total:x,value:n,onChange:e=>t(t=>(t.set(`page`,String(e)),t))})})]}):(0,I.jsx)(V,{c:`dimmed`,ta:`center`,py:`xl`,children:`No open operations found.`})]})},xZ=()=>{let[e,t]=qw(),n=Number(e.get(`page`))||1,r=e.get(`search`)||``,[i,a]=(0,v.useState)(r),[o]=zt(i,300),s=(0,v.useRef)(!0);(0,v.useEffect)(()=>{if(s.current){s.current=!1;return}t(e=>(o?e.set(`search`,o):e.delete(`search`),e.set(`page`,`1`),e))},[o,t]);let[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(!0),f=(0,v.useCallback)(async()=>{d(!0);try{let e=new URLSearchParams;e.set(`page`,String(n)),e.set(`pageSize`,`20`),r&&e.set(`search`,r),l(await q.get(`${J.inventory}?${e}`))}catch(e){gM(e)}finally{d(!1)}},[n,r]);(0,v.useEffect)(()=>{f()},[f]);let p=c?Math.ceil(c.total/c.pageSize):0;return(0,I.jsxs)(Qp,{size:`lg`,py:`xl`,children:[(0,I.jsx)(B,{justify:`space-between`,mb:`lg`,children:(0,I.jsx)(zv,{order:2,children:`Inventory`})}),(0,I.jsx)(B,{mb:`md`,children:(0,I.jsx)(Mv,{placeholder:`Search...`,value:i,onChange:e=>a(e.currentTarget.value),style:{flex:1}})}),u?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):c&&c.items.length>0?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(W,{striped:!0,highlightOnHover:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Item`}),(0,I.jsx)(W.Th,{children:`Instance`}),(0,I.jsx)(W.Th,{children:`Quantity`}),(0,I.jsx)(W.Th,{children:`Produced By`}),(0,I.jsx)(W.Th,{children:`Created`})]})}),(0,I.jsx)(W.Tbody,{children:c.items.map(e=>{let t=`/items/${e.itemKey}/instances/${e.id}`;return(0,I.jsxs)(W.Tr,{style:{cursor:`pointer`},children:[(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:`/items/${e.itemKey}`,style:gZ,children:(0,I.jsx)(V,{size:`sm`,ff:`monospace`,children:e.itemKey})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsx)(V,{size:`sm`,ff:`monospace`,children:e.key})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:e.quantity==null?`—`:e.quantity})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:e.orderKey?(0,I.jsxs)(V,{size:`sm`,children:[e.orderKey,` Run `,e.orderRunNo]}):`—`})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:new Date(e.createdAt).toLocaleDateString()})})]},e.id)})})]}),p>1&&(0,I.jsx)(B,{justify:`center`,mt:`md`,children:(0,I.jsx)(u_,{total:p,value:n,onChange:e=>t(t=>(t.set(`page`,String(e)),t))})})]}):(0,I.jsx)(V,{c:`dimmed`,ta:`center`,py:`xl`,children:`No inventory found.`})]})},SZ=()=>{let e=hC(),[t,n]=(0,v.useState)(``),[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(!1),s=async()=>{o(!0);try{await q.post(J.items,{key:t,description:r}),e(`/items`)}catch(e){gM(e)}finally{o(!1)}};return(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsx)(zv,{order:2,mb:`lg`,children:`Create Item`}),(0,I.jsxs)(U,{children:[(0,I.jsx)(Mv,{label:`Key`,description:`Alphanumeric with hyphens`,value:t,onChange:e=>n(e.currentTarget.value),required:!0,"data-autofocus":!0}),(0,I.jsx)(Qm,{label:`Description`,value:r,onChange:e=>i(e.currentTarget.value),autosize:!0,minRows:2}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>e(`/items`),children:`Cancel`}),(0,I.jsx)(H,{onClick:s,loading:a,disabled:!t,children:`Create`})]})]})]})},CZ=({createdBy:e,createdAt:t,updatedBy:n,updatedAt:r})=>(0,I.jsx)(M_,{label:(0,I.jsxs)(U,{gap:4,children:[(0,I.jsxs)(V,{size:`xs`,children:[`Created`,e?` by ${e}`:``,`,`,` `,new Date(t).toLocaleString()]}),(0,I.jsxs)(V,{size:`xs`,children:[`Modified`,n?` by ${n}`:``,`,`,` `,new Date(r).toLocaleString()]})]}),multiline:!0,withArrow:!0,children:(0,I.jsx)(vu,{variant:`subtle`,size:`sm`,color:`gray`,children:(0,I.jsx)(rM,{size:16})})}),wZ={string:`String`,number:`Number`,date:`Date`,datetime:`Date/Time`,yesNo:`Yes/No`,checkbox:`Checkbox`,attachment:`Attachment`};function TZ(e){return wZ[e]??e}var EZ=({fieldsEndpoint:e,fieldEndpoint:t,initialData:n})=>{let[r,i]=(0,v.useState)(n),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(!1),d=rN({initialValues:{seqNo:10,label:``,type:tX.string,isArray:!1,required:!1},validate:oU(iX)}),f=rN({initialValues:{seqNo:10,label:``,type:tX.string,isArray:!1,required:!1},validate:oU(rX)}),p=e=>{d.setValues({seqNo:e.seqNo,label:e.label,type:e.type,isArray:e.isArray,required:e.required}),o(e.id),c(!1)},m=async e=>{let n=r.items.find(e=>e.id===a);if(n){u(!0);try{let a=await q.put(t(n.seqNo),e);o(null),i({...r,items:r.items.map(e=>e.id===a.id?a:e).sort((e,t)=>e.seqNo-t.seqNo)})}catch(e){gM(e)}finally{u(!1)}}},h=async e=>{if(confirm(`Delete field "${e.label}"?`))try{await q.delete(t(e.seqNo)),i({...r,items:r.items.filter(t=>t.id!==e.id),total:r.total-1})}catch(e){gM(e)}},g=()=>{f.setValues({seqNo:r.nextSeqNo,label:``,type:tX.string,isArray:!1,required:!1}),c(!0),o(null)},_=async t=>{u(!0);try{let n=await q.post(e,t);c(!1),i({...r,items:[...r.items,n].sort((e,t)=>e.seqNo-t.seqNo),total:r.total+1,nextSeqNo:n.seqNo+10})}catch(e){gM(e)}finally{u(!1)}},y=e=>(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Vg,{label:`Sequence #`,min:1,step:10,...e.getInputProps(`seqNo`)}),(0,I.jsx)(Mv,{label:`Label`,placeholder:`Field label...`,...e.getInputProps(`label`)}),(0,I.jsx)(R_,{label:`Type`,data:eX.options.map(e=>({value:e,label:TZ(e)})),...e.getInputProps(`type`)}),(0,I.jsx)(yp,{label:`Array (accepts multiple values)`,...e.getInputProps(`isArray`,{type:`checkbox`})}),(0,I.jsx)(yp,{label:`Required`,...e.getInputProps(`required`,{type:`checkbox`})})]});return(0,I.jsxs)(U,{gap:`xs`,mt:`xs`,children:[(0,I.jsxs)(B,{justify:`space-between`,children:[r.items.length>0&&(0,I.jsx)(V,{size:`xs`,fw:600,c:`dimmed`,children:`Data Fields`}),Rj(r._actions,`create`)&&!s&&(0,I.jsx)(H,{size:`compact-xs`,variant:`subtle`,onClick:g,children:`Add Field`})]}),r.items.map(e=>(0,I.jsx)(`div`,{children:a===e.id?(0,I.jsx)(`form`,{onSubmit:d.onSubmit(m),children:(0,I.jsxs)(U,{gap:`xs`,children:[y(d),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,size:`compact-xs`,onClick:()=>o(null),children:`Cancel`}),(0,I.jsx)(H,{type:`submit`,size:`compact-xs`,loading:l,children:`Save`})]})]})}):(0,I.jsxs)(B,{justify:`space-between`,wrap:`nowrap`,children:[(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsxs)(V,{size:`xs`,children:[e.seqNo,`.`]}),(0,I.jsx)(V,{size:`xs`,fw:500,children:e.label}),(0,I.jsx)(Ap,{size:`xs`,variant:`light`,children:TZ(e.type)}),e.isArray&&(0,I.jsx)(Ap,{size:`xs`,variant:`light`,color:`blue`,children:`[]`}),e.required&&(0,I.jsx)(Ap,{size:`xs`,variant:`light`,color:`red`,children:`required`})]}),(0,I.jsxs)(B,{gap:4,wrap:`nowrap`,children:[(0,I.jsx)(CZ,{createdBy:e.createdBy,createdAt:e.createdAt,updatedBy:e.updatedBy,updatedAt:e.updatedAt}),Rj(e._actions,`update`)&&(0,I.jsx)(H,{size:`compact-xs`,variant:`subtle`,onClick:()=>p(e),children:`Edit`}),Rj(e._actions,`delete`)&&(0,I.jsx)(H,{size:`compact-xs`,color:`red`,variant:`subtle`,onClick:()=>h(e),children:`Delete`})]})]})},e.id)),s&&(0,I.jsx)(`form`,{onSubmit:f.onSubmit(_),children:(0,I.jsxs)(U,{gap:`xs`,children:[y(f),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,size:`compact-xs`,onClick:()=>c(!1),children:`Cancel`}),(0,I.jsx)(H,{type:`submit`,size:`compact-xs`,loading:l,children:`Add`})]})]})})]})},DZ=()=>{let{key:e}=bC(),t=hC(),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!0),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(!1),m=(0,v.useCallback)(async()=>{if(e){a(!0);try{r(await q.get(J.item(e)))}catch(e){gM(e)}finally{a(!1)}}},[e]);return(0,v.useEffect)(()=>{m()},[m]),i?(0,I.jsx)(Qp,{size:`md`,py:`xl`,children:(0,I.jsx)(U,{align:`center`,children:(0,I.jsx)(uu,{})})}):n?o?(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsx)(zv,{order:2,mb:`lg`,children:`Edit Item`}),(0,I.jsxs)(U,{children:[(0,I.jsx)(Mv,{label:`Key`,description:`Alphanumeric with hyphens`,value:c,onChange:e=>l(e.currentTarget.value),required:!0}),(0,I.jsx)(Qm,{label:`Description`,value:u,onChange:e=>d(e.currentTarget.value),autosize:!0,minRows:2}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>s(!1),children:`Cancel`}),(0,I.jsx)(H,{onClick:async()=>{if(e){p(!0);try{let n={key:c,description:u};await q.put(J.item(e),n),s(!1),c===e?await m():t(`/items/${c}`,{replace:!0})}catch(e){gM(e)}finally{p(!1)}}},loading:f,children:`Save`})]})]})]}):(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsxs)(B,{children:[(0,I.jsx)(zv,{order:2,children:n.key}),(0,I.jsx)(CZ,{createdBy:n.createdBy,createdAt:n.createdAt,updatedBy:n.updatedBy,updatedAt:n.updatedAt})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>t(`/items`),children:`Back`}),Rj(n._actions,`update`)&&(0,I.jsx)(H,{onClick:()=>{n&&(l(n.key),d(n.description),s(!0))},children:`Edit`}),Rj(n._actions,`delete`)&&(0,I.jsx)(H,{color:`red`,variant:`outline`,onClick:async()=>{if(!(!e||!confirm(`Delete this item?`)))try{await q.delete(J.item(e)),t(`/items`)}catch(e){gM(e)}},children:`Delete`})]})]}),(0,I.jsx)(Wp,{withBorder:!0,p:`lg`,children:(0,I.jsx)(U,{gap:`sm`,children:(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:120,children:`Description:`}),(0,I.jsx)(V,{children:n.description||`—`})]})})}),(0,I.jsx)(B,{mt:`lg`,children:(0,I.jsx)(H,{variant:`light`,onClick:()=>t(`/items/${n.key}/instances`),children:`View Instances`})}),(0,I.jsx)(EZ,{fieldsEndpoint:J.itemFields(n.key),fieldEndpoint:e=>J.itemField(n.key,e),initialData:n.fields})]}):(0,I.jsx)(Qp,{size:`md`,py:`xl`,children:(0,I.jsx)(V,{children:`Item not found.`})})};function OZ(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function kZ(e){return`${OZ(e)}T${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`}var AZ=new Set([`.jpg`,`.jpeg`,`.png`,`.gif`,`.webp`,`.svg`,`.bmp`]);function jZ(e){let t=e.slice(e.lastIndexOf(`.`)).toLowerCase();return AZ.has(t)}function MZ(e){return e.endsWith(`[]`)}function NZ(e){return e.endsWith(`[]`)?e.slice(0,-2):e}function PZ(e,t){return`${e}_${t}`}function FZ(e){return Object.fromEntries(e.map(e=>[PZ(e.fieldId,e.setIndex),e.value]))}function IZ(e){return typeof e==`string`?e:e.join(`, `)}function LZ(e){return Array.isArray(e)?e.length>0?e:[``]:e?[e]:[``]}function RZ({status:e}){return e===`saving`?(0,I.jsx)(uu,{size:14}):e===`saved`?(0,I.jsx)($j,{size:14,color:`green`}):e===`error`?(0,I.jsx)(Yj,{size:14,color:`red`}):null}var zZ=({fieldValues:e,multiSet:t,completed:n,_actionTemplates:r,fieldValueEndpoint:i,deleteSetEndpoint:a,attachmentEndpoint:o,attachmentDownloadUrl:s,onSetDeleted:c,onActionsUpdated:l})=>{let[u,d]=(0,v.useState)(e),[f,p]=(0,v.useState)(()=>FZ(e)),[m,h]=(0,v.useState)({}),g=(0,v.useRef)({}),[_,y]=(0,v.useState)(0),[b,x]=(0,v.useState)(!1),[S,C]=(0,v.useState)(null),w=(0,v.useRef)(e);(0,v.useEffect)(()=>{e!==w.current&&(w.current=e,d(e),p(FZ(e)))},[e]);let T=(e,t,n)=>{let r=PZ(e,t);p(e=>({...e,[r]:n}))},E=(e,t,n)=>{let r=PZ(e,t);d(r=>r.some(n=>n.fieldId===e&&n.setIndex===t)?r.map(r=>r.fieldId===e&&r.setIndex===t?n:r):[...r,n]),p(e=>({...e,[r]:n.value}))},D=()=>{let e=u.reduce((e,t)=>Math.max(e,t.setIndex),-1)+1,t=u.filter(e=>e.setIndex===0);if(t.length===0)return;let n=t.map(t=>({...t,setIndex:e,value:MZ(t.type)?[]:``,validation:t.required?{valid:!1,error:`Required`}:{valid:!0}}));d(e=>[...e,...n])},O=(e,t,n)=>{d(r=>r.map(r=>r.fieldId===e&&r.setIndex===t?{...r,attachments:[...r.attachments??[],n]}:r))},k=[...new Set(u.map(e=>e.setIndex))].sort((e,t)=>e-t);k.length===0&&k.push(0);let A=Math.min(_,k[k.length-1]);A!==_&&y(A);let j=u.filter(e=>e.setIndex===A),ee=(e,t,n)=>{let r=PZ(e,t);g.current[r]&&(clearTimeout(g.current[r]),delete g.current[r]),n===`saved`&&(g.current[r]=setTimeout(()=>{h(e=>{let t={...e};return delete t[r],t}),delete g.current[r]},1500)),h(e=>({...e,[r]:n}))},te=async(e,t)=>{let n=e.value;if(JSON.stringify(t)!==JSON.stringify(n)){ee(e.fieldId,e.setIndex,`saving`);try{let n=await q.put(i(e.fieldSeqNo,e.setIndex),{value:t});E(e.fieldId,e.setIndex,n),ee(e.fieldId,e.setIndex,`saved`),n._actions&&n._actionTemplates&&l?.(n._actions,n._actionTemplates)}catch(t){gM(t),ee(e.fieldId,e.setIndex,`error`)}}},ne=(e,t)=>{T(e.fieldId,e.setIndex,t),te(e,t)},re=(e,t,n)=>{let r=[...LZ(f[PZ(e.fieldId,e.setIndex)]??e.value)];r[t]=n,T(e.fieldId,e.setIndex,r)},M=e=>{let t=[...LZ(f[PZ(e.fieldId,e.setIndex)]??e.value),``];T(e.fieldId,e.setIndex,t)},N=(e,t)=>{let n=[...LZ(f[PZ(e.fieldId,e.setIndex)]??e.value)];n.splice(t,1),T(e.fieldId,e.setIndex,n),te(e,n)},ie=()=>{y(k.length>0?k[k.length-1]+1:0),D()},ae=async e=>{x(!0);try{await q.delete(a(e)),A>=e&&A>0&&y(A-1),c()}catch(e){gM(e)}finally{x(!1)}},oe=!!zj(r,`uploadAttachment`),se=!!zj(r,`deleteAttachment`),ce=async(e,t)=>{if(t){C(PZ(e.fieldId,e.setIndex));try{let n=await q.upload(o(e.fieldSeqNo,e.setIndex),t);O(e.fieldId,e.setIndex,{id:n.attachmentId,filename:n.filename,fileSize:n.fileSize})}catch(e){gM(e)}finally{C(null)}}},[le,ue]=(0,v.useState)(null),de=async(e,t)=>{ue(`${PZ(e.fieldId,e.setIndex)}_${t}`);try{await q.delete(`${o(e.fieldSeqNo,e.setIndex)}/${t}`),d(n=>n.map(n=>n.fieldId===e.fieldId&&n.setIndex===e.setIndex?{...n,attachments:(n.attachments??[]).filter(e=>e.id!==t)}:n))}catch(e){gM(e)}finally{ue(null)}};function fe(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function pe(e,t,n){let r=e.attachments??[],i=PZ(e.fieldId,e.setIndex),a=S===i,o=n&&oe&&(MZ(e.type)||r.length===0);return(0,I.jsxs)(U,{gap:4,children:[(0,I.jsx)(V,{size:`xs`,fw:500,children:t}),r.map(t=>{let r=le===`${i}_${t.id}`,a=s(e.fieldSeqNo,t.id),o=jZ(t.filename);return(0,I.jsxs)(U,{gap:4,children:[o&&(0,I.jsx)(Wd,{href:a,target:`_blank`,children:(0,I.jsx)(Om,{src:a,alt:t.filename,maw:200,mah:200,fit:`contain`,radius:`sm`})}),(0,I.jsxs)(B,{gap:`xs`,children:[!o&&(0,I.jsx)(nM,{size:14}),(0,I.jsx)(Wd,{size:`xs`,href:a,target:`_blank`,children:t.filename}),(0,I.jsxs)(V,{size:`xs`,c:`dimmed`,children:[`(`,fe(t.fileSize),`)`]}),n&&se&&(0,I.jsx)(vu,{size:`xs`,variant:`subtle`,color:`red`,loading:r,onClick:()=>de(e,t.id),title:`Remove attachment`,children:(0,I.jsx)(pM,{size:14})})]})]},t.id)}),r.length===0&&!n&&(0,I.jsx)(V,{size:`xs`,c:`dimmed`,children:`No attachments`}),o&&(0,I.jsx)(Tm,{onChange:t=>ce(e,t),children:e=>(0,I.jsx)(H,{...e,size:`compact-xs`,variant:`light`,leftSection:a?(0,I.jsx)(uu,{size:14}):(0,I.jsx)(dM,{size:14}),loading:a,children:`Upload File`})})]},i)}function me(e,t,n,r){let{label:i,onTextChange:a,onImmediateChange:o,onBlurSave:s}=r,c=e.validation&&!e.validation.valid?e.validation.error:void 0;switch(NZ(e.type)){case tX.date:return(0,I.jsx)(ex,{label:i,size:`xs`,style:{flex:1},valueFormat:`YYYY-MM-DD`,clearable:!0,error:c,value:t?new Date(t+`T00:00:00`):null,onChange:e=>o(e?typeof e==`string`?e:OZ(e):``),rightSection:(0,I.jsx)(RZ,{status:n})});case tX.datetime:return(0,I.jsx)(ax,{label:i,size:`xs`,style:{flex:1},valueFormat:`YYYY-MM-DD HH:mm`,clearable:!0,error:c,value:t?new Date(t):null,onChange:e=>o(e?typeof e==`string`?e:kZ(e):``),rightSection:(0,I.jsx)(RZ,{status:n})});case tX.yesNo:return(0,I.jsxs)(B,{gap:`xs`,align:`center`,children:[i&&(0,I.jsx)(V,{size:`xs`,fw:500,children:i}),(0,I.jsx)(rv,{size:`xs`,onLabel:`Yes`,offLabel:`No`,checked:t===`Yes`,onChange:e=>o(e.currentTarget.checked?`Yes`:`No`)}),(0,I.jsx)(RZ,{status:n})]});case tX.checkbox:return(0,I.jsxs)(B,{gap:`xs`,align:`center`,children:[(0,I.jsx)(yp,{label:i,size:`xs`,checked:t===`checked`,onChange:e=>o(e.currentTarget.checked?`checked`:``)}),(0,I.jsx)(RZ,{status:n})]});case tX.attachment:return null;default:return(0,I.jsx)(Mv,{label:i,size:`xs`,style:{flex:1},error:c,value:t,onChange:e=>a(e.currentTarget.value),onBlur:s,rightSection:(0,I.jsx)(RZ,{status:n})})}}function he(e){let t=IZ(e.value);if(!t)return`—`;if(MZ(e.type)&&Array.isArray(e.value))return e.value.filter(Boolean).join(`, `)||`—`;switch(NZ(e.type)){case tX.date:return new Date(t+`T00:00:00`).toLocaleDateString();case tX.datetime:return new Date(t).toLocaleString();case tX.checkbox:return t===`checked`?`Checked`:`—`;default:return t}}let ge=!n&&!!zj(r,`updateField`);return(0,I.jsxs)(U,{gap:`xs`,mt:`xs`,children:[(0,I.jsx)(V,{size:`xs`,fw:600,c:`dimmed`,children:`Data Fields`}),t&&(0,I.jsxs)(B,{gap:4,children:[k.map(e=>(0,I.jsxs)(H,{size:`compact-xs`,variant:e===A?`filled`:`light`,onClick:()=>y(e),children:[`Set `,e+1]},e)),ge&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(vu,{size:`xs`,variant:`subtle`,onClick:ie,title:`Add set`,children:(0,I.jsx)(lM,{size:14})}),k.length>1&&(0,I.jsx)(vu,{size:`xs`,variant:`subtle`,color:`red`,loading:b,onClick:()=>ae(A),title:`Delete current set`,children:(0,I.jsx)(uM,{size:14})})]})]}),j.map(e=>{let t=PZ(e.fieldId,e.setIndex),n=m[t],r=e.required?`${e.label} *`:e.label,i=ge,a=f[t]??e.value;if(NZ(e.type)===tX.attachment)return pe(e,r,i);if(!i)return MZ(e.type)&&Array.isArray(e.value)&&e.value.filter(Boolean).length>0?(0,I.jsxs)(U,{gap:2,children:[(0,I.jsxs)(V,{size:`xs`,fw:500,children:[r,`:`]}),e.value.filter(Boolean).map((e,t)=>(0,I.jsxs)(V,{size:`xs`,pl:`sm`,children:[`• `,e]},t))]},t):(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsxs)(V,{size:`xs`,fw:500,children:[r,`:`]}),typeof e.value==`string`&&e.value?.startsWith(`http`)?(0,I.jsx)(Wd,{size:`xs`,href:e.value,target:`_blank`,children:e.value}):(0,I.jsx)(V,{size:`xs`,children:he(e)}),e.validation&&!e.validation.valid&&(0,I.jsx)(V,{size:`xs`,c:`red`,children:e.validation.error})]},t);if(MZ(e.type)){let i=LZ(a);return(0,I.jsxs)(U,{gap:4,children:[(0,I.jsxs)(B,{gap:`xs`,align:`center`,children:[(0,I.jsx)(V,{size:`xs`,fw:500,children:r}),(0,I.jsx)(RZ,{status:n})]}),i.map((t,n)=>(0,I.jsxs)(B,{gap:4,align:`flex-end`,children:[me(e,t,void 0,{onTextChange:t=>re(e,n,t),onImmediateChange:t=>{let r=[...i];r[n]=t,T(e.fieldId,e.setIndex,r),te(e,r)},onBlurSave:()=>void te(e,a)}),i.length>1&&(0,I.jsx)(vu,{size:`xs`,variant:`subtle`,color:`red`,onClick:()=>N(e,n),title:`Remove item`,children:(0,I.jsx)(pM,{size:14})})]},n)),(0,I.jsx)(B,{children:(0,I.jsx)(vu,{size:`xs`,variant:`subtle`,onClick:()=>M(e),title:`Add item`,children:(0,I.jsx)(lM,{size:14})})}),e.validation&&!e.validation.valid&&(0,I.jsx)(V,{size:`xs`,c:`red`,children:e.validation.error})]},t)}return(0,I.jsx)(B,{gap:`xs`,align:`flex-end`,children:me(e,IZ(a),n,{label:r,onTextChange:t=>T(e.fieldId,e.setIndex,t),onImmediateChange:t=>ne(e,t),onBlurSave:()=>void te(e,a)})},t)})]})},BZ=()=>{let{key:e,instanceId:t}=bC(),n=hC(),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!0),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)(``),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(!1),_=(0,v.useCallback)(async()=>{if(!(!e||!t)){o(!0);try{i(await q.get(J.itemInstance(e,t)))}catch(e){gM(e)}finally{o(!1)}}},[e,t]);(0,v.useEffect)(()=>{_()},[_]);let y=()=>{r&&(f(r.key),m(r.quantity==null?``:String(r.quantity)),c(!0))},b=async()=>{if(!(!e||!t)){g(!0);try{let n={key:d,quantity:p?Number(p):null};await q.put(J.itemInstance(e,t),n),c(!1),await _()}catch(e){gM(e)}finally{g(!1)}}},x=async()=>{if(!(!e||!t||!confirm(`Delete this instance?`)))try{await q.delete(J.itemInstance(e,t)),n(`/items/${e}/instances`)}catch(e){gM(e)}};if(a)return(0,I.jsx)(Qp,{size:`md`,py:`xl`,children:(0,I.jsx)(U,{align:`center`,children:(0,I.jsx)(uu,{})})});if(!r)return(0,I.jsx)(Qp,{size:`md`,py:`xl`,children:(0,I.jsx)(V,{children:`Instance not found.`})});if(s)return(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsx)(zv,{order:2,mb:`lg`,children:`Edit Instance`}),(0,I.jsxs)(U,{children:[(0,I.jsx)(Mv,{label:`Key (lot/serial number)`,value:d,onChange:e=>f(e.currentTarget.value),required:!0}),(0,I.jsx)(Mv,{label:`Quantity`,type:`number`,value:p,onChange:e=>m(e.currentTarget.value)}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>c(!1),children:`Cancel`}),(0,I.jsx)(H,{onClick:b,loading:h,children:`Save`})]})]})]});let S=r.fieldValues.length>0,C=Rj(r._actions,`update`);return(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsxs)(B,{children:[(0,I.jsx)(zv,{order:2,children:r.key}),(0,I.jsx)(CZ,{createdBy:r.createdBy,createdAt:r.createdAt,updatedBy:r.updatedBy,updatedAt:r.updatedAt})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>n(`/items/${e}/instances`),children:`Back`}),Rj(r._actions,`update`)&&(0,I.jsx)(H,{onClick:y,children:`Edit`}),Rj(r._actions,`delete`)&&(0,I.jsx)(H,{color:`red`,variant:`outline`,onClick:x,children:`Delete`})]})]}),(0,I.jsx)(Wp,{withBorder:!0,p:`lg`,children:(0,I.jsxs)(U,{gap:`sm`,children:[(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:120,children:`Key:`}),(0,I.jsx)(V,{ff:`monospace`,children:r.key})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:120,children:`Quantity:`}),(0,I.jsx)(V,{children:r.quantity==null?`—`:r.quantity})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:120,children:`Produced By:`}),r.orderKey?(0,I.jsxs)(Wd,{href:`/erp/orders/${r.orderKey}/runs/${r.orderRunNo}`,onClick:e=>{e.button===1||e.ctrlKey||e.metaKey||(e.preventDefault(),n(`/orders/${r.orderKey}/runs/${r.orderRunNo}`))},children:[r.orderKey,` Order Run `,r.orderRunNo]}):(0,I.jsx)(V,{children:`—`})]})]})}),S&&(0,I.jsxs)(Wp,{withBorder:!0,p:`lg`,mt:`md`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`xs`,children:[(0,I.jsx)(V,{fw:600,children:`Field Values`}),C&&(0,I.jsx)(H,{size:`xs`,variant:l?`filled`:`light`,onClick:()=>u(e=>!e),children:l?`Done Editing`:`Edit Fields`})]}),(0,I.jsx)(zZ,{fieldValues:r.fieldValues,multiSet:!1,completed:!l,_actionTemplates:l?r._actionTemplates:void 0,fieldValueEndpoint:(n,r)=>J.itemInstanceFieldValue(e,t,n),deleteSetEndpoint:n=>J.itemInstanceDeleteSet(e,t,n),attachmentEndpoint:(e,t)=>``,attachmentDownloadUrl:()=>``,onSetDeleted:()=>void _()})]})]})},VZ=()=>{let{key:e}=bC(),t=hC(),[n,r]=qw(),i=Number(n.get(`page`))||1,a=n.get(`search`)||``,[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!0),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(!1),y=(0,v.useCallback)(async()=>{if(e){l(!0);try{let t=new URLSearchParams;t.set(`page`,String(i)),t.set(`pageSize`,`20`),a&&t.set(`search`,a),s(await q.get(`${J.itemInstances(e)}?${t}`))}catch(e){gM(e)}finally{l(!1)}}},[e,i,a]);(0,v.useEffect)(()=>{y()},[y]);let b=async()=>{if(e){_(!0);try{let n={key:f,quantity:m?Number(m):null};t(`/items/${e}/instances/${(await q.post(J.itemInstances(e),n)).id}`)}catch(e){gM(e)}finally{_(!1)}}},x=o?Math.ceil(o.total/o.pageSize):0;return(0,I.jsxs)(Qp,{size:`lg`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsx)(B,{children:(0,I.jsxs)(zv,{order:2,children:[`Instances for `,e]})}),(0,I.jsxs)(B,{children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>t(`/items/${e}`),children:`Back to Item`}),o&&Rj(o._actions,`create`)&&!u&&(0,I.jsx)(H,{onClick:()=>d(!0),children:`Create New`})]})]}),u&&(0,I.jsxs)(Wp,{withBorder:!0,p:`lg`,mb:`md`,children:[(0,I.jsx)(zv,{order:4,mb:`sm`,children:`New Instance`}),(0,I.jsxs)(U,{children:[(0,I.jsx)(Mv,{label:`Key (lot/serial number)`,value:f,onChange:e=>p(e.currentTarget.value),required:!0,"data-autofocus":!0}),(0,I.jsx)(Mv,{label:`Quantity`,type:`number`,value:m,onChange:e=>h(e.currentTarget.value)}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>{d(!1),p(``),h(``)},children:`Cancel`}),(0,I.jsx)(H,{onClick:b,loading:g,disabled:!f,children:`Create`})]})]})]}),(0,I.jsx)(B,{mb:`md`,children:(0,I.jsx)(Mv,{placeholder:`Search by key...`,value:a,onChange:e=>{let t=e.currentTarget.value;r(e=>(t?e.set(`search`,t):e.delete(`search`),e.set(`page`,`1`),e))},style:{flex:1}})}),c?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):o&&o.items.length>0?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(W,{striped:!0,highlightOnHover:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Key`}),(0,I.jsx)(W.Th,{children:`Quantity`}),(0,I.jsx)(W.Th,{children:`Order Run`}),(0,I.jsx)(W.Th,{children:`Created`})]})}),(0,I.jsx)(W.Tbody,{children:o.items.map(t=>{let n=`/items/${e}/instances/${t.id}`;return(0,I.jsxs)(W.Tr,{style:{cursor:`pointer`},children:[(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:(0,I.jsx)(V,{size:`sm`,ff:`monospace`,children:t.key})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:(0,I.jsx)(V,{size:`sm`,children:t.quantity==null?`—`:t.quantity})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:(0,I.jsx)(V,{size:`sm`,children:t.orderKey?`${t.orderKey} Run ${t.orderRunNo}`:`—`})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:new Date(t.createdAt).toLocaleDateString()})})]},t.id)})})]}),x>1&&(0,I.jsx)(B,{justify:`center`,mt:`md`,children:(0,I.jsx)(u_,{total:x,value:i,onChange:e=>r(t=>(t.set(`page`,String(e)),t))})})]}):(0,I.jsx)(V,{c:`dimmed`,ta:`center`,py:`xl`,children:`No instances found.`})]})},HZ=()=>{let e=hC(),[t,n]=qw(),r=Number(t.get(`page`))||1,i=t.get(`search`)||``,[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!0),l=(0,v.useCallback)(async()=>{c(!0);try{let e=new URLSearchParams;e.set(`page`,String(r)),e.set(`pageSize`,`20`),i&&e.set(`search`,i),o(await q.get(`${J.items}?${e}`))}catch(e){gM(e)}finally{c(!1)}},[r,i]);(0,v.useEffect)(()=>{l()},[l]);let u=a?Math.ceil(a.total/a.pageSize):0;return(0,I.jsxs)(Qp,{size:`lg`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsx)(zv,{order:2,children:`Items`}),a&&Rj(a._actions,`create`)&&(0,I.jsx)(H,{onClick:()=>e(`/items/new`),children:`Create New`})]}),(0,I.jsx)(B,{mb:`md`,children:(0,I.jsx)(Mv,{placeholder:`Search...`,value:i,onChange:e=>{let t=e.currentTarget.value;n(e=>(t?e.set(`search`,t):e.delete(`search`),e.set(`page`,`1`),e))},style:{flex:1}})}),s?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):a&&a.items.length>0?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(W,{striped:!0,highlightOnHover:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Key`}),(0,I.jsx)(W.Th,{children:`Description`}),(0,I.jsx)(W.Th,{children:`Created`})]})}),(0,I.jsx)(W.Tbody,{children:a.items.map(e=>{let t=`/items/${e.key}`;return(0,I.jsxs)(W.Tr,{style:{cursor:`pointer`},children:[(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsx)(V,{size:`sm`,ff:`monospace`,children:e.key})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsx)(V,{size:`sm`,lineClamp:1,children:e.description||`—`})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:new Date(e.createdAt).toLocaleDateString()})})]},e.id)})})]}),u>1&&(0,I.jsx)(B,{justify:`center`,mt:`md`,children:(0,I.jsx)(u_,{total:u,value:r,onChange:e=>n(t=>(t.set(`page`,String(e)),t))})})]}):(0,I.jsx)(V,{c:`dimmed`,ta:`center`,py:`xl`,children:`No items found.`})]})},UZ=()=>{let{login:e}=xM(),[t,n]=v.useState(``),[r,i]=v.useState(``),[a,o]=v.useState(!1),[s,c]=v.useState(``),l=async()=>{if(!t.trim()||!r.trim()){c(`Please enter both username and password`);return}o(!0),c(``);try{await e(t,r)}catch(e){c(e instanceof Error?e.message:`An error occurred`)}finally{o(!1)}},u=e=>{e.key===`Enter`&&l()};return(0,I.jsx)(Kp,{style:{minHeight:`100vh`},children:(0,I.jsxs)(U,{align:`center`,gap:`lg`,w:320,children:[(0,I.jsx)(`img`,{src:Kj,alt:`NAISYS`,style:{width:`64px`,height:`64px`}}),(0,I.jsx)(V,{size:`xl`,fw:600,children:`NAISYS ERP`}),(0,I.jsxs)(U,{gap:`md`,w:`100%`,children:[s&&(0,I.jsx)(Ld,{color:`red`,variant:`light`,children:s}),(0,I.jsx)(Mv,{label:`Username`,placeholder:`Enter your username`,value:t,onChange:e=>n(e.currentTarget.value),onKeyDown:u,"data-autofocus":!0,disabled:a}),(0,I.jsx)(Mv,{label:`Password`,type:`password`,placeholder:`Enter your password`,value:r,onChange:e=>i(e.currentTarget.value),onKeyDown:u,disabled:a}),(0,I.jsx)(H,{fullWidth:!0,onClick:l,loading:a,disabled:!t.trim()||!r.trim(),children:`Login`})]})]})})},WZ=({initialData:e,isEdit:t,onSubmit:n,onCancel:r})=>{let i=t?ZX:XX,a=rN({initialValues:{key:e?.key??``,description:e?.description??``,status:e?.status??JX.active,itemKey:e?.itemKey??``},validate:oU(i)}),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)([]),[f]=zt(a.values.itemKey,300),p=(0,v.useCallback)(async e=>{try{let t=new URLSearchParams;t.set(`pageSize`,`10`),e&&t.set(`search`,e),d((await q.get(`${J.items}?${t}`)).items.map(e=>e.key))}catch{d([])}},[]);return(0,v.useEffect)(()=>{p(f)},[f,p]),(0,I.jsx)(`form`,{onSubmit:a.onSubmit(async e=>{s(!0),l(null);try{let r=t?{key:e.key,description:e.description,status:e.status,itemKey:e.itemKey||null}:{key:e.key,description:e.description,itemKey:e.itemKey||void 0};await n(i.parse(r))}catch(e){l(e instanceof Error?e.message:`An error occurred`)}finally{s(!1)}}),children:(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsx)(Mv,{label:`Key`,description:`Unique identifier (alphanumeric, hyphens allowed)`,placeholder:`standard-order`,...a.getInputProps(`key`)}),(0,I.jsx)(Dp,{label:`Produces Item`,placeholder:`Search by item key...`,data:u,...a.getInputProps(`itemKey`)}),(0,I.jsx)(Qm,{label:`Description`,placeholder:`Describe this order...`,...a.getInputProps(`description`),autosize:!0,minRows:3}),t&&(0,I.jsx)(R_,{label:`Status`,data:qX.options.map(e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1)})),...a.getInputProps(`status`)}),c&&(0,I.jsx)(`div`,{style:{color:`var(--mantine-color-red-6)`},children:c}),(0,I.jsxs)(B,{children:[(0,I.jsx)(H,{type:`submit`,loading:o,children:t?`Save Changes`:`Create`}),(0,I.jsx)(H,{variant:`subtle`,onClick:r,children:`Cancel`})]})]})})},GZ=()=>{let e=hC();return(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsx)(zv,{order:2,mb:`lg`,children:`Create Order`}),(0,I.jsx)(WZ,{onSubmit:async t=>{await q.post(J.orders,t),e(`/orders`)},onCancel:()=>e(`/orders`)})]})},KZ={[jX.draft]:`blue`,[jX.approved]:`green`,[jX.obsolete]:`gray`},qZ=10,JZ=({orderKey:e})=>{let t=hC(),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!0),[o,s]=(0,v.useState)(1),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)([]),[m,h]=(0,v.useState)(!1),g=(0,v.useCallback)(async()=>{a(!0);try{let t=new URLSearchParams({page:String(o),pageSize:String(qZ)});m&&t.set(`includeObsolete`,`true`),r(await q.get(`${J.orderRevs(e)}?${t}`))}catch(e){gM(e)}finally{a(!1)}},[e,o,m]);(0,v.useEffect)(()=>{g()},[g]);let _=async()=>{l(!0);try{t(`/orders/${e}/revs/${(await q.post(J.orderRevs(e),{})).revNo}/header`)}catch(e){gM(e)}finally{l(!1)}},y=async t=>{if(confirm(`Approve revision #${t.revNo}?`))try{await q.post(J.orderRevApprove(e,t.revNo),{}),await g()}catch(e){gM(e)}},b=async t=>{if(confirm(`Mark revision #${t.revNo} as obsolete?`))try{await q.post(J.orderRevObsolete(e,t.revNo),{}),await g()}catch(e){gM(e)}},x=async t=>{if(confirm(`Delete revision #${t.revNo}?`))try{await q.delete(J.orderRev(e,t.revNo)),await g()}catch(e){gM(e)}},S=e=>{p(t=>t.includes(e)?t.filter(t=>t!==e):t.length>=2?[t[1],e]:[...t,e])},C=()=>{if(f.length!==2)return;let[n,r]=f.sort((e,t)=>e-t);t(`/orders/${e}/revs/diff?from=${n}&to=${r}`)},w=n?Math.ceil(n.total/qZ):0;return(0,I.jsxs)(Wp,{withBorder:!0,p:`lg`,mt:`lg`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`md`,children:[(0,I.jsx)(zv,{order:4,children:`Revisions`}),(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsx)(yp,{label:`Show obsolete`,checked:m,onChange:e=>{h(e.currentTarget.checked),s(1)}}),u&&f.length===2&&(0,I.jsx)(H,{size:`sm`,variant:`light`,onClick:C,children:`Compare`}),(0,I.jsx)(H,{size:`sm`,variant:u?`filled`:`light`,color:u?`gray`:`violet`,onClick:()=>{d(e=>!e),p([])},children:u?`Cancel`:`Compare`}),n&&Rj(n._actions,`create`)&&(0,I.jsx)(H,{size:`sm`,onClick:_,loading:c,children:`New Revision`})]})]}),i?(0,I.jsx)(U,{align:`center`,py:`md`,children:(0,I.jsx)(uu,{})}):!n||n.items.length===0?(0,I.jsx)(V,{c:`dimmed`,children:`No revisions yet.`}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(W,{striped:!0,highlightOnHover:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[u&&(0,I.jsx)(W.Th,{w:40}),(0,I.jsx)(W.Th,{children:`Rev`}),(0,I.jsx)(W.Th,{children:`Status`}),(0,I.jsx)(W.Th,{children:`Change Summary`}),(0,I.jsx)(W.Th,{children:`Created`}),!u&&(0,I.jsx)(W.Th,{children:`Actions`})]})}),(0,I.jsx)(W.Tbody,{children:n.items.map(t=>{let n=`/orders/${e}/revs/${t.revNo}`;return(0,I.jsxs)(W.Tr,{style:{cursor:`pointer`},"data-testid":`revision-row-${t.revNo}`,children:[u&&(0,I.jsx)(W.Td,{children:(0,I.jsx)(yp,{checked:f.includes(t.revNo),onChange:()=>S(t.revNo)})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:(0,I.jsxs)(Ap,{color:`violet`,variant:`light`,children:[`REV `,t.revNo]})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:(0,I.jsx)(Ap,{color:KZ[t.status]??`gray`,variant:`light`,"data-testid":`revision-status-${t.revNo}`,children:t.status})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:t.changeSummary??`—`})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:new Date(t.createdAt).toLocaleString()})}),!u&&(0,I.jsx)(W.Td,{children:(0,I.jsxs)(B,{gap:`xs`,children:[Rj(t._actions,`approve`)&&(0,I.jsx)(H,{size:`xs`,variant:`light`,color:`green`,onClick:()=>y(t),"data-testid":`revision-approve-${t.revNo}`,children:`Approve`}),Rj(t._actions,`delete`)&&(0,I.jsx)(H,{size:`xs`,variant:`light`,color:`red`,onClick:()=>x(t),children:`Delete`}),Rj(t._actions,`cut-order`)&&(0,I.jsx)(H,{size:`xs`,variant:`light`,color:`teal`,component:zw,to:`/orders/${e}/runs/new?revNo=${t.revNo}`,"data-testid":`revision-cut-order-${t.revNo}`,children:`Cut Order`}),Rj(t._actions,`obsolete`)&&(0,I.jsx)(H,{size:`xs`,variant:`light`,color:`gray`,onClick:()=>b(t),children:`Mark Obsolete`})]})})]},t.id)})})]}),w>1&&(0,I.jsx)(B,{justify:`center`,mt:`md`,children:(0,I.jsx)(u_,{total:w,value:o,onChange:s})})]})]})},YZ=()=>{let{key:e}=bC(),t=hC(),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!0),[o,s]=(0,v.useState)(!1),c=(0,v.useCallback)(async()=>{if(e){a(!0);try{r(await q.get(J.order(e)))}catch(e){gM(e)}finally{a(!1)}}},[e]);return(0,v.useEffect)(()=>{c()},[c]),i?(0,I.jsx)(Qp,{size:`md`,py:`xl`,children:(0,I.jsx)(U,{align:`center`,children:(0,I.jsx)(uu,{})})}):n?o?(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsx)(zv,{order:2,mb:`lg`,children:`Edit Order`}),(0,I.jsx)(WZ,{initialData:{key:n.key,description:n.description,status:n.status,itemKey:n.itemKey},isEdit:!0,onSubmit:async n=>{e&&(await q.put(J.order(e),n),s(!1),n.key&&n.key!==e?t(`/orders/${n.key}`,{replace:!0}):await c())},onCancel:()=>s(!1)})]}):(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsxs)(B,{children:[(0,I.jsx)(zv,{order:2,children:n.key}),(0,I.jsx)(CZ,{createdBy:n.createdBy,createdAt:n.createdAt,updatedBy:n.updatedBy,updatedAt:n.updatedAt}),(0,I.jsx)(Ap,{color:n.status===JX.active?`green`:`gray`,variant:`light`,size:`lg`,children:n.status})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>t(`/orders`),children:`Back`}),(0,I.jsx)(H,{variant:`light`,component:zw,to:`/orders/${e}/runs`,children:`View Runs`}),Rj(n._actions,`update`)&&(0,I.jsx)(H,{onClick:()=>s(!0),children:`Edit`}),Rj(n._actions,`delete`)&&(0,I.jsx)(H,{color:`red`,variant:`outline`,onClick:async()=>{if(!(!e||!confirm(`Delete this order?`)))try{await q.delete(J.order(e)),t(`/orders`)}catch(e){gM(e)}},children:`Delete`})]})]}),(0,I.jsx)(Wp,{withBorder:!0,p:`lg`,children:(0,I.jsxs)(U,{gap:`sm`,children:[(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:120,children:`Produces Item:`}),n.itemKey?(0,I.jsx)(V,{component:zw,to:`/items/${n.itemKey}`,c:`blue`,style:{textDecoration:`none`},children:n.itemKey}):(0,I.jsx)(V,{children:`—`})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:120,children:`Description:`}),(0,I.jsx)(V,{children:n.description||`—`})]})]})}),(0,I.jsx)(JZ,{orderKey:e})]}):(0,I.jsx)(Qp,{size:`md`,py:`xl`,children:(0,I.jsx)(V,{children:`Order not found.`})})},XZ=()=>{let e=hC(),[t,n]=qw(),r=Number(t.get(`page`))||1,i=t.get(`status`)||void 0,a=t.get(`search`)||``,[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!0),u=(0,v.useCallback)(async()=>{l(!0);try{let e=new URLSearchParams;e.set(`page`,String(r)),e.set(`pageSize`,`20`),i&&e.set(`status`,i),a&&e.set(`search`,a),s(await q.get(`${J.orders}?${e}`))}catch(e){gM(e)}finally{l(!1)}},[r,i,a]);(0,v.useEffect)(()=>{u()},[u]);let d=o?Math.ceil(o.total/o.pageSize):0;return(0,I.jsxs)(Qp,{size:`lg`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsx)(zv,{order:2,children:`Orders`}),o&&Rj(o._actions,`create`)&&(0,I.jsx)(H,{onClick:()=>e(`/orders/new`),children:`Create New`})]}),(0,I.jsxs)(B,{mb:`md`,children:[(0,I.jsx)(Mv,{placeholder:`Search...`,value:a,onChange:e=>{let t=e.currentTarget.value;n(e=>(t?e.set(`search`,t):e.delete(`search`),e.set(`page`,`1`),e))},style:{flex:1}}),(0,I.jsx)(R_,{placeholder:`All statuses`,data:qX.options.map(e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1)})),value:i??null,onChange:e=>{n(t=>(e?t.set(`status`,e):t.delete(`status`),t.set(`page`,`1`),t))},clearable:!0})]}),c?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):o&&o.items.length>0?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(W,{striped:!0,highlightOnHover:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Key`}),(0,I.jsx)(W.Th,{children:`Status`}),(0,I.jsx)(W.Th,{children:`Created`})]})}),(0,I.jsx)(W.Tbody,{children:o.items.map(e=>{let t=`/orders/${e.key}`;return(0,I.jsxs)(W.Tr,{style:{cursor:`pointer`},children:[(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsx)(V,{size:`sm`,ff:`monospace`,children:e.key})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsx)(Ap,{color:e.status===JX.active?`green`:`gray`,variant:`light`,children:e.status})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:new Date(e.createdAt).toLocaleDateString()})})]},e.id)})})]}),d>1&&(0,I.jsx)(B,{justify:`center`,mt:`md`,children:(0,I.jsx)(u_,{total:d,value:r,onChange:e=>n(t=>(t.set(`page`,String(e)),t))})})]}):(0,I.jsx)(V,{c:`dimmed`,ta:`center`,py:`xl`,children:`No orders found.`})]})},ZZ=({items:e,loading:t,linkBuilder:n})=>(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(V,{fw:600,children:`OPERATIONS`}),(0,I.jsx)(Wp,{withBorder:!0,p:`lg`,children:t?(0,I.jsx)(U,{align:`center`,py:`sm`,children:(0,I.jsx)(uu,{size:`sm`})}):!e||e.length===0?(0,I.jsx)(V,{c:`dimmed`,size:`sm`,children:`No operations defined.`}):(0,I.jsxs)(W,{children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Seq`}),(0,I.jsx)(W.Th,{children:`Title`}),(0,I.jsx)(W.Th,{children:`Prerequisites`}),(0,I.jsx)(W.Th,{children:`Steps`}),(0,I.jsx)(W.Th,{children:`Cost`})]})}),(0,I.jsx)(W.Tbody,{children:e.map(e=>{let t=n(e.seqNo);return(0,I.jsxs)(W.Tr,{style:{cursor:`pointer`},children:[(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:e.seqNo})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:e.title})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:e.predecessors&&e.predecessors.length>0?(0,I.jsx)(B,{gap:4,children:e.predecessors.map(e=>(0,I.jsxs)(Ap,{variant:`light`,size:`sm`,children:[e.seqNo,`. `,e.title]},e.seqNo))}):(0,I.jsx)(V,{c:`dimmed`,size:`sm`,children:`None`})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:e.stepCount??0})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:e.cost?`$${e.cost.toFixed(2)}`:`—`})})]},e.id)})})]})})]}),QZ=()=>{let{orderKey:e,revNo:t}=bC(),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!0),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(!1),u=rN({initialValues:{description:``,changeSummary:``},validate:oU(NX)}),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(!0),h=(0,v.useCallback)(async()=>{if(!(!e||!t)){a(!0);try{r(await q.get(J.orderRev(e,t)))}catch(e){gM(e)}finally{a(!1)}}},[e,t]),g=(0,v.useCallback)(async()=>{if(!(!e||!t)){m(!0);try{f(await q.get(J.orderRevOps(e,t)))}catch(e){gM(e)}finally{m(!1)}}},[e,t]);(0,v.useEffect)(()=>{h(),g()},[h,g]);let _=()=>{n&&(u.setValues({description:n.description||``,changeSummary:n.changeSummary||``}),s(!0))},y=async i=>{if(n){l(!0);try{r(await q.put(J.orderRev(e,t),i)),s(!1)}catch(e){gM(e)}finally{l(!1)}}};if(i)return(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})});if(!n)return(0,I.jsx)(U,{p:`md`,children:(0,I.jsx)(V,{children:`Revision not found.`})});let b=Rj(n._actions,`update`);return(0,I.jsx)(Qp,{size:`md`,py:`xl`,w:`100%`,children:(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsxs)(B,{justify:`space-between`,children:[(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsx)(V,{fw:600,children:`HEADER`}),(0,I.jsx)(CZ,{createdBy:n.createdBy,createdAt:n.createdAt,updatedBy:n.updatedBy,updatedAt:n.updatedAt})]}),b&&!o&&(0,I.jsx)(H,{size:`xs`,variant:`light`,onClick:_,children:`Edit`})]}),(0,I.jsx)(Wp,{withBorder:!0,p:`lg`,children:o?(0,I.jsx)(`form`,{onSubmit:u.onSubmit(y),children:(0,I.jsxs)(U,{gap:`sm`,children:[(0,I.jsx)(Qm,{label:`Description`,placeholder:`Revision description...`,autosize:!0,minRows:3,...u.getInputProps(`description`)}),(0,I.jsx)(Qm,{label:`Change Summary`,placeholder:`What changed in this revision...`,autosize:!0,minRows:3,...u.getInputProps(`changeSummary`)}),(0,I.jsxs)(B,{justify:`flex-end`,mt:`xs`,children:[(0,I.jsx)(H,{variant:`subtle`,size:`xs`,onClick:()=>s(!1),children:`Cancel`}),(0,I.jsx)(H,{type:`submit`,size:`xs`,loading:c,children:`Save`})]})]})}):(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(V,{size:`sm`,fw:500,mb:4,children:`Produces Item`}),n.itemKey?(0,I.jsx)(V,{component:zw,to:`/items/${n.itemKey}`,size:`sm`,c:`blue`,style:{textDecoration:`none`},children:n.itemKey}):(0,I.jsx)(V,{c:`dimmed`,children:`None`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(V,{size:`sm`,fw:500,mb:4,children:`Description`}),n.description?(0,I.jsx)(nU,{children:n.description}):(0,I.jsx)(V,{c:`dimmed`,children:`No description`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(V,{size:`sm`,fw:500,mb:4,children:`Change Summary`}),n.changeSummary?(0,I.jsx)(nU,{children:n.changeSummary}):(0,I.jsx)(V,{c:`dimmed`,children:`No change summary`}),Number(t)>1&&(0,I.jsx)(V,{component:zw,to:`/orders/${e}/revs/diff?from=${Number(t)-1}&to=${t}`,size:`xs`,c:`blue`,mt:`xs`,style:{textDecoration:`none`,display:`inline-block`},children:`Diff with previous revision`})]})]})}),(0,I.jsx)(ZZ,{items:d?.items??null,loading:p,linkBuilder:n=>`/orders/${e}/revs/${t}/ops/${n}`})]})})},$Z=({value:e,onChange:t,...n})=>{let[r]=zt(e,300),[i,a]=(0,v.useState)([]),o=(0,v.useCallback)(async e=>{try{let t=new URLSearchParams;t.set(`pageSize`,`10`),e&&t.set(`search`,e),a((await q.get(`${J.workCenters}?${t}`)).items.map(e=>e.key))}catch{a([])}},[]);return(0,v.useEffect)(()=>{o(r)},[r,o]),(0,I.jsx)(Dp,{data:i,value:e,onChange:t,...n})},eQ=({orderKey:e,revNo:t,opSeqNo:n,showTitle:r=!0})=>{let[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!0),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(n);n!==f&&(p(n),a(null),s(!0),l(!1));let m=rN({initialValues:{predecessorSeqNo:10},validate:oU(WX)}),h=(0,v.useCallback)(async()=>{s(!0);try{a(await q.get(J.orderRevOpDeps(e,t,n)))}catch(e){gM(e)}finally{s(!1)}},[e,t,n]);(0,v.useEffect)(()=>{h()},[h]);let g=async r=>{if(i){d(!0);try{let o=await q.post(J.orderRevOpDeps(e,t,n),r);l(!1),a({...i,items:[...i.items,o].sort((e,t)=>e.predecessorSeqNo-t.predecessorSeqNo),total:i.total+1})}catch(e){gM(e)}finally{d(!1)}}},_=async r=>{if(i)try{await q.delete(J.orderRevOpDep(e,t,n,r.predecessorSeqNo)),a({...i,items:i.items.filter(e=>e.id!==r.id),total:i.total-1})}catch(e){gM(e)}},y=!o&&i!==null&&i.items.length===0&&!c;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(B,{justify:`space-between`,children:[r&&!y&&(0,I.jsx)(zv,{order:5,children:`Dependencies`}),Rj(i?._actions,`create`)&&!c&&(0,I.jsx)(H,{size:`xs`,variant:`light`,onClick:()=>{m.reset(),l(!0)},children:`Add Dependency`})]}),o?(0,I.jsx)(U,{align:`center`,py:`sm`,children:(0,I.jsx)(uu,{size:`sm`})}):(0,I.jsxs)(U,{gap:`xs`,children:[i?.items.map(e=>(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsxs)(Ap,{variant:`light`,size:`lg`,children:[e.predecessorSeqNo,`. `,e.predecessorTitle]}),zj(i?._actionTemplates,`deleteDependency`)&&(0,I.jsx)(H,{size:`compact-xs`,color:`red`,variant:`subtle`,onClick:()=>_(e),children:`Remove`})]},e.id)),c&&(0,I.jsx)(`form`,{onSubmit:m.onSubmit(g),children:(0,I.jsxs)(B,{gap:`sm`,children:[(0,I.jsx)(Vg,{placeholder:`Predecessor op #`,min:1,step:10,size:`xs`,style:{width:160},...m.getInputProps(`predecessorSeqNo`)}),(0,I.jsx)(H,{type:`submit`,size:`xs`,loading:u,children:`Add`}),(0,I.jsx)(H,{variant:`subtle`,size:`xs`,onClick:()=>l(!1),children:`Cancel`})]})})]})]})},tQ=({orderKey:e,revNo:t,opSeqNo:n})=>{let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!0),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)([]),[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(n);n!==b&&(x(n),i(null),o(!0));let S=(0,v.useCallback)(async()=>{o(!0);try{i(await q.get(J.orderRevOpFieldRefs(e,t,n)))}catch(e){gM(e)}finally{o(!1)}},[e,t,n]);(0,v.useEffect)(()=>{S()},[S]);let C=async()=>{c(!0),g(null),m(``),f(!0);try{u((await q.get(J.orderRevOpFieldRefAvailable(e,t,n))).items)}catch(e){gM(e)}finally{f(!1)}},w=async()=>{if(!(!h||!p.trim())){y(!0);try{let r=await q.post(J.orderRevOpFieldRefs(e,t,n),{title:p.trim(),sourceOpSeqNo:h.opSeqNo,sourceStepSeqNo:h.stepSeqNo});c(!1),i(e=>e&&{...e,items:[...e.items,r].sort((e,t)=>e.seqNo-t.seqNo),total:e.total+1})}catch(e){gM(e)}finally{y(!1)}}},T=async a=>{if(r)try{await q.delete(J.orderRevOpFieldRef(e,t,n,a.seqNo)),i({...r,items:r.items.filter(e=>e.id!==a.id),total:r.total-1})}catch(e){gM(e)}};return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(B,{justify:`space-between`,children:[!(!a&&r!==null&&r.items.length===0)&&(0,I.jsx)(zv,{order:5,children:`Referenced Fields`}),Rj(r?._actions,`create`)&&(0,I.jsx)(H,{size:`xs`,variant:`light`,onClick:C,children:`Add Reference`})]}),a?(0,I.jsx)(U,{align:`center`,py:`sm`,children:(0,I.jsx)(uu,{size:`sm`})}):(0,I.jsx)(U,{gap:`xs`,children:r?.items.map(n=>(0,I.jsxs)(Wp,{withBorder:!0,p:`sm`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:n.fields.length>0?`xs`:void 0,children:[(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsx)(V,{size:`sm`,fw:500,children:n.title}),(0,I.jsxs)(Wd,{component:zw,to:`/orders/${e}/revs/${t}/ops/${n.sourceOpSeqNo}`,size:`xs`,c:`dimmed`,children:[`Op `,n.sourceOpSeqNo,` / Step `,n.sourceStepSeqNo]})]}),Rj(n._actions,`delete`)&&(0,I.jsx)(H,{size:`compact-xs`,color:`red`,variant:`subtle`,onClick:()=>T(n),children:`Remove`})]}),n.fields.length>0&&(0,I.jsx)(W,{withRowBorders:!1,children:(0,I.jsx)(W.Tbody,{children:n.fields.map(e=>(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Td,{w:40,children:(0,I.jsx)(V,{size:`xs`,c:`dimmed`,children:e.seqNo})}),(0,I.jsx)(W.Td,{children:(0,I.jsx)(V,{size:`xs`,children:e.label})}),(0,I.jsx)(W.Td,{w:100,children:(0,I.jsx)(Ap,{variant:`light`,size:`xs`,children:e.type})})]},e.seqNo))})})]},n.id))}),(0,I.jsx)(Nh,{opened:s,onClose:()=>c(!1),title:`Add Field Reference`,size:`md`,children:(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsx)(Mv,{label:`Reference Title`,placeholder:`e.g. Dimensions from Inspection`,value:p,onChange:e=>m(e.currentTarget.value),"data-autofocus":!0}),(0,I.jsx)(V,{size:`sm`,fw:500,children:`Select a step with fields:`}),d?(0,I.jsx)(U,{align:`center`,py:`sm`,children:(0,I.jsx)(uu,{size:`sm`})}):l.length===0?(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`No steps with fields available to reference.`}):(0,I.jsx)(U,{gap:`xs`,children:l.map(e=>(0,I.jsx)(gl,{onClick:()=>{g(e),p.trim()||m(`${e.opTitle} - ${e.stepTitle}`)},style:t=>({padding:t.spacing.xs,borderRadius:t.radius.sm,border:`1px solid ${h?.stepId===e.stepId?t.colors.blue[5]:t.colors.gray[3]}`,backgroundColor:h?.stepId===e.stepId?t.colors.blue[0]:void 0}),children:(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsxs)(Ap,{variant:`light`,size:`sm`,children:[`Op `,e.opSeqNo,` / Step `,e.stepSeqNo]}),(0,I.jsxs)(V,{size:`sm`,children:[e.opTitle,` - `,e.stepTitle]}),(0,I.jsxs)(V,{size:`xs`,c:`dimmed`,children:[`(`,e.fieldCount,` field`,e.fieldCount===1?``:`s`,`)`]})]})},e.stepId))}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>c(!1),children:`Cancel`}),(0,I.jsx)(H,{onClick:()=>void w(),loading:_,disabled:!h||!p.trim(),children:`Add Reference`})]})]})})]})},nQ=({orderKey:e,revNo:t,opSeqNo:n})=>{let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!0),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)(n);n!==p&&(m(n),i(null),o(!0),c(null),u(!1));let h=rN({initialValues:{seqNo:10,title:``,instructions:``,multiSet:!1},validate:oU(oZ)}),g=rN({initialValues:{seqNo:10,title:``,instructions:``,multiSet:!1},validate:oU(aZ)}),_=(0,v.useCallback)(async()=>{o(!0);try{i(await q.get(J.orderRevOpSteps(e,t,n)))}catch(e){gM(e)}finally{o(!1)}},[e,t,n]);(0,v.useEffect)(()=>{_()},[_]);let y=e=>{h.setValues({seqNo:e.seqNo,title:e.title,instructions:e.instructions,multiSet:e.multiSet}),c(e.id),u(!1)},b=async a=>{let o=r?.items.find(e=>e.id===s);if(!(!o||!r)){f(!0);try{let s=await q.put(J.orderRevOpStep(e,t,n,o.seqNo),a);c(null),i({...r,items:r.items.map(e=>e.id===s.id?s:e).sort((e,t)=>e.seqNo-t.seqNo)})}catch(e){gM(e)}finally{f(!1)}}},x=async a=>{if(!(!r||!confirm(`Delete step ${a.seqNo}?`)))try{await q.delete(J.orderRevOpStep(e,t,n,a.seqNo)),i({...r,items:r.items.filter(e=>e.id!==a.id),total:r.total-1})}catch(e){gM(e)}};return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(B,{justify:`space-between`,children:[(0,I.jsx)(zv,{order:5,children:`Steps`}),Rj(r?._actions,`create`)&&!l&&(0,I.jsx)(H,{size:`xs`,variant:`light`,onClick:()=>{g.setValues({seqNo:r?.nextSeqNo??10,title:``,instructions:``}),u(!0),c(null)},children:`Add Step`})]}),a?(0,I.jsx)(U,{align:`center`,py:`sm`,children:(0,I.jsx)(uu,{size:`sm`})}):(0,I.jsxs)(U,{gap:`xs`,children:[r?.items.map(r=>(0,I.jsxs)(Wp,{withBorder:!0,p:`sm`,children:[s===r.id?(0,I.jsx)(`form`,{onSubmit:h.onSubmit(b),children:(0,I.jsxs)(U,{gap:`sm`,children:[(0,I.jsx)(Vg,{label:`Sequence #`,min:1,step:10,...h.getInputProps(`seqNo`)}),(0,I.jsx)(Mv,{label:`Title`,placeholder:`Short step name`,...h.getInputProps(`title`)}),(0,I.jsx)(Qm,{label:`Instructions (markdown)`,placeholder:`Step instructions...`,autosize:!0,minRows:3,...h.getInputProps(`instructions`)}),(0,I.jsx)(yp,{label:`Allow multiple field value sets`,...h.getInputProps(`multiSet`,{type:`checkbox`})}),(0,I.jsxs)(B,{justify:`flex-end`,mt:`xs`,children:[(0,I.jsx)(H,{variant:`subtle`,size:`xs`,onClick:()=>c(null),children:`Cancel`}),(0,I.jsx)(H,{type:`submit`,size:`xs`,loading:d,children:`Save`})]})]})}):(0,I.jsxs)(B,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,children:[(0,I.jsxs)(U,{gap:4,style:{flex:1,minWidth:0},children:[(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsxs)(V,{fw:600,size:`sm`,children:[`STEP `,r.seqNo,r.title?`: ${r.title}`:``]}),r.multiSet&&(0,I.jsx)(Ap,{size:`xs`,variant:`light`,color:`violet`,children:`multi-set`})]}),r.instructions?(0,I.jsx)(nU,{children:r.instructions}):(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`No instructions`})]}),(0,I.jsxs)(B,{gap:`xs`,wrap:`nowrap`,children:[(0,I.jsx)(CZ,{createdBy:r.createdBy,createdAt:r.createdAt,updatedBy:r.updatedBy,updatedAt:r.updatedAt}),Rj(r._actions,`update`)&&(0,I.jsx)(H,{size:`xs`,variant:`light`,onClick:()=>y(r),children:`Edit`}),Rj(r._actions,`delete`)&&(0,I.jsx)(H,{size:`xs`,color:`red`,variant:`outline`,onClick:()=>x(r),children:`Delete`})]})]}),(0,I.jsx)(EZ,{fieldsEndpoint:J.orderRevOpStepFields(e,t,n,r.seqNo),fieldEndpoint:i=>J.orderRevOpStepField(e,t,n,r.seqNo,i),initialData:r.fields})]},r.id)),r&&r.items.length===0&&!l&&(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`No steps yet.`}),l&&(0,I.jsx)(Wp,{withBorder:!0,p:`sm`,children:(0,I.jsx)(`form`,{onSubmit:g.onSubmit(async a=>{if(r){f(!0);try{let o=await q.post(J.orderRevOpSteps(e,t,n),a);u(!1),i({...r,items:[...r.items,o].sort((e,t)=>e.seqNo-t.seqNo),total:r.total+1,nextSeqNo:o.seqNo+10})}catch(e){gM(e)}finally{f(!1)}}}),children:(0,I.jsxs)(U,{gap:`sm`,children:[(0,I.jsx)(Vg,{label:`Sequence #`,min:1,step:10,...g.getInputProps(`seqNo`)}),(0,I.jsx)(Mv,{label:`Title`,placeholder:`Short step name`,...g.getInputProps(`title`)}),(0,I.jsx)(Qm,{label:`Instructions (markdown)`,placeholder:`Step instructions...`,autosize:!0,minRows:3,...g.getInputProps(`instructions`)}),(0,I.jsx)(yp,{label:`Allow multiple field value sets`,...g.getInputProps(`multiSet`,{type:`checkbox`})}),(0,I.jsxs)(B,{justify:`flex-end`,mt:`xs`,children:[(0,I.jsx)(H,{variant:`subtle`,size:`xs`,onClick:()=>u(!1),children:`Cancel`}),(0,I.jsx)(H,{type:`submit`,size:`xs`,loading:d,children:`Add`})]})]})})})]})]})},rQ=()=>{let{orderKey:e,revNo:t,seqNo:n}=bC(),r=hC(),{onOperationUpdate:i}=vC(),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!0),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)(!1),p=rN({initialValues:{title:``,description:``,workCenterKey:``,seqNo:10},validate:oU(wX)}),m=(0,v.useCallback)(async()=>{if(!(!e||!t||!n)){c(!0);try{o(await q.get(J.orderRevOp(e,t,n)))}catch(e){gM(e)}finally{c(!1)}}},[e,t,n]);(0,v.useEffect)(()=>{m()},[m]);let h=()=>{a&&(p.setValues({title:a.title,description:a.description,workCenterKey:a.workCenterKey??``,seqNo:a.seqNo}),u(!0))},g=async n=>{if(a){f(!0);try{let s={...n,workCenterKey:n.workCenterKey||null},c=await q.put(J.orderRevOp(e,t,a.seqNo),s);o(c),u(!1),i(),n.seqNo&&n.seqNo!==a.seqNo&&r(`/orders/${e}/revs/${t}/ops/${c.seqNo}`,{replace:!0})}catch(e){gM(e)}finally{f(!1)}}},_=async()=>{if(!(!a||!confirm(`Delete operation "${a.title}"?`)))try{await q.delete(J.orderRevOp(e,t,a.seqNo)),r(`/orders/${e}/revs/${t}`)}catch(e){gM(e)}};if(s)return(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})});if(!a)return(0,I.jsx)(U,{p:`md`,children:(0,I.jsx)(V,{children:`Operation not found.`})});let y=Rj(a._actions,`update`);return(0,I.jsx)(Qp,{size:`md`,py:`xl`,w:`100%`,children:(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsxs)(B,{justify:`space-between`,children:[(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsxs)(V,{fw:600,children:[`OPERATION `,a.seqNo,`: `,a.title]}),a.workCenterKey&&(0,I.jsxs)(V,{size:`sm`,c:`dimmed`,children:[`[`,a.workCenterKey,`]`]}),(0,I.jsx)(CZ,{createdBy:a.createdBy,createdAt:a.createdAt,updatedBy:a.updatedBy,updatedAt:a.updatedAt})]}),(0,I.jsxs)(B,{gap:`xs`,children:[y&&!l&&(0,I.jsx)(H,{size:`xs`,variant:`light`,onClick:h,children:`Edit`}),Rj(a._actions,`delete`)&&(0,I.jsx)(H,{size:`xs`,color:`red`,variant:`outline`,onClick:_,children:`Delete`})]})]}),(0,I.jsx)(Wp,{withBorder:!0,p:`lg`,children:l?(0,I.jsx)(`form`,{onSubmit:p.onSubmit(g),children:(0,I.jsxs)(U,{gap:`sm`,children:[(0,I.jsx)(Mv,{label:`Title`,placeholder:`Operation title...`,...p.getInputProps(`title`)}),(0,I.jsx)(Vg,{label:`Sequence #`,min:1,step:10,...p.getInputProps(`seqNo`)}),(0,I.jsx)($Z,{label:`Work Center`,placeholder:`Search work centers...`,value:p.values.workCenterKey??``,onChange:e=>p.setFieldValue(`workCenterKey`,e)}),(0,I.jsx)(Qm,{label:`Description`,placeholder:`Operation description...`,autosize:!0,minRows:3,...p.getInputProps(`description`)}),(0,I.jsxs)(B,{justify:`flex-end`,mt:`xs`,children:[(0,I.jsx)(H,{variant:`subtle`,size:`xs`,onClick:()=>u(!1),children:`Cancel`}),(0,I.jsx)(H,{type:`submit`,size:`xs`,loading:d,children:`Save`})]})]})}):a.description?(0,I.jsx)(nU,{children:a.description}):(0,I.jsx)(V,{c:`dimmed`,children:`No description`})}),(0,I.jsx)(eQ,{orderKey:e,revNo:t,opSeqNo:n}),(0,I.jsx)(tQ,{orderKey:e,revNo:t,opSeqNo:n}),(0,I.jsx)(nQ,{orderKey:e,revNo:t,opSeqNo:n})]})})},iQ={added:`green`,removed:`red`,modified:`yellow`,unchanged:`gray`},aQ=({changes:e})=>(0,I.jsxs)(W,{withTableBorder:!0,withColumnBorders:!0,fz:`sm`,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Property`}),(0,I.jsx)(W.Th,{children:`From`}),(0,I.jsx)(W.Th,{children:`To`})]})}),(0,I.jsx)(W.Tbody,{children:e.map(e=>(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Td,{fw:600,children:e.field}),(0,I.jsx)(W.Td,{c:`red`,children:String(e.from??`—`)}),(0,I.jsx)(W.Td,{c:`green`,children:String(e.to??`—`)})]},e.field))})]}),oQ=({fields:e})=>{let t=e.filter(e=>e.status!==`unchanged`);return t.length===0?null:(0,I.jsxs)(U,{gap:`xs`,ml:`md`,children:[(0,I.jsx)(V,{fz:`sm`,fw:600,children:`Fields`}),t.map(e=>(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsx)(Ap,{size:`xs`,color:iQ[e.status],children:e.status}),(0,I.jsxs)(V,{fz:`sm`,children:[`#`,e.seqNo,` `,e.label]}),e.changes&&e.changes.length>0&&(0,I.jsxs)(V,{fz:`xs`,c:`dimmed`,children:[`(`,e.changes.map(e=>e.field).join(`, `),`)`]})]},e.seqNo))]})},sQ=({steps:e})=>{let t=e.filter(e=>e.status!==`unchanged`);return t.length===0?null:(0,I.jsxs)(U,{gap:`xs`,ml:`md`,children:[(0,I.jsx)(V,{fz:`sm`,fw:600,children:`Steps`}),t.map(e=>(0,I.jsxs)(Wp,{withBorder:!0,p:`xs`,children:[(0,I.jsxs)(B,{gap:`xs`,mb:e.changes||e.fields?`xs`:0,children:[(0,I.jsx)(Ap,{size:`xs`,color:iQ[e.status],children:e.status}),(0,I.jsxs)(V,{fz:`sm`,children:[`Step #`,e.seqNo,` `,e.title||`(untitled)`]})]}),e.changes&&e.changes.length>0&&(0,I.jsx)(aQ,{changes:e.changes}),e.fields&&(0,I.jsx)(oQ,{fields:e.fields})]},e.seqNo))]})},cQ=({deps:e})=>{let t=e.filter(e=>e.status!==`unchanged`);return t.length===0?null:(0,I.jsxs)(U,{gap:`xs`,ml:`md`,children:[(0,I.jsx)(V,{fz:`sm`,fw:600,children:`Dependencies`}),t.map(e=>(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsx)(Ap,{size:`xs`,color:iQ[e.status],children:e.status}),(0,I.jsxs)(V,{fz:`sm`,children:[`Predecessor: #`,e.predecessorSeqNo,` `,e.predecessorTitle]})]},e.predecessorSeqNo))]})},lQ=({op:e})=>(0,I.jsxs)(Pd.Item,{value:`op-${e.seqNo}`,children:[(0,I.jsx)(Pd.Control,{children:(0,I.jsxs)(B,{gap:`sm`,children:[(0,I.jsx)(Ap,{color:iQ[e.status],children:e.status}),(0,I.jsxs)(V,{fw:600,children:[`OP `,e.seqNo,`: `,e.title]})]})}),(0,I.jsx)(Pd.Panel,{children:(0,I.jsxs)(U,{gap:`sm`,children:[e.changes&&e.changes.length>0&&(0,I.jsx)(aQ,{changes:e.changes}),e.steps&&(0,I.jsx)(sQ,{steps:e.steps}),e.dependencies&&(0,I.jsx)(cQ,{deps:e.dependencies}),!e.changes&&!e.steps&&!e.dependencies&&(0,I.jsx)(V,{fz:`sm`,c:`dimmed`,children:e.status===`added`?`New operation`:e.status===`removed`?`Operation removed`:`No changes`})]})})]}),uQ=()=>{let{orderKey:e}=bC(),[t]=qw(),n=hC(),r=t.get(`from`),i=t.get(`to`),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!0),l=(0,v.useCallback)(async()=>{if(!(!e||!r||!i)){c(!0);try{o(await q.get(J.orderRevDiff(e,r,i)))}catch(e){gM(e)}finally{c(!1)}}},[e,r,i]);(0,v.useEffect)(()=>{l()},[l]);let u=a?a.operations.filter(e=>e.status!==`unchanged`):[],d=a?a.operations.length-u.length:0;return(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsxs)(zv,{order:2,children:[`Compare Revisions: Rev `,r,` → Rev `,i]}),(0,I.jsx)(H,{variant:`subtle`,onClick:()=>n(`/orders/${e}`),children:`Back to Order`})]}),s?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):a?(0,I.jsxs)(U,{gap:`md`,children:[a.revisionChanges.length>0&&(0,I.jsxs)(Wp,{withBorder:!0,p:`lg`,children:[(0,I.jsx)(zv,{order:4,mb:`sm`,children:`Revision Properties`}),(0,I.jsx)(aQ,{changes:a.revisionChanges})]}),(0,I.jsxs)(Wp,{withBorder:!0,p:`lg`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`sm`,children:[(0,I.jsx)(zv,{order:4,children:`Operations`}),d>0&&(0,I.jsxs)(V,{fz:`sm`,c:`dimmed`,children:[d,` unchanged operation`,d===1?``:`s`,` hidden`]})]}),u.length===0&&a.revisionChanges.length===0?(0,I.jsx)(V,{c:`dimmed`,children:`No differences found between revisions.`}):u.length===0?(0,I.jsx)(V,{c:`dimmed`,children:`No operation changes.`}):(0,I.jsx)(Pd,{variant:`separated`,multiple:!0,children:u.map(e=>(0,I.jsx)(lQ,{op:e},e.seqNo))})]})]}):(0,I.jsx)(V,{children:`Could not load diff.`})]})},dQ=({orderKey:e,revNo:t,refreshKey:n})=>{let r=hC(),i=fC(),{seqNo:a}=bC(),o=i.pathname.endsWith(`/header`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!0),[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)(!1),h=rN({initialValues:{seqNo:10,title:``,description:``},validate:oU(CX)}),g=(0,v.useCallback)(async()=>{u(!0);try{c(await q.get(J.orderRevOps(e,t)))}catch(e){gM(e)}finally{u(!1)}},[e,t]);return(0,v.useEffect)(()=>{g()},[g,n]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(U,{gap:`xs`,children:[(0,I.jsx)(Wp,{padding:`sm`,radius:`md`,withBorder:!0,component:`a`,href:`/erp/orders/${e}/revs/${t}/header`,onClick:n=>{n.button===1||n.ctrlKey||n.metaKey||(n.preventDefault(),r(`/orders/${e}/revs/${t}/header`))},style:{cursor:`pointer`,textDecoration:`none`,color:`inherit`,backgroundColor:o?`var(--mantine-color-blue-9)`:void 0},children:(0,I.jsx)(V,{size:`sm`,fw:500,children:`Header`})}),l?(0,I.jsx)(U,{align:`center`,py:`md`,children:(0,I.jsx)(uu,{size:`sm`})}):!s||s.items.length===0?(0,I.jsx)(V,{c:`dimmed`,size:`sm`,ta:`center`,py:`md`,children:`No operations yet.`}):s.items.map(n=>{let i=`/orders/${e}/revs/${t}/ops/${n.seqNo}`;return(0,I.jsx)(Wp,{padding:`sm`,radius:`md`,withBorder:!0,component:`a`,href:`/erp${i}`,onClick:e=>{e.button===1||e.ctrlKey||e.metaKey||(e.preventDefault(),r(i))},style:{cursor:`pointer`,textDecoration:`none`,color:`inherit`,backgroundColor:a===String(n.seqNo)?`var(--mantine-color-blue-9)`:void 0},children:(0,I.jsxs)(V,{size:`sm`,fw:500,children:[n.seqNo,`. `,n.title]})},n.id)}),Rj(s?._actions,`create`)&&(0,I.jsx)(H,{variant:`subtle`,color:`gray`,size:`compact-sm`,leftSection:(0,I.jsx)(lM,{size:`0.9rem`}),onClick:()=>{h.setFieldValue(`seqNo`,s?.nextSeqNo??10),f(!0)},fullWidth:!0,mt:`xs`,children:`Add Operation`})]}),(0,I.jsx)(Nh,{opened:d,onClose:()=>{f(!1),h.reset()},title:`Add Operation`,children:(0,I.jsx)(`form`,{onSubmit:h.onSubmit(async n=>{m(!0);try{let i=await q.post(J.orderRevOps(e,t),{seqNo:n.seqNo,title:n.title,description:n.description||void 0});f(!1),h.reset(),await g(),r(`/orders/${e}/revs/${t}/ops/${i.seqNo}`)}catch(e){gM(e)}finally{m(!1)}}),children:(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsx)(Vg,{label:`Sequence #`,min:1,step:10,...h.getInputProps(`seqNo`)}),(0,I.jsx)(Mv,{label:`Title`,placeholder:`Operation title...`,...h.getInputProps(`title`)}),(0,I.jsx)(Qm,{label:`Description`,placeholder:`Optional description...`,...h.getInputProps(`description`),autosize:!0,minRows:2}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>{f(!1),h.reset()},children:`Cancel`}),(0,I.jsx)(H,{type:`submit`,loading:p,children:`Create`})]})]})})})]})},fQ={[jX.draft]:`blue`,[jX.approved]:`green`,[jX.obsolete]:`gray`},pQ=({revision:e,orderKey:t,revNo:n,onRefresh:r,onOpenOperations:i})=>{let a=hC();return(0,I.jsxs)(B,{justify:`space-between`,px:`md`,py:`xs`,style:{borderBottom:`calc(0.125rem * var(--mantine-scale)) solid var(--mantine-color-dark-4)`},children:[(0,I.jsxs)(B,{gap:`sm`,children:[i&&(0,I.jsx)(vu,{variant:`subtle`,color:`gray`,hiddenFrom:`md`,onClick:i,children:(0,I.jsx)(oM,{size:`1.2rem`})}),(0,I.jsxs)(V,{size:`lg`,children:[`ORDER:`,` `,(0,I.jsx)(Wd,{href:`/erp/orders/${t}`,onClick:e=>{e.button===1||e.ctrlKey||e.metaKey||(e.preventDefault(),a(`/orders/${t}`))},children:t})]}),(0,I.jsxs)(Ap,{color:`violet`,variant:`light`,size:`sm`,children:[`REV `,e.revNo]}),(0,I.jsx)(Ap,{color:fQ[e.status]??`gray`,variant:`light`,size:`sm`,children:e.status}),e.description&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`|`}),(0,I.jsx)(V,{size:`sm`,c:`dimmed`,lineClamp:1,maw:300,children:e.description})]})]}),(0,I.jsxs)(B,{gap:`xs`,children:[Rj(e._actions,`approve`)&&(0,I.jsx)(H,{size:`xs`,color:`green`,onClick:async()=>{if(confirm(`Approve revision #${n}?`))try{await q.post(J.orderRevApprove(t,n),{}),r()}catch(e){gM(e)}},children:`Approve`}),(0,I.jsx)(iN,{actions:e._actions,rel:`cut-order`,size:`xs`,color:`teal`,onClick:()=>a(`/orders/${t}/runs/new?revNo=${e.revNo}`),children:`Cut Order`}),(0,I.jsx)(iN,{actions:e._actions,rel:`obsolete`,size:`xs`,color:`gray`,variant:`outline`,onClick:async()=>{if(confirm(`Mark revision #${n} as obsolete?`))try{await q.post(J.orderRevObsolete(t,n),{}),r()}catch(e){gM(e)}},children:`Obsolete`}),Rj(e._actions,`delete`)&&(0,I.jsx)(H,{size:`xs`,color:`red`,variant:`outline`,onClick:async()=>{if(confirm(`Delete revision #${n}?`))try{await q.delete(J.orderRev(t,n)),a(`/orders/${t}`)}catch(e){gM(e)}},children:`Delete`})]})]})},mQ=260,hQ=()=>{let{orderKey:e,revNo:t}=bC(),n=fC(),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!0),[s,{toggle:c}]=_n(),[l,{open:u,close:d}]=_n(),[f,p]=(0,v.useState)(0),m={onOperationUpdate:()=>p(e=>e+1)},h=(0,v.useCallback)(async()=>{if(!(!e||!t)){o(!0);try{i(await q.get(J.orderRev(e,t)))}catch(e){gM(e)}finally{o(!1)}}},[e,t]);return(0,v.useEffect)(()=>{h()},[h]),(0,v.useEffect)(()=>{d()},[n.pathname]),a?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):!r||!e||!t?(0,I.jsx)(R,{p:`md`,children:(0,I.jsx)(V,{children:`Revision not found.`})}):(0,I.jsxs)(R,{display:`flex`,style:{flexDirection:`column`,height:`calc(100dvh - var(--app-shell-header-height, 0px))`},children:[(0,I.jsx)(pQ,{revision:r,orderKey:e,revNo:t,onRefresh:h,onOpenOperations:u}),(0,I.jsxs)(R,{display:`flex`,style:{flex:1,minHeight:0},children:[(0,I.jsx)(R,{visibleFrom:`md`,style:{flexShrink:0,display:`flex`,flexDirection:`column`},children:s?(0,I.jsx)(R,{style:{borderRight:`1px solid var(--mantine-color-dark-4)`,paddingRight:4},children:(0,I.jsx)(M_,{label:`Expand sidebar`,position:`right`,children:(0,I.jsx)(vu,{variant:`subtle`,color:`gray`,onClick:c,children:(0,I.jsx)(aM,{size:`1.2rem`})})})}):(0,I.jsxs)(R,{style:{width:mQ,minWidth:mQ,borderRight:`1px solid var(--mantine-color-dark-4)`,display:`flex`,flexDirection:`column`,overflowY:`auto`,padding:`0 var(--mantine-spacing-md)`},children:[(0,I.jsx)(B,{justify:`flex-end`,p:4,children:(0,I.jsx)(M_,{label:`Collapse sidebar`,position:`right`,children:(0,I.jsx)(vu,{variant:`subtle`,color:`gray`,size:`sm`,onClick:c,children:(0,I.jsx)(iM,{size:`1rem`})})})}),(0,I.jsx)(dQ,{orderKey:e,revNo:t,refreshKey:f})]})}),(0,I.jsx)(`div`,{style:{flex:1,minHeight:0,overflowY:`auto`,display:`flex`,flexDirection:`column`},children:(0,I.jsx)(GC,{context:m})})]}),(0,I.jsx)(Cm,{opened:l,onClose:d,title:`Operations`,size:mQ,children:(0,I.jsx)(dQ,{orderKey:e,revNo:t,refreshKey:f})})]})};function gQ(){return new Date().toISOString().slice(0,10)}function _Q(e,t){let n={priority:e.priority||void 0,dueAt:e.dueAt||void 0,releaseNote:e.releaseNote||void 0};return t?(e.dueAt||(n.dueAt=null),e.releaseNote||(n.releaseNote=null)):n.revNo=typeof e.revNo==`number`?e.revNo:void 0,n}var vQ=({initialData:e,isEdit:t,onSubmit:n,onCancel:r})=>{let i=t?VX:BX,a=rN({initialValues:{revNo:e?.revNo??``,priority:e?.priority??RX.medium,dueAt:e?.dueAt??(t?``:gQ()),releaseNote:e?.releaseNote??``},validate:e=>oU(i)(_Q(e,t))}),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(null);return(0,I.jsx)(`form`,{onSubmit:a.onSubmit(async e=>{s(!0),l(null);try{let r=_Q(e,t);await n(i.parse(r))}catch(e){l(e instanceof Error?e.message:`An error occurred`)}finally{s(!1)}}),children:(0,I.jsxs)(U,{gap:`md`,children:[!t&&(0,I.jsx)(Vg,{label:`Rev No`,placeholder:`Latest approved`,min:1,...a.getInputProps(`revNo`)}),(0,I.jsx)(R_,{label:`Priority`,data:LX.options.map(e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1)})),...a.getInputProps(`priority`)}),(0,I.jsx)(Mv,{label:`Due Date`,type:`date`,...a.getInputProps(`dueAt`)}),(0,I.jsx)(Qm,{label:`Release Note`,placeholder:`Additional notes...`,...a.getInputProps(`releaseNote`),autosize:!0,minRows:3}),c&&(0,I.jsx)(`div`,{style:{color:`var(--mantine-color-red-6)`},children:c}),(0,I.jsxs)(B,{children:[(0,I.jsx)(H,{type:`submit`,loading:o,children:t?`Save Changes`:`Create`}),(0,I.jsx)(H,{variant:`subtle`,onClick:r,children:`Cancel`})]})]})})},yQ={[RX.low]:`gray`,[RX.medium]:`blue`,[RX.high]:`orange`,[RX.critical]:`red`},bQ=()=>{let{orderKey:e,runNo:t}=bC(),{orderRun:n,onOrderRunUpdate:r}=vC(),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(!0),f=(0,v.useCallback)(async()=>{if(e)try{s((await q.get(J.orderRev(e,n.revNo))).description||null)}catch{}},[e,n.revNo]),p=(0,v.useCallback)(async()=>{if(!(!e||!t)){d(!0);try{l(await q.get(J.operationRuns(e,t)))}catch(e){gM(e)}finally{d(!1)}}},[e,t]);(0,v.useEffect)(()=>{f(),p()},[f,p]);let m=async n=>{try{r(await q.put(J.orderRun(e,t),n)),a(!1)}catch(e){gM(e)}},h=Rj(n._actions,`update`);return(0,I.jsx)(Qp,{size:`md`,py:`xl`,w:`100%`,children:(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsxs)(B,{justify:`space-between`,children:[(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsx)(V,{fw:600,children:`HEADER`}),(0,I.jsx)(CZ,{createdBy:n.createdBy,createdAt:n.createdAt,updatedBy:n.updatedBy,updatedAt:n.updatedAt})]}),h&&!i&&(0,I.jsx)(H,{size:`xs`,variant:`light`,onClick:()=>a(!0),children:`Edit`})]}),(0,I.jsx)(Wp,{withBorder:!0,p:`lg`,children:i?(0,I.jsx)(vQ,{initialData:{priority:n.priority,dueAt:n.dueAt??``,releaseNote:n.releaseNote??``},isEdit:!0,onSubmit:m,onCancel:()=>a(!1)}):(0,I.jsxs)(U,{gap:`sm`,children:[(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:140,children:`Produces Item:`}),n.itemKey?(0,I.jsx)(V,{component:zw,to:`/items/${n.itemKey}`,size:`sm`,c:`blue`,style:{textDecoration:`none`},children:n.itemKey}):(0,I.jsx)(V,{c:`dimmed`,children:`—`})]}),(0,I.jsxs)(B,{align:`flex-start`,children:[(0,I.jsx)(V,{fw:600,w:140,children:`Description:`}),o?(0,I.jsx)(nU,{children:o}):(0,I.jsx)(V,{c:`dimmed`,children:`—`})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:140,children:`Priority:`}),(0,I.jsx)(Ap,{color:yQ[n.priority]??`gray`,variant:`light`,children:n.priority})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:140,children:`Due Date:`}),(0,I.jsx)(V,{children:n.dueAt??`—`})]}),(0,I.jsxs)(B,{align:`flex-start`,children:[(0,I.jsx)(V,{fw:600,w:140,children:`Release Note:`}),(0,I.jsx)(V,{style:{whiteSpace:`pre-wrap`},children:n.releaseNote??`—`})]})]})}),(0,I.jsx)(ZZ,{items:c?.items??null,loading:u,linkBuilder:n=>`/orders/${e}/runs/${t}/ops/${n}`})]})})},xQ={note:`blue`,issue:`red`,feedback:`green`},SQ=({orderKey:e,runNo:t,seqNo:n,refreshKey:r,onCountChange:i})=>{let[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!0),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(`note`),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(n);n!==h&&(g(n),o(null),c(!0));let _=(0,v.useCallback)(async()=>{c(!0);try{let r=await q.get(J.operationRunComments(e,t,n));o(r),i?.(r.total)}catch(e){gM(e)}finally{c(!1)}},[e,t,n,r]);(0,v.useEffect)(()=>{_()},[_]);let y=async()=>{if(l.trim()){m(!0);try{let r=await q.post(J.operationRunComments(e,t,n),{type:d,body:l.trim()});o(e=>e&&{...e,items:[...e.items,r],total:e.total+1}),i?.((a?.total??0)+1),u(``)}catch(e){gM(e)}finally{m(!1)}}},b=a?._actions&&Rj(a._actions,`create`);return s?(0,I.jsx)(U,{align:`center`,py:`sm`,children:(0,I.jsx)(uu,{size:`sm`})}):(0,I.jsxs)(U,{gap:`xs`,children:[a?.items.map(e=>(0,I.jsxs)(Wp,{withBorder:!0,p:`sm`,children:[(0,I.jsxs)(B,{justify:`space-between`,align:`flex-start`,mb:4,children:[(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsx)(V,{size:`sm`,fw:600,children:e.createdBy}),(0,I.jsx)(Ap,{color:xQ[e.type]??`gray`,variant:`light`,size:`xs`,children:e.type})]}),(0,I.jsx)(V,{size:`xs`,c:`dimmed`,children:new Date(e.createdAt).toLocaleString()})]}),(0,I.jsx)(V,{size:`sm`,style:{whiteSpace:`pre-wrap`},children:e.body})]},e.id)),a&&a.items.length===0&&(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`No comments.`}),b&&(0,I.jsx)(Wp,{withBorder:!0,p:`sm`,children:(0,I.jsxs)(U,{gap:`xs`,children:[(0,I.jsx)(Qm,{autosize:!0,minRows:2,placeholder:`Add a comment...`,value:l,onChange:e=>u(e.currentTarget.value)}),(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsx)(R_,{size:`xs`,w:120,value:d,onChange:e=>f(e??`note`),data:[{value:`note`,label:`Note`},{value:`issue`,label:`Issue`},{value:`feedback`,label:`Feedback`}]}),(0,I.jsx)(H,{size:`xs`,loading:p,disabled:!l.trim(),onClick:()=>void y(),children:`Post`})]})]})})]})};function CQ(e,t){let n=(t?new Date(t):new Date).getTime()-new Date(e).getTime(),r=Math.floor(n/6e4),i=Math.floor(r/60),a=r%60;return i>0?`${i}h ${a}m`:`${a}m`}var wQ=({orderKey:e,runNo:t,seqNo:n,refreshKey:r,showTitle:i=!0,onActionsChange:a})=>{let[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!0),[u,d]=(0,v.useState)(n);n!==u&&(d(n),s(null),l(!0));let f=(0,v.useCallback)(async()=>{l(!0);try{s(await q.get(J.laborTickets(e,t,n)))}catch(e){gM(e)}finally{l(!1)}},[e,t,n,r]);(0,v.useEffect)(()=>{f()},[f]),(0,v.useEffect)(()=>{a?.({canClockIn:!!o&&!!Rj(o._actions,`clock-in`),canClockOut:!!o&&!!Rj(o._actions,`clock-out`)})},[o,a]);let p=async r=>{try{await q.delete(J.laborTicket(e,t,n,r)),await f()}catch(e){gM(e)}};return(0,I.jsxs)(I.Fragment,{children:[i&&(0,I.jsx)(zv,{order:5,children:`Labor Tickets`}),c?(0,I.jsx)(U,{align:`center`,py:`sm`,children:(0,I.jsx)(uu,{size:`sm`})}):(0,I.jsx)(I.Fragment,{children:o&&o.items.length>0?(0,I.jsxs)(W,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`User`}),(0,I.jsx)(W.Th,{children:`Run`}),(0,I.jsx)(W.Th,{children:`Clock In`}),(0,I.jsx)(W.Th,{children:`Clock Out`}),(0,I.jsx)(W.Th,{children:`Duration`}),(0,I.jsx)(W.Th,{children:`Cost`}),(0,I.jsx)(W.Th,{})]})}),(0,I.jsx)(W.Tbody,{children:o.items.map(e=>(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Td,{children:e.username}),(0,I.jsx)(W.Td,{children:e.runId==null?`—`:(0,I.jsx)(Wd,{size:`sm`,href:`/supervisor/agents/${e.username}/runs/${e.runId}-1`,children:e.runId})}),(0,I.jsx)(W.Td,{children:new Date(e.clockIn).toLocaleString()}),(0,I.jsx)(W.Td,{children:e.clockOut?new Date(e.clockOut).toLocaleString():(0,I.jsx)(Ap,{color:`green`,size:`sm`,variant:`light`,children:`Open`})}),(0,I.jsx)(W.Td,{children:CQ(e.clockIn,e.clockOut)}),(0,I.jsx)(W.Td,{children:e.cost==null?`—`:`$${e.cost.toFixed(2)}`}),(0,I.jsx)(W.Td,{children:zj(o._actionTemplates,`deleteTicket`)&&(0,I.jsx)(vu,{size:`xs`,variant:`subtle`,color:`red`,onClick:()=>void p(e.id),title:`Delete ticket`,children:(0,I.jsx)(uM,{size:14})})})]},e.id))})]}):(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`No labor tickets.`})})]})},TQ={panelGrid:`_panelGrid_fki9i_1`},EQ=({orderKey:e,runNo:t,seqNo:n,refreshKey:r,onStepUpdate:i,onCountChange:a})=>{let[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!0),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(n),[m,h]=(0,v.useState)(null),[g,_]=(0,v.useState)(``),[y,b]=(0,v.useState)(!1);n!==f&&(p(n),s(null),l(!0));let x=(0,v.useCallback)(async()=>{l(!0);try{let r=await q.get(J.stepRuns(e,t,n,!0));s(r),a?.(r.total)}catch(e){gM(e)}finally{l(!1)}},[e,t,n,r]);(0,v.useEffect)(()=>{x()},[x]);let S=e=>{s(t=>t&&{...t,items:t.items.map(t=>t.id===e.id?{...t,...e}:t)}),i?.()},C=(e,t,n)=>{s(r=>r&&{...r,items:r.items.map(r=>r.id===e?{...r,_actions:t,_actionTemplates:n}:r)})},w=async(r,i)=>{d(r.id);try{S(await q.post(J.stepRunComplete(e,t,n,r.seqNo),{note:i}))}catch(e){gM(e)}finally{d(null)}},T=async r=>{d(r.id);try{S(await q.post(J.stepRunReopen(e,t,n,r.seqNo),{}))}catch(e){gM(e)}finally{d(null)}},E=async()=>{if(m){b(!0);try{await w(m,g.trim()||void 0),h(null),_(``)}finally{b(!1)}}};return(0,I.jsxs)(I.Fragment,{children:[c?(0,I.jsx)(U,{align:`center`,py:`sm`,children:(0,I.jsx)(uu,{size:`sm`})}):(0,I.jsxs)(U,{gap:`xs`,children:[o?.items.map(r=>{let i=Rj(r._actions,`complete`,{includeDisabled:!0}),a=Rj(r._actions,`reopen`,{includeDisabled:!0});return(0,I.jsx)(Wp,{withBorder:!0,p:`sm`,children:(0,I.jsxs)(U,{gap:`xs`,children:[(0,I.jsxs)(B,{justify:`space-between`,align:`center`,children:[(0,I.jsxs)(V,{fw:600,size:`sm`,children:[`STEP `,r.seqNo,r.title?`: ${r.title}`:``]}),(0,I.jsxs)(B,{gap:`xs`,children:[i&&(0,I.jsx)(M_,{label:Bj(i.disabledReason),disabled:!i.disabledReason,multiline:!0,maw:400,style:{whiteSpace:`pre-line`},children:(0,I.jsxs)(B,{gap:0,children:[(0,I.jsx)(H,{size:`xs`,color:`green`,disabled:i.disabled,loading:u===r.id,onClick:()=>w(r),style:{borderTopRightRadius:0,borderBottomRightRadius:0},children:`Complete`}),(0,I.jsxs)(gh,{position:`bottom-end`,withinPortal:!0,children:[(0,I.jsx)(gh.Target,{children:(0,I.jsx)(H,{size:`xs`,color:`green`,px:6,disabled:i.disabled||u===r.id,style:{borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeft:`1px solid rgba(255,255,255,0.3)`},children:(0,I.jsx)(eM,{size:14})})}),(0,I.jsx)(gh.Dropdown,{children:(0,I.jsx)(gh.Item,{leftSection:(0,I.jsx)(cM,{size:14}),onClick:()=>{h(r),_(``)},children:`Complete with note`})})]})]})}),a&&(0,I.jsxs)(B,{gap:`xs`,align:`center`,children:[(0,I.jsxs)(V,{size:`xs`,c:`green`,children:[`Completed by `,r.updatedBy,` on`,` `,new Date(r.updatedAt).toLocaleString()]}),(()=>{let e=(0,I.jsx)(vu,{size:`xs`,variant:`subtle`,color:`gray`,disabled:a.disabled,loading:u===r.id,onClick:a.disabled?void 0:()=>T(r),title:Bj(a.disabledReason)??`Undo completion`,children:(0,I.jsx)(Qj,{size:14})}),t=Bj(a.disabledReason);return t?(0,I.jsx)(M_,{label:t,multiline:!0,maw:350,style:{whiteSpace:`pre-line`},children:e}):e})()]}),!i&&!a&&r.completed&&(0,I.jsxs)(V,{size:`xs`,c:`green`,children:[`Completed by `,r.updatedBy,` on`,` `,new Date(r.updatedAt).toLocaleString()]})]})]}),r.instructions?(0,I.jsx)(nU,{children:r.instructions}):(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`No instructions`}),r.note&&(0,I.jsxs)(V,{size:`xs`,c:`green`,fs:`italic`,children:[`Note: `,r.note]}),(r.fieldValues?.length??0)>0&&(0,I.jsx)(zZ,{fieldValues:r.fieldValues,multiSet:r.multiSet,completed:r.completed,_actionTemplates:r._actionTemplates,fieldValueEndpoint:(i,a)=>r.multiSet?J.stepRunSetFieldValue(e,t,n,r.seqNo,a,i):J.stepRunFieldValue(e,t,n,r.seqNo,i),deleteSetEndpoint:i=>J.stepRunDeleteSet(e,t,n,r.seqNo,i),attachmentEndpoint:(i,a)=>r.multiSet?J.stepFieldSetAttachments(e,t,n,r.seqNo,a,i):J.stepFieldAttachments(e,t,n,r.seqNo,i),attachmentDownloadUrl:(i,a)=>`/api/erp/${J.stepFieldAttachmentDownload(e,t,n,r.seqNo,i,a)}`,onSetDeleted:()=>void x(),onActionsUpdated:(e,t)=>C(r.id,e,t)})]})},r.id)}),o&&o.items.length===0&&(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`No steps.`})]}),(0,I.jsx)(Nh,{opened:m!==null,onClose:()=>h(null),title:`Complete with note`,size:`sm`,children:(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsx)(Qm,{label:`Note`,placeholder:`Enter a note...`,value:g,onChange:e=>_(e.currentTarget.value),autosize:!0,minRows:3,maxRows:6,"data-autofocus":!0}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>h(null),children:`Cancel`}),(0,I.jsx)(H,{color:`green`,onClick:()=>void E(),loading:y,children:`Complete`})]})]})})]})},DQ={blocked:`orange`,pending:`gray`,in_progress:`yellow`,completed:`green`,skipped:`gray`,failed:`red`},OQ=({ref_:e,orderKey:t,runNo:n})=>{let r=()=>``;return(0,I.jsxs)(Wp,{withBorder:!0,p:`sm`,children:[(0,I.jsxs)(B,{gap:`xs`,mb:`xs`,children:[(0,I.jsx)(V,{size:`sm`,fw:500,children:e.title}),(0,I.jsxs)(Wd,{component:zw,to:`/orders/${t}/runs/${n}/ops/${e.sourceOpSeqNo}`,size:`xs`,c:`dimmed`,children:[`Op `,e.sourceOpSeqNo,` / Step `,e.sourceStepSeqNo]})]}),(0,I.jsx)(zZ,{fieldValues:e.fieldValues,multiSet:e.multiSet,completed:!0,fieldValueEndpoint:r,deleteSetEndpoint:r,attachmentEndpoint:r,attachmentDownloadUrl:(r,i)=>`/api/erp/${J.stepFieldAttachmentDownload(t,n,String(e.sourceOpSeqNo),String(e.sourceStepSeqNo),r,i)}`,onSetDeleted:r})]})},kQ=()=>{let{orderKey:e,runNo:t,seqNo:n}=bC(),{onOperationUpdate:r,orderRun:i,refreshOrderRun:a}=vC(),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!0),[u,d]=(0,v.useState)(0),[f,p]=(0,v.useState)(`description`),[m,h]=(0,v.useState)(`steps`),[g,_]=(0,v.useState)(null),[y,b]=(0,v.useState)(null),[x,S]=(0,v.useState)(!1),[C,w]=(0,v.useState)(``),[T,E]=(0,v.useState)({canClockIn:!1,canClockOut:!1}),[D,O]=(0,v.useState)(!1),[k,A]=(0,v.useState)(!1),[j,ee]=(0,v.useState)(``),[te,ne]=(0,v.useState)(!1),re=(0,v.useCallback)(async()=>{if(!(!e||!t||!n)){l(!0);try{s(await q.get(J.operationRun(e,t,n)))}catch(e){gM(e)}finally{l(!1)}}},[e,t,n]);(0,v.useEffect)(()=>{re()},[re]);let M=async r=>{if(!(!e||!t||!n))try{s(await q.put(J.operationRun(e,t,n),{assignedToId:r})),S(!1)}catch(e){gM(e)}},N=async(i,o={})=>{if(!e||!t||!n)return;let c={start:J.operationRunStart,complete:J.operationRunComplete,skip:J.operationRunSkip,fail:J.operationRunFail,reopen:J.operationRunReopen};try{let l=await q.post(c[i](e,t,n),o);s(e=>e&&{...e,...l}),d(e=>e+1),r(),a()}catch(e){gM(e)}},ie=async()=>{if(!(!e||!t||!n)){O(!0);try{await q.post(J.laborTicketClockIn(e,t,n),{}),d(e=>e+1)}catch(e){gM(e)}finally{O(!1)}}},ae=async()=>{if(!(!e||!t||!n)){O(!0);try{await q.post(J.laborTicketClockOut(e,t,n),{}),d(e=>e+1)}catch(e){gM(e)}finally{O(!1)}}},oe=async()=>{ne(!0);try{await N(`complete`,{note:j.trim()||void 0}),A(!1),ee(``)}finally{ne(!1)}};return c?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):o?(0,I.jsxs)(Qp,{size:`md`,py:`xl`,w:`100%`,children:[(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsxs)(B,{justify:`space-between`,children:[(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsxs)(V,{fw:600,children:[`OPERATION `,o.seqNo,`: `,o.title]}),o.workCenterKey&&(0,I.jsxs)(V,{size:`sm`,c:`dimmed`,children:[`[`,o.workCenterKey,`]`]}),(0,I.jsx)(CZ,{createdBy:o.createdBy,createdAt:o.createdAt,updatedBy:o.updatedBy,updatedAt:o.updatedAt}),(0,I.jsx)(Ap,{color:DQ[o.status]??`gray`,variant:`light`,size:`sm`,children:o.status}),o.assignedTo?(0,I.jsxs)(B,{gap:4,children:[(0,I.jsxs)(V,{size:`sm`,c:`dimmed`,children:[`assigned to `,o.assignedTo]}),Rj(o._actions,`assign`)&&(0,I.jsx)(vu,{size:`xs`,variant:`subtle`,color:`gray`,onClick:()=>void M(null),title:`Unassign`,children:(0,I.jsx)(pM,{size:12})})]}):Rj(o._actions,`assign`)&&(0,I.jsxs)(nu,{opened:x,onChange:S,position:`bottom`,withArrow:!0,children:[(0,I.jsx)(nu.Target,{children:(0,I.jsx)(V,{size:`sm`,c:`blue`,style:{cursor:`pointer`},onClick:()=>S(!0),children:`assign`})}),(0,I.jsx)(nu.Dropdown,{children:(0,I.jsx)(hZ,{placeholder:`Search users...`,value:C,onChange:w,onUserSelect:e=>{w(``),M(e.id)},size:`xs`,w:200})})]})]}),(0,I.jsxs)(B,{gap:`xs`,children:[(T.canClockIn||T.canClockOut)&&(0,I.jsxs)(I.Fragment,{children:[T.canClockIn&&(0,I.jsx)(H,{size:`xs`,color:`green`,variant:`outline`,loading:D,onClick:()=>void ie(),children:`Clock In`}),T.canClockOut&&(0,I.jsx)(H,{size:`xs`,color:`orange`,variant:`outline`,loading:D,onClick:()=>void ae(),children:`Clock Out`}),(0,I.jsx)(nm,{orientation:`vertical`})]}),(0,I.jsx)(iN,{actions:o._actions,rel:`start`,size:`xs`,color:`green`,onClick:()=>N(`start`),children:`Start`}),Rj(o._actions,`complete`,{includeDisabled:!0})&&(()=>{let e=Rj(o._actions,`complete`,{includeDisabled:!0});return(0,I.jsxs)(B,{gap:0,children:[(0,I.jsx)(H,{size:`xs`,color:`green`,disabled:e.disabled,onClick:()=>N(`complete`),style:{borderTopRightRadius:0,borderBottomRightRadius:0},children:`Complete`}),(0,I.jsxs)(gh,{position:`bottom-end`,withinPortal:!0,children:[(0,I.jsx)(gh.Target,{children:(0,I.jsx)(H,{size:`xs`,color:`green`,px:6,disabled:e.disabled,style:{borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeft:`1px solid rgba(255,255,255,0.3)`},children:(0,I.jsx)(eM,{size:14})})}),(0,I.jsx)(gh.Dropdown,{children:(0,I.jsx)(gh.Item,{leftSection:(0,I.jsx)(cM,{size:14}),onClick:()=>{A(!0),ee(``)},children:`Complete with note`})})]})]})})(),(()=>{let e=Rj(o._actions,`reopen`,{includeDisabled:!0});if(!e)return null;let{label:t,color:n}={[DX.completed]:{label:`Completed`,color:`green`},[DX.skipped]:{label:`Skipped`,color:`gray`},[DX.failed]:{label:`Failed`,color:`red`}}[o.status]??{label:o.status,color:`gray`},r=(0,I.jsx)(vu,{size:`xs`,variant:`subtle`,color:`gray`,disabled:e.disabled,onClick:e.disabled?void 0:()=>N(`reopen`),title:Bj(e.disabledReason)??`Undo ${t.toLowerCase()}`,children:(0,I.jsx)(Qj,{size:14})});return(0,I.jsxs)(B,{gap:`xs`,align:`center`,children:[(0,I.jsxs)(V,{size:`xs`,c:n,children:[t,` by `,o.updatedBy,` on`,` `,new Date(o.updatedAt).toLocaleString(),o.cost?` for $${o.cost.toFixed(2)}`:``]}),(()=>{let t=Bj(e.disabledReason);return t?(0,I.jsx)(M_,{label:t,multiline:!0,maw:350,style:{whiteSpace:`pre-line`},children:r}):r})()]})})(),Rj(o._actions,`skip`)&&(0,I.jsx)(H,{size:`xs`,color:`gray`,variant:`outline`,onClick:()=>N(`skip`),children:`Skip`}),Rj(o._actions,`fail`)&&(0,I.jsx)(H,{size:`xs`,color:`red`,variant:`outline`,onClick:()=>N(`fail`),children:`Fail`})]})]}),(0,I.jsxs)(jv,{value:f,onChange:p,children:[(0,I.jsxs)(jv.List,{children:[(0,I.jsx)(jv.Tab,{value:`description`,children:`Description`}),(0,I.jsx)(jv.Tab,{value:`dependencies`,children:`Dependencies`}),(0,I.jsx)(jv.Tab,{value:`labor`,children:`Labor Tickets`})]}),(0,I.jsxs)(`div`,{className:TQ.panelGrid,children:[(0,I.jsx)(jv.Panel,{value:`description`,pt:`sm`,keepMounted:!0,"data-active":f===`description`||void 0,children:(0,I.jsx)(Wp,{withBorder:!0,p:`lg`,children:(0,I.jsxs)(U,{gap:`sm`,children:[o.description&&(0,I.jsx)(nU,{children:o.description}),o.note&&(0,I.jsxs)(V,{size:`xs`,c:DQ[o.status]??`dimmed`,fs:`italic`,children:[`Note: `,o.note]})]})})}),(0,I.jsx)(jv.Panel,{value:`dependencies`,pt:`sm`,keepMounted:!0,"data-active":f===`dependencies`||void 0,children:(0,I.jsx)(eQ,{orderKey:e,revNo:String(i.revNo),opSeqNo:n,showTitle:!1})}),(0,I.jsx)(jv.Panel,{value:`labor`,pt:`sm`,keepMounted:!0,"data-active":f===`labor`||void 0,children:(0,I.jsx)(wQ,{orderKey:e,runNo:t,seqNo:n,refreshKey:u,showTitle:!1,onActionsChange:E})})]})]}),o.fieldRefSummary&&o.fieldRefSummary.length>0&&(0,I.jsxs)(U,{gap:`sm`,children:[(0,I.jsx)(zv,{order:5,children:`Referenced Fields`}),o.fieldRefSummary.map(n=>(0,I.jsx)(OQ,{ref_:n,orderKey:e,runNo:t},n.seqNo))]}),(0,I.jsx)(I_,{value:m,onChange:h,data:[{value:`steps`,label:`Steps${g?` (${g})`:``}`},{value:`comments`,label:`Comments${y?` (${y})`:``}`}]}),(0,I.jsx)(`div`,{style:{display:m===`steps`?void 0:`none`},children:(0,I.jsx)(EQ,{orderKey:e,runNo:t,seqNo:n,refreshKey:u,onStepUpdate:re,onCountChange:_})}),(0,I.jsx)(`div`,{style:{display:m===`comments`?void 0:`none`},children:(0,I.jsx)(SQ,{orderKey:e,runNo:t,seqNo:n,refreshKey:u,onCountChange:b})})]}),(0,I.jsx)(Nh,{opened:k,onClose:()=>A(!1),title:`Complete with note`,size:`sm`,children:(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsx)(Qm,{label:`Note`,placeholder:`Enter a note...`,value:j,onChange:e=>ee(e.currentTarget.value),autosize:!0,minRows:3,maxRows:6,"data-autofocus":!0}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>A(!1),children:`Cancel`}),(0,I.jsx)(H,{color:`green`,onClick:()=>void oe(),loading:te,children:`Complete`})]})]})})]}):(0,I.jsx)(U,{p:`md`,children:(0,I.jsx)(V,{children:`Operation run not found.`})})},AQ=()=>{let{orderKey:e}=bC(),t=hC(),[n]=qw(),r=Number(n.get(`revNo`))||0;return(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsx)(zv,{order:2,mb:`lg`,children:`Create Order Run`}),(0,I.jsx)(vQ,{initialData:{revNo:r||void 0},onSubmit:async n=>{t(`/orders/${e}/runs/${(await q.post(J.orderRuns(e),n)).runNo}`)},onCancel:()=>t(`/orders/${e}/runs`)})]})},jQ={blocked:`orange`,pending:`gray`,in_progress:`yellow`,completed:`green`,skipped:`gray`,failed:`red`},MQ=({orderKey:e,runNo:t,refreshKey:n})=>{let r=hC(),i=fC(),{seqNo:a}=bC(),o=i.pathname.endsWith(`/header`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!0),d=(0,v.useCallback)(async()=>{u(!0);try{c(await q.get(J.operationRuns(e,t)))}catch(e){gM(e)}finally{u(!1)}},[e,t]);return(0,v.useEffect)(()=>{d()},[d,n]),(0,I.jsxs)(U,{gap:`xs`,children:[(0,I.jsx)(Wp,{padding:`sm`,radius:`md`,withBorder:!0,component:`a`,href:`/erp/orders/${e}/runs/${t}/header`,onClick:n=>{n.button===1||n.ctrlKey||n.metaKey||(n.preventDefault(),r(`/orders/${e}/runs/${t}/header`))},style:{cursor:`pointer`,textDecoration:`none`,color:`inherit`,backgroundColor:o?`var(--mantine-color-blue-9)`:void 0},children:(0,I.jsx)(V,{size:`sm`,fw:500,children:`Header`})}),l?(0,I.jsx)(U,{align:`center`,py:`md`,children:(0,I.jsx)(uu,{size:`sm`})}):!s||s.items.length===0?(0,I.jsx)(V,{c:`dimmed`,size:`sm`,ta:`center`,py:`md`,children:`No operation runs yet.`}):s.items.map(n=>{let i=`/orders/${e}/runs/${t}/ops/${n.seqNo}`;return(0,I.jsxs)(Wp,{padding:`sm`,radius:`md`,withBorder:!0,component:`a`,href:`/erp${i}`,onClick:e=>{e.button===1||e.ctrlKey||e.metaKey||(e.preventDefault(),r(i))},style:{cursor:`pointer`,textDecoration:`none`,color:`inherit`,backgroundColor:a===String(n.seqNo)?`var(--mantine-color-blue-9)`:void 0},children:[(0,I.jsxs)(V,{size:`sm`,fw:500,children:[n.seqNo,`. `,n.title]}),(0,I.jsx)(Ap,{color:jQ[n.status]??`gray`,variant:`light`,size:`xs`,mt:4,children:n.status})]},n.id)})]})};function NQ(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function PQ(e){return`${NQ(e)}T${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`}var FQ=({opened:e,onClose:t,orderRun:n,orderKey:r,runNo:i,onCompleted:a})=>{let[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)([]),[f,p]=(0,v.useState)({}),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(!1);(0,v.useEffect)(()=>{!e||!n.itemKey||(h(!0),q.get(J.itemFields(n.itemKey)).then(e=>{d(e.items);let t={};for(let n of e.items)t[n.id]=``;p(t)}).catch(gM).finally(()=>h(!1)))},[e,n.itemKey]);let y=()=>{s(``),l(``),p({}),t()},b=async()=>{_(!0);try{let e={};o.trim()&&(e.instanceKey=o.trim()),typeof c==`number`&&(e.quantity=c);let t=Object.entries(f).filter(([,e])=>e!==``).map(([e,t])=>({fieldId:Number(e),value:t}));t.length>0&&(e.fieldValues=t),a(await q.post(J.orderRunComplete(r,i),e)),y()}catch(e){gM(e)}finally{_(!1)}},x=(e,t)=>{p(n=>({...n,[e]:t}))};return(0,I.jsx)(Nh,{opened:e,onClose:y,title:`Complete Order Run`,size:`md`,children:(0,I.jsxs)(U,{gap:`md`,children:[(0,I.jsx)(Mv,{label:`Instance Key (SN / Lot Code)`,placeholder:`Leave blank to auto-generate`,value:o,onChange:e=>s(e.currentTarget.value),"data-autofocus":!0}),(0,I.jsx)(Vg,{label:`Quantity`,placeholder:`Optional`,value:c,onChange:l,min:0,decimalScale:4}),m&&(0,I.jsx)(B,{justify:`center`,children:(0,I.jsx)(uu,{size:`sm`})}),u.length>0&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(V,{size:`sm`,fw:600,c:`dimmed`,children:`Item Fields`}),u.map(e=>{let t=f[e.id]??``,n=e.required?`${e.label} *`:e.label;switch(e.type){case tX.date:return(0,I.jsx)(ex,{label:n,size:`sm`,valueFormat:`YYYY-MM-DD`,clearable:!0,value:t?new Date(t+`T00:00:00`):null,onChange:t=>x(e.id,t?typeof t==`string`?t:NQ(t):``)},e.id);case tX.datetime:return(0,I.jsx)(ax,{label:n,size:`sm`,valueFormat:`YYYY-MM-DD HH:mm`,clearable:!0,value:t?new Date(t):null,onChange:t=>x(e.id,t?typeof t==`string`?t:PQ(t):``)},e.id);case tX.yesNo:return(0,I.jsxs)(B,{gap:`xs`,align:`center`,children:[(0,I.jsx)(V,{size:`sm`,fw:500,children:n}),(0,I.jsx)(rv,{size:`sm`,onLabel:`Yes`,offLabel:`No`,checked:t===`Yes`,onChange:t=>x(e.id,t.currentTarget.checked?`Yes`:`No`)})]},e.id);case tX.checkbox:return(0,I.jsx)(yp,{label:n,size:`sm`,checked:t===`checked`,onChange:t=>x(e.id,t.currentTarget.checked?`checked`:``)},e.id);case tX.number:return(0,I.jsx)(Mv,{label:n,size:`sm`,type:`number`,value:t,onChange:t=>x(e.id,t.currentTarget.value)},e.id);default:return(0,I.jsx)(Mv,{label:n,size:`sm`,value:t,onChange:t=>x(e.id,t.currentTarget.value)},e.id)}})]}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:y,children:`Cancel`}),(0,I.jsx)(H,{color:`green`,onClick:b,loading:g,children:`Complete`})]})]})})},IQ={[IX.released]:`blue`,[IX.started]:`yellow`,[IX.closed]:`green`,[IX.cancelled]:`gray`},LQ={[RX.low]:`gray`,[RX.medium]:`blue`,[RX.high]:`orange`,[RX.critical]:`red`},RQ=({orderRun:e,orderKey:t,runNo:n,onUpdate:r,onOpenOperations:i})=>{let a=hC(),[o,{open:s,close:c}]=_n(),l=async e=>{let i={start:J.orderRunStart,close:J.orderRunClose,cancel:J.orderRunCancel,reopen:J.orderRunReopen};try{r(await q.post(i[e](t,n),{}))}catch(e){gM(e)}},u=async()=>{if(confirm(`Delete this order run?`))try{await q.delete(J.orderRun(t,n)),a(`/orders/${t}/runs`)}catch(e){gM(e)}};return(0,I.jsxs)(B,{justify:`space-between`,px:`md`,py:`xs`,style:{borderBottom:`calc(0.125rem * var(--mantine-scale)) solid var(--mantine-color-dark-4)`},children:[(0,I.jsxs)(B,{gap:`sm`,children:[i&&(0,I.jsx)(vu,{variant:`subtle`,color:`gray`,hiddenFrom:`md`,onClick:i,children:(0,I.jsx)(oM,{size:`1.2rem`})}),(0,I.jsxs)(V,{size:`lg`,children:[`ORDER:`,` `,(0,I.jsx)(Wd,{href:`/erp/orders/${t}`,onClick:e=>{e.button===1||e.ctrlKey||e.metaKey||(e.preventDefault(),a(`/orders/${t}`))},children:t})]}),(0,I.jsxs)(Ap,{component:`a`,href:`/erp/orders/${t}/revs/${e.revNo}`,onClick:n=>{n.button===1||n.ctrlKey||n.metaKey||(n.preventDefault(),a(`/orders/${t}/revs/${e.revNo}`))},color:`violet`,variant:`light`,size:`sm`,style:{cursor:`pointer`},children:[`REV `,e.revNo]}),(0,I.jsxs)(V,{size:`lg`,fw:`bold`,children:[`RUN `,e.runNo]}),(0,I.jsx)(Ap,{color:IQ[e.status]??`gray`,variant:`light`,size:`sm`,"data-testid":`order-run-status`,children:e.status}),(0,I.jsx)(Ap,{color:LQ[e.priority]??`gray`,variant:`light`,size:`sm`,children:e.priority}),e.releaseNote&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`|`}),(0,I.jsx)(V,{size:`sm`,c:`dimmed`,lineClamp:1,maw:300,children:e.releaseNote})]}),e.instanceKey&&e.itemKey&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(V,{size:`sm`,c:`dimmed`,children:`|`}),(0,I.jsxs)(V,{size:`sm`,c:`dimmed`,children:[`Completed into`,` `,(0,I.jsxs)(Wd,{size:`sm`,href:`/erp/items/${e.itemKey}/instances/${e.instanceId}`,onClick:t=>{t.button===1||t.ctrlKey||t.metaKey||(t.preventDefault(),a(`/items/${e.itemKey}/instances/${e.instanceId}`))},children:[e.itemKey,` `,e.instanceKey]})]})]})]}),(0,I.jsxs)(B,{gap:`xs`,children:[(0,I.jsx)(iN,{actions:e._actions,rel:`start`,size:`xs`,color:`green`,"data-testid":`order-run-start`,onClick:()=>l(`start`),children:`Start`}),(0,I.jsx)(iN,{actions:e._actions,rel:`complete`,size:`xs`,color:`green`,"data-testid":`order-run-complete`,onClick:s,children:`Complete`}),(0,I.jsx)(iN,{actions:e._actions,rel:`close`,size:`xs`,color:`green`,"data-testid":`order-run-close`,onClick:()=>l(`close`),children:`Close`}),Rj(e._actions,`reopen`)&&(0,I.jsxs)(B,{gap:`xs`,align:`center`,children:[(0,I.jsxs)(V,{size:`xs`,c:e.status===IX.closed?`green`:`orange`,children:[e.status===IX.closed?`Closed`:`Cancelled`,` `,`by `,e.updatedBy,` on`,` `,new Date(e.updatedAt).toLocaleString(),e.cost?` for $${e.cost.toFixed(2)}`:``]}),(0,I.jsx)(vu,{size:`xs`,variant:`subtle`,color:`gray`,onClick:()=>l(`reopen`),title:`Undo ${e.status===IX.closed?`close`:`cancel`}`,children:(0,I.jsx)(Qj,{size:14})})]}),Rj(e._actions,`cancel`)&&(0,I.jsx)(H,{size:`xs`,color:`orange`,variant:`outline`,onClick:()=>{confirm(`Cancel this order run?`)&&l(`cancel`)},children:`Cancel`}),Rj(e._actions,`delete`)&&(0,I.jsx)(H,{size:`xs`,color:`red`,variant:`outline`,onClick:u,children:`Delete`})]}),(0,I.jsx)(FQ,{opened:o,onClose:c,orderRun:e,orderKey:t,runNo:n,onCompleted:r})]})},zQ=260,BQ=()=>{let{orderKey:e,runNo:t}=bC(),n=fC(),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!0),[s,{toggle:c}]=_n(),[l,{open:u,close:d}]=_n(),[f,p]=(0,v.useState)(0),m={onOperationUpdate:()=>p(e=>e+1),orderRun:r,onOrderRunUpdate:i,refreshOrderRun:()=>void h()},h=(0,v.useCallback)(async()=>{if(!(!e||!t)){o(!0);try{i(await q.get(J.orderRun(e,t)))}catch(e){gM(e)}finally{o(!1)}}},[e,t]);return(0,v.useEffect)(()=>{h()},[h]),(0,v.useEffect)(()=>{d()},[n.pathname]),a?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):!r||!e||!t?(0,I.jsx)(R,{p:`md`,children:(0,I.jsx)(V,{children:`Order run not found.`})}):(0,I.jsxs)(R,{display:`flex`,style:{flexDirection:`column`,height:`calc(100dvh - var(--app-shell-header-height, 0px))`},children:[(0,I.jsx)(RQ,{orderRun:r,orderKey:e,runNo:t,onUpdate:i,onOpenOperations:u}),(0,I.jsxs)(R,{display:`flex`,style:{flex:1,minHeight:0},children:[(0,I.jsx)(R,{visibleFrom:`md`,style:{flexShrink:0,display:`flex`,flexDirection:`column`},children:s?(0,I.jsx)(R,{style:{borderRight:`1px solid var(--mantine-color-dark-4)`,paddingRight:4},children:(0,I.jsx)(M_,{label:`Expand sidebar`,position:`right`,children:(0,I.jsx)(vu,{variant:`subtle`,color:`gray`,onClick:c,children:(0,I.jsx)(aM,{size:`1.2rem`})})})}):(0,I.jsxs)(R,{style:{width:zQ,minWidth:zQ,borderRight:`1px solid var(--mantine-color-dark-4)`,display:`flex`,flexDirection:`column`,overflowY:`auto`,padding:`0 var(--mantine-spacing-md)`},children:[(0,I.jsx)(B,{justify:`flex-end`,p:4,children:(0,I.jsx)(M_,{label:`Collapse sidebar`,position:`right`,children:(0,I.jsx)(vu,{variant:`subtle`,color:`gray`,size:`sm`,onClick:c,children:(0,I.jsx)(iM,{size:`1rem`})})})}),(0,I.jsx)(MQ,{orderKey:e,runNo:t,refreshKey:f})]})}),(0,I.jsx)(`div`,{style:{flex:1,minHeight:0,overflowY:`auto`,display:`flex`,flexDirection:`column`},children:(0,I.jsx)(GC,{context:m})})]}),(0,I.jsx)(Cm,{opened:l,onClose:d,title:`Operations`,size:zQ,children:(0,I.jsx)(MQ,{orderKey:e,runNo:t,refreshKey:f})})]})},VQ={[IX.released]:`blue`,[IX.started]:`yellow`,[IX.closed]:`green`,[IX.cancelled]:`gray`},HQ={[RX.low]:`gray`,[RX.medium]:`blue`,[RX.high]:`orange`,[RX.critical]:`red`},UQ=()=>{let{orderKey:e}=bC(),[t,n]=qw(),r=Number(t.get(`page`))||1,i=t.get(`status`)||void 0,a=t.get(`priority`)||void 0,o=t.get(`search`)||``,[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!0),d=(0,v.useCallback)(async()=>{u(!0);try{let t=new URLSearchParams;t.set(`page`,String(r)),t.set(`pageSize`,`20`),i&&t.set(`status`,i),a&&t.set(`priority`,a),o&&t.set(`search`,o),c(await q.get(`${J.orderRuns(e)}?${t}`))}catch(e){gM(e)}finally{u(!1)}},[e,r,i,a,o]);(0,v.useEffect)(()=>{d()},[d]);let f=s?Math.ceil(s.total/s.pageSize):0;return(0,I.jsxs)(Qp,{size:`lg`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsxs)(zv,{order:2,children:[`Runs for `,e]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(H,{variant:`subtle`,component:zw,to:`/orders/${e}`,children:`Back to Order`}),(0,I.jsx)(H,{component:zw,to:`/orders/${e}/runs/new`,children:`Create New`})]})]}),(0,I.jsxs)(B,{mb:`md`,children:[(0,I.jsx)(Mv,{placeholder:`Search...`,value:o,onChange:e=>{let t=e.currentTarget.value;n(e=>(t?e.set(`search`,t):e.delete(`search`),e.set(`page`,`1`),e))},style:{flex:1}}),(0,I.jsx)(R_,{placeholder:`All statuses`,data:FX.options.map(e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1)})),value:i??null,onChange:e=>{n(t=>(e?t.set(`status`,e):t.delete(`status`),t.set(`page`,`1`),t))},clearable:!0}),(0,I.jsx)(R_,{placeholder:`All priorities`,data:LX.options.map(e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1)})),value:a??null,onChange:e=>{n(t=>(e?t.set(`priority`,e):t.delete(`priority`),t.set(`page`,`1`),t))},clearable:!0})]}),l?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):s&&s.items.length>0?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(W,{striped:!0,highlightOnHover:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Run #`}),(0,I.jsx)(W.Th,{children:`Rev`}),(0,I.jsx)(W.Th,{children:`Status`}),(0,I.jsx)(W.Th,{children:`Priority`}),(0,I.jsx)(W.Th,{children:`Cost`}),(0,I.jsx)(W.Th,{children:`Due`}),(0,I.jsx)(W.Th,{children:`Created`})]})}),(0,I.jsx)(W.Tbody,{children:s.items.map(t=>{let n=`/orders/${e}/runs/${t.runNo}`;return(0,I.jsxs)(W.Tr,{style:{cursor:`pointer`},"data-testid":`order-run-row-${t.runNo}`,children:[(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:(0,I.jsx)(V,{size:`sm`,ff:`monospace`,children:t.runNo})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:t.revNo})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:(0,I.jsx)(Ap,{color:VQ[t.status]??`gray`,variant:`light`,children:t.status})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:(0,I.jsx)(Ap,{color:HQ[t.priority]??`gray`,variant:`light`,children:t.priority})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:t.cost?`$${t.cost.toFixed(2)}`:`—`})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:t.dueAt?new Date(t.dueAt).toLocaleDateString():`—`})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:n,style:gZ,children:new Date(t.createdAt).toLocaleDateString()})})]},t.id)})})]}),f>1&&(0,I.jsx)(B,{justify:`center`,mt:`md`,children:(0,I.jsx)(u_,{total:f,value:r,onChange:e=>n(t=>(t.set(`page`,String(e)),t))})})]}):(0,I.jsx)(V,{c:`dimmed`,ta:`center`,py:`xl`,children:`No order runs found.`})]})},WQ=()=>{let{username:e}=bC(),t=hC(),{supervisorAuth:n}=vC(),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!0),[s,{open:c,close:l}]=_n(),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(null),[y,b]=(0,v.useState)(!1),[x,{open:S,close:C}]=_n(),[w,T]=(0,v.useState)(``),[E,D]=(0,v.useState)(!1),[O,k]=(0,v.useState)(``),A=(0,v.useCallback)(async()=>{if(e){o(!0);try{i(await q.get(J.user(e)))}catch{}finally{o(!1)}}},[e]);(0,v.useEffect)(()=>{A()},[A]);let j=async()=>{if(!(!e||!confirm(`Delete this user?`)))try{await q.delete(J.user(e)),t(`/users`)}catch(e){gM(e)}},ee=async()=>{if(!(!e||!u)){p(!0),h(``);try{await q.put(J.user(e),{username:u}),l(),u===e?A():t(`/users/${u}`,{replace:!0})}catch(e){h(e instanceof Error?e.message:`Failed to update user`)}finally{p(!1)}}},te=async()=>{if(w){D(!0),k(``);try{await q.post(J.changePassword,{password:w}),C(),T(``)}catch(e){k(e instanceof Error?e.message:`Failed to change password`)}finally{D(!1)}}},ne=async()=>{if(!(!e||!g))try{await q.post(J.userPermissions(e),{permission:g}),_(null),A()}catch(e){gM(e)}},re=async t=>{if(e)try{await q.delete(J.userPermission(e,t)),A()}catch(e){gM(e)}},M=async()=>{if(e&&confirm(`Rotate this user's API key? The old key will stop working immediately.`)){b(!0);try{await q.post(J.userRotateKey(e),{}),A()}catch(e){gM(e)}finally{b(!1)}}};if(a)return(0,I.jsx)(Qp,{size:`md`,py:`xl`,children:(0,I.jsx)(U,{align:`center`,children:(0,I.jsx)(uu,{})})});if(!r)return(0,I.jsx)(Qp,{size:`md`,py:`xl`,children:(0,I.jsx)(V,{children:`User not found.`})});let N=sZ.options.filter(e=>!r.permissions?.some(t=>t.permission===e));return(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsxs)(B,{children:[(0,I.jsx)(zv,{order:2,children:r.username}),(0,I.jsx)(CZ,{createdAt:r.createdAt,updatedAt:r.updatedAt})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>t(`/users`),children:`Back`}),Rj(r._actions,`change-password`)&&(0,I.jsx)(H,{variant:`outline`,onClick:()=>{T(``),k(``),S()},children:`Change Password`}),Rj(r._actions,`update`)&&(0,I.jsx)(H,{onClick:()=>{d(r.username),h(``),c()},children:`Edit`}),Rj(r._actions,`delete`)&&(0,I.jsx)(H,{color:`red`,variant:`outline`,onClick:j,children:`Delete`})]})]}),r.isAgent&&!n&&(0,I.jsx)(Wp,{withBorder:!0,p:`sm`,mb:`lg`,bg:`var(--mantine-color-red-light)`,children:(0,I.jsxs)(B,{gap:`xs`,wrap:`nowrap`,children:[(0,I.jsx)(Xj,{size:18,color:`var(--mantine-color-red-6)`}),(0,I.jsx)(V,{size:`sm`,children:`This is an agent user but ERP is running without supervisor auth. API key lookups and agent authentication will not work.`})]})}),(0,I.jsx)(Wp,{withBorder:!0,p:`lg`,mb:`lg`,children:(0,I.jsxs)(U,{gap:`sm`,children:[(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:120,children:`Username:`}),(0,I.jsx)(V,{ff:`monospace`,children:r.username})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:120,children:`Type:`}),(0,I.jsx)(V,{children:r.isAgent?`Agent`:`User`})]}),(r.apiKey||Rj(r._actions,`rotate-key`))&&(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:120,children:`API Key:`}),(0,I.jsx)(rU,{value:r.apiKey??null,onRotate:Rj(r._actions,`rotate-key`)?M:void 0,rotating:y})]})]})}),(0,I.jsx)(zv,{order:3,mb:`sm`,children:`Permissions`}),r.permissions&&r.permissions.length>0?(0,I.jsxs)(W,{striped:!0,withTableBorder:!0,mb:`md`,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Permission`}),(0,I.jsx)(W.Th,{children:`Granted At`}),(0,I.jsx)(W.Th,{children:`Actions`})]})}),(0,I.jsx)(W.Tbody,{children:r.permissions.map(e=>(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Td,{children:(0,I.jsx)(V,{ff:`monospace`,children:e.permission})}),(0,I.jsx)(W.Td,{children:new Date(e.grantedAt).toLocaleString()}),(0,I.jsx)(W.Td,{children:Rj(e._actions,`revoke`)&&(0,I.jsx)(H,{size:`xs`,color:`red`,variant:`subtle`,onClick:()=>re(e.permission),children:`Revoke`})})]},e.permission))})]}):(0,I.jsx)(V,{c:`dimmed`,mb:`md`,children:`No permissions granted.`}),Rj(r._actions,`grant-permission`)&&N.length>0&&(0,I.jsxs)(B,{children:[(0,I.jsx)(R_,{placeholder:`Select permission`,data:N.map(e=>({value:e,label:e})),value:g,onChange:e=>_(e)}),(0,I.jsx)(H,{onClick:ne,disabled:!g,children:`Grant`})]}),(0,I.jsx)(Nh,{opened:s,onClose:l,title:`Edit User`,children:(0,I.jsxs)(U,{children:[(0,I.jsx)(Mv,{label:`Username`,value:u,onChange:e=>d(e.currentTarget.value)}),m&&(0,I.jsx)(V,{c:`red`,size:`sm`,children:m}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:l,children:`Cancel`}),(0,I.jsx)(H,{onClick:ee,loading:f,children:`Save`})]})]})}),(0,I.jsx)(Nh,{opened:x,onClose:C,title:`Change Password`,children:(0,I.jsxs)(U,{children:[(0,I.jsx)(m_,{label:`New Password`,value:w,onChange:e=>T(e.currentTarget.value)}),O&&(0,I.jsx)(V,{c:`red`,size:`sm`,children:O}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:C,children:`Cancel`}),(0,I.jsx)(H,{onClick:te,loading:E,children:`Save`})]})]})})]})},GQ=()=>{let[e,t]=qw(),n=hC(),{supervisorAuth:r}=vC(),i=Number(e.get(`page`))||1,a=e.get(`search`)||``,[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!0),[u,{open:d,close:f}]=_n(),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(``),[_,y]=(0,v.useState)(!1),[b,{open:x,close:S}]=_n(),[C,w]=(0,v.useState)([]),[T,E]=(0,v.useState)(null),[D,O]=(0,v.useState)(!1),[k,A]=(0,v.useState)(!1),j=(0,v.useCallback)(async()=>{l(!0);try{let e=new URLSearchParams;e.set(`page`,String(i)),e.set(`pageSize`,`20`),a&&e.set(`search`,a),s(await q.get(`${J.users}?${e}`))}catch(e){gM(e)}finally{l(!1)}},[i,a]);(0,v.useEffect)(()=>{j()},[j]);let ee=async()=>{y(!0);try{await q.post(J.users,{username:p,password:h}),f(),n(`/users/${p}`),m(``),g(``)}catch(e){gM(e)}finally{y(!1)}},te=async()=>{x(),E(null),A(!0);try{let e=await q.get(`/api/supervisor/agents`),t=[],n=1,r;do r=await q.get(`${J.users}?page=${n}&pageSize=100`),t=t.concat(r.items),n++;while(t.length<r.total);let i=new Set(t.filter(e=>e.isAgent).map(e=>e.username));w(e.items.filter(e=>!e.archived&&!i.has(e.name)).map(e=>({value:String(e.id),label:e.name})))}catch(e){gM(e),S()}finally{A(!1)}},ne=async()=>{if(T){O(!0);try{let e=await q.post(J.usersFromAgent,{agentId:Number(T)});S(),n(`/users/${e.username}`)}catch(e){gM(e)}finally{O(!1)}}},re=o?Math.ceil(o.total/o.pageSize):0;return(0,I.jsxs)(Qp,{size:`lg`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsx)(zv,{order:2,children:`Users`}),(0,I.jsxs)(B,{children:[r&&(0,I.jsx)(H,{variant:`outline`,onClick:te,children:`Create Agent User`}),(0,I.jsx)(H,{onClick:d,children:`Create User`})]})]}),(0,I.jsx)(B,{mb:`md`,children:(0,I.jsx)(Mv,{placeholder:`Search...`,value:a,onChange:e=>{let n=e.currentTarget.value;t(e=>(n?e.set(`search`,n):e.delete(`search`),e.set(`page`,`1`),e))},style:{flex:1}})}),c?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):o&&o.items.length>0?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(W,{striped:!0,highlightOnHover:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Username`}),(0,I.jsx)(W.Th,{children:`Type`}),(0,I.jsx)(W.Th,{children:`Permissions`}),(0,I.jsx)(W.Th,{children:`Created`})]})}),(0,I.jsx)(W.Tbody,{children:o.items.map(e=>(0,I.jsxs)(W.Tr,{style:{cursor:`pointer`},children:[(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:`/users/${e.username}`,style:gZ,children:(0,I.jsx)(V,{size:`sm`,ff:`monospace`,children:e.username})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:`/users/${e.username}`,style:gZ,children:(0,I.jsxs)(B,{gap:4,wrap:`nowrap`,children:[e.isAgent?`Agent`:`User`,e.isAgent&&!r&&(0,I.jsx)(M_,{label:`Agent user without supervisor auth — API key and auth will not work`,children:(0,I.jsx)(Xj,{size:14,color:`var(--mantine-color-red-6)`})})]})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:`/users/${e.username}`,style:gZ,children:e.permissionCount})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:`/users/${e.username}`,style:gZ,children:new Date(e.createdAt).toLocaleDateString()})})]},e.id))})]}),re>1&&(0,I.jsx)(B,{justify:`center`,mt:`md`,children:(0,I.jsx)(u_,{total:re,value:i,onChange:e=>t(t=>(t.set(`page`,String(e)),t))})})]}):(0,I.jsx)(V,{c:`dimmed`,ta:`center`,py:`xl`,children:`No users found.`}),(0,I.jsx)(Nh,{opened:u,onClose:f,title:`Create User`,children:(0,I.jsxs)(U,{children:[(0,I.jsx)(Mv,{label:`Username`,value:p,onChange:e=>m(e.currentTarget.value),"data-autofocus":!0}),(0,I.jsx)(m_,{label:`Password`,value:h,onChange:e=>g(e.currentTarget.value)}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:f,children:`Cancel`}),(0,I.jsx)(H,{onClick:ee,loading:_,disabled:!p||h.length<6,children:`Create`})]})]})}),(0,I.jsx)(Nh,{opened:b,onClose:S,title:`Create Agent User`,children:(0,I.jsxs)(U,{children:[k?(0,I.jsx)(uu,{size:`sm`}):(0,I.jsx)(R_,{label:`Agent`,placeholder:`Select an agent`,data:C,value:T,onChange:E,searchable:!0}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:S,children:`Cancel`}),(0,I.jsx)(H,{onClick:ne,loading:D,disabled:!T,children:`Create`})]})]})})]})},KQ=()=>{let e=hC(),[t,n]=(0,v.useState)(``),[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(!1);return(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsx)(zv,{order:2,mb:`lg`,children:`Create Work Center`}),(0,I.jsxs)(U,{children:[(0,I.jsx)(Mv,{label:`Key`,description:`Alphanumeric with hyphens`,value:t,onChange:e=>n(e.currentTarget.value),required:!0}),(0,I.jsx)(Qm,{label:`Description`,value:r,onChange:e=>i(e.currentTarget.value),autosize:!0,minRows:2}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>e(`/work-centers`),children:`Cancel`}),(0,I.jsx)(H,{onClick:async()=>{o(!0);try{await q.post(J.workCenters,{key:t,description:r}),e(`/work-centers/${t}`)}catch(e){gM(e)}finally{o(!1)}},loading:a,disabled:!t,children:`Create`})]})]})]})},qQ=()=>{let{key:e}=bC(),t=hC(),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!0),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(``),g=(0,v.useCallback)(async()=>{if(e){a(!0);try{r(await q.get(J.workCenter(e)))}catch(e){gM(e)}finally{a(!1)}}},[e]);(0,v.useEffect)(()=>{g()},[g]);let _=()=>{n&&(l(n.key),d(n.description),s(!0))},y=async()=>{if(e){p(!0);try{let n={key:c,description:u};await q.put(J.workCenter(e),n),s(!1),c===e?await g():t(`/work-centers/${c}`,{replace:!0})}catch(e){gM(e)}finally{p(!1)}}},b=async()=>{if(!(!e||!confirm(`Delete this work center?`)))try{await q.delete(J.workCenter(e)),t(`/work-centers`)}catch(e){gM(e)}},x=async()=>{if(!(!e||!m.trim()))try{await q.post(J.workCenterUsers(e),{username:m.trim()}),h(``),await g()}catch(e){gM(e)}},S=async t=>{if(e)try{await q.delete(J.workCenterUser(e,t)),await g()}catch(e){gM(e)}};if(i)return(0,I.jsx)(Qp,{size:`md`,py:`xl`,children:(0,I.jsx)(U,{align:`center`,children:(0,I.jsx)(uu,{})})});if(!n)return(0,I.jsx)(Qp,{size:`md`,py:`xl`,children:(0,I.jsx)(V,{children:`Work center not found.`})});if(o)return(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsx)(zv,{order:2,mb:`lg`,children:`Edit Work Center`}),(0,I.jsxs)(U,{children:[(0,I.jsx)(Mv,{label:`Key`,description:`Alphanumeric with hyphens`,value:c,onChange:e=>l(e.currentTarget.value),required:!0}),(0,I.jsx)(Qm,{label:`Description`,value:u,onChange:e=>d(e.currentTarget.value),autosize:!0,minRows:2}),(0,I.jsxs)(B,{justify:`flex-end`,children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>s(!1),children:`Cancel`}),(0,I.jsx)(H,{onClick:y,loading:f,children:`Save`})]})]})]});let C=Rj(n._actions,`assignUser`);return(0,I.jsxs)(Qp,{size:`md`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsxs)(B,{children:[(0,I.jsx)(zv,{order:2,children:n.key}),(0,I.jsx)(CZ,{createdBy:n.createdBy,createdAt:n.createdAt,updatedBy:n.updatedBy,updatedAt:n.updatedAt})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(H,{variant:`subtle`,onClick:()=>t(`/work-centers`),children:`Back`}),Rj(n._actions,`update`)&&(0,I.jsx)(H,{onClick:_,children:`Edit`}),Rj(n._actions,`delete`)&&(0,I.jsx)(H,{color:`red`,variant:`outline`,onClick:b,children:`Delete`})]})]}),(0,I.jsx)(Wp,{withBorder:!0,p:`lg`,mb:`lg`,children:(0,I.jsx)(U,{gap:`sm`,children:(0,I.jsxs)(B,{children:[(0,I.jsx)(V,{fw:600,w:120,children:`Description:`}),(0,I.jsx)(V,{children:n.description||`—`})]})})}),(0,I.jsx)(zv,{order:4,mb:`sm`,children:`Assigned Users`}),C&&(0,I.jsxs)(B,{mb:`md`,children:[(0,I.jsx)(hZ,{placeholder:`Search users...`,value:m,onChange:h,style:{flex:1}}),(0,I.jsx)(H,{onClick:x,disabled:!m.trim(),children:`Assign`})]}),n.userAssignments.length>0?(0,I.jsxs)(W,{striped:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Username`}),(0,I.jsx)(W.Th,{children:`Assigned`}),(0,I.jsx)(W.Th,{children:`By`}),C&&(0,I.jsx)(W.Th,{w:50})]})}),(0,I.jsx)(W.Tbody,{children:n.userAssignments.map(e=>(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Td,{children:(0,I.jsx)(V,{size:`sm`,children:e.username})}),(0,I.jsx)(W.Td,{children:(0,I.jsx)(V,{size:`sm`,children:new Date(e.createdAt).toLocaleDateString()})}),(0,I.jsx)(W.Td,{children:(0,I.jsx)(V,{size:`sm`,children:e.createdBy??`—`})}),C&&(0,I.jsx)(W.Td,{children:Rj(e._actions,`remove`)&&(0,I.jsx)(vu,{color:`red`,variant:`subtle`,size:`sm`,onClick:()=>S(e.username),children:(0,I.jsx)(uM,{size:`0.9rem`})})})]},e.userId))})]}):(0,I.jsx)(V,{c:`dimmed`,py:`md`,children:`No users assigned.`})]})},JQ=()=>{let e=hC(),[t,n]=qw(),r=Number(t.get(`page`))||1,i=t.get(`search`)||``,[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!0),l=(0,v.useCallback)(async()=>{c(!0);try{let e=new URLSearchParams;e.set(`page`,String(r)),e.set(`pageSize`,`20`),i&&e.set(`search`,i),o(await q.get(`${J.workCenters}?${e}`))}catch(e){gM(e)}finally{c(!1)}},[r,i]);(0,v.useEffect)(()=>{l()},[l]);let u=a?Math.ceil(a.total/a.pageSize):0;return(0,I.jsxs)(Qp,{size:`lg`,py:`xl`,children:[(0,I.jsxs)(B,{justify:`space-between`,mb:`lg`,children:[(0,I.jsx)(zv,{order:2,children:`Work Centers`}),a&&Rj(a._actions,`create`)&&(0,I.jsx)(H,{onClick:()=>e(`/work-centers/new`),children:`Create New`})]}),(0,I.jsx)(B,{mb:`md`,children:(0,I.jsx)(Mv,{placeholder:`Search...`,value:i,onChange:e=>{let t=e.currentTarget.value;n(e=>(t?e.set(`search`,t):e.delete(`search`),e.set(`page`,`1`),e))},style:{flex:1}})}),s?(0,I.jsx)(U,{align:`center`,py:`xl`,children:(0,I.jsx)(uu,{})}):a&&a.items.length>0?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(W,{striped:!0,highlightOnHover:!0,children:[(0,I.jsx)(W.Thead,{children:(0,I.jsxs)(W.Tr,{children:[(0,I.jsx)(W.Th,{children:`Key`}),(0,I.jsx)(W.Th,{children:`Description`}),(0,I.jsx)(W.Th,{children:`Users`}),(0,I.jsx)(W.Th,{children:`Created`})]})}),(0,I.jsx)(W.Tbody,{children:a.items.map(e=>{let t=`/work-centers/${e.key}`;return(0,I.jsxs)(W.Tr,{style:{cursor:`pointer`},children:[(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsx)(V,{size:`sm`,ff:`monospace`,children:e.key})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsx)(V,{size:`sm`,lineClamp:1,children:e.description||`—`})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:(0,I.jsx)(V,{size:`sm`,children:e.userCount})})}),(0,I.jsx)(W.Td,{style:{padding:0},children:(0,I.jsx)(zw,{to:t,style:gZ,children:new Date(e.createdAt).toLocaleDateString()})})]},e.id)})})]}),u>1&&(0,I.jsx)(B,{justify:`center`,mt:`md`,children:(0,I.jsx)(u_,{total:u,value:r,onChange:e=>n(t=>(t.set(`page`,String(e)),t))})})]}):(0,I.jsx)(V,{c:`dimmed`,ta:`center`,py:`xl`,children:`No work centers found.`})]})},YQ=()=>{let[e,t]=v.useState(!1),[n,r]=v.useState(!1),[i,a]=v.useState(!1),{user:o,loading:s}=xM();return v.useEffect(()=>{fetch(`/api/erp/client-config`).then(e=>e.json()).then(e=>{t(e.publicRead),r(e.supervisorAuth)}).catch(()=>{}).finally(()=>a(!0))},[]),s||!i?null:!o&&!e?(0,I.jsx)(UZ,{}):(0,I.jsx)(JC,{children:(0,I.jsxs)(KC,{element:(0,I.jsx)(pZ,{supervisorAuth:n}),children:[(0,I.jsx)(KC,{path:`/`,element:(0,I.jsx)(WC,{to:`/orders`,replace:!0})}),(0,I.jsx)(KC,{path:`/orders`,element:(0,I.jsx)(XZ,{})}),(0,I.jsx)(KC,{path:`/orders/new`,element:(0,I.jsx)(GZ,{})}),(0,I.jsx)(KC,{path:`/orders/:key`,element:(0,I.jsx)(YZ,{})}),(0,I.jsx)(KC,{path:`/orders/:orderKey/revs/diff`,element:(0,I.jsx)(uQ,{})}),(0,I.jsxs)(KC,{path:`/orders/:orderKey/revs/:revNo`,element:(0,I.jsx)(hQ,{}),children:[(0,I.jsx)(KC,{index:!0,element:(0,I.jsx)(WC,{to:`header`,replace:!0})}),(0,I.jsx)(KC,{path:`header`,element:(0,I.jsx)(QZ,{})}),(0,I.jsx)(KC,{path:`ops/:seqNo`,element:(0,I.jsx)(rQ,{})})]}),(0,I.jsx)(KC,{path:`/orders/:orderKey/runs`,element:(0,I.jsx)(UQ,{})}),(0,I.jsx)(KC,{path:`/orders/:orderKey/runs/new`,element:(0,I.jsx)(AQ,{})}),(0,I.jsxs)(KC,{path:`/orders/:orderKey/runs/:runNo`,element:(0,I.jsx)(BQ,{}),children:[(0,I.jsx)(KC,{index:!0,element:(0,I.jsx)(WC,{to:`header`,replace:!0})}),(0,I.jsx)(KC,{path:`header`,element:(0,I.jsx)(bQ,{})}),(0,I.jsx)(KC,{path:`ops/:seqNo`,element:(0,I.jsx)(kQ,{})})]}),(0,I.jsx)(KC,{path:`/items`,element:(0,I.jsx)(HZ,{})}),(0,I.jsx)(KC,{path:`/items/new`,element:(0,I.jsx)(SZ,{})}),(0,I.jsx)(KC,{path:`/items/:key`,element:(0,I.jsx)(DZ,{})}),(0,I.jsx)(KC,{path:`/items/:key/instances`,element:(0,I.jsx)(VZ,{})}),(0,I.jsx)(KC,{path:`/items/:key/instances/:instanceId`,element:(0,I.jsx)(BZ,{})}),(0,I.jsx)(KC,{path:`/work-centers`,element:(0,I.jsx)(JQ,{})}),(0,I.jsx)(KC,{path:`/work-centers/new`,element:(0,I.jsx)(KQ,{})}),(0,I.jsx)(KC,{path:`/work-centers/:key`,element:(0,I.jsx)(qQ,{})}),(0,I.jsx)(KC,{path:`/dispatch`,element:(0,I.jsx)(bZ,{})}),(0,I.jsx)(KC,{path:`/inventory`,element:(0,I.jsx)(xZ,{})}),(0,I.jsx)(KC,{path:`/users`,element:(0,I.jsx)(GQ,{})}),(0,I.jsx)(KC,{path:`/users/:username`,element:(0,I.jsx)(WQ,{})}),(0,I.jsx)(KC,{path:`/admin`,element:(0,I.jsx)(mZ,{})})]})})};_.createRoot(document.getElementById(`root`)).render((0,I.jsx)(v.StrictMode,{children:(0,I.jsx)(()=>(0,I.jsx)(zr,{defaultColorScheme:`dark`,children:(0,I.jsxs)($v,{settings:{consistentWeeks:!0},children:[(0,I.jsx)(Xx,{position:`top-right`}),(0,I.jsx)(Iw,{basename:`/erp`,children:(0,I.jsx)(bM,{children:(0,I.jsx)(YQ,{})})})]})}),{})}));
|