@medplum/app 2.1.8 → 2.1.10
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.
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
function a3(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(n,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();function ly(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vO={exports:{}},tm={},yO={exports:{}},Te={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var nc=Symbol.for("react.element"),i3=Symbol.for("react.portal"),l3=Symbol.for("react.fragment"),s3=Symbol.for("react.strict_mode"),c3=Symbol.for("react.profiler"),u3=Symbol.for("react.provider"),d3=Symbol.for("react.context"),f3=Symbol.for("react.forward_ref"),p3=Symbol.for("react.suspense"),m3=Symbol.for("react.memo"),h3=Symbol.for("react.lazy"),W1=Symbol.iterator;function g3(e){return e===null||typeof e!="object"?null:(e=W1&&e[W1]||e["@@iterator"],typeof e=="function"?e:null)}var wO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bO=Object.assign,_O={};function bl(e,t,r){this.props=e,this.context=t,this.refs=_O,this.updater=r||wO}bl.prototype.isReactComponent={};bl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};bl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xO(){}xO.prototype=bl.prototype;function sy(e,t,r){this.props=e,this.context=t,this.refs=_O,this.updater=r||wO}var cy=sy.prototype=new xO;cy.constructor=sy;bO(cy,bl.prototype);cy.isPureReactComponent=!0;var H1=Array.isArray,EO=Object.prototype.hasOwnProperty,uy={current:null},SO={key:!0,ref:!0,__self:!0,__source:!0};function PO(e,t,r){var n,o={},a=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)EO.call(t,n)&&!SO.hasOwnProperty(n)&&(o[n]=t[n]);var l=arguments.length-2;if(l===1)o.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)o[n]===void 0&&(o[n]=l[n]);return{$$typeof:nc,type:e,key:a,ref:i,props:o,_owner:uy.current}}function v3(e,t){return{$$typeof:nc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function dy(e){return typeof e=="object"&&e!==null&&e.$$typeof===nc}function y3(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var q1=/\/+/g;function dh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?y3(""+e.key):t.toString(36)}function Du(e,t,r,n,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case nc:case i3:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+dh(i,0):n,H1(o)?(r="",e!=null&&(r=e.replace(q1,"$&/")+"/"),Du(o,t,r,"",function(u){return u})):o!=null&&(dy(o)&&(o=v3(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(q1,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",H1(e))for(var l=0;l<e.length;l++){a=e[l];var c=n+dh(a,l);i+=Du(a,t,r,c,o)}else if(c=g3(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=n+dh(a,l++),i+=Du(a,t,r,c,o);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Mc(e,t,r){if(e==null)return e;var n=[],o=0;return Du(e,n,"","",function(a){return t.call(r,a,o++)}),n}function w3(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var pr={current:null},Nu={transition:null},b3={ReactCurrentDispatcher:pr,ReactCurrentBatchConfig:Nu,ReactCurrentOwner:uy};Te.Children={map:Mc,forEach:function(e,t,r){Mc(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Mc(e,function(){t++}),t},toArray:function(e){return Mc(e,function(t){return t})||[]},only:function(e){if(!dy(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Te.Component=bl;Te.Fragment=l3;Te.Profiler=c3;Te.PureComponent=sy;Te.StrictMode=s3;Te.Suspense=p3;Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b3;Te.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=bO({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=uy.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)EO.call(t,c)&&!SO.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:nc,type:e.type,key:o,ref:a,props:n,_owner:i}};Te.createContext=function(e){return e={$$typeof:d3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:u3,_context:e},e.Consumer=e};Te.createElement=PO;Te.createFactory=function(e){var t=PO.bind(null,e);return t.type=e,t};Te.createRef=function(){return{current:null}};Te.forwardRef=function(e){return{$$typeof:f3,render:e}};Te.isValidElement=dy;Te.lazy=function(e){return{$$typeof:h3,_payload:{_status:-1,_result:e},_init:w3}};Te.memo=function(e,t){return{$$typeof:m3,type:e,compare:t===void 0?null:t}};Te.startTransition=function(e){var t=Nu.transition;Nu.transition={};try{e()}finally{Nu.transition=t}};Te.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Te.useCallback=function(e,t){return pr.current.useCallback(e,t)};Te.useContext=function(e){return pr.current.useContext(e)};Te.useDebugValue=function(){};Te.useDeferredValue=function(e){return pr.current.useDeferredValue(e)};Te.useEffect=function(e,t){return pr.current.useEffect(e,t)};Te.useId=function(){return pr.current.useId()};Te.useImperativeHandle=function(e,t,r){return pr.current.useImperativeHandle(e,t,r)};Te.useInsertionEffect=function(e,t){return pr.current.useInsertionEffect(e,t)};Te.useLayoutEffect=function(e,t){return pr.current.useLayoutEffect(e,t)};Te.useMemo=function(e,t){return pr.current.useMemo(e,t)};Te.useReducer=function(e,t,r){return pr.current.useReducer(e,t,r)};Te.useRef=function(e){return pr.current.useRef(e)};Te.useState=function(e){return pr.current.useState(e)};Te.useSyncExternalStore=function(e,t,r){return pr.current.useSyncExternalStore(e,t,r)};Te.useTransition=function(){return pr.current.useTransition()};Te.version="18.2.0";yO.exports=Te;var f=yO.exports;const s=ly(f),js=a3({__proto__:null,default:s},[f]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var _3=f,x3=Symbol.for("react.element"),E3=Symbol.for("react.fragment"),S3=Object.prototype.hasOwnProperty,P3=_3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$3={key:!0,ref:!0,__self:!0,__source:!0};function $O(e,t,r){var n,o={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)S3.call(t,n)&&!$3.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:x3,type:e,key:a,ref:i,props:o,_owner:P3.current}}tm.Fragment=E3;tm.jsx=$O;tm.jsxs=$O;vO.exports=tm;var m=vO.exports,Un=function(){return Un=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Un.apply(this,arguments)};function OO(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function _l(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function l(d){try{u(n.next(d))}catch(p){i(p)}}function c(d){try{u(n.throw(d))}catch(p){i(p)}}function u(d){d.done?a(d.value):o(d.value).then(l,c)}u((n=n.apply(e,t||[])).next())})}function xl(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(r=0)),r;)try{if(n=1,o&&(a=u[0]&2?o.return:u[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;switch(o=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function G1(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],i;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(l){i={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a}function Pg(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Au="right-scroll-bar-position",Mu="width-before-scroll-bar",O3="with-scroll-bars-hidden",C3="--removed-body-scroll-bar-size";function k3(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function j3(e,t){var r=f.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function R3(e,t){return j3(t||null,function(r){return e.forEach(function(n){return k3(n,r)})})}function T3(e){return e}function I3(e,t){t===void 0&&(t=T3);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var c=function(){var d=i;i=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),r}}}};return o}function D3(e){e===void 0&&(e={});var t=I3(null);return t.options=Un({async:!0,ssr:!1},e),t}var CO=function(e){var t=e.sideCar,r=OO(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return f.createElement(n,Un({},r))};CO.isSideCarExport=!0;function N3(e,t){return e.useMedium(t),CO}var kO=D3(),fh=function(){},rm=f.forwardRef(function(e,t){var r=f.useRef(null),n=f.useState({onScrollCapture:fh,onWheelCapture:fh,onTouchMoveCapture:fh}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,p=e.shards,h=e.sideCar,g=e.noIsolation,y=e.inert,v=e.allowPinchZoom,E=e.as,w=E===void 0?"div":E,b=e.gapMode,_=OO(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=h,S=R3([r,t]),$=Un(Un({},_),o);return f.createElement(f.Fragment,null,d&&f.createElement(x,{sideCar:kO,removeScrollBar:u,shards:p,noIsolation:g,inert:y,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:b}),i?f.cloneElement(f.Children.only(l),Un(Un({},$),{ref:S})):f.createElement(w,Un({},$,{className:c,ref:S}),l))});rm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rm.classNames={fullWidth:Mu,zeroRight:Au};var Q1,A3=function(){if(Q1)return Q1;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function M3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=A3();return t&&e.setAttribute("nonce",t),e}function L3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var F3=function(){var e=0,t=null;return{add:function(r){e==0&&(t=M3())&&(L3(t,r),z3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},V3=function(){var e=F3();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},jO=function(){var e=V3(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},B3={left:0,top:0,right:0,gap:0},ph=function(e){return parseInt(e||"",10)||0},U3=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ph(r),ph(n),ph(o)]},W3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return B3;var t=U3(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},H3=jO(),q3=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
18
|
+
.`.concat(O3,` {
|
|
19
|
+
overflow: hidden `).concat(n,`;
|
|
20
|
+
padding-right: `).concat(l,"px ").concat(n,`;
|
|
21
|
+
}
|
|
22
|
+
body {
|
|
23
|
+
overflow: hidden `).concat(n,`;
|
|
24
|
+
overscroll-behavior: contain;
|
|
25
|
+
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
26
|
+
padding-left: `.concat(o,`px;
|
|
27
|
+
padding-top: `).concat(a,`px;
|
|
28
|
+
padding-right: `).concat(i,`px;
|
|
29
|
+
margin-left:0;
|
|
30
|
+
margin-top:0;
|
|
31
|
+
margin-right: `).concat(l,"px ").concat(n,`;
|
|
32
|
+
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.`).concat(Au,` {
|
|
36
|
+
right: `).concat(l,"px ").concat(n,`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.`).concat(Mu,` {
|
|
40
|
+
margin-right: `).concat(l,"px ").concat(n,`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.`).concat(Au," .").concat(Au,` {
|
|
44
|
+
right: 0 `).concat(n,`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.`).concat(Mu," .").concat(Mu,` {
|
|
48
|
+
margin-right: 0 `).concat(n,`;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
body {
|
|
52
|
+
`).concat(C3,": ").concat(l,`px;
|
|
53
|
+
}
|
|
54
|
+
`)},G3=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,a=f.useMemo(function(){return W3(o)},[o]);return f.createElement(H3,{styles:q3(a,!t,o,r?"":"!important")})},$g=!1;if(typeof window<"u")try{var Lc=Object.defineProperty({},"passive",{get:function(){return $g=!0,!0}});window.addEventListener("test",Lc,Lc),window.removeEventListener("test",Lc,Lc)}catch{$g=!1}var yi=$g?{passive:!1}:!1,Q3=function(e){return e.tagName==="TEXTAREA"},RO=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Q3(e)&&r[t]==="visible")},K3=function(e){return RO(e,"overflowY")},Y3=function(e){return RO(e,"overflowX")},K1=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=TO(e,n);if(o){var a=IO(e,n),i=a[1],l=a[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},X3=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},J3=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},TO=function(e,t){return e==="v"?K3(t):Y3(t)},IO=function(e,t){return e==="v"?X3(t):J3(t)},Z3=function(e,t){return e==="h"&&t==="rtl"?-1:1},eA=function(e,t,r,n,o){var a=Z3(e,window.getComputedStyle(t).direction),i=a*n,l=r.target,c=t.contains(l),u=!1,d=i>0,p=0,h=0;do{var g=IO(e,l),y=g[0],v=g[1],E=g[2],w=v-E-a*y;(y||w)&&TO(e,l)&&(p+=w,h+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(o&&Math.abs(p)<1||!o&&i>p)||!d&&(o&&Math.abs(h)<1||!o&&-i>h))&&(u=!0),u},zc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Y1=function(e){return[e.deltaX,e.deltaY]},X1=function(e){return e&&"current"in e?e.current:e},tA=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rA=function(e){return`
|
|
55
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
56
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
57
|
+
`)},nA=0,wi=[];function oA(e){var t=f.useRef([]),r=f.useRef([0,0]),n=f.useRef(),o=f.useState(nA++)[0],a=f.useState(jO)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Pg([e.lockRef.current],(e.shards||[]).map(X1),!0).filter(Boolean);return v.forEach(function(E){return E.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=f.useCallback(function(v,E){if("touches"in v&&v.touches.length===2)return!i.current.allowPinchZoom;var w=zc(v),b=r.current,_="deltaX"in v?v.deltaX:b[0]-w[0],x="deltaY"in v?v.deltaY:b[1]-w[1],S,$=v.target,O=Math.abs(_)>Math.abs(x)?"h":"v";if("touches"in v&&O==="h"&&$.type==="range")return!1;var C=K1(O,$);if(!C)return!0;if(C?S=O:(S=O==="v"?"h":"v",C=K1(O,$)),!C)return!1;if(!n.current&&"changedTouches"in v&&(_||x)&&(n.current=S),!S)return!0;var T=n.current||S;return eA(T,E,v,T==="h"?_:x,!0)},[]),c=f.useCallback(function(v){var E=v;if(!(!wi.length||wi[wi.length-1]!==a)){var w="deltaY"in E?Y1(E):zc(E),b=t.current.filter(function(S){return S.name===E.type&&(S.target===E.target||E.target===S.shadowParent)&&tA(S.delta,w)})[0];if(b&&b.should){E.cancelable&&E.preventDefault();return}if(!b){var _=(i.current.shards||[]).map(X1).filter(Boolean).filter(function(S){return S.contains(E.target)}),x=_.length>0?l(E,_[0]):!i.current.noIsolation;x&&E.cancelable&&E.preventDefault()}}},[]),u=f.useCallback(function(v,E,w,b){var _={name:v,delta:E,target:w,should:b,shadowParent:aA(w)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(x){return x!==_})},1)},[]),d=f.useCallback(function(v){r.current=zc(v),n.current=void 0},[]),p=f.useCallback(function(v){u(v.type,Y1(v),v.target,l(v,e.lockRef.current))},[]),h=f.useCallback(function(v){u(v.type,zc(v),v.target,l(v,e.lockRef.current))},[]);f.useEffect(function(){return wi.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",c,yi),document.addEventListener("touchmove",c,yi),document.addEventListener("touchstart",d,yi),function(){wi=wi.filter(function(v){return v!==a}),document.removeEventListener("wheel",c,yi),document.removeEventListener("touchmove",c,yi),document.removeEventListener("touchstart",d,yi)}},[]);var g=e.removeScrollBar,y=e.inert;return f.createElement(f.Fragment,null,y?f.createElement(a,{styles:rA(o)}):null,g?f.createElement(G3,{gapMode:e.gapMode}):null)}function aA(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const iA=N3(kO,oA);var DO=f.forwardRef(function(e,t){return f.createElement(rm,Un({},e,{ref:t,sideCar:iA}))});DO.classNames=rm.classNames;const lA=DO;function od(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}function sA(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].disabled)return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].disabled)return n}return e}function cA(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].disabled)return n}return e}function uA(e,t,r){return od(e,r)===od(t,r)}function NO({parentSelector:e,siblingSelector:t,onKeyDown:r,loop:n=!0,activateOnFocus:o=!1,dir:a="rtl",orientation:i}){return l=>{var c;r==null||r(l);const u=Array.from(((c=od(l.currentTarget,e))==null?void 0:c.querySelectorAll(t))||[]).filter(v=>uA(l.currentTarget,v,e)),d=u.findIndex(v=>l.currentTarget===v),p=cA(d,u,n),h=sA(d,u,n),g=a==="rtl"?h:p,y=a==="rtl"?p:h;switch(l.key){case"ArrowRight":{i==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[g].focus(),o&&u[g].click());break}case"ArrowLeft":{i==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[y].focus(),o&&u[y].click());break}case"ArrowUp":{i==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[h].focus(),o&&u[h].click());break}case"ArrowDown":{i==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[p].focus(),o&&u[p].click());break}case"Home":{l.stopPropagation(),l.preventDefault(),!u[0].disabled&&u[0].focus();break}case"End":{l.stopPropagation(),l.preventDefault();const v=u.length-1;!u[v].disabled&&u[v].focus();break}}}}function dA(e,t,r){var n;return r?Array.from(((n=od(r,t))==null?void 0:n.querySelectorAll(e))||[]).findIndex(o=>o===r):null}function Po(e){const t=f.createContext(null);return[({children:o,value:a})=>s.createElement(t.Provider,{value:a},o),()=>{const o=f.useContext(t);if(o===null)throw new Error(e);return o}]}function nm(e){return Array.isArray(e)?e:[e]}function J1(e,t){return r=>{if(typeof r!="string"||r.trim().length===0)throw new Error(t);return`${e}-${r}`}}const fA=()=>{};function pA(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||fA:r=>{var n;r.key==="Escape"&&(e(r),(n=t.onTrigger)==null||n.call(t))}}function Lr(e,t){return r=>{e==null||e(r),t==null||t(r)}}function mA(){const[e,t]=f.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function hA({data:e}){const t=[],r=[],n=e.reduce((o,a,i)=>(a.group?o[a.group]?o[a.group].push(i):o[a.group]=[i]:r.push(i),o),{});return Object.keys(n).forEach(o=>{t.push(...n[o].map(a=>e[a]))}),t.push(...r.map(o=>e[o])),t}function gA(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const vA=typeof window<"u"?f.useLayoutEffect:f.useEffect;function yA(e){function t(n){const o=Object.keys(n).reduce((a,i)=>(a[`${e}:${i}`]=l=>n[i](l.detail),a),{});vA(()=>(Object.keys(o).forEach(a=>{window.removeEventListener(a,o[a]),window.addEventListener(a,o[a])}),()=>Object.keys(o).forEach(a=>{window.removeEventListener(a,o[a])})),[o])}function r(n){return(...o)=>gA(`${e}:${String(n)}`,o[0])}return[t,r]}function El(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==s.Fragment:!1}function AO(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=AO(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function MO(){for(var e=0,t,r,n="";e<arguments.length;)(t=arguments[e++])&&(r=AO(t))&&(n&&(n+=" "),n+=r);return n}const wA={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],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"]};function bA(e){return()=>({fontFamily:e.fontFamily||"sans-serif"})}var _A=Object.defineProperty,Z1=Object.getOwnPropertySymbols,xA=Object.prototype.hasOwnProperty,EA=Object.prototype.propertyIsEnumerable,ew=(e,t,r)=>t in e?_A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tw=(e,t)=>{for(var r in t||(t={}))xA.call(t,r)&&ew(e,r,t[r]);if(Z1)for(var r of Z1(t))EA.call(t,r)&&ew(e,r,t[r]);return e};function SA(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:tw({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:tw({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function oc(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function fy(e){const t=oc(e);return(r,n,o=!0,a=!0)=>{if(typeof r=="string"&&r.includes(".")){const[l,c]=r.split("."),u=parseInt(c,10);if(l in e.colors&&u>=0&&u<10)return e.colors[l][typeof n=="number"&&!a?n:u]}const i=typeof n=="number"?n:t();return r in e.colors?e.colors[r][i]:o?e.colors[e.primaryColor][i]:r}}function LO(e){let t="";for(let r=1;r<e.length-1;r+=1)t+=`${e[r]} ${r/(e.length-1)*100}%, `;return`${e[0]} 0%, ${t}${e[e.length-1]} 100%`}function PA(e,...t){return`linear-gradient(${e}deg, ${LO(t)})`}function $A(...e){return`radial-gradient(circle, ${LO(e)})`}function zO(e){const t=fy(e),r=oc(e);return n=>{const o={from:(n==null?void 0:n.from)||e.defaultGradient.from,to:(n==null?void 0:n.to)||e.defaultGradient.to,deg:(n==null?void 0:n.deg)||e.defaultGradient.deg};return`linear-gradient(${o.deg}deg, ${t(o.from,r(),!1)} 0%, ${t(o.to,r(),!1)} 100%)`}}function FO(e){return t=>{if(typeof t=="number")return`${t/16}${e}`;if(typeof t=="string"){const r=t.replace("px","");if(!Number.isNaN(Number(r)))return`${Number(r)/16}${e}`}return t}}const P=FO("rem"),sr=FO("em");function L({size:e,sizes:t,units:r}){return e in t?t[e]:typeof e=="number"?r==="em"?sr(e):P(e):e||t.md}function ln(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function OA(e){return t=>`@media (min-width: ${sr(ln(L({size:t,sizes:e.breakpoints})))})`}function CA(e){return t=>`@media (max-width: ${sr(ln(L({size:t,sizes:e.breakpoints}))-1)})`}function kA(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function jA(e){let t=e.replace("#","");if(t.length===3){const i=t.split("");t=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}const r=parseInt(t,16),n=r>>16&255,o=r>>8&255,a=r&255;return{r:n,g:o,b:a,a:1}}function RA(e){const[t,r,n,o]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:r,b:n,a:o||1}}function py(e){return kA(e)?jA(e):e.startsWith("rgb")?RA(e):{r:0,g:0,b:0,a:1}}function ki(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;const{r,g:n,b:o}=py(e);return`rgba(${r}, ${n}, ${o}, ${t})`}function TA(e=0){return{position:"absolute",top:P(e),right:P(e),left:P(e),bottom:P(e)}}function IA(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a}=py(e),i=1-t,l=c=>Math.round(c*i);return`rgba(${l(r)}, ${l(n)}, ${l(o)}, ${a})`}function DA(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a}=py(e),i=l=>Math.round(l+(255-l)*t);return`rgba(${i(r)}, ${i(n)}, ${i(o)}, ${a})`}function NA(e){return t=>{if(typeof t=="number")return P(t);const r=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||r}}function AA(e,t){if(typeof e=="string"&&e.includes(".")){const[r,n]=e.split("."),o=parseInt(n,10);if(r in t.colors&&o>=0&&o<10)return{isSplittedColor:!0,key:r,shade:o}}return{isSplittedColor:!1}}function MA(e){const t=fy(e),r=oc(e),n=zO(e);return({variant:o,color:a,gradient:i,primaryFallback:l})=>{const c=AA(a,e);switch(o){case"light":return{border:"transparent",background:ki(t(a,e.colorScheme==="dark"?8:0,l,!1),e.colorScheme==="dark"?.2:1),color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:r("light")),hover:ki(t(a,e.colorScheme==="dark"?7:1,l,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:r("light")),hover:ki(t(a,e.colorScheme==="dark"?8:0,l,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:t(a,e.colorScheme==="dark"?5:r("light")),background:"transparent",color:t(a,e.colorScheme==="dark"?5:r("light")),hover:e.colorScheme==="dark"?ki(t(a,5,l,!1),.05):ki(t(a,0,l,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(a,r()),hover:null};case"transparent":return{border:"transparent",color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:r("light")),background:"transparent",hover:null};case"gradient":return{background:n(i),color:e.white,border:"transparent",hover:null};default:{const u=r(),d=c.isSplittedColor?c.shade:u,p=c.isSplittedColor?c.key:a;return{border:"transparent",background:t(p,d,l),color:e.white,hover:t(p,d===9?8:d+1)}}}}}function LA(e){return t=>{const r=oc(e)(t);return e.colors[e.primaryColor][r]}}function zA(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function FA(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function VA(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const It={fontStyles:bA,themeColor:fy,focusStyles:SA,linearGradient:PA,radialGradient:$A,smallerThan:CA,largerThan:OA,rgba:ki,cover:TA,darken:IA,lighten:DA,radius:NA,variant:MA,primaryShade:oc,hover:zA,gradient:zO,primaryColor:LA,placeholderStyles:FA,dimmed:VA};var BA=Object.defineProperty,UA=Object.defineProperties,WA=Object.getOwnPropertyDescriptors,rw=Object.getOwnPropertySymbols,HA=Object.prototype.hasOwnProperty,qA=Object.prototype.propertyIsEnumerable,nw=(e,t,r)=>t in e?BA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,GA=(e,t)=>{for(var r in t||(t={}))HA.call(t,r)&&nw(e,r,t[r]);if(rw)for(var r of rw(t))qA.call(t,r)&&nw(e,r,t[r]);return e},QA=(e,t)=>UA(e,WA(t));function VO(e){return QA(GA({},e),{fn:{fontStyles:It.fontStyles(e),themeColor:It.themeColor(e),focusStyles:It.focusStyles(e),largerThan:It.largerThan(e),smallerThan:It.smallerThan(e),radialGradient:It.radialGradient,linearGradient:It.linearGradient,gradient:It.gradient(e),rgba:It.rgba,cover:It.cover,lighten:It.lighten,darken:It.darken,primaryShade:It.primaryShade(e),radius:It.radius(e),variant:It.variant(e),hover:It.hover,primaryColor:It.primaryColor(e),placeholderStyles:It.placeholderStyles(e),dimmed:It.dimmed(e)}})}const BO=["xs","sm","md","lg","xl"],KA={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:wA,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},my=VO(KA);function YA(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function XA(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var JA=function(){function e(r){var n=this;this._insertTag=function(o){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,a),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(XA(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=YA(o);try{a.insertRule(n,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Xt="-ms-",ad="-moz-",ze="-webkit-",UO="comm",hy="rule",gy="decl",ZA="@import",WO="@keyframes",e9="@layer",t9=Math.abs,om=String.fromCharCode,r9=Object.assign;function n9(e,t){return Ht(e,0)^45?(((t<<2^Ht(e,0))<<2^Ht(e,1))<<2^Ht(e,2))<<2^Ht(e,3):0}function HO(e){return e.trim()}function o9(e,t){return(e=t.exec(e))?e[0]:e}function Ve(e,t,r){return e.replace(t,r)}function Og(e,t){return e.indexOf(t)}function Ht(e,t){return e.charCodeAt(t)|0}function Rs(e,t,r){return e.slice(t,r)}function Vn(e){return e.length}function vy(e){return e.length}function Fc(e,t){return t.push(e),e}function a9(e,t){return e.map(t).join("")}var am=1,al=1,qO=0,$r=0,jt=0,Sl="";function im(e,t,r,n,o,a,i){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:am,column:al,length:i,return:""}}function Ml(e,t){return r9(im("",null,null,"",null,null,0),e,{length:-e.length},t)}function i9(){return jt}function l9(){return jt=$r>0?Ht(Sl,--$r):0,al--,jt===10&&(al=1,am--),jt}function Fr(){return jt=$r<qO?Ht(Sl,$r++):0,al++,jt===10&&(al=1,am++),jt}function qn(){return Ht(Sl,$r)}function Lu(){return $r}function ac(e,t){return Rs(Sl,e,t)}function Ts(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function GO(e){return am=al=1,qO=Vn(Sl=e),$r=0,[]}function QO(e){return Sl="",e}function zu(e){return HO(ac($r-1,Cg(e===91?e+2:e===40?e+1:e)))}function s9(e){for(;(jt=qn())&&jt<33;)Fr();return Ts(e)>2||Ts(jt)>3?"":" "}function c9(e,t){for(;--t&&Fr()&&!(jt<48||jt>102||jt>57&&jt<65||jt>70&&jt<97););return ac(e,Lu()+(t<6&&qn()==32&&Fr()==32))}function Cg(e){for(;Fr();)switch(jt){case e:return $r;case 34:case 39:e!==34&&e!==39&&Cg(jt);break;case 40:e===41&&Cg(e);break;case 92:Fr();break}return $r}function u9(e,t){for(;Fr()&&e+jt!==47+10;)if(e+jt===42+42&&qn()===47)break;return"/*"+ac(t,$r-1)+"*"+om(e===47?e:Fr())}function d9(e){for(;!Ts(qn());)Fr();return ac(e,$r)}function f9(e){return QO(Fu("",null,null,null,[""],e=GO(e),0,[0],e))}function Fu(e,t,r,n,o,a,i,l,c){for(var u=0,d=0,p=i,h=0,g=0,y=0,v=1,E=1,w=1,b=0,_="",x=o,S=a,$=n,O=_;E;)switch(y=b,b=Fr()){case 40:if(y!=108&&Ht(O,p-1)==58){Og(O+=Ve(zu(b),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:O+=zu(b);break;case 9:case 10:case 13:case 32:O+=s9(y);break;case 92:O+=c9(Lu()-1,7);continue;case 47:switch(qn()){case 42:case 47:Fc(p9(u9(Fr(),Lu()),t,r),c);break;default:O+="/"}break;case 123*v:l[u++]=Vn(O)*w;case 125*v:case 59:case 0:switch(b){case 0:case 125:E=0;case 59+d:w==-1&&(O=Ve(O,/\f/g,"")),g>0&&Vn(O)-p&&Fc(g>32?aw(O+";",n,r,p-1):aw(Ve(O," ","")+";",n,r,p-2),c);break;case 59:O+=";";default:if(Fc($=ow(O,t,r,u,d,o,l,_,x=[],S=[],p),a),b===123)if(d===0)Fu(O,t,$,$,x,a,p,l,S);else switch(h===99&&Ht(O,3)===110?100:h){case 100:case 108:case 109:case 115:Fu(e,$,$,n&&Fc(ow(e,$,$,0,0,o,l,_,o,x=[],p),S),o,S,p,l,n?x:S);break;default:Fu(O,$,$,$,[""],S,0,l,S)}}u=d=g=0,v=w=1,_=O="",p=i;break;case 58:p=1+Vn(O),g=y;default:if(v<1){if(b==123)--v;else if(b==125&&v++==0&&l9()==125)continue}switch(O+=om(b),b*v){case 38:w=d>0?1:(O+="\f",-1);break;case 44:l[u++]=(Vn(O)-1)*w,w=1;break;case 64:qn()===45&&(O+=zu(Fr())),h=qn(),d=p=Vn(_=O+=d9(Lu())),b++;break;case 45:y===45&&Vn(O)==2&&(v=0)}}return a}function ow(e,t,r,n,o,a,i,l,c,u,d){for(var p=o-1,h=o===0?a:[""],g=vy(h),y=0,v=0,E=0;y<n;++y)for(var w=0,b=Rs(e,p+1,p=t9(v=i[y])),_=e;w<g;++w)(_=HO(v>0?h[w]+" "+b:Ve(b,/&\f/g,h[w])))&&(c[E++]=_);return im(e,t,r,o===0?hy:l,c,u,d)}function p9(e,t,r){return im(e,t,r,UO,om(i9()),Rs(e,2,-2),0)}function aw(e,t,r,n){return im(e,t,r,gy,Rs(e,0,n),Rs(e,n+1,-1),n)}function Qi(e,t){for(var r="",n=vy(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function m9(e,t,r,n){switch(e.type){case e9:if(e.children.length)break;case ZA:case gy:return e.return=e.return||e.value;case UO:return"";case WO:return e.return=e.value+"{"+Qi(e.children,n)+"}";case hy:e.value=e.props.join(",")}return Vn(r=Qi(e.children,n))?e.return=e.value+"{"+r+"}":""}function h9(e){var t=vy(e);return function(r,n,o,a){for(var i="",l=0;l<t;l++)i+=e[l](r,n,o,a)||"";return i}}function g9(e){return function(t){t.root||(t=t.return)&&e(t)}}var iw=function(t){var r=new WeakMap;return function(n){if(r.has(n))return r.get(n);var o=t(n);return r.set(n,o),o}};function v9(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var y9=function(t,r,n){for(var o=0,a=0;o=a,a=qn(),o===38&&a===12&&(r[n]=1),!Ts(a);)Fr();return ac(t,$r)},w9=function(t,r){var n=-1,o=44;do switch(Ts(o)){case 0:o===38&&qn()===12&&(r[n]=1),t[n]+=y9($r-1,r,n);break;case 2:t[n]+=zu(o);break;case 4:if(o===44){t[++n]=qn()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=om(o)}while(o=Fr());return t},b9=function(t,r){return QO(w9(GO(t),r))},lw=new WeakMap,_9=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!lw.get(n))&&!o){lw.set(t,!0);for(var a=[],i=b9(r,a),l=n.props,c=0,u=0;c<i.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=a[c]?i[c].replace(/&\f/g,l[d]):l[d]+" "+i[c]}}},x9=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function KO(e,t){switch(n9(e,t)){case 5103:return ze+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ze+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ze+e+ad+e+Xt+e+e;case 6828:case 4268:return ze+e+Xt+e+e;case 6165:return ze+e+Xt+"flex-"+e+e;case 5187:return ze+e+Ve(e,/(\w+).+(:[^]+)/,ze+"box-$1$2"+Xt+"flex-$1$2")+e;case 5443:return ze+e+Xt+"flex-item-"+Ve(e,/flex-|-self/,"")+e;case 4675:return ze+e+Xt+"flex-line-pack"+Ve(e,/align-content|flex-|-self/,"")+e;case 5548:return ze+e+Xt+Ve(e,"shrink","negative")+e;case 5292:return ze+e+Xt+Ve(e,"basis","preferred-size")+e;case 6060:return ze+"box-"+Ve(e,"-grow","")+ze+e+Xt+Ve(e,"grow","positive")+e;case 4554:return ze+Ve(e,/([^-])(transform)/g,"$1"+ze+"$2")+e;case 6187:return Ve(Ve(Ve(e,/(zoom-|grab)/,ze+"$1"),/(image-set)/,ze+"$1"),e,"")+e;case 5495:case 3959:return Ve(e,/(image-set\([^]*)/,ze+"$1$`$1");case 4968:return Ve(Ve(e,/(.+:)(flex-)?(.*)/,ze+"box-pack:$3"+Xt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ze+e+e;case 4095:case 3583:case 4068:case 2532:return Ve(e,/(.+)-inline(.+)/,ze+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Vn(e)-1-t>6)switch(Ht(e,t+1)){case 109:if(Ht(e,t+4)!==45)break;case 102:return Ve(e,/(.+:)(.+)-([^]+)/,"$1"+ze+"$2-$3$1"+ad+(Ht(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Og(e,"stretch")?KO(Ve(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ht(e,t+1)!==115)break;case 6444:switch(Ht(e,Vn(e)-3-(~Og(e,"!important")&&10))){case 107:return Ve(e,":",":"+ze)+e;case 101:return Ve(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ze+(Ht(e,14)===45?"inline-":"")+"box$3$1"+ze+"$2$3$1"+Xt+"$2box$3")+e}break;case 5936:switch(Ht(e,t+11)){case 114:return ze+e+Xt+Ve(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ze+e+Xt+Ve(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ze+e+Xt+Ve(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ze+e+Xt+e+e}return e}var E9=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case gy:t.return=KO(t.value,t.length);break;case WO:return Qi([Ml(t,{value:Ve(t.value,"@","@"+ze)})],o);case hy:if(t.length)return a9(t.props,function(a){switch(o9(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Qi([Ml(t,{props:[Ve(a,/:(read-\w+)/,":"+ad+"$1")]})],o);case"::placeholder":return Qi([Ml(t,{props:[Ve(a,/:(plac\w+)/,":"+ze+"input-$1")]}),Ml(t,{props:[Ve(a,/:(plac\w+)/,":"+ad+"$1")]}),Ml(t,{props:[Ve(a,/:(plac\w+)/,Xt+"input-$1")]})],o)}return""})}},S9=[E9],YO=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var E=v.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var o=t.stylisPlugins||S9,a={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var E=v.getAttribute("data-emotion").split(" "),w=1;w<E.length;w++)a[E[w]]=!0;l.push(v)});var c,u=[_9,x9];{var d,p=[m9,g9(function(v){d.insert(v)})],h=h9(u.concat(o,p)),g=function(E){return Qi(f9(E),h)};c=function(E,w,b,_){d=b,g(E?E+"{"+w.styles+"}":w.styles),_&&(y.inserted[w.name]=!0)}}var y={key:r,sheet:new JA({key:r,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:c};return y.sheet.hydrate(l),y};function et(){return et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},et.apply(this,arguments)}var XO={exports:{}},He={};/** @license React v16.13.1
|
|
58
|
+
* react-is.production.min.js
|
|
59
|
+
*
|
|
60
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the MIT license found in the
|
|
63
|
+
* LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/var Bt=typeof Symbol=="function"&&Symbol.for,yy=Bt?Symbol.for("react.element"):60103,wy=Bt?Symbol.for("react.portal"):60106,lm=Bt?Symbol.for("react.fragment"):60107,sm=Bt?Symbol.for("react.strict_mode"):60108,cm=Bt?Symbol.for("react.profiler"):60114,um=Bt?Symbol.for("react.provider"):60109,dm=Bt?Symbol.for("react.context"):60110,by=Bt?Symbol.for("react.async_mode"):60111,fm=Bt?Symbol.for("react.concurrent_mode"):60111,pm=Bt?Symbol.for("react.forward_ref"):60112,mm=Bt?Symbol.for("react.suspense"):60113,P9=Bt?Symbol.for("react.suspense_list"):60120,hm=Bt?Symbol.for("react.memo"):60115,gm=Bt?Symbol.for("react.lazy"):60116,$9=Bt?Symbol.for("react.block"):60121,O9=Bt?Symbol.for("react.fundamental"):60117,C9=Bt?Symbol.for("react.responder"):60118,k9=Bt?Symbol.for("react.scope"):60119;function Wr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case yy:switch(e=e.type,e){case by:case fm:case lm:case cm:case sm:case mm:return e;default:switch(e=e&&e.$$typeof,e){case dm:case pm:case gm:case hm:case um:return e;default:return t}}case wy:return t}}}function JO(e){return Wr(e)===fm}He.AsyncMode=by;He.ConcurrentMode=fm;He.ContextConsumer=dm;He.ContextProvider=um;He.Element=yy;He.ForwardRef=pm;He.Fragment=lm;He.Lazy=gm;He.Memo=hm;He.Portal=wy;He.Profiler=cm;He.StrictMode=sm;He.Suspense=mm;He.isAsyncMode=function(e){return JO(e)||Wr(e)===by};He.isConcurrentMode=JO;He.isContextConsumer=function(e){return Wr(e)===dm};He.isContextProvider=function(e){return Wr(e)===um};He.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===yy};He.isForwardRef=function(e){return Wr(e)===pm};He.isFragment=function(e){return Wr(e)===lm};He.isLazy=function(e){return Wr(e)===gm};He.isMemo=function(e){return Wr(e)===hm};He.isPortal=function(e){return Wr(e)===wy};He.isProfiler=function(e){return Wr(e)===cm};He.isStrictMode=function(e){return Wr(e)===sm};He.isSuspense=function(e){return Wr(e)===mm};He.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===lm||e===fm||e===cm||e===sm||e===mm||e===P9||typeof e=="object"&&e!==null&&(e.$$typeof===gm||e.$$typeof===hm||e.$$typeof===um||e.$$typeof===dm||e.$$typeof===pm||e.$$typeof===O9||e.$$typeof===C9||e.$$typeof===k9||e.$$typeof===$9)};He.typeOf=Wr;XO.exports=He;var j9=XO.exports,ZO=j9,R9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},T9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eC={};eC[ZO.ForwardRef]=R9;eC[ZO.Memo]=T9;var I9=!0;function D9(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):n+=o+" "}),n}var N9=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||I9===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},tC=function(t,r,n){N9(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+o:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function A9(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var M9={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},L9=/[A-Z]|^ms/g,z9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rC=function(t){return t.charCodeAt(1)===45},sw=function(t){return t!=null&&typeof t!="boolean"},mh=v9(function(e){return rC(e)?e:e.replace(L9,"-$&").toLowerCase()}),cw=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(z9,function(n,o,a){return Bn={name:o,styles:a,next:Bn},o})}return M9[t]!==1&&!rC(t)&&typeof r=="number"&&r!==0?r+"px":r};function Is(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return Bn={name:r.name,styles:r.styles,next:Bn},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)Bn={name:n.name,styles:n.styles,next:Bn},n=n.next;var o=r.styles+";";return o}return F9(e,t,r)}case"function":{if(e!==void 0){var a=Bn,i=r(e);return Bn=a,Is(e,t,i)}break}}if(t==null)return r;var l=t[r];return l!==void 0?l:r}function F9(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Is(e,t,r[o])+";";else for(var a in r){var i=r[a];if(typeof i!="object")t!=null&&t[i]!==void 0?n+=a+"{"+t[i]+"}":sw(i)&&(n+=mh(a)+":"+cw(a,i)+";");else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var l=0;l<i.length;l++)sw(i[l])&&(n+=mh(a)+":"+cw(a,i[l])+";");else{var c=Is(e,t,i);switch(a){case"animation":case"animationName":{n+=mh(a)+":"+c+";";break}default:n+=a+"{"+c+"}"}}}return n}var uw=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Bn,_y=function(t,r,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,a="";Bn=void 0;var i=t[0];i==null||i.raw===void 0?(o=!1,a+=Is(n,r,i)):a+=i[0];for(var l=1;l<t.length;l++)a+=Is(n,r,t[l]),o&&(a+=i[l]);uw.lastIndex=0;for(var c="",u;(u=uw.exec(a))!==null;)c+="-"+u[1];var d=A9(a)+c;return{name:d,styles:a,next:Bn}},V9=js["useInsertionEffect"]?js["useInsertionEffect"]:!1,dw=V9||f.useLayoutEffect,nC=f.createContext(typeof HTMLElement<"u"?YO({key:"css"}):null);nC.Provider;var B9=function(t){return f.forwardRef(function(r,n){var o=f.useContext(nC);return t(r,o,n)})},kg=f.createContext({}),U9=function(t,r){if(typeof r=="function"){var n=r(t);return n}return et({},t,r)},W9=iw(function(e){return iw(function(t){return U9(e,t)})}),H9=function(t){var r=f.useContext(kg);return t.theme!==r&&(r=W9(r)(t.theme)),f.createElement(kg.Provider,{value:r},t.children)},ic=B9(function(e,t){var r=e.styles,n=_y([r],void 0,f.useContext(kg)),o=f.useRef();return dw(function(){var a=t.key+"-global",i=new t.sheet.constructor({key:a,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+a+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",a),i.hydrate([c])),o.current=[i,l],function(){i.flush()}},[t]),dw(function(){var a=o.current,i=a[0],l=a[1];if(l){a[1]=!1;return}if(n.next!==void 0&&tC(t,n.next,!0),i.tags.length){var c=i.tags[i.tags.length-1].nextElementSibling;i.before=c,i.flush()}t.insert("",n,i,!1)},[t,n.name]),null});function q9(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return _y(t)}var G9=Object.defineProperty,Q9=Object.defineProperties,K9=Object.getOwnPropertyDescriptors,fw=Object.getOwnPropertySymbols,Y9=Object.prototype.hasOwnProperty,X9=Object.prototype.propertyIsEnumerable,pw=(e,t,r)=>t in e?G9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J9=(e,t)=>{for(var r in t||(t={}))Y9.call(t,r)&&pw(e,r,t[r]);if(fw)for(var r of fw(t))X9.call(t,r)&&pw(e,r,t[r]);return e},Z9=(e,t)=>Q9(e,K9(t));function eM({theme:e}){return s.createElement(ic,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:Z9(J9({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function Ll(e,t,r,n=P){Object.keys(t).forEach(o=>{e[`--mantine-${r}-${o}`]=n(t[o])})}function tM({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--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}`};Ll(t,e.shadows,"shadow"),Ll(t,e.fontSizes,"font-size"),Ll(t,e.radius,"radius"),Ll(t,e.spacing,"spacing"),Ll(t,e.breakpoints,"breakpoints",sr),Object.keys(e.colors).forEach(n=>{e.colors[n].forEach((o,a)=>{t[`--mantine-color-${n}-${a}`]=o})});const r=e.headings.sizes;return Object.keys(r).forEach(n=>{t[`--mantine-${n}-font-size`]=r[n].fontSize,t[`--mantine-${n}-line-height`]=`${r[n].lineHeight}`}),s.createElement(ic,{styles:{":root":t}})}var rM=Object.defineProperty,nM=Object.defineProperties,oM=Object.getOwnPropertyDescriptors,mw=Object.getOwnPropertySymbols,aM=Object.prototype.hasOwnProperty,iM=Object.prototype.propertyIsEnumerable,hw=(e,t,r)=>t in e?rM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nn=(e,t)=>{for(var r in t||(t={}))aM.call(t,r)&&hw(e,r,t[r]);if(mw)for(var r of mw(t))iM.call(t,r)&&hw(e,r,t[r]);return e},hh=(e,t)=>nM(e,oM(t));function lM(e,t){var r;if(!t)return e;const n=Object.keys(e).reduce((o,a)=>{if(a==="headings"&&t.headings){const i=t.headings.sizes?Object.keys(e.headings.sizes).reduce((l,c)=>(l[c]=Nn(Nn({},e.headings.sizes[c]),t.headings.sizes[c]),l),{}):e.headings.sizes;return hh(Nn({},o),{headings:hh(Nn(Nn({},e.headings),t.headings),{sizes:i})})}if(a==="breakpoints"&&t.breakpoints){const i=Nn(Nn({},e.breakpoints),t.breakpoints);return hh(Nn({},o),{breakpoints:Object.fromEntries(Object.entries(i).sort((l,c)=>ln(l[1])-ln(c[1])))})}return o[a]=typeof t[a]=="object"?Nn(Nn({},e[a]),t[a]):typeof t[a]=="number"||typeof t[a]=="boolean"||typeof t[a]=="function"?t[a]:t[a]||e[a],o},{});if(t!=null&&t.fontFamily&&!((r=t==null?void 0:t.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=t.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function sM(e,t){return VO(lM(e,t))}function oC(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}const cM={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${P(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function uM(){return s.createElement(ic,{styles:cM})}var dM=Object.defineProperty,gw=Object.getOwnPropertySymbols,fM=Object.prototype.hasOwnProperty,pM=Object.prototype.propertyIsEnumerable,vw=(e,t,r)=>t in e?dM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gs=(e,t)=>{for(var r in t||(t={}))fM.call(t,r)&&vw(e,r,t[r]);if(gw)for(var r of gw(t))pM.call(t,r)&&vw(e,r,t[r]);return e};const id=f.createContext({theme:my});function or(){var e;return((e=f.useContext(id))==null?void 0:e.theme)||my}function mM(e){const t=or(),r=n=>{var o,a,i,l;return{styles:((o=t.components[n])==null?void 0:o.styles)||{},classNames:((a=t.components[n])==null?void 0:a.classNames)||{},variants:(i=t.components[n])==null?void 0:i.variants,sizes:(l=t.components[n])==null?void 0:l.sizes}};return Array.isArray(e)?e.map(r):[r(e)]}function aC(){var e;return(e=f.useContext(id))==null?void 0:e.emotionCache}function G(e,t,r){var n;const o=or(),a=(n=o.components[e])==null?void 0:n.defaultProps,i=typeof a=="function"?a(o):a;return gs(gs(gs({},t),i),oC(r))}function iC({theme:e,emotionCache:t,withNormalizeCSS:r=!1,withGlobalStyles:n=!1,withCSSVariables:o=!1,inherit:a=!1,children:i}){const l=f.useContext(id),c=sM(my,a?gs(gs({},l.theme),e):e);return s.createElement(H9,{theme:c},s.createElement(id.Provider,{value:{theme:c,emotionCache:t}},r&&s.createElement(uM,null),n&&s.createElement(eM,{theme:c}),o&&s.createElement(tM,{theme:c}),typeof c.globalStyles=="function"&&s.createElement(ic,{styles:c.globalStyles(c)}),i))}iC.displayName="@mantine/core/MantineProvider";const hM={app:100,modal:200,popover:300,overlay:400,max:9999};function Rn(e){return hM[e]}function gM(e,t){const r=f.useRef();return(!r.current||t.length!==r.current.prevDeps.length||r.current.prevDeps.map((n,o)=>n===t[o]).indexOf(!1)>=0)&&(r.current={v:e(),prevDeps:[...t]}),r.current.v}const vM=YO({key:"mantine",prepend:!0});function yM(){return aC()||vM}var wM=Object.defineProperty,yw=Object.getOwnPropertySymbols,bM=Object.prototype.hasOwnProperty,_M=Object.prototype.propertyIsEnumerable,ww=(e,t,r)=>t in e?wM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xM=(e,t)=>{for(var r in t||(t={}))bM.call(t,r)&&ww(e,r,t[r]);if(yw)for(var r of yw(t))_M.call(t,r)&&ww(e,r,t[r]);return e};const gh="ref";function EM(e){let t;if(e.length!==1)return{args:e,ref:t};const[r]=e;if(!(r instanceof Object))return{args:e,ref:t};if(!(gh in r))return{args:e,ref:t};t=r[gh];const n=xM({},r);return delete n[gh],{args:[n],ref:t}}const{cssFactory:SM}=(()=>{function e(r,n,o){const a=[],i=D9(r,a,o);return a.length<2?o:i+n(a)}function t(r){const{cache:n}=r,o=(...i)=>{const{ref:l,args:c}=EM(i),u=_y(c,n.registered);return tC(n,u,!1),`${n.key}-${u.name}${l===void 0?"":` ${l}`}`};return{css:o,cx:(...i)=>e(n.registered,o,MO(i))}}return{cssFactory:t}})();function lC(){const e=yM();return gM(()=>SM({cache:e}),[e])}function PM({cx:e,classes:t,context:r,classNames:n,name:o,cache:a}){const i=r.reduce((l,c)=>(Object.keys(c.classNames).forEach(u=>{typeof l[u]!="string"?l[u]=`${c.classNames[u]}`:l[u]=`${l[u]} ${c.classNames[u]}`}),l),{});return Object.keys(t).reduce((l,c)=>(l[c]=e(t[c],i[c],n!=null&&n[c],Array.isArray(o)?o.filter(Boolean).map(u=>`${(a==null?void 0:a.key)||"mantine"}-${u}-${c}`).join(" "):o?`${(a==null?void 0:a.key)||"mantine"}-${o}-${c}`:null),l),{})}var $M=Object.defineProperty,bw=Object.getOwnPropertySymbols,OM=Object.prototype.hasOwnProperty,CM=Object.prototype.propertyIsEnumerable,_w=(e,t,r)=>t in e?$M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vh=(e,t)=>{for(var r in t||(t={}))OM.call(t,r)&&_w(e,r,t[r]);if(bw)for(var r of bw(t))CM.call(t,r)&&_w(e,r,t[r]);return e};function jg(e,t){return t&&Object.keys(t).forEach(r=>{e[r]?e[r]=vh(vh({},e[r]),t[r]):e[r]=vh({},t[r])}),e}function xw(e,t,r,n){const o=a=>typeof a=="function"?a(t,r||{},n):a||{};return Array.isArray(e)?e.map(a=>o(a.styles)).reduce((a,i)=>jg(a,i),{}):o(e)}function kM({ctx:e,theme:t,params:r,variant:n,size:o}){return e.reduce((a,i)=>(i.variants&&n in i.variants&&jg(a,i.variants[n](t,r,{variant:n,size:o})),i.sizes&&o in i.sizes&&jg(a,i.sizes[o](t,r,{variant:n,size:o})),a),{})}function H(e){const t=typeof e=="function"?e:()=>e;function r(n,o){const a=or(),i=mM(o==null?void 0:o.name),l=aC(),c={variant:o==null?void 0:o.variant,size:o==null?void 0:o.size},{css:u,cx:d}=lC(),p=t(a,n,c),h=xw(o==null?void 0:o.styles,a,n,c),g=xw(i,a,n,c),y=kM({ctx:i,theme:a,params:n,variant:o==null?void 0:o.variant,size:o==null?void 0:o.size}),v=Object.fromEntries(Object.keys(p).map(E=>{const w=d({[u(p[E])]:!(o!=null&&o.unstyled)},u(y[E]),u(g[E]),u(h[E]));return[E,w]}));return{classes:PM({cx:d,classes:v,context:i,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:l}),cx:d,theme:a}}return r}function zt(e){return`___ref-${e||""}`}function sC({styles:e}){const t=or();return s.createElement(ic,{styles:q9(typeof e=="function"?e(t):e)})}var jM=Object.defineProperty,RM=Object.defineProperties,TM=Object.getOwnPropertyDescriptors,Ew=Object.getOwnPropertySymbols,IM=Object.prototype.hasOwnProperty,DM=Object.prototype.propertyIsEnumerable,Sw=(e,t,r)=>t in e?jM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zl=(e,t)=>{for(var r in t||(t={}))IM.call(t,r)&&Sw(e,r,t[r]);if(Ew)for(var r of Ew(t))DM.call(t,r)&&Sw(e,r,t[r]);return e},Fl=(e,t)=>RM(e,TM(t));const Vl={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${P(10)})`},transitionProperty:"transform, opacity"},Vc={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},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(-${P(20)}) 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(${P(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${P(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${P(20)}) 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:Fl(zl({},Vl),{common:{transformOrigin:"center center"}}),"pop-bottom-left":Fl(zl({},Vl),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":Fl(zl({},Vl),{common:{transformOrigin:"bottom right"}}),"pop-top-left":Fl(zl({},Vl),{common:{transformOrigin:"top left"}}),"pop-top-right":Fl(zl({},Vl),{common:{transformOrigin:"top right"}})},Pw=["mousedown","touchstart"];function NM(e,t,r){const n=f.useRef();return f.useEffect(()=>{const o=a=>{const{target:i}=a??{};if(Array.isArray(r)){const l=(i==null?void 0:i.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(i)&&i.tagName!=="HTML";r.every(u=>!!u&&!a.composedPath().includes(u))&&!l&&e()}else n.current&&!n.current.contains(i)&&e()};return(t||Pw).forEach(a=>document.addEventListener(a,o)),()=>{(t||Pw).forEach(a=>document.removeEventListener(a,o))}},[n,e,r]),n}function AM({timeout:e=2e3}={}){const[t,r]=f.useState(null),[n,o]=f.useState(!1),[a,i]=f.useState(null),l=d=>{clearTimeout(a),i(setTimeout(()=>o(!1),e)),o(d)};return{copy:d=>{"clipboard"in navigator?navigator.clipboard.writeText(d).then(()=>l(!0)).catch(p=>r(p)):r(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{o(!1),r(null),clearTimeout(a)},error:t,copied:n}}function MM(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function LM(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function zM(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,o]=f.useState(r?t:LM(e,t)),a=f.useRef();return f.useEffect(()=>{if("matchMedia"in window)return a.current=window.matchMedia(e),o(a.current.matches),MM(a.current,i=>o(i.matches))},[e]),n}const cC=typeof document<"u"?f.useLayoutEffect:f.useEffect;function nn(e,t){const r=f.useRef(!1);f.useEffect(()=>()=>{r.current=!1},[]),f.useEffect(()=>{if(r.current)return e();r.current=!0},t)}function uC({opened:e,shouldReturnFocus:t=!0}){const r=f.useRef(),n=()=>{var o;r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&((o=r.current)==null||o.focus({preventScroll:!0}))};return nn(()=>{let o=-1;const a=i=>{i.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",a),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",a)}},[e,t]),n}const FM=/input|select|textarea|button|object/,dC="a, input, select, textarea, button, object, [tabindex]";function VM(e){return e.style.display==="none"}function BM(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(VM(r))return!1;r=r.parentNode}return!0}function fC(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function Rg(e){const t=e.nodeName.toLowerCase(),r=!Number.isNaN(fC(e));return(FM.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&BM(e)}function pC(e){const t=fC(e);return(Number.isNaN(t)||t>=0)&&Rg(e)}function UM(e){return Array.from(e.querySelectorAll(dC)).filter(pC)}function WM(e,t){const r=UM(e);if(!r.length){t.preventDefault();return}const n=r[t.shiftKey?0:r.length-1],o=e.getRootNode();if(!(n===o.activeElement||e===o.activeElement))return;t.preventDefault();const i=r[t.shiftKey?r.length-1:0];i&&i.focus()}function vm(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function HM(e,t="body > :not(script)"){const r=vm(),n=Array.from(document.querySelectorAll(t)).map(o=>{var a;if((a=o==null?void 0:o.shadowRoot)!=null&&a.contains(e)||o.contains(e))return;const i=o.getAttribute("aria-hidden"),l=o.getAttribute("data-hidden"),c=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",r),i===null||i==="false"?o.setAttribute("aria-hidden","true"):!l&&!c&&o.setAttribute("data-hidden",i),{node:o,ariaHidden:l||null}});return()=>{n.forEach(o=>{!o||r!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}function qM(e=!0){const t=f.useRef(),r=f.useRef(null),n=a=>{let i=a.querySelector("[data-autofocus]");if(!i){const l=Array.from(a.querySelectorAll(dC));i=l.find(pC)||l.find(Rg)||null,!i&&Rg(a)&&(i=a)}i&&i.focus({preventScroll:!0})},o=f.useCallback(a=>{if(e){if(a===null){r.current&&(r.current(),r.current=null);return}r.current=HM(a),t.current!==a&&(a?(setTimeout(()=>{a.getRootNode()&&n(a)}),t.current=a):t.current=null)}},[e]);return f.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));const a=i=>{i.key==="Tab"&&t.current&&WM(t.current,i)};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),r.current&&r.current()}},[e]),o}const GM=e=>(e+1)%1e6;function QM(){const[,e]=f.useReducer(GM,0);return e}const KM=s["useId".toString()]||(()=>{});function YM(){const e=KM();return e?`mantine-${e.replace(/:/g,"")}`:""}function kr(e){const t=YM(),[r,n]=f.useState(t);return cC(()=>{n(vm())},[]),typeof e=="string"?e:typeof window>"u"?t:r}function Tg(e,t,r){f.useEffect(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function mC(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function XM(...e){return t=>{e.forEach(r=>mC(r,t))}}function Pl(...e){return f.useCallback(XM(...e),e)}function Or({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){const[o,a]=f.useState(t!==void 0?t:r),i=l=>{a(l),n==null||n(l)};return e!==void 0?[e,n,!0]:[o,i,!1]}function Ao(e,t){const r=t-e+1;return Array.from({length:r},(n,o)=>o+e)}const Bc="dots";function JM({total:e,siblings:t=1,boundaries:r=1,page:n,initialPage:o=1,onChange:a}){const i=Math.max(Math.trunc(e),0),[l,c]=Or({value:n,onChange:a,defaultValue:o,finalValue:o}),u=v=>{v<=0?c(1):v>i?c(i):c(v)},d=()=>u(l+1),p=()=>u(l-1),h=()=>u(1),g=()=>u(i);return{range:f.useMemo(()=>{if(t*2+3+r*2>=i)return Ao(1,i);const E=Math.max(l-t,r),w=Math.min(l+t,i-r),b=E>r+2,_=w<i-(r+1);if(!b&&_){const x=t*2+r+2;return[...Ao(1,x),Bc,...Ao(i-(r-1),i)]}if(b&&!_){const x=r+1+2*t;return[...Ao(1,r),Bc,...Ao(i-x,i)]}return[...Ao(1,r),Bc,...Ao(E,w),Bc,...Ao(i-r+1,i)]},[i,t,l]),active:l,setPage:u,next:d,previous:p,first:h,last:g}}function ZM({initialValues:e=[],limit:t}){const[{state:r,queue:n},o]=f.useState({state:e.slice(0,t),queue:e.slice(t)});return{state:r,queue:n,add:(...c)=>o(u=>{const d=[...u.state,...u.queue,...c];return{state:d.slice(0,t),queue:d.slice(t)}}),update:c=>o(u=>{const d=c([...u.state,...u.queue]);return{state:d.slice(0,t),queue:d.slice(t)}}),cleanQueue:()=>o(c=>({state:c.state,queue:[]}))}}function ym(e,t){return zM("(prefers-reduced-motion: reduce)",e,t)}const e7=e=>e<.5?2*e*e:-1+(4-2*e)*e,t7=({axis:e,target:t,parent:r,alignment:n,offset:o,isList:a})=>{if(!t||!r&&typeof document>"u")return 0;const i=!!r,c=(r||document.body).getBoundingClientRect(),u=t.getBoundingClientRect(),d=p=>u[p]-c[p];if(e==="y"){const p=d("top");if(p===0)return 0;if(n==="start"){const g=p-o;return g<=u.height*(a?0:1)||!a?g:0}const h=i?c.height:window.innerHeight;if(n==="end"){const g=p+o-h+u.height;return g>=-u.height*(a?0:1)||!a?g:0}return n==="center"?p-h/2+u.height/2:0}if(e==="x"){const p=d("left");if(p===0)return 0;if(n==="start"){const g=p-o;return g<=u.width||!a?g:0}const h=i?c.width:window.innerWidth;if(n==="end"){const g=p+o-h+u.width;return g>=-u.width||!a?g:0}return n==="center"?p-h/2+u.width/2:0}return 0},r7=({axis:e,parent:t})=>{if(!t&&typeof document>"u")return 0;const r=e==="y"?"scrollTop":"scrollLeft";if(t)return t[r];const{body:n,documentElement:o}=document;return n[r]+o[r]},n7=({axis:e,parent:t,distance:r})=>{if(!t&&typeof document>"u")return;const n=e==="y"?"scrollTop":"scrollLeft";if(t)t[n]=r;else{const{body:o,documentElement:a}=document;o[n]=r,a[n]=r}};function o7({duration:e=1250,axis:t="y",onScrollFinish:r,easing:n=e7,offset:o=0,cancelable:a=!0,isList:i=!1}={}){const l=f.useRef(0),c=f.useRef(0),u=f.useRef(!1),d=f.useRef(null),p=f.useRef(null),h=ym(),g=()=>{l.current&&cancelAnimationFrame(l.current)},y=f.useCallback(({alignment:E="start"}={})=>{var w;u.current=!1,l.current&&g();const b=(w=r7({parent:d.current,axis:t}))!=null?w:0,_=t7({parent:d.current,target:p.current,axis:t,alignment:E,offset:o,isList:i})-(d.current?0:b);function x(){c.current===0&&(c.current=performance.now());const $=performance.now()-c.current,O=h||e===0?1:$/e,C=b+_*n(O);n7({parent:d.current,axis:t,distance:C}),!u.current&&O<1?l.current=requestAnimationFrame(x):(typeof r=="function"&&r(),c.current=0,l.current=0,g())}x()},[t,e,n,i,o,r,h]),v=()=>{a&&(u.current=!0)};return Tg("wheel",v,{passive:!0}),Tg("touchmove",v,{passive:!0}),f.useEffect(()=>g,[]),{scrollableRef:d,targetRef:p,scrollIntoView:y,cancel:g}}function a7(e=!1,t){const{onOpen:r,onClose:n}=t||{},[o,a]=f.useState(e),i=f.useCallback(()=>{a(u=>u||(r==null||r(),!0))},[r]),l=f.useCallback(()=>{a(u=>u&&(n==null||n(),!1))},[n]),c=f.useCallback(()=>{o?l():i()},[l,i,o]);return[o,{open:i,close:l,toggle:c}]}function $w(e){return typeof e!="string"?"":e.charAt(0).toUpperCase()+e.slice(1)}var Ow=Object.getOwnPropertySymbols,i7=Object.prototype.hasOwnProperty,l7=Object.prototype.propertyIsEnumerable,s7=(e,t)=>{var r={};for(var n in e)i7.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ow)for(var n of Ow(e))t.indexOf(n)<0&&l7.call(e,n)&&(r[n]=e[n]);return r};function Zn(e){const t=e,{m:r,mx:n,my:o,mt:a,mb:i,ml:l,mr:c,p:u,px:d,py:p,pt:h,pb:g,pl:y,pr:v,bg:E,c:w,opacity:b,ff:_,fz:x,fw:S,lts:$,ta:O,lh:C,fs:T,tt:k,td:I,w:j,miw:N,maw:D,h:z,mih:W,mah:K,bgsz:R,bgp:A,bgr:V,bga:Q,pos:ie,top:Ce,left:ue,bottom:Me,right:Ie,inset:ft,display:rt}=t,nt=s7(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:oC({m:r,mx:n,my:o,mt:a,mb:i,ml:l,mr:c,p:u,px:d,py:p,pt:h,pb:g,pl:y,pr:v,bg:E,c:w,opacity:b,ff:_,fz:x,fw:S,lts:$,ta:O,lh:C,fs:T,tt:k,td:I,w:j,miw:N,maw:D,h:z,mih:W,mah:K,bgsz:R,bgp:A,bgr:V,bga:Q,pos:ie,top:Ce,left:ue,bottom:Me,right:Ie,inset:ft,display:rt}),rest:nt}}function c7(e,t){const r=Object.keys(e).filter(n=>n!=="base").sort((n,o)=>ln(L({size:n,sizes:t.breakpoints}))-ln(L({size:o,sizes:t.breakpoints})));return"base"in e?["base",...r]:r}function u7({value:e,theme:t,getValue:r,property:n}){if(e==null)return;if(typeof e=="object")return c7(e,t).reduce((i,l)=>{if(l==="base"&&e.base!==void 0){const u=r(e.base,t);return Array.isArray(n)?(n.forEach(d=>{i[d]=u}),i):(i[n]=u,i)}const c=r(e[l],t);return Array.isArray(n)?(i[t.fn.largerThan(l)]={},n.forEach(u=>{i[t.fn.largerThan(l)][u]=c}),i):(i[t.fn.largerThan(l)]={[n]:c},i)},{});const o=r(e,t);return Array.isArray(n)?n.reduce((a,i)=>(a[i]=o,a),{}):{[n]:o}}function d7(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function f7(e){return P(e)}function p7(e){return e}function m7(e,t){return L({size:e,sizes:t.fontSizes})}const h7=["-xs","-sm","-md","-lg","-xl"];function g7(e,t){return h7.includes(e)?`calc(${L({size:e.replace("-",""),sizes:t.spacing})} * -1)`:L({size:e,sizes:t.spacing})}const v7={identity:p7,color:d7,size:f7,fontSize:m7,spacing:g7},y7={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"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},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"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",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:"identity",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"}};var w7=Object.defineProperty,Cw=Object.getOwnPropertySymbols,b7=Object.prototype.hasOwnProperty,_7=Object.prototype.propertyIsEnumerable,kw=(e,t,r)=>t in e?w7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jw=(e,t)=>{for(var r in t||(t={}))b7.call(t,r)&&kw(e,r,t[r]);if(Cw)for(var r of Cw(t))_7.call(t,r)&&kw(e,r,t[r]);return e};function Rw(e,t,r=y7){return Object.keys(r).reduce((o,a)=>(a in e&&e[a]!==void 0&&o.push(u7({value:e[a],getValue:v7[r[a].type],property:r[a].property,theme:t})),o),[]).reduce((o,a)=>(Object.keys(a).forEach(i=>{typeof a[i]=="object"&&a[i]!==null&&i in o?o[i]=jw(jw({},o[i]),a[i]):o[i]=a[i]}),o),{})}function Tw(e,t){return typeof e=="function"?e(t):e}function x7(e,t,r){const n=or(),{css:o,cx:a}=lC();return Array.isArray(e)?a(r,o(Rw(t,n)),e.map(i=>o(Tw(i,n)))):a(r,o(Tw(e,n)),o(Rw(t,n)))}var E7=Object.defineProperty,ld=Object.getOwnPropertySymbols,hC=Object.prototype.hasOwnProperty,gC=Object.prototype.propertyIsEnumerable,Iw=(e,t,r)=>t in e?E7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S7=(e,t)=>{for(var r in t||(t={}))hC.call(t,r)&&Iw(e,r,t[r]);if(ld)for(var r of ld(t))gC.call(t,r)&&Iw(e,r,t[r]);return e},P7=(e,t)=>{var r={};for(var n in e)hC.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ld)for(var n of ld(e))t.indexOf(n)<0&&gC.call(e,n)&&(r[n]=e[n]);return r};const vC=f.forwardRef((e,t)=>{var r=e,{className:n,component:o,style:a,sx:i}=r,l=P7(r,["className","component","style","sx"]);const{systemStyles:c,rest:u}=Zn(l),d=o||"div";return s.createElement(d,S7({ref:t,className:x7(i,c,n),style:a},u))});vC.displayName="@mantine/core/Box";const le=vC;var $7=Object.defineProperty,O7=Object.defineProperties,C7=Object.getOwnPropertyDescriptors,Dw=Object.getOwnPropertySymbols,k7=Object.prototype.hasOwnProperty,j7=Object.prototype.propertyIsEnumerable,Nw=(e,t,r)=>t in e?$7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Aw=(e,t)=>{for(var r in t||(t={}))k7.call(t,r)&&Nw(e,r,t[r]);if(Dw)for(var r of Dw(t))j7.call(t,r)&&Nw(e,r,t[r]);return e},R7=(e,t)=>O7(e,C7(t)),T7=H(e=>({root:R7(Aw(Aw({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const I7=T7;var D7=Object.defineProperty,sd=Object.getOwnPropertySymbols,yC=Object.prototype.hasOwnProperty,wC=Object.prototype.propertyIsEnumerable,Mw=(e,t,r)=>t in e?D7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N7=(e,t)=>{for(var r in t||(t={}))yC.call(t,r)&&Mw(e,r,t[r]);if(sd)for(var r of sd(t))wC.call(t,r)&&Mw(e,r,t[r]);return e},A7=(e,t)=>{var r={};for(var n in e)yC.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sd)for(var n of sd(e))t.indexOf(n)<0&&wC.call(e,n)&&(r[n]=e[n]);return r};const bC=f.forwardRef((e,t)=>{const r=G("UnstyledButton",{},e),{className:n,component:o="button",unstyled:a,variant:i}=r,l=A7(r,["className","component","unstyled","variant"]),{classes:c,cx:u}=I7(null,{name:"UnstyledButton",unstyled:a,variant:i});return s.createElement(le,N7({component:o,ref:t,className:u(c.root,n),type:o==="button"?"button":void 0},l))});bC.displayName="@mantine/core/UnstyledButton";const ho=bC;var _C={exports:{}},Hr={},xC={exports:{}},EC={};/**
|
|
65
|
+
* @license React
|
|
66
|
+
* scheduler.production.min.js
|
|
67
|
+
*
|
|
68
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the MIT license found in the
|
|
71
|
+
* LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/(function(e){function t(R,A){var V=R.length;R.push(A);e:for(;0<V;){var Q=V-1>>>1,ie=R[Q];if(0<o(ie,A))R[Q]=A,R[V]=ie,V=Q;else break e}}function r(R){return R.length===0?null:R[0]}function n(R){if(R.length===0)return null;var A=R[0],V=R.pop();if(V!==A){R[0]=V;e:for(var Q=0,ie=R.length,Ce=ie>>>1;Q<Ce;){var ue=2*(Q+1)-1,Me=R[ue],Ie=ue+1,ft=R[Ie];if(0>o(Me,V))Ie<ie&&0>o(ft,Me)?(R[Q]=ft,R[Ie]=V,Q=Ie):(R[Q]=Me,R[ue]=V,Q=ue);else if(Ie<ie&&0>o(ft,V))R[Q]=ft,R[Ie]=V,Q=Ie;else break e}}return A}function o(R,A){var V=R.sortIndex-A.sortIndex;return V!==0?V:R.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,p=null,h=3,g=!1,y=!1,v=!1,E=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(R){for(var A=r(u);A!==null;){if(A.callback===null)n(u);else if(A.startTime<=R)n(u),A.sortIndex=A.expirationTime,t(c,A);else break;A=r(u)}}function x(R){if(v=!1,_(R),!y)if(r(c)!==null)y=!0,W(S);else{var A=r(u);A!==null&&K(x,A.startTime-R)}}function S(R,A){y=!1,v&&(v=!1,w(C),C=-1),g=!0;var V=h;try{for(_(A),p=r(c);p!==null&&(!(p.expirationTime>A)||R&&!I());){var Q=p.callback;if(typeof Q=="function"){p.callback=null,h=p.priorityLevel;var ie=Q(p.expirationTime<=A);A=e.unstable_now(),typeof ie=="function"?p.callback=ie:p===r(c)&&n(c),_(A)}else n(c);p=r(c)}if(p!==null)var Ce=!0;else{var ue=r(u);ue!==null&&K(x,ue.startTime-A),Ce=!1}return Ce}finally{p=null,h=V,g=!1}}var $=!1,O=null,C=-1,T=5,k=-1;function I(){return!(e.unstable_now()-k<T)}function j(){if(O!==null){var R=e.unstable_now();k=R;var A=!0;try{A=O(!0,R)}finally{A?N():($=!1,O=null)}}else $=!1}var N;if(typeof b=="function")N=function(){b(j)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,z=D.port2;D.port1.onmessage=j,N=function(){z.postMessage(null)}}else N=function(){E(j,0)};function W(R){O=R,$||($=!0,N())}function K(R,A){C=E(function(){R(e.unstable_now())},A)}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(R){R.callback=null},e.unstable_continueExecution=function(){y||g||(y=!0,W(S))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(R){switch(h){case 1:case 2:case 3:var A=3;break;default:A=h}var V=h;h=A;try{return R()}finally{h=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,A){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var V=h;h=R;try{return A()}finally{h=V}},e.unstable_scheduleCallback=function(R,A,V){var Q=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?Q+V:Q):V=Q,R){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=V+ie,R={id:d++,callback:A,priorityLevel:R,startTime:V,expirationTime:ie,sortIndex:-1},V>Q?(R.sortIndex=V,t(u,R),r(c)===null&&R===r(u)&&(v?(w(C),C=-1):v=!0,K(x,V-Q))):(R.sortIndex=ie,t(c,R),y||g||(y=!0,W(S))),R},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(R){var A=h;return function(){var V=h;h=A;try{return R.apply(this,arguments)}finally{h=V}}}})(EC);xC.exports=EC;var M7=xC.exports;/**
|
|
73
|
+
* @license React
|
|
74
|
+
* react-dom.production.min.js
|
|
75
|
+
*
|
|
76
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the MIT license found in the
|
|
79
|
+
* LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/var SC=f,Ur=M7;function q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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."}var PC=new Set,Ds={};function ri(e,t){il(e,t),il(e+"Capture",t)}function il(e,t){for(Ds[e]=t,e=0;e<t.length;e++)PC.add(t[e])}var go=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ig=Object.prototype.hasOwnProperty,L7=/^[: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]*$/,Lw={},zw={};function z7(e){return Ig.call(zw,e)?!0:Ig.call(Lw,e)?!1:L7.test(e)?zw[e]=!0:(Lw[e]=!0,!1)}function F7(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function V7(e,t,r,n){if(t===null||typeof t>"u"||F7(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function mr(e,t,r,n,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var Gt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Gt[e]=new mr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Gt[t]=new mr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Gt[e]=new mr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Gt[e]=new mr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Gt[e]=new mr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Gt[e]=new mr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Gt[e]=new mr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Gt[e]=new mr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Gt[e]=new mr(e,5,!1,e.toLowerCase(),null,!1,!1)});var xy=/[\-:]([a-z])/g;function Ey(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(xy,Ey);Gt[t]=new mr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xy,Ey);Gt[t]=new mr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xy,Ey);Gt[t]=new mr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Gt[e]=new mr(e,1,!1,e.toLowerCase(),null,!1,!1)});Gt.xlinkHref=new mr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Gt[e]=new mr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sy(e,t,r,n){var o=Gt.hasOwnProperty(t)?Gt[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(V7(t,r,o,n)&&(r=null),n||o===null?z7(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var $o=SC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Uc=Symbol.for("react.element"),Ti=Symbol.for("react.portal"),Ii=Symbol.for("react.fragment"),Py=Symbol.for("react.strict_mode"),Dg=Symbol.for("react.profiler"),$C=Symbol.for("react.provider"),OC=Symbol.for("react.context"),$y=Symbol.for("react.forward_ref"),Ng=Symbol.for("react.suspense"),Ag=Symbol.for("react.suspense_list"),Oy=Symbol.for("react.memo"),Fo=Symbol.for("react.lazy"),CC=Symbol.for("react.offscreen"),Fw=Symbol.iterator;function Bl(e){return e===null||typeof e!="object"?null:(e=Fw&&e[Fw]||e["@@iterator"],typeof e=="function"?e:null)}var _t=Object.assign,yh;function cs(e){if(yh===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);yh=t&&t[1]||""}return`
|
|
81
|
+
`+yh+e}var wh=!1;function bh(e,t){if(!e||wh)return"";wh=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
82
|
+
`),a=n.stack.split(`
|
|
83
|
+
`),i=o.length-1,l=a.length-1;1<=i&&0<=l&&o[i]!==a[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==a[l]){if(i!==1||l!==1)do if(i--,l--,0>l||o[i]!==a[l]){var c=`
|
|
84
|
+
`+o[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{wh=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?cs(e):""}function B7(e){switch(e.tag){case 5:return cs(e.type);case 16:return cs("Lazy");case 13:return cs("Suspense");case 19:return cs("SuspenseList");case 0:case 2:case 15:return e=bh(e.type,!1),e;case 11:return e=bh(e.type.render,!1),e;case 1:return e=bh(e.type,!0),e;default:return""}}function Mg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ii:return"Fragment";case Ti:return"Portal";case Dg:return"Profiler";case Py:return"StrictMode";case Ng:return"Suspense";case Ag:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case OC:return(e.displayName||"Context")+".Consumer";case $C:return(e._context.displayName||"Context")+".Provider";case $y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Oy:return t=e.displayName||null,t!==null?t:Mg(e.type)||"Memo";case Fo:t=e._payload,e=e._init;try{return Mg(e(t))}catch{}}return null}function U7(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Mg(t);case 8:return t===Py?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ia(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function kC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function W7(e){var t=kC(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){n=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wc(e){e._valueTracker||(e._valueTracker=W7(e))}function jC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=kC(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function cd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Lg(e,t){var r=t.checked;return _t({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Vw(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ia(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function RC(e,t){t=t.checked,t!=null&&Sy(e,"checked",t,!1)}function zg(e,t){RC(e,t);var r=ia(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fg(e,t.type,r):t.hasOwnProperty("defaultValue")&&Fg(e,t.type,ia(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bw(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Fg(e,t,r){(t!=="number"||cd(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var us=Array.isArray;function Ki(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+ia(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Vg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return _t({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Uw(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(q(92));if(us(r)){if(1<r.length)throw Error(q(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:ia(r)}}function TC(e,t){var r=ia(t.value),n=ia(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Ww(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function IC(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Bg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?IC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Hc,DC=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Hc=Hc||document.createElement("div"),Hc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Hc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ns(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var vs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},H7=["Webkit","ms","Moz","O"];Object.keys(vs).forEach(function(e){H7.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vs[t]=vs[e]})});function NC(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||vs.hasOwnProperty(e)&&vs[e]?(""+t).trim():t+"px"}function AC(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=NC(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var q7=_t({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ug(e,t){if(t){if(q7[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function Wg(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Hg=null;function Cy(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qg=null,Yi=null,Xi=null;function Hw(e){if(e=cc(e)){if(typeof qg!="function")throw Error(q(280));var t=e.stateNode;t&&(t=Em(t),qg(e.stateNode,e.type,t))}}function MC(e){Yi?Xi?Xi.push(e):Xi=[e]:Yi=e}function LC(){if(Yi){var e=Yi,t=Xi;if(Xi=Yi=null,Hw(e),t)for(e=0;e<t.length;e++)Hw(t[e])}}function zC(e,t){return e(t)}function FC(){}var _h=!1;function VC(e,t,r){if(_h)return e(t,r);_h=!0;try{return zC(e,t,r)}finally{_h=!1,(Yi!==null||Xi!==null)&&(FC(),LC())}}function As(e,t){var r=e.stateNode;if(r===null)return null;var n=Em(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(q(231,t,typeof r));return r}var Gg=!1;if(go)try{var Ul={};Object.defineProperty(Ul,"passive",{get:function(){Gg=!0}}),window.addEventListener("test",Ul,Ul),window.removeEventListener("test",Ul,Ul)}catch{Gg=!1}function G7(e,t,r,n,o,a,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var ys=!1,ud=null,dd=!1,Qg=null,Q7={onError:function(e){ys=!0,ud=e}};function K7(e,t,r,n,o,a,i,l,c){ys=!1,ud=null,G7.apply(Q7,arguments)}function Y7(e,t,r,n,o,a,i,l,c){if(K7.apply(this,arguments),ys){if(ys){var u=ud;ys=!1,ud=null}else throw Error(q(198));dd||(dd=!0,Qg=u)}}function ni(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function BC(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 qw(e){if(ni(e)!==e)throw Error(q(188))}function X7(e){var t=e.alternate;if(!t){if(t=ni(e),t===null)throw Error(q(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var a=o.alternate;if(a===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===r)return qw(o),e;if(a===n)return qw(o),t;a=a.sibling}throw Error(q(188))}if(r.return!==n.return)r=o,n=a;else{for(var i=!1,l=o.child;l;){if(l===r){i=!0,r=o,n=a;break}if(l===n){i=!0,n=o,r=a;break}l=l.sibling}if(!i){for(l=a.child;l;){if(l===r){i=!0,r=a,n=o;break}if(l===n){i=!0,n=a,r=o;break}l=l.sibling}if(!i)throw Error(q(189))}}if(r.alternate!==n)throw Error(q(190))}if(r.tag!==3)throw Error(q(188));return r.stateNode.current===r?e:t}function UC(e){return e=X7(e),e!==null?WC(e):null}function WC(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=WC(e);if(t!==null)return t;e=e.sibling}return null}var HC=Ur.unstable_scheduleCallback,Gw=Ur.unstable_cancelCallback,J7=Ur.unstable_shouldYield,Z7=Ur.unstable_requestPaint,Ot=Ur.unstable_now,e6=Ur.unstable_getCurrentPriorityLevel,ky=Ur.unstable_ImmediatePriority,qC=Ur.unstable_UserBlockingPriority,fd=Ur.unstable_NormalPriority,t6=Ur.unstable_LowPriority,GC=Ur.unstable_IdlePriority,wm=null,Gn=null;function r6(e){if(Gn&&typeof Gn.onCommitFiberRoot=="function")try{Gn.onCommitFiberRoot(wm,e,void 0,(e.current.flags&128)===128)}catch{}}var En=Math.clz32?Math.clz32:a6,n6=Math.log,o6=Math.LN2;function a6(e){return e>>>=0,e===0?32:31-(n6(e)/o6|0)|0}var qc=64,Gc=4194304;function ds(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pd(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,a=e.pingedLanes,i=r&268435455;if(i!==0){var l=i&~o;l!==0?n=ds(l):(a&=i,a!==0&&(n=ds(a)))}else i=r&~o,i!==0?n=ds(i):a!==0&&(n=ds(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,a=t&-t,o>=a||o===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-En(t),o=1<<r,n|=e[r],t&=~o;return n}function i6(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function l6(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-En(a),l=1<<i,c=o[i];c===-1?(!(l&r)||l&n)&&(o[i]=i6(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}function Kg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function QC(){var e=qc;return qc<<=1,!(qc&4194240)&&(qc=64),e}function xh(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function lc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-En(t),e[t]=r}function s6(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-En(r),a=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~a}}function jy(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-En(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var We=0;function KC(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var YC,Ry,XC,JC,ZC,Yg=!1,Qc=[],Xo=null,Jo=null,Zo=null,Ms=new Map,Ls=new Map,Wo=[],c6="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 submit".split(" ");function Qw(e,t){switch(e){case"focusin":case"focusout":Xo=null;break;case"dragenter":case"dragleave":Jo=null;break;case"mouseover":case"mouseout":Zo=null;break;case"pointerover":case"pointerout":Ms.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ls.delete(t.pointerId)}}function Wl(e,t,r,n,o,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[o]},t!==null&&(t=cc(t),t!==null&&Ry(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function u6(e,t,r,n,o){switch(t){case"focusin":return Xo=Wl(Xo,e,t,r,n,o),!0;case"dragenter":return Jo=Wl(Jo,e,t,r,n,o),!0;case"mouseover":return Zo=Wl(Zo,e,t,r,n,o),!0;case"pointerover":var a=o.pointerId;return Ms.set(a,Wl(Ms.get(a)||null,e,t,r,n,o)),!0;case"gotpointercapture":return a=o.pointerId,Ls.set(a,Wl(Ls.get(a)||null,e,t,r,n,o)),!0}return!1}function e2(e){var t=Da(e.target);if(t!==null){var r=ni(t);if(r!==null){if(t=r.tag,t===13){if(t=BC(r),t!==null){e.blockedOn=t,ZC(e.priority,function(){XC(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Xg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Hg=n,r.target.dispatchEvent(n),Hg=null}else return t=cc(r),t!==null&&Ry(t),e.blockedOn=r,!1;t.shift()}return!0}function Kw(e,t,r){Vu(e)&&r.delete(t)}function d6(){Yg=!1,Xo!==null&&Vu(Xo)&&(Xo=null),Jo!==null&&Vu(Jo)&&(Jo=null),Zo!==null&&Vu(Zo)&&(Zo=null),Ms.forEach(Kw),Ls.forEach(Kw)}function Hl(e,t){e.blockedOn===t&&(e.blockedOn=null,Yg||(Yg=!0,Ur.unstable_scheduleCallback(Ur.unstable_NormalPriority,d6)))}function zs(e){function t(o){return Hl(o,e)}if(0<Qc.length){Hl(Qc[0],e);for(var r=1;r<Qc.length;r++){var n=Qc[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Xo!==null&&Hl(Xo,e),Jo!==null&&Hl(Jo,e),Zo!==null&&Hl(Zo,e),Ms.forEach(t),Ls.forEach(t),r=0;r<Wo.length;r++)n=Wo[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Wo.length&&(r=Wo[0],r.blockedOn===null);)e2(r),r.blockedOn===null&&Wo.shift()}var Ji=$o.ReactCurrentBatchConfig,md=!0;function f6(e,t,r,n){var o=We,a=Ji.transition;Ji.transition=null;try{We=1,Ty(e,t,r,n)}finally{We=o,Ji.transition=a}}function p6(e,t,r,n){var o=We,a=Ji.transition;Ji.transition=null;try{We=4,Ty(e,t,r,n)}finally{We=o,Ji.transition=a}}function Ty(e,t,r,n){if(md){var o=Xg(e,t,r,n);if(o===null)Th(e,t,n,hd,r),Qw(e,n);else if(u6(o,e,t,r,n))n.stopPropagation();else if(Qw(e,n),t&4&&-1<c6.indexOf(e)){for(;o!==null;){var a=cc(o);if(a!==null&&YC(a),a=Xg(e,t,r,n),a===null&&Th(e,t,n,hd,r),a===o)break;o=a}o!==null&&n.stopPropagation()}else Th(e,t,n,null,r)}}var hd=null;function Xg(e,t,r,n){if(hd=null,e=Cy(n),e=Da(e),e!==null)if(t=ni(e),t===null)e=null;else if(r=t.tag,r===13){if(e=BC(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return hd=e,null}function t2(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(e6()){case ky:return 1;case qC:return 4;case fd:case t6:return 16;case GC:return 536870912;default:return 16}default:return 16}}var qo=null,Iy=null,Bu=null;function r2(){if(Bu)return Bu;var e,t=Iy,r=t.length,n,o="value"in qo?qo.value:qo.textContent,a=o.length;for(e=0;e<r&&t[e]===o[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===o[a-n];n++);return Bu=o.slice(e,1<n?1-n:void 0)}function Uu(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 Kc(){return!0}function Yw(){return!1}function qr(e){function t(r,n,o,a,i){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Kc:Yw,this.isPropagationStopped=Yw,this}return _t(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Kc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Kc)},persist:function(){},isPersistent:Kc}),t}var $l={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dy=qr($l),sc=_t({},$l,{view:0,detail:0}),m6=qr(sc),Eh,Sh,ql,bm=_t({},sc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ny,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!==ql&&(ql&&e.type==="mousemove"?(Eh=e.screenX-ql.screenX,Sh=e.screenY-ql.screenY):Sh=Eh=0,ql=e),Eh)},movementY:function(e){return"movementY"in e?e.movementY:Sh}}),Xw=qr(bm),h6=_t({},bm,{dataTransfer:0}),g6=qr(h6),v6=_t({},sc,{relatedTarget:0}),Ph=qr(v6),y6=_t({},$l,{animationName:0,elapsedTime:0,pseudoElement:0}),w6=qr(y6),b6=_t({},$l,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_6=qr(b6),x6=_t({},$l,{data:0}),Jw=qr(x6),E6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},S6={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"},P6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $6(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=P6[e])?!!t[e]:!1}function Ny(){return $6}var O6=_t({},sc,{key:function(e){if(e.key){var t=E6[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Uu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?S6[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ny,charCode:function(e){return e.type==="keypress"?Uu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Uu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),C6=qr(O6),k6=_t({},bm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zw=qr(k6),j6=_t({},sc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ny}),R6=qr(j6),T6=_t({},$l,{propertyName:0,elapsedTime:0,pseudoElement:0}),I6=qr(T6),D6=_t({},bm,{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}),N6=qr(D6),A6=[9,13,27,32],Ay=go&&"CompositionEvent"in window,ws=null;go&&"documentMode"in document&&(ws=document.documentMode);var M6=go&&"TextEvent"in window&&!ws,n2=go&&(!Ay||ws&&8<ws&&11>=ws),eb=String.fromCharCode(32),tb=!1;function o2(e,t){switch(e){case"keyup":return A6.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function a2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Di=!1;function L6(e,t){switch(e){case"compositionend":return a2(t);case"keypress":return t.which!==32?null:(tb=!0,eb);case"textInput":return e=t.data,e===eb&&tb?null:e;default:return null}}function z6(e,t){if(Di)return e==="compositionend"||!Ay&&o2(e,t)?(e=r2(),Bu=Iy=qo=null,Di=!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 n2&&t.locale!=="ko"?null:t.data;default:return null}}var F6={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 rb(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!F6[e.type]:t==="textarea"}function i2(e,t,r,n){MC(n),t=gd(t,"onChange"),0<t.length&&(r=new Dy("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var bs=null,Fs=null;function V6(e){v2(e,0)}function _m(e){var t=Mi(e);if(jC(t))return e}function B6(e,t){if(e==="change")return t}var l2=!1;if(go){var $h;if(go){var Oh="oninput"in document;if(!Oh){var nb=document.createElement("div");nb.setAttribute("oninput","return;"),Oh=typeof nb.oninput=="function"}$h=Oh}else $h=!1;l2=$h&&(!document.documentMode||9<document.documentMode)}function ob(){bs&&(bs.detachEvent("onpropertychange",s2),Fs=bs=null)}function s2(e){if(e.propertyName==="value"&&_m(Fs)){var t=[];i2(t,Fs,e,Cy(e)),VC(V6,t)}}function U6(e,t,r){e==="focusin"?(ob(),bs=t,Fs=r,bs.attachEvent("onpropertychange",s2)):e==="focusout"&&ob()}function W6(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _m(Fs)}function H6(e,t){if(e==="click")return _m(t)}function q6(e,t){if(e==="input"||e==="change")return _m(t)}function G6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $n=typeof Object.is=="function"?Object.is:G6;function Vs(e,t){if($n(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!Ig.call(t,o)||!$n(e[o],t[o]))return!1}return!0}function ab(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ib(e,t){var r=ab(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ab(r)}}function c2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?c2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function u2(){for(var e=window,t=cd();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=cd(e.document)}return t}function My(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")}function Q6(e){var t=u2(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&c2(r.ownerDocument.documentElement,r)){if(n!==null&&My(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,a=Math.min(n.start,o);n=n.end===void 0?a:Math.min(n.end,o),!e.extend&&a>n&&(o=n,n=a,a=o),o=ib(r,a);var i=ib(r,n);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var K6=go&&"documentMode"in document&&11>=document.documentMode,Ni=null,Jg=null,_s=null,Zg=!1;function lb(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Zg||Ni==null||Ni!==cd(n)||(n=Ni,"selectionStart"in n&&My(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),_s&&Vs(_s,n)||(_s=n,n=gd(Jg,"onSelect"),0<n.length&&(t=new Dy("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ni)))}function Yc(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ai={animationend:Yc("Animation","AnimationEnd"),animationiteration:Yc("Animation","AnimationIteration"),animationstart:Yc("Animation","AnimationStart"),transitionend:Yc("Transition","TransitionEnd")},Ch={},d2={};go&&(d2=document.createElement("div").style,"AnimationEvent"in window||(delete Ai.animationend.animation,delete Ai.animationiteration.animation,delete Ai.animationstart.animation),"TransitionEvent"in window||delete Ai.transitionend.transition);function xm(e){if(Ch[e])return Ch[e];if(!Ai[e])return e;var t=Ai[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in d2)return Ch[e]=t[r];return e}var f2=xm("animationend"),p2=xm("animationiteration"),m2=xm("animationstart"),h2=xm("transitionend"),g2=new Map,sb="abort auxClick 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(" ");function fa(e,t){g2.set(e,t),ri(t,[e])}for(var kh=0;kh<sb.length;kh++){var jh=sb[kh],Y6=jh.toLowerCase(),X6=jh[0].toUpperCase()+jh.slice(1);fa(Y6,"on"+X6)}fa(f2,"onAnimationEnd");fa(p2,"onAnimationIteration");fa(m2,"onAnimationStart");fa("dblclick","onDoubleClick");fa("focusin","onFocus");fa("focusout","onBlur");fa(h2,"onTransitionEnd");il("onMouseEnter",["mouseout","mouseover"]);il("onMouseLeave",["mouseout","mouseover"]);il("onPointerEnter",["pointerout","pointerover"]);il("onPointerLeave",["pointerout","pointerover"]);ri("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ri("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ri("onBeforeInput",["compositionend","keypress","textInput","paste"]);ri("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ri("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ri("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fs="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(" "),J6=new Set("cancel close invalid load scroll toggle".split(" ").concat(fs));function cb(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Y7(n,t,void 0,e),e.currentTarget=null}function v2(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var i=n.length-1;0<=i;i--){var l=n[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==a&&o.isPropagationStopped())break e;cb(o,l,u),a=c}else for(i=0;i<n.length;i++){if(l=n[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==a&&o.isPropagationStopped())break e;cb(o,l,u),a=c}}}if(dd)throw e=Qg,dd=!1,Qg=null,e}function ot(e,t){var r=t[ov];r===void 0&&(r=t[ov]=new Set);var n=e+"__bubble";r.has(n)||(y2(t,e,2,!1),r.add(n))}function Rh(e,t,r){var n=0;t&&(n|=4),y2(r,e,n,t)}var Xc="_reactListening"+Math.random().toString(36).slice(2);function Bs(e){if(!e[Xc]){e[Xc]=!0,PC.forEach(function(r){r!=="selectionchange"&&(J6.has(r)||Rh(r,!1,e),Rh(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xc]||(t[Xc]=!0,Rh("selectionchange",!1,t))}}function y2(e,t,r,n){switch(t2(t)){case 1:var o=f6;break;case 4:o=p6;break;default:o=Ty}r=o.bind(null,t,r,e),o=void 0,!Gg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function Th(e,t,r,n,o){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var l=n.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(i===4)for(i=n.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;i=i.return}for(;l!==null;){if(i=Da(l),i===null)return;if(c=i.tag,c===5||c===6){n=a=i;continue e}l=l.parentNode}}n=n.return}VC(function(){var u=a,d=Cy(r),p=[];e:{var h=g2.get(e);if(h!==void 0){var g=Dy,y=e;switch(e){case"keypress":if(Uu(r)===0)break e;case"keydown":case"keyup":g=C6;break;case"focusin":y="focus",g=Ph;break;case"focusout":y="blur",g=Ph;break;case"beforeblur":case"afterblur":g=Ph;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=Xw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=g6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=R6;break;case f2:case p2:case m2:g=w6;break;case h2:g=I6;break;case"scroll":g=m6;break;case"wheel":g=N6;break;case"copy":case"cut":case"paste":g=_6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Zw}var v=(t&4)!==0,E=!v&&e==="scroll",w=v?h!==null?h+"Capture":null:h;v=[];for(var b=u,_;b!==null;){_=b;var x=_.stateNode;if(_.tag===5&&x!==null&&(_=x,w!==null&&(x=As(b,w),x!=null&&v.push(Us(b,x,_)))),E)break;b=b.return}0<v.length&&(h=new g(h,y,null,r,d),p.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",h&&r!==Hg&&(y=r.relatedTarget||r.fromElement)&&(Da(y)||y[vo]))break e;if((g||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,g?(y=r.relatedTarget||r.toElement,g=u,y=y?Da(y):null,y!==null&&(E=ni(y),y!==E||y.tag!==5&&y.tag!==6)&&(y=null)):(g=null,y=u),g!==y)){if(v=Xw,x="onMouseLeave",w="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(v=Zw,x="onPointerLeave",w="onPointerEnter",b="pointer"),E=g==null?h:Mi(g),_=y==null?h:Mi(y),h=new v(x,b+"leave",g,r,d),h.target=E,h.relatedTarget=_,x=null,Da(d)===u&&(v=new v(w,b+"enter",y,r,d),v.target=_,v.relatedTarget=E,x=v),E=x,g&&y)t:{for(v=g,w=y,b=0,_=v;_;_=bi(_))b++;for(_=0,x=w;x;x=bi(x))_++;for(;0<b-_;)v=bi(v),b--;for(;0<_-b;)w=bi(w),_--;for(;b--;){if(v===w||w!==null&&v===w.alternate)break t;v=bi(v),w=bi(w)}v=null}else v=null;g!==null&&ub(p,h,g,v,!1),y!==null&&E!==null&&ub(p,E,y,v,!0)}}e:{if(h=u?Mi(u):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var S=B6;else if(rb(h))if(l2)S=q6;else{S=W6;var $=U6}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(S=H6);if(S&&(S=S(e,u))){i2(p,S,r,d);break e}$&&$(e,h,u),e==="focusout"&&($=h._wrapperState)&&$.controlled&&h.type==="number"&&Fg(h,"number",h.value)}switch($=u?Mi(u):window,e){case"focusin":(rb($)||$.contentEditable==="true")&&(Ni=$,Jg=u,_s=null);break;case"focusout":_s=Jg=Ni=null;break;case"mousedown":Zg=!0;break;case"contextmenu":case"mouseup":case"dragend":Zg=!1,lb(p,r,d);break;case"selectionchange":if(K6)break;case"keydown":case"keyup":lb(p,r,d)}var O;if(Ay)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Di?o2(e,r)&&(C="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&(n2&&r.locale!=="ko"&&(Di||C!=="onCompositionStart"?C==="onCompositionEnd"&&Di&&(O=r2()):(qo=d,Iy="value"in qo?qo.value:qo.textContent,Di=!0)),$=gd(u,C),0<$.length&&(C=new Jw(C,e,null,r,d),p.push({event:C,listeners:$}),O?C.data=O:(O=a2(r),O!==null&&(C.data=O)))),(O=M6?L6(e,r):z6(e,r))&&(u=gd(u,"onBeforeInput"),0<u.length&&(d=new Jw("onBeforeInput","beforeinput",null,r,d),p.push({event:d,listeners:u}),d.data=O))}v2(p,t)})}function Us(e,t,r){return{instance:e,listener:t,currentTarget:r}}function gd(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,a=o.stateNode;o.tag===5&&a!==null&&(o=a,a=As(e,r),a!=null&&n.unshift(Us(e,a,o)),a=As(e,t),a!=null&&n.push(Us(e,a,o))),e=e.return}return n}function bi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ub(e,t,r,n,o){for(var a=t._reactName,i=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,o?(c=As(r,a),c!=null&&i.unshift(Us(r,c,l))):o||(c=As(r,a),c!=null&&i.push(Us(r,c,l)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var Z6=/\r\n?/g,eL=/\u0000|\uFFFD/g;function db(e){return(typeof e=="string"?e:""+e).replace(Z6,`
|
|
85
|
+
`).replace(eL,"")}function Jc(e,t,r){if(t=db(t),db(e)!==t&&r)throw Error(q(425))}function vd(){}var ev=null,tv=null;function rv(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nv=typeof setTimeout=="function"?setTimeout:void 0,tL=typeof clearTimeout=="function"?clearTimeout:void 0,fb=typeof Promise=="function"?Promise:void 0,rL=typeof queueMicrotask=="function"?queueMicrotask:typeof fb<"u"?function(e){return fb.resolve(null).then(e).catch(nL)}:nv;function nL(e){setTimeout(function(){throw e})}function Ih(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),zs(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);zs(t)}function ea(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==="$?")break;if(t==="/$")return null}}return e}function pb(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ol=Math.random().toString(36).slice(2),Wn="__reactFiber$"+Ol,Ws="__reactProps$"+Ol,vo="__reactContainer$"+Ol,ov="__reactEvents$"+Ol,oL="__reactListeners$"+Ol,aL="__reactHandles$"+Ol;function Da(e){var t=e[Wn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[vo]||r[Wn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=pb(e);e!==null;){if(r=e[Wn])return r;e=pb(e)}return t}e=r,r=e.parentNode}return null}function cc(e){return e=e[Wn]||e[vo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Mi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function Em(e){return e[Ws]||null}var av=[],Li=-1;function pa(e){return{current:e}}function at(e){0>Li||(e.current=av[Li],av[Li]=null,Li--)}function Xe(e,t){Li++,av[Li]=e.current,e.current=t}var la={},nr=pa(la),Er=pa(!1),Ua=la;function ll(e,t){var r=e.type.contextTypes;if(!r)return la;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in r)o[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Sr(e){return e=e.childContextTypes,e!=null}function yd(){at(Er),at(nr)}function mb(e,t,r){if(nr.current!==la)throw Error(q(168));Xe(nr,t),Xe(Er,r)}function w2(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(q(108,U7(e)||"Unknown",o));return _t({},r,n)}function wd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||la,Ua=nr.current,Xe(nr,e),Xe(Er,Er.current),!0}function hb(e,t,r){var n=e.stateNode;if(!n)throw Error(q(169));r?(e=w2(e,t,Ua),n.__reactInternalMemoizedMergedChildContext=e,at(Er),at(nr),Xe(nr,e)):at(Er),Xe(Er,r)}var io=null,Sm=!1,Dh=!1;function b2(e){io===null?io=[e]:io.push(e)}function iL(e){Sm=!0,b2(e)}function ma(){if(!Dh&&io!==null){Dh=!0;var e=0,t=We;try{var r=io;for(We=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}io=null,Sm=!1}catch(o){throw io!==null&&(io=io.slice(e+1)),HC(ky,ma),o}finally{We=t,Dh=!1}}return null}var zi=[],Fi=0,bd=null,_d=0,Zr=[],en=0,Wa=null,so=1,co="";function Ca(e,t){zi[Fi++]=_d,zi[Fi++]=bd,bd=e,_d=t}function _2(e,t,r){Zr[en++]=so,Zr[en++]=co,Zr[en++]=Wa,Wa=e;var n=so;e=co;var o=32-En(n)-1;n&=~(1<<o),r+=1;var a=32-En(t)+o;if(30<a){var i=o-o%5;a=(n&(1<<i)-1).toString(32),n>>=i,o-=i,so=1<<32-En(t)+o|r<<o|n,co=a+e}else so=1<<a|r<<o|n,co=e}function Ly(e){e.return!==null&&(Ca(e,1),_2(e,1,0))}function zy(e){for(;e===bd;)bd=zi[--Fi],zi[Fi]=null,_d=zi[--Fi],zi[Fi]=null;for(;e===Wa;)Wa=Zr[--en],Zr[en]=null,co=Zr[--en],Zr[en]=null,so=Zr[--en],Zr[en]=null}var Vr=null,zr=null,ct=!1,_n=null;function x2(e,t){var r=tn(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function gb(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Vr=e,zr=ea(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Vr=e,zr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Wa!==null?{id:so,overflow:co}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=tn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Vr=e,zr=null,!0):!1;default:return!1}}function iv(e){return(e.mode&1)!==0&&(e.flags&128)===0}function lv(e){if(ct){var t=zr;if(t){var r=t;if(!gb(e,t)){if(iv(e))throw Error(q(418));t=ea(r.nextSibling);var n=Vr;t&&gb(e,t)?x2(n,r):(e.flags=e.flags&-4097|2,ct=!1,Vr=e)}}else{if(iv(e))throw Error(q(418));e.flags=e.flags&-4097|2,ct=!1,Vr=e}}}function vb(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Vr=e}function Zc(e){if(e!==Vr)return!1;if(!ct)return vb(e),ct=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!rv(e.type,e.memoizedProps)),t&&(t=zr)){if(iv(e))throw E2(),Error(q(418));for(;t;)x2(e,t),t=ea(t.nextSibling)}if(vb(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){zr=ea(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}zr=null}}else zr=Vr?ea(e.stateNode.nextSibling):null;return!0}function E2(){for(var e=zr;e;)e=ea(e.nextSibling)}function sl(){zr=Vr=null,ct=!1}function Fy(e){_n===null?_n=[e]:_n.push(e)}var lL=$o.ReactCurrentBatchConfig;function yn(e,t){if(e&&e.defaultProps){t=_t({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}var xd=pa(null),Ed=null,Vi=null,Vy=null;function By(){Vy=Vi=Ed=null}function Uy(e){var t=xd.current;at(xd),e._currentValue=t}function sv(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Zi(e,t){Ed=e,Vy=Vi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(_r=!0),e.firstContext=null)}function sn(e){var t=e._currentValue;if(Vy!==e)if(e={context:e,memoizedValue:t,next:null},Vi===null){if(Ed===null)throw Error(q(308));Vi=e,Ed.dependencies={lanes:0,firstContext:e}}else Vi=Vi.next=e;return t}var Na=null;function Wy(e){Na===null?Na=[e]:Na.push(e)}function S2(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,Wy(t)):(r.next=o.next,o.next=r),t.interleaved=r,yo(e,n)}function yo(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Vo=!1;function Hy(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function P2(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ta(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ne&2){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,yo(e,r)}return o=n.interleaved,o===null?(t.next=t,Wy(n)):(t.next=o.next,o.next=t),n.interleaved=t,yo(e,r)}function Wu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,jy(e,r)}}function yb(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?o=a=i:a=a.next=i,r=r.next}while(r!==null);a===null?o=a=t:a=a.next=t}else o=a=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Sd(e,t,r,n){var o=e.updateQueue;Vo=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?a=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(a!==null){var p=o.baseState;i=0,d=u=c=null,l=a;do{var h=l.lane,g=l.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,v=l;switch(h=t,g=r,v.tag){case 1:if(y=v.payload,typeof y=="function"){p=y.call(g,p,h);break e}p=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,h=typeof y=="function"?y.call(g,p,h):y,h==null)break e;p=_t({},p,h);break e;case 2:Vo=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[l]:h.push(l))}else g={eventTime:g,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=g,c=p):d=d.next=g,i|=h;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(1);if(d===null&&(c=p),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else a===null&&(o.shared.lanes=0);qa|=i,e.lanes=i,e.memoizedState=p}}function wb(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(q(191,o));o.call(n)}}}var $2=new SC.Component().refs;function cv(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:_t({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Pm={isMounted:function(e){return(e=e._reactInternals)?ni(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=cr(),o=na(e),a=uo(n,o);a.payload=t,r!=null&&(a.callback=r),t=ta(e,a,o),t!==null&&(Sn(t,e,o,n),Wu(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=cr(),o=na(e),a=uo(n,o);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=ta(e,a,o),t!==null&&(Sn(t,e,o,n),Wu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=cr(),n=na(e),o=uo(r,n);o.tag=2,t!=null&&(o.callback=t),t=ta(e,o,n),t!==null&&(Sn(t,e,n,r),Wu(t,e,n))}};function bb(e,t,r,n,o,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,i):t.prototype&&t.prototype.isPureReactComponent?!Vs(r,n)||!Vs(o,a):!0}function O2(e,t,r){var n=!1,o=la,a=t.contextType;return typeof a=="object"&&a!==null?a=sn(a):(o=Sr(t)?Ua:nr.current,n=t.contextTypes,a=(n=n!=null)?ll(e,o):la),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Pm,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function _b(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Pm.enqueueReplaceState(t,t.state,null)}function uv(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs=$2,Hy(e);var a=t.contextType;typeof a=="object"&&a!==null?o.context=sn(a):(a=Sr(t)?Ua:nr.current,o.context=ll(e,a)),o.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(cv(e,t,a,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Pm.enqueueReplaceState(o,o.state,null),Sd(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Gl(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(q(309));var n=r.stateNode}if(!n)throw Error(q(147,e));var o=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(i){var l=o.refs;l===$2&&(l=o.refs={}),i===null?delete l[a]:l[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(q(284));if(!r._owner)throw Error(q(290,e))}return e}function eu(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xb(e){var t=e._init;return t(e._payload)}function C2(e){function t(w,b){if(e){var _=w.deletions;_===null?(w.deletions=[b],w.flags|=16):_.push(b)}}function r(w,b){if(!e)return null;for(;b!==null;)t(w,b),b=b.sibling;return null}function n(w,b){for(w=new Map;b!==null;)b.key!==null?w.set(b.key,b):w.set(b.index,b),b=b.sibling;return w}function o(w,b){return w=oa(w,b),w.index=0,w.sibling=null,w}function a(w,b,_){return w.index=_,e?(_=w.alternate,_!==null?(_=_.index,_<b?(w.flags|=2,b):_):(w.flags|=2,b)):(w.flags|=1048576,b)}function i(w){return e&&w.alternate===null&&(w.flags|=2),w}function l(w,b,_,x){return b===null||b.tag!==6?(b=Vh(_,w.mode,x),b.return=w,b):(b=o(b,_),b.return=w,b)}function c(w,b,_,x){var S=_.type;return S===Ii?d(w,b,_.props.children,x,_.key):b!==null&&(b.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Fo&&xb(S)===b.type)?(x=o(b,_.props),x.ref=Gl(w,b,_),x.return=w,x):(x=Yu(_.type,_.key,_.props,null,w.mode,x),x.ref=Gl(w,b,_),x.return=w,x)}function u(w,b,_,x){return b===null||b.tag!==4||b.stateNode.containerInfo!==_.containerInfo||b.stateNode.implementation!==_.implementation?(b=Bh(_,w.mode,x),b.return=w,b):(b=o(b,_.children||[]),b.return=w,b)}function d(w,b,_,x,S){return b===null||b.tag!==7?(b=Fa(_,w.mode,x,S),b.return=w,b):(b=o(b,_),b.return=w,b)}function p(w,b,_){if(typeof b=="string"&&b!==""||typeof b=="number")return b=Vh(""+b,w.mode,_),b.return=w,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Uc:return _=Yu(b.type,b.key,b.props,null,w.mode,_),_.ref=Gl(w,null,b),_.return=w,_;case Ti:return b=Bh(b,w.mode,_),b.return=w,b;case Fo:var x=b._init;return p(w,x(b._payload),_)}if(us(b)||Bl(b))return b=Fa(b,w.mode,_,null),b.return=w,b;eu(w,b)}return null}function h(w,b,_,x){var S=b!==null?b.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return S!==null?null:l(w,b,""+_,x);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Uc:return _.key===S?c(w,b,_,x):null;case Ti:return _.key===S?u(w,b,_,x):null;case Fo:return S=_._init,h(w,b,S(_._payload),x)}if(us(_)||Bl(_))return S!==null?null:d(w,b,_,x,null);eu(w,_)}return null}function g(w,b,_,x,S){if(typeof x=="string"&&x!==""||typeof x=="number")return w=w.get(_)||null,l(b,w,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Uc:return w=w.get(x.key===null?_:x.key)||null,c(b,w,x,S);case Ti:return w=w.get(x.key===null?_:x.key)||null,u(b,w,x,S);case Fo:var $=x._init;return g(w,b,_,$(x._payload),S)}if(us(x)||Bl(x))return w=w.get(_)||null,d(b,w,x,S,null);eu(b,x)}return null}function y(w,b,_,x){for(var S=null,$=null,O=b,C=b=0,T=null;O!==null&&C<_.length;C++){O.index>C?(T=O,O=null):T=O.sibling;var k=h(w,O,_[C],x);if(k===null){O===null&&(O=T);break}e&&O&&k.alternate===null&&t(w,O),b=a(k,b,C),$===null?S=k:$.sibling=k,$=k,O=T}if(C===_.length)return r(w,O),ct&&Ca(w,C),S;if(O===null){for(;C<_.length;C++)O=p(w,_[C],x),O!==null&&(b=a(O,b,C),$===null?S=O:$.sibling=O,$=O);return ct&&Ca(w,C),S}for(O=n(w,O);C<_.length;C++)T=g(O,w,C,_[C],x),T!==null&&(e&&T.alternate!==null&&O.delete(T.key===null?C:T.key),b=a(T,b,C),$===null?S=T:$.sibling=T,$=T);return e&&O.forEach(function(I){return t(w,I)}),ct&&Ca(w,C),S}function v(w,b,_,x){var S=Bl(_);if(typeof S!="function")throw Error(q(150));if(_=S.call(_),_==null)throw Error(q(151));for(var $=S=null,O=b,C=b=0,T=null,k=_.next();O!==null&&!k.done;C++,k=_.next()){O.index>C?(T=O,O=null):T=O.sibling;var I=h(w,O,k.value,x);if(I===null){O===null&&(O=T);break}e&&O&&I.alternate===null&&t(w,O),b=a(I,b,C),$===null?S=I:$.sibling=I,$=I,O=T}if(k.done)return r(w,O),ct&&Ca(w,C),S;if(O===null){for(;!k.done;C++,k=_.next())k=p(w,k.value,x),k!==null&&(b=a(k,b,C),$===null?S=k:$.sibling=k,$=k);return ct&&Ca(w,C),S}for(O=n(w,O);!k.done;C++,k=_.next())k=g(O,w,C,k.value,x),k!==null&&(e&&k.alternate!==null&&O.delete(k.key===null?C:k.key),b=a(k,b,C),$===null?S=k:$.sibling=k,$=k);return e&&O.forEach(function(j){return t(w,j)}),ct&&Ca(w,C),S}function E(w,b,_,x){if(typeof _=="object"&&_!==null&&_.type===Ii&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Uc:e:{for(var S=_.key,$=b;$!==null;){if($.key===S){if(S=_.type,S===Ii){if($.tag===7){r(w,$.sibling),b=o($,_.props.children),b.return=w,w=b;break e}}else if($.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Fo&&xb(S)===$.type){r(w,$.sibling),b=o($,_.props),b.ref=Gl(w,$,_),b.return=w,w=b;break e}r(w,$);break}else t(w,$);$=$.sibling}_.type===Ii?(b=Fa(_.props.children,w.mode,x,_.key),b.return=w,w=b):(x=Yu(_.type,_.key,_.props,null,w.mode,x),x.ref=Gl(w,b,_),x.return=w,w=x)}return i(w);case Ti:e:{for($=_.key;b!==null;){if(b.key===$)if(b.tag===4&&b.stateNode.containerInfo===_.containerInfo&&b.stateNode.implementation===_.implementation){r(w,b.sibling),b=o(b,_.children||[]),b.return=w,w=b;break e}else{r(w,b);break}else t(w,b);b=b.sibling}b=Bh(_,w.mode,x),b.return=w,w=b}return i(w);case Fo:return $=_._init,E(w,b,$(_._payload),x)}if(us(_))return y(w,b,_,x);if(Bl(_))return v(w,b,_,x);eu(w,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,b!==null&&b.tag===6?(r(w,b.sibling),b=o(b,_),b.return=w,w=b):(r(w,b),b=Vh(_,w.mode,x),b.return=w,w=b),i(w)):r(w,b)}return E}var cl=C2(!0),k2=C2(!1),uc={},Qn=pa(uc),Hs=pa(uc),qs=pa(uc);function Aa(e){if(e===uc)throw Error(q(174));return e}function qy(e,t){switch(Xe(qs,t),Xe(Hs,e),Xe(Qn,uc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Bg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Bg(t,e)}at(Qn),Xe(Qn,t)}function ul(){at(Qn),at(Hs),at(qs)}function j2(e){Aa(qs.current);var t=Aa(Qn.current),r=Bg(t,e.type);t!==r&&(Xe(Hs,e),Xe(Qn,r))}function Gy(e){Hs.current===e&&(at(Qn),at(Hs))}var wt=pa(0);function Pd(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 Nh=[];function Qy(){for(var e=0;e<Nh.length;e++)Nh[e]._workInProgressVersionPrimary=null;Nh.length=0}var Hu=$o.ReactCurrentDispatcher,Ah=$o.ReactCurrentBatchConfig,Ha=0,bt=null,Dt=null,Mt=null,$d=!1,xs=!1,Gs=0,sL=0;function Kt(){throw Error(q(321))}function Ky(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!$n(e[r],t[r]))return!1;return!0}function Yy(e,t,r,n,o,a){if(Ha=a,bt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hu.current=e===null||e.memoizedState===null?fL:pL,e=r(n,o),xs){a=0;do{if(xs=!1,Gs=0,25<=a)throw Error(q(301));a+=1,Mt=Dt=null,t.updateQueue=null,Hu.current=mL,e=r(n,o)}while(xs)}if(Hu.current=Od,t=Dt!==null&&Dt.next!==null,Ha=0,Mt=Dt=bt=null,$d=!1,t)throw Error(q(300));return e}function Xy(){var e=Gs!==0;return Gs=0,e}function zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?bt.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function cn(){if(Dt===null){var e=bt.alternate;e=e!==null?e.memoizedState:null}else e=Dt.next;var t=Mt===null?bt.memoizedState:Mt.next;if(t!==null)Mt=t,Dt=e;else{if(e===null)throw Error(q(310));Dt=e,e={memoizedState:Dt.memoizedState,baseState:Dt.baseState,baseQueue:Dt.baseQueue,queue:Dt.queue,next:null},Mt===null?bt.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function Qs(e,t){return typeof t=="function"?t(e):t}function Mh(e){var t=cn(),r=t.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=e;var n=Dt,o=n.baseQueue,a=r.pending;if(a!==null){if(o!==null){var i=o.next;o.next=a.next,a.next=i}n.baseQueue=o=a,r.pending=null}if(o!==null){a=o.next,n=n.baseState;var l=i=null,c=null,u=a;do{var d=u.lane;if((Ha&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var p={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=p,i=n):c=c.next=p,bt.lanes|=d,qa|=d}u=u.next}while(u!==null&&u!==a);c===null?i=n:c.next=l,$n(n,t.memoizedState)||(_r=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do a=o.lane,bt.lanes|=a,qa|=a,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Lh(e){var t=cn(),r=t.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,a=t.memoizedState;if(o!==null){r.pending=null;var i=o=o.next;do a=e(a,i.action),i=i.next;while(i!==o);$n(a,t.memoizedState)||(_r=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function R2(){}function T2(e,t){var r=bt,n=cn(),o=t(),a=!$n(n.memoizedState,o);if(a&&(n.memoizedState=o,_r=!0),n=n.queue,Jy(N2.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||Mt!==null&&Mt.memoizedState.tag&1){if(r.flags|=2048,Ks(9,D2.bind(null,r,n,o,t),void 0,null),Ft===null)throw Error(q(349));Ha&30||I2(r,t,o)}return o}function I2(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=bt.updateQueue,t===null?(t={lastEffect:null,stores:null},bt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function D2(e,t,r,n){t.value=r,t.getSnapshot=n,A2(t)&&M2(e)}function N2(e,t,r){return r(function(){A2(t)&&M2(e)})}function A2(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!$n(e,r)}catch{return!0}}function M2(e){var t=yo(e,1);t!==null&&Sn(t,e,1,-1)}function Eb(e){var t=zn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qs,lastRenderedState:e},t.queue=e,e=e.dispatch=dL.bind(null,bt,e),[t.memoizedState,e]}function Ks(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=bt.updateQueue,t===null?(t={lastEffect:null,stores:null},bt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function L2(){return cn().memoizedState}function qu(e,t,r,n){var o=zn();bt.flags|=e,o.memoizedState=Ks(1|t,r,void 0,n===void 0?null:n)}function $m(e,t,r,n){var o=cn();n=n===void 0?null:n;var a=void 0;if(Dt!==null){var i=Dt.memoizedState;if(a=i.destroy,n!==null&&Ky(n,i.deps)){o.memoizedState=Ks(t,r,a,n);return}}bt.flags|=e,o.memoizedState=Ks(1|t,r,a,n)}function Sb(e,t){return qu(8390656,8,e,t)}function Jy(e,t){return $m(2048,8,e,t)}function z2(e,t){return $m(4,2,e,t)}function F2(e,t){return $m(4,4,e,t)}function V2(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function B2(e,t,r){return r=r!=null?r.concat([e]):null,$m(4,4,V2.bind(null,t,e),r)}function Zy(){}function U2(e,t){var r=cn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ky(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function W2(e,t){var r=cn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ky(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function H2(e,t,r){return Ha&21?($n(r,t)||(r=QC(),bt.lanes|=r,qa|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,_r=!0),e.memoizedState=r)}function cL(e,t){var r=We;We=r!==0&&4>r?r:4,e(!0);var n=Ah.transition;Ah.transition={};try{e(!1),t()}finally{We=r,Ah.transition=n}}function q2(){return cn().memoizedState}function uL(e,t,r){var n=na(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},G2(e))Q2(t,r);else if(r=S2(e,t,r,n),r!==null){var o=cr();Sn(r,e,n,o),K2(r,t,n)}}function dL(e,t,r){var n=na(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(G2(e))Q2(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,l=a(i,r);if(o.hasEagerState=!0,o.eagerState=l,$n(l,i)){var c=t.interleaved;c===null?(o.next=o,Wy(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}r=S2(e,t,o,n),r!==null&&(o=cr(),Sn(r,e,n,o),K2(r,t,n))}}function G2(e){var t=e.alternate;return e===bt||t!==null&&t===bt}function Q2(e,t){xs=$d=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function K2(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,jy(e,r)}}var Od={readContext:sn,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useInsertionEffect:Kt,useLayoutEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useMutableSource:Kt,useSyncExternalStore:Kt,useId:Kt,unstable_isNewReconciler:!1},fL={readContext:sn,useCallback:function(e,t){return zn().memoizedState=[e,t===void 0?null:t],e},useContext:sn,useEffect:Sb,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,qu(4194308,4,V2.bind(null,t,e),r)},useLayoutEffect:function(e,t){return qu(4194308,4,e,t)},useInsertionEffect:function(e,t){return qu(4,2,e,t)},useMemo:function(e,t){var r=zn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=zn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=uL.bind(null,bt,e),[n.memoizedState,e]},useRef:function(e){var t=zn();return e={current:e},t.memoizedState=e},useState:Eb,useDebugValue:Zy,useDeferredValue:function(e){return zn().memoizedState=e},useTransition:function(){var e=Eb(!1),t=e[0];return e=cL.bind(null,e[1]),zn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=bt,o=zn();if(ct){if(r===void 0)throw Error(q(407));r=r()}else{if(r=t(),Ft===null)throw Error(q(349));Ha&30||I2(n,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,Sb(N2.bind(null,n,a,e),[e]),n.flags|=2048,Ks(9,D2.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=zn(),t=Ft.identifierPrefix;if(ct){var r=co,n=so;r=(n&~(1<<32-En(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Gs++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=sL++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},pL={readContext:sn,useCallback:U2,useContext:sn,useEffect:Jy,useImperativeHandle:B2,useInsertionEffect:z2,useLayoutEffect:F2,useMemo:W2,useReducer:Mh,useRef:L2,useState:function(){return Mh(Qs)},useDebugValue:Zy,useDeferredValue:function(e){var t=cn();return H2(t,Dt.memoizedState,e)},useTransition:function(){var e=Mh(Qs)[0],t=cn().memoizedState;return[e,t]},useMutableSource:R2,useSyncExternalStore:T2,useId:q2,unstable_isNewReconciler:!1},mL={readContext:sn,useCallback:U2,useContext:sn,useEffect:Jy,useImperativeHandle:B2,useInsertionEffect:z2,useLayoutEffect:F2,useMemo:W2,useReducer:Lh,useRef:L2,useState:function(){return Lh(Qs)},useDebugValue:Zy,useDeferredValue:function(e){var t=cn();return Dt===null?t.memoizedState=e:H2(t,Dt.memoizedState,e)},useTransition:function(){var e=Lh(Qs)[0],t=cn().memoizedState;return[e,t]},useMutableSource:R2,useSyncExternalStore:T2,useId:q2,unstable_isNewReconciler:!1};function dl(e,t){try{var r="",n=t;do r+=B7(n),n=n.return;while(n);var o=r}catch(a){o=`
|
|
86
|
+
Error generating stack: `+a.message+`
|
|
87
|
+
`+a.stack}return{value:e,source:t,stack:o,digest:null}}function zh(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function dv(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var hL=typeof WeakMap=="function"?WeakMap:Map;function Y2(e,t,r){r=uo(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){kd||(kd=!0,_v=n),dv(e,t)},r}function X2(e,t,r){r=uo(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){dv(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){dv(e,t),typeof n!="function"&&(ra===null?ra=new Set([this]):ra.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function Pb(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new hL;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=kL.bind(null,e,t,r),t.then(e,e))}function $b(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ob(e,t,r,n,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=uo(-1,1),t.tag=2,ta(r,t,1))),r.lanes|=1),e)}var gL=$o.ReactCurrentOwner,_r=!1;function lr(e,t,r,n){t.child=e===null?k2(t,null,r,n):cl(t,e.child,r,n)}function Cb(e,t,r,n,o){r=r.render;var a=t.ref;return Zi(t,o),n=Yy(e,t,r,n,a,o),r=Xy(),e!==null&&!_r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,wo(e,t,o)):(ct&&r&&Ly(t),t.flags|=1,lr(e,t,n,o),t.child)}function kb(e,t,r,n,o){if(e===null){var a=r.type;return typeof a=="function"&&!l0(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,J2(e,t,a,n,o)):(e=Yu(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&o)){var i=a.memoizedProps;if(r=r.compare,r=r!==null?r:Vs,r(i,n)&&e.ref===t.ref)return wo(e,t,o)}return t.flags|=1,e=oa(a,n),e.ref=t.ref,e.return=t,t.child=e}function J2(e,t,r,n,o){if(e!==null){var a=e.memoizedProps;if(Vs(a,n)&&e.ref===t.ref)if(_r=!1,t.pendingProps=n=a,(e.lanes&o)!==0)e.flags&131072&&(_r=!0);else return t.lanes=e.lanes,wo(e,t,o)}return fv(e,t,r,n,o)}function Z2(e,t,r){var n=t.pendingProps,o=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xe(Ui,Mr),Mr|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Xe(Ui,Mr),Mr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Xe(Ui,Mr),Mr|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Xe(Ui,Mr),Mr|=n;return lr(e,t,o,r),t.child}function ek(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function fv(e,t,r,n,o){var a=Sr(r)?Ua:nr.current;return a=ll(t,a),Zi(t,o),r=Yy(e,t,r,n,a,o),n=Xy(),e!==null&&!_r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,wo(e,t,o)):(ct&&n&&Ly(t),t.flags|=1,lr(e,t,r,o),t.child)}function jb(e,t,r,n,o){if(Sr(r)){var a=!0;wd(t)}else a=!1;if(Zi(t,o),t.stateNode===null)Gu(e,t),O2(t,r,n),uv(t,r,n,o),n=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=sn(u):(u=Sr(r)?Ua:nr.current,u=ll(t,u));var d=r.getDerivedStateFromProps,p=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";p||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==n||c!==u)&&_b(t,i,n,u),Vo=!1;var h=t.memoizedState;i.state=h,Sd(t,n,i,o),c=t.memoizedState,l!==n||h!==c||Er.current||Vo?(typeof d=="function"&&(cv(t,r,d,n),c=t.memoizedState),(l=Vo||bb(t,r,l,n,h,c,u))?(p||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),i.props=n,i.state=c,i.context=u,n=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,P2(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:yn(t.type,l),i.props=u,p=t.pendingProps,h=i.context,c=r.contextType,typeof c=="object"&&c!==null?c=sn(c):(c=Sr(r)?Ua:nr.current,c=ll(t,c));var g=r.getDerivedStateFromProps;(d=typeof g=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==p||h!==c)&&_b(t,i,n,c),Vo=!1,h=t.memoizedState,i.state=h,Sd(t,n,i,o);var y=t.memoizedState;l!==p||h!==y||Er.current||Vo?(typeof g=="function"&&(cv(t,r,g,n),y=t.memoizedState),(u=Vo||bb(t,r,u,n,h,y,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,y,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,y,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),i.props=n,i.state=y,i.context=c,n=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return pv(e,t,r,n,a,o)}function pv(e,t,r,n,o,a){ek(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return o&&hb(t,r,!1),wo(e,t,a);n=t.stateNode,gL.current=t;var l=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=cl(t,e.child,null,a),t.child=cl(t,null,l,a)):lr(e,t,l,a),t.memoizedState=n.state,o&&hb(t,r,!0),t.child}function tk(e){var t=e.stateNode;t.pendingContext?mb(e,t.pendingContext,t.pendingContext!==t.context):t.context&&mb(e,t.context,!1),qy(e,t.containerInfo)}function Rb(e,t,r,n,o){return sl(),Fy(o),t.flags|=256,lr(e,t,r,n),t.child}var mv={dehydrated:null,treeContext:null,retryLane:0};function hv(e){return{baseLanes:e,cachePool:null,transitions:null}}function rk(e,t,r){var n=t.pendingProps,o=wt.current,a=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Xe(wt,o&1),e===null)return lv(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,a?(n=t.mode,a=t.child,i={mode:"hidden",children:i},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=i):a=km(i,n,0,null),e=Fa(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=hv(r),t.memoizedState=mv,e):e0(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return vL(e,t,i,n,l,o,r);if(a){a=n.fallback,i=t.mode,o=e.child,l=o.sibling;var c={mode:"hidden",children:n.children};return!(i&1)&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=oa(o,c),n.subtreeFlags=o.subtreeFlags&14680064),l!==null?a=oa(l,a):(a=Fa(a,i,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,i=e.child.memoizedState,i=i===null?hv(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=mv,n}return a=e.child,e=a.sibling,n=oa(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function e0(e,t){return t=km({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function tu(e,t,r,n){return n!==null&&Fy(n),cl(t,e.child,null,r),e=e0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vL(e,t,r,n,o,a,i){if(r)return t.flags&256?(t.flags&=-257,n=zh(Error(q(422))),tu(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,o=t.mode,n=km({mode:"visible",children:n.children},o,0,null),a=Fa(a,o,i,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&cl(t,e.child,null,i),t.child.memoizedState=hv(i),t.memoizedState=mv,a);if(!(t.mode&1))return tu(e,t,i,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var l=n.dgst;return n=l,a=Error(q(419)),n=zh(a,n,void 0),tu(e,t,i,n)}if(l=(i&e.childLanes)!==0,_r||l){if(n=Ft,n!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(n.suspendedLanes|i)?0:o,o!==0&&o!==a.retryLane&&(a.retryLane=o,yo(e,o),Sn(n,e,o,-1))}return i0(),n=zh(Error(q(421))),tu(e,t,i,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=jL.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,zr=ea(o.nextSibling),Vr=t,ct=!0,_n=null,e!==null&&(Zr[en++]=so,Zr[en++]=co,Zr[en++]=Wa,so=e.id,co=e.overflow,Wa=t),t=e0(t,n.children),t.flags|=4096,t)}function Tb(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),sv(e.return,t,r)}function Fh(e,t,r,n,o){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=o)}function nk(e,t,r){var n=t.pendingProps,o=n.revealOrder,a=n.tail;if(lr(e,t,n.children,r),n=wt.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tb(e,r,t);else if(e.tag===19)Tb(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Xe(wt,n),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&Pd(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),Fh(t,!1,o,r,a);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Pd(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}Fh(t,!0,r,null,a);break;case"together":Fh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Gu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function wo(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),qa|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,r=oa(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=oa(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function yL(e,t,r){switch(t.tag){case 3:tk(t),sl();break;case 5:j2(t);break;case 1:Sr(t.type)&&wd(t);break;case 4:qy(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Xe(xd,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Xe(wt,wt.current&1),t.flags|=128,null):r&t.child.childLanes?rk(e,t,r):(Xe(wt,wt.current&1),e=wo(e,t,r),e!==null?e.sibling:null);Xe(wt,wt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return nk(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Xe(wt,wt.current),n)break;return null;case 22:case 23:return t.lanes=0,Z2(e,t,r)}return wo(e,t,r)}var ok,gv,ak,ik;ok=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};gv=function(){};ak=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,Aa(Qn.current);var a=null;switch(r){case"input":o=Lg(e,o),n=Lg(e,n),a=[];break;case"select":o=_t({},o,{value:void 0}),n=_t({},n,{value:void 0}),a=[];break;case"textarea":o=Vg(e,o),n=Vg(e,n),a=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=vd)}Ug(r,n);var i;r=null;for(u in o)if(!n.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ds.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var c=n[u];if(l=o!=null?o[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(r||(r={}),r[i]=c[i])}else r||(a||(a=[]),a.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ds.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&ot("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};ik=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ql(e,t){if(!ct)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function wL(e,t,r){var n=t.pendingProps;switch(zy(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yt(t),null;case 1:return Sr(t.type)&&yd(),Yt(t),null;case 3:return n=t.stateNode,ul(),at(Er),at(nr),Qy(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Zc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_n!==null&&(Sv(_n),_n=null))),gv(e,t),Yt(t),null;case 5:Gy(t);var o=Aa(qs.current);if(r=t.type,e!==null&&t.stateNode!=null)ak(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(q(166));return Yt(t),null}if(e=Aa(Qn.current),Zc(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[Wn]=t,n[Ws]=a,e=(t.mode&1)!==0,r){case"dialog":ot("cancel",n),ot("close",n);break;case"iframe":case"object":case"embed":ot("load",n);break;case"video":case"audio":for(o=0;o<fs.length;o++)ot(fs[o],n);break;case"source":ot("error",n);break;case"img":case"image":case"link":ot("error",n),ot("load",n);break;case"details":ot("toggle",n);break;case"input":Vw(n,a),ot("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},ot("invalid",n);break;case"textarea":Uw(n,a),ot("invalid",n)}Ug(r,a),o=null;for(var i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="children"?typeof l=="string"?n.textContent!==l&&(a.suppressHydrationWarning!==!0&&Jc(n.textContent,l,e),o=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Jc(n.textContent,l,e),o=["children",""+l]):Ds.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&ot("scroll",n)}switch(r){case"input":Wc(n),Bw(n,a,!0);break;case"textarea":Wc(n),Ww(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=vd)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=IC(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[Wn]=t,e[Ws]=n,ok(e,t,!1,!1),t.stateNode=e;e:{switch(i=Wg(r,n),r){case"dialog":ot("cancel",e),ot("close",e),o=n;break;case"iframe":case"object":case"embed":ot("load",e),o=n;break;case"video":case"audio":for(o=0;o<fs.length;o++)ot(fs[o],e);o=n;break;case"source":ot("error",e),o=n;break;case"img":case"image":case"link":ot("error",e),ot("load",e),o=n;break;case"details":ot("toggle",e),o=n;break;case"input":Vw(e,n),o=Lg(e,n),ot("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=_t({},n,{value:void 0}),ot("invalid",e);break;case"textarea":Uw(e,n),o=Vg(e,n),ot("invalid",e);break;default:o=n}Ug(r,o),l=o;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?AC(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&DC(e,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Ns(e,c):typeof c=="number"&&Ns(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Ds.hasOwnProperty(a)?c!=null&&a==="onScroll"&&ot("scroll",e):c!=null&&Sy(e,a,c,i))}switch(r){case"input":Wc(e),Bw(e,n,!1);break;case"textarea":Wc(e),Ww(e);break;case"option":n.value!=null&&e.setAttribute("value",""+ia(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?Ki(e,!!n.multiple,a,!1):n.defaultValue!=null&&Ki(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=vd)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Yt(t),null;case 6:if(e&&t.stateNode!=null)ik(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(q(166));if(r=Aa(qs.current),Aa(Qn.current),Zc(t)){if(n=t.stateNode,r=t.memoizedProps,n[Wn]=t,(a=n.nodeValue!==r)&&(e=Vr,e!==null))switch(e.tag){case 3:Jc(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Jc(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Wn]=t,t.stateNode=n}return Yt(t),null;case 13:if(at(wt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ct&&zr!==null&&t.mode&1&&!(t.flags&128))E2(),sl(),t.flags|=98560,a=!1;else if(a=Zc(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(q(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(q(317));a[Wn]=t}else sl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Yt(t),a=!1}else _n!==null&&(Sv(_n),_n=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||wt.current&1?Nt===0&&(Nt=3):i0())),t.updateQueue!==null&&(t.flags|=4),Yt(t),null);case 4:return ul(),gv(e,t),e===null&&Bs(t.stateNode.containerInfo),Yt(t),null;case 10:return Uy(t.type._context),Yt(t),null;case 17:return Sr(t.type)&&yd(),Yt(t),null;case 19:if(at(wt),a=t.memoizedState,a===null)return Yt(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)Ql(a,!1);else{if(Nt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Pd(e),i!==null){for(t.flags|=128,Ql(a,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,i=a.alternate,i===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Xe(wt,wt.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ot()>fl&&(t.flags|=128,n=!0,Ql(a,!1),t.lanes=4194304)}else{if(!n)if(e=Pd(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ql(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!ct)return Yt(t),null}else 2*Ot()-a.renderingStartTime>fl&&r!==1073741824&&(t.flags|=128,n=!0,Ql(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(r=a.last,r!==null?r.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ot(),t.sibling=null,r=wt.current,Xe(wt,n?r&1|2:r&1),t):(Yt(t),null);case 22:case 23:return a0(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Mr&1073741824&&(Yt(t),t.subtreeFlags&6&&(t.flags|=8192)):Yt(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function bL(e,t){switch(zy(t),t.tag){case 1:return Sr(t.type)&&yd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ul(),at(Er),at(nr),Qy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Gy(t),null;case 13:if(at(wt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));sl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return at(wt),null;case 4:return ul(),null;case 10:return Uy(t.type._context),null;case 22:case 23:return a0(),null;case 24:return null;default:return null}}var ru=!1,Zt=!1,_L=typeof WeakSet=="function"?WeakSet:Set,re=null;function Bi(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){xt(e,t,n)}else r.current=null}function vv(e,t,r){try{r()}catch(n){xt(e,t,n)}}var Ib=!1;function xL(e,t){if(ev=md,e=u2(),My(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var i=0,l=-1,c=-1,u=0,d=0,p=e,h=null;t:for(;;){for(var g;p!==r||o!==0&&p.nodeType!==3||(l=i+o),p!==a||n!==0&&p.nodeType!==3||(c=i+n),p.nodeType===3&&(i+=p.nodeValue.length),(g=p.firstChild)!==null;)h=p,p=g;for(;;){if(p===e)break t;if(h===r&&++u===o&&(l=i),h===a&&++d===n&&(c=i),(g=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=g}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(tv={focusedElem:e,selectionRange:r},md=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,E=y.memoizedState,w=t.stateNode,b=w.getSnapshotBeforeUpdate(t.elementType===t.type?v:yn(t.type,v),E);w.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(x){xt(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return y=Ib,Ib=!1,y}function Es(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,a!==void 0&&vv(t,r,a)}o=o.next}while(o!==n)}}function Om(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function yv(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function lk(e){var t=e.alternate;t!==null&&(e.alternate=null,lk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wn],delete t[Ws],delete t[ov],delete t[oL],delete t[aL])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sk(e){return e.tag===5||e.tag===3||e.tag===4}function Db(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sk(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wv(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=vd));else if(n!==4&&(e=e.child,e!==null))for(wv(e,t,r),e=e.sibling;e!==null;)wv(e,t,r),e=e.sibling}function bv(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(bv(e,t,r),e=e.sibling;e!==null;)bv(e,t,r),e=e.sibling}var Wt=null,wn=!1;function Mo(e,t,r){for(r=r.child;r!==null;)ck(e,t,r),r=r.sibling}function ck(e,t,r){if(Gn&&typeof Gn.onCommitFiberUnmount=="function")try{Gn.onCommitFiberUnmount(wm,r)}catch{}switch(r.tag){case 5:Zt||Bi(r,t);case 6:var n=Wt,o=wn;Wt=null,Mo(e,t,r),Wt=n,wn=o,Wt!==null&&(wn?(e=Wt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Wt.removeChild(r.stateNode));break;case 18:Wt!==null&&(wn?(e=Wt,r=r.stateNode,e.nodeType===8?Ih(e.parentNode,r):e.nodeType===1&&Ih(e,r),zs(e)):Ih(Wt,r.stateNode));break;case 4:n=Wt,o=wn,Wt=r.stateNode.containerInfo,wn=!0,Mo(e,t,r),Wt=n,wn=o;break;case 0:case 11:case 14:case 15:if(!Zt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var a=o,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&vv(r,t,i),o=o.next}while(o!==n)}Mo(e,t,r);break;case 1:if(!Zt&&(Bi(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){xt(r,t,l)}Mo(e,t,r);break;case 21:Mo(e,t,r);break;case 22:r.mode&1?(Zt=(n=Zt)||r.memoizedState!==null,Mo(e,t,r),Zt=n):Mo(e,t,r);break;default:Mo(e,t,r)}}function Nb(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new _L),t.forEach(function(n){var o=RL.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function gn(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var a=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:Wt=l.stateNode,wn=!1;break e;case 3:Wt=l.stateNode.containerInfo,wn=!0;break e;case 4:Wt=l.stateNode.containerInfo,wn=!0;break e}l=l.return}if(Wt===null)throw Error(q(160));ck(a,i,o),Wt=null,wn=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(u){xt(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)uk(t,e),t=t.sibling}function uk(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gn(t,e),An(e),n&4){try{Es(3,e,e.return),Om(3,e)}catch(v){xt(e,e.return,v)}try{Es(5,e,e.return)}catch(v){xt(e,e.return,v)}}break;case 1:gn(t,e),An(e),n&512&&r!==null&&Bi(r,r.return);break;case 5:if(gn(t,e),An(e),n&512&&r!==null&&Bi(r,r.return),e.flags&32){var o=e.stateNode;try{Ns(o,"")}catch(v){xt(e,e.return,v)}}if(n&4&&(o=e.stateNode,o!=null)){var a=e.memoizedProps,i=r!==null?r.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&RC(o,a),Wg(l,i);var u=Wg(l,a);for(i=0;i<c.length;i+=2){var d=c[i],p=c[i+1];d==="style"?AC(o,p):d==="dangerouslySetInnerHTML"?DC(o,p):d==="children"?Ns(o,p):Sy(o,d,p,u)}switch(l){case"input":zg(o,a);break;case"textarea":TC(o,a);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var g=a.value;g!=null?Ki(o,!!a.multiple,g,!1):h!==!!a.multiple&&(a.defaultValue!=null?Ki(o,!!a.multiple,a.defaultValue,!0):Ki(o,!!a.multiple,a.multiple?[]:"",!1))}o[Ws]=a}catch(v){xt(e,e.return,v)}}break;case 6:if(gn(t,e),An(e),n&4){if(e.stateNode===null)throw Error(q(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(v){xt(e,e.return,v)}}break;case 3:if(gn(t,e),An(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{zs(t.containerInfo)}catch(v){xt(e,e.return,v)}break;case 4:gn(t,e),An(e);break;case 13:gn(t,e),An(e),o=e.child,o.flags&8192&&(a=o.memoizedState!==null,o.stateNode.isHidden=a,!a||o.alternate!==null&&o.alternate.memoizedState!==null||(n0=Ot())),n&4&&Nb(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Zt=(u=Zt)||d,gn(t,e),Zt=u):gn(t,e),An(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(re=e,d=e.child;d!==null;){for(p=re=d;re!==null;){switch(h=re,g=h.child,h.tag){case 0:case 11:case 14:case 15:Es(4,h,h.return);break;case 1:Bi(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(v){xt(n,r,v)}}break;case 5:Bi(h,h.return);break;case 22:if(h.memoizedState!==null){Mb(p);continue}}g!==null?(g.return=h,re=g):Mb(p)}d=d.sibling}e:for(d=null,p=e;;){if(p.tag===5){if(d===null){d=p;try{o=p.stateNode,u?(a=o.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=p.stateNode,c=p.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=NC("display",i))}catch(v){xt(e,e.return,v)}}}else if(p.tag===6){if(d===null)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(v){xt(e,e.return,v)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;d===p&&(d=null),p=p.return}d===p&&(d=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:gn(t,e),An(e),n&4&&Nb(e);break;case 21:break;default:gn(t,e),An(e)}}function An(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(sk(r)){var n=r;break e}r=r.return}throw Error(q(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(Ns(o,""),n.flags&=-33);var a=Db(e);bv(e,a,o);break;case 3:case 4:var i=n.stateNode.containerInfo,l=Db(e);wv(e,l,i);break;default:throw Error(q(161))}}catch(c){xt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function EL(e,t,r){re=e,dk(e)}function dk(e,t,r){for(var n=(e.mode&1)!==0;re!==null;){var o=re,a=o.child;if(o.tag===22&&n){var i=o.memoizedState!==null||ru;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||Zt;l=ru;var u=Zt;if(ru=i,(Zt=c)&&!u)for(re=o;re!==null;)i=re,c=i.child,i.tag===22&&i.memoizedState!==null?Lb(o):c!==null?(c.return=i,re=c):Lb(o);for(;a!==null;)re=a,dk(a),a=a.sibling;re=o,ru=l,Zt=u}Ab(e)}else o.subtreeFlags&8772&&a!==null?(a.return=o,re=a):Ab(e)}}function Ab(e){for(;re!==null;){var t=re;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Zt||Om(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Zt)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:yn(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&wb(t,a,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}wb(t,i,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var p=d.dehydrated;p!==null&&zs(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}Zt||t.flags&512&&yv(t)}catch(h){xt(t,t.return,h)}}if(t===e){re=null;break}if(r=t.sibling,r!==null){r.return=t.return,re=r;break}re=t.return}}function Mb(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var r=t.sibling;if(r!==null){r.return=t.return,re=r;break}re=t.return}}function Lb(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Om(4,t)}catch(c){xt(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(c){xt(t,o,c)}}var a=t.return;try{yv(t)}catch(c){xt(t,a,c)}break;case 5:var i=t.return;try{yv(t)}catch(c){xt(t,i,c)}}}catch(c){xt(t,t.return,c)}if(t===e){re=null;break}var l=t.sibling;if(l!==null){l.return=t.return,re=l;break}re=t.return}}var SL=Math.ceil,Cd=$o.ReactCurrentDispatcher,t0=$o.ReactCurrentOwner,on=$o.ReactCurrentBatchConfig,Ne=0,Ft=null,Rt=null,qt=0,Mr=0,Ui=pa(0),Nt=0,Ys=null,qa=0,Cm=0,r0=0,Ss=null,br=null,n0=0,fl=1/0,ao=null,kd=!1,_v=null,ra=null,nu=!1,Go=null,jd=0,Ps=0,xv=null,Qu=-1,Ku=0;function cr(){return Ne&6?Ot():Qu!==-1?Qu:Qu=Ot()}function na(e){return e.mode&1?Ne&2&&qt!==0?qt&-qt:lL.transition!==null?(Ku===0&&(Ku=QC()),Ku):(e=We,e!==0||(e=window.event,e=e===void 0?16:t2(e.type)),e):1}function Sn(e,t,r,n){if(50<Ps)throw Ps=0,xv=null,Error(q(185));lc(e,r,n),(!(Ne&2)||e!==Ft)&&(e===Ft&&(!(Ne&2)&&(Cm|=r),Nt===4&&Ho(e,qt)),Pr(e,n),r===1&&Ne===0&&!(t.mode&1)&&(fl=Ot()+500,Sm&&ma()))}function Pr(e,t){var r=e.callbackNode;l6(e,t);var n=pd(e,e===Ft?qt:0);if(n===0)r!==null&&Gw(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Gw(r),t===1)e.tag===0?iL(zb.bind(null,e)):b2(zb.bind(null,e)),rL(function(){!(Ne&6)&&ma()}),r=null;else{switch(KC(n)){case 1:r=ky;break;case 4:r=qC;break;case 16:r=fd;break;case 536870912:r=GC;break;default:r=fd}r=wk(r,fk.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function fk(e,t){if(Qu=-1,Ku=0,Ne&6)throw Error(q(327));var r=e.callbackNode;if(el()&&e.callbackNode!==r)return null;var n=pd(e,e===Ft?qt:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Rd(e,n);else{t=n;var o=Ne;Ne|=2;var a=mk();(Ft!==e||qt!==t)&&(ao=null,fl=Ot()+500,za(e,t));do try{OL();break}catch(l){pk(e,l)}while(1);By(),Cd.current=a,Ne=o,Rt!==null?t=0:(Ft=null,qt=0,t=Nt)}if(t!==0){if(t===2&&(o=Kg(e),o!==0&&(n=o,t=Ev(e,o))),t===1)throw r=Ys,za(e,0),Ho(e,n),Pr(e,Ot()),r;if(t===6)Ho(e,n);else{if(o=e.current.alternate,!(n&30)&&!PL(o)&&(t=Rd(e,n),t===2&&(a=Kg(e),a!==0&&(n=a,t=Ev(e,a))),t===1))throw r=Ys,za(e,0),Ho(e,n),Pr(e,Ot()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(q(345));case 2:ka(e,br,ao);break;case 3:if(Ho(e,n),(n&130023424)===n&&(t=n0+500-Ot(),10<t)){if(pd(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){cr(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=nv(ka.bind(null,e,br,ao),t);break}ka(e,br,ao);break;case 4:if(Ho(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var i=31-En(n);a=1<<i,i=t[i],i>o&&(o=i),n&=~a}if(n=o,n=Ot()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*SL(n/1960))-n,10<n){e.timeoutHandle=nv(ka.bind(null,e,br,ao),n);break}ka(e,br,ao);break;case 5:ka(e,br,ao);break;default:throw Error(q(329))}}}return Pr(e,Ot()),e.callbackNode===r?fk.bind(null,e):null}function Ev(e,t){var r=Ss;return e.current.memoizedState.isDehydrated&&(za(e,t).flags|=256),e=Rd(e,t),e!==2&&(t=br,br=r,t!==null&&Sv(t)),e}function Sv(e){br===null?br=e:br.push.apply(br,e)}function PL(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],a=o.getSnapshot;o=o.value;try{if(!$n(a(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Ho(e,t){for(t&=~r0,t&=~Cm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-En(t),n=1<<r;e[r]=-1,t&=~n}}function zb(e){if(Ne&6)throw Error(q(327));el();var t=pd(e,0);if(!(t&1))return Pr(e,Ot()),null;var r=Rd(e,t);if(e.tag!==0&&r===2){var n=Kg(e);n!==0&&(t=n,r=Ev(e,n))}if(r===1)throw r=Ys,za(e,0),Ho(e,t),Pr(e,Ot()),r;if(r===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ka(e,br,ao),Pr(e,Ot()),null}function o0(e,t){var r=Ne;Ne|=1;try{return e(t)}finally{Ne=r,Ne===0&&(fl=Ot()+500,Sm&&ma())}}function Ga(e){Go!==null&&Go.tag===0&&!(Ne&6)&&el();var t=Ne;Ne|=1;var r=on.transition,n=We;try{if(on.transition=null,We=1,e)return e()}finally{We=n,on.transition=r,Ne=t,!(Ne&6)&&ma()}}function a0(){Mr=Ui.current,at(Ui)}function za(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,tL(r)),Rt!==null)for(r=Rt.return;r!==null;){var n=r;switch(zy(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&yd();break;case 3:ul(),at(Er),at(nr),Qy();break;case 5:Gy(n);break;case 4:ul();break;case 13:at(wt);break;case 19:at(wt);break;case 10:Uy(n.type._context);break;case 22:case 23:a0()}r=r.return}if(Ft=e,Rt=e=oa(e.current,null),qt=Mr=t,Nt=0,Ys=null,r0=Cm=qa=0,br=Ss=null,Na!==null){for(t=0;t<Na.length;t++)if(r=Na[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,a=r.pending;if(a!==null){var i=a.next;a.next=o,n.next=i}r.pending=n}Na=null}return e}function pk(e,t){do{var r=Rt;try{if(By(),Hu.current=Od,$d){for(var n=bt.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}$d=!1}if(Ha=0,Mt=Dt=bt=null,xs=!1,Gs=0,t0.current=null,r===null||r.return===null){Nt=1,Ys=t,Rt=null;break}e:{var a=e,i=r.return,l=r,c=t;if(t=qt,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,p=d.tag;if(!(d.mode&1)&&(p===0||p===11||p===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=$b(i);if(g!==null){g.flags&=-257,Ob(g,i,l,a,t),g.mode&1&&Pb(a,u,t),t=g,c=u;var y=t.updateQueue;if(y===null){var v=new Set;v.add(c),t.updateQueue=v}else y.add(c);break e}else{if(!(t&1)){Pb(a,u,t),i0();break e}c=Error(q(426))}}else if(ct&&l.mode&1){var E=$b(i);if(E!==null){!(E.flags&65536)&&(E.flags|=256),Ob(E,i,l,a,t),Fy(dl(c,l));break e}}a=c=dl(c,l),Nt!==4&&(Nt=2),Ss===null?Ss=[a]:Ss.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var w=Y2(a,c,t);yb(a,w);break e;case 1:l=c;var b=a.type,_=a.stateNode;if(!(a.flags&128)&&(typeof b.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(ra===null||!ra.has(_)))){a.flags|=65536,t&=-t,a.lanes|=t;var x=X2(a,l,t);yb(a,x);break e}}a=a.return}while(a!==null)}gk(r)}catch(S){t=S,Rt===r&&r!==null&&(Rt=r=r.return);continue}break}while(1)}function mk(){var e=Cd.current;return Cd.current=Od,e===null?Od:e}function i0(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),Ft===null||!(qa&268435455)&&!(Cm&268435455)||Ho(Ft,qt)}function Rd(e,t){var r=Ne;Ne|=2;var n=mk();(Ft!==e||qt!==t)&&(ao=null,za(e,t));do try{$L();break}catch(o){pk(e,o)}while(1);if(By(),Ne=r,Cd.current=n,Rt!==null)throw Error(q(261));return Ft=null,qt=0,Nt}function $L(){for(;Rt!==null;)hk(Rt)}function OL(){for(;Rt!==null&&!J7();)hk(Rt)}function hk(e){var t=yk(e.alternate,e,Mr);e.memoizedProps=e.pendingProps,t===null?gk(e):Rt=t,t0.current=null}function gk(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=bL(r,t),r!==null){r.flags&=32767,Rt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Nt=6,Rt=null;return}}else if(r=wL(r,t,Mr),r!==null){Rt=r;return}if(t=t.sibling,t!==null){Rt=t;return}Rt=t=e}while(t!==null);Nt===0&&(Nt=5)}function ka(e,t,r){var n=We,o=on.transition;try{on.transition=null,We=1,CL(e,t,r,n)}finally{on.transition=o,We=n}return null}function CL(e,t,r,n){do el();while(Go!==null);if(Ne&6)throw Error(q(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(s6(e,a),e===Ft&&(Rt=Ft=null,qt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||nu||(nu=!0,wk(fd,function(){return el(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=on.transition,on.transition=null;var i=We;We=1;var l=Ne;Ne|=4,t0.current=null,xL(e,r),uk(r,e),Q6(tv),md=!!ev,tv=ev=null,e.current=r,EL(r),Z7(),Ne=l,We=i,on.transition=a}else e.current=r;if(nu&&(nu=!1,Go=e,jd=o),a=e.pendingLanes,a===0&&(ra=null),r6(r.stateNode),Pr(e,Ot()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(kd)throw kd=!1,e=_v,_v=null,e;return jd&1&&e.tag!==0&&el(),a=e.pendingLanes,a&1?e===xv?Ps++:(Ps=0,xv=e):Ps=0,ma(),null}function el(){if(Go!==null){var e=KC(jd),t=on.transition,r=We;try{if(on.transition=null,We=16>e?16:e,Go===null)var n=!1;else{if(e=Go,Go=null,jd=0,Ne&6)throw Error(q(331));var o=Ne;for(Ne|=4,re=e.current;re!==null;){var a=re,i=a.child;if(re.flags&16){var l=a.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(re=u;re!==null;){var d=re;switch(d.tag){case 0:case 11:case 15:Es(8,d,a)}var p=d.child;if(p!==null)p.return=d,re=p;else for(;re!==null;){d=re;var h=d.sibling,g=d.return;if(lk(d),d===u){re=null;break}if(h!==null){h.return=g,re=h;break}re=g}}}var y=a.alternate;if(y!==null){var v=y.child;if(v!==null){y.child=null;do{var E=v.sibling;v.sibling=null,v=E}while(v!==null)}}re=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,re=i;else e:for(;re!==null;){if(a=re,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Es(9,a,a.return)}var w=a.sibling;if(w!==null){w.return=a.return,re=w;break e}re=a.return}}var b=e.current;for(re=b;re!==null;){i=re;var _=i.child;if(i.subtreeFlags&2064&&_!==null)_.return=i,re=_;else e:for(i=b;re!==null;){if(l=re,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Om(9,l)}}catch(S){xt(l,l.return,S)}if(l===i){re=null;break e}var x=l.sibling;if(x!==null){x.return=l.return,re=x;break e}re=l.return}}if(Ne=o,ma(),Gn&&typeof Gn.onPostCommitFiberRoot=="function")try{Gn.onPostCommitFiberRoot(wm,e)}catch{}n=!0}return n}finally{We=r,on.transition=t}}return!1}function Fb(e,t,r){t=dl(r,t),t=Y2(e,t,1),e=ta(e,t,1),t=cr(),e!==null&&(lc(e,1,t),Pr(e,t))}function xt(e,t,r){if(e.tag===3)Fb(e,e,r);else for(;t!==null;){if(t.tag===3){Fb(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ra===null||!ra.has(n))){e=dl(r,e),e=X2(t,e,1),t=ta(t,e,1),e=cr(),t!==null&&(lc(t,1,e),Pr(t,e));break}}t=t.return}}function kL(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=cr(),e.pingedLanes|=e.suspendedLanes&r,Ft===e&&(qt&r)===r&&(Nt===4||Nt===3&&(qt&130023424)===qt&&500>Ot()-n0?za(e,0):r0|=r),Pr(e,t)}function vk(e,t){t===0&&(e.mode&1?(t=Gc,Gc<<=1,!(Gc&130023424)&&(Gc=4194304)):t=1);var r=cr();e=yo(e,t),e!==null&&(lc(e,t,r),Pr(e,r))}function jL(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),vk(e,r)}function RL(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(q(314))}n!==null&&n.delete(t),vk(e,r)}var yk;yk=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Er.current)_r=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return _r=!1,yL(e,t,r);_r=!!(e.flags&131072)}else _r=!1,ct&&t.flags&1048576&&_2(t,_d,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Gu(e,t),e=t.pendingProps;var o=ll(t,nr.current);Zi(t,r),o=Yy(null,t,n,e,o,r);var a=Xy();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Sr(n)?(a=!0,wd(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Hy(t),o.updater=Pm,t.stateNode=o,o._reactInternals=t,uv(t,n,e,r),t=pv(null,t,n,!0,a,r)):(t.tag=0,ct&&a&&Ly(t),lr(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Gu(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=IL(n),e=yn(n,e),o){case 0:t=fv(null,t,n,e,r);break e;case 1:t=jb(null,t,n,e,r);break e;case 11:t=Cb(null,t,n,e,r);break e;case 14:t=kb(null,t,n,yn(n.type,e),r);break e}throw Error(q(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:yn(n,o),fv(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:yn(n,o),jb(e,t,n,o,r);case 3:e:{if(tk(t),e===null)throw Error(q(387));n=t.pendingProps,a=t.memoizedState,o=a.element,P2(e,t),Sd(t,n,null,r);var i=t.memoizedState;if(n=i.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=dl(Error(q(423)),t),t=Rb(e,t,n,r,o);break e}else if(n!==o){o=dl(Error(q(424)),t),t=Rb(e,t,n,r,o);break e}else for(zr=ea(t.stateNode.containerInfo.firstChild),Vr=t,ct=!0,_n=null,r=k2(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(sl(),n===o){t=wo(e,t,r);break e}lr(e,t,n,r)}t=t.child}return t;case 5:return j2(t),e===null&&lv(t),n=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,i=o.children,rv(n,o)?i=null:a!==null&&rv(n,a)&&(t.flags|=32),ek(e,t),lr(e,t,i,r),t.child;case 6:return e===null&&lv(t),null;case 13:return rk(e,t,r);case 4:return qy(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=cl(t,null,n,r):lr(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:yn(n,o),Cb(e,t,n,o,r);case 7:return lr(e,t,t.pendingProps,r),t.child;case 8:return lr(e,t,t.pendingProps.children,r),t.child;case 12:return lr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,Xe(xd,n._currentValue),n._currentValue=i,a!==null)if($n(a.value,i)){if(a.children===o.children&&!Er.current){t=wo(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){i=a.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(a.tag===1){c=uo(-1,r&-r),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=r,c=a.alternate,c!==null&&(c.lanes|=r),sv(a.return,r,t),l.lanes|=r;break}c=c.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(q(341));i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),sv(i,r,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}lr(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Zi(t,r),o=sn(o),n=n(o),t.flags|=1,lr(e,t,n,r),t.child;case 14:return n=t.type,o=yn(n,t.pendingProps),o=yn(n.type,o),kb(e,t,n,o,r);case 15:return J2(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:yn(n,o),Gu(e,t),t.tag=1,Sr(n)?(e=!0,wd(t)):e=!1,Zi(t,r),O2(t,n,o),uv(t,n,o,r),pv(null,t,n,!0,e,r);case 19:return nk(e,t,r);case 22:return Z2(e,t,r)}throw Error(q(156,t.tag))};function wk(e,t){return HC(e,t)}function TL(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(e,t,r,n){return new TL(e,t,r,n)}function l0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function IL(e){if(typeof e=="function")return l0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$y)return 11;if(e===Oy)return 14}return 2}function oa(e,t){var r=e.alternate;return r===null?(r=tn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Yu(e,t,r,n,o,a){var i=2;if(n=e,typeof e=="function")l0(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ii:return Fa(r.children,o,a,t);case Py:i=8,o|=8;break;case Dg:return e=tn(12,r,t,o|2),e.elementType=Dg,e.lanes=a,e;case Ng:return e=tn(13,r,t,o),e.elementType=Ng,e.lanes=a,e;case Ag:return e=tn(19,r,t,o),e.elementType=Ag,e.lanes=a,e;case CC:return km(r,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $C:i=10;break e;case OC:i=9;break e;case $y:i=11;break e;case Oy:i=14;break e;case Fo:i=16,n=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=tn(i,r,t,o),t.elementType=e,t.type=n,t.lanes=a,t}function Fa(e,t,r,n){return e=tn(7,e,n,t),e.lanes=r,e}function km(e,t,r,n){return e=tn(22,e,n,t),e.elementType=CC,e.lanes=r,e.stateNode={isHidden:!1},e}function Vh(e,t,r){return e=tn(6,e,null,t),e.lanes=r,e}function Bh(e,t,r){return t=tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function DL(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xh(0),this.expirationTimes=xh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xh(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function s0(e,t,r,n,o,a,i,l,c){return e=new DL(e,t,r,l,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=tn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hy(a),e}function NL(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ti,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function bk(e){if(!e)return la;e=e._reactInternals;e:{if(ni(e)!==e||e.tag!==1)throw Error(q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Sr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var r=e.type;if(Sr(r))return w2(e,r,t)}return t}function _k(e,t,r,n,o,a,i,l,c){return e=s0(r,n,!0,e,o,a,i,l,c),e.context=bk(null),r=e.current,n=cr(),o=na(r),a=uo(n,o),a.callback=t??null,ta(r,a,o),e.current.lanes=o,lc(e,o,n),Pr(e,n),e}function jm(e,t,r,n){var o=t.current,a=cr(),i=na(o);return r=bk(r),t.context===null?t.context=r:t.pendingContext=r,t=uo(a,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ta(o,t,i),e!==null&&(Sn(e,o,i,a),Wu(e,o,i)),i}function Td(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Vb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function c0(e,t){Vb(e,t),(e=e.alternate)&&Vb(e,t)}function AL(){return null}var xk=typeof reportError=="function"?reportError:function(e){console.error(e)};function u0(e){this._internalRoot=e}Rm.prototype.render=u0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));jm(e,t,null,null)};Rm.prototype.unmount=u0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ga(function(){jm(null,e,null,null)}),t[vo]=null}};function Rm(e){this._internalRoot=e}Rm.prototype.unstable_scheduleHydration=function(e){if(e){var t=JC();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Wo.length&&t!==0&&t<Wo[r].priority;r++);Wo.splice(r,0,e),r===0&&e2(e)}};function d0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Tm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Bb(){}function ML(e,t,r,n,o){if(o){if(typeof n=="function"){var a=n;n=function(){var u=Td(i);a.call(u)}}var i=_k(t,n,e,0,null,!1,!1,"",Bb);return e._reactRootContainer=i,e[vo]=i.current,Bs(e.nodeType===8?e.parentNode:e),Ga(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var l=n;n=function(){var u=Td(c);l.call(u)}}var c=s0(e,0,!1,null,null,!1,!1,"",Bb);return e._reactRootContainer=c,e[vo]=c.current,Bs(e.nodeType===8?e.parentNode:e),Ga(function(){jm(t,c,r,n)}),c}function Im(e,t,r,n,o){var a=r._reactRootContainer;if(a){var i=a;if(typeof o=="function"){var l=o;o=function(){var c=Td(i);l.call(c)}}jm(t,i,e,o)}else i=ML(r,t,e,o,n);return Td(i)}YC=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ds(t.pendingLanes);r!==0&&(jy(t,r|1),Pr(t,Ot()),!(Ne&6)&&(fl=Ot()+500,ma()))}break;case 13:Ga(function(){var n=yo(e,1);if(n!==null){var o=cr();Sn(n,e,1,o)}}),c0(e,1)}};Ry=function(e){if(e.tag===13){var t=yo(e,134217728);if(t!==null){var r=cr();Sn(t,e,134217728,r)}c0(e,134217728)}};XC=function(e){if(e.tag===13){var t=na(e),r=yo(e,t);if(r!==null){var n=cr();Sn(r,e,t,n)}c0(e,t)}};JC=function(){return We};ZC=function(e,t){var r=We;try{return We=e,t()}finally{We=r}};qg=function(e,t,r){switch(t){case"input":if(zg(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=Em(n);if(!o)throw Error(q(90));jC(n),zg(n,o)}}}break;case"textarea":TC(e,r);break;case"select":t=r.value,t!=null&&Ki(e,!!r.multiple,t,!1)}};zC=o0;FC=Ga;var LL={usingClientEntryPoint:!1,Events:[cc,Mi,Em,MC,LC,o0]},Kl={findFiberByHostInstance:Da,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},zL={bundleType:Kl.bundleType,version:Kl.version,rendererPackageName:Kl.rendererPackageName,rendererConfig:Kl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$o.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=UC(e),e===null?null:e.stateNode},findFiberByHostInstance:Kl.findFiberByHostInstance||AL,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{wm=ou.inject(zL),Gn=ou}catch{}}Hr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=LL;Hr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d0(t))throw Error(q(200));return NL(e,t,null,r)};Hr.createRoot=function(e,t){if(!d0(e))throw Error(q(299));var r=!1,n="",o=xk;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=s0(e,1,!1,null,null,r,!1,n,o),e[vo]=t.current,Bs(e.nodeType===8?e.parentNode:e),new u0(t)};Hr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=UC(t),e=e===null?null:e.stateNode,e};Hr.flushSync=function(e){return Ga(e)};Hr.hydrate=function(e,t,r){if(!Tm(t))throw Error(q(200));return Im(null,e,t,!0,r)};Hr.hydrateRoot=function(e,t,r){if(!d0(e))throw Error(q(405));var n=r!=null&&r.hydratedSources||null,o=!1,a="",i=xk;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=_k(t,null,e,1,r??null,o,!1,a,i),e[vo]=t.current,Bs(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Rm(t)};Hr.render=function(e,t,r){if(!Tm(t))throw Error(q(200));return Im(null,e,t,!1,r)};Hr.unmountComponentAtNode=function(e){if(!Tm(e))throw Error(q(40));return e._reactRootContainer?(Ga(function(){Im(null,null,e,!1,function(){e._reactRootContainer=null,e[vo]=null})}),!0):!1};Hr.unstable_batchedUpdates=o0;Hr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Tm(r))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return Im(e,t,r,!1,n)};Hr.version="18.2.0-next-9e3b772b8-20220608";function Ek(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ek)}catch(e){console.error(e)}}Ek(),_C.exports=Hr;var dc=_C.exports;const Uh=ly(dc);var FL=Object.defineProperty,VL=Object.defineProperties,BL=Object.getOwnPropertyDescriptors,Ub=Object.getOwnPropertySymbols,UL=Object.prototype.hasOwnProperty,WL=Object.prototype.propertyIsEnumerable,Wb=(e,t,r)=>t in e?FL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pv=(e,t)=>{for(var r in t||(t={}))UL.call(t,r)&&Wb(e,r,t[r]);if(Ub)for(var r of Ub(t))WL.call(t,r)&&Wb(e,r,t[r]);return e},Hb=(e,t)=>VL(e,BL(t));const HL=["subtle","filled","outline","light","default","transparent","gradient"],au={xs:P(18),sm:P(22),md:P(28),lg:P(34),xl:P(44)};function qL({variant:e,theme:t,color:r,gradient:n}){const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:HL.includes(e)?Pv({border:`${P(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var GL=H((e,{radius:t,color:r,gradient:n},{variant:o,size:a})=>({root:Hb(Pv({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:L({size:a,sizes:au}),minHeight:L({size:a,sizes:au}),width:L({size:a,sizes:au}),minWidth:L({size:a,sizes:au})},qL({variant:o,theme:e,color:r,gradient:n})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":Hb(Pv({content:'""'},e.fn.cover(P(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const QL=GL;var KL=Object.defineProperty,Id=Object.getOwnPropertySymbols,Sk=Object.prototype.hasOwnProperty,Pk=Object.prototype.propertyIsEnumerable,qb=(e,t,r)=>t in e?KL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gb=(e,t)=>{for(var r in t||(t={}))Sk.call(t,r)&&qb(e,r,t[r]);if(Id)for(var r of Id(t))Pk.call(t,r)&&qb(e,r,t[r]);return e},Qb=(e,t)=>{var r={};for(var n in e)Sk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Id)for(var n of Id(e))t.indexOf(n)<0&&Pk.call(e,n)&&(r[n]=e[n]);return r};function YL(e){var t=e,{size:r,color:n}=t,o=Qb(t,["size","color"]);const a=o,{style:i}=a,l=Qb(a,["style"]);return s.createElement("svg",Gb({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:n,style:Gb({width:r},i)},l),s.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},s.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},s.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},s.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},s.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},s.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var XL=Object.defineProperty,Dd=Object.getOwnPropertySymbols,$k=Object.prototype.hasOwnProperty,Ok=Object.prototype.propertyIsEnumerable,Kb=(e,t,r)=>t in e?XL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yb=(e,t)=>{for(var r in t||(t={}))$k.call(t,r)&&Kb(e,r,t[r]);if(Dd)for(var r of Dd(t))Ok.call(t,r)&&Kb(e,r,t[r]);return e},Xb=(e,t)=>{var r={};for(var n in e)$k.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Dd)for(var n of Dd(e))t.indexOf(n)<0&&Ok.call(e,n)&&(r[n]=e[n]);return r};function JL(e){var t=e,{size:r,color:n}=t,o=Xb(t,["size","color"]);const a=o,{style:i}=a,l=Xb(a,["style"]);return s.createElement("svg",Yb({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:n,style:Yb({width:r,height:r},i)},l),s.createElement("g",{fill:"none",fillRule:"evenodd"},s.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},s.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),s.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},s.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var ZL=Object.defineProperty,Nd=Object.getOwnPropertySymbols,Ck=Object.prototype.hasOwnProperty,kk=Object.prototype.propertyIsEnumerable,Jb=(e,t,r)=>t in e?ZL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zb=(e,t)=>{for(var r in t||(t={}))Ck.call(t,r)&&Jb(e,r,t[r]);if(Nd)for(var r of Nd(t))kk.call(t,r)&&Jb(e,r,t[r]);return e},e_=(e,t)=>{var r={};for(var n in e)Ck.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Nd)for(var n of Nd(e))t.indexOf(n)<0&&kk.call(e,n)&&(r[n]=e[n]);return r};function ez(e){var t=e,{size:r,color:n}=t,o=e_(t,["size","color"]);const a=o,{style:i}=a,l=e_(a,["style"]);return s.createElement("svg",Zb({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:n,style:Zb({width:r},i)},l),s.createElement("circle",{cx:"15",cy:"15",r:"15"},s.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},s.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("circle",{cx:"105",cy:"15",r:"15"},s.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var tz=Object.defineProperty,Ad=Object.getOwnPropertySymbols,jk=Object.prototype.hasOwnProperty,Rk=Object.prototype.propertyIsEnumerable,t_=(e,t,r)=>t in e?tz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rz=(e,t)=>{for(var r in t||(t={}))jk.call(t,r)&&t_(e,r,t[r]);if(Ad)for(var r of Ad(t))Rk.call(t,r)&&t_(e,r,t[r]);return e},nz=(e,t)=>{var r={};for(var n in e)jk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ad)for(var n of Ad(e))t.indexOf(n)<0&&Rk.call(e,n)&&(r[n]=e[n]);return r};const Wh={bars:YL,oval:JL,dots:ez},oz={xs:P(18),sm:P(22),md:P(36),lg:P(44),xl:P(58)},az={size:"md"};function un(e){const t=G("Loader",az,e),{size:r,color:n,variant:o}=t,a=nz(t,["size","color","variant"]),i=or(),l=o in Wh?o:i.loader;return s.createElement(le,rz({role:"presentation",component:Wh[l]||Wh.bars,size:L({size:r,sizes:oz}),color:i.fn.variant({variant:"filled",primaryFallback:!1,color:n||i.primaryColor}).background},a))}un.displayName="@mantine/core/Loader";var iz=Object.defineProperty,Md=Object.getOwnPropertySymbols,Tk=Object.prototype.hasOwnProperty,Ik=Object.prototype.propertyIsEnumerable,r_=(e,t,r)=>t in e?iz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,n_=(e,t)=>{for(var r in t||(t={}))Tk.call(t,r)&&r_(e,r,t[r]);if(Md)for(var r of Md(t))Ik.call(t,r)&&r_(e,r,t[r]);return e},lz=(e,t)=>{var r={};for(var n in e)Tk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Md)for(var n of Md(e))t.indexOf(n)<0&&Ik.call(e,n)&&(r[n]=e[n]);return r};const sz={color:"gray",size:"md",variant:"subtle"},Dk=f.forwardRef((e,t)=>{const r=G("ActionIcon",sz,e),{className:n,color:o,children:a,radius:i,size:l,variant:c,gradient:u,disabled:d,loaderProps:p,loading:h,unstyled:g,__staticSelector:y}=r,v=lz(r,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:E,cx:w,theme:b}=QL({radius:i,color:o,gradient:u},{name:["ActionIcon",y],unstyled:g,size:l,variant:c}),_=s.createElement(un,n_({color:b.fn.variant({color:o,variant:c}).color,size:"100%","data-action-icon-loader":!0},p));return s.createElement(ho,n_({className:w(E.root,n),ref:t,disabled:d,"data-disabled":d||void 0,"data-loading":h||void 0,unstyled:g},v),h?_:a)});Dk.displayName="@mantine/core/ActionIcon";const ur=Dk;var cz=Object.defineProperty,uz=Object.defineProperties,dz=Object.getOwnPropertyDescriptors,Ld=Object.getOwnPropertySymbols,Nk=Object.prototype.hasOwnProperty,Ak=Object.prototype.propertyIsEnumerable,o_=(e,t,r)=>t in e?cz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fz=(e,t)=>{for(var r in t||(t={}))Nk.call(t,r)&&o_(e,r,t[r]);if(Ld)for(var r of Ld(t))Ak.call(t,r)&&o_(e,r,t[r]);return e},pz=(e,t)=>uz(e,dz(t)),mz=(e,t)=>{var r={};for(var n in e)Nk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ld)for(var n of Ld(e))t.indexOf(n)<0&&Ak.call(e,n)&&(r[n]=e[n]);return r};function f0(e){const t=G("Portal",{},e),{children:r,target:n,className:o,innerRef:a}=t,i=mz(t,["children","target","className","innerRef"]),l=or(),[c,u]=f.useState(!1),d=f.useRef();return cC(()=>(u(!0),d.current=n?typeof n=="string"?document.querySelector(n):n:document.createElement("div"),n||document.body.appendChild(d.current),()=>{!n&&document.body.removeChild(d.current)}),[n]),c?dc.createPortal(s.createElement("div",pz(fz({className:o,dir:l.dir},i),{ref:a}),r),d.current):null}f0.displayName="@mantine/core/Portal";var hz=Object.defineProperty,zd=Object.getOwnPropertySymbols,Mk=Object.prototype.hasOwnProperty,Lk=Object.prototype.propertyIsEnumerable,a_=(e,t,r)=>t in e?hz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gz=(e,t)=>{for(var r in t||(t={}))Mk.call(t,r)&&a_(e,r,t[r]);if(zd)for(var r of zd(t))Lk.call(t,r)&&a_(e,r,t[r]);return e},vz=(e,t)=>{var r={};for(var n in e)Mk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zd)for(var n of zd(e))t.indexOf(n)<0&&Lk.call(e,n)&&(r[n]=e[n]);return r};function Cl(e){var t=e,{withinPortal:r=!0,children:n}=t,o=vz(t,["withinPortal","children"]);return r?s.createElement(f0,gz({},o),n):s.createElement(s.Fragment,null,n)}Cl.displayName="@mantine/core/OptionalPortal";var yz=Object.defineProperty,wz=Object.defineProperties,bz=Object.getOwnPropertyDescriptors,i_=Object.getOwnPropertySymbols,_z=Object.prototype.hasOwnProperty,xz=Object.prototype.propertyIsEnumerable,l_=(e,t,r)=>t in e?yz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Hh=(e,t)=>{for(var r in t||(t={}))_z.call(t,r)&&l_(e,r,t[r]);if(i_)for(var r of i_(t))xz.call(t,r)&&l_(e,r,t[r]);return e},s_=(e,t)=>wz(e,bz(t));function Ez({variant:e,color:t,theme:r}){if(e==="filled")return{backgroundColor:r.fn.variant({variant:"filled",color:t}).background,color:r.white};if(e==="outline"){const n=r.fn.variant({variant:"outline",color:t});return{color:n.color,borderColor:n.border,backgroundColor:r.colorScheme==="dark"?r.colors.dark[6]:r.white}}if(e==="light"){const n=r.fn.variant({variant:"light",color:t});return{backgroundColor:n.background,color:n.color}}return null}var Sz=H((e,{radius:t,color:r},{variant:n})=>({root:Hh(s_(Hh({},e.fn.fontStyles()),{position:"relative",overflow:"hidden",paddingTop:e.spacing.sm,paddingBottom:e.spacing.sm,paddingLeft:e.spacing.md,paddingRight:e.spacing.sm,borderRadius:e.fn.radius(t),border:`${P(1)} solid transparent`}),Ez({variant:n,color:r,theme:e})),wrapper:{display:"flex"},body:{flex:1},title:{boxSizing:"border-box",margin:0,marginBottom:e.spacing.xs,display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,fontWeight:700,"&[data-with-close-button]":{paddingRight:e.spacing.md}},label:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},icon:{lineHeight:1,width:P(20),height:P(20),display:"flex",alignItems:"center",justifyContent:"flex-start",marginRight:e.spacing.md,marginTop:1},message:s_(Hh({},e.fn.fontStyles()),{lineHeight:e.lineHeight,textOverflow:"ellipsis",overflow:"hidden",fontSize:e.fontSizes.sm,color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}),closeButton:{width:P(10),height:P(10),color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}}));const Pz=Sz;var $z=Object.defineProperty,Fd=Object.getOwnPropertySymbols,zk=Object.prototype.hasOwnProperty,Fk=Object.prototype.propertyIsEnumerable,c_=(e,t,r)=>t in e?$z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u_=(e,t)=>{for(var r in t||(t={}))zk.call(t,r)&&c_(e,r,t[r]);if(Fd)for(var r of Fd(t))Fk.call(t,r)&&c_(e,r,t[r]);return e},Oz=(e,t)=>{var r={};for(var n in e)zk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Fd)for(var n of Fd(e))t.indexOf(n)<0&&Fk.call(e,n)&&(r[n]=e[n]);return r};function Vk(e){const t=e,{width:r,height:n,style:o}=t,a=Oz(t,["width","height","style"]);return s.createElement("svg",u_({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:u_({width:r,height:n},o)},a),s.createElement("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"}))}Vk.displayName="@mantine/core/CloseIcon";var Cz=Object.defineProperty,Vd=Object.getOwnPropertySymbols,Bk=Object.prototype.hasOwnProperty,Uk=Object.prototype.propertyIsEnumerable,d_=(e,t,r)=>t in e?Cz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kz=(e,t)=>{for(var r in t||(t={}))Bk.call(t,r)&&d_(e,r,t[r]);if(Vd)for(var r of Vd(t))Uk.call(t,r)&&d_(e,r,t[r]);return e},jz=(e,t)=>{var r={};for(var n in e)Bk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Vd)for(var n of Vd(e))t.indexOf(n)<0&&Uk.call(e,n)&&(r[n]=e[n]);return r};const Rz={xs:P(12),sm:P(16),md:P(20),lg:P(28),xl:P(34)},Tz={size:"sm"},Wk=f.forwardRef((e,t)=>{const r=G("CloseButton",Tz,e),{iconSize:n,size:o,children:a}=r,i=jz(r,["iconSize","size","children"]),l=P(n||Rz[o]);return s.createElement(ur,kz({ref:t,__staticSelector:"CloseButton",size:o},i),a||s.createElement(Vk,{width:l,height:l}))});Wk.displayName="@mantine/core/CloseButton";const fc=Wk;var Iz=Object.defineProperty,Bd=Object.getOwnPropertySymbols,Hk=Object.prototype.hasOwnProperty,qk=Object.prototype.propertyIsEnumerable,f_=(e,t,r)=>t in e?Iz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dz=(e,t)=>{for(var r in t||(t={}))Hk.call(t,r)&&f_(e,r,t[r]);if(Bd)for(var r of Bd(t))qk.call(t,r)&&f_(e,r,t[r]);return e},Nz=(e,t)=>{var r={};for(var n in e)Hk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Bd)for(var n of Bd(e))t.indexOf(n)<0&&qk.call(e,n)&&(r[n]=e[n]);return r};const Az={variant:"light"},pc=f.forwardRef((e,t)=>{const r=G("Alert",Az,e),{id:n,className:o,title:a,variant:i,children:l,color:c,classNames:u,icon:d,styles:p,onClose:h,radius:g,withCloseButton:y,closeButtonLabel:v,unstyled:E}=r,w=Nz(r,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:b,cx:_}=Pz({color:c,radius:g},{classNames:u,styles:p,unstyled:E,variant:i,name:"Alert"}),x=kr(n),S=a&&`${x}-title`,$=`${x}-body`;return s.createElement(le,Dz({id:x,role:"alert","aria-labelledby":S,"aria-describedby":$,className:_(b.root,b[i],o),ref:t},w),s.createElement("div",{className:b.wrapper},d&&s.createElement("div",{className:b.icon},d),s.createElement("div",{className:b.body},a&&s.createElement("div",{className:b.title,"data-with-close-button":y||void 0},s.createElement("span",{id:S,className:b.label},a)),s.createElement("div",{id:$,className:b.message},l)),y&&s.createElement(fc,{className:b.closeButton,onClick:h,variant:"transparent",size:16,iconSize:16,"aria-label":v})))});pc.displayName="@mantine/core/Alert";var Mz=Object.defineProperty,Lz=Object.defineProperties,zz=Object.getOwnPropertyDescriptors,p_=Object.getOwnPropertySymbols,Fz=Object.prototype.hasOwnProperty,Vz=Object.prototype.propertyIsEnumerable,m_=(e,t,r)=>t in e?Mz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,iu=(e,t)=>{for(var r in t||(t={}))Fz.call(t,r)&&m_(e,r,t[r]);if(p_)for(var r of p_(t))Vz.call(t,r)&&m_(e,r,t[r]);return e},Bz=(e,t)=>Lz(e,zz(t));function Uz({underline:e,strikethrough:t}){const r=[];return e&&r.push("underline"),t&&r.push("line-through"),r.length>0?r.join(" "):"none"}function Wz({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function Hz(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function qz({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var Gz=H((e,{color:t,lineClamp:r,truncate:n,inline:o,inherit:a,underline:i,gradient:l,weight:c,transform:u,align:d,strikethrough:p,italic:h},{size:g})=>{const y=e.fn.variant({variant:"gradient",gradient:l});return{root:Bz(iu(iu(iu(iu({},e.fn.fontStyles()),e.fn.focusStyles()),Hz(r)),qz({theme:e,truncate:n})),{color:Wz({color:t,theme:e}),fontFamily:a?"inherit":e.fontFamily,fontSize:a||g===void 0?"inherit":L({size:g,sizes:e.fontSizes}),lineHeight:a?"inherit":o?1:e.lineHeight,textDecoration:Uz({underline:i,strikethrough:p}),WebkitTapHighlightColor:"transparent",fontWeight:a?"inherit":c,textTransform:u,textAlign:d,fontStyle:h?"italic":void 0}),gradient:{backgroundImage:y.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const Qz=Gz;var Kz=Object.defineProperty,Ud=Object.getOwnPropertySymbols,Gk=Object.prototype.hasOwnProperty,Qk=Object.prototype.propertyIsEnumerable,h_=(e,t,r)=>t in e?Kz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yz=(e,t)=>{for(var r in t||(t={}))Gk.call(t,r)&&h_(e,r,t[r]);if(Ud)for(var r of Ud(t))Qk.call(t,r)&&h_(e,r,t[r]);return e},Xz=(e,t)=>{var r={};for(var n in e)Gk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ud)for(var n of Ud(e))t.indexOf(n)<0&&Qk.call(e,n)&&(r[n]=e[n]);return r};const Jz={variant:"text"},Kk=f.forwardRef((e,t)=>{const r=G("Text",Jz,e),{className:n,size:o,weight:a,transform:i,color:l,align:c,variant:u,lineClamp:d,truncate:p,gradient:h,inline:g,inherit:y,underline:v,strikethrough:E,italic:w,classNames:b,styles:_,unstyled:x,span:S,__staticSelector:$}=r,O=Xz(r,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:C,cx:T}=Qz({color:l,lineClamp:d,truncate:p,inline:g,inherit:y,underline:v,strikethrough:E,italic:w,weight:a,transform:i,align:c,gradient:h},{unstyled:x,name:$||"Text",variant:u,size:o});return s.createElement(le,Yz({ref:t,className:T(C.root,{[C.gradient]:u==="gradient"},n),component:S?"span":"div"},O))});Kk.displayName="@mantine/core/Text";const oe=Kk;var Zz=Object.defineProperty,g_=Object.getOwnPropertySymbols,e8=Object.prototype.hasOwnProperty,t8=Object.prototype.propertyIsEnumerable,v_=(e,t,r)=>t in e?Zz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,r8=(e,t)=>{for(var r in t||(t={}))e8.call(t,r)&&v_(e,r,t[r]);if(g_)for(var r of g_(t))t8.call(t,r)&&v_(e,r,t[r]);return e};function n8({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():e.fn.themeColor(t||e.primaryColor,e.colorScheme==="dark"?4:7,!1,!0)}var o8=H((e,{color:t,underline:r})=>({root:r8({backgroundColor:"transparent",cursor:"pointer",padding:0,border:0,color:n8({theme:e,color:t})},e.fn.hover({textDecoration:r?"underline":"none"}))}));const a8=o8;var i8=Object.defineProperty,Wd=Object.getOwnPropertySymbols,Yk=Object.prototype.hasOwnProperty,Xk=Object.prototype.propertyIsEnumerable,y_=(e,t,r)=>t in e?i8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w_=(e,t)=>{for(var r in t||(t={}))Yk.call(t,r)&&y_(e,r,t[r]);if(Wd)for(var r of Wd(t))Xk.call(t,r)&&y_(e,r,t[r]);return e},l8=(e,t)=>{var r={};for(var n in e)Yk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wd)for(var n of Wd(e))t.indexOf(n)<0&&Xk.call(e,n)&&(r[n]=e[n]);return r};const s8={underline:!0},Jk=f.forwardRef((e,t)=>{const r=G("Anchor",s8,e),{component:n,className:o,unstyled:a,variant:i,size:l,color:c,underline:u}=r,d=l8(r,["component","className","unstyled","variant","size","color","underline"]),{classes:p,cx:h}=a8({color:c,underline:u},{name:"Anchor",unstyled:a,variant:i,size:l}),g=n==="button"?{type:"button"}:null;return s.createElement(oe,w_(w_({component:n||"a",ref:t,className:h(p.root,o),size:l},g),d))});Jk.displayName="@mantine/core/Anchor";const Ae=Jk,Zk=f.createContext({zIndex:1e3,fixed:!1,layout:"default"}),c8=Zk.Provider;function ej(){return f.useContext(Zk)}function Dm(e,t){if(!e)return[];const r=Object.keys(e).filter(n=>n!=="base").map(n=>[L({size:n,sizes:t.breakpoints,units:"em"}),e[n]]);return r.sort((n,o)=>ln(n[0])-ln(o[0])),r}var u8=Object.defineProperty,d8=Object.defineProperties,f8=Object.getOwnPropertyDescriptors,b_=Object.getOwnPropertySymbols,p8=Object.prototype.hasOwnProperty,m8=Object.prototype.propertyIsEnumerable,__=(e,t,r)=>t in e?u8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lu=(e,t)=>{for(var r in t||(t={}))p8.call(t,r)&&__(e,r,t[r]);if(b_)for(var r of b_(t))m8.call(t,r)&&__(e,r,t[r]);return e},x_=(e,t)=>d8(e,f8(t)),h8=H((e,{height:t,width:r,fixed:n,position:o,hiddenBreakpoint:a,zIndex:i,section:l,withBorder:c,layout:u})=>{const d=typeof r=="object"&&r!==null?Dm(r,e).reduce((h,[g,y])=>(h[`@media (min-width: ${sr(g)})`]={width:P(y),minWidth:P(y)},h),{}):null,p=c?{[l==="navbar"?"borderRight":"borderLeft"]:`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`}:{};return{root:x_(lu(lu(x_(lu(lu({},e.fn.fontStyles()),o),{top:u==="alt"?0:(o==null?void 0:o.top)||"var(--mantine-header-height)",bottom:0,zIndex:i,height:t?P(t):u==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:r!=null&&r.base?P(r==null?void 0:r.base):"100%",position:n?"fixed":"static",boxSizing:"border-box",display:"flex",flexDirection:"column",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),p),d),{"&[data-hidden]":{[`@media (max-width: ${sr(ln(L({size:a,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const g8=h8;var v8=Object.defineProperty,Hd=Object.getOwnPropertySymbols,tj=Object.prototype.hasOwnProperty,rj=Object.prototype.propertyIsEnumerable,E_=(e,t,r)=>t in e?v8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S_=(e,t)=>{for(var r in t||(t={}))tj.call(t,r)&&E_(e,r,t[r]);if(Hd)for(var r of Hd(t))rj.call(t,r)&&E_(e,r,t[r]);return e},y8=(e,t)=>{var r={};for(var n in e)tj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Hd)for(var n of Hd(e))t.indexOf(n)<0&&rj.call(e,n)&&(r[n]=e[n]);return r};const nj=f.forwardRef((e,t)=>{var r=e,{width:n,height:o,fixed:a=!1,position:i,zIndex:l,hiddenBreakpoint:c="md",hidden:u=!1,withBorder:d=!0,className:p,classNames:h,styles:g,children:y,section:v,__staticSelector:E,unstyled:w,variant:b}=r,_=y8(r,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const x=ej(),{classes:S,cx:$,theme:O}=g8({width:n,height:o,fixed:x.fixed||a,position:i,hiddenBreakpoint:c,zIndex:l||x.zIndex||Rn("app"),section:v,withBorder:d,layout:x.layout},{classNames:h,styles:g,name:E,unstyled:w,variant:b}),C=Dm(n,O).reduce((T,[k,I])=>(T[`@media (min-width: ${sr(k)})`]={[`--mantine-${v}-width`]:P(I)},T),{});return s.createElement(le,S_({component:v==="navbar"?"nav":"aside",ref:t,"data-hidden":u||void 0,className:$(S.root,p)},_),y,s.createElement(sC,{styles:()=>({":root":S_({[`--mantine-${v}-width`]:n!=null&&n.base?P(n.base):"0rem"},C)})}))});nj.displayName="@mantine/core/HorizontalSection";var w8=Object.defineProperty,qd=Object.getOwnPropertySymbols,oj=Object.prototype.hasOwnProperty,aj=Object.prototype.propertyIsEnumerable,P_=(e,t,r)=>t in e?w8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b8=(e,t)=>{for(var r in t||(t={}))oj.call(t,r)&&P_(e,r,t[r]);if(qd)for(var r of qd(t))aj.call(t,r)&&P_(e,r,t[r]);return e},_8=(e,t)=>{var r={};for(var n in e)oj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qd)for(var n of qd(e))t.indexOf(n)<0&&aj.call(e,n)&&(r[n]=e[n]);return r};const ij=f.forwardRef((e,t)=>{var r=e,{children:n,grow:o=!1,sx:a}=r,i=_8(r,["children","grow","sx"]);return s.createElement(le,b8({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...nm(a)]},i),n)});ij.displayName="@mantine/core/Section";const x8=ij;var E8=Object.defineProperty,$_=Object.getOwnPropertySymbols,S8=Object.prototype.hasOwnProperty,P8=Object.prototype.propertyIsEnumerable,O_=(e,t,r)=>t in e?E8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$8=(e,t)=>{for(var r in t||(t={}))S8.call(t,r)&&O_(e,r,t[r]);if($_)for(var r of $_(t))P8.call(t,r)&&O_(e,r,t[r]);return e};const O8={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},$s=f.forwardRef((e,t)=>{const r=G("Navbar",O8,e);return s.createElement(nj,$8({section:"navbar",__staticSelector:"Navbar",ref:t},r))});$s.Section=x8;$s.displayName="@mantine/core/Navbar";var C8=Object.defineProperty,k8=Object.defineProperties,j8=Object.getOwnPropertyDescriptors,C_=Object.getOwnPropertySymbols,R8=Object.prototype.hasOwnProperty,T8=Object.prototype.propertyIsEnumerable,k_=(e,t,r)=>t in e?C8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qh=(e,t)=>{for(var r in t||(t={}))R8.call(t,r)&&k_(e,r,t[r]);if(C_)for(var r of C_(t))T8.call(t,r)&&k_(e,r,t[r]);return e},j_=(e,t)=>k8(e,j8(t)),I8=H((e,{height:t,fixed:r,position:n,zIndex:o,borderPosition:a,layout:i})=>{const l=typeof t=="object"&&t!==null?Dm(t,e).reduce((c,[u,d])=>(c[`@media (min-width: ${sr(u)})`]={height:P(d),minHeight:P(d)},c),{}):null;return{root:j_(qh(j_(qh(qh({},e.fn.fontStyles()),n),{zIndex:o,left:i==="alt"?"var(--mantine-navbar-width, 0)":0,right:i==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?P(t==null?void 0:t.base)||"100%":P(t),maxHeight:typeof t=="object"?P(t==null?void 0:t.base)||"100%":P(t),position:r?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),l),{borderBottom:a==="bottom"?`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:a==="top"?`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const D8=I8;var N8=Object.defineProperty,Gd=Object.getOwnPropertySymbols,lj=Object.prototype.hasOwnProperty,sj=Object.prototype.propertyIsEnumerable,R_=(e,t,r)=>t in e?N8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T_=(e,t)=>{for(var r in t||(t={}))lj.call(t,r)&&R_(e,r,t[r]);if(Gd)for(var r of Gd(t))sj.call(t,r)&&R_(e,r,t[r]);return e},A8=(e,t)=>{var r={};for(var n in e)lj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Gd)for(var n of Gd(e))t.indexOf(n)<0&&sj.call(e,n)&&(r[n]=e[n]);return r};const cj=f.forwardRef((e,t)=>{var r=e,{children:n,className:o,classNames:a,styles:i,height:l,fixed:c=!1,withBorder:u=!0,position:d,zIndex:p,section:h,unstyled:g,__staticSelector:y,variant:v}=r,E=A8(r,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector","variant"]);const w=ej(),b=p||w.zIndex||Rn("app"),{classes:_,cx:x,theme:S}=D8({height:l,fixed:w.fixed||c,position:d,zIndex:typeof b=="number"&&w.layout==="default"?b+1:b,layout:w.layout,borderPosition:u?h==="header"?"bottom":"top":"none"},{name:y,classNames:a,styles:i,unstyled:g,variant:v}),$=typeof l=="object"&&l!==null?Dm(l,S).reduce((O,[C,T])=>(O[`@media (min-width: ${sr(C)})`]={[`--mantine-${h}-height`]:P(T)},O),{}):null;return s.createElement(le,T_({component:h==="header"?"header":"footer",className:x(_.root,o),ref:t},E),n,s.createElement(sC,{styles:()=>({":root":T_({[`--mantine-${h}-height`]:typeof l=="object"?P(l==null?void 0:l.base)||"100%":P(l)},$)})}))});cj.displayName="@mantine/core/VerticalSection";var M8=Object.defineProperty,L8=Object.defineProperties,z8=Object.getOwnPropertyDescriptors,I_=Object.getOwnPropertySymbols,F8=Object.prototype.hasOwnProperty,V8=Object.prototype.propertyIsEnumerable,D_=(e,t,r)=>t in e?M8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B8=(e,t)=>{for(var r in t||(t={}))F8.call(t,r)&&D_(e,r,t[r]);if(I_)for(var r of I_(t))V8.call(t,r)&&D_(e,r,t[r]);return e},U8=(e,t)=>L8(e,z8(t));const W8={fixed:!1,position:{top:0,left:0,right:0}},uj=f.forwardRef((e,t)=>{const r=G("Header",W8,e);return s.createElement(cj,U8(B8({section:"header",__staticSelector:"Header"},r),{ref:t}))});uj.displayName="@mantine/core/Header";var H8=Object.defineProperty,N_=Object.getOwnPropertySymbols,q8=Object.prototype.hasOwnProperty,G8=Object.prototype.propertyIsEnumerable,A_=(e,t,r)=>t in e?H8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dj=(e,t)=>{for(var r in t||(t={}))q8.call(t,r)&&A_(e,r,t[r]);if(N_)for(var r of N_(t))G8.call(t,r)&&A_(e,r,t[r]);return e};function Q8(e,t){const r=L({size:e.padding,sizes:t.spacing}),n=e.navbarOffsetBreakpoint?L({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?L({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;if(!e.fixed)return{padding:r};const a=ln(n),i=ln(o);return dj({minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${r})`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${r})`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${r})`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${r})`},a===i?{[`@media (max-width: ${sr(a-1)})`]:{paddingLeft:r,paddingRight:r}}:{[`@media (max-width: ${sr(a-1)})`]:{paddingLeft:r},[`@media (max-width: ${sr(i-1)})`]:{paddingRight:r}})}var K8=H((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:dj({flex:1,width:"100vw",boxSizing:"border-box"},Q8(t,e))}));const Y8=K8;var X8=Object.defineProperty,Qd=Object.getOwnPropertySymbols,fj=Object.prototype.hasOwnProperty,pj=Object.prototype.propertyIsEnumerable,M_=(e,t,r)=>t in e?X8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J8=(e,t)=>{for(var r in t||(t={}))fj.call(t,r)&&M_(e,r,t[r]);if(Qd)for(var r of Qd(t))pj.call(t,r)&&M_(e,r,t[r]);return e},Z8=(e,t)=>{var r={};for(var n in e)fj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Qd)for(var n of Qd(e))t.indexOf(n)<0&&pj.call(e,n)&&(r[n]=e[n]);return r};const eF={fixed:!0,padding:"md"},mj=f.forwardRef((e,t)=>{const r=G("AppShell",eF,e),{children:n,navbar:o,header:a,footer:i,aside:l,fixed:c,zIndex:u,padding:d,navbarOffsetBreakpoint:p,asideOffsetBreakpoint:h,className:g,styles:y,classNames:v,unstyled:E,hidden:w,layout:b,variant:_}=r,x=Z8(r,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout","variant"]),{classes:S,cx:$}=Y8({padding:d,fixed:c,navbarOffsetBreakpoint:p,asideOffsetBreakpoint:h},{styles:y,classNames:v,unstyled:E,name:"AppShell",variant:_});return w?s.createElement(s.Fragment,null,n):s.createElement(c8,{value:{fixed:c,zIndex:u,layout:b}},s.createElement(le,J8({className:$(S.root,g),ref:t},x),a,s.createElement("div",{className:S.body},o,s.createElement("main",{className:S.main},n),l),i))});mj.displayName="@mantine/core/AppShell";const su={xs:P(1),sm:P(2),md:P(3),lg:P(4),xl:P(5)};function cu(e,t){const r=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?r:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var tF=H((e,{color:t},{size:r,variant:n})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:P(1),borderTop:`${L({size:r,sizes:su})} ${n} ${cu(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${L({size:r,sizes:su})} ${n} ${cu(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:P(L({size:r,sizes:su})),borderTopColor:cu(e,t),borderTopStyle:n,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:P(L({size:r,sizes:su})),borderLeftColor:cu(e,t),borderLeftStyle:n}}));const rF=tF;var nF=Object.defineProperty,oF=Object.defineProperties,aF=Object.getOwnPropertyDescriptors,Kd=Object.getOwnPropertySymbols,hj=Object.prototype.hasOwnProperty,gj=Object.prototype.propertyIsEnumerable,L_=(e,t,r)=>t in e?nF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z_=(e,t)=>{for(var r in t||(t={}))hj.call(t,r)&&L_(e,r,t[r]);if(Kd)for(var r of Kd(t))gj.call(t,r)&&L_(e,r,t[r]);return e},iF=(e,t)=>oF(e,aF(t)),lF=(e,t)=>{var r={};for(var n in e)hj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Kd)for(var n of Kd(e))t.indexOf(n)<0&&gj.call(e,n)&&(r[n]=e[n]);return r};const sF={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},wr=f.forwardRef((e,t)=>{const r=G("Divider",sF,e),{className:n,color:o,orientation:a,size:i,label:l,labelPosition:c,labelProps:u,variant:d,styles:p,classNames:h,unstyled:g}=r,y=lF(r,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:v,cx:E}=rF({color:o},{classNames:h,styles:p,unstyled:g,name:"Divider",variant:d,size:i}),w=a==="vertical",b=a==="horizontal",_=!!l&&b,x=!(u!=null&&u.color);return s.createElement(le,z_({ref:t,className:E(v.root,{[v.vertical]:w,[v.horizontal]:b,[v.withLabel]:_},n),role:"separator"},y),_&&s.createElement(oe,iF(z_({},u),{size:(u==null?void 0:u.size)||"xs",mt:P(2),className:E(v.label,v[c],{[v.labelDefaultStyles]:x})}),l))});wr.displayName="@mantine/core/Divider";var cF=Object.defineProperty,uF=Object.defineProperties,dF=Object.getOwnPropertyDescriptors,F_=Object.getOwnPropertySymbols,fF=Object.prototype.hasOwnProperty,pF=Object.prototype.propertyIsEnumerable,V_=(e,t,r)=>t in e?cF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B_=(e,t)=>{for(var r in t||(t={}))fF.call(t,r)&&V_(e,r,t[r]);if(F_)for(var r of F_(t))pF.call(t,r)&&V_(e,r,t[r]);return e},mF=(e,t)=>uF(e,dF(t)),hF=H((e,t,{size:r})=>({item:mF(B_({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${L({size:r,sizes:e.spacing})} / 1.5) ${L({size:r,sizes:e.spacing})}`,cursor:"pointer",fontSize:L({size:r,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":B_({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${L({size:r,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${L({size:r,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${L({size:r,sizes:e.spacing})} / 1.5) ${L({size:r,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const gF=hF;var vF=Object.defineProperty,U_=Object.getOwnPropertySymbols,yF=Object.prototype.hasOwnProperty,wF=Object.prototype.propertyIsEnumerable,W_=(e,t,r)=>t in e?vF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bF=(e,t)=>{for(var r in t||(t={}))yF.call(t,r)&&W_(e,r,t[r]);if(U_)for(var r of U_(t))wF.call(t,r)&&W_(e,r,t[r]);return e};function vj({data:e,hovered:t,classNames:r,styles:n,isItemSelected:o,uuid:a,__staticSelector:i,onItemHover:l,onItemSelect:c,itemsRefs:u,itemComponent:d,size:p,nothingFound:h,creatable:g,createLabel:y,unstyled:v,variant:E}){const{classes:w}=gF(null,{classNames:r,styles:n,unstyled:v,name:i,variant:E,size:p}),b=[],_=[];let x=null;const S=(O,C)=>{const T=typeof o=="function"?o(O.value):!1;return s.createElement(d,bF({key:O.value,className:w.item,"data-disabled":O.disabled||void 0,"data-hovered":!O.disabled&&t===C||void 0,"data-selected":!O.disabled&&T||void 0,selected:T,onMouseEnter:()=>l(C),id:`${a}-${C}`,role:"option",tabIndex:-1,"aria-selected":t===C,ref:k=>{u&&u.current&&(u.current[O.value]=k)},onMouseDown:O.disabled?null:k=>{k.preventDefault(),c(O)},disabled:O.disabled,variant:E},O))};let $=null;if(e.forEach((O,C)=>{O.creatable?x=C:O.group?($!==O.group&&($=O.group,_.push(s.createElement("div",{className:w.separator,key:`__mantine-divider-${C}`},s.createElement(wr,{classNames:{label:w.separatorLabel},label:O.group})))),_.push(S(O,C))):b.push(S(O,C))}),g){const O=e[x];b.push(s.createElement("div",{key:vm(),className:w.item,"data-hovered":t===x||void 0,onMouseEnter:()=>l(x),onMouseDown:C=>{C.preventDefault(),c(O)},tabIndex:-1,ref:C=>{u&&u.current&&(u.current[O.value]=C)}},y))}return _.length>0&&b.length>0&&b.unshift(s.createElement("div",{className:w.separator,key:"empty-group-separator"},s.createElement(wr,null))),_.length>0||b.length>0?s.createElement(s.Fragment,null,_,b):s.createElement(oe,{size:p,unstyled:v,className:w.nothingFound},h)}vj.displayName="@mantine/core/SelectItems";var _F=Object.defineProperty,Yd=Object.getOwnPropertySymbols,yj=Object.prototype.hasOwnProperty,wj=Object.prototype.propertyIsEnumerable,H_=(e,t,r)=>t in e?_F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xF=(e,t)=>{for(var r in t||(t={}))yj.call(t,r)&&H_(e,r,t[r]);if(Yd)for(var r of Yd(t))wj.call(t,r)&&H_(e,r,t[r]);return e},EF=(e,t)=>{var r={};for(var n in e)yj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Yd)for(var n of Yd(e))t.indexOf(n)<0&&wj.call(e,n)&&(r[n]=e[n]);return r};const bj=f.forwardRef((e,t)=>{var r=e,{label:n,value:o}=r,a=EF(r,["label","value"]);return s.createElement("div",xF({ref:t},a),n||o)});bj.displayName="@mantine/core/DefaultItem";function SF(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _j(...e){return t=>e.forEach(r=>SF(r,t))}function oi(...e){return f.useCallback(_j(...e),e)}const xj=f.forwardRef((e,t)=>{const{children:r,...n}=e,o=f.Children.toArray(r),a=o.find($F);if(a){const i=a.props.children,l=o.map(c=>c===a?f.Children.count(i)>1?f.Children.only(null):f.isValidElement(i)?i.props.children:null:c);return f.createElement($v,et({},n,{ref:t}),f.isValidElement(i)?f.cloneElement(i,void 0,l):null)}return f.createElement($v,et({},n,{ref:t}),r)});xj.displayName="Slot";const $v=f.forwardRef((e,t)=>{const{children:r,...n}=e;return f.isValidElement(r)?f.cloneElement(r,{...OF(n,r.props),ref:_j(t,r.ref)}):f.Children.count(r)>1?f.Children.only(null):null});$v.displayName="SlotClone";const PF=({children:e})=>f.createElement(f.Fragment,null,e);function $F(e){return f.isValidElement(e)&&e.type===PF}function OF(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{a(...l),o(...l)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}const CF=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],mc=CF.reduce((e,t)=>{const r=f.forwardRef((n,o)=>{const{asChild:a,...i}=n,l=a?xj:t;return f.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),f.createElement(l,et({},i,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ov=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function kF(e,t){return f.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const hc=e=>{const{present:t,children:r}=e,n=jF(t),o=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),a=oi(n.ref,o.ref);return typeof r=="function"||n.isPresent?f.cloneElement(o,{ref:a}):null};hc.displayName="Presence";function jF(e){const[t,r]=f.useState(),n=f.useRef({}),o=f.useRef(e),a=f.useRef("none"),i=e?"mounted":"unmounted",[l,c]=kF(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=uu(n.current);a.current=l==="mounted"?u:"none"},[l]),Ov(()=>{const u=n.current,d=o.current;if(d!==e){const h=a.current,g=uu(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ov(()=>{if(t){const u=p=>{const g=uu(n.current).includes(p.animationName);p.target===t&&g&&dc.flushSync(()=>c("ANIMATION_END"))},d=p=>{p.target===t&&(a.current=uu(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function uu(e){return(e==null?void 0:e.animationName)||"none"}function RF(e,t=[]){let r=[];function n(a,i){const l=f.createContext(i),c=r.length;r=[...r,i];function u(p){const{scope:h,children:g,...y}=p,v=(h==null?void 0:h[e][c])||l,E=f.useMemo(()=>y,Object.values(y));return f.createElement(v.Provider,{value:E},g)}function d(p,h){const g=(h==null?void 0:h[e][c])||l,y=f.useContext(g);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,d]}const o=()=>{const a=r.map(i=>f.createContext(i));return function(l){const c=(l==null?void 0:l[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[n,TF(o,...t)]}function TF(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((l,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...l,...p}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Ta(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const IF=f.createContext(void 0);function DF(e){const t=f.useContext(IF);return e||t||"ltr"}function NF(e,[t,r]){return Math.min(r,Math.max(t,e))}function Va(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function AF(e,t){return f.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Ej="ScrollArea",[Sj,$he]=RF(Ej),[MF,fn]=Sj(Ej),LF=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:a=600,...i}=e,[l,c]=f.useState(null),[u,d]=f.useState(null),[p,h]=f.useState(null),[g,y]=f.useState(null),[v,E]=f.useState(null),[w,b]=f.useState(0),[_,x]=f.useState(0),[S,$]=f.useState(!1),[O,C]=f.useState(!1),T=oi(t,I=>c(I)),k=DF(o);return f.createElement(MF,{scope:r,type:n,dir:k,scrollHideDelay:a,scrollArea:l,viewport:u,onViewportChange:d,content:p,onContentChange:h,scrollbarX:g,onScrollbarXChange:y,scrollbarXEnabled:S,onScrollbarXEnabledChange:$,scrollbarY:v,onScrollbarYChange:E,scrollbarYEnabled:O,onScrollbarYEnabledChange:C,onCornerWidthChange:b,onCornerHeightChange:x},f.createElement(mc.div,et({dir:k},i,{ref:T,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})))}),zF="ScrollAreaViewport",FF=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,a=fn(zF,r),i=f.useRef(null),l=oi(t,i,a.onViewportChange);return f.createElement(f.Fragment,null,f.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),f.createElement(mc.div,et({"data-radix-scroll-area-viewport":""},o,{ref:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style}}),f.createElement("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),Oo="ScrollAreaScrollbar",VF=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=fn(Oo,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,l=e.orientation==="horizontal";return f.useEffect(()=>(l?a(!0):i(!0),()=>{l?a(!1):i(!1)}),[l,a,i]),o.type==="hover"?f.createElement(BF,et({},n,{ref:t,forceMount:r})):o.type==="scroll"?f.createElement(UF,et({},n,{ref:t,forceMount:r})):o.type==="auto"?f.createElement(Pj,et({},n,{ref:t,forceMount:r})):o.type==="always"?f.createElement(p0,et({},n,{ref:t})):null}),BF=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=fn(Oo,e.__scopeScrollArea),[a,i]=f.useState(!1);return f.useEffect(()=>{const l=o.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),f.createElement(hc,{present:r||a},f.createElement(Pj,et({"data-state":a?"visible":"hidden"},n,{ref:t})))}),UF=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=fn(Oo,e.__scopeScrollArea),a=e.orientation==="horizontal",i=Am(()=>c("SCROLL_END"),100),[l,c]=AF("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return f.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,o.scrollHideDelay,c]),f.useEffect(()=>{const u=o.viewport,d=a?"scrollLeft":"scrollTop";if(u){let p=u[d];const h=()=>{const g=u[d];p!==g&&(c("SCROLL"),i()),p=g};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[o.viewport,a,c,i]),f.createElement(hc,{present:r||l!=="hidden"},f.createElement(p0,et({"data-state":l==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:Va(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Va(e.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),Pj=f.forwardRef((e,t)=>{const r=fn(Oo,e.__scopeScrollArea),{forceMount:n,...o}=e,[a,i]=f.useState(!1),l=e.orientation==="horizontal",c=Am(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;i(l?u:d)}},10);return pl(r.viewport,c),pl(r.content,c),f.createElement(hc,{present:n||a},f.createElement(p0,et({"data-state":a?"visible":"hidden"},o,{ref:t})))}),p0=f.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=fn(Oo,e.__scopeScrollArea),a=f.useRef(null),i=f.useRef(0),[l,c]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=kj(l.viewport,l.content),d={...n,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function p(h,g){return XF(h,i.current,l,g)}return r==="horizontal"?f.createElement(WF,et({},d,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const h=o.viewport.scrollLeft,g=q_(h,l,o.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=p(h,o.dir))}})):r==="vertical"?f.createElement(HF,et({},d,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const h=o.viewport.scrollTop,g=q_(h,l);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=p(h))}})):null}),WF=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,a=fn(Oo,e.__scopeScrollArea),[i,l]=f.useState(),c=f.useRef(null),u=oi(t,c,a.onScrollbarXChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),f.createElement(Oj,et({"data-orientation":"horizontal"},o,{ref:u,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Nm(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(a.viewport){const h=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),Rj(h,p)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&i&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Xd(i.paddingLeft),paddingEnd:Xd(i.paddingRight)}})}}))}),HF=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,a=fn(Oo,e.__scopeScrollArea),[i,l]=f.useState(),c=f.useRef(null),u=oi(t,c,a.onScrollbarYChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),f.createElement(Oj,et({"data-orientation":"vertical"},o,{ref:u,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Nm(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(a.viewport){const h=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),Rj(h,p)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&i&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Xd(i.paddingTop),paddingEnd:Xd(i.paddingBottom)}})}}))}),[qF,$j]=Sj(Oo),Oj=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:p,...h}=e,g=fn(Oo,r),[y,v]=f.useState(null),E=oi(t,T=>v(T)),w=f.useRef(null),b=f.useRef(""),_=g.viewport,x=n.content-n.viewport,S=Ta(d),$=Ta(c),O=Am(p,10);function C(T){if(w.current){const k=T.clientX-w.current.left,I=T.clientY-w.current.top;u({x:k,y:I})}}return f.useEffect(()=>{const T=k=>{const I=k.target;(y==null?void 0:y.contains(I))&&S(k,x)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[_,y,x,S]),f.useEffect($,[n,$]),pl(y,O),pl(g.content,O),f.createElement(qF,{scope:r,scrollbar:y,hasThumb:o,onThumbChange:Ta(a),onThumbPointerUp:Ta(i),onThumbPositionChange:$,onThumbPointerDown:Ta(l)},f.createElement(mc.div,et({},h,{ref:E,style:{position:"absolute",...h.style},onPointerDown:Va(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),w.current=y.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",C(T))}),onPointerMove:Va(e.onPointerMove,C),onPointerUp:Va(e.onPointerUp,T=>{const k=T.target;k.hasPointerCapture(T.pointerId)&&k.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=b.current,w.current=null})})))}),Cv="ScrollAreaThumb",GF=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=$j(Cv,e.__scopeScrollArea);return f.createElement(hc,{present:r||o.hasThumb},f.createElement(QF,et({ref:t},n)))}),QF=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,a=fn(Cv,r),i=$j(Cv,r),{onThumbPositionChange:l}=i,c=oi(t,p=>i.onThumbChange(p)),u=f.useRef(),d=Am(()=>{u.current&&(u.current(),u.current=void 0)},100);return f.useEffect(()=>{const p=a.viewport;if(p){const h=()=>{if(d(),!u.current){const g=JF(p,l);u.current=g,l()}};return l(),p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[a.viewport,d,l]),f.createElement(mc.div,et({"data-state":i.hasThumb?"visible":"hidden"},o,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Va(e.onPointerDownCapture,p=>{const g=p.target.getBoundingClientRect(),y=p.clientX-g.left,v=p.clientY-g.top;i.onThumbPointerDown({x:y,y:v})}),onPointerUp:Va(e.onPointerUp,i.onThumbPointerUp)}))}),Cj="ScrollAreaCorner",KF=f.forwardRef((e,t)=>{const r=fn(Cj,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?f.createElement(YF,et({},e,{ref:t})):null}),YF=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=fn(Cj,r),[a,i]=f.useState(0),[l,c]=f.useState(0),u=!!(a&&l);return pl(o.scrollbarX,()=>{var d;const p=((d=o.scrollbarX)===null||d===void 0?void 0:d.offsetHeight)||0;o.onCornerHeightChange(p),c(p)}),pl(o.scrollbarY,()=>{var d;const p=((d=o.scrollbarY)===null||d===void 0?void 0:d.offsetWidth)||0;o.onCornerWidthChange(p),i(p)}),u?f.createElement(mc.div,et({},n,{ref:t,style:{width:a,height:l,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Xd(e){return e?parseInt(e,10):0}function kj(e,t){const r=e/t;return isNaN(r)?0:r}function Nm(e){const t=kj(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function XF(e,t,r,n="ltr"){const o=Nm(r),a=o/2,i=t||a,l=o-i,c=r.scrollbar.paddingStart+i,u=r.scrollbar.size-r.scrollbar.paddingEnd-l,d=r.content-r.viewport,p=n==="ltr"?[0,d]:[d*-1,0];return jj([c,u],p)(e)}function q_(e,t,r="ltr"){const n=Nm(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,l=a-n,c=r==="ltr"?[0,i]:[i*-1,0],u=NF(e,c);return jj([0,i],[0,l])(u)}function jj(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Rj(e,t){return e>0&&e<t}const JF=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=r.left!==a.left,l=r.top!==a.top;(i||l)&&t(),r=a,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Am(e,t){const r=Ta(e),n=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(n.current),[]),f.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function pl(e,t){const r=Ta(t);Ov(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const ZF=LF,eV=FF,G_=VF,Q_=GF,tV=KF;var rV=H((e,{scrollbarSize:t,offsetScrollbars:r,scrollbarHovered:n,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:r?P(t):void 0,paddingBottom:r?P(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${P(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${zt("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:P(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:P(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:zt("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:P(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:P(44),minHeight:P(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:n?1:0,display:o?"none":void 0}}));const nV=rV;var oV=Object.defineProperty,aV=Object.defineProperties,iV=Object.getOwnPropertyDescriptors,Jd=Object.getOwnPropertySymbols,Tj=Object.prototype.hasOwnProperty,Ij=Object.prototype.propertyIsEnumerable,K_=(e,t,r)=>t in e?oV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kv=(e,t)=>{for(var r in t||(t={}))Tj.call(t,r)&&K_(e,r,t[r]);if(Jd)for(var r of Jd(t))Ij.call(t,r)&&K_(e,r,t[r]);return e},Dj=(e,t)=>aV(e,iV(t)),Nj=(e,t)=>{var r={};for(var n in e)Tj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Jd)for(var n of Jd(e))t.indexOf(n)<0&&Ij.call(e,n)&&(r[n]=e[n]);return r};const Aj={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},Mm=f.forwardRef((e,t)=>{const r=G("ScrollArea",Aj,e),{children:n,className:o,classNames:a,styles:i,scrollbarSize:l,scrollHideDelay:c,type:u,dir:d,offsetScrollbars:p,viewportRef:h,onScrollPositionChange:g,unstyled:y,variant:v,viewportProps:E}=r,w=Nj(r,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[b,_]=f.useState(!1),x=or(),{classes:S,cx:$}=nV({scrollbarSize:l,offsetScrollbars:p,scrollbarHovered:b,hidden:u==="never"},{name:"ScrollArea",classNames:a,styles:i,unstyled:y,variant:v});return s.createElement(ZF,{type:u==="never"?"always":u,scrollHideDelay:c,dir:d||x.dir,ref:t,asChild:!0},s.createElement(le,kv({className:$(S.root,o)},w),s.createElement(eV,Dj(kv({},E),{className:S.viewport,ref:h,onScroll:typeof g=="function"?({currentTarget:O})=>g({x:O.scrollLeft,y:O.scrollTop}):void 0}),n),s.createElement(G_,{orientation:"horizontal",className:S.scrollbar,forceMount:!0,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1)},s.createElement(Q_,{className:S.thumb})),s.createElement(G_,{orientation:"vertical",className:S.scrollbar,forceMount:!0,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1)},s.createElement(Q_,{className:S.thumb})),s.createElement(tV,{className:S.corner})))}),Mj=f.forwardRef((e,t)=>{const r=G("ScrollAreaAutosize",Aj,e),{children:n,classNames:o,styles:a,scrollbarSize:i,scrollHideDelay:l,type:c,dir:u,offsetScrollbars:d,viewportRef:p,onScrollPositionChange:h,unstyled:g,sx:y,variant:v,viewportProps:E}=r,w=Nj(r,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return s.createElement(le,Dj(kv({},w),{ref:t,sx:[{display:"flex"},...nm(y)]}),s.createElement(le,{sx:{display:"flex",flexDirection:"column",flex:1}},s.createElement(Mm,{classNames:o,styles:a,scrollHideDelay:l,scrollbarSize:i,type:c,dir:u,offsetScrollbars:d,viewportRef:p,onScrollPositionChange:h,unstyled:g,variant:v,viewportProps:E},n)))});Mj.displayName="@mantine/core/ScrollAreaAutosize";Mm.displayName="@mantine/core/ScrollArea";Mm.Autosize=Mj;const ai=Mm;var lV=Object.defineProperty,sV=Object.defineProperties,cV=Object.getOwnPropertyDescriptors,Zd=Object.getOwnPropertySymbols,Lj=Object.prototype.hasOwnProperty,zj=Object.prototype.propertyIsEnumerable,Y_=(e,t,r)=>t in e?lV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X_=(e,t)=>{for(var r in t||(t={}))Lj.call(t,r)&&Y_(e,r,t[r]);if(Zd)for(var r of Zd(t))zj.call(t,r)&&Y_(e,r,t[r]);return e},uV=(e,t)=>sV(e,cV(t)),dV=(e,t)=>{var r={};for(var n in e)Lj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Zd)for(var n of Zd(e))t.indexOf(n)<0&&zj.call(e,n)&&(r[n]=e[n]);return r};const m0=f.forwardRef((e,t)=>{var r=e,{style:n}=r,o=dV(r,["style"]);return s.createElement(ai,uV(X_({},o),{style:X_({width:"100%"},n),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});m0.displayName="@mantine/core/SelectScrollArea";var fV=H(()=>({dropdown:{},itemsWrapper:{padding:P(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const pV=fV,On=Math.min,er=Math.max,ef=Math.round,du=Math.floor,sa=e=>({x:e,y:e}),mV={left:"right",right:"left",bottom:"top",top:"bottom"},hV={start:"end",end:"start"};function jv(e,t,r){return er(e,On(t,r))}function bo(e,t){return typeof e=="function"?e(t):e}function Cn(e){return e.split("-")[0]}function kl(e){return e.split("-")[1]}function h0(e){return e==="x"?"y":"x"}function g0(e){return e==="y"?"height":"width"}function ii(e){return["top","bottom"].includes(Cn(e))?"y":"x"}function v0(e){return h0(ii(e))}function gV(e,t,r){r===void 0&&(r=!1);const n=kl(e),o=v0(e),a=g0(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=tf(i)),[i,tf(i)]}function vV(e){const t=tf(e);return[Rv(e),t,Rv(t)]}function Rv(e){return e.replace(/start|end/g,t=>hV[t])}function yV(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:i;default:return[]}}function wV(e,t,r,n){const o=kl(e);let a=yV(Cn(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Rv)))),a}function tf(e){return e.replace(/left|right|bottom|top/g,t=>mV[t])}function bV(e){return{top:0,right:0,bottom:0,left:0,...e}}function y0(e){return typeof e!="number"?bV(e):{top:e,right:e,bottom:e,left:e}}function ml(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function J_(e,t,r){let{reference:n,floating:o}=e;const a=ii(t),i=v0(t),l=g0(i),c=Cn(t),u=a==="y",d=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,h=n[l]/2-o[l]/2;let g;switch(c){case"top":g={x:d,y:n.y-o.height};break;case"bottom":g={x:d,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:p};break;case"left":g={x:n.x-o.width,y:p};break;default:g={x:n.x,y:n.y}}switch(kl(t)){case"start":g[i]-=h*(r&&u?-1:1);break;case"end":g[i]+=h*(r&&u?-1:1);break}return g}const _V=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=J_(u,n,c),h=n,g={},y=0;for(let v=0;v<l.length;v++){const{name:E,fn:w}=l[v],{x:b,y:_,data:x,reset:S}=await w({x:d,y:p,initialPlacement:n,placement:h,strategy:o,middlewareData:g,rects:u,platform:i,elements:{reference:e,floating:t}});if(d=b??d,p=_??p,g={...g,[E]:{...g[E],...x}},S&&y<=50){y++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:d,y:p}=J_(u,h,c)),v=-1;continue}}return{x:d,y:p,placement:h,strategy:o,middlewareData:g}};async function w0(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:g=0}=bo(t,e),y=y0(g),E=l[h?p==="floating"?"reference":"floating":p],w=ml(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(E)))==null||r?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),b=p==="floating"?{...i.floating,x:n,y:o}:i.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),x=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},S=ml(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:_,strategy:c}):b);return{top:(w.top-S.top+y.top)/x.y,bottom:(S.bottom-w.bottom+y.bottom)/x.y,left:(w.left-S.left+y.left)/x.x,right:(S.right-w.right+y.right)/x.x}}const Z_=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=bo(e,t)||{};if(u==null)return{};const p=y0(d),h={x:r,y:n},g=v0(o),y=g0(g),v=await i.getDimensions(u),E=g==="y",w=E?"top":"left",b=E?"bottom":"right",_=E?"clientHeight":"clientWidth",x=a.reference[y]+a.reference[g]-h[g]-a.floating[y],S=h[g]-a.reference[g],$=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let O=$?$[_]:0;(!O||!await(i.isElement==null?void 0:i.isElement($)))&&(O=l.floating[_]||a.floating[y]);const C=x/2-S/2,T=O/2-v[y]/2-1,k=On(p[w],T),I=On(p[b],T),j=k,N=O-v[y]-I,D=O/2-v[y]/2+C,z=jv(j,D,N),W=!c.arrow&&kl(o)!=null&&D!=z&&a.reference[y]/2-(D<j?k:I)-v[y]/2<0,K=W?D<j?D-j:D-N:0;return{[g]:h[g]+K,data:{[g]:z,centerOffset:D-z-K,...W&&{alignmentOffset:K}},reset:W}}}),Fj=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...E}=bo(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const w=Cn(o),b=Cn(l)===l,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),x=h||(b||!v?[tf(l)]:vV(l));!h&&y!=="none"&&x.push(...wV(l,v,y,_));const S=[l,...x],$=await w0(t,E),O=[];let C=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&O.push($[w]),p){const j=gV(o,i,_);O.push($[j[0]],$[j[1]])}if(C=[...C,{placement:o,overflows:O}],!O.every(j=>j<=0)){var T,k;const j=(((T=a.flip)==null?void 0:T.index)||0)+1,N=S[j];if(N)return{data:{index:j,overflows:C},reset:{placement:N}};let D=(k=C.filter(z=>z.overflows[0]<=0).sort((z,W)=>z.overflows[1]-W.overflows[1])[0])==null?void 0:k.placement;if(!D)switch(g){case"bestFit":{var I;const z=(I=C.map(W=>[W.placement,W.overflows.filter(K=>K>0).reduce((K,R)=>K+R,0)]).sort((W,K)=>W[1]-K[1])[0])==null?void 0:I[0];z&&(D=z);break}case"initialPlacement":D=l;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function Vj(e){const t=On(...e.map(a=>a.left)),r=On(...e.map(a=>a.top)),n=er(...e.map(a=>a.right)),o=er(...e.map(a=>a.bottom));return{x:t,y:r,width:n-t,height:o-r}}function xV(e){const t=e.slice().sort((o,a)=>o.y-a.y),r=[];let n=null;for(let o=0;o<t.length;o++){const a=t[o];!n||a.y-n.y>n.height/2?r.push([a]):r[r.length-1].push(a),n=a}return r.map(o=>ml(Vj(o)))}const Bj=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:o,platform:a,strategy:i}=t,{padding:l=2,x:c,y:u}=bo(e,t),d=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(n.reference))||[]),p=xV(d),h=ml(Vj(d)),g=y0(l);function y(){if(p.length===2&&p[0].left>p[1].right&&c!=null&&u!=null)return p.find(E=>c>E.left-g.left&&c<E.right+g.right&&u>E.top-g.top&&u<E.bottom+g.bottom)||h;if(p.length>=2){if(ii(r)==="y"){const k=p[0],I=p[p.length-1],j=Cn(r)==="top",N=k.top,D=I.bottom,z=j?k.left:I.left,W=j?k.right:I.right,K=W-z,R=D-N;return{top:N,bottom:D,left:z,right:W,width:K,height:R,x:z,y:N}}const E=Cn(r)==="left",w=er(...p.map(k=>k.right)),b=On(...p.map(k=>k.left)),_=p.filter(k=>E?k.left===b:k.right===w),x=_[0].top,S=_[_.length-1].bottom,$=b,O=w,C=O-$,T=S-x;return{top:x,bottom:S,left:$,right:O,width:C,height:T,x:$,y:x}}return h}const v=await a.getElementRects({reference:{getBoundingClientRect:y},floating:n.floating,strategy:i});return o.reference.x!==v.reference.x||o.reference.y!==v.reference.y||o.reference.width!==v.reference.width||o.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}};async function EV(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Cn(r),l=kl(r),c=ii(r)==="y",u=["left","top"].includes(i)?-1:1,d=a&&c?-1:1,p=bo(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return l&&typeof y=="number"&&(g=l==="end"?y*-1:y),c?{x:g*d,y:h*u}:{x:h*u,y:g*d}}const Uj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await EV(t,e);return{x:r+o.x,y:n+o.y,data:o}}}},b0=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:E=>{let{x:w,y:b}=E;return{x:w,y:b}}},...c}=bo(e,t),u={x:r,y:n},d=await w0(t,c),p=ii(Cn(o)),h=h0(p);let g=u[h],y=u[p];if(a){const E=h==="y"?"top":"left",w=h==="y"?"bottom":"right",b=g+d[E],_=g-d[w];g=jv(b,g,_)}if(i){const E=p==="y"?"top":"left",w=p==="y"?"bottom":"right",b=y+d[E],_=y-d[w];y=jv(b,y,_)}const v=l.fn({...t,[h]:g,[p]:y});return{...v,data:{x:v.x-r,y:v.y-n}}}}},SV=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=bo(e,t),d={x:r,y:n},p=ii(o),h=h0(p);let g=d[h],y=d[p];const v=bo(l,t),E=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const _=h==="y"?"height":"width",x=a.reference[h]-a.floating[_]+E.mainAxis,S=a.reference[h]+a.reference[_]-E.mainAxis;g<x?g=x:g>S&&(g=S)}if(u){var w,b;const _=h==="y"?"width":"height",x=["top","left"].includes(Cn(o)),S=a.reference[p]-a.floating[_]+(x&&((w=i.offset)==null?void 0:w[p])||0)+(x?0:E.crossAxis),$=a.reference[p]+a.reference[_]+(x?0:((b=i.offset)==null?void 0:b[p])||0)-(x?E.crossAxis:0);y<S?y=S:y>$&&(y=$)}return{[h]:g,[p]:y}}}},PV=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:a}=t,{apply:i=()=>{},...l}=bo(e,t),c=await w0(t,l),u=Cn(r),d=kl(r),p=ii(r)==="y",{width:h,height:g}=n.floating;let y,v;u==="top"||u==="bottom"?(y=u,v=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=u,y=d==="end"?"top":"bottom");const E=g-c[y],w=h-c[v],b=!t.middlewareData.shift;let _=E,x=w;if(p){const $=h-c.left-c.right;x=d||b?On(w,$):$}else{const $=g-c.top-c.bottom;_=d||b?On(E,$):$}if(b&&!d){const $=er(c.left,0),O=er(c.right,0),C=er(c.top,0),T=er(c.bottom,0);p?x=h-2*($!==0||O!==0?$+O:er(c.left,c.right)):_=g-2*(C!==0||T!==0?C+T:er(c.top,c.bottom))}await i({...t,availableWidth:x,availableHeight:_});const S=await o.getDimensions(a.floating);return h!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}};function ca(e){return Wj(e)?(e.nodeName||"").toLowerCase():"#document"}function Br(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Co(e){var t;return(t=(Wj(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wj(e){return e instanceof Node||e instanceof Br(e).Node}function _o(e){return e instanceof Element||e instanceof Br(e).Element}function Xn(e){return e instanceof HTMLElement||e instanceof Br(e).HTMLElement}function ex(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Br(e).ShadowRoot}function gc(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function $V(e){return["table","td","th"].includes(ca(e))}function _0(e){const t=x0(),r=dn(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function OV(e){let t=hl(e);for(;Xn(t)&&!Lm(t);){if(_0(t))return t;t=hl(t)}return null}function x0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Lm(e){return["html","body","#document"].includes(ca(e))}function dn(e){return Br(e).getComputedStyle(e)}function zm(e){return _o(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function hl(e){if(ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ex(e)&&e.host||Co(e);return ex(t)?t.host:t}function Hj(e){const t=hl(e);return Lm(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xn(t)&&gc(t)?t:Hj(t)}function fo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Hj(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=Br(o);return a?t.concat(i,i.visualViewport||[],gc(o)?o:[],i.frameElement&&r?fo(i.frameElement):[]):t.concat(o,fo(o,[],r))}function qj(e){const t=dn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Xn(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=ef(r)!==a||ef(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function E0(e){return _o(e)?e:e.contextElement}function tl(e){const t=E0(e);if(!Xn(t))return sa(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=qj(t);let i=(a?ef(r.width):r.width)/n,l=(a?ef(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const CV=sa(0);function Gj(e){const t=Br(e);return!x0()||!t.visualViewport?CV:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kV(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Br(e)?!1:t}function Qa(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=E0(e);let i=sa(1);t&&(n?_o(n)&&(i=tl(n)):i=tl(e));const l=kV(a,r,n)?Gj(a):sa(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,d=o.width/i.x,p=o.height/i.y;if(a){const h=Br(a),g=n&&_o(n)?Br(n):n;let y=h.frameElement;for(;y&&n&&g!==h;){const v=tl(y),E=y.getBoundingClientRect(),w=dn(y),b=E.left+(y.clientLeft+parseFloat(w.paddingLeft))*v.x,_=E.top+(y.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,p*=v.y,c+=b,u+=_,y=Br(y).frameElement}}return ml({width:d,height:p,x:c,y:u})}function jV(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Xn(r),a=Co(r);if(r===a)return t;let i={scrollLeft:0,scrollTop:0},l=sa(1);const c=sa(0);if((o||!o&&n!=="fixed")&&((ca(r)!=="body"||gc(a))&&(i=zm(r)),Xn(r))){const u=Qa(r);l=tl(r),c.x=u.x+r.clientLeft,c.y=u.y+r.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-i.scrollLeft*l.x+c.x,y:t.y*l.y-i.scrollTop*l.y+c.y}}function RV(e){return Array.from(e.getClientRects())}function Qj(e){return Qa(Co(e)).left+zm(e).scrollLeft}function TV(e){const t=Co(e),r=zm(e),n=e.ownerDocument.body,o=er(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=er(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Qj(e);const l=-r.scrollTop;return dn(n).direction==="rtl"&&(i+=er(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:l}}function IV(e,t){const r=Br(e),n=Co(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,c=0;if(o){a=o.width,i=o.height;const u=x0();(!u||u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:l,y:c}}function DV(e,t){const r=Qa(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Xn(e)?tl(e):sa(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,c=o*a.x,u=n*a.y;return{width:i,height:l,x:c,y:u}}function tx(e,t,r){let n;if(t==="viewport")n=IV(e,r);else if(t==="document")n=TV(Co(e));else if(_o(t))n=DV(t,r);else{const o=Gj(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return ml(n)}function Kj(e,t){const r=hl(e);return r===t||!_o(r)||Lm(r)?!1:dn(r).position==="fixed"||Kj(r,t)}function NV(e,t){const r=t.get(e);if(r)return r;let n=fo(e,[],!1).filter(l=>_o(l)&&ca(l)!=="body"),o=null;const a=dn(e).position==="fixed";let i=a?hl(e):e;for(;_o(i)&&!Lm(i);){const l=dn(i),c=_0(i);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||gc(i)&&!c&&Kj(e,i))?n=n.filter(d=>d!==i):o=l,i=hl(i)}return t.set(e,n),n}function AV(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?NV(t,this._c):[].concat(r),n],l=i[0],c=i.reduce((u,d)=>{const p=tx(t,d,o);return u.top=er(p.top,u.top),u.right=On(p.right,u.right),u.bottom=On(p.bottom,u.bottom),u.left=er(p.left,u.left),u},tx(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function MV(e){return qj(e)}function LV(e,t,r){const n=Xn(t),o=Co(t),a=r==="fixed",i=Qa(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=sa(0);if(n||!n&&!a)if((ca(t)!=="body"||gc(o))&&(l=zm(t)),n){const u=Qa(t,!0,a,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Qj(o));return{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function rx(e,t){return!Xn(e)||dn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Yj(e,t){const r=Br(e);if(!Xn(e))return r;let n=rx(e,t);for(;n&&$V(n)&&dn(n).position==="static";)n=rx(n,t);return n&&(ca(n)==="html"||ca(n)==="body"&&dn(n).position==="static"&&!_0(n))?r:n||OV(e)||r}const zV=async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||Yj,a=this.getDimensions;return{reference:LV(t,await o(r),n),floating:{x:0,y:0,...await a(r)}}};function FV(e){return dn(e).direction==="rtl"}const VV={convertOffsetParentRelativeRectToViewportRelativeRect:jV,getDocumentElement:Co,getClippingRect:AV,getOffsetParent:Yj,getElementRects:zV,getClientRects:RV,getDimensions:MV,getScale:tl,isElement:_o,isRTL:FV};function BV(e,t){let r=null,n;const o=Co(e);function a(){clearTimeout(n),r&&r.disconnect(),r=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const{left:u,top:d,width:p,height:h}=e.getBoundingClientRect();if(l||t(),!p||!h)return;const g=du(d),y=du(o.clientWidth-(u+p)),v=du(o.clientHeight-(d+h)),E=du(u),b={rootMargin:-g+"px "+-y+"px "+-v+"px "+-E+"px",threshold:er(0,On(1,c))||1};let _=!0;function x(S){const $=S[0].intersectionRatio;if($!==c){if(!_)return i();$?i(!1,$):n=setTimeout(()=>{i(!1,1e-7)},100)}_=!1}try{r=new IntersectionObserver(x,{...b,root:o.ownerDocument})}catch{r=new IntersectionObserver(x,b)}r.observe(e)}return i(!0),a}function UV(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=E0(e),d=o||a?[...u?fo(u):[],...fo(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),a&&w.addEventListener("resize",r)});const p=u&&l?BV(u,r):null;let h=-1,g=null;i&&(g=new ResizeObserver(w=>{let[b]=w;b&&b.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{g&&g.observe(t)})),r()}),u&&!c&&g.observe(u),g.observe(t));let y,v=c?Qa(e):null;c&&E();function E(){const w=Qa(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&r(),v=w,y=requestAnimationFrame(E)}return r(),()=>{d.forEach(w=>{o&&w.removeEventListener("scroll",r),a&&w.removeEventListener("resize",r)}),p&&p(),g&&g.disconnect(),g=null,c&&cancelAnimationFrame(y)}}const WV=(e,t,r)=>{const n=new Map,o={platform:VV,...r},a={...o.platform,_c:n};return _V(e,t,{...o,platform:a})},Xj=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?Z_({element:t.current,padding:r}).fn(o):{}:t?Z_({element:t,padding:r}).fn(o):{}}}};var Xu=typeof document<"u"?f.useLayoutEffect:f.useEffect;function rf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!rf(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!rf(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function nx(e){const t=f.useRef(e);return Xu(()=>{t.current=e}),t}function HV(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,whileElementsMounted:a,open:i}=e,[l,c]=f.useState({x:null,y:null,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[u,d]=f.useState(n);rf(u,n)||d(n);const p=f.useRef(null),h=f.useRef(null),g=f.useRef(l),y=nx(a),v=nx(o),[E,w]=f.useState(null),[b,_]=f.useState(null),x=f.useCallback(k=>{p.current!==k&&(p.current=k,w(k))},[]),S=f.useCallback(k=>{h.current!==k&&(h.current=k,_(k))},[]),$=f.useCallback(()=>{if(!p.current||!h.current)return;const k={placement:t,strategy:r,middleware:u};v.current&&(k.platform=v.current),WV(p.current,h.current,k).then(I=>{const j={...I,isPositioned:!0};O.current&&!rf(g.current,j)&&(g.current=j,dc.flushSync(()=>{c(j)}))})},[u,t,r,v]);Xu(()=>{i===!1&&g.current.isPositioned&&(g.current.isPositioned=!1,c(k=>({...k,isPositioned:!1})))},[i]);const O=f.useRef(!1);Xu(()=>(O.current=!0,()=>{O.current=!1}),[]),Xu(()=>{if(E&&b){if(y.current)return y.current(E,b,$);$()}},[E,b,$,y]);const C=f.useMemo(()=>({reference:p,floating:h,setReference:x,setFloating:S}),[x,S]),T=f.useMemo(()=>({reference:E,floating:b}),[E,b]);return f.useMemo(()=>({...l,update:$,refs:C,elements:T,reference:x,floating:S}),[l,$,C,T,x,S])}var gl=typeof document<"u"?f.useLayoutEffect:f.useEffect;let Gh=!1,qV=0;const ox=()=>"floating-ui-"+qV++;function GV(){const[e,t]=f.useState(()=>Gh?ox():void 0);return gl(()=>{e==null&&t(ox())},[]),f.useEffect(()=>{Gh||(Gh=!0)},[]),e}const QV=js["useId".toString()],ax=QV||GV;function KV(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){e.set(t,(e.get(t)||[]).filter(n=>n!==r))}}}const YV=f.createContext(null),XV=f.createContext(null),Jj=()=>{var e;return((e=f.useContext(YV))==null?void 0:e.id)||null},S0=()=>f.useContext(XV);function Qo(e){return(e==null?void 0:e.ownerDocument)||document}function JV(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ZV(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function P0(e){return Qo(e).defaultView||window}function Hn(e){return e?e instanceof P0(e).Element:!1}function Zj(e){return e?e instanceof P0(e).HTMLElement:!1}function eB(e){if(typeof ShadowRoot>"u")return!1;const t=P0(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function tB(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(JV())||t.test(ZV()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function rB(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function eR(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function ix(e){const t=f.useRef(e);return gl(()=>{t.current=e}),t}const lx="data-floating-ui-safe-polygon";function Ju(e,t,r){return r&&!eR(r)?0:typeof e=="number"?e:e==null?void 0:e[t]}const nB=function(e,t){let{enabled:r=!0,delay:n=0,handleClose:o=null,mouseOnly:a=!1,restMs:i=0,move:l=!0}=t===void 0?{}:t;const{open:c,onOpenChange:u,dataRef:d,events:p,elements:{domReference:h,floating:g},refs:y}=e,v=S0(),E=Jj(),w=ix(o),b=ix(n),_=f.useRef(),x=f.useRef(),S=f.useRef(),$=f.useRef(),O=f.useRef(!0),C=f.useRef(!1),T=f.useRef(()=>{}),k=f.useCallback(()=>{var D;const z=(D=d.current.openEvent)==null?void 0:D.type;return(z==null?void 0:z.includes("mouse"))&&z!=="mousedown"},[d]);f.useEffect(()=>{if(!r)return;function D(){clearTimeout(x.current),clearTimeout($.current),O.current=!0}return p.on("dismiss",D),()=>{p.off("dismiss",D)}},[r,p]),f.useEffect(()=>{if(!r||!w.current||!c)return;function D(){k()&&u(!1)}const z=Qo(g).documentElement;return z.addEventListener("mouseleave",D),()=>{z.removeEventListener("mouseleave",D)}},[g,c,u,r,w,d,k]);const I=f.useCallback(function(D){D===void 0&&(D=!0);const z=Ju(b.current,"close",_.current);z&&!S.current?(clearTimeout(x.current),x.current=setTimeout(()=>u(!1),z)):D&&(clearTimeout(x.current),u(!1))},[b,u]),j=f.useCallback(()=>{T.current(),S.current=void 0},[]),N=f.useCallback(()=>{if(C.current){const D=Qo(y.floating.current).body;D.style.pointerEvents="",D.removeAttribute(lx),C.current=!1}},[y]);return f.useEffect(()=>{if(!r)return;function D(){return d.current.openEvent?["click","mousedown"].includes(d.current.openEvent.type):!1}function z(R){if(clearTimeout(x.current),O.current=!1,a&&!eR(_.current)||i>0&&Ju(b.current,"open")===0)return;d.current.openEvent=R;const A=Ju(b.current,"open",_.current);A?x.current=setTimeout(()=>{u(!0)},A):u(!0)}function W(R){if(D())return;T.current();const A=Qo(g);if(clearTimeout($.current),w.current){c||clearTimeout(x.current),S.current=w.current({...e,tree:v,x:R.clientX,y:R.clientY,onClose(){N(),j(),I()}});const V=S.current;A.addEventListener("mousemove",V),T.current=()=>{A.removeEventListener("mousemove",V)};return}I()}function K(R){D()||w.current==null||w.current({...e,tree:v,x:R.clientX,y:R.clientY,onClose(){N(),j(),I()}})(R)}if(Hn(h)){const R=h;return c&&R.addEventListener("mouseleave",K),g==null||g.addEventListener("mouseleave",K),l&&R.addEventListener("mousemove",z,{once:!0}),R.addEventListener("mouseenter",z),R.addEventListener("mouseleave",W),()=>{c&&R.removeEventListener("mouseleave",K),g==null||g.removeEventListener("mouseleave",K),l&&R.removeEventListener("mousemove",z),R.removeEventListener("mouseenter",z),R.removeEventListener("mouseleave",W)}}},[h,g,r,e,a,i,l,I,j,N,u,c,v,b,w,d]),gl(()=>{var D;if(r&&c&&(D=w.current)!=null&&D.__options.blockPointerEvents&&k()){const K=Qo(g).body;if(K.setAttribute(lx,""),K.style.pointerEvents="none",C.current=!0,Hn(h)&&g){var z,W;const R=h,A=v==null||(z=v.nodesRef.current.find(V=>V.id===E))==null||(W=z.context)==null?void 0:W.elements.floating;return A&&(A.style.pointerEvents=""),R.style.pointerEvents="auto",g.style.pointerEvents="auto",()=>{R.style.pointerEvents="",g.style.pointerEvents=""}}}},[r,c,E,g,h,v,w,d,k]),gl(()=>{c||(_.current=void 0,j(),N())},[c,j,N]),f.useEffect(()=>()=>{j(),clearTimeout(x.current),clearTimeout($.current),N()},[r,j,N]),f.useMemo(()=>{if(!r)return{};function D(z){_.current=z.pointerType}return{reference:{onPointerDown:D,onPointerEnter:D,onMouseMove(){c||i===0||(clearTimeout($.current),$.current=setTimeout(()=>{O.current||u(!0)},i))}},floating:{onMouseEnter(){clearTimeout(x.current)},onMouseLeave(){p.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),I(!1)}}}},[p,r,i,c,u,I])},tR=f.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),rR=()=>f.useContext(tR),oB=e=>{let{children:t,delay:r,timeoutMs:n=0}=e;const[o,a]=f.useReducer((c,u)=>({...c,...u}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),i=f.useRef(null),l=f.useCallback(c=>{a({currentId:c})},[]);return gl(()=>{o.currentId?i.current===null?i.current=o.currentId:a({isInstantPhase:!0}):(a({isInstantPhase:!1}),i.current=null)},[o.currentId]),f.createElement(tR.Provider,{value:f.useMemo(()=>({...o,setState:a,setCurrentId:l}),[o,a,l])},t)},aB=(e,t)=>{let{open:r,onOpenChange:n}=e,{id:o}=t;const{currentId:a,setCurrentId:i,initialDelay:l,setState:c,timeoutMs:u}=rR();f.useEffect(()=>{a&&(c({delay:{open:1,close:Ju(l,"close")}}),a!==o&&n(!1))},[o,n,c,a,l]),f.useEffect(()=>{function d(){n(!1),c({delay:l,currentId:null})}if(!r&&a===o)if(u){const p=window.setTimeout(d,u);return()=>{clearTimeout(p)}}else d()},[r,c,a,o,n,l,u]),f.useEffect(()=>{r&&i(o)},[r,i,o])};function iB(e){let t=e.activeElement;for(;((r=t)==null||(n=r.shadowRoot)==null?void 0:n.activeElement)!=null;){var r,n;t=t.shadowRoot.activeElement}return t}function sx(e,t){if(!e||!t)return!1;const r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&eB(r)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function Qh(e,t){let r=e.filter(o=>{var a;return o.parentId===t&&((a=o.context)==null?void 0:a.open)})||[],n=r;for(;n.length;)n=e.filter(o=>{var a;return(a=n)==null?void 0:a.some(i=>{var l;return o.parentId===i.id&&((l=o.context)==null?void 0:l.open)})})||[],r=r.concat(n);return r}function lB(e){return"composedPath"in e?e.composedPath()[0]:e.target}const sB=js["useInsertionEffect".toString()],cB=sB||(e=>e());function nR(e){const t=f.useRef(()=>{});return cB(()=>{t.current=e}),f.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function Zu(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}const uB={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},dB={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},fB=function(e){var t,r;return e===void 0&&(e=!0),{escapeKeyBubbles:typeof e=="boolean"?e:(t=e.escapeKey)!=null?t:!0,outsidePressBubbles:typeof e=="boolean"?e:(r=e.outsidePress)!=null?r:!0}},pB=function(e,t){let{open:r,onOpenChange:n,events:o,nodeId:a,elements:{reference:i,domReference:l,floating:c},dataRef:u}=e,{enabled:d=!0,escapeKey:p=!0,outsidePress:h=!0,outsidePressEvent:g="pointerdown",referencePress:y=!1,referencePressEvent:v="pointerdown",ancestorScroll:E=!1,bubbles:w=!0}=t===void 0?{}:t;const b=S0(),_=Jj()!=null,x=nR(typeof h=="function"?h:()=>!1),S=typeof h=="function"?x:h,$=f.useRef(!1),{escapeKeyBubbles:O,outsidePressBubbles:C}=fB(w);return f.useEffect(()=>{if(!r||!d)return;u.current.__escapeKeyBubbles=O,u.current.__outsidePressBubbles=C;function T(D){if(D.key==="Escape"){const z=b?Qh(b.nodesRef.current,a):[];if(z.length>0){let W=!0;if(z.forEach(K=>{var R;if((R=K.context)!=null&&R.open&&!K.context.dataRef.current.__escapeKeyBubbles){W=!1;return}}),!W)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1)}}function k(D){const z=$.current;if($.current=!1,z||typeof S=="function"&&!S(D))return;const W=lB(D);if(Zj(W)&&c){const A=c.ownerDocument.defaultView||window,V=W.scrollWidth>W.clientWidth,Q=W.scrollHeight>W.clientHeight;let ie=Q&&D.offsetX>W.clientWidth;if(Q&&A.getComputedStyle(W).direction==="rtl"&&(ie=D.offsetX<=W.offsetWidth-W.clientWidth),ie||V&&D.offsetY>W.clientHeight)return}const K=b&&Qh(b.nodesRef.current,a).some(A=>{var V;return Zu(D,(V=A.context)==null?void 0:V.elements.floating)});if(Zu(D,c)||Zu(D,l)||K)return;const R=b?Qh(b.nodesRef.current,a):[];if(R.length>0){let A=!0;if(R.forEach(V=>{var Q;if((Q=V.context)!=null&&Q.open&&!V.context.dataRef.current.__outsidePressBubbles){A=!1;return}}),!A)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:_?{preventScroll:!0}:tB(D)||rB(D)}}),n(!1)}function I(){n(!1)}const j=Qo(c);p&&j.addEventListener("keydown",T),S&&j.addEventListener(g,k);let N=[];return E&&(Hn(l)&&(N=fo(l)),Hn(c)&&(N=N.concat(fo(c))),!Hn(i)&&i&&i.contextElement&&(N=N.concat(fo(i.contextElement)))),N=N.filter(D=>{var z;return D!==((z=j.defaultView)==null?void 0:z.visualViewport)}),N.forEach(D=>{D.addEventListener("scroll",I,{passive:!0})}),()=>{p&&j.removeEventListener("keydown",T),S&&j.removeEventListener(g,k),N.forEach(D=>{D.removeEventListener("scroll",I)})}},[u,c,l,i,p,S,g,o,b,a,r,n,E,d,O,C,_]),f.useEffect(()=>{$.current=!1},[S,g]),f.useMemo(()=>d?{reference:{[uB[v]]:()=>{y&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1))}},floating:{[dB[g]]:()=>{$.current=!0}}}:{},[d,o,y,g,v,n])},mB=function(e,t){let{open:r,onOpenChange:n,dataRef:o,events:a,refs:i,elements:{floating:l,domReference:c}}=e,{enabled:u=!0,keyboardOnly:d=!0}=t===void 0?{}:t;const p=f.useRef(""),h=f.useRef(!1),g=f.useRef();return f.useEffect(()=>{if(!u)return;const v=Qo(l).defaultView||window;function E(){!r&&Zj(c)&&c===iB(Qo(c))&&(h.current=!0)}return v.addEventListener("blur",E),()=>{v.removeEventListener("blur",E)}},[l,c,r,u]),f.useEffect(()=>{if(!u)return;function y(v){(v.type==="referencePress"||v.type==="escapeKey")&&(h.current=!0)}return a.on("dismiss",y),()=>{a.off("dismiss",y)}},[a,u]),f.useEffect(()=>()=>{clearTimeout(g.current)},[]),f.useMemo(()=>u?{reference:{onPointerDown(y){let{pointerType:v}=y;p.current=v,h.current=!!(v&&d)},onMouseLeave(){h.current=!1},onFocus(y){var v;h.current||y.type==="focus"&&((v=o.current.openEvent)==null?void 0:v.type)==="mousedown"&&o.current.openEvent&&Zu(o.current.openEvent,c)||(o.current.openEvent=y.nativeEvent,n(!0))},onBlur(y){h.current=!1;const v=y.relatedTarget,E=Hn(v)&&v.hasAttribute("data-floating-ui-focus-guard")&&v.getAttribute("data-type")==="outside";g.current=setTimeout(()=>{sx(i.floating.current,v)||sx(c,v)||E||n(!1)})}}}:{},[u,d,c,i,o,n])},hB=function(e,t){let{open:r}=e,{enabled:n=!0,role:o="dialog"}=t===void 0?{}:t;const a=ax(),i=ax();return f.useMemo(()=>{const l={id:a,role:o};return n?o==="tooltip"?{reference:{"aria-describedby":r?a:void 0},floating:l}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":r?a:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:i}},floating:{...l,...o==="menu"&&{"aria-labelledby":i}}}:{}},[n,o,r,a,i])};function $0(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:r,nodeId:n}=e,o=HV(e),a=S0(),i=f.useRef(null),l=f.useRef({}),c=f.useState(()=>KV())[0],[u,d]=f.useState(null),p=f.useCallback(w=>{const b=Hn(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;o.refs.setReference(b)},[o.refs]),h=f.useCallback(w=>{(Hn(w)||w===null)&&(i.current=w,d(w)),(Hn(o.refs.reference.current)||o.refs.reference.current===null||w!==null&&!Hn(w))&&o.refs.setReference(w)},[o.refs]),g=f.useMemo(()=>({...o.refs,setReference:h,setPositionReference:p,domReference:i}),[o.refs,h,p]),y=f.useMemo(()=>({...o.elements,domReference:u}),[o.elements,u]),v=nR(r),E=f.useMemo(()=>({...o,refs:g,elements:y,dataRef:l,nodeId:n,events:c,open:t,onOpenChange:v}),[o,n,c,t,v,g,y]);return gl(()=>{const w=a==null?void 0:a.nodesRef.current.find(b=>b.id===n);w&&(w.context=E)}),f.useMemo(()=>({...o,context:E,refs:g,reference:h,positionReference:p}),[o,g,E,h,p])}function Kh(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[r]:null).concat(e).reduce((o,a)=>(a&&Object.entries(a).forEach(i=>{let[l,c]=i;if(l.indexOf("on")===0){if(n.has(l)||n.set(l,[]),typeof c=="function"){var u;(u=n.get(l))==null||u.push(c),o[l]=function(){for(var d,p=arguments.length,h=new Array(p),g=0;g<p;g++)h[g]=arguments[g];(d=n.get(l))==null||d.forEach(y=>y(...h))}}}else o[l]=c}),o),{})}}const gB=function(e){e===void 0&&(e=[]);const t=e,r=f.useCallback(a=>Kh(a,e,"reference"),t),n=f.useCallback(a=>Kh(a,e,"floating"),t),o=f.useCallback(a=>Kh(a,e,"item"),e.map(a=>a==null?void 0:a.item));return f.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])};function oR({opened:e,floating:t,position:r,positionDependencies:n}){const[o,a]=f.useState(0);f.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return UV(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),nn(()=>{t.update()},n),nn(()=>{a(i=>i+1)},[e])}function vB(e){const t=[Uj(e.offset)];return e.middlewares.shift&&t.push(b0({limiter:SV()})),e.middlewares.flip&&t.push(Fj()),e.middlewares.inline&&t.push(Bj()),t.push(Xj({element:e.arrowRef,padding:e.arrowOffset})),t}function yB(e){const[t,r]=Or({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=()=>{var i;(i=e.onClose)==null||i.call(e),r(!1)},o=()=>{var i,l;t?((i=e.onClose)==null||i.call(e),r(!1)):((l=e.onOpen)==null||l.call(e),r(!0))},a=$0({placement:e.position,middleware:[...vB(e),...e.width==="target"?[PV({apply({rects:i}){var l,c;Object.assign((c=(l=a.refs.floating.current)==null?void 0:l.style)!=null?c:{},{width:`${i.reference.width}px`})}})]:[]]});return oR({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:a}),nn(()=>{var i;(i=e.onPositionChange)==null||i.call(e,a.placement)},[a.placement]),nn(()=>{var i,l;e.opened?(l=e.onOpen)==null||l.call(e):(i=e.onClose)==null||i.call(e)},[e.opened]),{floating:a,controlled:typeof e.opened=="boolean",opened:t,onClose:n,onToggle:o}}const aR={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[wB,iR]=Po(aR.context);var bB=Object.defineProperty,_B=Object.defineProperties,xB=Object.getOwnPropertyDescriptors,nf=Object.getOwnPropertySymbols,lR=Object.prototype.hasOwnProperty,sR=Object.prototype.propertyIsEnumerable,cx=(e,t,r)=>t in e?bB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fu=(e,t)=>{for(var r in t||(t={}))lR.call(t,r)&&cx(e,r,t[r]);if(nf)for(var r of nf(t))sR.call(t,r)&&cx(e,r,t[r]);return e},EB=(e,t)=>_B(e,xB(t)),SB=(e,t)=>{var r={};for(var n in e)lR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&nf)for(var n of nf(e))t.indexOf(n)<0&&sR.call(e,n)&&(r[n]=e[n]);return r};const PB={refProp:"ref",popupType:"dialog",shouldOverrideDefaultTargetId:!0},cR=f.forwardRef((e,t)=>{const r=G("PopoverTarget",PB,e),{children:n,refProp:o,popupType:a,shouldOverrideDefaultTargetId:i}=r,l=SB(r,["children","refProp","popupType","shouldOverrideDefaultTargetId"]);if(!El(n))throw new Error(aR.children);const c=l,u=iR(),d=Pl(u.reference,n.ref,t),p=u.withRoles?{"aria-haspopup":a,"aria-expanded":u.opened,"aria-controls":u.getDropdownId(),id:i?u.getTargetId():n.props.id}:{};return f.cloneElement(n,fu(EB(fu(fu(fu({},c),p),u.targetProps),{className:MO(u.targetProps.className,c.className,n.props.className),[o]:d}),u.controlled?null:{onClick:u.onToggle}))});cR.displayName="@mantine/core/PopoverTarget";var $B=H((e,{radius:t,shadow:r})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[r]||r||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const OB=$B;var CB=Object.defineProperty,ux=Object.getOwnPropertySymbols,kB=Object.prototype.hasOwnProperty,jB=Object.prototype.propertyIsEnumerable,dx=(e,t,r)=>t in e?CB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_i=(e,t)=>{for(var r in t||(t={}))kB.call(t,r)&&dx(e,r,t[r]);if(ux)for(var r of ux(t))jB.call(t,r)&&dx(e,r,t[r]);return e};const fx={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function RB({transition:e,state:t,duration:r,timingFunction:n}){const o={transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in Vc?_i(_i(_i({transitionProperty:Vc[e].transitionProperty},o),Vc[e].common),Vc[e][fx[t]]):null:_i(_i(_i({transitionProperty:e.transitionProperty},o),e.common),e[fx[t]])}function TB({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:a,onEntered:i,onExited:l}){const c=or(),u=ym(),d=c.respectReducedMotion?u:!1,[p,h]=f.useState(d?0:e),[g,y]=f.useState(n?"entered":"exited"),v=f.useRef(-1),E=w=>{const b=w?o:a,_=w?i:l;y(w?"pre-entering":"pre-exiting"),window.clearTimeout(v.current);const x=d?0:w?e:t;if(h(x),x===0)typeof b=="function"&&b(),typeof _=="function"&&_(),y(w?"entered":"exited");else{const S=window.setTimeout(()=>{typeof b=="function"&&b(),y(w?"entering":"exiting")},10);v.current=window.setTimeout(()=>{window.clearTimeout(S),typeof _=="function"&&_(),y(w?"entered":"exited")},x)}};return nn(()=>{E(n)},[n]),f.useEffect(()=>()=>window.clearTimeout(v.current),[]),{transitionDuration:p,transitionStatus:g,transitionTimingFunction:r||c.transitionTimingFunction}}function li({keepMounted:e,transition:t,duration:r=250,exitDuration:n=r,mounted:o,children:a,timingFunction:i,onExit:l,onEntered:c,onEnter:u,onExited:d}){const{transitionDuration:p,transitionStatus:h,transitionTimingFunction:g}=TB({mounted:o,exitDuration:n,duration:r,timingFunction:i,onExit:l,onEntered:c,onEnter:u,onExited:d});return p===0?o?s.createElement(s.Fragment,null,a({})):e?a({display:"none"}):null:h==="exited"?e?a({display:"none"}):null:s.createElement(s.Fragment,null,a(RB({transition:t,duration:p,state:h,timingFunction:g})))}li.displayName="@mantine/core/Transition";function O0({children:e,active:t=!0,refProp:r="ref"}){const n=qM(t),o=Pl(n,e==null?void 0:e.ref);return El(e)?f.cloneElement(e,{[r]:o}):e}O0.displayName="@mantine/core/FocusTrap";var IB=Object.defineProperty,DB=Object.defineProperties,NB=Object.getOwnPropertyDescriptors,px=Object.getOwnPropertySymbols,AB=Object.prototype.hasOwnProperty,MB=Object.prototype.propertyIsEnumerable,mx=(e,t,r)=>t in e?IB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lo=(e,t)=>{for(var r in t||(t={}))AB.call(t,r)&&mx(e,r,t[r]);if(px)for(var r of px(t))MB.call(t,r)&&mx(e,r,t[r]);return e},pu=(e,t)=>DB(e,NB(t));function hx(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function gx(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}const LB={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function zB({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:a,arrowY:i,dir:l}){const[c,u="center"]=e.split("-"),d={width:P(t),height:P(t),transform:"rotate(45deg)",position:"absolute",[LB[c]]:P(n)},p=P(-t/2);return c==="left"?pu(Lo(Lo({},d),hx(u,i,r,o)),{right:p,borderLeftColor:"transparent",borderBottomColor:"transparent"}):c==="right"?pu(Lo(Lo({},d),hx(u,i,r,o)),{left:p,borderRightColor:"transparent",borderTopColor:"transparent"}):c==="top"?pu(Lo(Lo({},d),gx(u,a,r,o,l)),{bottom:p,borderTopColor:"transparent",borderLeftColor:"transparent"}):c==="bottom"?pu(Lo(Lo({},d),gx(u,a,r,o,l)),{top:p,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var FB=Object.defineProperty,VB=Object.defineProperties,BB=Object.getOwnPropertyDescriptors,of=Object.getOwnPropertySymbols,uR=Object.prototype.hasOwnProperty,dR=Object.prototype.propertyIsEnumerable,vx=(e,t,r)=>t in e?FB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UB=(e,t)=>{for(var r in t||(t={}))uR.call(t,r)&&vx(e,r,t[r]);if(of)for(var r of of(t))dR.call(t,r)&&vx(e,r,t[r]);return e},WB=(e,t)=>VB(e,BB(t)),HB=(e,t)=>{var r={};for(var n in e)uR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&of)for(var n of of(e))t.indexOf(n)<0&&dR.call(e,n)&&(r[n]=e[n]);return r};const C0=f.forwardRef((e,t)=>{var r=e,{position:n,arrowSize:o,arrowOffset:a,arrowRadius:i,arrowPosition:l,visible:c,arrowX:u,arrowY:d}=r,p=HB(r,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const h=or();return c?s.createElement("div",WB(UB({},p),{ref:t,style:zB({position:n,arrowSize:o,arrowOffset:a,arrowRadius:i,arrowPosition:l,dir:h.dir,arrowX:u,arrowY:d})})):null});C0.displayName="@mantine/core/FloatingArrow";var qB=Object.defineProperty,GB=Object.defineProperties,QB=Object.getOwnPropertyDescriptors,af=Object.getOwnPropertySymbols,fR=Object.prototype.hasOwnProperty,pR=Object.prototype.propertyIsEnumerable,yx=(e,t,r)=>t in e?qB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xi=(e,t)=>{for(var r in t||(t={}))fR.call(t,r)&&yx(e,r,t[r]);if(af)for(var r of af(t))pR.call(t,r)&&yx(e,r,t[r]);return e},mu=(e,t)=>GB(e,QB(t)),KB=(e,t)=>{var r={};for(var n in e)fR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&af)for(var n of af(e))t.indexOf(n)<0&&pR.call(e,n)&&(r[n]=e[n]);return r};const YB={};function mR(e){var t;const r=G("PopoverDropdown",YB,e),{style:n,className:o,children:a,onKeyDownCapture:i}=r,l=KB(r,["style","className","children","onKeyDownCapture"]),c=iR(),{classes:u,cx:d}=OB({radius:c.radius,shadow:c.shadow},{name:c.__staticSelector,classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant}),p=uC({opened:c.opened,shouldReturnFocus:c.returnFocus}),h=c.withRoles?{"aria-labelledby":c.getTargetId(),id:c.getDropdownId(),role:"dialog"}:{};return c.disabled?null:s.createElement(Cl,mu(xi({},c.portalProps),{withinPortal:c.withinPortal}),s.createElement(li,mu(xi({mounted:c.opened},c.transitionProps),{transition:c.transitionProps.transition||"fade",duration:(t=c.transitionProps.duration)!=null?t:150,keepMounted:c.keepMounted,exitDuration:typeof c.transitionProps.exitDuration=="number"?c.transitionProps.exitDuration:c.transitionProps.duration}),g=>{var y,v;return s.createElement(O0,{active:c.trapFocus},s.createElement(le,xi(mu(xi({},h),{tabIndex:-1,ref:c.floating,style:mu(xi(xi({},n),g),{zIndex:c.zIndex,top:(y=c.y)!=null?y:0,left:(v=c.x)!=null?v:0,width:c.width==="target"?void 0:P(c.width)}),className:d(u.dropdown,o),onKeyDownCapture:pA(c.onClose,{active:c.closeOnEscape,onTrigger:p,onKeyDown:i}),"data-position":c.placement}),l),a,s.createElement(C0,{ref:c.arrowRef,arrowX:c.arrowX,arrowY:c.arrowY,visible:c.withArrow,position:c.placement,arrowSize:c.arrowSize,arrowRadius:c.arrowRadius,arrowOffset:c.arrowOffset,arrowPosition:c.arrowPosition,className:u.arrow})))}))}mR.displayName="@mantine/core/PopoverDropdown";function hR(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}var wx=Object.getOwnPropertySymbols,XB=Object.prototype.hasOwnProperty,JB=Object.prototype.propertyIsEnumerable,ZB=(e,t)=>{var r={};for(var n in e)XB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wx)for(var n of wx(e))t.indexOf(n)<0&&JB.call(e,n)&&(r[n]=e[n]);return r};const 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:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Rn("popover"),__staticSelector:"Popover",width:"max-content"};function ko(e){var t,r,n,o,a,i;const l=f.useRef(null),c=G("Popover",eU,e),{children:u,position:d,offset:p,onPositionChange:h,positionDependencies:g,opened:y,transitionProps:v,width:E,middlewares:w,withArrow:b,arrowSize:_,arrowOffset:x,arrowRadius:S,arrowPosition:$,unstyled:O,classNames:C,styles:T,closeOnClickOutside:k,withinPortal:I,portalProps:j,closeOnEscape:N,clickOutsideEvents:D,trapFocus:z,onClose:W,onOpen:K,onChange:R,zIndex:A,radius:V,shadow:Q,id:ie,defaultOpened:Ce,__staticSelector:ue,withRoles:Me,disabled:Ie,returnFocus:ft,variant:rt,keepMounted:nt}=c,Tr=ZB(c,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[Ir,ar]=f.useState(null),[pn,Tt]=f.useState(null),Dr=kr(ie),to=or(),qe=yB({middlewares:w,width:E,position:hR(to.dir,d),offset:typeof p=="number"?p+(b?_/2:0):p,arrowRef:l,arrowOffset:x,onPositionChange:h,positionDependencies:g,opened:y,defaultOpened:Ce,onChange:R,onOpen:K,onClose:W});NM(()=>qe.opened&&k&&qe.onClose(),D,[Ir,pn]);const Gr=f.useCallback(St=>{ar(St),qe.floating.reference(St)},[qe.floating.reference]),Qr=f.useCallback(St=>{Tt(St),qe.floating.floating(St)},[qe.floating.floating]);return s.createElement(wB,{value:{returnFocus:ft,disabled:Ie,controlled:qe.controlled,reference:Gr,floating:Qr,x:qe.floating.x,y:qe.floating.y,arrowX:(n=(r=(t=qe.floating)==null?void 0:t.middlewareData)==null?void 0:r.arrow)==null?void 0:n.x,arrowY:(i=(a=(o=qe.floating)==null?void 0:o.middlewareData)==null?void 0:a.arrow)==null?void 0:i.y,opened:qe.opened,arrowRef:l,transitionProps:v,width:E,withArrow:b,arrowSize:_,arrowOffset:x,arrowRadius:S,arrowPosition:$,placement:qe.floating.placement,trapFocus:z,withinPortal:I,portalProps:j,zIndex:A,radius:V,shadow:Q,closeOnEscape:N,onClose:qe.onClose,onToggle:qe.onToggle,getTargetId:()=>`${Dr}-target`,getDropdownId:()=>`${Dr}-dropdown`,withRoles:Me,targetProps:Tr,__staticSelector:ue,classNames:C,styles:T,unstyled:O,variant:rt,keepMounted:nt}},u)}ko.Target=cR;ko.Dropdown=mR;ko.displayName="@mantine/core/Popover";var tU=Object.defineProperty,lf=Object.getOwnPropertySymbols,gR=Object.prototype.hasOwnProperty,vR=Object.prototype.propertyIsEnumerable,bx=(e,t,r)=>t in e?tU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rU=(e,t)=>{for(var r in t||(t={}))gR.call(t,r)&&bx(e,r,t[r]);if(lf)for(var r of lf(t))vR.call(t,r)&&bx(e,r,t[r]);return e},nU=(e,t)=>{var r={};for(var n in e)gR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lf)for(var n of lf(e))t.indexOf(n)<0&&vR.call(e,n)&&(r[n]=e[n]);return r};function oU(e){var t=e,{children:r,component:n="div",maxHeight:o=220,direction:a="column",id:i,innerRef:l,__staticSelector:c,styles:u,classNames:d,unstyled:p}=t,h=nU(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:g}=pV(null,{name:c,styles:u,classNames:d,unstyled:p});return s.createElement(ko.Dropdown,rU({p:0,onMouseDown:y=>y.preventDefault()},h),s.createElement("div",{style:{maxHeight:P(o),display:"flex"}},s.createElement(le,{component:n||"div",id:`${i}-items`,"aria-labelledby":`${i}-label`,role:"listbox",onMouseDown:y=>y.preventDefault(),style:{flex:1,overflowY:n!==m0?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:l},s.createElement("div",{className:g.itemsWrapper,style:{flexDirection:a}},r))))}function Os({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:r,withinPortal:n,portalProps:o,children:a,__staticSelector:i,onDirectionChange:l,switchDirectionOnFlip:c,zIndex:u,dropdownPosition:d,positionDependencies:p=[],classNames:h,styles:g,unstyled:y,readOnly:v,variant:E}){return s.createElement(ko,{unstyled:y,classNames:h,styles:g,width:"target",withRoles:!1,opened:e,middlewares:{flip:d==="flip",shift:!1},position:d==="flip"?"bottom":d,positionDependencies:p,zIndex:u,__staticSelector:i,withinPortal:n,portalProps:o,transitionProps:t,shadow:r,disabled:v,onPositionChange:w=>c&&(l==null?void 0:l(w==="top"?"column-reverse":"column")),variant:E},a)}Os.Target=ko.Target;Os.Dropdown=oU;var aU=Object.defineProperty,iU=Object.defineProperties,lU=Object.getOwnPropertyDescriptors,sf=Object.getOwnPropertySymbols,yR=Object.prototype.hasOwnProperty,wR=Object.prototype.propertyIsEnumerable,_x=(e,t,r)=>t in e?aU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hu=(e,t)=>{for(var r in t||(t={}))yR.call(t,r)&&_x(e,r,t[r]);if(sf)for(var r of sf(t))wR.call(t,r)&&_x(e,r,t[r]);return e},sU=(e,t)=>iU(e,lU(t)),cU=(e,t)=>{var r={};for(var n in e)yR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sf)for(var n of sf(e))t.indexOf(n)<0&&wR.call(e,n)&&(r[n]=e[n]);return r};function bR(e,t,r){const n=G(e,t,r),{label:o,description:a,error:i,required:l,classNames:c,styles:u,className:d,unstyled:p,__staticSelector:h,sx:g,errorProps:y,labelProps:v,descriptionProps:E,wrapperProps:w,id:b,size:_,style:x,inputContainer:S,inputWrapperOrder:$,withAsterisk:O,variant:C}=n,T=cU(n,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),k=kr(b),{systemStyles:I,rest:j}=Zn(T),N=hu({label:o,description:a,error:i,required:l,classNames:c,className:d,__staticSelector:h,sx:g,errorProps:y,labelProps:v,descriptionProps:E,unstyled:p,styles:u,id:k,size:_,style:x,inputContainer:S,inputWrapperOrder:$,withAsterisk:O,variant:C},w);return sU(hu({},j),{classNames:c,styles:u,unstyled:p,wrapperProps:hu(hu({},N),I),inputProps:{required:l,classNames:c,styles:u,unstyled:p,id:k,size:_,__staticSelector:h,error:i,variant:C}})}var uU=H((e,t,{size:r})=>({label:{display:"inline-block",fontSize:L({size:r,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const dU=uU;var fU=Object.defineProperty,cf=Object.getOwnPropertySymbols,_R=Object.prototype.hasOwnProperty,xR=Object.prototype.propertyIsEnumerable,xx=(e,t,r)=>t in e?fU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pU=(e,t)=>{for(var r in t||(t={}))_R.call(t,r)&&xx(e,r,t[r]);if(cf)for(var r of cf(t))xR.call(t,r)&&xx(e,r,t[r]);return e},mU=(e,t)=>{var r={};for(var n in e)_R.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cf)for(var n of cf(e))t.indexOf(n)<0&&xR.call(e,n)&&(r[n]=e[n]);return r};const hU={labelElement:"label",size:"sm"},k0=f.forwardRef((e,t)=>{const r=G("InputLabel",hU,e),{labelElement:n,children:o,required:a,size:i,classNames:l,styles:c,unstyled:u,className:d,htmlFor:p,__staticSelector:h,variant:g,onMouseDown:y}=r,v=mU(r,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:E,cx:w}=dU(null,{name:["InputWrapper",h],classNames:l,styles:c,unstyled:u,variant:g,size:i});return s.createElement(le,pU({component:n,ref:t,className:w(E.label,d),htmlFor:n==="label"?p:void 0,onMouseDown:b=>{y==null||y(b),!b.defaultPrevented&&b.detail>1&&b.preventDefault()}},v),o,a&&s.createElement("span",{className:E.required,"aria-hidden":!0}," *"))});k0.displayName="@mantine/core/InputLabel";var gU=H((e,t,{size:r})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${L({size:r,sizes:e.fontSizes})} - ${P(2)})`,lineHeight:1.2,display:"block"}}));const vU=gU;var yU=Object.defineProperty,uf=Object.getOwnPropertySymbols,ER=Object.prototype.hasOwnProperty,SR=Object.prototype.propertyIsEnumerable,Ex=(e,t,r)=>t in e?yU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wU=(e,t)=>{for(var r in t||(t={}))ER.call(t,r)&&Ex(e,r,t[r]);if(uf)for(var r of uf(t))SR.call(t,r)&&Ex(e,r,t[r]);return e},bU=(e,t)=>{var r={};for(var n in e)ER.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&uf)for(var n of uf(e))t.indexOf(n)<0&&SR.call(e,n)&&(r[n]=e[n]);return r};const _U={size:"sm"},j0=f.forwardRef((e,t)=>{const r=G("InputError",_U,e),{children:n,className:o,classNames:a,styles:i,unstyled:l,size:c,__staticSelector:u,variant:d}=r,p=bU(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:g}=vU(null,{name:["InputWrapper",u],classNames:a,styles:i,unstyled:l,variant:d,size:c});return s.createElement(oe,wU({className:g(h.error,o),ref:t},p),n)});j0.displayName="@mantine/core/InputError";var xU=H((e,t,{size:r})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${L({size:r,sizes:e.fontSizes})} - ${P(2)})`,lineHeight:1.2,display:"block"}}));const EU=xU;var SU=Object.defineProperty,df=Object.getOwnPropertySymbols,PR=Object.prototype.hasOwnProperty,$R=Object.prototype.propertyIsEnumerable,Sx=(e,t,r)=>t in e?SU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,PU=(e,t)=>{for(var r in t||(t={}))PR.call(t,r)&&Sx(e,r,t[r]);if(df)for(var r of df(t))$R.call(t,r)&&Sx(e,r,t[r]);return e},$U=(e,t)=>{var r={};for(var n in e)PR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&df)for(var n of df(e))t.indexOf(n)<0&&$R.call(e,n)&&(r[n]=e[n]);return r};const OU={size:"sm"},R0=f.forwardRef((e,t)=>{const r=G("InputDescription",OU,e),{children:n,className:o,classNames:a,styles:i,unstyled:l,size:c,__staticSelector:u,variant:d}=r,p=$U(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:g}=EU(null,{name:["InputWrapper",u],classNames:a,styles:i,unstyled:l,variant:d,size:c});return s.createElement(oe,PU({color:"dimmed",className:g(h.description,o),ref:t,unstyled:l},p),n)});R0.displayName="@mantine/core/InputDescription";const OR=f.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),CU=OR.Provider,kU=()=>f.useContext(OR);function jU(e,{hasDescription:t,hasError:r}){const n=e.findIndex(c=>c==="input"),o=e[n-1],a=e[n+1];return{offsetBottom:t&&a==="description"||r&&a==="error",offsetTop:t&&o==="description"||r&&o==="error"}}var RU=Object.defineProperty,TU=Object.defineProperties,IU=Object.getOwnPropertyDescriptors,Px=Object.getOwnPropertySymbols,DU=Object.prototype.hasOwnProperty,NU=Object.prototype.propertyIsEnumerable,$x=(e,t,r)=>t in e?RU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AU=(e,t)=>{for(var r in t||(t={}))DU.call(t,r)&&$x(e,r,t[r]);if(Px)for(var r of Px(t))NU.call(t,r)&&$x(e,r,t[r]);return e},MU=(e,t)=>TU(e,IU(t)),LU=H(e=>({root:MU(AU({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const zU=LU;var FU=Object.defineProperty,VU=Object.defineProperties,BU=Object.getOwnPropertyDescriptors,ff=Object.getOwnPropertySymbols,CR=Object.prototype.hasOwnProperty,kR=Object.prototype.propertyIsEnumerable,Ox=(e,t,r)=>t in e?FU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zo=(e,t)=>{for(var r in t||(t={}))CR.call(t,r)&&Ox(e,r,t[r]);if(ff)for(var r of ff(t))kR.call(t,r)&&Ox(e,r,t[r]);return e},Cx=(e,t)=>VU(e,BU(t)),UU=(e,t)=>{var r={};for(var n in e)CR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ff)for(var n of ff(e))t.indexOf(n)<0&&kR.call(e,n)&&(r[n]=e[n]);return r};const WU={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},jR=f.forwardRef((e,t)=>{const r=G("InputWrapper",WU,e),{className:n,label:o,children:a,required:i,id:l,error:c,description:u,labelElement:d,labelProps:p,descriptionProps:h,errorProps:g,classNames:y,styles:v,size:E,inputContainer:w,__staticSelector:b,unstyled:_,inputWrapperOrder:x,withAsterisk:S,variant:$}=r,O=UU(r,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:C,cx:T}=zU(null,{classNames:y,styles:v,name:["InputWrapper",b],unstyled:_,variant:$,size:E}),k={classNames:y,styles:v,unstyled:_,size:E,variant:$,__staticSelector:b},I=typeof S=="boolean"?S:i,j=l?`${l}-error`:g==null?void 0:g.id,N=l?`${l}-description`:h==null?void 0:h.id,z=`${!!c&&typeof c!="boolean"?j:""} ${u?N:""}`,W=z.trim().length>0?z.trim():void 0,K=o&&s.createElement(k0,zo(zo({key:"label",labelElement:d,id:l?`${l}-label`:void 0,htmlFor:l,required:I},k),p),o),R=u&&s.createElement(R0,Cx(zo(zo({key:"description"},h),k),{size:(h==null?void 0:h.size)||k.size,id:(h==null?void 0:h.id)||N}),u),A=s.createElement(f.Fragment,{key:"input"},w(a)),V=typeof c!="boolean"&&c&&s.createElement(j0,Cx(zo(zo({},g),k),{size:(g==null?void 0:g.size)||k.size,key:"error",id:(g==null?void 0:g.id)||j}),c),Q=x.map(ie=>{switch(ie){case"label":return K;case"input":return A;case"description":return R;case"error":return V;default:return null}});return s.createElement(CU,{value:zo({describedBy:W},jU(x,{hasDescription:!!R,hasError:!!V}))},s.createElement(le,zo({className:T(C.root,n),ref:t},O),Q))});jR.displayName="@mantine/core/InputWrapper";var HU=Object.defineProperty,pf=Object.getOwnPropertySymbols,RR=Object.prototype.hasOwnProperty,TR=Object.prototype.propertyIsEnumerable,kx=(e,t,r)=>t in e?HU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qU=(e,t)=>{for(var r in t||(t={}))RR.call(t,r)&&kx(e,r,t[r]);if(pf)for(var r of pf(t))TR.call(t,r)&&kx(e,r,t[r]);return e},GU=(e,t)=>{var r={};for(var n in e)RR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pf)for(var n of pf(e))t.indexOf(n)<0&&TR.call(e,n)&&(r[n]=e[n]);return r};const QU={},IR=f.forwardRef((e,t)=>{const r=G("InputPlaceholder",QU,e),{sx:n}=r,o=GU(r,["sx"]);return s.createElement(le,qU({component:"span",sx:[a=>a.fn.placeholderStyles(),...nm(n)],ref:t},o))});IR.displayName="@mantine/core/InputPlaceholder";var KU=Object.defineProperty,YU=Object.defineProperties,XU=Object.getOwnPropertyDescriptors,jx=Object.getOwnPropertySymbols,JU=Object.prototype.hasOwnProperty,ZU=Object.prototype.propertyIsEnumerable,Rx=(e,t,r)=>t in e?KU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gu=(e,t)=>{for(var r in t||(t={}))JU.call(t,r)&&Rx(e,r,t[r]);if(jx)for(var r of jx(t))ZU.call(t,r)&&Rx(e,r,t[r]);return e},Yh=(e,t)=>YU(e,XU(t));const $t={xs:P(30),sm:P(36),md:P(42),lg:P(50),xl:P(60)},eW=["default","filled","unstyled"];function tW({theme:e,variant:t}){return eW.includes(t)?t==="default"?{border:`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${P(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:P(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var rW=H((e,{multiline:t,radius:r,invalid:n,rightSectionWidth:o,withRightSection:a,iconWidth:i,offsetBottom:l,offsetTop:c,pointer:u},{variant:d,size:p})=>{const h=e.fn.variant({variant:"filled",color:"red"}).background,g=d==="default"||d==="filled"?{minHeight:L({size:p,sizes:$t}),paddingLeft:`calc(${L({size:p,sizes:$t})} / 3)`,paddingRight:a?o||L({size:p,sizes:$t}):`calc(${L({size:p,sizes:$t})} / 3)`,borderRadius:e.fn.radius(r)}:d==="unstyled"&&a?{paddingRight:o||L({size:p,sizes:$t})}:null;return{wrapper:{position:"relative",marginTop:c?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:l?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:Yh(gu(gu(Yh(gu({},e.fn.fontStyles()),{height:t?d==="unstyled"?void 0:"auto":L({size:p,sizes:$t}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${L({size:p,sizes:$t})} - ${P(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:L({size:p,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:u?"pointer":void 0}),tW({theme:e,variant:d})),g),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:h,borderColor:h,"&::placeholder":{opacity:1,color:h}},"&[data-with-icon]":{paddingLeft:typeof i=="number"?P(i):L({size:p,sizes:$t})},"&::placeholder":Yh(gu({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:i?P(i):L({size:p,sizes:$t}),color:n?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||L({size:p,sizes:$t})}}}),nW=Object.defineProperty,oW=Object.defineProperties,aW=Object.getOwnPropertyDescriptors,mf=Object.getOwnPropertySymbols,DR=Object.prototype.hasOwnProperty,NR=Object.prototype.propertyIsEnumerable,Tx=(e,t,r)=>t in e?nW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vu=(e,t)=>{for(var r in t||(t={}))DR.call(t,r)&&Tx(e,r,t[r]);if(mf)for(var r of mf(t))NR.call(t,r)&&Tx(e,r,t[r]);return e},Ix=(e,t)=>oW(e,aW(t)),iW=(e,t)=>{var r={};for(var n in e)DR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&mf)for(var n of mf(e))t.indexOf(n)<0&&NR.call(e,n)&&(r[n]=e[n]);return r};const lW={size:"sm",variant:"default"},si=f.forwardRef((e,t)=>{const r=G("Input",lW,e),{className:n,error:o,required:a,disabled:i,variant:l,icon:c,style:u,rightSectionWidth:d,iconWidth:p,rightSection:h,rightSectionProps:g,radius:y,size:v,wrapperProps:E,classNames:w,styles:b,__staticSelector:_,multiline:x,sx:S,unstyled:$,pointer:O}=r,C=iW(r,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:T,offsetTop:k,describedBy:I}=kU(),{classes:j,cx:N}=rW({radius:y,multiline:x,invalid:!!o,rightSectionWidth:d?P(d):void 0,iconWidth:p,withRightSection:!!h,offsetBottom:T,offsetTop:k,pointer:O},{classNames:w,styles:b,name:["Input",_],unstyled:$,variant:l,size:v}),{systemStyles:D,rest:z}=Zn(C);return s.createElement(le,vu(vu({className:N(j.wrapper,n),sx:S,style:u},D),E),c&&s.createElement("div",{className:j.icon},c),s.createElement(le,Ix(vu({component:"input"},z),{ref:t,required:a,"aria-invalid":!!o,"aria-describedby":I,disabled:i,"data-disabled":i||void 0,"data-with-icon":!!c||void 0,"data-invalid":!!o||void 0,className:j.input})),h&&s.createElement("div",Ix(vu({},g),{className:j.rightSection}),h))});si.displayName="@mantine/core/Input";si.Wrapper=jR;si.Label=k0;si.Description=R0;si.Error=j0;si.Placeholder=IR;const Vt=si;var sW=Object.defineProperty,hf=Object.getOwnPropertySymbols,AR=Object.prototype.hasOwnProperty,MR=Object.prototype.propertyIsEnumerable,Dx=(e,t,r)=>t in e?sW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cW=(e,t)=>{for(var r in t||(t={}))AR.call(t,r)&&Dx(e,r,t[r]);if(hf)for(var r of hf(t))MR.call(t,r)&&Dx(e,r,t[r]);return e},uW=(e,t)=>{var r={};for(var n in e)AR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hf)for(var n of hf(e))t.indexOf(n)<0&&MR.call(e,n)&&(r[n]=e[n]);return r};function dW(e){const t=e,{style:r}=t,n=uW(t,["style"]);return s.createElement("svg",cW({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:r},n),s.createElement("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var fW=Object.defineProperty,pW=Object.defineProperties,mW=Object.getOwnPropertyDescriptors,Nx=Object.getOwnPropertySymbols,hW=Object.prototype.hasOwnProperty,gW=Object.prototype.propertyIsEnumerable,Ax=(e,t,r)=>t in e?fW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vW=(e,t)=>{for(var r in t||(t={}))hW.call(t,r)&&Ax(e,r,t[r]);if(Nx)for(var r of Nx(t))gW.call(t,r)&&Ax(e,r,t[r]);return e},yW=(e,t)=>pW(e,mW(t));const LR=f.createContext(null);function wW({spacing:e,children:t}){return s.createElement(LR.Provider,{value:{spacing:e}},t)}function bW(){const e=f.useContext(LR);return e?yW(vW({},e),{withinGroup:!0}):{spacing:null,withinGroup:!1}}var _W=H((e,{spacing:t})=>({root:{display:"flex",paddingLeft:L({size:t,sizes:e.spacing})}}));const xW=_W;var EW=Object.defineProperty,gf=Object.getOwnPropertySymbols,zR=Object.prototype.hasOwnProperty,FR=Object.prototype.propertyIsEnumerable,Mx=(e,t,r)=>t in e?EW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,SW=(e,t)=>{for(var r in t||(t={}))zR.call(t,r)&&Mx(e,r,t[r]);if(gf)for(var r of gf(t))FR.call(t,r)&&Mx(e,r,t[r]);return e},PW=(e,t)=>{var r={};for(var n in e)zR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gf)for(var n of gf(e))t.indexOf(n)<0&&FR.call(e,n)&&(r[n]=e[n]);return r};const $W={},VR=f.forwardRef((e,t)=>{const r=G("AvatarGroup",$W,e),{children:n,spacing:o="sm",unstyled:a,className:i,variant:l}=r,c=PW(r,["children","spacing","unstyled","className","variant"]),{classes:u,cx:d}=xW({spacing:o},{name:"AvatarGroup",unstyled:a,variant:l});return s.createElement(wW,{spacing:o},s.createElement(le,SW({ref:t,className:d(u.root,i)},c),n))});VR.displayName="@mantine/core/AvatarGroup";var OW=Object.defineProperty,CW=Object.defineProperties,kW=Object.getOwnPropertyDescriptors,Lx=Object.getOwnPropertySymbols,jW=Object.prototype.hasOwnProperty,RW=Object.prototype.propertyIsEnumerable,zx=(e,t,r)=>t in e?OW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yl=(e,t)=>{for(var r in t||(t={}))jW.call(t,r)&&zx(e,r,t[r]);if(Lx)for(var r of Lx(t))RW.call(t,r)&&zx(e,r,t[r]);return e},Fx=(e,t)=>CW(e,kW(t));const TW=["filled","light","gradient","outline"],yu={xs:P(16),sm:P(26),md:P(38),lg:P(56),xl:P(84)};function IW({withinGroup:e,spacing:t,theme:r}){return e?{marginLeft:`calc(${L({size:t,sizes:r.spacing})} * -1)`,backgroundColor:`${r.colorScheme==="dark"?r.colors.dark[7]:r.white}`,border:`${P(2)} solid ${r.colorScheme==="dark"?r.colors.dark[7]:r.white}`}:null}function DW({theme:e,variant:t,color:r,gradient:n}){const o=e.fn.variant({variant:t,color:r,gradient:n});return TW.includes(t)?{placeholder:{color:o.color,backgroundColor:o.background,backgroundImage:t==="gradient"?o.background:void 0,border:`${P(t==="gradient"?0:1)} solid ${o.border}`},placeholderIcon:{color:o.color}}:{}}var NW=H((e,{radius:t,withinGroup:r,spacing:n,color:o,gradient:a},{variant:i,size:l})=>{const c=DW({theme:e,color:o,gradient:a,variant:i});return{root:Yl(Fx(Yl({},e.fn.focusStyles()),{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",display:"block",userSelect:"none",overflow:"hidden",borderRadius:e.fn.radius(t),textDecoration:"none",border:0,backgroundColor:"transparent",padding:0,width:L({size:l,sizes:yu}),minWidth:L({size:l,sizes:yu}),height:L({size:l,sizes:yu})}),IW({withinGroup:r,spacing:n,theme:e})),image:{objectFit:"cover",width:"100%",height:"100%",display:"block"},placeholder:Yl(Fx(Yl({},e.fn.fontStyles()),{fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",userSelect:"none",borderRadius:e.fn.radius(t),fontSize:`calc(${L({size:l,sizes:yu})} / 2.5)`}),c.placeholder),placeholderIcon:Yl({width:"70%",height:"70%"},c.placeholderIcon)}});const AW=NW;var MW=Object.defineProperty,LW=Object.defineProperties,zW=Object.getOwnPropertyDescriptors,vf=Object.getOwnPropertySymbols,BR=Object.prototype.hasOwnProperty,UR=Object.prototype.propertyIsEnumerable,Vx=(e,t,r)=>t in e?MW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bx=(e,t)=>{for(var r in t||(t={}))BR.call(t,r)&&Vx(e,r,t[r]);if(vf)for(var r of vf(t))UR.call(t,r)&&Vx(e,r,t[r]);return e},FW=(e,t)=>LW(e,zW(t)),VW=(e,t)=>{var r={};for(var n in e)BR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vf)for(var n of vf(e))t.indexOf(n)<0&&UR.call(e,n)&&(r[n]=e[n]);return r};const BW={size:"md",color:"gray",variant:"light"},T0=f.forwardRef((e,t)=>{const r=G("Avatar",BW,e),{className:n,size:o,src:a,alt:i,radius:l,children:c,color:u,variant:d,gradient:p,classNames:h,styles:g,imageProps:y,unstyled:v}=r,E=VW(r,["className","size","src","alt","radius","children","color","variant","gradient","classNames","styles","imageProps","unstyled"]),w=bW(),[b,_]=f.useState(!a),{classes:x,cx:S}=AW({color:u,radius:l,withinGroup:w.withinGroup,spacing:w.spacing,gradient:p},{classNames:h,styles:g,unstyled:v,name:"Avatar",variant:d,size:o});return f.useEffect(()=>{_(!a)},[a]),s.createElement(le,Bx({component:"div",className:S(x.root,n),ref:t},E),b?s.createElement("div",{className:x.placeholder,title:i},c||s.createElement(dW,{className:x.placeholderIcon})):s.createElement("img",FW(Bx({},y),{className:x.image,src:a,alt:i,onError:()=>_(!0)})))});T0.displayName="@mantine/core/Avatar";T0.Group=VR;const yf=T0;var UW=Object.defineProperty,WW=Object.defineProperties,HW=Object.getOwnPropertyDescriptors,Ux=Object.getOwnPropertySymbols,qW=Object.prototype.hasOwnProperty,GW=Object.prototype.propertyIsEnumerable,Wx=(e,t,r)=>t in e?UW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xh=(e,t)=>{for(var r in t||(t={}))qW.call(t,r)&&Wx(e,r,t[r]);if(Ux)for(var r of Ux(t))GW.call(t,r)&&Wx(e,r,t[r]);return e},QW=(e,t)=>WW(e,HW(t));const KW=["light","filled","outline","dot","gradient"],Jh={xs:{fontSize:P(9),height:P(16)},sm:{fontSize:P(10),height:P(18)},md:{fontSize:P(11),height:P(20)},lg:{fontSize:P(13),height:P(26)},xl:{fontSize:P(16),height:P(32)}},YW={xs:P(4),sm:P(4),md:P(6),lg:P(8),xl:P(10)};function XW({theme:e,variant:t,color:r,size:n,gradient:o}){if(!KW.includes(t))return null;if(t==="dot"){const i=L({size:n,sizes:YW});return{backgroundColor:"transparent",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],border:`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[3]}`,paddingLeft:`calc(${L({size:n,sizes:e.spacing})} / 1.5 - ${i} / 2)`,"&::before":{content:'""',display:"block",width:i,height:i,borderRadius:i,backgroundColor:e.fn.themeColor(r,e.colorScheme==="dark"?4:e.fn.primaryShade("light"),!0),marginRight:i}}}const a=e.fn.variant({color:r,variant:t,gradient:o});return{background:a.background,color:a.color,border:`${P(t==="gradient"?0:1)} solid ${a.border}`}}var JW=H((e,{color:t,radius:r,gradient:n,fullWidth:o},{variant:a,size:i})=>{const{fontSize:l,height:c}=i in Jh?Jh[i]:Jh.md;return{leftSection:{marginRight:`calc(${e.spacing.xs} / 2)`},rightSection:{marginLeft:`calc(${e.spacing.xs} / 2)`},inner:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},root:Xh(QW(Xh(Xh({},e.fn.focusStyles()),e.fn.fontStyles()),{fontSize:l,height:c,WebkitTapHighlightColor:"transparent",lineHeight:`calc(${c} - ${P(2)})`,textDecoration:"none",padding:`0 calc(${L({size:i,sizes:e.spacing})} / 1.5)`,boxSizing:"border-box",display:o?"flex":"inline-flex",alignItems:"center",justifyContent:"center",width:o?"100%":"auto",textTransform:"uppercase",borderRadius:e.fn.radius(r),fontWeight:700,letterSpacing:P(.25),cursor:"inherit",textOverflow:"ellipsis",overflow:"hidden"}),XW({theme:e,variant:a,color:t,size:i,gradient:n}))}});const ZW=JW;var eH=Object.defineProperty,wf=Object.getOwnPropertySymbols,WR=Object.prototype.hasOwnProperty,HR=Object.prototype.propertyIsEnumerable,Hx=(e,t,r)=>t in e?eH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tH=(e,t)=>{for(var r in t||(t={}))WR.call(t,r)&&Hx(e,r,t[r]);if(wf)for(var r of wf(t))HR.call(t,r)&&Hx(e,r,t[r]);return e},rH=(e,t)=>{var r={};for(var n in e)WR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wf)for(var n of wf(e))t.indexOf(n)<0&&HR.call(e,n)&&(r[n]=e[n]);return r};const nH={variant:"light",size:"md",radius:"xl"},qR=f.forwardRef((e,t)=>{const r=G("Badge",nH,e),{className:n,color:o,variant:a,fullWidth:i,children:l,size:c,leftSection:u,rightSection:d,radius:p,gradient:h,classNames:g,styles:y,unstyled:v}=r,E=rH(r,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:w,cx:b}=ZW({fullWidth:i,color:o,radius:p,gradient:h},{classNames:g,styles:y,name:"Badge",unstyled:v,variant:a,size:c});return s.createElement(le,tH({className:b(w.root,n),ref:t},E),u&&s.createElement("span",{className:w.leftSection},u),s.createElement("span",{className:w.inner},l),d&&s.createElement("span",{className:w.rightSection},d))});qR.displayName="@mantine/core/Badge";const oH=qR;var aH=Object.defineProperty,bf=Object.getOwnPropertySymbols,GR=Object.prototype.hasOwnProperty,QR=Object.prototype.propertyIsEnumerable,qx=(e,t,r)=>t in e?aH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gx=(e,t)=>{for(var r in t||(t={}))GR.call(t,r)&&qx(e,r,t[r]);if(bf)for(var r of bf(t))QR.call(t,r)&&qx(e,r,t[r]);return e},iH=(e,t)=>{var r={};for(var n in e)GR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&bf)for(var n of bf(e))t.indexOf(n)<0&&QR.call(e,n)&&(r[n]=e[n]);return r};function lH(e){const t=e,{style:r}=t,n=iH(t,["style"]);return s.createElement("svg",Gx({viewBox:"0 0 409.294 409.294",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",style:Gx({width:P(20),height:P(20)},r)},n),s.createElement("path",{d:"M0 204.647v175.412h175.412V204.647H58.471c0-64.48 52.461-116.941 116.941-116.941V29.235C78.684 29.235 0 107.919 0 204.647zM409.294 87.706V29.235c-96.728 0-175.412 78.684-175.412 175.412v175.412h175.412V204.647H292.353c0-64.48 52.461-116.941 116.941-116.941z"}))}var sH=Object.defineProperty,cH=Object.defineProperties,uH=Object.getOwnPropertyDescriptors,Qx=Object.getOwnPropertySymbols,dH=Object.prototype.hasOwnProperty,fH=Object.prototype.propertyIsEnumerable,Kx=(e,t,r)=>t in e?sH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pH=(e,t)=>{for(var r in t||(t={}))dH.call(t,r)&&Kx(e,r,t[r]);if(Qx)for(var r of Qx(t))fH.call(t,r)&&Kx(e,r,t[r]);return e},mH=(e,t)=>cH(e,uH(t)),hH=H((e,{color:t})=>({root:mH(pH({},e.fn.fontStyles()),{fontSize:e.fontSizes.lg,lineHeight:e.lineHeight,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,margin:0,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm,padding:`${e.spacing.md} ${e.spacing.lg}`}),inner:{display:"flex"},body:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},icon:{color:e.fn.variant({variant:"filled",color:t}).background,marginRight:e.spacing.lg,marginTop:P(2),width:P(22)},cite:{display:"block",fontSize:e.fontSizes.sm,marginTop:e.spacing.xs,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],overflow:"hidden",textOverflow:"ellipsis"}}));const gH=hH;var vH=Object.defineProperty,_f=Object.getOwnPropertySymbols,KR=Object.prototype.hasOwnProperty,YR=Object.prototype.propertyIsEnumerable,Yx=(e,t,r)=>t in e?vH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yH=(e,t)=>{for(var r in t||(t={}))KR.call(t,r)&&Yx(e,r,t[r]);if(_f)for(var r of _f(t))YR.call(t,r)&&Yx(e,r,t[r]);return e},wH=(e,t)=>{var r={};for(var n in e)KR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_f)for(var n of _f(e))t.indexOf(n)<0&&YR.call(e,n)&&(r[n]=e[n]);return r};const bH={color:"gray",icon:s.createElement(lH,null)},XR=f.forwardRef((e,t)=>{const r=G("Blockquote",bH,e),{className:n,color:o,icon:a,cite:i,children:l,classNames:c,styles:u,unstyled:d,variant:p}=r,h=wH(r,["className","color","icon","cite","children","classNames","styles","unstyled","variant"]),{classes:g,cx:y}=gH({color:o},{classNames:c,styles:u,unstyled:d,name:"Blockquote",variant:p});return s.createElement(le,yH({component:"blockquote",className:y(g.root,n),ref:t},h),s.createElement("div",{className:g.inner},a&&s.createElement("div",{className:g.icon},a),s.createElement("div",{className:g.body},l,i&&s.createElement("cite",{className:g.cite},i))))});XR.displayName="@mantine/core/Blockquote";var _H=H((e,{orientation:t,buttonBorderWidth:r})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${P(r)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${P(r)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${P(r)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${P(r)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${r} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const xH=_H;var EH=Object.defineProperty,xf=Object.getOwnPropertySymbols,JR=Object.prototype.hasOwnProperty,ZR=Object.prototype.propertyIsEnumerable,Xx=(e,t,r)=>t in e?EH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,SH=(e,t)=>{for(var r in t||(t={}))JR.call(t,r)&&Xx(e,r,t[r]);if(xf)for(var r of xf(t))ZR.call(t,r)&&Xx(e,r,t[r]);return e},PH=(e,t)=>{var r={};for(var n in e)JR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xf)for(var n of xf(e))t.indexOf(n)<0&&ZR.call(e,n)&&(r[n]=e[n]);return r};const $H={orientation:"horizontal",buttonBorderWidth:1},eT=f.forwardRef((e,t)=>{const r=G("ButtonGroup",$H,e),{className:n,orientation:o,buttonBorderWidth:a,unstyled:i}=r,l=PH(r,["className","orientation","buttonBorderWidth","unstyled"]),{classes:c,cx:u}=xH({orientation:o,buttonBorderWidth:a},{name:"ButtonGroup",unstyled:i});return s.createElement(le,SH({className:u(c.root,n),ref:t},l))});eT.displayName="@mantine/core/ButtonGroup";var OH=Object.defineProperty,CH=Object.defineProperties,kH=Object.getOwnPropertyDescriptors,Jx=Object.getOwnPropertySymbols,jH=Object.prototype.hasOwnProperty,RH=Object.prototype.propertyIsEnumerable,Zx=(e,t,r)=>t in e?OH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lo=(e,t)=>{for(var r in t||(t={}))jH.call(t,r)&&Zx(e,r,t[r]);if(Jx)for(var r of Jx(t))RH.call(t,r)&&Zx(e,r,t[r]);return e},ed=(e,t)=>CH(e,kH(t));const TH=["filled","outline","light","white","default","subtle","gradient"],Tv={xs:{height:$t.xs,paddingLeft:P(14),paddingRight:P(14)},sm:{height:$t.sm,paddingLeft:P(18),paddingRight:P(18)},md:{height:$t.md,paddingLeft:P(22),paddingRight:P(22)},lg:{height:$t.lg,paddingLeft:P(26),paddingRight:P(26)},xl:{height:$t.xl,paddingLeft:P(32),paddingRight:P(32)},"compact-xs":{height:P(22),paddingLeft:P(7),paddingRight:P(7)},"compact-sm":{height:P(26),paddingLeft:P(8),paddingRight:P(8)},"compact-md":{height:P(30),paddingLeft:P(10),paddingRight:P(10)},"compact-lg":{height:P(34),paddingLeft:P(12),paddingRight:P(12)},"compact-xl":{height:P(40),paddingLeft:P(14),paddingRight:P(14)}};function IH({compact:e,size:t,withLeftIcon:r,withRightIcon:n}){if(e)return Tv[`compact-${t}`];const o=Tv[t];return o?ed(lo({},o),{paddingLeft:r?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:n?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const DH=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function NH({variant:e,theme:t,color:r,gradient:n}){if(!TH.includes(e))return null;const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?lo({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):lo({border:`${P(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var AH=H((e,{radius:t,fullWidth:r,compact:n,withLeftIcon:o,withRightIcon:a,color:i,gradient:l},{variant:c,size:u})=>({root:ed(lo(ed(lo(lo(lo(lo({},IH({compact:n,size:u,withLeftIcon:o,withRightIcon:a})),e.fn.fontStyles()),e.fn.focusStyles()),DH(r)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:L({size:u,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),NH({variant:c,theme:e,color:i,gradient:l})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":ed(lo({content:'""'},e.fn.cover(P(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:e.spacing.xs},rightIcon:{marginLeft:e.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const MH=AH;var LH=Object.defineProperty,Ef=Object.getOwnPropertySymbols,tT=Object.prototype.hasOwnProperty,rT=Object.prototype.propertyIsEnumerable,eE=(e,t,r)=>t in e?LH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tE=(e,t)=>{for(var r in t||(t={}))tT.call(t,r)&&eE(e,r,t[r]);if(Ef)for(var r of Ef(t))rT.call(t,r)&&eE(e,r,t[r]);return e},zH=(e,t)=>{var r={};for(var n in e)tT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ef)for(var n of Ef(e))t.indexOf(n)<0&&rT.call(e,n)&&(r[n]=e[n]);return r};const FH={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},I0=f.forwardRef((e,t)=>{const r=G("Button",FH,e),{className:n,size:o,color:a,type:i,disabled:l,children:c,leftIcon:u,rightIcon:d,fullWidth:p,variant:h,radius:g,uppercase:y,compact:v,loading:E,loaderPosition:w,loaderProps:b,gradient:_,classNames:x,styles:S,unstyled:$}=r,O=zH(r,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:C,cx:T,theme:k}=MH({radius:g,color:a,fullWidth:p,compact:v,gradient:_,withLeftIcon:!!u,withRightIcon:!!d},{name:"Button",unstyled:$,classNames:x,styles:S,variant:h,size:o}),I=k.fn.variant({color:a,variant:h}),j=s.createElement(un,tE({color:I.color,size:`calc(${L({size:o,sizes:Tv}).height} / 2)`},b));return s.createElement(ho,tE({className:T(C.root,n),type:i,disabled:l,"data-button":!0,"data-disabled":l||void 0,"data-loading":E||void 0,ref:t,unstyled:$},O),s.createElement("div",{className:C.inner},(u||E&&w==="left")&&s.createElement("span",{className:T(C.icon,C.leftIcon)},E&&w==="left"?j:u),E&&w==="center"&&s.createElement("span",{className:C.centerLoader},j),s.createElement("span",{className:C.label,style:{textTransform:y?"uppercase":void 0}},c),(d||E&&w==="right")&&s.createElement("span",{className:T(C.icon,C.rightIcon)},E&&w==="right"?j:d)))});I0.displayName="@mantine/core/Button";I0.Group=eT;const ee=I0;var VH=H((e,{radius:t,shadow:r})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,boxSizing:"border-box",borderRadius:e.fn.radius(t),boxShadow:e.shadows[r]||r||"none","&[data-with-border]":{border:`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}}));const BH=VH;var UH=Object.defineProperty,Sf=Object.getOwnPropertySymbols,nT=Object.prototype.hasOwnProperty,oT=Object.prototype.propertyIsEnumerable,rE=(e,t,r)=>t in e?UH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,WH=(e,t)=>{for(var r in t||(t={}))nT.call(t,r)&&rE(e,r,t[r]);if(Sf)for(var r of Sf(t))oT.call(t,r)&&rE(e,r,t[r]);return e},HH=(e,t)=>{var r={};for(var n in e)nT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Sf)for(var n of Sf(e))t.indexOf(n)<0&&oT.call(e,n)&&(r[n]=e[n]);return r};const qH={},aT=f.forwardRef((e,t)=>{const r=G("Paper",qH,e),{className:n,children:o,radius:a,withBorder:i,shadow:l,unstyled:c,variant:u}=r,d=HH(r,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:p,cx:h}=BH({radius:a,shadow:l},{name:"Paper",unstyled:c,variant:u});return s.createElement(le,WH({className:h(p.root,n),"data-with-border":i||void 0,ref:t},d),o)});aT.displayName="@mantine/core/Paper";const Pn=aT;var GH=H((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const QH=GH;var KH=Object.defineProperty,Pf=Object.getOwnPropertySymbols,iT=Object.prototype.hasOwnProperty,lT=Object.prototype.propertyIsEnumerable,nE=(e,t,r)=>t in e?KH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YH=(e,t)=>{for(var r in t||(t={}))iT.call(t,r)&&nE(e,r,t[r]);if(Pf)for(var r of Pf(t))lT.call(t,r)&&nE(e,r,t[r]);return e},XH=(e,t)=>{var r={};for(var n in e)iT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Pf)for(var n of Pf(e))t.indexOf(n)<0&&lT.call(e,n)&&(r[n]=e[n]);return r};const sT=f.forwardRef((e,t)=>{const r=G("Center",{},e),{inline:n,className:o,unstyled:a,variant:i}=r,l=XH(r,["inline","className","unstyled","variant"]),{classes:c,cx:u}=QH({inline:n},{name:"Center",unstyled:a,variant:i});return s.createElement(le,YH({ref:t,className:u(c.root,o)},l))});sT.displayName="@mantine/core/Center";const tr=sT,cT=f.createContext(null),JH=cT.Provider,ZH=()=>f.useContext(cT);var eq=Object.defineProperty,$f=Object.getOwnPropertySymbols,uT=Object.prototype.hasOwnProperty,dT=Object.prototype.propertyIsEnumerable,oE=(e,t,r)=>t in e?eq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,aE=(e,t)=>{for(var r in t||(t={}))uT.call(t,r)&&oE(e,r,t[r]);if($f)for(var r of $f(t))dT.call(t,r)&&oE(e,r,t[r]);return e},tq=(e,t)=>{var r={};for(var n in e)uT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$f)for(var n of $f(e))t.indexOf(n)<0&&dT.call(e,n)&&(r[n]=e[n]);return r};const rq={size:"sm"},fT=f.forwardRef((e,t)=>{const r=G("CheckboxGroup",rq,e),{children:n,value:o,defaultValue:a,onChange:i,size:l,wrapperProps:c}=r,u=tq(r,["children","value","defaultValue","onChange","size","wrapperProps"]),[d,p]=Or({value:o,defaultValue:a,finalValue:[],onChange:i}),h=g=>{const y=g.currentTarget.value;p(d.includes(y)?d.filter(v=>v!==y):[...d,y])};return s.createElement(JH,{value:{value:d,onChange:h,size:l}},s.createElement(Vt.Wrapper,aE(aE({labelElement:"div",size:l,__staticSelector:"CheckboxGroup",ref:t},c),u),n))});fT.displayName="@mantine/core/CheckboxGroup";var nq=Object.defineProperty,Of=Object.getOwnPropertySymbols,pT=Object.prototype.hasOwnProperty,mT=Object.prototype.propertyIsEnumerable,iE=(e,t,r)=>t in e?nq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cf=(e,t)=>{for(var r in t||(t={}))pT.call(t,r)&&iE(e,r,t[r]);if(Of)for(var r of Of(t))mT.call(t,r)&&iE(e,r,t[r]);return e},hT=(e,t)=>{var r={};for(var n in e)pT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Of)for(var n of Of(e))t.indexOf(n)<0&&mT.call(e,n)&&(r[n]=e[n]);return r};function gT(e){const t=e,{width:r,height:n,style:o}=t,a=hT(t,["width","height","style"]);return s.createElement("svg",Cf({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Cf({width:r,height:n},o)},a),s.createElement("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 vT(e){var t=e,{indeterminate:r}=t,n=hT(t,["indeterminate"]);return r?s.createElement("svg",Cf({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},n),s.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):s.createElement(gT,Cf({},n))}var oq=Object.defineProperty,aq=Object.defineProperties,iq=Object.getOwnPropertyDescriptors,lE=Object.getOwnPropertySymbols,lq=Object.prototype.hasOwnProperty,sq=Object.prototype.propertyIsEnumerable,sE=(e,t,r)=>t in e?oq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cE=(e,t)=>{for(var r in t||(t={}))lq.call(t,r)&&sE(e,r,t[r]);if(lE)for(var r of lE(t))sq.call(t,r)&&sE(e,r,t[r]);return e},uE=(e,t)=>aq(e,iq(t));const cq={xs:P(16),sm:P(20),md:P(24),lg:P(30),xl:P(36)};var uq=H((e,{radius:t,color:r,transitionDuration:n,labelPosition:o,error:a,indeterminate:i},{size:l})=>{const c=L({size:l,sizes:cq}),u=e.fn.variant({variant:"filled",color:r});return{icon:uE(cE({},e.fn.cover()),{ref:zt("icon"),color:i?"inherit":e.white,transform:i?"none":`translateY(${P(5)}) scale(0.5)`,opacity:i?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${n}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:c,height:c,order:o==="left"?2:1},input:uE(cE({},e.fn.focusStyles()),{appearance:"none",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${P(1)} solid ${a?e.fn.variant({variant:"filled",color:"red"}).background:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,width:c,height:c,borderRadius:e.fn.radius(t),padding:0,display:"block",margin:0,transition:`border-color ${n}ms ease, background-color ${n}ms ease`,cursor:e.cursorType,"&:checked":{backgroundColor:u.background,borderColor:u.background,[`& + .${zt("icon")}`]:{opacity:1,color:e.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[3],cursor:"not-allowed",pointerEvents:"none",[`& + .${zt("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5]}}})}});const dq=uq;var fq=Object.defineProperty,pq=Object.defineProperties,mq=Object.getOwnPropertyDescriptors,dE=Object.getOwnPropertySymbols,hq=Object.prototype.hasOwnProperty,gq=Object.prototype.propertyIsEnumerable,fE=(e,t,r)=>t in e?fq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vq=(e,t)=>{for(var r in t||(t={}))hq.call(t,r)&&fE(e,r,t[r]);if(dE)for(var r of dE(t))gq.call(t,r)&&fE(e,r,t[r]);return e},yq=(e,t)=>pq(e,mq(t));const Zh={xs:P(16),sm:P(20),md:P(24),lg:P(30),xl:P(36)};var wq=H((e,{labelPosition:t},{size:r})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}},labelWrapper:yq(vq({},e.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:r in Zh?L({size:r,sizes:e.fontSizes}):void 0,lineHeight:r in Zh?L({size:r,sizes:Zh}):void 0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,cursor:e.cursorType,order:t==="left"?1:2}),description:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},error:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},label:{cursor:e.cursorType,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm,"&:disabled, &[data-disabled]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}));const bq=wq;var _q=Object.defineProperty,kf=Object.getOwnPropertySymbols,yT=Object.prototype.hasOwnProperty,wT=Object.prototype.propertyIsEnumerable,pE=(e,t,r)=>t in e?_q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xq=(e,t)=>{for(var r in t||(t={}))yT.call(t,r)&&pE(e,r,t[r]);if(kf)for(var r of kf(t))wT.call(t,r)&&pE(e,r,t[r]);return e},Eq=(e,t)=>{var r={};for(var n in e)yT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&kf)for(var n of kf(e))t.indexOf(n)<0&&wT.call(e,n)&&(r[n]=e[n]);return r};const Fm=f.forwardRef((e,t)=>{var r=e,{__staticSelector:n,className:o,classNames:a,styles:i,unstyled:l,children:c,label:u,description:d,id:p,disabled:h,error:g,size:y,labelPosition:v,variant:E}=r,w=Eq(r,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:b,cx:_}=bq({labelPosition:v},{name:n,styles:i,classNames:a,unstyled:l,variant:E,size:y});return s.createElement(le,xq({className:_(b.root,o),ref:t},w),s.createElement("div",{className:_(b.body)},c,s.createElement("div",{className:b.labelWrapper},u!=null&&s.createElement("label",{className:b.label,"data-disabled":h||void 0,htmlFor:p},u),d&&s.createElement(Vt.Description,{className:b.description},d),g&&g!=="boolean"&&s.createElement(Vt.Error,{className:b.error},g))))});Fm.displayName="@mantine/core/InlineInput";var Sq=Object.defineProperty,jf=Object.getOwnPropertySymbols,bT=Object.prototype.hasOwnProperty,_T=Object.prototype.propertyIsEnumerable,mE=(e,t,r)=>t in e?Sq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wu=(e,t)=>{for(var r in t||(t={}))bT.call(t,r)&&mE(e,r,t[r]);if(jf)for(var r of jf(t))_T.call(t,r)&&mE(e,r,t[r]);return e},Pq=(e,t)=>{var r={};for(var n in e)bT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&jf)for(var n of jf(e))t.indexOf(n)<0&&_T.call(e,n)&&(r[n]=e[n]);return r};const $q={size:"sm",transitionDuration:100,icon:vT,labelPosition:"right"},kn=f.forwardRef((e,t)=>{const r=G("Checkbox",$q,e),{className:n,style:o,sx:a,checked:i,disabled:l,color:c,label:u,indeterminate:d,id:p,size:h,radius:g,wrapperProps:y,children:v,classNames:E,styles:w,transitionDuration:b,icon:_,unstyled:x,labelPosition:S,description:$,error:O,variant:C}=r,T=Pq(r,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),k=ZH(),I=kr(p),{systemStyles:j,rest:N}=Zn(T),{classes:D}=dq({radius:g,color:c,transitionDuration:b,labelPosition:S,error:!!O,indeterminate:d},{name:"Checkbox",classNames:E,styles:w,unstyled:x,variant:C,size:(k==null?void 0:k.size)||h}),z=k?{checked:k.value.includes(N.value),onChange:k.onChange}:{};return s.createElement(Fm,wu(wu({className:n,sx:a,style:o,id:I,size:(k==null?void 0:k.size)||h,labelPosition:S,label:u,description:$,error:O,disabled:l,__staticSelector:"Checkbox",classNames:E,styles:w,unstyled:x,"data-checked":z.checked||void 0,variant:C},j),y),s.createElement("div",{className:D.inner},s.createElement("input",wu(wu({id:I,ref:t,type:"checkbox",className:D.input,checked:i,disabled:l},N),z)),s.createElement(_,{indeterminate:d,className:D.icon})))});kn.displayName="@mantine/core/Checkbox";kn.Group=fT;const xT=f.createContext(null),Oq=xT.Provider,Cq=()=>f.useContext(xT),kq={};function ET(e){const{value:t,defaultValue:r,onChange:n,multiple:o,children:a}=G("ChipGroup",kq,e),[i,l]=Or({value:t,defaultValue:r,finalValue:o?[]:null,onChange:n}),c=d=>Array.isArray(i)?i.includes(d):d===i,u=d=>{const p=d.currentTarget.value;Array.isArray(i)?l(i.includes(p)?i.filter(h=>h!==p):[...i,p]):l(p)};return s.createElement(Oq,{value:{isChipSelected:c,onChange:u,multiple:o}},a)}ET.displayName="@mantine/core/ChipGroup";var jq=Object.defineProperty,Rq=Object.defineProperties,Tq=Object.getOwnPropertyDescriptors,hE=Object.getOwnPropertySymbols,Iq=Object.prototype.hasOwnProperty,Dq=Object.prototype.propertyIsEnumerable,gE=(e,t,r)=>t in e?jq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xn=(e,t)=>{for(var r in t||(t={}))Iq.call(t,r)&&gE(e,r,t[r]);if(hE)for(var r of hE(t))Dq.call(t,r)&&gE(e,r,t[r]);return e},ps=(e,t)=>Rq(e,Tq(t));const vE={xs:P(24),sm:P(28),md:P(32),lg:P(36),xl:P(40)},Xl={xs:P(10),sm:P(12),md:P(14),lg:P(16),xl:P(18)},yE={xs:P(16),sm:P(20),md:P(24),lg:P(28),xl:P(32)},bu={xs:P(7.5),sm:P(10),md:P(11.5),lg:P(13),xl:P(15)};function Nq(e,{color:t},r){const n=e.fn.variant({variant:"filled",color:t}),o=e.fn.variant({variant:"light",color:t});return r==="light"?{label:xn({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:ps(xn({color:o.color,backgroundColor:o.background},e.fn.hover({backgroundColor:o.hover})),{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:t}).background}})}:r==="filled"?{label:xn({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:xn({color:n.color,backgroundColor:n.background},e.fn.hover({backgroundColor:n.hover}))}:r==="outline"?{label:xn({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:{border:`${P(1)} solid ${n.background}`}}:{label:null,checked:null}}var Aq=H((e,{radius:t,color:r},{size:n,variant:o})=>{const a=Nq(e,{color:r},o);return{root:{},label:ps(xn(ps(xn({ref:zt("label")},e.fn.fontStyles()),{boxSizing:"border-box",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"inline-flex",alignItems:"center",userSelect:"none",border:`${P(1)} solid transparent`,borderRadius:e.fn.radius(t),height:L({size:n,sizes:vE}),fontSize:L({size:n,sizes:e.fontSizes}),lineHeight:`calc(${L({size:n,sizes:vE})} - ${P(2)})`,paddingLeft:L({size:n,sizes:yE}),paddingRight:L({size:n,sizes:yE}),cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 100ms ease",WebkitTapHighlightColor:"transparent"}),a.label),{"&[data-disabled]":ps(xn({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${zt("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}),"&[data-checked]":{paddingLeft:L({size:n,sizes:bu}),paddingRight:L({size:n,sizes:bu}),"&:not([data-disabled])":a.checked}}),iconWrapper:{ref:zt("iconWrapper"),color:o==="filled"?e.white:e.fn.variant({variant:"filled",color:r}).background,width:`calc(${L({size:n,sizes:Xl})} + (${L({size:n,sizes:e.spacing})} / 1.5))`,maxWidth:`calc(${L({size:n,sizes:Xl})} + (${L({size:n,sizes:e.spacing})} / 1.5))`,height:L({size:n,sizes:Xl}),display:"inline-block",verticalAlign:"middle",overflow:"hidden"},checkIcon:{width:L({size:n,sizes:Xl}),height:`calc(${L({size:n,sizes:Xl})} / 1.1)`,display:"block"},input:{width:0,height:0,padding:0,opacity:0,margin:0,"&:disabled + label":ps(xn({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${zt("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&[data-checked]":{paddingLeft:L({size:n,sizes:bu}),paddingRight:L({size:n,sizes:bu}),"&:not([data-disabled])":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}),"&:focus":{outline:"none",[`& + .${zt("label")}`]:xn({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),"&:focus:not(:focus-visible)":{[`& + .${zt("label")}`]:xn({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)}}}}});const Mq=Aq;var Lq=Object.defineProperty,Rf=Object.getOwnPropertySymbols,ST=Object.prototype.hasOwnProperty,PT=Object.prototype.propertyIsEnumerable,wE=(e,t,r)=>t in e?Lq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_u=(e,t)=>{for(var r in t||(t={}))ST.call(t,r)&&wE(e,r,t[r]);if(Rf)for(var r of Rf(t))PT.call(t,r)&&wE(e,r,t[r]);return e},zq=(e,t)=>{var r={};for(var n in e)ST.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Rf)for(var n of Rf(e))t.indexOf(n)<0&&PT.call(e,n)&&(r[n]=e[n]);return r};const Fq={type:"checkbox",size:"sm",radius:"xl",variant:"outline"},Tf=f.forwardRef((e,t)=>{const r=G("Chip",Fq,e),{radius:n,type:o,size:a,variant:i,disabled:l,id:c,color:u,children:d,className:p,classNames:h,style:g,styles:y,checked:v,defaultChecked:E,onChange:w,sx:b,wrapperProps:_,value:x,unstyled:S}=r,$=zq(r,["radius","type","size","variant","disabled","id","color","children","className","classNames","style","styles","checked","defaultChecked","onChange","sx","wrapperProps","value","unstyled"]),O=Cq(),C=kr(c),{systemStyles:T,rest:k}=Zn($),{classes:I,cx:j}=Mq({radius:n,color:u},{classNames:h,styles:y,unstyled:S,name:"Chip",variant:i,size:a}),[N,D]=Or({value:v,defaultValue:E,finalValue:!1,onChange:w}),z=O?{checked:O.isChipSelected(x),onChange:O.onChange,type:O.multiple?"checkbox":"radio"}:{},W=z.checked||N;return s.createElement(le,_u(_u({className:j(I.root,p),style:g,sx:b},T),_),s.createElement("input",_u(_u({type:o,className:I.input,checked:W,onChange:K=>D(K.currentTarget.checked),id:C,disabled:l,ref:t,value:x},z),k)),s.createElement("label",{htmlFor:C,"data-checked":W||void 0,"data-disabled":l||void 0,className:I.label},W&&s.createElement("span",{className:I.iconWrapper},s.createElement(gT,{className:I.checkIcon})),d))});Tf.displayName="@mantine/core/Chip";Tf.Group=ET;var Vq=H((e,{fluid:t,sizes:r},{size:n})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":L({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const Bq=Vq;var Uq=Object.defineProperty,If=Object.getOwnPropertySymbols,$T=Object.prototype.hasOwnProperty,OT=Object.prototype.propertyIsEnumerable,bE=(e,t,r)=>t in e?Uq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wq=(e,t)=>{for(var r in t||(t={}))$T.call(t,r)&&bE(e,r,t[r]);if(If)for(var r of If(t))OT.call(t,r)&&bE(e,r,t[r]);return e},Hq=(e,t)=>{var r={};for(var n in e)$T.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&If)for(var n of If(e))t.indexOf(n)<0&&OT.call(e,n)&&(r[n]=e[n]);return r};const qq={sizes:{xs:P(540),sm:P(720),md:P(960),lg:P(1140),xl:P(1320)}},CT=f.forwardRef((e,t)=>{const r=G("Container",qq,e),{className:n,fluid:o,size:a,unstyled:i,sizes:l,variant:c}=r,u=Hq(r,["className","fluid","size","unstyled","sizes","variant"]),{classes:d,cx:p}=Bq({fluid:o,sizes:l},{unstyled:i,name:"Container",variant:c,size:a});return s.createElement(le,Wq({className:p(d.root,n),ref:t},u))});CT.displayName="@mantine/core/Container";var Gq=Object.defineProperty,Df=Object.getOwnPropertySymbols,kT=Object.prototype.hasOwnProperty,jT=Object.prototype.propertyIsEnumerable,_E=(e,t,r)=>t in e?Gq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qq=(e,t)=>{for(var r in t||(t={}))kT.call(t,r)&&_E(e,r,t[r]);if(Df)for(var r of Df(t))jT.call(t,r)&&_E(e,r,t[r]);return e},Kq=(e,t)=>{var r={};for(var n in e)kT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Df)for(var n of Df(e))t.indexOf(n)<0&&jT.call(e,n)&&(r[n]=e[n]);return r};const Yq={timeout:1e3};function RT(e){const t=G("CopyButton",Yq,e),{children:r,timeout:n,value:o}=t,a=Kq(t,["children","timeout","value"]),i=AM({timeout:n}),l=()=>i.copy(o);return s.createElement(s.Fragment,null,r(Qq({copy:l,copied:i.copied},a)))}RT.displayName="@mantine/core/CopyButton";const[Xq,jl]=Po("ModalBase component was not found in tree");var Jq=H(()=>({close:{marginLeft:"auto",marginRight:0}}));const Zq=Jq;var eG=Object.defineProperty,Nf=Object.getOwnPropertySymbols,TT=Object.prototype.hasOwnProperty,IT=Object.prototype.propertyIsEnumerable,xE=(e,t,r)=>t in e?eG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tG=(e,t)=>{for(var r in t||(t={}))TT.call(t,r)&&xE(e,r,t[r]);if(Nf)for(var r of Nf(t))IT.call(t,r)&&xE(e,r,t[r]);return e},rG=(e,t)=>{var r={};for(var n in e)TT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Nf)for(var n of Nf(e))t.indexOf(n)<0&&IT.call(e,n)&&(r[n]=e[n]);return r};const nG={size:"sm"},oG=f.forwardRef((e,t)=>{const r=jl(),n=G(`${r.__staticSelector}CloseButton`,nG,e),{className:o}=n,a=rG(n,["className"]),{classes:i,cx:l}=Zq(null,r.stylesApi);return s.createElement(fc,tG({className:l(i.close,o),ref:t,onClick:r.onClose},a))});var aG=H(()=>({overlay:{}}));const iG=aG;var lG=Object.defineProperty,sG=Object.defineProperties,cG=Object.getOwnPropertyDescriptors,EE=Object.getOwnPropertySymbols,uG=Object.prototype.hasOwnProperty,dG=Object.prototype.propertyIsEnumerable,SE=(e,t,r)=>t in e?lG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fG=(e,t)=>{for(var r in t||(t={}))uG.call(t,r)&&SE(e,r,t[r]);if(EE)for(var r of EE(t))dG.call(t,r)&&SE(e,r,t[r]);return e},pG=(e,t)=>sG(e,cG(t)),mG=H((e,{color:t,opacity:r,blur:n,radius:o,gradient:a,fixed:i,zIndex:l})=>({root:pG(fG({},e.fn.cover(0)),{position:i?"fixed":"absolute",backgroundColor:a?void 0:e.fn.rgba(t,r),backgroundImage:a,backdropFilter:n?`blur(${P(n)})`:void 0,borderRadius:e.fn.radius(o),zIndex:l,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const hG=mG;var gG=Object.defineProperty,Af=Object.getOwnPropertySymbols,DT=Object.prototype.hasOwnProperty,NT=Object.prototype.propertyIsEnumerable,PE=(e,t,r)=>t in e?gG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vG=(e,t)=>{for(var r in t||(t={}))DT.call(t,r)&&PE(e,r,t[r]);if(Af)for(var r of Af(t))NT.call(t,r)&&PE(e,r,t[r]);return e},yG=(e,t)=>{var r={};for(var n in e)DT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Af)for(var n of Af(e))t.indexOf(n)<0&&NT.call(e,n)&&(r[n]=e[n]);return r};const wG={opacity:.6,color:"#000",zIndex:Rn("modal"),radius:0},AT=f.forwardRef((e,t)=>{const r=G("Overlay",wG,e),{variant:n,opacity:o,color:a,blur:i,gradient:l,zIndex:c,radius:u,children:d,className:p,classNames:h,styles:g,unstyled:y,center:v,fixed:E}=r,w=yG(r,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:b,cx:_}=hG({color:a,opacity:o,blur:i,radius:u,gradient:l,fixed:E,zIndex:c},{name:"Overlay",classNames:h,styles:g,unstyled:y,variant:n});return s.createElement(le,vG({ref:t,className:_(b.root,p),"data-center":v||void 0},w),d)});AT.displayName="@mantine/core/Overlay";const MT=AT;var bG=Object.defineProperty,_G=Object.defineProperties,xG=Object.getOwnPropertyDescriptors,Mf=Object.getOwnPropertySymbols,LT=Object.prototype.hasOwnProperty,zT=Object.prototype.propertyIsEnumerable,$E=(e,t,r)=>t in e?bG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jl=(e,t)=>{for(var r in t||(t={}))LT.call(t,r)&&$E(e,r,t[r]);if(Mf)for(var r of Mf(t))zT.call(t,r)&&$E(e,r,t[r]);return e},EG=(e,t)=>_G(e,xG(t)),SG=(e,t)=>{var r={};for(var n in e)LT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mf)for(var n of Mf(e))t.indexOf(n)<0&&zT.call(e,n)&&(r[n]=e[n]);return r};const PG={},$G=f.forwardRef((e,t)=>{const r=jl(),n=G(`${r.__staticSelector}Overlay`,PG,e),{onClick:o,transitionProps:a,style:i,className:l}=n,c=SG(n,["onClick","transitionProps","style","className"]),{classes:u,cx:d}=iG(null,r.stylesApi),p=h=>{o==null||o(h),r.closeOnClickOutside&&r.onClose()};return s.createElement(li,EG(Jl(Jl({mounted:r.opened},r.transitionProps),a),{transition:"fade"}),h=>s.createElement(MT,Jl({ref:t,onClick:p,fixed:!0,style:Jl(Jl({},i),h),className:d(u.overlay,l),zIndex:r.zIndex},c)))});var OG=H((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const CG=OG;var kG=Object.defineProperty,Lf=Object.getOwnPropertySymbols,FT=Object.prototype.hasOwnProperty,VT=Object.prototype.propertyIsEnumerable,OE=(e,t,r)=>t in e?kG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zl=(e,t)=>{for(var r in t||(t={}))FT.call(t,r)&&OE(e,r,t[r]);if(Lf)for(var r of Lf(t))VT.call(t,r)&&OE(e,r,t[r]);return e},jG=(e,t)=>{var r={};for(var n in e)FT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Lf)for(var n of Lf(e))t.indexOf(n)<0&&VT.call(e,n)&&(r[n]=e[n]);return r};const RG={},TG=f.forwardRef((e,t)=>{const r=jl(),n=G(`${r.__staticSelector}Content`,RG,e),{className:o,transitionProps:a,style:i,onKeyDown:l}=n,c=jG(n,["className","transitionProps","style","onKeyDown"]),{classes:u,cx:d}=CG({zIndex:r.zIndex},r.stylesApi),p=h=>{var g;((g=h.target)==null?void 0:g.getAttribute("data-mantine-stop-propagation"))!=="true"&&h.key==="Escape"&&r.closeOnEscape&&r.onClose(),l==null||l(h)};return s.createElement(li,Zl(Zl({mounted:r.opened,transition:"pop"},r.transitionProps),a),h=>s.createElement("div",{className:d(u.inner)},s.createElement(O0,{active:r.opened&&r.trapFocus},s.createElement(Pn,Zl({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":r.bodyMounted?r.getBodyId():void 0,"aria-labelledby":r.titleMounted?r.getTitleId():void 0,onKeyDown:p,ref:t,className:d(u.content,o),style:Zl(Zl({},i),h),shadow:r.shadow},c),c.children))))});var IG=H((e,{padding:t})=>{const r=L({size:t,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:r,paddingRight:`calc(${r} - ${P(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const DG=IG;var NG=Object.defineProperty,zf=Object.getOwnPropertySymbols,BT=Object.prototype.hasOwnProperty,UT=Object.prototype.propertyIsEnumerable,CE=(e,t,r)=>t in e?NG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AG=(e,t)=>{for(var r in t||(t={}))BT.call(t,r)&&CE(e,r,t[r]);if(zf)for(var r of zf(t))UT.call(t,r)&&CE(e,r,t[r]);return e},MG=(e,t)=>{var r={};for(var n in e)BT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zf)for(var n of zf(e))t.indexOf(n)<0&&UT.call(e,n)&&(r[n]=e[n]);return r};const LG={},zG=f.forwardRef((e,t)=>{const r=jl(),n=G(`${r.__staticSelector}Header`,LG,e),{className:o}=n,a=MG(n,["className"]),{classes:i,cx:l}=DG({padding:r.padding},r.stylesApi);return s.createElement(le,AG({ref:t,className:l(i.header,o)},a))});var FG=H(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const VG=FG;var BG=Object.defineProperty,Ff=Object.getOwnPropertySymbols,WT=Object.prototype.hasOwnProperty,HT=Object.prototype.propertyIsEnumerable,kE=(e,t,r)=>t in e?BG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UG=(e,t)=>{for(var r in t||(t={}))WT.call(t,r)&&kE(e,r,t[r]);if(Ff)for(var r of Ff(t))HT.call(t,r)&&kE(e,r,t[r]);return e},WG=(e,t)=>{var r={};for(var n in e)WT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ff)for(var n of Ff(e))t.indexOf(n)<0&&HT.call(e,n)&&(r[n]=e[n]);return r};const HG={},qG=f.forwardRef((e,t)=>{const r=jl(),n=G(`${r.__staticSelector}Title`,HG,e),{className:o}=n,a=WG(n,["className"]),{classes:i,cx:l}=VG(null,r.stylesApi);return f.useEffect(()=>(r.setTitleMounted(!0),()=>r.setTitleMounted(!1)),[]),s.createElement(le,UG({component:"h2",id:r.getTitleId(),className:l(i.title,o),ref:t},a))});var GG=H((e,{padding:t})=>({body:{padding:L({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const QG=GG;var KG=Object.defineProperty,Vf=Object.getOwnPropertySymbols,qT=Object.prototype.hasOwnProperty,GT=Object.prototype.propertyIsEnumerable,jE=(e,t,r)=>t in e?KG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YG=(e,t)=>{for(var r in t||(t={}))qT.call(t,r)&&jE(e,r,t[r]);if(Vf)for(var r of Vf(t))GT.call(t,r)&&jE(e,r,t[r]);return e},XG=(e,t)=>{var r={};for(var n in e)qT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Vf)for(var n of Vf(e))t.indexOf(n)<0&>.call(e,n)&&(r[n]=e[n]);return r};const JG={},ZG=f.forwardRef((e,t)=>{const r=jl(),n=G(`${r.__staticSelector}Body`,JG,e),{className:o}=n,a=XG(n,["className"]),{classes:i,cx:l}=QG({padding:r.padding},r.stylesApi);return f.useEffect(()=>(r.setBodyMounted(!0),()=>r.setBodyMounted(!1)),[]),s.createElement(le,YG({id:r.getBodyId(),className:l(i.body,o),ref:t},a))});function eQ({children:e}){return s.createElement(s.Fragment,null,e)}function tQ({opened:e,transitionDuration:t}){const[r,n]=f.useState(e),o=f.useRef(),i=ym()?0:t;return f.useEffect(()=>(e?(n(!0),window.clearTimeout(o.current)):i===0?n(!1):o.current=window.setTimeout(()=>n(!1),i),()=>window.clearTimeout(o.current)),[e,i]),r}var rQ=H(()=>({root:{}}));const nQ=rQ;var oQ=Object.defineProperty,aQ=Object.defineProperties,iQ=Object.getOwnPropertyDescriptors,Bf=Object.getOwnPropertySymbols,QT=Object.prototype.hasOwnProperty,KT=Object.prototype.propertyIsEnumerable,RE=(e,t,r)=>t in e?oQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eg=(e,t)=>{for(var r in t||(t={}))QT.call(t,r)&&RE(e,r,t[r]);if(Bf)for(var r of Bf(t))KT.call(t,r)&&RE(e,r,t[r]);return e},TE=(e,t)=>aQ(e,iQ(t)),lQ=(e,t)=>{var r={};for(var n in e)QT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Bf)for(var n of Bf(e))t.indexOf(n)<0&&KT.call(e,n)&&(r[n]=e[n]);return r};const D0={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Rn("modal"),padding:"md",size:"md",shadow:"xl"};function Ct(e){const t=G("ModalBase",D0,e),{opened:r,onClose:n,children:o,closeOnClickOutside:a,__staticSelector:i,transitionProps:l,withinPortal:c,portalProps:u,keepMounted:d,target:p,zIndex:h,lockScroll:g,trapFocus:y,closeOnEscape:v,returnFocus:E,padding:w,shadow:b,id:_,size:x,variant:S,classNames:$,unstyled:O,styles:C,className:T}=t,k=lQ(t,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:I,cx:j}=nQ(null,{name:i,classNames:$,styles:C,unstyled:O,variant:S,size:x}),N=kr(_),[D,z]=f.useState(!1),[W,K]=f.useState(!1),R=typeof(l==null?void 0:l.duration)=="number"?l==null?void 0:l.duration:200,A=tQ({opened:r,transitionDuration:R});return Tg("keydown",V=>{!y&&V.key==="Escape"&&v&&n()}),uC({opened:r,shouldReturnFocus:y&&E}),s.createElement(Cl,TE(eg({},u),{withinPortal:c,target:p}),s.createElement(Xq,{value:{__staticSelector:i,opened:r,onClose:n,closeOnClickOutside:a,transitionProps:TE(eg({},l),{duration:R,keepMounted:d}),zIndex:h,padding:w,id:N,getTitleId:()=>`${N}-title`,getBodyId:()=>`${N}-body`,titleMounted:D,bodyMounted:W,setTitleMounted:z,setBodyMounted:K,trapFocus:y,closeOnEscape:v,shadow:b,stylesApi:{name:i,size:x,variant:S,classNames:$,styles:C,unstyled:O}}},s.createElement(lA,{enabled:A&&g},s.createElement(le,eg({className:j(I.root,T)},k),o))))}Ct.CloseButton=oG;Ct.Overlay=$G;Ct.Content=TG;Ct.Header=zG;Ct.Title=qG;Ct.Body=ZG;Ct.NativeScrollArea=eQ;const[sQ,cQ]=Po("Grid component was not found in tree");var uQ=Object.defineProperty,IE=Object.getOwnPropertySymbols,dQ=Object.prototype.hasOwnProperty,fQ=Object.prototype.propertyIsEnumerable,DE=(e,t,r)=>t in e?uQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pQ=(e,t)=>{for(var r in t||(t={}))dQ.call(t,r)&&DE(e,r,t[r]);if(IE)for(var r of IE(t))fQ.call(t,r)&&DE(e,r,t[r]);return e};const N0=(e,t)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(t/e)}%`:void 0,YT=(e,t,r)=>r||e==="auto"||e==="content"?"unset":N0(e,t),XT=(e,t)=>{if(e)return e==="auto"||t?1:0},JT=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,ZT=(e,t)=>typeof e<"u"?`calc(${L({size:e,sizes:t.spacing})} / 2)`:void 0;function mQ({sizes:e,offsets:t,orders:r,theme:n,columns:o,gutters:a,grow:i}){return BO.reduce((l,c)=>(l[`@media (min-width: ${sr(n.breakpoints[c])})`]={order:r[c],flexBasis:N0(e[c],o),padding:ZT(a[c],n),flexShrink:0,width:e[c]==="content"?"auto":void 0,maxWidth:YT(e[c],o,i),marginLeft:JT(t[c],o),flexGrow:XT(e[c],i)},l),{})}var hQ=H((e,{gutter:t,gutterXs:r,gutterSm:n,gutterMd:o,gutterLg:a,gutterXl:i,grow:l,offset:c,offsetXs:u,offsetSm:d,offsetMd:p,offsetLg:h,offsetXl:g,columns:y,span:v,xs:E,sm:w,md:b,lg:_,xl:x,order:S,orderXs:$,orderSm:O,orderMd:C,orderLg:T,orderXl:k})=>({col:pQ({boxSizing:"border-box",flexGrow:XT(v,l),order:S,padding:ZT(t,e),marginLeft:JT(c,y),flexBasis:N0(v,y),flexShrink:0,width:v==="content"?"auto":void 0,maxWidth:YT(v,y,l)},mQ({sizes:{xs:E,sm:w,md:b,lg:_,xl:x},offsets:{xs:u,sm:d,md:p,lg:h,xl:g},orders:{xs:$,sm:O,md:C,lg:T,xl:k},gutters:{xs:r,sm:n,md:o,lg:a,xl:i},theme:e,columns:y,grow:l}))}));const gQ=hQ;var vQ=Object.defineProperty,Uf=Object.getOwnPropertySymbols,eI=Object.prototype.hasOwnProperty,tI=Object.prototype.propertyIsEnumerable,NE=(e,t,r)=>t in e?vQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yQ=(e,t)=>{for(var r in t||(t={}))eI.call(t,r)&&NE(e,r,t[r]);if(Uf)for(var r of Uf(t))tI.call(t,r)&&NE(e,r,t[r]);return e},wQ=(e,t)=>{var r={};for(var n in e)eI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Uf)for(var n of Uf(e))t.indexOf(n)<0&&tI.call(e,n)&&(r[n]=e[n]);return r};const bQ={};function _Q(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const rI=f.forwardRef((e,t)=>{const r=G("GridCol",bQ,e),{children:n,span:o,offset:a,offsetXs:i,offsetSm:l,offsetMd:c,offsetLg:u,offsetXl:d,xs:p,sm:h,md:g,lg:y,xl:v,order:E,orderXs:w,orderSm:b,orderMd:_,orderLg:x,orderXl:S,className:$,unstyled:O,variant:C}=r,T=wQ(r,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","unstyled","variant"]),k=cQ(),I=o||k.columns,{classes:j,cx:N}=gQ({gutter:k.gutter,gutterXs:k.gutterXs,gutterSm:k.gutterSm,gutterMd:k.gutterMd,gutterLg:k.gutterLg,gutterXl:k.gutterXl,offset:a,offsetXs:i,offsetSm:l,offsetMd:c,offsetLg:u,offsetXl:d,xs:p,sm:h,md:g,lg:y,xl:v,order:E,orderXs:w,orderSm:b,orderMd:_,orderLg:x,orderXl:S,grow:k.grow,columns:k.columns,span:I},{unstyled:O,name:"Grid",variant:C});return!_Q(I)||I>k.columns?null:s.createElement(le,yQ({className:N(j.col,$),ref:t},T),n)});rI.displayName="@mantine/core/Col";var xQ=Object.defineProperty,AE=Object.getOwnPropertySymbols,EQ=Object.prototype.hasOwnProperty,SQ=Object.prototype.propertyIsEnumerable,ME=(e,t,r)=>t in e?xQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,PQ=(e,t)=>{for(var r in t||(t={}))EQ.call(t,r)&&ME(e,r,t[r]);if(AE)for(var r of AE(t))SQ.call(t,r)&&ME(e,r,t[r]);return e};function $Q(e,t){return BO.reduce((r,n)=>(typeof e[n]<"u"&&(r[`@media (min-width: ${t.breakpoints[n]})`]={margin:`calc(-${L({size:e[n],sizes:t.spacing})} / 2)`}),r),{})}var OQ=H((e,{justify:t,align:r,gutter:n,gutterXs:o,gutterSm:a,gutterMd:i,gutterLg:l,gutterXl:c})=>({root:PQ({margin:`calc(-${L({size:n,sizes:e.spacing})} / 2)`,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:r},$Q({xs:o,sm:a,md:i,lg:l,xl:c},e))}));const CQ=OQ;var kQ=Object.defineProperty,Wf=Object.getOwnPropertySymbols,nI=Object.prototype.hasOwnProperty,oI=Object.prototype.propertyIsEnumerable,LE=(e,t,r)=>t in e?kQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jQ=(e,t)=>{for(var r in t||(t={}))nI.call(t,r)&&LE(e,r,t[r]);if(Wf)for(var r of Wf(t))oI.call(t,r)&&LE(e,r,t[r]);return e},RQ=(e,t)=>{var r={};for(var n in e)nI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wf)for(var n of Wf(e))t.indexOf(n)<0&&oI.call(e,n)&&(r[n]=e[n]);return r};const TQ={gutter:"md",justify:"flex-start",align:"stretch",columns:12},rn=f.forwardRef((e,t)=>{const r=G("Grid",TQ,e),{gutter:n,gutterXs:o,gutterSm:a,gutterMd:i,gutterLg:l,gutterXl:c,children:u,grow:d,justify:p,align:h,columns:g,className:y,unstyled:v,variant:E}=r,w=RQ(r,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","unstyled","variant"]),{classes:b,cx:_}=CQ({gutter:n,justify:p,align:h,gutterXs:o,gutterSm:a,gutterMd:i,gutterLg:l,gutterXl:c},{unstyled:v,name:"Grid",variant:E});return s.createElement(sQ,{value:{gutter:n,gutterXs:o,gutterSm:a,gutterMd:i,gutterLg:l,gutterXl:c,grow:d,columns:g}},s.createElement(le,jQ({className:_(b.root,y),ref:t},w),u))});rn.Col=rI;rn.displayName="@mantine/core/Grid";function IQ(e){return f.Children.toArray(e).filter(Boolean)}const aI={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var DQ=H((e,{spacing:t,position:r,noWrap:n,grow:o,align:a,count:i})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:a||"center",flexWrap:n?"nowrap":"wrap",justifyContent:aI[r],gap:L({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/i}% - (${P(L({size:t,sizes:e.spacing}))} - ${L({size:t,sizes:e.spacing})} / ${i}))`:void 0,flexGrow:o?1:0}}}));const NQ=DQ;var AQ=Object.defineProperty,Hf=Object.getOwnPropertySymbols,iI=Object.prototype.hasOwnProperty,lI=Object.prototype.propertyIsEnumerable,zE=(e,t,r)=>t in e?AQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,MQ=(e,t)=>{for(var r in t||(t={}))iI.call(t,r)&&zE(e,r,t[r]);if(Hf)for(var r of Hf(t))lI.call(t,r)&&zE(e,r,t[r]);return e},LQ=(e,t)=>{var r={};for(var n in e)iI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Hf)for(var n of Hf(e))t.indexOf(n)<0&&lI.call(e,n)&&(r[n]=e[n]);return r};const zQ={position:"left",spacing:"md"},J=f.forwardRef((e,t)=>{const r=G("Group",zQ,e),{className:n,position:o,align:a,children:i,noWrap:l,grow:c,spacing:u,unstyled:d,variant:p}=r,h=LQ(r,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),g=IQ(i),{classes:y,cx:v}=NQ({align:a,grow:c,noWrap:l,spacing:u,position:o,count:g.length},{unstyled:d,name:"Group",variant:p});return s.createElement(le,MQ({className:v(y.root,n),ref:t},h),g)});J.displayName="@mantine/core/Group";function FQ({open:e,close:t,openDelay:r,closeDelay:n}){const o=f.useRef(-1),a=f.useRef(-1),i=()=>{window.clearTimeout(o.current),window.clearTimeout(a.current)},l=()=>{i(),r===0?e():o.current=window.setTimeout(e,r)},c=()=>{i(),n===0?t():a.current=window.setTimeout(t,n)};return f.useEffect(()=>i,[]),{openDropdown:l,closeDropdown:c}}function FE(e,t){if(typeof e=="string"&&e.trim().length===0)return!0;try{return t(e),!0}catch{return!1}}var VQ=H((e,t,{size:r})=>({input:{fontFamily:e.fontFamilyMonospace,fontSize:`calc(${L({size:r,sizes:e.fontSizes})} - ${P(2)})`}}));const BQ=VQ;function A0(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var UQ=f.useLayoutEffect,WQ=function(t){var r=f.useRef(t);return UQ(function(){r.current=t}),r},VE=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},HQ=function(t,r){var n=f.useRef();return f.useCallback(function(o){t.current=o,n.current&&VE(n.current,null),n.current=r,r&&VE(r,o)},[r])},BE={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},UE=function(t){Object.keys(BE).forEach(function(r){t.style.setProperty(r,BE[r],"important")})},Ar=null,qQ=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function GQ(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),Ar||(Ar=document.createElement("textarea"),Ar.setAttribute("tabindex","-1"),Ar.setAttribute("aria-hidden","true"),UE(Ar)),Ar.parentNode===null&&document.body.appendChild(Ar);var o=e.paddingSize,a=e.borderSize,i=e.sizingStyle,l=i.boxSizing;Object.keys(i).forEach(function(h){var g=h;Ar.style[g]=i[g]}),UE(Ar),Ar.value=t;var c=qQ(Ar,e);Ar.value="x";var u=Ar.scrollHeight-o,d=u*r;l==="border-box"&&(d=d+o+a),c=Math.max(d,c);var p=u*n;return l==="border-box"&&(p=p+o+a),c=Math.min(p,c),[c,u]}var WE=function(){},QQ=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},KQ=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],YQ=!!document.documentElement.currentStyle,XQ=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=QQ(KQ,r),o=n.boxSizing;if(o==="")return null;YQ&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var a=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),i=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:a,borderSize:i}},JQ=function(t){var r=WQ(t);f.useLayoutEffect(function(){var n=function(a){r.current(a)};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}},[])},ZQ=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,a=t.minRows,i=t.onChange,l=i===void 0?WE:i,c=t.onHeightChange,u=c===void 0?WE:c,d=A0(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),p=d.value!==void 0,h=f.useRef(null),g=HQ(h,r),y=f.useRef(0),v=f.useRef(),E=function(){var _=h.current,x=n&&v.current?v.current:XQ(_);if(x){v.current=x;var S=GQ(x,_.value||_.placeholder||"x",a,o),$=S[0],O=S[1];y.current!==$&&(y.current=$,_.style.setProperty("height",$+"px","important"),u($,{rowHeight:O}))}},w=function(_){p||E(),l(_)};return f.useLayoutEffect(E),JQ(E),f.createElement("textarea",et({},d,{onChange:w,ref:g}))},eK=f.forwardRef(ZQ);const tK=eK;var rK=H(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));const nK=rK;var oK=Object.defineProperty,aK=Object.defineProperties,iK=Object.getOwnPropertyDescriptors,qf=Object.getOwnPropertySymbols,sI=Object.prototype.hasOwnProperty,cI=Object.prototype.propertyIsEnumerable,HE=(e,t,r)=>t in e?oK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ei=(e,t)=>{for(var r in t||(t={}))sI.call(t,r)&&HE(e,r,t[r]);if(qf)for(var r of qf(t))cI.call(t,r)&&HE(e,r,t[r]);return e},tg=(e,t)=>aK(e,iK(t)),lK=(e,t)=>{var r={};for(var n in e)sI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qf)for(var n of qf(e))t.indexOf(n)<0&&cI.call(e,n)&&(r[n]=e[n]);return r};const sK={autosize:!1,size:"sm",__staticSelector:"Textarea"},vc=f.forwardRef((e,t)=>{const r=G("Textarea",sK,e),{autosize:n,maxRows:o,minRows:a,label:i,error:l,description:c,id:u,className:d,required:p,style:h,wrapperProps:g,classNames:y,styles:v,size:E,__staticSelector:w,sx:b,errorProps:_,descriptionProps:x,labelProps:S,inputWrapperOrder:$,inputContainer:O,unstyled:C,withAsterisk:T,variant:k}=r,I=lK(r,["autosize","maxRows","minRows","label","error","description","id","className","required","style","wrapperProps","classNames","styles","size","__staticSelector","sx","errorProps","descriptionProps","labelProps","inputWrapperOrder","inputContainer","unstyled","withAsterisk","variant"]),j=kr(u),{classes:N,cx:D}=nK(),{systemStyles:z,rest:W}=Zn(I),K=Ei({required:p,ref:t,error:l,id:j,classNames:tg(Ei({},y),{input:D(N.input,y==null?void 0:y.input)}),styles:v,__staticSelector:w,size:E,multiline:!0,unstyled:C,variant:k},W);return s.createElement(Vt.Wrapper,Ei(Ei({label:i,error:l,id:j,description:c,required:p,style:h,className:d,classNames:y,styles:v,size:E,__staticSelector:w,sx:b,errorProps:_,labelProps:S,descriptionProps:x,inputContainer:O,inputWrapperOrder:$,unstyled:C,withAsterisk:T,variant:k},z),g),n?s.createElement(Vt,tg(Ei({},K),{component:tK,maxRows:o,minRows:a})):s.createElement(Vt,tg(Ei({},K),{component:"textarea",rows:a})))});vc.displayName="@mantine/core/Textarea";var cK=Object.defineProperty,uK=Object.defineProperties,dK=Object.getOwnPropertyDescriptors,Gf=Object.getOwnPropertySymbols,uI=Object.prototype.hasOwnProperty,dI=Object.prototype.propertyIsEnumerable,qE=(e,t,r)=>t in e?cK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,GE=(e,t)=>{for(var r in t||(t={}))uI.call(t,r)&&qE(e,r,t[r]);if(Gf)for(var r of Gf(t))dI.call(t,r)&&qE(e,r,t[r]);return e},fK=(e,t)=>uK(e,dK(t)),pK=(e,t)=>{var r={};for(var n in e)uI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Gf)for(var n of Gf(e))t.indexOf(n)<0&&dI.call(e,n)&&(r[n]=e[n]);return r};const mK={formatOnBlur:!1,size:"sm",serialize:JSON.stringify,deserialize:JSON.parse},Rl=f.forwardRef((e,t)=>{const r=G("JsonInput",mK,e),{value:n,defaultValue:o,onChange:a,onFocus:i,onBlur:l,error:c,formatOnBlur:u,size:d,validationError:p,classNames:h,unstyled:g,readOnly:y,variant:v,serialize:E,deserialize:w}=r,b=pK(r,["value","defaultValue","onChange","onFocus","onBlur","error","formatOnBlur","size","validationError","classNames","unstyled","readOnly","variant","serialize","deserialize"]),{classes:_,cx:x}=BQ(null,{name:"JsonInput",unstyled:g,size:d,variant:v}),[S,$]=Or({value:n,defaultValue:o,finalValue:"",onChange:a}),[O,C]=f.useState(FE(S,w)),T=I=>{typeof i=="function"&&i(I),C(!0)},k=I=>{typeof l=="function"&&l(I);const j=FE(I.currentTarget.value,w);u&&!y&&j&&I.currentTarget.value.trim()!==""&&$(E(w(I.currentTarget.value),null,2)),C(j)};return s.createElement(vc,GE({value:S,onChange:I=>$(I.currentTarget.value),onFocus:T,onBlur:k,error:O?c:p||!0,__staticSelector:"JsonInput",classNames:fK(GE({},h),{input:x(_.input,h==null?void 0:h.input)}),autoComplete:"off",ref:t,unstyled:g,readOnly:y,size:d,variant:v},b))});Rl.displayName="@mantine/core/JsonInput";const[hK,gK]=Po("List component was not found in tree");var vK=H((e,{spacing:t,center:r})=>({itemWrapper:{ref:zt("itemWrapper"),display:"inline-flex",flexDirection:"column",whiteSpace:"normal"},item:{whiteSpace:"nowrap",lineHeight:r?1:e.lineHeight,"&:not(:first-of-type)":{marginTop:L({size:t,sizes:e.spacing})},"&[data-with-icon]":{listStyle:"none",[`& .${zt("itemWrapper")}`]:{display:"inline-flex",alignItems:r?"center":"flex-start",flexDirection:"row"}}},itemIcon:{display:"inline-block",verticalAlign:"middle",marginRight:e.spacing.sm}}));const yK=vK;var wK=Object.defineProperty,Qf=Object.getOwnPropertySymbols,fI=Object.prototype.hasOwnProperty,pI=Object.prototype.propertyIsEnumerable,QE=(e,t,r)=>t in e?wK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bK=(e,t)=>{for(var r in t||(t={}))fI.call(t,r)&&QE(e,r,t[r]);if(Qf)for(var r of Qf(t))pI.call(t,r)&&QE(e,r,t[r]);return e},_K=(e,t)=>{var r={};for(var n in e)fI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Qf)for(var n of Qf(e))t.indexOf(n)<0&&pI.call(e,n)&&(r[n]=e[n]);return r};const xK={},mI=f.forwardRef((e,t)=>{const r=G("ListItem",xK,e),{className:n,children:o,icon:a}=r,i=_K(r,["className","children","icon"]),{icon:l,spacing:c,center:u,listStyleType:d,size:p,withPadding:h,classNames:g,styles:y,unstyled:v,variant:E}=gK(),w=a||l,{classes:b,cx:_}=yK({withPadding:h,listStyleType:d,center:u,spacing:c},{classNames:g,styles:y,unstyled:v,name:"List",variant:E,size:p});return s.createElement(le,bK({component:"li",className:_(b.item,n),"data-with-icon":!!w||void 0,ref:t},i),s.createElement("div",{className:b.itemWrapper},w&&s.createElement("span",{className:b.itemIcon},w),s.createElement("span",null,o)))});mI.displayName="@mantine/core/ListItem";var EK=Object.defineProperty,SK=Object.defineProperties,PK=Object.getOwnPropertyDescriptors,KE=Object.getOwnPropertySymbols,$K=Object.prototype.hasOwnProperty,OK=Object.prototype.propertyIsEnumerable,YE=(e,t,r)=>t in e?EK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,CK=(e,t)=>{for(var r in t||(t={}))$K.call(t,r)&&YE(e,r,t[r]);if(KE)for(var r of KE(t))OK.call(t,r)&&YE(e,r,t[r]);return e},kK=(e,t)=>SK(e,PK(t)),jK=H((e,{withPadding:t,listStyleType:r},{size:n})=>({root:kK(CK({},e.fn.fontStyles()),{listStyleType:r,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,fontSize:L({size:n,sizes:e.fontSizes}),lineHeight:e.lineHeight,margin:0,paddingLeft:t?e.spacing.xl:0,listStylePosition:"inside"})}));const RK=jK;var TK=Object.defineProperty,Kf=Object.getOwnPropertySymbols,hI=Object.prototype.hasOwnProperty,gI=Object.prototype.propertyIsEnumerable,XE=(e,t,r)=>t in e?TK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,IK=(e,t)=>{for(var r in t||(t={}))hI.call(t,r)&&XE(e,r,t[r]);if(Kf)for(var r of Kf(t))gI.call(t,r)&&XE(e,r,t[r]);return e},DK=(e,t)=>{var r={};for(var n in e)hI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Kf)for(var n of Kf(e))t.indexOf(n)<0&&gI.call(e,n)&&(r[n]=e[n]);return r};const NK={type:"unordered",size:"md",spacing:0},xr=f.forwardRef((e,t)=>{const r=G("List",NK,e),{children:n,type:o,size:a,listStyleType:i,withPadding:l,center:c,spacing:u,icon:d,className:p,styles:h,classNames:g,unstyled:y,variant:v}=r,E=DK(r,["children","type","size","listStyleType","withPadding","center","spacing","icon","className","styles","classNames","unstyled","variant"]),{classes:w,cx:b}=RK({withPadding:l,listStyleType:i,center:c,spacing:u},{classNames:g,styles:h,name:"List",unstyled:y,size:a,variant:v});return s.createElement(hK,{value:{spacing:u,center:c,icon:d,listStyleType:i,size:a,withPadding:l,classNames:g,styles:h,unstyled:y,variant:v}},s.createElement(le,IK({component:o==="unordered"?"ul":"ol",className:b(w.root,p),ref:t},E),n))});xr.Item=mI;xr.displayName="@mantine/core/List";var AK=Object.defineProperty,MK=Object.defineProperties,LK=Object.getOwnPropertyDescriptors,JE=Object.getOwnPropertySymbols,zK=Object.prototype.hasOwnProperty,FK=Object.prototype.propertyIsEnumerable,ZE=(e,t,r)=>t in e?AK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VK=(e,t)=>{for(var r in t||(t={}))zK.call(t,r)&&ZE(e,r,t[r]);if(JE)for(var r of JE(t))FK.call(t,r)&&ZE(e,r,t[r]);return e},BK=(e,t)=>MK(e,LK(t)),UK=H(e=>({root:BK(VK({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})}));const WK=UK;var HK=Object.defineProperty,qK=Object.defineProperties,GK=Object.getOwnPropertyDescriptors,Yf=Object.getOwnPropertySymbols,vI=Object.prototype.hasOwnProperty,yI=Object.prototype.propertyIsEnumerable,eS=(e,t,r)=>t in e?HK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xu=(e,t)=>{for(var r in t||(t={}))vI.call(t,r)&&eS(e,r,t[r]);if(Yf)for(var r of Yf(t))yI.call(t,r)&&eS(e,r,t[r]);return e},QK=(e,t)=>qK(e,GK(t)),KK=(e,t)=>{var r={};for(var n in e)vI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Yf)for(var n of Yf(e))t.indexOf(n)<0&&yI.call(e,n)&&(r[n]=e[n]);return r};const YK={overlayOpacity:.75,transitionDuration:0,radius:0,zIndex:Rn("overlay")},wI=f.forwardRef((e,t)=>{const r=G("LoadingOverlay",YK,e),{className:n,visible:o,loaderProps:a,overlayOpacity:i,overlayColor:l,transitionDuration:c,exitTransitionDuration:u,zIndex:d,style:p,loader:h,radius:g,overlayBlur:y,unstyled:v,variant:E,keepMounted:w}=r,b=KK(r,["className","visible","loaderProps","overlayOpacity","overlayColor","transitionDuration","exitTransitionDuration","zIndex","style","loader","radius","overlayBlur","unstyled","variant","keepMounted"]),{classes:_,cx:x,theme:S}=WK(null,{name:"LoadingOverlay",unstyled:v,variant:E}),$=`calc(${d} + 1)`;return s.createElement(li,{keepMounted:w,duration:c,exitDuration:u,mounted:o,transition:"fade"},O=>s.createElement(le,xu({className:x(_.root,n),style:QK(xu(xu({},O),p),{zIndex:d}),ref:t},b),h?s.createElement("div",{style:{zIndex:$}},h):s.createElement(un,xu({style:{zIndex:$}},a)),s.createElement(MT,{opacity:i,zIndex:d,radius:g,blur:y,unstyled:v,color:l||(S.colorScheme==="dark"?S.colors.dark[5]:S.white)})))});wI.displayName="@mantine/core/LoadingOverlay";const bI={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[XK,yc]=Po(bI.context);var JK=H(e=>({divider:{marginTop:P(4),marginBottom:P(4),borderTop:`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}}));const ZK=JK;var eY=Object.defineProperty,Xf=Object.getOwnPropertySymbols,_I=Object.prototype.hasOwnProperty,xI=Object.prototype.propertyIsEnumerable,tS=(e,t,r)=>t in e?eY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tY=(e,t)=>{for(var r in t||(t={}))_I.call(t,r)&&tS(e,r,t[r]);if(Xf)for(var r of Xf(t))xI.call(t,r)&&tS(e,r,t[r]);return e},rY=(e,t)=>{var r={};for(var n in e)_I.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Xf)for(var n of Xf(e))t.indexOf(n)<0&&xI.call(e,n)&&(r[n]=e[n]);return r};const nY={},EI=f.forwardRef((e,t)=>{const r=G("MenuDivider",nY,e),{children:n,className:o}=r,a=rY(r,["children","className"]),{classNames:i,styles:l,unstyled:c,variant:u}=yc(),{classes:d,cx:p}=ZK(null,{name:"Menu",classNames:i,styles:l,unstyled:c,variant:u});return s.createElement(le,tY({className:p(d.divider,o),ref:t},a))});EI.displayName="@mantine/core/MenuDivider";var oY=Object.defineProperty,Jf=Object.getOwnPropertySymbols,SI=Object.prototype.hasOwnProperty,PI=Object.prototype.propertyIsEnumerable,rS=(e,t,r)=>t in e?oY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,aY=(e,t)=>{for(var r in t||(t={}))SI.call(t,r)&&rS(e,r,t[r]);if(Jf)for(var r of Jf(t))PI.call(t,r)&&rS(e,r,t[r]);return e},iY=(e,t)=>{var r={};for(var n in e)SI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Jf)for(var n of Jf(e))t.indexOf(n)<0&&PI.call(e,n)&&(r[n]=e[n]);return r};const lY={};function $I(e){const t=G("MenuDropdown",lY,e),{children:r,onMouseEnter:n,onMouseLeave:o}=t,a=iY(t,["children","onMouseEnter","onMouseLeave"]),i=f.useRef(),l=yc(),c=p=>{var h;(p.key==="ArrowUp"||p.key==="ArrowDown")&&(p.preventDefault(),(h=i.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||h.focus())},u=Lr(n,()=>l.trigger==="hover"&&l.openDropdown()),d=Lr(o,()=>l.trigger==="hover"&&l.closeDropdown());return s.createElement(ko.Dropdown,aY({onMouseEnter:u,onMouseLeave:d,role:"menu","aria-orientation":"vertical"},a),s.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:c,ref:i,style:{outline:0}},r))}$I.displayName="@mantine/core/MenuDropdown";var sY=Object.defineProperty,cY=Object.defineProperties,uY=Object.getOwnPropertyDescriptors,nS=Object.getOwnPropertySymbols,dY=Object.prototype.hasOwnProperty,fY=Object.prototype.propertyIsEnumerable,oS=(e,t,r)=>t in e?sY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pY=(e,t)=>{for(var r in t||(t={}))dY.call(t,r)&&oS(e,r,t[r]);if(nS)for(var r of nS(t))fY.call(t,r)&&oS(e,r,t[r]);return e},mY=(e,t)=>cY(e,uY(t)),hY=H((e,{color:t,radius:r})=>({item:mY(pY({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(r),color:t?e.fn.variant({variant:"filled",primaryFallback:!1,color:t}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:t?e.fn.variant({variant:"light",color:t}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}}));const gY=hY;var vY=Object.defineProperty,yY=Object.defineProperties,wY=Object.getOwnPropertyDescriptors,Zf=Object.getOwnPropertySymbols,OI=Object.prototype.hasOwnProperty,CI=Object.prototype.propertyIsEnumerable,aS=(e,t,r)=>t in e?vY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bY=(e,t)=>{for(var r in t||(t={}))OI.call(t,r)&&aS(e,r,t[r]);if(Zf)for(var r of Zf(t))CI.call(t,r)&&aS(e,r,t[r]);return e},_Y=(e,t)=>yY(e,wY(t)),xY=(e,t)=>{var r={};for(var n in e)OI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Zf)for(var n of Zf(e))t.indexOf(n)<0&&CI.call(e,n)&&(r[n]=e[n]);return r};const EY={},kI=f.forwardRef((e,t)=>{const r=G("MenuItem",EY,e),{children:n,className:o,color:a,closeMenuOnClick:i,icon:l,rightSection:c}=r,u=xY(r,["children","className","color","closeMenuOnClick","icon","rightSection"]),d=yc(),{classes:p,cx:h,theme:g}=gY({radius:d.radius,color:a},{name:"Menu",classNames:d.classNames,styles:d.styles,unstyled:d.unstyled,variant:d.variant}),y=f.useRef(),v=d.getItemIndex(y.current),E=u,w=Lr(E.onMouseLeave,()=>d.setHovered(-1)),b=Lr(E.onMouseEnter,()=>d.setHovered(d.getItemIndex(y.current))),_=Lr(E.onClick,()=>{typeof i=="boolean"?i&&d.closeDropdownImmediately():d.closeOnItemClick&&d.closeDropdownImmediately()}),x=Lr(E.onFocus,()=>d.setHovered(d.getItemIndex(y.current)));return s.createElement(le,_Y(bY({component:"button",type:"button"},u),{tabIndex:-1,onFocus:x,className:h(p.item,o),ref:Pl(y,t),role:"menuitem","data-menu-item":!0,"data-hovered":d.hovered===v?!0:void 0,onMouseEnter:b,onMouseLeave:w,onClick:_,onKeyDown:NO({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:d.loop,dir:g.dir,orientation:"vertical",onKeyDown:E.onKeydown})}),l&&s.createElement("div",{className:p.itemIcon},l),n&&s.createElement("div",{className:p.itemLabel},n),c&&s.createElement("div",{className:p.itemRightSection},c))});kI.displayName="@mantine/core/MenuItem";const SY=kI;var PY=H(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}}));const $Y=PY;var OY=Object.defineProperty,ep=Object.getOwnPropertySymbols,jI=Object.prototype.hasOwnProperty,RI=Object.prototype.propertyIsEnumerable,iS=(e,t,r)=>t in e?OY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,CY=(e,t)=>{for(var r in t||(t={}))jI.call(t,r)&&iS(e,r,t[r]);if(ep)for(var r of ep(t))RI.call(t,r)&&iS(e,r,t[r]);return e},kY=(e,t)=>{var r={};for(var n in e)jI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ep)for(var n of ep(e))t.indexOf(n)<0&&RI.call(e,n)&&(r[n]=e[n]);return r};const jY={},TI=f.forwardRef((e,t)=>{const r=G("MenuLabel",jY,e),{children:n,className:o}=r,a=kY(r,["children","className"]),{classNames:i,styles:l,unstyled:c,variant:u}=yc(),{classes:d,cx:p}=$Y(null,{name:"Menu",classNames:i,styles:l,unstyled:c,variant:u});return s.createElement(oe,CY({className:p(d.label,o),ref:t},a),n)});TI.displayName="@mantine/core/MenuLabel";var RY=Object.defineProperty,tp=Object.getOwnPropertySymbols,II=Object.prototype.hasOwnProperty,DI=Object.prototype.propertyIsEnumerable,lS=(e,t,r)=>t in e?RY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,TY=(e,t)=>{for(var r in t||(t={}))II.call(t,r)&&lS(e,r,t[r]);if(tp)for(var r of tp(t))DI.call(t,r)&&lS(e,r,t[r]);return e},IY=(e,t)=>{var r={};for(var n in e)II.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tp)for(var n of tp(e))t.indexOf(n)<0&&DI.call(e,n)&&(r[n]=e[n]);return r};const DY={refProp:"ref"},NI=f.forwardRef((e,t)=>{const r=G("MenuTarget",DY,e),{children:n,refProp:o}=r,a=IY(r,["children","refProp"]);if(!El(n))throw new Error(bI.children);const i=yc(),l=Lr(n.props.onClick,()=>i.trigger==="click"&&i.toggleDropdown()),c=Lr(n.props.onMouseEnter,()=>i.trigger==="hover"&&i.openDropdown()),u=Lr(n.props.onMouseLeave,()=>i.trigger==="hover"&&i.closeDropdown());return s.createElement(ko.Target,TY({refProp:o,popupType:"menu",ref:t},a),f.cloneElement(n,{onClick:l,onMouseEnter:c,onMouseLeave:u,"data-expanded":i.opened?!0:void 0}))});NI.displayName="@mantine/core/MenuTarget";var NY=H({dropdown:{padding:P(4)}});const AY=NY;var MY=Object.defineProperty,LY=Object.defineProperties,zY=Object.getOwnPropertyDescriptors,rp=Object.getOwnPropertySymbols,AI=Object.prototype.hasOwnProperty,MI=Object.prototype.propertyIsEnumerable,sS=(e,t,r)=>t in e?MY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cS=(e,t)=>{for(var r in t||(t={}))AI.call(t,r)&&sS(e,r,t[r]);if(rp)for(var r of rp(t))MI.call(t,r)&&sS(e,r,t[r]);return e},uS=(e,t)=>LY(e,zY(t)),FY=(e,t)=>{var r={};for(var n in e)AI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&rp)for(var n of rp(e))t.indexOf(n)<0&&MI.call(e,n)&&(r[n]=e[n]);return r};const VY={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function X(e){const t=G("Menu",VY,e),{children:r,onOpen:n,onClose:o,opened:a,defaultOpened:i,onChange:l,closeOnItemClick:c,loop:u,closeOnEscape:d,trigger:p,openDelay:h,closeDelay:g,classNames:y,styles:v,unstyled:E,radius:w,variant:b}=t,_=FY(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:x,cx:S}=AY(),[$,{setHovered:O,resetHovered:C}]=mA(),[T,k]=Or({value:a,defaultValue:i,finalValue:!1,onChange:l}),I=()=>{k(!1),T&&(o==null||o())},j=()=>{k(!0),!T&&(n==null||n())},N=()=>T?I():j(),{openDropdown:D,closeDropdown:z}=FQ({open:j,close:I,closeDelay:g,openDelay:h}),W=K=>dA("[data-menu-item]","[data-menu-dropdown]",K);return nn(()=>{C()},[T]),s.createElement(XK,{value:{opened:T,toggleDropdown:N,getItemIndex:W,hovered:$,setHovered:O,closeOnItemClick:c,closeDropdown:p==="click"?I:z,openDropdown:p==="click"?j:D,closeDropdownImmediately:I,loop:u,trigger:p,radius:w,classNames:y,styles:v,unstyled:E,variant:b}},s.createElement(ko,uS(cS({},_),{radius:w,opened:T,onChange:N,defaultOpened:i,trapFocus:p==="click",closeOnEscape:d&&p==="click",__staticSelector:"Menu",classNames:uS(cS({},y),{dropdown:S(x.dropdown,y==null?void 0:y.dropdown)}),styles:v,unstyled:E,variant:b}),r))}X.displayName="@mantine/core/Menu";X.Item=SY;X.Label=TI;X.Dropdown=$I;X.Target=NI;X.Divider=EI;const[BY,UY]=Po("Modal component was not found in tree"),WY={xs:P(320),sm:P(380),md:P(440),lg:P(620),xl:P(780)};var HY=H((e,{yOffset:t,xOffset:r,centered:n,fullScreen:o},{size:a})=>({content:{flex:o?"0 0 100%":`0 0 ${L({size:a,sizes:WY})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100dvh - (${P(t)} * 2))`,height:o?"100vh":void 0,borderRadius:o?0:void 0,overflowY:"auto"},inner:{paddingTop:o?0:t,paddingBottom:o?0:t,paddingLeft:o?0:r,paddingRight:o?0:r,display:"flex",justifyContent:"center",alignItems:n?"center":"flex-start"}}));const qY=HY;var GY=Object.defineProperty,QY=Object.defineProperties,KY=Object.getOwnPropertyDescriptors,np=Object.getOwnPropertySymbols,LI=Object.prototype.hasOwnProperty,zI=Object.prototype.propertyIsEnumerable,dS=(e,t,r)=>t in e?GY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Iv=(e,t)=>{for(var r in t||(t={}))LI.call(t,r)&&dS(e,r,t[r]);if(np)for(var r of np(t))zI.call(t,r)&&dS(e,r,t[r]);return e},FI=(e,t)=>QY(e,KY(t)),YY=(e,t)=>{var r={};for(var n in e)LI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&np)for(var n of np(e))t.indexOf(n)<0&&zI.call(e,n)&&(r[n]=e[n]);return r};const XY=FI(Iv({},D0),{yOffset:"5dvh",xOffset:"5vw"});function VI(e){const t=G("ModalRoot",XY,e),{classNames:r,variant:n,size:o,yOffset:a,xOffset:i,scrollAreaComponent:l,radius:c,centered:u,fullScreen:d}=t,p=YY(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:h,cx:g}=qY({yOffset:a,xOffset:i,centered:u,fullScreen:d},{name:"Modal",variant:n,size:o});return s.createElement(BY,{value:{yOffset:a,scrollAreaComponent:l,radius:c}},s.createElement(Ct,Iv({__staticSelector:"Modal",size:o,variant:n,classNames:FI(Iv({},r),{content:g(h.content,r==null?void 0:r.content),inner:g(h.inner,r==null?void 0:r.inner)})},p)))}var JY=Object.defineProperty,op=Object.getOwnPropertySymbols,BI=Object.prototype.hasOwnProperty,UI=Object.prototype.propertyIsEnumerable,fS=(e,t,r)=>t in e?JY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ZY=(e,t)=>{for(var r in t||(t={}))BI.call(t,r)&&fS(e,r,t[r]);if(op)for(var r of op(t))UI.call(t,r)&&fS(e,r,t[r]);return e},eX=(e,t)=>{var r={};for(var n in e)BI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&op)for(var n of op(e))t.indexOf(n)<0&&UI.call(e,n)&&(r[n]=e[n]);return r};const tX={shadow:"xl"},WI=f.forwardRef((e,t)=>{const r=G("ModalContent",tX,e),{children:n,scrollAreaComponent:o}=r,a=eX(r,["children","scrollAreaComponent"]),i=UY(),l=o||i.scrollAreaComponent||Ct.NativeScrollArea;return s.createElement(Ct.Content,ZY({ref:t,radius:i.radius},a),s.createElement(l,{style:{maxHeight:`calc(100dvh - (${P(i.yOffset)} * 2))`}},n))});var rX=Object.defineProperty,nX=Object.defineProperties,oX=Object.getOwnPropertyDescriptors,ap=Object.getOwnPropertySymbols,HI=Object.prototype.hasOwnProperty,qI=Object.prototype.propertyIsEnumerable,pS=(e,t,r)=>t in e?rX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,td=(e,t)=>{for(var r in t||(t={}))HI.call(t,r)&&pS(e,r,t[r]);if(ap)for(var r of ap(t))qI.call(t,r)&&pS(e,r,t[r]);return e},aX=(e,t)=>nX(e,oX(t)),iX=(e,t)=>{var r={};for(var n in e)HI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ap)for(var n of ap(e))t.indexOf(n)<0&&qI.call(e,n)&&(r[n]=e[n]);return r};const lX=aX(td({},D0),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function jr(e){const t=G("Modal",lX,e),{title:r,withOverlay:n,overlayProps:o,withCloseButton:a,closeButtonProps:i,children:l}=t,c=iX(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!r||a;return s.createElement(VI,td({},c),n&&s.createElement(Ct.Overlay,td({},o)),s.createElement(WI,null,u&&s.createElement(Ct.Header,null,r&&s.createElement(Ct.Title,null,r),a&&s.createElement(Ct.CloseButton,td({},i))),s.createElement(Ct.Body,null,l)))}jr.Root=VI;jr.CloseButton=Ct.CloseButton;jr.Overlay=Ct.Overlay;jr.Content=WI;jr.Header=Ct.Header;jr.Title=Ct.Title;jr.Body=Ct.Body;jr.NativeScrollArea=Ct.NativeScrollArea;const GI={xs:P(16),sm:P(22),md:P(26),lg:P(30),xl:P(36)},sX={xs:P(10),sm:P(12),md:P(14),lg:P(16),xl:P(18)};var cX=H((e,{disabled:t,radius:r,readOnly:n},{size:o,variant:a})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:t?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:a==="filled"?e.white:e.colors.gray[1],color:t?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:L({size:o,sizes:GI}),paddingLeft:`calc(${L({size:o,sizes:e.spacing})} / 1.5)`,paddingRight:t||n?L({size:o,sizes:e.spacing}):0,fontWeight:500,fontSize:L({size:o,sizes:sX}),borderRadius:L({size:r,sizes:e.radius}),cursor:t?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${P(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${L({size:o,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}})),uX=Object.defineProperty,ip=Object.getOwnPropertySymbols,QI=Object.prototype.hasOwnProperty,KI=Object.prototype.propertyIsEnumerable,mS=(e,t,r)=>t in e?uX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dX=(e,t)=>{for(var r in t||(t={}))QI.call(t,r)&&mS(e,r,t[r]);if(ip)for(var r of ip(t))KI.call(t,r)&&mS(e,r,t[r]);return e},fX=(e,t)=>{var r={};for(var n in e)QI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ip)for(var n of ip(e))t.indexOf(n)<0&&KI.call(e,n)&&(r[n]=e[n]);return r};const pX={xs:16,sm:22,md:24,lg:26,xl:30};function YI(e){var t=e,{label:r,classNames:n,styles:o,className:a,onRemove:i,disabled:l,readOnly:c,size:u,radius:d="sm",variant:p,unstyled:h}=t,g=fX(t,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:y,cx:v}=cX({disabled:l,readOnly:c,radius:d},{name:"MultiSelect",classNames:n,styles:o,unstyled:h,size:u,variant:p});return s.createElement("div",dX({className:v(y.defaultValue,a)},g),s.createElement("span",{className:y.defaultValueLabel},r),!l&&!c&&s.createElement(fc,{"aria-hidden":!0,onMouseDown:i,size:pX[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:y.defaultValueRemove,tabIndex:-1,unstyled:h}))}YI.displayName="@mantine/core/MultiSelect/DefaultValue";function mX({data:e,searchable:t,limit:r,searchValue:n,filter:o,value:a,disableSelectedItemFiltering:i}){if(!t&&a.length===0)return e;if(!t){const c=[];for(let u=0;u<e.length;u+=1)(i||!a.some(d=>d===e[u].value&&!e[u].disabled))&&c.push(e[u]);return c}const l=[];for(let c=0;c<e.length&&(o(n,!i&&a.some(u=>u===e[c].value&&!e[c].disabled),e[c])&&l.push(e[c]),!(l.length>=r));c+=1);return l}var hX=Object.defineProperty,lp=Object.getOwnPropertySymbols,XI=Object.prototype.hasOwnProperty,JI=Object.prototype.propertyIsEnumerable,hS=(e,t,r)=>t in e?hX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gS=(e,t)=>{for(var r in t||(t={}))XI.call(t,r)&&hS(e,r,t[r]);if(lp)for(var r of lp(t))JI.call(t,r)&&hS(e,r,t[r]);return e},gX=(e,t)=>{var r={};for(var n in e)XI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lp)for(var n of lp(e))t.indexOf(n)<0&&JI.call(e,n)&&(r[n]=e[n]);return r};const vX={xs:P(14),sm:P(18),md:P(20),lg:P(24),xl:P(28)};function yX(e){var t=e,{size:r,error:n,style:o}=t,a=gX(t,["size","error","style"]);const i=or(),l=L({size:r,sizes:vX});return s.createElement("svg",gS({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:gS({color:n?i.colors.red[6]:i.colors.gray[6],width:l,height:l},o),"data-chevron":!0},a),s.createElement("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"}))}var wX=Object.defineProperty,bX=Object.defineProperties,_X=Object.getOwnPropertyDescriptors,vS=Object.getOwnPropertySymbols,xX=Object.prototype.hasOwnProperty,EX=Object.prototype.propertyIsEnumerable,yS=(e,t,r)=>t in e?wX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,SX=(e,t)=>{for(var r in t||(t={}))xX.call(t,r)&&yS(e,r,t[r]);if(vS)for(var r of vS(t))EX.call(t,r)&&yS(e,r,t[r]);return e},PX=(e,t)=>bX(e,_X(t));function ZI({shouldClear:e,clearButtonProps:t,onClear:r,size:n,error:o}){return e?s.createElement(fc,PX(SX({},t),{variant:"transparent",onClick:r,size:n,onMouseDown:a=>a.preventDefault()})):s.createElement(yX,{error:o,size:n})}ZI.displayName="@mantine/core/SelectRightSection";var $X=Object.defineProperty,OX=Object.defineProperties,CX=Object.getOwnPropertyDescriptors,sp=Object.getOwnPropertySymbols,e5=Object.prototype.hasOwnProperty,t5=Object.prototype.propertyIsEnumerable,wS=(e,t,r)=>t in e?$X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rg=(e,t)=>{for(var r in t||(t={}))e5.call(t,r)&&wS(e,r,t[r]);if(sp)for(var r of sp(t))t5.call(t,r)&&wS(e,r,t[r]);return e},bS=(e,t)=>OX(e,CX(t)),kX=(e,t)=>{var r={};for(var n in e)e5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sp)for(var n of sp(e))t.indexOf(n)<0&&t5.call(e,n)&&(r[n]=e[n]);return r};function r5(e){var t=e,{styles:r,rightSection:n,rightSectionWidth:o,theme:a}=t,i=kX(t,["styles","rightSection","rightSectionWidth","theme"]);if(n)return{rightSection:n,rightSectionWidth:o,styles:r};const l=typeof r=="function"?r(a):r;return{rightSection:!i.readOnly&&!(i.disabled&&i.shouldClear)&&s.createElement(ZI,rg({},i)),styles:bS(rg({},l),{rightSection:bS(rg({},l==null?void 0:l.rightSection),{pointerEvents:i.shouldClear?void 0:"none"})})}}var jX=Object.defineProperty,RX=Object.defineProperties,TX=Object.getOwnPropertyDescriptors,_S=Object.getOwnPropertySymbols,IX=Object.prototype.hasOwnProperty,DX=Object.prototype.propertyIsEnumerable,xS=(e,t,r)=>t in e?jX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,NX=(e,t)=>{for(var r in t||(t={}))IX.call(t,r)&&xS(e,r,t[r]);if(_S)for(var r of _S(t))DX.call(t,r)&&xS(e,r,t[r]);return e},AX=(e,t)=>RX(e,TX(t)),MX=H((e,{invalid:t},{size:r})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${L({size:r,sizes:$t})} - ${P(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:L({size:r,sizes:$t})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${P(2)}) calc(${e.spacing.xs} / 2)`},searchInput:AX(NX({},e.fn.fontStyles()),{flex:1,minWidth:P(60),backgroundColor:"transparent",border:0,outline:0,fontSize:L({size:r,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:L({size:r,sizes:GI}),"&::placeholder":{opacity:1,color:t?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const LX=MX;var zX=Object.defineProperty,FX=Object.defineProperties,VX=Object.getOwnPropertyDescriptors,cp=Object.getOwnPropertySymbols,n5=Object.prototype.hasOwnProperty,o5=Object.prototype.propertyIsEnumerable,ES=(e,t,r)=>t in e?zX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Si=(e,t)=>{for(var r in t||(t={}))n5.call(t,r)&&ES(e,r,t[r]);if(cp)for(var r of cp(t))o5.call(t,r)&&ES(e,r,t[r]);return e},SS=(e,t)=>FX(e,VX(t)),BX=(e,t)=>{var r={};for(var n in e)n5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cp)for(var n of cp(e))t.indexOf(n)<0&&o5.call(e,n)&&(r[n]=e[n]);return r};function UX(e,t,r){return t?!1:r.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function WX(e,t){return!!e&&!t.some(r=>r.value.toLowerCase()===e.toLowerCase())}function PS(e,t){if(!Array.isArray(e))return;if(t.length===0)return[];const r=t.map(n=>typeof n=="object"?n.value:n);return e.filter(n=>r.includes(n))}const HX={size:"sm",valueComponent:YI,itemComponent:bj,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:UX,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:WX,switchDirectionOnFlip:!1,zIndex:Rn("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},M0=f.forwardRef((e,t)=>{const r=G("MultiSelect",HX,e),{className:n,style:o,required:a,label:i,description:l,size:c,error:u,classNames:d,styles:p,wrapperProps:h,value:g,defaultValue:y,data:v,onChange:E,valueComponent:w,itemComponent:b,id:_,transitionProps:x,maxDropdownHeight:S,shadow:$,nothingFound:O,onFocus:C,onBlur:T,searchable:k,placeholder:I,filter:j,limit:N,clearSearchOnChange:D,clearable:z,clearSearchOnBlur:W,variant:K,onSearchChange:R,searchValue:A,disabled:V,initiallyOpened:Q,radius:ie,icon:Ce,rightSection:ue,rightSectionWidth:Me,creatable:Ie,getCreateLabel:ft,shouldCreate:rt,onCreate:nt,sx:Tr,dropdownComponent:Ir,onDropdownClose:ar,onDropdownOpen:pn,maxSelectedValues:Tt,withinPortal:Dr,portalProps:to,switchDirectionOnFlip:qe,zIndex:Gr,selectOnBlur:Qr,name:St,dropdownPosition:mi,errorProps:hi,labelProps:gi,descriptionProps:Z,form:pe,positionDependencies:Qe,onKeyDown:pt,unstyled:mt,inputContainer:ro,inputWrapperOrder:mn,readOnly:Nr,withAsterisk:Io,clearButtonProps:wa,hoverOnSearchChange:M,disableSelectedItemFiltering:F}=r,U=BX(r,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:Y,cx:me,theme:ve}=LX({invalid:!!u},{name:"MultiSelect",classNames:d,styles:p,unstyled:mt,size:c,variant:K}),{systemStyles:xe,rest:he}=Zn(U),ce=f.useRef(),Ke=f.useRef({}),ht=kr(_),[ye,Ee]=f.useState(Q),[gt,Qt]=f.useState(-1),[In,ba]=f.useState("column"),[hr,gr]=Or({value:A,defaultValue:"",finalValue:void 0,onChange:R}),[hn,_a]=f.useState(!1),{scrollIntoView:Do,targetRef:vi,scrollableRef:Nl}=o7({duration:0,offset:5,cancelable:!1,isList:!0}),Le=Ie&&typeof ft=="function";let ir=null;const Dn=v.map(ge=>typeof ge=="string"?{label:ge,value:ge}:ge),xa=hA({data:Dn}),[Pe,Kr]=Or({value:PS(g,v),defaultValue:PS(y,v),finalValue:[],onChange:E}),vr=f.useRef(!!Tt&&Tt<Pe.length),Dc=ge=>{if(!Nr){const Ye=Pe.filter(Yr=>Yr!==ge);Kr(Ye),Tt&&Ye.length<Tt&&(vr.current=!1)}},JN=ge=>{gr(ge.currentTarget.value),!V&&!vr.current&&k&&Ee(!0)},ZN=ge=>{typeof C=="function"&&C(ge),!V&&!vr.current&&k&&Ee(!0)},Ut=mX({data:xa,searchable:k,searchValue:hr,limit:N,filter:j,value:Pe,disableSelectedItemFiltering:F});Le&&rt(hr,xa)&&(ir=ft(hr),Ut.push({label:hr,value:hr,creatable:!0}));const Ea=Math.min(gt,Ut.length-1),U1=(ge,Ye,Yr)=>{let No=ge;for(;Yr(No);)if(No=Ye(No),!Ut[No].disabled)return No;return ge};nn(()=>{Qt(M&&hr?0:-1)},[hr,M]),nn(()=>{!V&&Pe.length>v.length&&Ee(!1),Tt&&Pe.length<Tt&&(vr.current=!1),Tt&&Pe.length>=Tt&&(vr.current=!0,Ee(!1))},[Pe]);const Nc=ge=>{if(!Nr)if(D&&gr(""),Pe.includes(ge.value))Dc(ge.value);else{if(ge.creatable&&typeof nt=="function"){const Ye=nt(ge.value);typeof Ye<"u"&&Ye!==null&&Kr(typeof Ye=="string"?[...Pe,Ye]:[...Pe,Ye.value])}else Kr([...Pe,ge.value]);Pe.length===Tt-1&&(vr.current=!0,Ee(!1)),Ut.length===1&&Ee(!1)}},e3=ge=>{typeof T=="function"&&T(ge),Qr&&Ut[Ea]&&ye&&Nc(Ut[Ea]),W&&gr(""),Ee(!1)},t3=ge=>{if(hn||(pt==null||pt(ge),Nr)||ge.key!=="Backspace"&&Tt&&vr.current)return;const Ye=In==="column",Yr=()=>{Qt(Sa=>{var no;const Al=U1(Sa,Pa=>Pa+1,Pa=>Pa<Ut.length-1);return ye&&(vi.current=Ke.current[(no=Ut[Al])==null?void 0:no.value],Do({alignment:Ye?"end":"start"})),Al})},No=()=>{Qt(Sa=>{var no;const Al=U1(Sa,Pa=>Pa-1,Pa=>Pa>0);return ye&&(vi.current=Ke.current[(no=Ut[Al])==null?void 0:no.value],Do({alignment:Ye?"start":"end"})),Al})};switch(ge.key){case"ArrowUp":{ge.preventDefault(),Ee(!0),Ye?No():Yr();break}case"ArrowDown":{ge.preventDefault(),Ee(!0),Ye?Yr():No();break}case"Enter":{ge.preventDefault(),Ut[Ea]&&ye?Nc(Ut[Ea]):Ee(!0);break}case" ":{k||(ge.preventDefault(),Ut[Ea]&&ye?Nc(Ut[Ea]):Ee(!0));break}case"Backspace":{Pe.length>0&&hr.length===0&&(Kr(Pe.slice(0,-1)),Ee(!0),Tt&&(vr.current=!1));break}case"Home":{if(!k){ge.preventDefault(),ye||Ee(!0);const Sa=Ut.findIndex(no=>!no.disabled);Qt(Sa),Do({alignment:Ye?"end":"start"})}break}case"End":{if(!k){ge.preventDefault(),ye||Ee(!0);const Sa=Ut.map(no=>!!no.disabled).lastIndexOf(!1);Qt(Sa),Do({alignment:Ye?"end":"start"})}break}case"Escape":Ee(!1)}},r3=Pe.map(ge=>{let Ye=xa.find(Yr=>Yr.value===ge&&!Yr.disabled);return!Ye&&Le&&(Ye={value:ge,label:ge}),Ye}).filter(ge=>!!ge).map((ge,Ye)=>s.createElement(w,SS(Si({},ge),{variant:K,disabled:V,className:Y.value,readOnly:Nr,onRemove:Yr=>{Yr.preventDefault(),Yr.stopPropagation(),Dc(ge.value)},key:ge.value,size:c,styles:p,classNames:d,radius:ie,index:Ye}))),n3=ge=>Pe.includes(ge),o3=()=>{var ge;gr(""),Kr([]),(ge=ce.current)==null||ge.focus(),Tt&&(vr.current=!1)},Ac=!Nr&&(Ut.length>0?ye:ye&&!!O);return nn(()=>{const ge=Ac?pn:ar;typeof ge=="function"&&ge()},[Ac]),s.createElement(Vt.Wrapper,Si(Si({required:a,id:ht,label:i,error:u,description:l,size:c,className:n,style:o,classNames:d,styles:p,__staticSelector:"MultiSelect",sx:Tr,errorProps:hi,descriptionProps:Z,labelProps:gi,inputContainer:ro,inputWrapperOrder:mn,unstyled:mt,withAsterisk:Io,variant:K},xe),h),s.createElement(Os,{opened:Ac,transitionProps:x,shadow:"sm",withinPortal:Dr,portalProps:to,__staticSelector:"MultiSelect",onDirectionChange:ba,switchDirectionOnFlip:qe,zIndex:Gr,dropdownPosition:mi,positionDependencies:[...Qe,hr],classNames:d,styles:p,unstyled:mt,variant:K},s.createElement(Os.Target,null,s.createElement("div",{className:Y.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":ye&&Ac?`${ht}-items`:null,"aria-controls":ht,"aria-expanded":ye,onMouseLeave:()=>Qt(-1),tabIndex:-1},s.createElement("input",{type:"hidden",name:St,value:Pe.join(","),form:pe,disabled:V}),s.createElement(Vt,Si({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:c,variant:K,disabled:V,error:u,required:a,radius:ie,icon:Ce,unstyled:mt,onMouseDown:ge=>{var Ye;ge.preventDefault(),!V&&!vr.current&&Ee(!ye),(Ye=ce.current)==null||Ye.focus()},classNames:SS(Si({},d),{input:me({[Y.input]:!k},d==null?void 0:d.input)})},r5({theme:ve,rightSection:ue,rightSectionWidth:Me,styles:p,size:c,shouldClear:z&&Pe.length>0,onClear:o3,error:u,disabled:V,clearButtonProps:wa,readOnly:Nr})),s.createElement("div",{className:Y.values,"data-clearable":z||void 0},r3,s.createElement("input",Si({ref:Pl(t,ce),type:"search",id:ht,className:me(Y.searchInput,{[Y.searchInputPointer]:!k,[Y.searchInputInputHidden]:!ye&&Pe.length>0||!k&&Pe.length>0,[Y.searchInputEmpty]:Pe.length===0}),onKeyDown:t3,value:hr,onChange:JN,onFocus:ZN,onBlur:e3,readOnly:!k||vr.current||Nr,placeholder:Pe.length===0?I:void 0,disabled:V,"data-mantine-stop-propagation":ye,autoComplete:"off",onCompositionStart:()=>_a(!0),onCompositionEnd:()=>_a(!1)},he)))))),s.createElement(Os.Dropdown,{component:Ir||m0,maxHeight:S,direction:In,id:ht,innerRef:Nl,__staticSelector:"MultiSelect",classNames:d,styles:p},s.createElement(vj,{data:Ut,hovered:Ea,classNames:d,styles:p,uuid:ht,__staticSelector:"MultiSelect",onItemHover:Qt,onItemSelect:Nc,itemsRefs:Ke,itemComponent:b,size:c,nothingFound:O,isItemSelected:n3,creatable:Ie&&!!ir,createLabel:ir,unstyled:mt,variant:K}))))});M0.displayName="@mantine/core/MultiSelect";var qX=Object.defineProperty,GX=Object.defineProperties,QX=Object.getOwnPropertyDescriptors,up=Object.getOwnPropertySymbols,a5=Object.prototype.hasOwnProperty,i5=Object.prototype.propertyIsEnumerable,$S=(e,t,r)=>t in e?qX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Eu=(e,t)=>{for(var r in t||(t={}))a5.call(t,r)&&$S(e,r,t[r]);if(up)for(var r of up(t))i5.call(t,r)&&$S(e,r,t[r]);return e},OS=(e,t)=>GX(e,QX(t)),KX=(e,t)=>{var r={};for(var n in e)a5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&up)for(var n of up(e))t.indexOf(n)<0&&i5.call(e,n)&&(r[n]=e[n]);return r};const YX={size:"sm"},dt=f.forwardRef((e,t)=>{const r=bR("NativeSelect",YX,e),{inputProps:n,wrapperProps:o,data:a,onChange:i,value:l,classNames:c,styles:u,rightSection:d,rightSectionWidth:p}=r,h=KX(r,["inputProps","wrapperProps","data","onChange","value","classNames","styles","rightSection","rightSectionWidth"]),g=or(),v=a.map(E=>typeof E=="string"?{label:E,value:E}:E).map(E=>s.createElement("option",{key:E.value,value:E.value,disabled:E.disabled},E.label));return s.createElement(Vt.Wrapper,OS(Eu({},o),{__staticSelector:"NativeSelect"}),s.createElement(Vt,Eu(OS(Eu(Eu({},n),h),{onChange:i,component:"select",ref:t,value:l===null?"":l,__staticSelector:"NativeSelect",pointer:g.cursorType==="pointer"}),r5({theme:g,rightSection:d,rightSectionWidth:p,styles:u,shouldClear:!1,size:n.size,error:o.error,readOnly:!1})),v))});dt.displayName="@mantine/core/NativeSelect";var XX=H((e,{color:t,radius:r,withTitle:n})=>{const o=e.fn.radius(r),a=e.fn.variant({variant:"filled",color:t});return{closeButton:e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0]}),icon:{boxSizing:"border-box",marginRight:e.spacing.md,width:P(28),height:P(28),borderRadius:P(28),display:"flex",flex:"none",alignItems:"center",justifyContent:"center",backgroundColor:a.background,color:e.white},root:{overflow:"hidden",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",paddingLeft:P(22),paddingRight:e.spacing.xs,paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs,borderRadius:o,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,boxShadow:e.shadows.lg,"&::before":{content:'""',display:"block",position:"absolute",width:P(6),top:o,bottom:o,left:P(4),borderRadius:o,backgroundColor:a.background},"&[data-with-icon]":{paddingLeft:e.spacing.xs,"&::before":{display:"none"}},"&[data-with-border]":{border:`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}},body:{flex:1,overflow:"hidden",marginRight:e.spacing.xs},loader:{marginRight:e.spacing.md},title:{lineHeight:1.4,marginBottom:P(2),overflow:"hidden",textOverflow:"ellipsis",color:e.colorScheme==="dark"?e.white:e.colors.gray[9]},description:{color:n?e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis"}}});const JX=XX;var ZX=Object.defineProperty,eJ=Object.defineProperties,tJ=Object.getOwnPropertyDescriptors,dp=Object.getOwnPropertySymbols,l5=Object.prototype.hasOwnProperty,s5=Object.prototype.propertyIsEnumerable,CS=(e,t,r)=>t in e?ZX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kS=(e,t)=>{for(var r in t||(t={}))l5.call(t,r)&&CS(e,r,t[r]);if(dp)for(var r of dp(t))s5.call(t,r)&&CS(e,r,t[r]);return e},rJ=(e,t)=>eJ(e,tJ(t)),nJ=(e,t)=>{var r={};for(var n in e)l5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dp)for(var n of dp(e))t.indexOf(n)<0&&s5.call(e,n)&&(r[n]=e[n]);return r};const oJ={withCloseButton:!0},c5=f.forwardRef((e,t)=>{const r=G("Notification",oJ,e),{className:n,color:o,radius:a,loading:i,withCloseButton:l,withBorder:c,title:u,icon:d,children:p,onClose:h,closeButtonProps:g,classNames:y,styles:v,unstyled:E,variant:w}=r,b=nJ(r,["className","color","radius","loading","withCloseButton","withBorder","title","icon","children","onClose","closeButtonProps","classNames","styles","unstyled","variant"]),{classes:_,cx:x}=JX({color:o,radius:a,withTitle:!!u},{name:"Notification",classNames:y,styles:v,unstyled:E,variant:w});return s.createElement(le,kS({className:x(_.root,n),"data-with-icon":!!d||i||void 0,"data-with-border":c||void 0,role:"alert",ref:t},b),d&&!i&&s.createElement("div",{className:_.icon},d),i&&s.createElement(un,{size:28,color:o,className:_.loader}),s.createElement("div",{className:_.body},u&&s.createElement(oe,{className:_.title,size:"sm",weight:500},u),s.createElement(oe,{color:"dimmed",className:_.description,size:"sm"},p)),l&&s.createElement(fc,rJ(kS({iconSize:16,color:"gray"},g),{onClick:h,className:_.closeButton})))});c5.displayName="@mantine/core/Notification";var aJ=Object.defineProperty,iJ=Object.defineProperties,lJ=Object.getOwnPropertyDescriptors,fp=Object.getOwnPropertySymbols,u5=Object.prototype.hasOwnProperty,d5=Object.prototype.propertyIsEnumerable,jS=(e,t,r)=>t in e?aJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ng=(e,t)=>{for(var r in t||(t={}))u5.call(t,r)&&jS(e,r,t[r]);if(fp)for(var r of fp(t))d5.call(t,r)&&jS(e,r,t[r]);return e},sJ=(e,t)=>iJ(e,lJ(t)),cJ=(e,t)=>{var r={};for(var n in e)u5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fp)for(var n of fp(e))t.indexOf(n)<0&&d5.call(e,n)&&(r[n]=e[n]);return r};const uJ={type:"text",size:"sm",__staticSelector:"TextInput"},ae=f.forwardRef((e,t)=>{const r=bR("TextInput",uJ,e),{inputProps:n,wrapperProps:o}=r,a=cJ(r,["inputProps","wrapperProps"]);return s.createElement(Vt.Wrapper,ng({},o),s.createElement(Vt,sJ(ng(ng({},n),a),{ref:t})))});ae.displayName="@mantine/core/TextInput";const[dJ,Vm]=Po("Pagination.Root component was not found in tree"),fJ={siblings:1,boundaries:1};function f5(e){const{total:t,value:r,defaultValue:n,onChange:o,disabled:a,children:i,siblings:l,boundaries:c,color:u,radius:d,onNextPage:p,onPreviousPage:h,onFirstPage:g,onLastPage:y,getItemProps:v,classNames:E,styles:w,unstyled:b,variant:_,size:x}=G("PaginationRoot",fJ,e),{range:S,setPage:$,next:O,previous:C,active:T,first:k,last:I}=JM({page:r,initialPage:n,onChange:o,total:t,siblings:l,boundaries:c}),j=Lr(p,O),N=Lr(h,C),D=Lr(g,k),z=Lr(y,I);return s.createElement(dJ,{value:{total:t,range:S,active:T,disabled:a,color:u,radius:d,getItemProps:v,onChange:$,onNext:j,onPrevious:N,onFirst:D,onLast:z,stylesApi:{name:"Pagination",classNames:E,styles:w,unstyled:b,variant:_,size:x}}},i)}const Xs={xs:P(22),sm:P(26),md:P(32),lg:P(38),xl:P(44)};var pJ=H((e,{color:t,radius:r,withPadding:n},{size:o})=>{const a=e.fn.variant({color:t,variant:"filled"});return{control:{cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center",border:`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,height:L({size:o,sizes:Xs}),minWidth:L({size:o,sizes:Xs}),padding:n?`0 calc(${L({size:o,sizes:e.spacing})} / 2)`:void 0,fontSize:L({size:o,sizes:e.fontSizes}),borderRadius:e.fn.radius(r),lineHeight:1,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,"&:not([data-disabled])":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]}),"&:active:not([data-disabled])":e.activeStyles,"&[data-disabled]":{opacity:.4,cursor:"not-allowed",pointerEvents:"none"},"&[data-active]":{borderColor:"transparent",color:a.color,backgroundColor:a.background,"&:not([data-disabled])":e.fn.hover({backgroundColor:a.hover})}}}});const mJ=pJ;var hJ=Object.defineProperty,gJ=Object.defineProperties,vJ=Object.getOwnPropertyDescriptors,pp=Object.getOwnPropertySymbols,p5=Object.prototype.hasOwnProperty,m5=Object.prototype.propertyIsEnumerable,RS=(e,t,r)=>t in e?hJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yJ=(e,t)=>{for(var r in t||(t={}))p5.call(t,r)&&RS(e,r,t[r]);if(pp)for(var r of pp(t))m5.call(t,r)&&RS(e,r,t[r]);return e},wJ=(e,t)=>gJ(e,vJ(t)),bJ=(e,t)=>{var r={};for(var n in e)p5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pp)for(var n of pp(e))t.indexOf(n)<0&&m5.call(e,n)&&(r[n]=e[n]);return r};const _J={withPadding:!0},Bm=f.forwardRef((e,t)=>{const r=G("PaginationControl",_J,e),{active:n,className:o,disabled:a,withPadding:i}=r,l=bJ(r,["active","className","disabled","withPadding"]),c=Vm(),{classes:u,cx:d}=mJ({color:c.color,radius:c.radius,withPadding:i},c.stylesApi);return s.createElement(ho,wJ(yJ({},l),{disabled:a,"data-active":n||void 0,"data-disabled":a||void 0,ref:t,className:d(u.control,o)}))});Bm.displayName="@mantine/core/PaginationControl";var xJ=Object.defineProperty,EJ=Object.defineProperties,SJ=Object.getOwnPropertyDescriptors,mp=Object.getOwnPropertySymbols,h5=Object.prototype.hasOwnProperty,g5=Object.prototype.propertyIsEnumerable,TS=(e,t,r)=>t in e?xJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ka=(e,t)=>{for(var r in t||(t={}))h5.call(t,r)&&TS(e,r,t[r]);if(mp)for(var r of mp(t))g5.call(t,r)&&TS(e,r,t[r]);return e},wc=(e,t)=>EJ(e,SJ(t)),PJ=(e,t)=>{var r={};for(var n in e)h5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&mp)for(var n of mp(e))t.indexOf(n)<0&&g5.call(e,n)&&(r[n]=e[n]);return r};function v5(e){return`calc(${L({size:e,sizes:Xs})} / 2)`}function bc(e){var t=e,{size:r,style:n,children:o,path:a}=t,i=PJ(t,["size","style","children","path"]);return s.createElement("svg",Ka({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:Ka({width:r,height:r},n)},i),s.createElement("path",{d:a,fill:"currentColor"}))}const $J=e=>s.createElement(bc,wc(Ka({},e),{path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"})),OJ=e=>s.createElement(bc,wc(Ka({},e),{path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"})),CJ=e=>s.createElement(bc,wc(Ka({},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"})),kJ=e=>s.createElement(bc,wc(Ka({},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"})),jJ=e=>s.createElement(bc,wc(Ka({},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"}));var RJ=H((e,t,{size:r})=>({dots:{height:L({size:r,sizes:Xs}),minWidth:L({size:r,sizes:Xs}),display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}}));const TJ=RJ;var IJ=Object.defineProperty,hp=Object.getOwnPropertySymbols,y5=Object.prototype.hasOwnProperty,w5=Object.prototype.propertyIsEnumerable,IS=(e,t,r)=>t in e?IJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,DJ=(e,t)=>{for(var r in t||(t={}))y5.call(t,r)&&IS(e,r,t[r]);if(hp)for(var r of hp(t))w5.call(t,r)&&IS(e,r,t[r]);return e},NJ=(e,t)=>{var r={};for(var n in e)y5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hp)for(var n of hp(e))t.indexOf(n)<0&&w5.call(e,n)&&(r[n]=e[n]);return r};const AJ={icon:jJ},L0=f.forwardRef((e,t)=>{const r=G("PaginationDots",AJ,e),{className:n,icon:o}=r,a=NJ(r,["className","icon"]),i=Vm(),{classes:l,cx:c}=TJ(null,i.stylesApi);return s.createElement(le,DJ({ref:t,className:c(l.dots,n)},a),s.createElement(o,{size:v5(i.stylesApi.size)}))});L0.displayName="@mantine/core/PaginationDots";var MJ=Object.defineProperty,DS=Object.getOwnPropertySymbols,LJ=Object.prototype.hasOwnProperty,zJ=Object.prototype.propertyIsEnumerable,NS=(e,t,r)=>t in e?MJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,FJ=(e,t)=>{for(var r in t||(t={}))LJ.call(t,r)&&NS(e,r,t[r]);if(DS)for(var r of DS(t))zJ.call(t,r)&&NS(e,r,t[r]);return e};function z0({dotsIcon:e}){const t=Vm(),r=t.range.map((n,o)=>{var a;return n==="dots"?s.createElement(L0,{icon:e,key:o}):s.createElement(Bm,FJ({key:o,active:n===t.active,"aria-current":n===t.active?"page":void 0,onClick:()=>t.onChange(n),disabled:t.disabled},(a=t.getItemProps)==null?void 0:a.call(t,n)),n)});return s.createElement(s.Fragment,null,r)}z0.displayName="@mantine/core/PaginationItems";var VJ=H(e=>({icon:{transform:e.dir==="rtl"?"rotate(180deg)":"unset"}}));const BJ=VJ;var UJ=Object.defineProperty,gp=Object.getOwnPropertySymbols,b5=Object.prototype.hasOwnProperty,_5=Object.prototype.propertyIsEnumerable,AS=(e,t,r)=>t in e?UJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,WJ=(e,t)=>{for(var r in t||(t={}))b5.call(t,r)&&AS(e,r,t[r]);if(gp)for(var r of gp(t))_5.call(t,r)&&AS(e,r,t[r]);return e},HJ=(e,t)=>{var r={};for(var n in e)b5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gp)for(var n of gp(e))t.indexOf(n)<0&&_5.call(e,n)&&(r[n]=e[n]);return r};function Um({icon:e,name:t,action:r,type:n}){const o={icon:e},a=f.forwardRef((i,l)=>{const c=G(t,o,i),{icon:u}=c,d=HJ(c,["icon"]),{classes:p}=BJ(),h=Vm(),g=n==="next"?h.active===h.total:h.active===1;return s.createElement(Bm,WJ({disabled:h.disabled||g,ref:l,onClick:h[r],withPadding:!1},d),s.createElement(u,{className:p.icon,size:v5(h.stylesApi.size)}))});return a.displayName=`@mantine/core/${t}`,a}const x5=Um({icon:$J,name:"PaginationNext",action:"onNext",type:"next"}),E5=Um({icon:OJ,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),S5=Um({icon:CJ,name:"PaginationFirst",action:"onFirst",type:"previous"}),P5=Um({icon:kJ,name:"PaginationLast",action:"onLast",type:"next"});var qJ=Object.defineProperty,vp=Object.getOwnPropertySymbols,$5=Object.prototype.hasOwnProperty,O5=Object.prototype.propertyIsEnumerable,MS=(e,t,r)=>t in e?qJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,es=(e,t)=>{for(var r in t||(t={}))$5.call(t,r)&&MS(e,r,t[r]);if(vp)for(var r of vp(t))O5.call(t,r)&&MS(e,r,t[r]);return e},GJ=(e,t)=>{var r={};for(var n in e)$5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vp)for(var n of vp(e))t.indexOf(n)<0&&O5.call(e,n)&&(r[n]=e[n]);return r};const QJ={withControls:!0,siblings:1,boundaries:1};function eo(e){const t=G("Pagination",QJ,e),{withEdges:r,withControls:n,classNames:o,styles:a,unstyled:i,variant:l,size:c,total:u,value:d,defaultValue:p,onChange:h,disabled:g,siblings:y,boundaries:v,color:E,radius:w,onNextPage:b,onPreviousPage:_,onFirstPage:x,onLastPage:S,getItemProps:$,getControlProps:O,spacing:C,nextIcon:T,previousIcon:k,lastIcon:I,firstIcon:j,dotsIcon:N}=t,D=GJ(t,["withEdges","withControls","classNames","styles","unstyled","variant","size","total","value","defaultValue","onChange","disabled","siblings","boundaries","color","radius","onNextPage","onPreviousPage","onFirstPage","onLastPage","getItemProps","getControlProps","spacing","nextIcon","previousIcon","lastIcon","firstIcon","dotsIcon"]),z=or();return u<=0?null:s.createElement(f5,{classNames:o,styles:a,unstyled:i,variant:l,size:c,total:u,value:d,defaultValue:p,onChange:h,disabled:g,siblings:y,boundaries:v,color:E,radius:w,onNextPage:b,onPreviousPage:_,onFirstPage:x,onLastPage:S,getItemProps:$},s.createElement(J,es({spacing:C??`calc(${L({size:c,sizes:z.spacing})} / 2)`},D),r&&s.createElement(S5,es({icon:j},O==null?void 0:O("first"))),n&&s.createElement(E5,es({icon:k},O==null?void 0:O("previous"))),s.createElement(z0,{dotsIcon:N}),n&&s.createElement(x5,es({icon:T},O==null?void 0:O("next"))),r&&s.createElement(P5,es({icon:I},O==null?void 0:O("last")))))}eo.displayName="@mantine/core/Pagination";eo.Root=f5;eo.Items=z0;eo.Control=Bm;eo.Dots=L0;eo.Next=x5;eo.Previous=E5;eo.Last=P5;eo.First=S5;const KJ=({reveal:e,size:t})=>s.createElement("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:t,height:t}},s.createElement("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"}));var YJ=Object.defineProperty,XJ=Object.defineProperties,JJ=Object.getOwnPropertyDescriptors,LS=Object.getOwnPropertySymbols,ZJ=Object.prototype.hasOwnProperty,eZ=Object.prototype.propertyIsEnumerable,zS=(e,t,r)=>t in e?YJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,og=(e,t)=>{for(var r in t||(t={}))ZJ.call(t,r)&&zS(e,r,t[r]);if(LS)for(var r of LS(t))eZ.call(t,r)&&zS(e,r,t[r]);return e},FS=(e,t)=>XJ(e,JJ(t)),tZ=H((e,{rightSectionWidth:t},{size:r})=>({visibilityToggle:{},input:{position:"relative",overflow:"hidden"},innerInput:FS(og(og({},e.fn.fontStyles()),e.fn.cover(0)),{backgroundColor:"transparent",border:`${P(1)} solid transparent`,borderLeftWidth:0,borderRightWidth:0,boxSizing:"border-box",display:"block",width:`calc(100% - ${P(t)})`,paddingLeft:`calc(${L({size:r,sizes:$t})} / 3)`,fontSize:L({size:r,sizes:e.fontSizes}),height:`calc(${L({size:r,sizes:$t})} - ${P(2)})`,lineHeight:`calc(${L({size:r,sizes:$t})} - ${P(4)})`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&::-ms-reveal, &::-ms-clear":{display:"none"},"&:focus":{outline:0},"&:disabled":{cursor:"not-allowed",pointerEvents:"none",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"&::placeholder":FS(og({},e.fn.placeholderStyles()),{opacity:1}),"&[data-invalid]":{color:e.fn.variant({variant:"filled",color:"red"}).background,"&::placeholder":{opacity:1,color:e.fn.variant({variant:"filled",color:"red"}).background}},"&[data-with-icon]":{paddingLeft:L({size:r,sizes:$t})}})}));const rZ=tZ;var nZ=Object.defineProperty,oZ=Object.defineProperties,aZ=Object.getOwnPropertyDescriptors,yp=Object.getOwnPropertySymbols,C5=Object.prototype.hasOwnProperty,k5=Object.prototype.propertyIsEnumerable,VS=(e,t,r)=>t in e?nZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Su=(e,t)=>{for(var r in t||(t={}))C5.call(t,r)&&VS(e,r,t[r]);if(yp)for(var r of yp(t))k5.call(t,r)&&VS(e,r,t[r]);return e},iZ=(e,t)=>oZ(e,aZ(t)),lZ=(e,t)=>{var r={};for(var n in e)C5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yp)for(var n of yp(e))t.indexOf(n)<0&&k5.call(e,n)&&(r[n]=e[n]);return r};const sZ={xs:P(22),sm:P(26),md:P(28),lg:P(32),xl:P(40)},cZ={xs:P(12),sm:P(15),md:P(17),lg:P(19),xl:P(21)},uZ={xs:P(28),sm:P(32),md:P(34),lg:P(44),xl:P(54)},dZ={size:"sm",toggleTabIndex:-1,visibilityToggleIcon:KJ,__staticSelector:"PasswordInput"},po=f.forwardRef((e,t)=>{const r=G("PasswordInput",dZ,e),{radius:n,disabled:o,size:a,toggleTabIndex:i,className:l,id:c,label:u,error:d,required:p,style:h,icon:g,description:y,wrapperProps:v,classNames:E,styles:w,variant:b,visibilityToggleIcon:_,__staticSelector:x,sx:S,labelProps:$,descriptionProps:O,errorProps:C,unstyled:T,visibilityToggleLabel:k,withAsterisk:I,inputContainer:j,iconWidth:N,inputWrapperOrder:D,visible:z,defaultVisible:W,onVisibilityChange:K}=r,R=lZ(r,["radius","disabled","size","toggleTabIndex","className","id","label","error","required","style","icon","description","wrapperProps","classNames","styles","variant","visibilityToggleIcon","__staticSelector","sx","labelProps","descriptionProps","errorProps","unstyled","visibilityToggleLabel","withAsterisk","inputContainer","iconWidth","inputWrapperOrder","visible","defaultVisible","onVisibilityChange"]),A=L({size:a,sizes:uZ}),{classes:V}=rZ({rightSectionWidth:A},{name:"PasswordInput",classNames:E,styles:w,unstyled:T,size:a,variant:b}),Q=kr(c),{systemStyles:ie,rest:Ce}=Zn(R),[ue,Me]=Or({value:z,defaultValue:W,finalValue:!1,onChange:K}),Ie=()=>Me(!ue),ft=s.createElement(ur,{className:V.visibilityToggle,tabIndex:i,radius:n,size:L({size:a,sizes:sZ}),"aria-hidden":!k,"aria-label":k,unstyled:T,onMouseDown:rt=>{rt.preventDefault(),Ie()},onKeyDown:rt=>{rt.key===" "&&(rt.preventDefault(),Ie())}},s.createElement(_,{reveal:ue,size:L({size:a,sizes:cZ})}));return s.createElement(Vt.Wrapper,Su(Su({required:p,id:Q,label:u,error:d,description:y,size:a,className:l,style:h,classNames:E,styles:w,__staticSelector:x,sx:S,errorProps:C,descriptionProps:O,labelProps:$,unstyled:T,withAsterisk:I,inputWrapperOrder:D,inputContainer:j,variant:b},ie),v),s.createElement(Vt,{component:"div",error:d,icon:g,size:a,classNames:iZ(Su({},E),{input:V.input}),styles:w,radius:n,disabled:o,__staticSelector:x,rightSectionWidth:A,rightSection:!o&&ft,variant:b,unstyled:T,iconWidth:N},s.createElement("input",Su({type:ue?"text":"password",required:p,"data-invalid":!!d||void 0,"data-with-icon":!!g||void 0,className:V.innerInput,disabled:o,id:Q,ref:t,autoComplete:"off"},Ce))))});po.displayName="@mantine/core/PasswordInput";const j5=f.createContext(!1),fZ=j5.Provider,pZ=()=>f.useContext(j5);function R5({children:e,openDelay:t=0,closeDelay:r=0}){return s.createElement(fZ,{value:!0},s.createElement(oB,{delay:{open:t,close:r}},e))}R5.displayName="@mantine/core/TooltipGroup";var mZ=Object.defineProperty,hZ=Object.defineProperties,gZ=Object.getOwnPropertyDescriptors,BS=Object.getOwnPropertySymbols,vZ=Object.prototype.hasOwnProperty,yZ=Object.prototype.propertyIsEnumerable,US=(e,t,r)=>t in e?mZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,WS=(e,t)=>{for(var r in t||(t={}))vZ.call(t,r)&&US(e,r,t[r]);if(BS)for(var r of BS(t))yZ.call(t,r)&&US(e,r,t[r]);return e},wZ=(e,t)=>hZ(e,gZ(t));function bZ(e,t){if(!t)return{backgroundColor:e.colorScheme==="dark"?e.colors.gray[2]:e.colors.gray[9],color:e.colorScheme==="dark"?e.black:e.white};const r=e.fn.variant({variant:"filled",color:t,primaryFallback:!1});return{backgroundColor:r.background,color:r.color}}var _Z=H((e,{color:t,radius:r,width:n,multiline:o})=>({tooltip:wZ(WS(WS({},e.fn.fontStyles()),bZ(e,t)),{lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,borderRadius:e.fn.radius(r),padding:`calc(${e.spacing.xs} / 2) ${e.spacing.xs}`,position:"absolute",whiteSpace:o?"unset":"nowrap",pointerEvents:"none",width:n}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const T5=_Z,I5={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function xZ({offset:e,position:t}){const[r,n]=f.useState(!1),o=f.useRef(),{x:a,y:i,reference:l,floating:c,refs:u,update:d,placement:p}=$0({placement:t,middleware:[b0({crossAxis:!0,padding:5,rootBoundary:"document"})]}),h=p.includes("right")?e:t.includes("left")?e*-1:0,g=p.includes("bottom")?e:t.includes("top")?e*-1:0,y=f.useCallback(({clientX:v,clientY:E})=>{l({getBoundingClientRect(){return{width:0,height:0,x:v,y:E,left:v+h,top:E+g,right:v,bottom:E}}})},[l]);return f.useEffect(()=>{if(u.floating.current){const v=o.current;v.addEventListener("mousemove",y);const E=fo(u.floating.current);return E.forEach(w=>{w.addEventListener("scroll",d)}),()=>{v.removeEventListener("mousemove",y),E.forEach(w=>{w.removeEventListener("scroll",d)})}}},[l,u.floating.current,d,y,r]),{handleMouseMove:y,x:a,y:i,opened:r,setOpened:n,boundaryRef:o,floating:c}}var EZ=Object.defineProperty,SZ=Object.defineProperties,PZ=Object.getOwnPropertyDescriptors,wp=Object.getOwnPropertySymbols,D5=Object.prototype.hasOwnProperty,N5=Object.prototype.propertyIsEnumerable,HS=(e,t,r)=>t in e?EZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pu=(e,t)=>{for(var r in t||(t={}))D5.call(t,r)&&HS(e,r,t[r]);if(wp)for(var r of wp(t))N5.call(t,r)&&HS(e,r,t[r]);return e},$u=(e,t)=>SZ(e,PZ(t)),$Z=(e,t)=>{var r={};for(var n in e)D5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wp)for(var n of wp(e))t.indexOf(n)<0&&N5.call(e,n)&&(r[n]=e[n]);return r};const OZ={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Rn("popover")};function A5(e){var t;const r=G("TooltipFloating",OZ,e),{children:n,refProp:o,withinPortal:a,portalProps:i,style:l,className:c,classNames:u,styles:d,unstyled:p,radius:h,color:g,label:y,offset:v,position:E,multiline:w,width:b,zIndex:_,disabled:x,variant:S}=r,$=$Z(r,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:O,x:C,y:T,opened:k,boundaryRef:I,floating:j,setOpened:N}=xZ({offset:v,position:E}),{classes:D,cx:z}=T5({radius:h,color:g,multiline:w,width:b},{name:"TooltipFloating",classNames:u,styles:d,unstyled:p,variant:S});if(!El(n))throw new Error(I5.children);const W=Pl(I,n.ref),K=A=>{var V,Q;(Q=(V=n.props).onMouseEnter)==null||Q.call(V,A),O(A),N(!0)},R=A=>{var V,Q;(Q=(V=n.props).onMouseLeave)==null||Q.call(V,A),N(!1)};return s.createElement(s.Fragment,null,s.createElement(Cl,$u(Pu({},i),{withinPortal:a}),s.createElement(le,$u(Pu({},$),{ref:j,className:z(D.tooltip,c),style:$u(Pu({},l),{zIndex:_,display:!x&&k?"block":"none",top:T??"",left:(t=Math.round(C))!=null?t:""})}),y)),f.cloneElement(n,$u(Pu({},n.props),{[o]:W,onMouseEnter:K,onMouseLeave:R})))}A5.displayName="@mantine/core/TooltipFloating";function CZ(e){const[t,r]=f.useState(!1),o=typeof e.opened=="boolean"?e.opened:t,a=pZ(),i=kr(),{delay:l,currentId:c,setCurrentId:u}=rR(),d=f.useCallback(C=>{r(C),C&&u(i)},[u,i]),{x:p,y:h,reference:g,floating:y,context:v,refs:E,update:w,placement:b,middlewareData:{arrow:{x:_,y:x}={}}}=$0({placement:e.position,open:o,onOpenChange:d,middleware:[Uj(e.offset),b0({padding:8}),Fj(),Xj({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[Bj()]:[]]}),{getReferenceProps:S,getFloatingProps:$}=gB([nB(v,{enabled:e.events.hover,delay:a?l:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),mB(v,{enabled:e.events.focus,keyboardOnly:!0}),hB(v,{role:"tooltip"}),pB(v,{enabled:typeof e.opened===void 0}),aB(v,{id:i})]);return oR({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:E,update:w}}),nn(()=>{var C;(C=e.onPositionChange)==null||C.call(e,b)},[b]),{x:p,y:h,arrowX:_,arrowY:x,reference:g,floating:y,getFloatingProps:$,getReferenceProps:S,isGroupPhase:o&&c&&c!==i,opened:o,placement:b}}var kZ=Object.defineProperty,jZ=Object.defineProperties,RZ=Object.getOwnPropertyDescriptors,bp=Object.getOwnPropertySymbols,M5=Object.prototype.hasOwnProperty,L5=Object.prototype.propertyIsEnumerable,qS=(e,t,r)=>t in e?kZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$a=(e,t)=>{for(var r in t||(t={}))M5.call(t,r)&&qS(e,r,t[r]);if(bp)for(var r of bp(t))L5.call(t,r)&&qS(e,r,t[r]);return e},ag=(e,t)=>jZ(e,RZ(t)),TZ=(e,t)=>{var r={};for(var n in e)M5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&bp)for(var n of bp(e))t.indexOf(n)<0&&L5.call(e,n)&&(r[n]=e[n]);return r};const IZ={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:Rn("popover"),positionDependencies:[]},Wm=f.forwardRef((e,t)=>{var r;const n=f.useRef(null),o=G("Tooltip",IZ,e),{children:a,position:i,refProp:l,label:c,openDelay:u,closeDelay:d,onPositionChange:p,opened:h,withinPortal:g,portalProps:y,radius:v,color:E,classNames:w,styles:b,unstyled:_,style:x,className:S,withArrow:$,arrowSize:O,arrowOffset:C,arrowRadius:T,arrowPosition:k,offset:I,transitionProps:j,multiline:N,width:D,events:z,zIndex:W,disabled:K,positionDependencies:R,onClick:A,onMouseEnter:V,onMouseLeave:Q,inline:ie,variant:Ce,keepMounted:ue}=o,Me=TZ(o,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:Ie,cx:ft,theme:rt}=T5({radius:v,color:E,width:D,multiline:N},{name:"Tooltip",classNames:w,styles:b,unstyled:_,variant:Ce}),nt=CZ({position:hR(rt.dir,i),closeDelay:d,openDelay:u,onPositionChange:p,opened:h,events:z,arrowRef:n,arrowOffset:C,offset:I+($?O/2:0),positionDependencies:[...R,a],inline:ie});if(!El(a))throw new Error(I5.children);const Tr=Pl(nt.reference,a.ref,t);return s.createElement(s.Fragment,null,s.createElement(Cl,ag($a({},y),{withinPortal:g}),s.createElement(li,ag($a({keepMounted:ue,mounted:!K&&nt.opened},j),{transition:j.transition||"fade",duration:nt.isGroupPhase?10:(r=j.duration)!=null?r:100}),Ir=>{var ar,pn;return s.createElement(le,$a($a({},Me),nt.getFloatingProps({ref:nt.floating,className:Ie.tooltip,style:ag($a($a({},x),Ir),{zIndex:W,top:(ar=nt.y)!=null?ar:0,left:(pn=nt.x)!=null?pn:0})})),c,s.createElement(C0,{ref:n,arrowX:nt.arrowX,arrowY:nt.arrowY,visible:$,position:nt.placement,arrowSize:O,arrowOffset:C,arrowRadius:T,arrowPosition:k,className:Ie.arrow}))})),f.cloneElement(a,nt.getReferenceProps($a({onClick:A,onMouseEnter:V,onMouseLeave:Q,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[l]:Tr,className:ft(S,a.props.className)},a.props))))});Wm.Group=R5;Wm.Floating=A5;Wm.displayName="@mantine/core/Tooltip";const DZ=Wm;var NZ=Object.defineProperty,_p=Object.getOwnPropertySymbols,z5=Object.prototype.hasOwnProperty,F5=Object.prototype.propertyIsEnumerable,GS=(e,t,r)=>t in e?NZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,QS=(e,t)=>{for(var r in t||(t={}))z5.call(t,r)&&GS(e,r,t[r]);if(_p)for(var r of _p(t))F5.call(t,r)&&GS(e,r,t[r]);return e},AZ=(e,t)=>{var r={};for(var n in e)z5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_p)for(var n of _p(e))t.indexOf(n)<0&&F5.call(e,n)&&(r[n]=e[n]);return r};function MZ(e){const t=e,{width:r,height:n,style:o}=t,a=AZ(t,["width","height","style"]);return s.createElement("svg",QS({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:QS({width:r,height:n},o)},a),s.createElement("path",{fill:"currentColor",d:"M0 2.5a2.5 2.5 0 115 0 2.5 2.5 0 01-5 0z"}))}const V5=f.createContext(null),LZ=V5.Provider,zZ=()=>f.useContext(V5);var FZ=Object.defineProperty,xp=Object.getOwnPropertySymbols,B5=Object.prototype.hasOwnProperty,U5=Object.prototype.propertyIsEnumerable,KS=(e,t,r)=>t in e?FZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YS=(e,t)=>{for(var r in t||(t={}))B5.call(t,r)&&KS(e,r,t[r]);if(xp)for(var r of xp(t))U5.call(t,r)&&KS(e,r,t[r]);return e},VZ=(e,t)=>{var r={};for(var n in e)B5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xp)for(var n of xp(e))t.indexOf(n)<0&&U5.call(e,n)&&(r[n]=e[n]);return r};const BZ={size:"sm"},W5=f.forwardRef((e,t)=>{const r=G("RadioGroup",BZ,e),{children:n,value:o,defaultValue:a,onChange:i,size:l,wrapperProps:c,unstyled:u,name:d}=r,p=VZ(r,["children","value","defaultValue","onChange","size","wrapperProps","unstyled","name"]),h=kr(d),[g,y]=Or({value:o,defaultValue:a,finalValue:"",onChange:i}),v=E=>y(E.currentTarget.value);return s.createElement(LZ,{value:{value:g,onChange:v,size:l,name:h}},s.createElement(Vt.Wrapper,YS(YS({labelElement:"div",size:l,__staticSelector:"RadioGroup",ref:t,unstyled:u},c),p),n))});W5.displayName="@mantine/core/RadioGroup";var UZ=Object.defineProperty,WZ=Object.defineProperties,HZ=Object.getOwnPropertyDescriptors,XS=Object.getOwnPropertySymbols,qZ=Object.prototype.hasOwnProperty,GZ=Object.prototype.propertyIsEnumerable,JS=(e,t,r)=>t in e?UZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,QZ=(e,t)=>{for(var r in t||(t={}))qZ.call(t,r)&&JS(e,r,t[r]);if(XS)for(var r of XS(t))GZ.call(t,r)&&JS(e,r,t[r]);return e},KZ=(e,t)=>WZ(e,HZ(t));const ig={xs:P(16),sm:P(20),md:P(24),lg:P(30),xl:P(36)},Ou={xs:P(6),sm:P(8),md:P(10),lg:P(14),xl:P(16)};var YZ=H((e,{color:t,transitionDuration:r,labelPosition:n,error:o},{size:a})=>{const i=e.fn.variant({variant:"filled",color:t}),l=e.fn.variant({variant:"filled",color:"red"}).background;return{inner:{order:n==="left"?2:1,position:"relative",alignSelf:"flex-start"},icon:{ref:zt("icon"),color:e.white,opacity:0,transform:`scale(0.75) translateY(${P(2)})`,transition:`opacity ${r}ms ${e.transitionTimingFunction}`,pointerEvents:"none",width:L({sizes:Ou,size:a}),height:L({sizes:Ou,size:a}),position:"absolute",top:`calc(50% - ${L({sizes:Ou,size:a})} / 2)`,left:`calc(50% - ${L({sizes:Ou,size:a})} / 2)`},radio:KZ(QZ({},e.fn.focusStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${P(1)} solid ${o?l:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,position:"relative",appearance:"none",width:L({sizes:ig,size:a}),height:L({sizes:ig,size:a}),borderRadius:L({sizes:ig,size:a}),margin:0,display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:`${r}ms`,cursor:e.cursorType,"&:checked":{background:i.background,borderColor:i.background,[`& + .${zt("icon")}`]:{opacity:1,transform:"scale(1)"}},"&:disabled":{borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[4],backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],[`& + .${zt("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[4]}}})}});const XZ=YZ;var JZ=Object.defineProperty,Ep=Object.getOwnPropertySymbols,H5=Object.prototype.hasOwnProperty,q5=Object.prototype.propertyIsEnumerable,ZS=(e,t,r)=>t in e?JZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cu=(e,t)=>{for(var r in t||(t={}))H5.call(t,r)&&ZS(e,r,t[r]);if(Ep)for(var r of Ep(t))q5.call(t,r)&&ZS(e,r,t[r]);return e},ZZ=(e,t)=>{var r={};for(var n in e)H5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ep)for(var n of Ep(e))t.indexOf(n)<0&&q5.call(e,n)&&(r[n]=e[n]);return r};const eee={icon:MZ,transitionDuration:100,size:"sm",labelPosition:"right"},Sp=f.forwardRef((e,t)=>{var r,n;const o=G("Radio",eee,e),{className:a,style:i,id:l,label:c,size:u,title:d,disabled:p,color:h,classNames:g,styles:y,sx:v,icon:E,transitionDuration:w,wrapperProps:b,unstyled:_,labelPosition:x,description:S,error:$,variant:O}=o,C=ZZ(o,["className","style","id","label","size","title","disabled","color","classNames","styles","sx","icon","transitionDuration","wrapperProps","unstyled","labelPosition","description","error","variant"]),T=zZ(),k=(r=T==null?void 0:T.size)!=null?r:u,I=e.size?u:k,{classes:j}=XZ({color:h,transitionDuration:w,labelPosition:x,error:!!$},{name:"Radio",classNames:g,styles:y,unstyled:_,variant:O,size:I}),{systemStyles:N,rest:D}=Zn(C),z=kr(l),W=T?{checked:T.value===D.value,name:(n=D.name)!=null?n:T.name,onChange:T.onChange}:{};return s.createElement(Fm,Cu(Cu({className:a,sx:v,style:i,id:z,size:I,labelPosition:x,label:c,description:S,error:$,disabled:p,__staticSelector:"Radio",classNames:g,styles:y,unstyled:_,"data-checked":W.checked||void 0,variant:O},N),b),s.createElement("div",{className:j.inner},s.createElement("input",Cu(Cu({ref:t,className:j.radio,type:"radio",id:z,disabled:p},D),W)),s.createElement(E,{className:j.icon,"aria-hidden":!0})))});Sp.displayName="@mantine/core/Radio";Sp.Group=W5;var tee=Object.defineProperty,Pp=Object.getOwnPropertySymbols,G5=Object.prototype.hasOwnProperty,Q5=Object.prototype.propertyIsEnumerable,eP=(e,t,r)=>t in e?tee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ree=(e,t)=>{for(var r in t||(t={}))G5.call(t,r)&&eP(e,r,t[r]);if(Pp)for(var r of Pp(t))Q5.call(t,r)&&eP(e,r,t[r]);return e},nee=(e,t)=>{var r={};for(var n in e)G5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Pp)for(var n of Pp(e))t.indexOf(n)<0&&Q5.call(e,n)&&(r[n]=e[n]);return r};const oee={w:0,h:0},Hm=f.forwardRef((e,t)=>{const r=G("Space",oee,e),{w:n,h:o}=r,a=nee(r,["w","h"]);return s.createElement(le,ree({ref:t,w:n,miw:n,h:o,mih:o},a))});Hm.displayName="@mantine/core/Space";var aee=H((e,{spacing:t,align:r,justify:n})=>({root:{display:"flex",flexDirection:"column",alignItems:r,justifyContent:n,gap:L({size:t,sizes:e.spacing})}}));const iee=aee;var lee=Object.defineProperty,$p=Object.getOwnPropertySymbols,K5=Object.prototype.hasOwnProperty,Y5=Object.prototype.propertyIsEnumerable,tP=(e,t,r)=>t in e?lee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,see=(e,t)=>{for(var r in t||(t={}))K5.call(t,r)&&tP(e,r,t[r]);if($p)for(var r of $p(t))Y5.call(t,r)&&tP(e,r,t[r]);return e},cee=(e,t)=>{var r={};for(var n in e)K5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$p)for(var n of $p(e))t.indexOf(n)<0&&Y5.call(e,n)&&(r[n]=e[n]);return r};const uee={spacing:"md",align:"stretch",justify:"flex-start"},je=f.forwardRef((e,t)=>{const r=G("Stack",uee,e),{spacing:n,className:o,align:a,justify:i,unstyled:l,variant:c}=r,u=cee(r,["spacing","className","align","justify","unstyled","variant"]),{classes:d,cx:p}=iee({spacing:n,align:a,justify:i},{name:"Stack",unstyled:l,variant:c});return s.createElement(le,see({className:p(d.root,o),ref:t},u))});je.displayName="@mantine/core/Stack";var dee=Object.defineProperty,fee=Object.defineProperties,pee=Object.getOwnPropertyDescriptors,rP=Object.getOwnPropertySymbols,mee=Object.prototype.hasOwnProperty,hee=Object.prototype.propertyIsEnumerable,nP=(e,t,r)=>t in e?dee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lg=(e,t)=>{for(var r in t||(t={}))mee.call(t,r)&&nP(e,r,t[r]);if(rP)for(var r of rP(t))hee.call(t,r)&&nP(e,r,t[r]);return e},gee=(e,t)=>fee(e,pee(t));const X5={xs:P(34),sm:P(36),md:P(42),lg:P(48),xl:P(52)};var vee=H((e,{color:t,iconSize:r,radius:n,allowStepClick:o,iconPosition:a,orientation:i},{size:l})=>{const c=r?P(r):L({size:l,sizes:X5}),u=l==="xl"||l==="lg"?e.spacing.md:e.spacing.sm,d=e.fn.radius(n),p=e.fn.variant({variant:"filled",color:t||e.primaryColor,primaryFallback:!1}),h=`calc(${e.spacing.xs} / 2)`,g={step:{justifyContent:"flex-start",minHeight:`calc(${c} + ${e.spacing.xl} + ${h})`,marginTop:h,overflow:"hidden","&:first-of-type":{marginTop:0},[`&:last-of-type .${zt("verticalSeparator")}`]:{display:"none"}}};return{stepLoader:{},step:lg({display:"flex",flexDirection:a==="left"?"row":"row-reverse",cursor:o?"pointer":"default"},i==="vertical"?g.step:{alignItems:"center"}),stepWrapper:{position:"relative"},verticalSeparator:{top:`calc(${c} + ${h})`,left:`calc(${c} / 2)`,height:"100vh",position:"absolute",borderLeft:`${P(2)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`,ref:zt("verticalSeparator")},verticalSeparatorActive:{borderColor:e.fn.variant({variant:"filled",color:t}).background},stepIcon:{boxSizing:"border-box",height:c,width:c,minWidth:c,borderRadius:d,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],border:`${P(2)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`,transition:"background-color 150ms ease, border-color 150ms ease",position:"relative",fontWeight:700,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7],fontSize:L({size:l,sizes:e.fontSizes}),"&[data-progress]":{borderColor:p.background},"&[data-completed]":{backgroundColor:p.background,borderColor:p.background,color:e.white}},stepCompletedIcon:gee(lg({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.white}),stepBody:lg({display:"flex",flexDirection:"column",marginLeft:a==="left"?u:void 0,marginRight:a==="right"?u:void 0},i==="vertical"?{marginTop:`calc(${r} / 4)`}:null),stepLabel:{textAlign:a,fontWeight:500,fontSize:L({size:l,sizes:e.fontSizes}),lineHeight:1},stepDescription:{textAlign:a,marginTop:`calc(${L({size:l,sizes:e.spacing})} / 3)`,marginBottom:`calc(${L({size:l,sizes:e.spacing})} / 3)`,fontSize:`calc(${L({size:l,sizes:e.fontSizes})} - ${P(2)})`,lineHeight:1}}});const yee=vee;var wee=Object.defineProperty,Op=Object.getOwnPropertySymbols,J5=Object.prototype.hasOwnProperty,Z5=Object.prototype.propertyIsEnumerable,oP=(e,t,r)=>t in e?wee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sg=(e,t)=>{for(var r in t||(t={}))J5.call(t,r)&&oP(e,r,t[r]);if(Op)for(var r of Op(t))Z5.call(t,r)&&oP(e,r,t[r]);return e},bee=(e,t)=>{var r={};for(var n in e)J5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Op)for(var n of Op(e))t.indexOf(n)<0&&Z5.call(e,n)&&(r[n]=e[n]);return r};const _ee={xs:16,sm:18,md:20,lg:22,xl:24},xee={withIcon:!0,size:"md",radius:"xl",allowStepClick:!0,iconPosition:"left",__staticSelector:"Step"},ku=(e,t)=>typeof e=="function"?s.createElement(e,{step:t}):e,e4=f.forwardRef((e,t)=>{const r=G("StepperStep",xee,e),{className:n,step:o,state:a,color:i,icon:l,completedIcon:c,progressIcon:u,label:d,description:p,withIcon:h,iconSize:g,size:y,radius:v,loading:E,allowStepClick:w,allowStepSelect:b,iconPosition:_,__staticSelector:x,classNames:S,styles:$,unstyled:O,orientation:C,variant:T}=r,k=bee(r,["className","step","state","color","icon","completedIcon","progressIcon","label","description","withIcon","iconSize","size","radius","loading","allowStepClick","allowStepSelect","iconPosition","__staticSelector","classNames","styles","unstyled","orientation","variant"]),{classes:I,cx:j}=yee({color:i,iconSize:g,radius:v,allowStepClick:w,iconPosition:_,orientation:C},{name:x,classNames:S,styles:$,unstyled:O,variant:T,size:y}),N=L({size:y,sizes:_ee}),D=a==="stepCompleted"?null:a==="stepProgress"?u:l,z={"data-progress":a==="stepProgress"||void 0,"data-completed":a==="stepCompleted"||void 0};return s.createElement(ho,sg(sg({className:j(I.step,n),tabIndex:w?0:-1,ref:t},z),k),h&&s.createElement("div",{className:I.stepWrapper},s.createElement("div",sg({className:I.stepIcon},z),s.createElement(li,{mounted:a==="stepCompleted",transition:"pop",duration:200},W=>s.createElement("div",{className:I.stepCompletedIcon,style:W},E?s.createElement(un,{color:"#fff",size:N,className:I.stepLoader}):ku(c,o)||s.createElement(vT,{indeterminate:!1,width:N,height:N}))),a!=="stepCompleted"?E?s.createElement(un,{size:N,color:i}):ku(D||l,o):null),C==="vertical"&&s.createElement("div",{className:j(I.verticalSeparator,{[I.verticalSeparatorActive]:a==="stepCompleted"})})),(d||p)&&s.createElement("div",{className:I.stepBody},d&&s.createElement(oe,{className:I.stepLabel},ku(d,o)),p&&s.createElement(oe,{className:I.stepDescription,color:"dimmed"},ku(p,o))))});e4.displayName="@mantine/core/Step";function Cp(e){return null}Cp.displayName="@mantine/core/StepCompleted";var Eee=Object.defineProperty,See=Object.defineProperties,Pee=Object.getOwnPropertyDescriptors,aP=Object.getOwnPropertySymbols,$ee=Object.prototype.hasOwnProperty,Oee=Object.prototype.propertyIsEnumerable,iP=(e,t,r)=>t in e?Eee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ts=(e,t)=>{for(var r in t||(t={}))$ee.call(t,r)&&iP(e,r,t[r]);if(aP)for(var r of aP(t))Oee.call(t,r)&&iP(e,r,t[r]);return e},Cee=(e,t)=>See(e,Pee(t)),kee=H((e,{contentPadding:t,color:r,orientation:n,iconPosition:o,iconSize:a,breakpoint:i},{size:l})=>{const c=typeof i<"u",u=ln(L({size:i,sizes:e.breakpoints})),d=typeof a<"u"?`calc(${P(a)} / 2 - ${P(1)})`:`calc(${L({size:l,sizes:X5})} / 2 - ${P(1)})`,p={steps:{flexDirection:"column",alignItems:o==="left"?"flex-start":"flex-end"},separator:{width:P(2),minHeight:e.spacing.xl,marginLeft:o==="left"?d:0,marginRight:o==="right"?d:0,marginTop:`calc(${e.spacing.xs} / 2)`,marginBottom:`calc(${e.spacing.xs} - ${P(2)})`}},h={steps:{[`@media (max-width: ${sr(u-1)})`]:p.steps},separator:{[`@media (max-width: ${sr(u-1)})`]:p.separator}};return{root:{},steps:ts(ts({display:"flex",boxSizing:"border-box",alignItems:"center"},n==="vertical"?p.steps:null),c?h.steps:null),separator:ts(ts({boxSizing:"border-box",transition:"background-color 150ms ease",flex:1,height:P(2),backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],marginLeft:e.spacing.md,marginRight:e.spacing.md},n==="vertical"?p.separator:null),c?h.separator:null),separatorActive:{backgroundColor:e.fn.variant({variant:"filled",color:r||e.primaryColor,primaryFallback:!1}).background},content:Cee(ts({},e.fn.fontStyles()),{paddingTop:L({size:t,sizes:e.spacing})})}});const jee=kee;var Ree=Object.defineProperty,kp=Object.getOwnPropertySymbols,t4=Object.prototype.hasOwnProperty,r4=Object.prototype.propertyIsEnumerable,lP=(e,t,r)=>t in e?Ree(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Tee=(e,t)=>{for(var r in t||(t={}))t4.call(t,r)&&lP(e,r,t[r]);if(kp)for(var r of kp(t))r4.call(t,r)&&lP(e,r,t[r]);return e},Iee=(e,t)=>{var r={};for(var n in e)t4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&kp)for(var n of kp(e))t.indexOf(n)<0&&r4.call(e,n)&&(r[n]=e[n]);return r};const Dee={contentPadding:"md",size:"md",radius:"xl",orientation:"horizontal",iconPosition:"left",allowNextStepsSelect:!0},Js=f.forwardRef((e,t)=>{var r,n,o;const a=G("Stepper",Dee,e),{className:i,children:l,onStepClick:c,active:u,icon:d,completedIcon:p,progressIcon:h,color:g,iconSize:y,contentPadding:v,size:E,radius:w,orientation:b,breakpoint:_,iconPosition:x,allowNextStepsSelect:S,classNames:$,styles:O,unstyled:C,variant:T}=a,k=Iee(a,["className","children","onStepClick","active","icon","completedIcon","progressIcon","color","iconSize","contentPadding","size","radius","orientation","breakpoint","iconPosition","allowNextStepsSelect","classNames","styles","unstyled","variant"]),{classes:I,cx:j}=jee({contentPadding:v,color:g,orientation:b,iconPosition:x,iconSize:y,breakpoint:_},{name:"Stepper",classNames:$,styles:O,unstyled:C,variant:T,size:E}),N=f.Children.toArray(l),D=N.filter(V=>V.type!==Cp),z=N.find(V=>V.type===Cp),W=D.reduce((V,Q,ie)=>{const Ce=u===ie?"stepProgress":u>ie?"stepCompleted":"stepInactive",Me=(()=>typeof c!="function"?!1:typeof Q.props.allowStepSelect=="boolean"?Q.props.allowStepSelect:Ce==="stepCompleted"||S)();return V.push(f.cloneElement(Q,{__staticSelector:"Stepper",icon:Q.props.icon||d||ie+1,key:ie,step:ie,variant:T,state:Ce,onClick:()=>Me&&c(ie),allowStepClick:Me,completedIcon:Q.props.completedIcon||p,progressIcon:Q.props.progressIcon||h,color:Q.props.color||g,iconSize:y,size:E,radius:w,classNames:$,styles:O,iconPosition:Q.props.iconPosition||x,orientation:b,unstyled:C})),b==="horizontal"&&ie!==D.length-1&&V.push(s.createElement("div",{className:j(I.separator,{[I.separatorActive]:ie<u}),key:`separator-${ie}`})),V},[]),K=(n=(r=D[u])==null?void 0:r.props)==null?void 0:n.children,R=(o=z==null?void 0:z.props)==null?void 0:o.children,A=u>D.length-1?R:K;return s.createElement(le,Tee({className:j(I.root,i),ref:t},k),s.createElement("div",{className:I.steps},W),A&&s.createElement("div",{className:I.content},A))});Js.Step=e4;Js.Completed=Cp;Js.displayName="@mantine/core/Stepper";const n4=f.createContext(null),Nee=n4.Provider,Aee=()=>f.useContext(n4);var Mee=Object.defineProperty,jp=Object.getOwnPropertySymbols,o4=Object.prototype.hasOwnProperty,a4=Object.prototype.propertyIsEnumerable,sP=(e,t,r)=>t in e?Mee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cP=(e,t)=>{for(var r in t||(t={}))o4.call(t,r)&&sP(e,r,t[r]);if(jp)for(var r of jp(t))a4.call(t,r)&&sP(e,r,t[r]);return e},Lee=(e,t)=>{var r={};for(var n in e)o4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&jp)for(var n of jp(e))t.indexOf(n)<0&&a4.call(e,n)&&(r[n]=e[n]);return r};const zee={size:"sm"},i4=f.forwardRef((e,t)=>{const r=G("SwitchGroup",zee,e),{children:n,value:o,defaultValue:a,onChange:i,size:l,wrapperProps:c}=r,u=Lee(r,["children","value","defaultValue","onChange","size","wrapperProps"]),[d,p]=Or({value:o,defaultValue:a,finalValue:[],onChange:i}),h=g=>{const y=g.currentTarget.value;p(d.includes(y)?d.filter(v=>v!==y):[...d,y])};return s.createElement(Nee,{value:{value:d,onChange:h,size:l}},s.createElement(Vt.Wrapper,cP(cP({labelElement:"div",size:l,__staticSelector:"SwitchGroup",ref:t},c),u),n))});i4.displayName="@mantine/core/SwitchGroup";var Fee=Object.defineProperty,Vee=Object.defineProperties,Bee=Object.getOwnPropertyDescriptors,uP=Object.getOwnPropertySymbols,Uee=Object.prototype.hasOwnProperty,Wee=Object.prototype.propertyIsEnumerable,dP=(e,t,r)=>t in e?Fee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Hee=(e,t)=>{for(var r in t||(t={}))Uee.call(t,r)&&dP(e,r,t[r]);if(uP)for(var r of uP(t))Wee.call(t,r)&&dP(e,r,t[r]);return e},qee=(e,t)=>Vee(e,Bee(t));const Gee={xs:P(16),sm:P(20),md:P(24),lg:P(30),xl:P(36)},Qee={xs:P(32),sm:P(38),md:P(46),lg:P(56),xl:P(72)},Kee={xs:P(12),sm:P(14),md:P(18),lg:P(22),xl:P(28)},Yee={xs:P(5),sm:P(6),md:P(7),lg:P(9),xl:P(11)},Xee={xs:P(4),sm:P(5),md:P(6),lg:P(8),xl:P(10)};var Jee=H((e,{radius:t,color:r,labelPosition:n,error:o},{size:a})=>{const i=L({size:a,sizes:Kee}),l=L({size:t,sizes:e.radius}),c=e.fn.variant({variant:"filled",color:r}),u=L({size:a,sizes:Qee}),d=P(a==="xs"?1:2),p=e.fn.variant({variant:"filled",color:"red"}).background;return{root:{position:"relative"},input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:qee(Hee({},e.fn.focusStyles("input:focus + &")),{cursor:e.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:l,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2],border:`${P(1)} solid ${o?p:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,height:L({size:a,sizes:Gee}),minWidth:u,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:L({size:a,sizes:Yee}),fontWeight:600,order:n==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[6],transition:`color 150ms ${e.transitionTimingFunction}`,"input:checked + &":{backgroundColor:c.background,borderColor:c.background,color:e.white,transition:`color 150ms ${e.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],cursor:"not-allowed",pointerEvents:"none"}}),thumb:{position:"absolute",zIndex:1,borderRadius:l,boxSizing:"border-box",display:"flex",backgroundColor:e.white,height:i,width:i,border:`${P(1)} solid ${e.colorScheme==="dark"?e.white:e.colors.gray[3]}`,left:d,transition:`left 150ms ${e.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${i} - ${d})`,borderColor:e.white},"input:disabled + * > &":{borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],backgroundColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${u} - ${i})`,paddingInline:L({size:a,sizes:Xee}),marginLeft:`calc(${i} + ${d})`,transition:`margin 150ms ${e.transitionTimingFunction}`,"input:checked + * > &":{marginLeft:0,marginRight:`calc(${i} + ${d})`}}}});const Zee=Jee;var ete=Object.defineProperty,tte=Object.defineProperties,rte=Object.getOwnPropertyDescriptors,Rp=Object.getOwnPropertySymbols,l4=Object.prototype.hasOwnProperty,s4=Object.prototype.propertyIsEnumerable,fP=(e,t,r)=>t in e?ete(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cg=(e,t)=>{for(var r in t||(t={}))l4.call(t,r)&&fP(e,r,t[r]);if(Rp)for(var r of Rp(t))s4.call(t,r)&&fP(e,r,t[r]);return e},nte=(e,t)=>tte(e,rte(t)),ote=(e,t)=>{var r={};for(var n in e)l4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Rp)for(var n of Rp(e))t.indexOf(n)<0&&s4.call(e,n)&&(r[n]=e[n]);return r};const ate={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},F0=f.forwardRef((e,t)=>{var r;const n=G("Switch",ate,e),{className:o,color:a,label:i,offLabel:l,onLabel:c,id:u,style:d,size:p,radius:h,wrapperProps:g,children:y,unstyled:v,styles:E,classNames:w,thumbIcon:b,sx:_,checked:x,defaultChecked:S,onChange:$,labelPosition:O,description:C,error:T,disabled:k,variant:I}=n,j=ote(n,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),N=Aee(),D=(N==null?void 0:N.size)||p,{classes:z,cx:W}=Zee({color:a,radius:h,labelPosition:O,error:!!T},{name:"Switch",classNames:w,styles:E,unstyled:v,size:D,variant:I}),{systemStyles:K,rest:R}=Zn(j),A=kr(u),V=N?{checked:N.value.includes(R.value),onChange:N.onChange}:{},[Q,ie]=Or({value:(r=V.checked)!=null?r:x,defaultValue:S,finalValue:!1});return s.createElement(Fm,cg(cg({className:W(o,z.root),sx:_,style:d,id:A,size:(N==null?void 0:N.size)||p,labelPosition:O,label:i,description:C,error:T,disabled:k,__staticSelector:"Switch",classNames:w,styles:E,unstyled:v,"data-checked":V.checked||void 0,variant:I},K),g),s.createElement("input",nte(cg({},R),{disabled:k,checked:Q,onChange:Ce=>{N?V.onChange(Ce):$==null||$(Ce),ie(Ce.currentTarget.checked)},id:A,ref:t,type:"checkbox",className:z.input})),s.createElement("label",{htmlFor:A,className:z.track},s.createElement("div",{className:z.thumb},b),s.createElement("div",{className:z.trackLabel},Q?c:l)))});F0.displayName="@mantine/core/Switch";F0.Group=i4;var ite=Object.defineProperty,lte=Object.defineProperties,ste=Object.getOwnPropertyDescriptors,pP=Object.getOwnPropertySymbols,cte=Object.prototype.hasOwnProperty,ute=Object.prototype.propertyIsEnumerable,mP=(e,t,r)=>t in e?ite(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dte=(e,t)=>{for(var r in t||(t={}))cte.call(t,r)&&mP(e,r,t[r]);if(pP)for(var r of pP(t))ute.call(t,r)&&mP(e,r,t[r]);return e},fte=(e,t)=>lte(e,ste(t)),pte=H((e,{captionSide:t,horizontalSpacing:r,verticalSpacing:n,fontSize:o,withBorder:a,withColumnBorders:i})=>{const l=`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:fte(dte({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:a?l:void 0,"& > caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:L({size:o,sizes:e.fontSizes}),padding:`${L({size:n,sizes:e.spacing})} ${L({size:r,sizes:e.spacing})}`},"& > thead > tr > th":{borderBottom:l},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:l},"& > tbody > tr > td":{padding:`${L({size:n,sizes:e.spacing})} ${L({size:r,sizes:e.spacing})}`,borderTop:l,fontSize:L({size:o,sizes:e.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:i?l:"none","&:last-of-type":{borderRight:"none",borderLeft:i?l:"none"}},"& > tbody > tr > th":{borderRight:i?l:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] > tbody > tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const mte=pte;var hte=Object.defineProperty,gte=Object.defineProperties,vte=Object.getOwnPropertyDescriptors,Tp=Object.getOwnPropertySymbols,c4=Object.prototype.hasOwnProperty,u4=Object.prototype.propertyIsEnumerable,hP=(e,t,r)=>t in e?hte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yte=(e,t)=>{for(var r in t||(t={}))c4.call(t,r)&&hP(e,r,t[r]);if(Tp)for(var r of Tp(t))u4.call(t,r)&&hP(e,r,t[r]);return e},wte=(e,t)=>gte(e,vte(t)),bte=(e,t)=>{var r={};for(var n in e)c4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Tp)for(var n of Tp(e))t.indexOf(n)<0&&u4.call(e,n)&&(r[n]=e[n]);return r};const _te={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},ci=f.forwardRef((e,t)=>{const r=G("Table",_te,e),{className:n,children:o,striped:a,highlightOnHover:i,captionSide:l,horizontalSpacing:c,verticalSpacing:u,fontSize:d,unstyled:p,withBorder:h,withColumnBorders:g,variant:y}=r,v=bte(r,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:E,cx:w}=mte({captionSide:l,verticalSpacing:u,horizontalSpacing:c,fontSize:d,withBorder:h,withColumnBorders:g},{unstyled:p,name:"Table",variant:y});return s.createElement(le,wte(yte({},v),{component:"table",ref:t,className:w(E.root,n),"data-striped":a||void 0,"data-hover":i||void 0}),o)});ci.displayName="@mantine/core/Table";const Dv={context:"Tabs component was not found in the tree",value:"Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value"},[xte,V0]=Po(Dv.context);var Ete=Object.defineProperty,gP=Object.getOwnPropertySymbols,Ste=Object.prototype.hasOwnProperty,Pte=Object.prototype.propertyIsEnumerable,vP=(e,t,r)=>t in e?Ete(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$te=(e,t)=>{for(var r in t||(t={}))Ste.call(t,r)&&vP(e,r,t[r]);if(gP)for(var r of gP(t))Pte.call(t,r)&&vP(e,r,t[r]);return e};function Ote({orientation:e,inverted:t,placement:r},n,o){const a=e==="vertical";return o==="default"?{[a?r==="left"?"borderRight":"borderLeft":t?"borderTop":"borderBottom"]:`${P(2)} solid ${n.colorScheme==="dark"?n.colors.dark[4]:n.colors.gray[3]}`}:o==="outline"?{[a?r==="left"?"borderRight":"borderLeft":t?"borderTop":"borderBottom"]:`${P(1)} solid ${n.colorScheme==="dark"?n.colors.dark[4]:n.colors.gray[3]}`}:o==="pills"?{gap:`calc(${n.spacing.sm} / 2)`}:{}}var Cte=H((e,t,{variant:r})=>{const n=t.orientation==="vertical";return{tabsList:$te({display:"flex",flexWrap:"wrap",flexDirection:n?"column":"row",justifyContent:aI[t.position],'& [role="tab"]':{flex:t.grow?1:void 0}},Ote(t,e,r))}});const kte=Cte;var jte=Object.defineProperty,Rte=Object.defineProperties,Tte=Object.getOwnPropertyDescriptors,Ip=Object.getOwnPropertySymbols,d4=Object.prototype.hasOwnProperty,f4=Object.prototype.propertyIsEnumerable,yP=(e,t,r)=>t in e?jte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ite=(e,t)=>{for(var r in t||(t={}))d4.call(t,r)&&yP(e,r,t[r]);if(Ip)for(var r of Ip(t))f4.call(t,r)&&yP(e,r,t[r]);return e},Dte=(e,t)=>Rte(e,Tte(t)),Nte=(e,t)=>{var r={};for(var n in e)d4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ip)for(var n of Ip(e))t.indexOf(n)<0&&f4.call(e,n)&&(r[n]=e[n]);return r};const Ate={grow:!1,position:"left"},p4=f.forwardRef((e,t)=>{const r=G("TabsList",Ate,e),{children:n,className:o,grow:a,position:i}=r,l=Nte(r,["children","className","grow","position"]),{orientation:c,variant:u,color:d,radius:p,inverted:h,placement:g,classNames:y,styles:v,unstyled:E}=V0(),{classes:w,cx:b}=kte({orientation:c,grow:a,color:d,position:i,radius:p,inverted:h,placement:g},{name:"Tabs",unstyled:E,classNames:y,styles:v,variant:u});return s.createElement(le,Dte(Ite({},l),{className:b(w.tabsList,o),ref:t,role:"tablist","aria-orientation":c}),n)});p4.displayName="@mantine/core/TabsList";var Mte=H((e,{orientation:t})=>({panel:{flex:t==="vertical"?1:void 0}}));const Lte=Mte;var zte=Object.defineProperty,Fte=Object.defineProperties,Vte=Object.getOwnPropertyDescriptors,Dp=Object.getOwnPropertySymbols,m4=Object.prototype.hasOwnProperty,h4=Object.prototype.propertyIsEnumerable,wP=(e,t,r)=>t in e?zte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bte=(e,t)=>{for(var r in t||(t={}))m4.call(t,r)&&wP(e,r,t[r]);if(Dp)for(var r of Dp(t))h4.call(t,r)&&wP(e,r,t[r]);return e},Ute=(e,t)=>Fte(e,Vte(t)),Wte=(e,t)=>{var r={};for(var n in e)m4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Dp)for(var n of Dp(e))t.indexOf(n)<0&&h4.call(e,n)&&(r[n]=e[n]);return r};const Hte={},g4=f.forwardRef((e,t)=>{const r=G("TabsPanel",Hte,e),{value:n,children:o,sx:a,className:i}=r,l=Wte(r,["value","children","sx","className"]),c=V0(),{classes:u,cx:d}=Lte({orientation:c.orientation,color:c.color,radius:c.radius,inverted:c.inverted,placement:c.placement},{name:"Tabs",unstyled:c.unstyled,classNames:c.classNames,styles:c.styles,variant:c.variant}),p=c.getPanelId(n),h=c.value===n,g=c.keepMounted||h?o:null;return f.useEffect(()=>(c.setMountedPanelIds(y=>[...y,p]),c.setMountedPanelIds(y=>y.filter(v=>v!==p))),[p]),s.createElement(le,Ute(Bte({},l),{ref:t,sx:[{display:h?void 0:"none"},...nm(a)],className:d(u.panel,i),role:"tabpanel",id:p,"aria-labelledby":c.getTabId(n)}),g)});g4.displayName="@mantine/core/TabsPanel";var qte=Object.defineProperty,Gte=Object.defineProperties,Qte=Object.getOwnPropertyDescriptors,bP=Object.getOwnPropertySymbols,Kte=Object.prototype.hasOwnProperty,Yte=Object.prototype.propertyIsEnumerable,_P=(e,t,r)=>t in e?qte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wi=(e,t)=>{for(var r in t||(t={}))Kte.call(t,r)&&_P(e,r,t[r]);if(bP)for(var r of bP(t))Yte.call(t,r)&&_P(e,r,t[r]);return e},xP=(e,t)=>Gte(e,Qte(t));function Xte(e,{orientation:t,color:r,radius:n,inverted:o,placement:a},i){const l=t==="vertical",c=e.fn.variant({color:r,variant:"filled"}),u=P(e.fn.radius(n)),d=t==="vertical"?a==="left"?`${u} 0 0 ${u}`:` 0 ${u} ${u} 0`:o?`0 0 ${u} ${u}`:`${u} ${u} 0 0`;return i==="default"?xP(Wi({[l?a==="left"?"borderRight":"borderLeft":o?"borderTop":"borderBottom"]:`${P(2)} solid transparent`,[l?a==="left"?"marginRight":"marginLeft":o?"marginTop":"marginBottom"]:P(-2),borderRadius:d},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]})),{"&[data-active]":Wi({borderColor:c.background,color:e.colorScheme==="dark"?e.white:e.black},e.fn.hover({borderColor:c.background}))}):i==="outline"?{borderRadius:d,border:`${P(1)} solid transparent`,[l?a==="left"?"borderRight":"borderLeft":o?"borderTop":"borderBottom"]:"none","&[data-active]":{borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3],"&::before":{content:'""',backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,position:"absolute",bottom:l?0:o?"unset":P(-1),top:l?0:o?P(-1):"unset",[l?"width":"height"]:P(1),right:l?a==="left"?P(-1):"unset":0,left:l?a==="left"?"unset":P(-1):0}}}:i==="pills"?xP(Wi({borderRadius:e.fn.radius(n)},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]})),{"&[data-active]":Wi({backgroundColor:c.background,color:e.white},e.fn.hover({backgroundColor:c.background}))}):{}}var Jte=H((e,t,{variant:r})=>({tabLabel:{},tab:Wi({position:"relative",padding:`${e.spacing.xs} ${e.spacing.md}`,paddingLeft:t.withIcon?e.spacing.xs:void 0,paddingRight:t.withRightSection?e.spacing.xs:void 0,fontSize:e.fontSizes.sm,whiteSpace:"nowrap",zIndex:0,display:"flex",alignItems:"center",justifyContent:t.orientation==="horizontal"?"center":void 0,lineHeight:1,"&:disabled":Wi({opacity:.5,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),"&:focus":{zIndex:1}},Xte(e,t,r)),tabRightSection:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginLeft:P(7)}},tabIcon:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginRight:P(7)}}}));const Zte=Jte;var ere=Object.defineProperty,tre=Object.defineProperties,rre=Object.getOwnPropertyDescriptors,Np=Object.getOwnPropertySymbols,v4=Object.prototype.hasOwnProperty,y4=Object.prototype.propertyIsEnumerable,EP=(e,t,r)=>t in e?ere(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nre=(e,t)=>{for(var r in t||(t={}))v4.call(t,r)&&EP(e,r,t[r]);if(Np)for(var r of Np(t))y4.call(t,r)&&EP(e,r,t[r]);return e},ore=(e,t)=>tre(e,rre(t)),are=(e,t)=>{var r={};for(var n in e)v4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Np)for(var n of Np(e))t.indexOf(n)<0&&y4.call(e,n)&&(r[n]=e[n]);return r};const ire={},w4=f.forwardRef((e,t)=>{const r=G("TabsTab",ire,e),{value:n,children:o,onKeyDown:a,onClick:i,className:l,icon:c,rightSection:u,color:d}=r,p=are(r,["value","children","onKeyDown","onClick","className","icon","rightSection","color"]),h=V0(),g=!!c,y=!!u,{theme:v,classes:E,cx:w}=Zte({withIcon:g||y&&!o,withRightSection:y||g&&!o,orientation:h.orientation,color:d||h.color,radius:h.radius,inverted:h.inverted,placement:h.placement},{name:"Tabs",unstyled:h.unstyled,classNames:h.classNames,styles:h.styles,variant:h.variant}),b=n===h.value,_=h.getPanelId(n),x=h.mountedPanelIds.includes(n)?_:void 0,S=$=>{h.onTabChange(h.allowTabDeactivation&&n===h.value?null:n),i==null||i($)};return s.createElement(ho,ore(nre({},p),{unstyled:h.unstyled,className:w(E.tab,l),"data-active":b||void 0,ref:t,type:"button",role:"tab",id:h.getTabId(n),"aria-selected":b,tabIndex:b||h.value===null?0:-1,"aria-controls":x,onClick:S,onKeyDown:NO({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:h.activateTabWithKeyboard,loop:h.loop,dir:v.dir,orientation:h.orientation,onKeyDown:a})}),c&&s.createElement("span",{className:E.tabIcon},c),o&&s.createElement("span",{className:E.tabLabel},o),u&&s.createElement("span",{className:E.tabRightSection},u))});w4.displayName="@mantine/core/Tab";function b4({defaultValue:e,value:t,onTabChange:r,orientation:n,children:o,loop:a,id:i,activateTabWithKeyboard:l,allowTabDeactivation:c,variant:u,color:d,radius:p,inverted:h,placement:g,keepMounted:y=!0,classNames:v,styles:E,unstyled:w}){const b=kr(i),[_,x]=f.useState([]),[S,$]=Or({value:t,defaultValue:e,finalValue:null,onChange:r});return s.createElement(xte,{value:{placement:g,value:S,orientation:n,id:b,loop:a,activateTabWithKeyboard:l,getTabId:J1(`${b}-tab`,Dv.value),getPanelId:J1(`${b}-panel`,Dv.value),onTabChange:$,setMountedPanelIds:x,mountedPanelIds:_,allowTabDeactivation:c,variant:u,color:d,radius:p,inverted:h,keepMounted:y,classNames:v,styles:E,unstyled:w}},o)}b4.displayName="@mantine/core/TabsProvider";var lre=H((e,{orientation:t,placement:r})=>({root:{display:t==="vertical"?"flex":void 0,flexDirection:r==="right"?"row-reverse":"row"}}));const sre=lre;var cre=Object.defineProperty,ure=Object.defineProperties,dre=Object.getOwnPropertyDescriptors,Ap=Object.getOwnPropertySymbols,_4=Object.prototype.hasOwnProperty,x4=Object.prototype.propertyIsEnumerable,SP=(e,t,r)=>t in e?cre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fre=(e,t)=>{for(var r in t||(t={}))_4.call(t,r)&&SP(e,r,t[r]);if(Ap)for(var r of Ap(t))x4.call(t,r)&&SP(e,r,t[r]);return e},pre=(e,t)=>ure(e,dre(t)),mre=(e,t)=>{var r={};for(var n in e)_4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ap)for(var n of Ap(e))t.indexOf(n)<0&&x4.call(e,n)&&(r[n]=e[n]);return r};const hre={orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,allowTabDeactivation:!1,unstyled:!1,inverted:!1,variant:"default",placement:"left"},Ue=f.forwardRef((e,t)=>{const r=G("Tabs",hre,e),{defaultValue:n,value:o,orientation:a,loop:i,activateTabWithKeyboard:l,allowTabDeactivation:c,children:u,id:d,onTabChange:p,variant:h,color:g,className:y,unstyled:v,classNames:E,styles:w,radius:b,inverted:_,keepMounted:x,placement:S}=r,$=mre(r,["defaultValue","value","orientation","loop","activateTabWithKeyboard","allowTabDeactivation","children","id","onTabChange","variant","color","className","unstyled","classNames","styles","radius","inverted","keepMounted","placement"]),{classes:O,cx:C}=sre({orientation:a,color:g,radius:b,inverted:_,placement:S},{unstyled:v,name:"Tabs",classNames:E,styles:w,variant:h});return s.createElement(b4,{activateTabWithKeyboard:l,defaultValue:n,orientation:a,onTabChange:p,value:o,id:d,loop:i,allowTabDeactivation:c,color:g,variant:h,radius:b,inverted:_,keepMounted:x,placement:S,classNames:E,styles:w,unstyled:v},s.createElement(le,pre(fre({},$),{className:C(O.root,y),id:d,ref:t}),u))});Ue.List=p4;Ue.Tab=w4;Ue.Panel=g4;Ue.displayName="@mantine/core/Tabs";var gre=Object.defineProperty,vre=Object.defineProperties,yre=Object.getOwnPropertyDescriptors,PP=Object.getOwnPropertySymbols,wre=Object.prototype.hasOwnProperty,bre=Object.prototype.propertyIsEnumerable,$P=(e,t,r)=>t in e?gre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_re=(e,t)=>{for(var r in t||(t={}))wre.call(t,r)&&$P(e,r,t[r]);if(PP)for(var r of PP(t))bre.call(t,r)&&$P(e,r,t[r]);return e},xre=(e,t)=>vre(e,yre(t));function Ere(e,t,r){return typeof e<"u"?e in r.headings.sizes?r.headings.sizes[e].fontSize:P(e):r.headings.sizes[t].fontSize}function Sre(e,t,r){return typeof e<"u"&&e in r.headings.sizes?r.headings.sizes[e].lineHeight:r.headings.sizes[t].lineHeight}var Pre=H((e,{element:t,weight:r,inline:n},{size:o})=>({root:xre(_re({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:r||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:Ere(o,t,e),lineHeight:n?1:Sre(o,t,e),margin:0})}));const $re=Pre;var Ore=Object.defineProperty,Mp=Object.getOwnPropertySymbols,E4=Object.prototype.hasOwnProperty,S4=Object.prototype.propertyIsEnumerable,OP=(e,t,r)=>t in e?Ore(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cre=(e,t)=>{for(var r in t||(t={}))E4.call(t,r)&&OP(e,r,t[r]);if(Mp)for(var r of Mp(t))S4.call(t,r)&&OP(e,r,t[r]);return e},kre=(e,t)=>{var r={};for(var n in e)E4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mp)for(var n of Mp(e))t.indexOf(n)<0&&S4.call(e,n)&&(r[n]=e[n]);return r};const jre={order:1},fe=f.forwardRef((e,t)=>{const r=G("Title",jre,e),{className:n,order:o,children:a,unstyled:i,size:l,weight:c,inline:u,variant:d}=r,p=kre(r,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:h,cx:g}=$re({element:`h${o}`,weight:c,inline:u},{name:"Title",unstyled:i,variant:d,size:l});return[1,2,3,4,5,6].includes(o)?s.createElement(oe,Cre({variant:d,component:`h${o}`,ref:t,className:g(h.root,n)},p),a):null});fe.displayName="@mantine/core/Title";function Nv(e,t){return Nv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Nv(e,t)}function P4(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Nv(e,t)}var $4={exports:{}},Rre="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Tre=Rre,Ire=Tre;function O4(){}function C4(){}C4.resetWarningCache=O4;var Dre=function(){function e(n,o,a,i,l,c){if(c!==Ire){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:C4,resetWarningCache:O4};return r.PropTypes=r,r};$4.exports=Dre();var Nre=$4.exports;const $e=ly(Nre),CP={disabled:!1},Lp=s.createContext(null);var ms="unmounted",ja="exited",Ra="entering",ji="entered",Av="exiting",jo=function(e){P4(t,e);function t(n,o){var a;a=e.call(this,n,o)||this;var i=o,l=i&&!i.isMounting?n.enter:n.appear,c;return a.appearStatus=null,n.in?l?(c=ja,a.appearStatus=Ra):c=ji:n.unmountOnExit||n.mountOnEnter?c=ms:c=ja,a.state={status:c},a.nextCallback=null,a}t.getDerivedStateFromProps=function(o,a){var i=o.in;return i&&a.status===ms?{status:ja}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var a=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==Ra&&i!==ji&&(a=Ra):(i===Ra||i===ji)&&(a=Av)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,a,i,l;return a=i=l=o,o!=null&&typeof o!="number"&&(a=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:a,enter:i,appear:l}},r.updateStatus=function(o,a){o===void 0&&(o=!1),a!==null?(this.cancelNextCallback(),a===Ra?this.performEnter(o):this.performExit()):this.props.unmountOnExit&&this.state.status===ja&&this.setState({status:ms})},r.performEnter=function(o){var a=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[Uh.findDOMNode(this),l],u=c[0],d=c[1],p=this.getTimeouts(),h=l?p.appear:p.enter;if(!o&&!i||CP.disabled){this.safeSetState({status:ji},function(){a.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:Ra},function(){a.props.onEntering(u,d),a.onTransitionEnd(h,function(){a.safeSetState({status:ji},function(){a.props.onEntered(u,d)})})})},r.performExit=function(){var o=this,a=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:Uh.findDOMNode(this);if(!a||CP.disabled){this.safeSetState({status:ja},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Av},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:ja},function(){o.props.onExited(l)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,a){a=this.setNextCallback(a),this.setState(o,a)},r.setNextCallback=function(o){var a=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,a.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(o,a){this.setNextCallback(a);var i=this.props.nodeRef?this.props.nodeRef.current:Uh.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===ms)return null;var a=this.props,i=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var l=A0(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return s.createElement(Lp.Provider,{value:null},typeof i=="function"?i(o,l):s.cloneElement(s.Children.only(i),l))},t}(s.Component);jo.contextType=Lp;jo.propTypes={};function Pi(){}jo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Pi,onEntering:Pi,onEntered:Pi,onExit:Pi,onExiting:Pi,onExited:Pi};jo.UNMOUNTED=ms;jo.EXITED=ja;jo.ENTERING=Ra;jo.ENTERED=ji;jo.EXITING=Av;const Are=jo;function Mre(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B0(e,t){var r=function(a){return t&&f.isValidElement(a)?t(a):a},n=Object.create(null);return e&&f.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function Lre(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var n=Object.create(null),o=[];for(var a in e)a in t?o.length&&(n[a]=o,o=[]):o.push(a);var i,l={};for(var c in t){if(n[c])for(i=0;i<n[c].length;i++){var u=n[c][i];l[n[c][i]]=r(u)}l[c]=r(c)}for(i=0;i<o.length;i++)l[o[i]]=r(o[i]);return l}function Ma(e,t,r){return r[t]!=null?r[t]:e.props[t]}function zre(e,t){return B0(e.children,function(r){return f.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:Ma(r,"appear",e),enter:Ma(r,"enter",e),exit:Ma(r,"exit",e)})})}function Fre(e,t,r){var n=B0(e.children),o=Lre(t,n);return Object.keys(o).forEach(function(a){var i=o[a];if(f.isValidElement(i)){var l=a in t,c=a in n,u=t[a],d=f.isValidElement(u)&&!u.props.in;c&&(!l||d)?o[a]=f.cloneElement(i,{onExited:r.bind(null,i),in:!0,exit:Ma(i,"exit",e),enter:Ma(i,"enter",e)}):!c&&l&&!d?o[a]=f.cloneElement(i,{in:!1}):c&&l&&f.isValidElement(u)&&(o[a]=f.cloneElement(i,{onExited:r.bind(null,i),in:u.props.in,exit:Ma(i,"exit",e),enter:Ma(i,"enter",e)}))}}),o}var Vre=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Bre={component:"div",childFactory:function(t){return t}},U0=function(e){P4(t,e);function t(n,o){var a;a=e.call(this,n,o)||this;var i=a.handleExited.bind(Mre(a));return a.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},a}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,a){var i=a.children,l=a.handleExited,c=a.firstRender;return{children:c?zre(o,l):Fre(o,i,l),firstRender:!1}},r.handleExited=function(o,a){var i=B0(this.props.children);o.key in i||(o.props.onExited&&o.props.onExited(a),this.mounted&&this.setState(function(l){var c=et({},l.children);return delete c[o.key],{children:c}}))},r.render=function(){var o=this.props,a=o.component,i=o.childFactory,l=A0(o,["component","childFactory"]),c=this.state.contextValue,u=Vre(this.state.children).map(i);return delete l.appear,delete l.enter,delete l.exit,a===null?s.createElement(Lp.Provider,{value:c},u):s.createElement(Lp.Provider,{value:c},s.createElement(a,l,u))},t}(s.Component);U0.propTypes={};U0.defaultProps=Bre;const Ure=U0,[Wre,_c]=yA("mantine-notifications"),de=_c("show"),Hre=_c("hide"),qre=_c("clean"),Gre=_c("cleanQueue"),hs=_c("update"),mo={show:de,hide:Hre,clean:qre,cleanQueue:Gre,update:hs};function Qre([e,t],r){const n={};return e==="top"&&(n.top=r),e==="bottom"&&(n.bottom=r),t==="left"&&(n.left=r),t==="right"&&(n.right=r),t==="center"&&(n.left="50%",n.transform="translateX(-50%)"),n}var Kre=Object.defineProperty,kP=Object.getOwnPropertySymbols,Yre=Object.prototype.hasOwnProperty,Xre=Object.prototype.propertyIsEnumerable,jP=(e,t,r)=>t in e?Kre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,RP=(e,t)=>{for(var r in t||(t={}))Yre.call(t,r)&&jP(e,r,t[r]);if(kP)for(var r of kP(t))Xre.call(t,r)&&jP(e,r,t[r]);return e};const TP={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Jre={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function Zre({state:e,maxHeight:t,positioning:r,transitionDuration:n}){const[o,a]=r,i=a==="center"?`${o}-center`:a,l={opacity:0,maxHeight:t,transform:TP[i],transitionDuration:`${n}ms, ${n}ms, ${n}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:Jre[i]},u={opacity:0,maxHeight:0,transform:TP[i]},d={entering:c,entered:c,exiting:u,exited:u};return RP(RP({},l),d[e])}function ene(e,t){return typeof t=="number"?t:t===!1||e===!1?!1:e}var tne=Object.defineProperty,rne=Object.defineProperties,nne=Object.getOwnPropertyDescriptors,zp=Object.getOwnPropertySymbols,k4=Object.prototype.hasOwnProperty,j4=Object.prototype.propertyIsEnumerable,IP=(e,t,r)=>t in e?tne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,DP=(e,t)=>{for(var r in t||(t={}))k4.call(t,r)&&IP(e,r,t[r]);if(zp)for(var r of zp(t))j4.call(t,r)&&IP(e,r,t[r]);return e},one=(e,t)=>rne(e,nne(t)),NP=(e,t)=>{var r={};for(var n in e)k4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zp)for(var n of zp(e))t.indexOf(n)<0&&j4.call(e,n)&&(r[n]=e[n]);return r};function R4(e){var t=e,{notification:r,autoClose:n,onHide:o,innerRef:a}=t,i=NP(t,["notification","autoClose","onHide","innerRef"]);const l=r,{autoClose:c,message:u}=l,d=NP(l,["autoClose","message"]),p=ene(n,c),h=f.useRef(),g=()=>{o(r.id),window.clearTimeout(h.current)},y=()=>{clearTimeout(h.current)},v=()=>{typeof p=="number"&&(h.current=window.setTimeout(g,p))};return f.useEffect(()=>{typeof r.onOpen=="function"&&r.onOpen(r)},[]),f.useEffect(()=>(v(),y),[n,r.autoClose]),s.createElement(c5,one(DP(DP({},d),i),{onClose:g,onMouseEnter:y,onMouseLeave:v,ref:a}),u)}R4.displayName="@mantine/notifications/NotificationContainer";var ane=H((e,{zIndex:t})=>({notifications:{width:`calc(100% - ${e.spacing.md} * 2)`,boxSizing:"border-box",position:"fixed",zIndex:t},notification:{"&:not(:first-of-type)":{marginTop:e.spacing.sm}}}));const ine=ane;var lne=Object.defineProperty,sne=Object.defineProperties,cne=Object.getOwnPropertyDescriptors,AP=Object.getOwnPropertySymbols,une=Object.prototype.hasOwnProperty,dne=Object.prototype.propertyIsEnumerable,MP=(e,t,r)=>t in e?lne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fne=(e,t)=>{for(var r in t||(t={}))une.call(t,r)&&MP(e,r,t[r]);if(AP)for(var r of AP(t))dne.call(t,r)&&MP(e,r,t[r]);return e},pne=(e,t)=>sne(e,cne(t));function mne({limit:e}){const{state:t,queue:r,update:n,cleanQueue:o}=ZM({initialValues:[],limit:e});return{notifications:t,queue:r,showNotification:u=>{const d=u.id||vm();return n(p=>u.id&&p.some(h=>h.id===u.id)?p:[...p,pne(fne({},u),{id:d})]),d},updateNotification:u=>n(d=>{const p=d.findIndex(g=>g.id===u.id);if(p===-1)return d;const h=[...d];return h[p]=u,h}),hideNotification:u=>n(d=>d.filter(p=>p.id===u?(typeof p.onClose=="function"&&p.onClose(p),!1):!0)),cleanQueue:o,clean:()=>n(()=>[])}}var hne=Object.defineProperty,Fp=Object.getOwnPropertySymbols,T4=Object.prototype.hasOwnProperty,I4=Object.prototype.propertyIsEnumerable,LP=(e,t,r)=>t in e?hne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ug=(e,t)=>{for(var r in t||(t={}))T4.call(t,r)&&LP(e,r,t[r]);if(Fp)for(var r of Fp(t))I4.call(t,r)&&LP(e,r,t[r]);return e},gne=(e,t)=>{var r={};for(var n in e)T4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Fp)for(var n of Fp(e))t.indexOf(n)<0&&I4.call(e,n)&&(r[n]=e[n]);return r};const vne=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"],ui=e=>{var t=e,{className:r,position:n="bottom-right",autoClose:o=4e3,transitionDuration:a=250,containerWidth:i=P(440),notificationMaxHeight:l=P(200),limit:c=5,zIndex:u=Rn("overlay"),style:d,children:p,target:h}=t,g=gne(t,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children","target"]);const y=QM(),v=f.useRef({}),E=f.useRef(0),{notifications:w,showNotification:b,updateNotification:_,hideNotification:x,clean:S,cleanQueue:$}=mne({limit:c}),{classes:O,cx:C,theme:T}=ine({zIndex:u}),k=ym(),j=(T.respectReducedMotion?k:!1)?1:a,N=(vne.includes(n)?n:"bottom-right").split("-");nn(()=>{w.length>E.current&&setTimeout(()=>y(),0),E.current=w.length},[w]),Wre({show:b,hide:x,update:_,clean:S,cleanQueue:$});const D=w.map(z=>s.createElement(Are,{key:z.id,timeout:j,onEnter:()=>v.current[z.id].offsetHeight,nodeRef:{current:v.current[z.id]}},W=>s.createElement(R4,{innerRef:K=>{v.current[z.id]=K},notification:z,onHide:x,className:O.notification,autoClose:o,sx:[ug({},Zre({state:W,positioning:N,transitionDuration:j,maxHeight:l})),...Array.isArray(z.sx)?z.sx:[z.sx]]})));return s.createElement(f0,{target:h},s.createElement(le,ug({className:C(O.notifications,r),style:d,sx:ug({maxWidth:i},Qre(N,T.spacing.md))},g),s.createElement(Ure,null,D)))};ui.displayName="@mantine/notifications/Notifications";ui.show=mo.show;ui.hide=mo.hide;ui.update=mo.update;ui.clean=mo.clean;ui.cleanQueue=mo.cleanQueue;var yne=class{constructor(e,t){this.operator=e,this.child=t}toString(){return`${this.operator}(${this.child.toString()})`}},xc=class{constructor(t,r,n){this.operator=t,this.left=r,this.right=n}toString(){return`${this.left.toString()} ${this.operator} ${this.right.toString()}`}},wne=class{constructor(){this.prefixParselets={},this.infixParselets={}}registerInfix(t,r){return this.infixParselets[t]=r,this}registerPrefix(t,r){return this.prefixParselets[t]=r,this}prefix(t,r,n){return this.registerPrefix(t,{parse(o,a){let i=o.consumeAndParse(r);return n(a,i)}})}infixLeft(t,r,n){return this.registerInfix(t,{parse(o,a,i){let l=o.consumeAndParse(r);return n(a,i,l)},precedence:r})}construct(t){return new bne(t,this.prefixParselets,this.infixParselets)}},bne=class{constructor(t,r,n){this.tokens=t,this.prefixParselets=r,this.infixParselets=n}hasMore(){return this.tokens.length>0}match(t){var r;return((r=this.peek())==null?void 0:r.id)!==t?!1:(this.consume(),!0)}consumeAndParse(t=1/0){let r=this.consume(),n=this.prefixParselets[r.id];if(!n)throw Error(`Parse error at "${r.value}" (line ${r.line}, column ${r.column}). No matching prefix parselet.`);let o=n.parse(this,r);for(;t>this.getPrecedence();){let a=this.consume();o=this.getInfixParselet(a).parse(this,o,a)}return o}getPrecedence(){let t=this.peek();if(!t)return 1/0;let r=this.getInfixParselet(t);return r?r.precedence:1/0}consume(t,r){var n,o;if(!this.tokens.length)throw Error("Cant consume unknown more tokens.");if(t&&((n=this.peek())==null?void 0:n.id)!==t){let a=this.peek();throw Error(`Expected ${t} but got "${a.id}" at line ${a.line} column ${a.column}.`)}if(r&&((o=this.peek())==null?void 0:o.value)!==r){let a=this.peek();throw Error(`Expected "${r}" but got "${a.value}" at line ${a.line} column ${a.column}.`)}return this.tokens.shift()}peek(){return this.tokens.length>0?this.tokens[0]:void 0}removeComments(){this.tokens=this.tokens.filter(t=>t.id!=="Comment")}getInfixParselet(t){return this.infixParselets[t.id==="Symbol"?t.value:t.id]}};function ut(e){let t=Je(e),r=xo(e);return r===t?{reference:t}:{reference:t,display:r}}function Je(e){return pi(e)?e.reference:`${e.resourceType}/${e.id}`}function W0(e){if(e)return pi(e)?e.reference.split("/")[1]:e.id}function _ne(e){return e.resourceType==="Patient"||e.resourceType==="Practitioner"||e.resourceType==="RelatedPerson"}function xo(e){var t;if(_ne(e)){let r=xne(e);if(r)return r}if(e.resourceType==="Device"){let r=Ene(e);if(r)return r}return e.resourceType==="Observation"&&"code"in e&&((t=e.code)!=null&&t.text)?e.code.text:e.resourceType==="User"&&e.email?e.email:"name"in e&&e.name&&typeof e.name=="string"?e.name:Je(e)}function xne(e){let t=e.name;if(t&&t.length>0)return Ec(t[0])}function Ene(e){let t=e.deviceName;if(t&&t.length>0)return t[0].name}function Sne(e){if(!("photo"in e))return;let t=e.photo;if(t)if(Array.isArray(t))for(let r of t){let n=zP(r);if(n)return n}else return zP(t)}function zP(e){if(e.url&&e.contentType&&e.contentType.startsWith("image/"))return e.url}function D4(e,t){let r=new Date(e);r.setUTCHours(0,0,0,0);let n=t?new Date(t):new Date;n.setUTCHours(0,0,0,0);let o=r.getUTCFullYear(),a=r.getUTCMonth(),i=r.getUTCDate(),l=n.getUTCFullYear(),c=n.getUTCMonth(),u=n.getUTCDate(),d=l-o;(c<a||c===a&&u<i)&&d--;let p=l*12+c-(o*12+a);u<i&&p--;let h=Math.floor((n.getTime()-r.getTime())/(1e3*60*60*24));return{years:d,months:p,days:h}}function Pne(e,t){let{years:r,months:n,days:o}=D4(e,t);return r>=2?r.toString().padStart(3,"0")+"Y":n>=1?n.toString().padStart(3,"0")+"M":o.toString().padStart(3,"0")+"D"}function H0(e,...t){var n;let r=e;for(let o=0;o<t.length&&r;o++)r=(n=r==null?void 0:r.extension)==null?void 0:n.find(a=>a.url===t[o]);return r}function dr(e,t){return JSON.stringify(e,$ne,t?2:void 0)}function $ne(e,t){return!One(e)&&Ko(t)?void 0:t}function One(e){return!!/\d+$/.exec(e)}function Ko(e){if(e==null)return!0;let t=typeof e;return t==="string"&&e===""||t==="object"&&Object.keys(e).length===0}function qm(e,t,r){return e===t||Ko(e)&&Ko(t)?!0:Ko(e)||Ko(t)?!1:Array.isArray(e)&&Array.isArray(t)?Cne(e,t):Array.isArray(e)||Array.isArray(t)?!1:FP(e)&&FP(t)?kne(e,t,r):!1}function Cne(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!qm(e[r],t[r]))return!1;return!0}function kne(e,t,r){let n=new Set;Object.keys(e).forEach(o=>n.add(o)),Object.keys(t).forEach(o=>n.add(o)),r==="meta"&&(n.delete("versionId"),n.delete("lastUpdated"),n.delete("author"));for(let o of n){let a=e[o],i=t[o];if(!qm(a,i,o))return!1}return!0}function di(e){return JSON.parse(JSON.stringify(e))}function N4(e){return!!/^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$/i.exec(e)}function FP(e){return e!==null&&typeof e=="object"}var A4=[];for(let e=0;e<256;e++)A4.push(e.toString(16).padStart(2,"0"));function jne(e){let t=new Uint8Array(e),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=A4[t[n]];return r.join("")}function Rne(e){let t=new Uint8Array(e),r=[];for(let n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return window.btoa(r.join(""))}function fr(e){return e.charAt(0).toUpperCase()+e.substring(1)}function Tne(e,t){var r,n;return(n=(r=e.coding)==null?void 0:r.find(o=>o.system===t))==null?void 0:n.code}var VP=e=>new Promise(t=>{setTimeout(t,e)});function Ine(e,t){let r=[];if(e.line&&r.push(...e.line),e.city||e.state||e.postalCode){let n=[];e.city&&n.push(e.city),e.state&&n.push(e.state),e.postalCode&&n.push(e.postalCode),r.push(n.join(", "))}return e.use&&(t!=null&&t.all||t!=null&&t.use)&&r.push("["+e.use+"]"),r.join((t==null?void 0:t.lineSeparator)??", ").trim()}function Ec(e,t){let r=[];return e.prefix&&(t==null?void 0:t.prefix)!==!1&&r.push(...e.prefix),e.given&&r.push(...e.given),e.family&&r.push(e.family),e.suffix&&(t==null?void 0:t.suffix)!==!1&&r.push(...e.suffix),e.use&&(t!=null&&t.all||t!=null&&t.use)&&r.push("["+e.use+"]"),r.length===0&&e.text?e.text:r.join(" ").trim()}function Gm(e){return e instanceof Date&&!isNaN(e.getTime())}function Dne(e,t,r){if(!e)return"";let n=new Date("2000-01-01T"+e+"Z");return Gm(n)?n.toLocaleTimeString(t,r):""}function Cr(e,t,r){if(!e)return"";let n=new Date(e);return Gm(n)?n.toLocaleString(t,r):""}function Nne(e,t,r){return!e||!e.start&&!e.end?"":Cr(e.start,t,r)+" - "+Cr(e.end,t,r)}var Ane={s:"every second",min:"every minute",h:"hourly",d:"daily",wk:"weekly",mo:"monthly",a:"annually"},Mne={s:"second",min:"minute",h:"hour",d:"day",wk:"week",mo:"month",a:"year"},Lne={s:"seconds",min:"minutes",h:"hours",d:"days",wk:"weeks",mo:"months",a:"years"};function M4(e){if(!e)return"";let t=[];return zne(t,e.repeat),e.event&&t.push(e.event.map(r=>Cr(r)).join(", ")),fr(t.join(" ").trim())}function zne(e,t){if(!(t!=null&&t.periodUnit))return;let r=t.frequency??1,n=t.period??1,o=t.periodUnit;r===1&&n===1?e.push(Ane[o]):(r===1?e.push("once"):e.push(r+" times"),n===1?e.push("per "+Mne[o]):e.push("per "+n+" "+Lne[o])),t.dayOfWeek&&e.push("on "+t.dayOfWeek.map(fr).join(", ")),t.timeOfDay&&e.push("at "+t.timeOfDay.map(a=>Dne(a)).join(", "))}function Zs(e,t,r=!1){if(r&&t===void 0)throw new Error("Precision must be specified for exclusive ranges");let n=(e==null?void 0:e.low)&&{...e.low,comparator:void 0},o=(e==null?void 0:e.high)&&{...e.high,comparator:void 0};return(n==null?void 0:n.value)===void 0&&(o==null?void 0:o.value)===void 0?"":(n==null?void 0:n.value)!==void 0&&(o==null?void 0:o.value)===void 0?r&&t!==void 0?(n.value=Bne(n.value,t),`> ${Bo(n,t)}`):`>= ${Bo(n,t)}`:(n==null?void 0:n.value)===void 0&&(o==null?void 0:o.value)!==void 0?r&&t!==void 0?(o.value=Vne(o.value,t),`< ${Bo(o,t)}`):`<= ${Bo(o,t)}`:((n==null?void 0:n.unit)===(o==null?void 0:o.unit)&&(n==null||delete n.unit),`${Bo(n,t)} - ${Bo(o,t)}`)}function Bo(e,t){if(!e)return"";let r=[];return e.comparator&&(r.push(e.comparator),r.push(" ")),e.value!==void 0&&(t!==void 0?r.push(e.value.toFixed(t)):r.push(e.value)),e.unit&&(e.unit!=="%"&&r[r.length-1]!==" "&&r.push(" "),r.push(e.unit)),r.join("").trim()}function Fne(e){return(e==null?void 0:e.value)===void 0?"":e.value.toLocaleString(void 0,{style:"currency",currency:e.currency??"USD",currencyDisplay:"narrowSymbol"})}function q0(e){return e?e.text?e.text:e.coding?e.coding.map(t=>Tl(t)).join(", "):"":""}function Tl(e){return(e==null?void 0:e.display)??(e==null?void 0:e.code)??""}function L4(e){return e?"component"in e?e.component.map(t=>L4(t)).join(" / "):e.valueQuantity?Bo(e.valueQuantity):e.valueCodeableConcept?q0(e.valueCodeableConcept):e.valueString?e.valueString:"":""}function Vne(e,t,r=1){return(z4(e,t)+r)*Math.pow(10,-t)}function Bne(e,t,r=1){return(z4(e,t)-r)*Math.pow(10,-t)}function z4(e,t){return t===void 0?e:Math.round(e*Math.pow(10,t))}function Une(e){let t=e.max&&e.max===Number.MAX_SAFE_INTEGER?Number.POSITIVE_INFINITY:e.max;return{path:"",description:"",type:e.type??[],min:e.min??0,max:t??1,isArray:!!t&&t>1,constraints:[]}}function Wne(e){let t=Object.create(null);for(let[r,n]of Object.entries(e))t[r]={name:r,elements:Object.fromEntries(Object.entries(n.elements).map(([o,a])=>[o,Une(a)])),constraints:[],innerTypes:[]};return t}var Hne={Element:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]}}},BackboneElement:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},modifierExtension:{max:9007199254740991,type:[{code:"Extension"}]}}},Address:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},use:{type:[{code:"code"}]},type:{type:[{code:"code"}]},text:{type:[{code:"string"}]},line:{max:9007199254740991,type:[{code:"string"}]},city:{type:[{code:"string"}]},district:{type:[{code:"string"}]},state:{type:[{code:"string"}]},postalCode:{type:[{code:"string"}]},country:{type:[{code:"string"}]},period:{type:[{code:"Period"}]}}},Age:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},Annotation:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},"author[x]":{type:[{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/Organization"]},{code:"string"}]},time:{type:[{code:"dateTime"}]},text:{min:1,type:[{code:"markdown"}]}}},Attachment:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},contentType:{type:[{code:"code"}]},language:{type:[{code:"code"}]},data:{type:[{code:"base64Binary"}]},url:{type:[{code:"url"}]},size:{type:[{code:"unsignedInt"}]},hash:{type:[{code:"base64Binary"}]},title:{type:[{code:"string"}]},creation:{type:[{code:"dateTime"}]}}},CodeableConcept:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},coding:{max:9007199254740991,type:[{code:"Coding"}]},text:{type:[{code:"string"}]}}},Coding:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},system:{type:[{code:"uri"}]},version:{type:[{code:"string"}]},code:{type:[{code:"code"}]},display:{type:[{code:"string"}]},userSelected:{type:[{code:"boolean"}]}}},ContactDetail:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},name:{type:[{code:"string"}]},telecom:{max:9007199254740991,type:[{code:"ContactPoint"}]}}},ContactPoint:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},system:{type:[{code:"code"}]},value:{type:[{code:"string"}]},use:{type:[{code:"code"}]},rank:{type:[{code:"positiveInt"}]},period:{type:[{code:"Period"}]}}},Contributor:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},type:{min:1,type:[{code:"code"}]},name:{min:1,type:[{code:"string"}]},contact:{max:9007199254740991,type:[{code:"ContactDetail"}]}}},Count:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},DataRequirement:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},type:{min:1,type:[{code:"code"}]},profile:{max:9007199254740991,type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/StructureDefinition"]}]},"subject[x]":{type:[{code:"CodeableConcept"},{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Group"]}]},mustSupport:{max:9007199254740991,type:[{code:"string"}]},codeFilter:{max:9007199254740991,type:[{code:"DataRequirementCodeFilter"}]},dateFilter:{max:9007199254740991,type:[{code:"DataRequirementDateFilter"}]},limit:{type:[{code:"positiveInt"}]},sort:{max:9007199254740991,type:[{code:"DataRequirementSort"}]}}},Distance:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},Dosage:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},modifierExtension:{max:9007199254740991,type:[{code:"Extension"}]},sequence:{type:[{code:"integer"}]},text:{type:[{code:"string"}]},additionalInstruction:{max:9007199254740991,type:[{code:"CodeableConcept"}]},patientInstruction:{type:[{code:"string"}]},timing:{type:[{code:"Timing"}]},"asNeeded[x]":{type:[{code:"boolean"},{code:"CodeableConcept"}]},site:{type:[{code:"CodeableConcept"}]},route:{type:[{code:"CodeableConcept"}]},method:{type:[{code:"CodeableConcept"}]},doseAndRate:{max:9007199254740991,type:[{code:"DosageDoseAndRate"}]},maxDosePerPeriod:{type:[{code:"Ratio"}]},maxDosePerAdministration:{type:[{code:"Quantity"}]},maxDosePerLifetime:{type:[{code:"Quantity"}]}}},Duration:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},ElementDefinition:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},modifierExtension:{max:9007199254740991,type:[{code:"Extension"}]},path:{min:1,type:[{code:"string"}]},representation:{max:9007199254740991,type:[{code:"code"}]},sliceName:{type:[{code:"string"}]},sliceIsConstraining:{type:[{code:"boolean"}]},label:{type:[{code:"string"}]},code:{max:9007199254740991,type:[{code:"Coding"}]},slicing:{type:[{code:"ElementDefinitionSlicing"}]},short:{type:[{code:"string"}]},definition:{type:[{code:"markdown"}]},comment:{type:[{code:"markdown"}]},requirements:{type:[{code:"markdown"}]},alias:{max:9007199254740991,type:[{code:"string"}]},min:{type:[{code:"unsignedInt"}]},max:{type:[{code:"string"}]},base:{type:[{code:"ElementDefinitionBase"}]},contentReference:{type:[{code:"uri"}]},type:{max:9007199254740991,type:[{code:"ElementDefinitionType"}]},"defaultValue[x]":{type:[{code:"base64Binary"},{code:"boolean"},{code:"canonical"},{code:"code"},{code:"date"},{code:"dateTime"},{code:"decimal"},{code:"id"},{code:"instant"},{code:"integer"},{code:"markdown"},{code:"oid"},{code:"positiveInt"},{code:"string"},{code:"time"},{code:"unsignedInt"},{code:"uri"},{code:"url"},{code:"uuid"},{code:"Address"},{code:"Age"},{code:"Annotation"},{code:"Attachment"},{code:"CodeableConcept"},{code:"Coding"},{code:"ContactPoint"},{code:"Count"},{code:"Distance"},{code:"Duration"},{code:"HumanName"},{code:"Identifier"},{code:"Money"},{code:"Period"},{code:"Quantity"},{code:"Range"},{code:"Ratio"},{code:"Reference"},{code:"SampledData"},{code:"Signature"},{code:"Timing"},{code:"ContactDetail"},{code:"Contributor"},{code:"DataRequirement"},{code:"Expression"},{code:"ParameterDefinition"},{code:"RelatedArtifact"},{code:"TriggerDefinition"},{code:"UsageContext"},{code:"Dosage"},{code:"Meta"}]},meaningWhenMissing:{type:[{code:"markdown"}]},orderMeaning:{type:[{code:"string"}]},"fixed[x]":{type:[{code:"base64Binary"},{code:"boolean"},{code:"canonical"},{code:"code"},{code:"date"},{code:"dateTime"},{code:"decimal"},{code:"id"},{code:"instant"},{code:"integer"},{code:"markdown"},{code:"oid"},{code:"positiveInt"},{code:"string"},{code:"time"},{code:"unsignedInt"},{code:"uri"},{code:"url"},{code:"uuid"},{code:"Address"},{code:"Age"},{code:"Annotation"},{code:"Attachment"},{code:"CodeableConcept"},{code:"Coding"},{code:"ContactPoint"},{code:"Count"},{code:"Distance"},{code:"Duration"},{code:"HumanName"},{code:"Identifier"},{code:"Money"},{code:"Period"},{code:"Quantity"},{code:"Range"},{code:"Ratio"},{code:"Reference"},{code:"SampledData"},{code:"Signature"},{code:"Timing"},{code:"ContactDetail"},{code:"Contributor"},{code:"DataRequirement"},{code:"Expression"},{code:"ParameterDefinition"},{code:"RelatedArtifact"},{code:"TriggerDefinition"},{code:"UsageContext"},{code:"Dosage"},{code:"Meta"}]},"pattern[x]":{type:[{code:"base64Binary"},{code:"boolean"},{code:"canonical"},{code:"code"},{code:"date"},{code:"dateTime"},{code:"decimal"},{code:"id"},{code:"instant"},{code:"integer"},{code:"markdown"},{code:"oid"},{code:"positiveInt"},{code:"string"},{code:"time"},{code:"unsignedInt"},{code:"uri"},{code:"url"},{code:"uuid"},{code:"Address"},{code:"Age"},{code:"Annotation"},{code:"Attachment"},{code:"CodeableConcept"},{code:"Coding"},{code:"ContactPoint"},{code:"Count"},{code:"Distance"},{code:"Duration"},{code:"HumanName"},{code:"Identifier"},{code:"Money"},{code:"Period"},{code:"Quantity"},{code:"Range"},{code:"Ratio"},{code:"Reference"},{code:"SampledData"},{code:"Signature"},{code:"Timing"},{code:"ContactDetail"},{code:"Contributor"},{code:"DataRequirement"},{code:"Expression"},{code:"ParameterDefinition"},{code:"RelatedArtifact"},{code:"TriggerDefinition"},{code:"UsageContext"},{code:"Dosage"},{code:"Meta"}]},example:{max:9007199254740991,type:[{code:"ElementDefinitionExample"}]},"minValue[x]":{type:[{code:"date"},{code:"dateTime"},{code:"instant"},{code:"time"},{code:"decimal"},{code:"integer"},{code:"positiveInt"},{code:"unsignedInt"},{code:"Quantity"}]},"maxValue[x]":{type:[{code:"date"},{code:"dateTime"},{code:"instant"},{code:"time"},{code:"decimal"},{code:"integer"},{code:"positiveInt"},{code:"unsignedInt"},{code:"Quantity"}]},maxLength:{type:[{code:"integer"}]},condition:{max:9007199254740991,type:[{code:"id"}]},constraint:{max:9007199254740991,type:[{code:"ElementDefinitionConstraint"}]},mustSupport:{type:[{code:"boolean"}]},isModifier:{type:[{code:"boolean"}]},isModifierReason:{type:[{code:"string"}]},isSummary:{type:[{code:"boolean"}]},binding:{type:[{code:"ElementDefinitionBinding"}]},mapping:{max:9007199254740991,type:[{code:"ElementDefinitionMapping"}]}}},Expression:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},description:{type:[{code:"string"}]},name:{type:[{code:"id"}]},language:{min:1,type:[{code:"code"}]},expression:{type:[{code:"string"}]},reference:{type:[{code:"uri"}]}}},Extension:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},url:{min:1,type:[{code:"string"}]},"value[x]":{type:[{code:"base64Binary"},{code:"boolean"},{code:"canonical"},{code:"code"},{code:"date"},{code:"dateTime"},{code:"decimal"},{code:"id"},{code:"instant"},{code:"integer"},{code:"markdown"},{code:"oid"},{code:"positiveInt"},{code:"string"},{code:"time"},{code:"unsignedInt"},{code:"uri"},{code:"url"},{code:"uuid"},{code:"Address"},{code:"Age"},{code:"Annotation"},{code:"Attachment"},{code:"CodeableConcept"},{code:"Coding"},{code:"ContactPoint"},{code:"Count"},{code:"Distance"},{code:"Duration"},{code:"HumanName"},{code:"Identifier"},{code:"Money"},{code:"Period"},{code:"Quantity"},{code:"Range"},{code:"Ratio"},{code:"Reference"},{code:"SampledData"},{code:"Signature"},{code:"Timing"},{code:"ContactDetail"},{code:"Contributor"},{code:"DataRequirement"},{code:"Expression"},{code:"ParameterDefinition"},{code:"RelatedArtifact"},{code:"TriggerDefinition"},{code:"UsageContext"},{code:"Dosage"},{code:"Meta"}]}}},HumanName:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},use:{type:[{code:"code"}]},text:{type:[{code:"string"}]},family:{type:[{code:"string"}]},given:{max:9007199254740991,type:[{code:"string"}]},prefix:{max:9007199254740991,type:[{code:"string"}]},suffix:{max:9007199254740991,type:[{code:"string"}]},period:{type:[{code:"Period"}]}}},Identifier:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},use:{type:[{code:"code"}]},type:{type:[{code:"CodeableConcept"}]},system:{type:[{code:"uri"}]},value:{type:[{code:"string"}]},period:{type:[{code:"Period"}]},assigner:{type:[{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Organization"]}]}}},MarketingStatus:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},modifierExtension:{max:9007199254740991,type:[{code:"Extension"}]},country:{min:1,type:[{code:"CodeableConcept"}]},jurisdiction:{type:[{code:"CodeableConcept"}]},status:{min:1,type:[{code:"CodeableConcept"}]},dateRange:{min:1,type:[{code:"Period"}]},restoreDate:{type:[{code:"dateTime"}]}}},Meta:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},versionId:{type:[{code:"id"}]},lastUpdated:{type:[{code:"instant"}]},source:{type:[{code:"uri"}]},profile:{max:9007199254740991,type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/StructureDefinition"]}]},security:{max:9007199254740991,type:[{code:"Coding"}]},tag:{max:9007199254740991,type:[{code:"Coding"}]},project:{type:[{code:"uri"}]},author:{type:[{code:"Reference"}]},account:{type:[{code:"Reference"}]},compartment:{max:9007199254740991,type:[{code:"Reference"}]}}},Money:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},currency:{type:[{code:"code"}]}}},Narrative:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},status:{min:1,type:[{code:"code"}]},div:{min:1,type:[{code:"xhtml"}]}}},ParameterDefinition:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},name:{type:[{code:"code"}]},use:{min:1,type:[{code:"code"}]},min:{type:[{code:"integer"}]},max:{type:[{code:"string"}]},documentation:{type:[{code:"string"}]},type:{min:1,type:[{code:"code"}]},profile:{type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/StructureDefinition"]}]}}},Period:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},start:{type:[{code:"dateTime"}]},end:{type:[{code:"dateTime"}]}}},Population:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},modifierExtension:{max:9007199254740991,type:[{code:"Extension"}]},"age[x]":{type:[{code:"Range"},{code:"CodeableConcept"}]},gender:{type:[{code:"CodeableConcept"}]},race:{type:[{code:"CodeableConcept"}]},physiologicalCondition:{type:[{code:"CodeableConcept"}]}}},ProdCharacteristic:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},modifierExtension:{max:9007199254740991,type:[{code:"Extension"}]},height:{type:[{code:"Quantity"}]},width:{type:[{code:"Quantity"}]},depth:{type:[{code:"Quantity"}]},weight:{type:[{code:"Quantity"}]},nominalVolume:{type:[{code:"Quantity"}]},externalDiameter:{type:[{code:"Quantity"}]},shape:{type:[{code:"string"}]},color:{max:9007199254740991,type:[{code:"string"}]},imprint:{max:9007199254740991,type:[{code:"string"}]},image:{max:9007199254740991,type:[{code:"Attachment"}]},scoring:{type:[{code:"CodeableConcept"}]}}},ProductShelfLife:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},modifierExtension:{max:9007199254740991,type:[{code:"Extension"}]},identifier:{type:[{code:"Identifier"}]},type:{min:1,type:[{code:"CodeableConcept"}]},period:{min:1,type:[{code:"Quantity"}]},specialPrecautionsForStorage:{max:9007199254740991,type:[{code:"CodeableConcept"}]}}},Quantity:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},Range:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},low:{type:[{code:"Quantity"}]},high:{type:[{code:"Quantity"}]}}},Ratio:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},numerator:{type:[{code:"Quantity"}]},denominator:{type:[{code:"Quantity"}]}}},Reference:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},reference:{type:[{code:"string"}]},type:{type:[{code:"uri"}]},identifier:{type:[{code:"Identifier"}]},display:{type:[{code:"string"}]}}},RelatedArtifact:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},type:{min:1,type:[{code:"code"}]},label:{type:[{code:"string"}]},display:{type:[{code:"string"}]},citation:{type:[{code:"markdown"}]},url:{type:[{code:"url"}]},document:{type:[{code:"Attachment"}]},resource:{type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/Resource"]}]}}},SampledData:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},origin:{min:1,type:[{code:"Quantity"}]},period:{min:1,type:[{code:"decimal"}]},factor:{type:[{code:"decimal"}]},lowerLimit:{type:[{code:"decimal"}]},upperLimit:{type:[{code:"decimal"}]},dimensions:{min:1,type:[{code:"positiveInt"}]},data:{type:[{code:"string"}]}}},Signature:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},type:{min:1,max:9007199254740991,type:[{code:"Coding"}]},when:{min:1,type:[{code:"instant"}]},who:{min:1,type:[{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/PractitionerRole","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/Device","http://hl7.org/fhir/StructureDefinition/Organization"]}]},onBehalfOf:{type:[{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/PractitionerRole","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/Device","http://hl7.org/fhir/StructureDefinition/Organization"]}]},targetFormat:{type:[{code:"code"}]},sigFormat:{type:[{code:"code"}]},data:{type:[{code:"base64Binary"}]}}},SubstanceAmount:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},modifierExtension:{max:9007199254740991,type:[{code:"Extension"}]},"amount[x]":{type:[{code:"Quantity"},{code:"Range"},{code:"string"}]},amountType:{type:[{code:"CodeableConcept"}]},amountText:{type:[{code:"string"}]},referenceRange:{type:[{code:"SubstanceAmountReferenceRange"}]}}},Timing:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},modifierExtension:{max:9007199254740991,type:[{code:"Extension"}]},event:{max:9007199254740991,type:[{code:"dateTime"}]},repeat:{type:[{code:"TimingRepeat"}]},code:{type:[{code:"CodeableConcept"}]}}},TriggerDefinition:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},type:{min:1,type:[{code:"code"}]},name:{type:[{code:"string"}]},"timing[x]":{type:[{code:"Timing"},{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Schedule"]},{code:"date"},{code:"dateTime"}]},data:{max:9007199254740991,type:[{code:"DataRequirement"}]},condition:{type:[{code:"Expression"}]}}},UsageContext:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},code:{min:1,type:[{code:"Coding"}]},"value[x]":{min:1,type:[{code:"CodeableConcept"},{code:"Quantity"},{code:"Range"},{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/PlanDefinition","http://hl7.org/fhir/StructureDefinition/ResearchStudy","http://hl7.org/fhir/StructureDefinition/InsurancePlan","http://hl7.org/fhir/StructureDefinition/HealthcareService","http://hl7.org/fhir/StructureDefinition/Group","http://hl7.org/fhir/StructureDefinition/Location","http://hl7.org/fhir/StructureDefinition/Organization"]}]}}},MoneyQuantity:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},SimpleQuantity:{elements:{id:{type:[{code:"string"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{max:0,type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},MetadataResource:{elements:{id:{type:[{code:"string"}]},meta:{type:[{code:"Meta"}]},implicitRules:{type:[{code:"uri"}]},language:{type:[{code:"code"}]},text:{type:[{code:"Narrative"}]},contained:{max:9007199254740991,type:[{code:"Resource"}]},extension:{max:9007199254740991,type:[{code:"Extension"}]},modifierExtension:{max:9007199254740991,type:[{code:"Extension"}]},url:{type:[{code:"uri"}]},version:{type:[{code:"string"}]},name:{type:[{code:"string"}]},title:{type:[{code:"string"}]},status:{min:1,type:[{code:"code"}]},experimental:{type:[{code:"boolean"}]},date:{type:[{code:"dateTime"}]},publisher:{type:[{code:"string"}]},contact:{max:9007199254740991,type:[{code:"ContactDetail"}]},description:{type:[{code:"markdown"}]},useContext:{max:9007199254740991,type:[{code:"UsageContext"}]},jurisdiction:{max:9007199254740991,type:[{code:"CodeableConcept"}]}}},IdentityProvider:{elements:{authorizeUrl:{min:1,type:[{code:"string"}]},tokenUrl:{min:1,type:[{code:"string"}]},userInfoUrl:{min:1,type:[{code:"string"}]},clientId:{min:1,type:[{code:"string"}]},clientSecret:{min:1,type:[{code:"string"}]},useSubject:{type:[{code:"boolean"}]}}}};function we(e){return[{type:B.boolean,value:e}]}function Jn(e){return e==null?{type:"undefined",value:void 0}:Number.isSafeInteger(e)?{type:B.integer,value:e}:typeof e=="number"?{type:B.decimal,value:e}:typeof e=="boolean"?{type:B.boolean,value:e}:typeof e=="string"?{type:B.string,value:e}:an(e)?{type:B.Quantity,value:e}:Ro(e)?{type:e.resourceType,value:e}:{type:B.BackboneElement,value:e}}function Yo(e){return e.length===0?!1:!!e[0].value}function Eo(e,t){if(e.length!==0){if(e.length===1&&(!t||e[0].type===t))return e[0];throw new Error(`Expected singleton of type ${t}, but found ${JSON.stringify(e)}`)}}function rr(e,t){if(!e.value)return;let r=fi(e.type,t);return r?qne(e,t,r):Gne(e,t)}function qne(e,t,r){let n=r.type;if(!n||n.length===0)return;let o,a="undefined";if(n.length===1)o=e.value[t],a=n[0].code;else for(let l of n){let c=t.replace("[x]","")+fr(l.code);if(c in e.value){o=e.value[c],a=l.code;break}}let i=e.value["_"+t];if(i&&(Array.isArray(o)?o=o.map((l,c)=>i[c]?HP(l??{},i[c]):l):o=HP(o??{},i)),!Ko(o))return(a==="Element"||a==="BackboneElement")&&(a=r.type[0].code),Array.isArray(o)?o.map(l=>BP(l,a)):BP(o,a)}function BP(e,t){return t==="Resource"&&Ro(e)&&(t=e.resourceType),{type:t,value:e}}function Gne(e,t){let r=e.value;if(!r||typeof r!="object")return;let n;if(t in r)n=r[t];else for(let o in B){let a=t+fr(o);if(a in r){n=r[a];break}}if(!Ko(n))return Array.isArray(n)?n.map(Jn):Jn(n)}function F4(e){let t=[];for(let r of e){let n=!1;for(let o of t)if(Yo(U4(r,o))){n=!0;break}n||t.push(r)}return t}function V4(e){return we(!Yo(e))}function B4(e,t){return e.length===0||t.length===0?[]:e.length!==t.length?we(!1):we(e.every((r,n)=>Yo(U4(r,t[n]))))}function U4(e,t){var o,a;let r=(o=e.value)==null?void 0:o.valueOf(),n=(a=t.value)==null?void 0:a.valueOf();return typeof r=="number"&&typeof n=="number"?we(Math.abs(r-n)<1e-8):an(r)&&an(n)?we(q4(r,n)):we(typeof r=="object"&&typeof n=="object"?G0(e,t):r===n)}function W4(e,t){return e.length===0&&t.length===0?we(!0):e.length!==t.length?we(!1):(e.sort(UP),t.sort(UP),we(e.every((r,n)=>Yo(Qne(r,t[n])))))}function Qne(e,t){let{type:r,value:n}=e,{type:o,value:a}=t,i=n==null?void 0:n.valueOf(),l=a==null?void 0:a.valueOf();return typeof i=="number"&&typeof l=="number"?we(Math.abs(i-l)<.01):an(i)&&an(l)?we(q4(i,l)):we(r==="Coding"&&o==="Coding"?typeof i!="object"||typeof l!="object"?!1:i.code===l.code&&i.system===l.system:typeof i=="object"&&typeof l=="object"?G0({...i,id:void 0},{...l,id:void 0}):typeof i=="string"&&typeof l=="string"?i.toLowerCase()===l.toLowerCase():i===l)}function UP(e,t){var o,a;let r=(o=e.value)==null?void 0:o.valueOf(),n=(a=t.value)==null?void 0:a.valueOf();return typeof r=="number"&&typeof n=="number"?r-n:typeof r=="string"&&typeof n=="string"?r.localeCompare(n):0}function H4(e,t){let{value:r}=e;if(r==null)return!1;switch(t){case"Boolean":return typeof r=="boolean";case"Decimal":case"Integer":return typeof r=="number";case"Date":return typeof r=="string"&&!!/^\d{4}(-\d{2}(-\d{2})?)?/.exec(r);case"DateTime":return typeof r=="string"&&!!/^\d{4}(-\d{2}(-\d{2})?)?T/.exec(r);case"Time":return typeof r=="string"&&!!/^T\d/.exec(r);case"Period":return Kne(r);case"Quantity":return an(r);default:return typeof r=="object"&&(r==null?void 0:r.resourceType)===t}}function Kne(e){return!!(e&&typeof e=="object"&&"start"in e)}function an(e){return!!(e&&typeof e=="object"&&"value"in e&&typeof e.value=="number")}function q4(e,t){return Math.abs(e.value-t.value)<.01&&(e.unit===t.unit||e.code===t.code||e.unit===t.code||e.code===t.unit)}function G0(e,t){let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o of r){let a=e[o],i=t[o];if(WP(a)&&WP(i)){if(!G0(a,i))return!1}else if(a!==i)return!1}return!0}function WP(e){return e!==null&&typeof e=="object"}function HP(e,t){return delete t.__proto__,delete t.constructor,Object.assign(e,t)}var G4="ok",Yne="created",Xne="gone",Jne="not-modified",Zne="not-found",eoe="forbidden",toe="accepted",roe={resourceType:"OperationOutcome",id:G4,issue:[{severity:"information",code:"informational",details:{text:"All OK"}}]},noe={resourceType:"OperationOutcome",id:Zne,issue:[{severity:"error",code:"not-found",details:{text:"Not found"}}]},ooe={resourceType:"OperationOutcome",id:eoe,issue:[{severity:"error",code:"forbidden",details:{text:"Forbidden"}}]};function Ba(e,t){return{resourceType:"OperationOutcome",issue:[{severity:"error",code:"invalid",details:{text:e},expression:t?[t]:void 0}]}}function Lt(e){return{resourceType:"OperationOutcome",issue:[{severity:"error",code:"structure",details:{text:e}}]}}function aoe(e){return{resourceType:"OperationOutcome",issue:[{severity:"error",code:"exception",details:{text:"Internal server error"},diagnostics:e.toString()}]}}function Qm(e){return typeof e=="object"&&e!==null&&e.resourceType==="OperationOutcome"}function Q4(e){return e.id===G4||e.id===Yne||e.id===Jne||e.id===toe}function ioe(e){return e.id===Xne}var Be=class extends Error{constructor(e,t){super(K4(e)),this.outcome=e,this.cause=t}};function st(e){return e instanceof Be?e.outcome:Qm(e)?e:Ba(Oe(e))}function Oe(e){return e?typeof e=="string"?e:e instanceof Error?e.message:Qm(e)?K4(e):typeof e=="object"&&"code"in e&&typeof e.code=="string"?e.code:JSON.stringify(e):"Unknown error"}function K4(e){var r;let t=((r=e.issue)==null?void 0:r.map(Y4))??[];return t.length>0?t.join("; "):"Unknown error"}function Y4(e){var r,n;let t;return(r=e.details)!=null&&r.text?e.diagnostics?t=`${e.details.text} (${e.diagnostics})`:t=e.details.text:e.diagnostics?t=e.diagnostics:t="Unknown error",(n=e.expression)!=null&&n.length&&(t+=` (${e.expression.join(", ")})`),t}function loe(e){return new doe(e).parse()}var ec=Wne(Hne);function soe(e){var r;let t=Array.isArray(e)?e:((r=e.entry)==null?void 0:r.map(n=>n.resource))??[];for(let n of t)coe(n)}function coe(e){if(!(e!=null&&e.name))throw new Error("Failed loading StructureDefinition from bundle");if(e.resourceType!=="StructureDefinition")return;let t=loe(e);ec[e.name]=t;for(let r of t.innerTypes)r.parentType=t,ec[r.name]=r}function uoe(e){return!!ec[e]}function Q0(e){return ec[e]}function X4(e){let t=ec[e];if(!t)throw new Be(aoe(Error("Unknown data type: "+e)));return t}var doe=class{constructor(e){var t;if(!((t=e.snapshot)!=null&&t.element)||e.snapshot.element.length===0)throw new Error(`No snapshot defined for StructureDefinition '${e.name}'`);this.root=e.snapshot.element[0],this.elements=e.snapshot.element.slice(1),this.elementIndex=Object.create(null),this.index=0,this.resourceSchema={name:e.name,url:e.url,kind:e.kind,description:e.description,elements:{},constraints:this.parseElementDefinition(this.root).constraints,innerTypes:[],summaryProperties:new Set,mandatoryProperties:new Set},this.innerTypes=[]}parse(){var t,r,n,o,a;let e=this.next();for(;e;){if(e.sliceName)this.parseSliceStart(e);else if((t=e.id)!=null&&t.includes(":")){if((r=this.slicingContext)!=null&&r.current){let i=dg(e,this.slicingContext.path);this.slicingContext.current.elements[i]=this.parseElementDefinition(e)}}else{let i=this.parseElementDefinition(e);this.checkFieldEnter(e,i);let l=this.backboneContext;for(;l;){if((n=e.path)!=null&&n.startsWith(l.path+".")){l.type.elements[dg(e,l.path)]=i;break}l=l.parent}if(!l){let c=dg(e,this.root.path);e.isSummary&&((o=this.resourceSchema.summaryProperties)==null||o.add(c.replace("[x]",""))),i.min>0&&((a=this.resourceSchema.mandatoryProperties)==null||a.add(c.replace("[x]",""))),this.resourceSchema.elements[c]=i}this.checkFieldExit(e)}e=this.next()}return this.checkFieldExit(),this.innerTypes.length>0&&(this.resourceSchema.innerTypes=this.innerTypes),this.resourceSchema}checkFieldEnter(e,t){this.isInnerType(e)&&this.enterInnerType(e),e.slicing&&!this.slicingContext&&this.enterSlice(e,t)}enterInnerType(e){var t,r,n;for(;this.backboneContext&&!$i((t=this.backboneContext)==null?void 0:t.path,e.path);)this.innerTypes.push(this.backboneContext.type),this.backboneContext=this.backboneContext.parent;this.backboneContext={type:{name:QP(e),description:e.definition,elements:{},constraints:this.parseElementDefinition(e).constraints,innerTypes:[]},path:e.path??"",parent:$i((r=this.backboneContext)==null?void 0:r.path,e.path)?this.backboneContext:(n=this.backboneContext)==null?void 0:n.parent}}enterSlice(e,t){var r,n,o,a;poe(e)&&!((r=this.peek())!=null&&r.sliceName)||(t.slicing={discriminator:(((n=e.slicing)==null?void 0:n.discriminator)??[]).map(i=>{if(i.type!=="value"&&i.type!=="pattern"&&i.type!=="type")throw new Error(`Unsupported slicing discriminator type: ${i.type}`);return{path:i.path,type:i.type}}),slices:[],ordered:((o=e.slicing)==null?void 0:o.ordered)??!1,rule:(a=e.slicing)==null?void 0:a.rules},this.slicingContext={field:t.slicing,path:e.path??""})}checkFieldExit(e=void 0){var t;if(this.backboneContext&&!$i(this.backboneContext.path,e==null?void 0:e.path))if(this.backboneContext.parent)do this.innerTypes.push(this.backboneContext.type),this.backboneContext=this.backboneContext.parent;while(this.backboneContext&&!$i(this.backboneContext.path,e==null?void 0:e.path));else this.innerTypes.push(this.backboneContext.type),delete this.backboneContext;this.slicingContext&&!$i(this.slicingContext.path,e==null?void 0:e.path)&&((t=this.slicingContext)!=null&&t.current&&this.slicingContext.field.slices.push(this.slicingContext.current),delete this.slicingContext)}next(){let e=this.peek();if(e)return this.index++,e}peek(){let e=this.elements[this.index];if(e){if(this.elementIndex[e.path??""]=e,e.contentReference){let t=this.elementIndex[e.contentReference.slice(e.contentReference.indexOf("#")+1)];return t?{...t,id:e.id,path:e.path,min:e.min??t.min,max:e.max??t.max,contentReference:e.contentReference,definition:e.definition}:void 0}return e}}isInnerType(e){var r;let t=this.peek();return!!($i(e==null?void 0:e.path,t==null?void 0:t.path)&&((r=e.type)!=null&&r.some(n=>["BackboneElement","Element"].includes(n.code))))}parseSliceStart(e){var t;if(!this.slicingContext)throw new Error("Invalid slice start before discriminator: "+e.sliceName);this.slicingContext.current&&this.slicingContext.field.slices.push(this.slicingContext.current),this.slicingContext.current={name:e.sliceName??"",type:(t=e.type)==null?void 0:t.map(r=>({code:r.code??"",targetProfile:r.targetProfile})),elements:{},min:e.min??0,max:e.max==="*"?Number.POSITIVE_INFINITY:Number.parseInt(e.max,10)}}parseElementDefinition(e){var o,a;let t=qP(e.max),r=(o=e.base)!=null&&o.max?qP(e.base.max):t,n={type:"ElementDefinition",value:e};return{description:e.definition||"",path:e.path||((a=e.base)==null?void 0:a.path)||"",min:e.min??0,max:t,isArray:r>1,constraints:(e.constraint??[]).map(i=>({key:i.key??"",severity:i.severity??"error",expression:i.expression??"",description:i.human??""})),type:(e.type??[]).map(i=>({code:["BackboneElement","Element"].includes(i.code)?QP(e):i.code??"",targetProfile:i.targetProfile})),fixed:GP(rr(n,"fixed")),pattern:GP(rr(n,"pattern")),binding:e.binding}}};function qP(e){return e==="*"?Number.POSITIVE_INFINITY:Number.parseInt(e,10)}function dg(e,t=""){return foe(e.path,t)}function foe(e,t){return e?t&&e.startsWith(t)?e.substring(t.length+1):e:""}function $i(e,t){return!e||!t?!1:t.startsWith(e+".")||t===e}function GP(e){return Array.isArray(e)&&e.length>0?e[0]:Ko(e)?void 0:e}function poe(e){var r,n;let t=(r=e.slicing)==null?void 0:r.discriminator;return!!((n=e.type)!=null&&n.some(o=>o.code==="Extension")&&(t==null?void 0:t.length)===1&&t[0].type==="value"&&t[0].path==="url")}var B={Address:"Address",Age:"Age",Annotation:"Annotation",Attachment:"Attachment",BackboneElement:"BackboneElement",CodeableConcept:"CodeableConcept",Coding:"Coding",ContactDetail:"ContactDetail",ContactPoint:"ContactPoint",Contributor:"Contributor",Count:"Count",DataRequirement:"DataRequirement",Distance:"Distance",Dosage:"Dosage",Duration:"Duration",Expression:"Expression",Extension:"Extension",HumanName:"HumanName",Identifier:"Identifier",MarketingStatus:"MarketingStatus",Meta:"Meta",Money:"Money",Narrative:"Narrative",ParameterDefinition:"ParameterDefinition",Period:"Period",Population:"Population",ProdCharacteristic:"ProdCharacteristic",ProductShelfLife:"ProductShelfLife",Quantity:"Quantity",Range:"Range",Ratio:"Ratio",Reference:"Reference",RelatedArtifact:"RelatedArtifact",SampledData:"SampledData",Signature:"Signature",SubstanceAmount:"SubstanceAmount",SystemString:"http://hl7.org/fhirpath/System.String",Timing:"Timing",TriggerDefinition:"TriggerDefinition",UsageContext:"UsageContext",base64Binary:"base64Binary",boolean:"boolean",canonical:"canonical",code:"code",date:"date",dateTime:"dateTime",decimal:"decimal",id:"id",instant:"instant",integer:"integer",markdown:"markdown",oid:"oid",positiveInt:"positiveInt",string:"string",time:"time",unsignedInt:"unsignedInt",uri:"uri",url:"url",uuid:"uuid"};function moe(e){for(let t of e.base??[]){let r=ua.types[t];r||(r={searchParamsDetails:{}},ua.types[t]=r),r.searchParams||(r.searchParams={_id:{base:[t],code:"_id",type:"token",expression:t+".id"},_lastUpdated:{base:[t],code:"_lastUpdated",type:"date",expression:t+".meta.lastUpdated"},_compartment:{base:[t],code:"_compartment",type:"reference",expression:t+".meta.compartment"},_profile:{base:[t],code:"_profile",type:"uri",expression:t+".meta.profile"},_security:{base:[t],code:"_security",type:"token",expression:t+".meta.security"},_source:{base:[t],code:"_source",type:"uri",expression:t+".meta.source"},_tag:{base:[t],code:"_tag",type:"token",expression:t+".meta.tag"}}),r.searchParams[e.code]=e}}function QP(e){var r,n,o,a;let t=(n=(r=e.type)==null?void 0:r[0])==null?void 0:n.code;return t==="BackboneElement"||t==="Element"?hoe((a=((o=e.base)==null?void 0:o.path)??e.path)==null?void 0:a.split(".")):t}function hoe(e){return e.length===1?e[0]:e.map(fr).join("")}function K0(e){var t;return(t=ua.types[e])==null?void 0:t.searchParams}function goe(e,t){var r,n;return(n=(r=ua.types[e])==null?void 0:r.searchParams)==null?void 0:n[t]}function Vp(e){return e.replaceAll("[x]","").split(".").pop().split(/(?=[A-Z])/).map(yoe).join(" ").replace("_"," ").replace(/\s+/g," ")}var voe=new Set(["ID","IP","PKCE","JWKS","URI","URL"]);function yoe(e){let t=e.toUpperCase();return voe.has(t)?t:t.charAt(0)+e.slice(1)}function fi(e,t){let r=Q0(e);if(r)return r.elements[t]??r.elements[t+"[x]"]}function Ro(e){return!!(e&&typeof e=="object"&&"resourceType"in e)}function pi(e){return!!(e&&typeof e=="object"&&"reference"in e)}var ua={types:{}};function rd(e){if(e.startsWith("T"))return e+"T00:00:00.000Z".substring(e.length);if(e.length<=10)return e;try{return new Date(e).toISOString()}catch{return e}}var rs=()=>[],yr={empty:(e,t)=>we(t.length===0),exists:(e,t,r)=>we(r?t.filter(n=>Yo(r.eval(e,[n]))).length>0:t.length>0),all:(e,t,r)=>we(t.every(n=>Yo(r.eval(e,[n])))),allTrue:(e,t)=>{for(let r of t)if(!r.value)return we(!1);return we(!0)},anyTrue:(e,t)=>{for(let r of t)if(r.value)return we(!0);return we(!1)},allFalse:(e,t)=>{for(let r of t)if(r.value)return we(!1);return we(!0)},anyFalse:(e,t)=>{for(let r of t)if(!r.value)return we(!0);return we(!1)},subsetOf:rs,supersetOf:rs,count:(e,t)=>[{type:B.integer,value:t.length}],distinct:(e,t)=>{let r=[];for(let n of t)r.some(o=>o.value===n.value)||r.push(n);return r},isDistinct:(e,t)=>we(t.length===yr.distinct(e,t).length),where:(e,t,r)=>t.filter(n=>Yo(r.eval(e,[n]))),select:(e,t,r)=>t.map(n=>r.eval(e,[n])).flat(),repeat:rs,ofType:(e,t,r)=>t.filter(n=>n.type===r.name),single:(e,t)=>{if(t.length>1)throw new Error("Expected input length one for single()");return t.length===0?[]:t.slice(0,1)},first:(e,t)=>t.length===0?[]:t.slice(0,1),last:(e,t)=>t.length===0?[]:t.slice(t.length-1,t.length),tail:(e,t)=>t.length===0?[]:t.slice(1,t.length),skip:(e,t,r)=>{var o;let n=(o=r.eval(e,t)[0])==null?void 0:o.value;if(typeof n!="number")throw new Error("Expected a number for skip(num)");return n>=t.length?[]:n<=0?t:t.slice(n,t.length)},take:(e,t,r)=>{var o;let n=(o=r.eval(e,t)[0])==null?void 0:o.value;if(typeof n!="number")throw new Error("Expected a number for take(num)");return n>=t.length?t:n<=0?[]:t.slice(0,n)},intersect:(e,t,r)=>{if(!r)return t;let n=r.eval(e,t),o=[];for(let a of t)!o.some(i=>i.value===a.value)&&n.some(i=>i.value===a.value)&&o.push(a);return o},exclude:(e,t,r)=>{if(!r)return t;let n=r.eval(e,t),o=[];for(let a of t)n.some(i=>i.value===a.value)||o.push(a);return o},union:(e,t,r)=>{if(!r)return t;let n=r.eval(e,t);return F4([...t,...n])},combine:(e,t,r)=>{if(!r)return t;let n=r.eval(e,t);return[...t,...n]},htmlChecks:(e,t,r)=>[Jn(!0)],iif:(e,t,r,n,o)=>{let a=r.eval(e,t);if(a.length>1||a.length===1&&typeof a[0].value!="boolean")throw new Error("Expected criterion to evaluate to a Boolean");return Yo(a)?n.eval(e,t):o?o.eval(e,t):[]},toBoolean:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Fn(t,1);if(typeof r=="boolean")return[{type:B.boolean,value:r}];if(typeof r=="number"&&(r===0||r===1))return we(!!r);if(typeof r=="string"){let n=r.toLowerCase();if(["true","t","yes","y","1","1.0"].includes(n))return we(!0);if(["false","f","no","n","0","0.0"].includes(n))return we(!1)}return[]},convertsToBoolean:(e,t)=>t.length===0?[]:we(yr.toBoolean(e,t).length===1),toInteger:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Fn(t,1);return typeof r=="number"?[{type:B.integer,value:r}]:typeof r=="string"&&/^[+-]?\d+$/.exec(r)?[{type:B.integer,value:parseInt(r,10)}]:typeof r=="boolean"?[{type:B.integer,value:r?1:0}]:[]},convertsToInteger:(e,t)=>t.length===0?[]:we(yr.toInteger(e,t).length===1),toDate:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Fn(t,1);return typeof r=="string"&&/^\d{4}(-\d{2}(-\d{2})?)?/.exec(r)?[{type:B.date,value:rd(r)}]:[]},convertsToDate:(e,t)=>t.length===0?[]:we(yr.toDate(e,t).length===1),toDateTime:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Fn(t,1);return typeof r=="string"&&/^\d{4}(-\d{2}(-\d{2})?)?/.exec(r)?[{type:B.dateTime,value:rd(r)}]:[]},convertsToDateTime:(e,t)=>t.length===0?[]:we(yr.toDateTime(e,t).length===1),toDecimal:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Fn(t,1);return typeof r=="number"?[{type:B.decimal,value:r}]:typeof r=="string"&&/^-?\d{1,9}(\.\d{1,9})?$/.exec(r)?[{type:B.decimal,value:parseFloat(r)}]:typeof r=="boolean"?[{type:B.decimal,value:r?1:0}]:[]},convertsToDecimal:(e,t)=>t.length===0?[]:we(yr.toDecimal(e,t).length===1),toQuantity:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Fn(t,1);return an(r)?[{type:B.Quantity,value:r}]:typeof r=="number"?[{type:B.Quantity,value:{value:r,unit:"1"}}]:typeof r=="string"&&/^-?\d{1,9}(\.\d{1,9})?/.exec(r)?[{type:B.Quantity,value:{value:parseFloat(r),unit:"1"}}]:typeof r=="boolean"?[{type:B.Quantity,value:{value:r?1:0,unit:"1"}}]:[]},convertsToQuantity:(e,t)=>t.length===0?[]:we(yr.toQuantity(e,t).length===1),toString:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Fn(t,1);return r==null?[]:an(r)?[{type:B.string,value:`${r.value} '${r.unit}'`}]:[{type:B.string,value:r.toString()}]},convertsToString:(e,t)=>t.length===0?[]:we(yr.toString(e,t).length===1),toTime:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Fn(t,1);if(typeof r=="string"){let n=/^T?(\d{2}(:\d{2}(:\d{2})?)?)/.exec(r);if(n)return[{type:B.time,value:rd("T"+n[1])}]}return[]},convertsToTime:(e,t)=>t.length===0?[]:we(yr.toTime(e,t).length===1),indexOf:(e,t,r)=>Xr((n,o)=>n.indexOf(o),e,t,r),substring:(e,t,r,n)=>Xr((o,a,i)=>{let l=a,c=i?l+i:o.length;return l<0||l>=o.length?void 0:o.substring(l,c)},e,t,r,n),startsWith:(e,t,r)=>Xr((n,o)=>n.startsWith(o),e,t,r),endsWith:(e,t,r)=>Xr((n,o)=>n.endsWith(o),e,t,r),contains:(e,t,r)=>Xr((n,o)=>n.includes(o),e,t,r),upper:(e,t)=>Xr(r=>r.toUpperCase(),e,t),lower:(e,t)=>Xr(r=>r.toLowerCase(),e,t),replace:(e,t,r,n)=>Xr((o,a,i)=>o.replaceAll(a,i),e,t,r,n),matches:(e,t,r)=>Xr((n,o)=>!!new RegExp(o).exec(n),e,t,r),replaceMatches:(e,t,r,n)=>Xr((o,a,i)=>o.replaceAll(a,i),e,t,r,n),length:(e,t)=>Xr(r=>r.length,e,t),toChars:(e,t)=>Xr(r=>r?r.split(""):void 0,e,t),abs:(e,t)=>Mn(Math.abs,e,t),ceiling:(e,t)=>Mn(Math.ceil,e,t),exp:(e,t)=>Mn(Math.exp,e,t),floor:(e,t)=>Mn(Math.floor,e,t),ln:(e,t)=>Mn(Math.log,e,t),log:(e,t,r)=>Mn((n,o)=>Math.log(n)/Math.log(o),e,t,r),power:(e,t,r)=>Mn(Math.pow,e,t,r),round:(e,t)=>Mn(Math.round,e,t),sqrt:(e,t)=>Mn(Math.sqrt,e,t),truncate:(e,t)=>Mn(r=>r|0,e,t),children:rs,descendants:rs,trace:(e,t,r)=>(console.log("trace",t,r),t),now:()=>[{type:B.dateTime,value:new Date().toISOString()}],timeOfDay:()=>[{type:B.time,value:new Date().toISOString().substring(11)}],today:()=>[{type:B.date,value:new Date().toISOString().substring(0,10)}],between:(e,t,r,n,o)=>{var u;let a=yr.toDateTime(e,r.eval(e,t));if(a.length===0)throw new Error("Invalid start date");let i=yr.toDateTime(e,n.eval(e,t));if(i.length===0)throw new Error("Invalid end date");let l=(u=o.eval(e,t)[0])==null?void 0:u.value;if(l!=="years"&&l!=="months"&&l!=="days")throw new Error("Invalid units");let c=D4(a[0].value,i[0].value);return[{type:B.Quantity,value:{value:c[l],unit:l}}]},is:(e,t,r)=>{let n="";return r instanceof Y0?n=r.name:r instanceof J0&&(n=r.left.name+"."+r.right.name),n?t.map(o=>({type:B.boolean,value:H4(o,n)})):[]},not:(e,t)=>yr.toBoolean(e,t).map(r=>({type:B.boolean,value:!r.value})),resolve:(e,t)=>t.map(r=>{let n=r.value,o;if(typeof n=="string")o=n;else if(typeof n=="object"){let a=n;if(a.resource)return Jn(a.resource);a.reference?o=a.reference:a.type&&a.identifier&&(o=`${a.type}?identifier=${a.identifier.system}|${a.identifier.value}`)}if(o!=null&&o.includes("?")){let[a]=o.split("?");return{type:a,value:{resourceType:a}}}if(o!=null&&o.includes("/")){let[a,i]=o.split("/");return{type:a,value:{resourceType:a,id:i}}}return{type:B.BackboneElement,value:void 0}}).filter(r=>!!r.value),as:(e,t)=>t,type:(e,t)=>t.map(({value:r})=>typeof r=="boolean"?{type:B.BackboneElement,value:{namespace:"System",name:"Boolean"}}:typeof r=="number"?{type:B.BackboneElement,value:{namespace:"System",name:"Integer"}}:Ro(r)?{type:B.BackboneElement,value:{namespace:"FHIR",name:r.resourceType}}:{type:B.BackboneElement,value:null}),conformsTo:(e,t,r)=>{let n=r.eval(e,t)[0].value;if(!n.startsWith("http://hl7.org/fhir/StructureDefinition/"))throw new Error("Expected a StructureDefinition URL");let o=n.replace("http://hl7.org/fhir/StructureDefinition/","");return t.map(a=>{var i;return{type:B.boolean,value:((i=a.value)==null?void 0:i.resourceType)===o}})}};function Xr(e,t,r,...n){if(r.length===0)return[];let[{value:o}]=Fn(r,1);if(typeof o!="string")throw new Error("String function cannot be called with non-string");let a=e(o,...n.map(i=>{var l;return(l=i==null?void 0:i.eval(t,r)[0])==null?void 0:l.value}));return a===void 0?[]:Array.isArray(a)?a.map(Jn):[Jn(a)]}function Mn(e,t,r,...n){if(r.length===0)return[];let[{value:o}]=Fn(r,1),a=an(o),i=a?o.value:o;if(typeof i!="number")throw new Error("Math function cannot be called with non-number");let l=e(i,...n.map(d=>{var p;return(p=d.eval(t,r)[0])==null?void 0:p.value})),c=a?B.Quantity:r[0].type,u=a?{...o,value:l}:l;return[{type:c,value:u}]}function Fn(e,t){if(e.length!==t)throw new Error(`Expected ${t} arguments`);for(let r of e)if(r==null)throw new Error("Expected non-null argument");return e}var woe=class{constructor(e,t){this.original=e,this.child=t}eval(e,t){try{return t.length>0?t.map(r=>this.child.eval(e,[r])).flat():this.child.eval(e,[])}catch(r){throw new Error(`FhirPathError on "${this.original}": ${r}`)}}toString(){return this.child.toString()}},Oi=class{constructor(e){this.value=e}eval(){return[this.value]}toString(){let e=this.value.value;return typeof e=="string"?`'${e}'`:e.toString()}},Y0=class{constructor(e){this.name=e}eval(e,t){if(this.name==="$this")return t;if(this.name.startsWith("%")){let r=e.variables[this.name.slice(1)];if(!r)throw new Error(`Undefined variable ${this.name}`);return[r]}return t.flatMap(r=>this.evalValue(r)).filter(r=>(r==null?void 0:r.value)!==void 0)}evalValue(e){let t=e.value;if(!(!t||typeof t!="object"))return Ro(t)&&t.resourceType===this.name?e:rr(e,this.name)}toString(){return this.name}},boe=class{eval(){return[]}toString(){return"{}"}},_oe=class extends yne{constructor(t,r,n){super(t,r),this.impl=n}eval(t,r){return this.impl(this.child.eval(t,r))}toString(){return this.operator+this.child.toString()}},X0=class extends xc{constructor(e,t){super("as",e,t)}eval(e,t){return yr.ofType(e,this.left.eval(e,t),this.right)}},Rr=class extends xc{},vn=class extends Rr{constructor(e,t,r,n){super(e,t,r),this.impl=n}eval(e,t){let r=this.left.eval(e,t);if(r.length!==1)return[];let n=this.right.eval(e,t);if(n.length!==1)return[];let o=r[0].value,a=n[0].value,i=an(o)?o.value:o,l=an(a)?a.value:a,c=this.impl(i,l);return typeof c=="boolean"?we(c):an(o)?[{type:B.Quantity,value:{...o,value:c}}]:[Jn(c)]}},xoe=class extends xc{constructor(e,t){super("&",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t),o=[...r,...n];return o.length>0&&o.every(a=>typeof a.value=="string")?[{type:B.string,value:o.map(a=>a.value).join("")}]:o}},Eoe=class extends Rr{constructor(e,t){super("contains",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return we(r.some(o=>o.value===n[0].value))}},Soe=class extends Rr{constructor(t,r){super("in",t,r)}eval(t,r){let n=Eo(this.left.eval(t,r)),o=this.right.eval(t,r);return n?we(o.some(a=>a.value===n.value)):[]}},J0=class extends xc{constructor(e,t){super(".",e,t)}eval(e,t){return this.right.eval(e,this.left.eval(e,t))}toString(){return`${this.left.toString()}.${this.right.toString()}`}},J4=class extends xc{constructor(e,t){super("|",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return F4([...r,...n])}},Poe=class extends Rr{constructor(t,r){super("=",t,r)}eval(t,r){let n=this.left.eval(t,r),o=this.right.eval(t,r);return B4(n,o)}},$oe=class extends Rr{constructor(e,t){super("!=",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return V4(B4(r,n))}},Ooe=class extends Rr{constructor(e,t){super("~",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return W4(r,n)}},Coe=class extends Rr{constructor(t,r){super("!~",t,r)}eval(t,r){let n=this.left.eval(t,r),o=this.right.eval(t,r);return V4(W4(n,o))}},Z0=class extends Rr{constructor(e,t){super("is",e,t)}eval(e,t){let r=this.left.eval(e,t);if(r.length!==1)return[];let n=this.right.name;return we(H4(r[0],n))}},koe=class extends Rr{constructor(e,t){super("and",e,t)}eval(e,t){let r=Eo(this.left.eval(e,t),"boolean"),n=Eo(this.right.eval(e,t),"boolean");return(r==null?void 0:r.value)===!0&&(n==null?void 0:n.value)===!0?we(!0):(r==null?void 0:r.value)===!1||(n==null?void 0:n.value)===!1?we(!1):[]}},joe=class extends Rr{constructor(t,r){super("or",t,r)}eval(t,r){let n=Eo(this.left.eval(t,r),"boolean"),o=Eo(this.right.eval(t,r),"boolean");return(n==null?void 0:n.value)===!1&&(o==null?void 0:o.value)===!1?we(!1):n!=null&&n.value||o!=null&&o.value?we(!0):[]}},Roe=class extends Rr{constructor(e,t){super("xor",e,t)}eval(e,t){let r=Eo(this.left.eval(e,t),"boolean"),n=Eo(this.right.eval(e,t),"boolean");return!r||!n?[]:we(r.value!==n.value)}},Toe=class extends Rr{constructor(t,r){super("implies",t,r)}eval(t,r){let n=Eo(this.left.eval(t,r),"boolean"),o=Eo(this.right.eval(t,r),"boolean");return(o==null?void 0:o.value)===!0||(n==null?void 0:n.value)===!1?we(!0):!n||!o?[]:we(!1)}},e1=class{constructor(e,t){this.name=e,this.args=t}eval(e,t){let r=yr[this.name];if(!r)throw new Error("Unrecognized function: "+this.name);return r(e,t,...this.args)}toString(){return`${this.name}(${this.args.map(e=>e.toString()).join(", ")})`}},t1=class{constructor(t,r){this.left=t,this.expr=r}eval(t,r){let n=this.expr.eval(t,r);if(n.length!==1)return[];let o=n[0].value;if(typeof o!="number")throw new Error("Invalid indexer expression: should return integer}");let a=this.left.eval(t,r);return o in a?[a[o]]:[]}toString(){return`${this.left.toString()}[${this.expr.toString()}]`}},Ioe=["year","years","month","months","week","weeks","day","days","hour","hours","minute","minutes","second","seconds","millisecond","milliseconds"],Doe=class{constructor(e,t,r,n){this.result=[],this.pos={index:0,line:1,column:0},this.markStack=[],this.str=e,this.keywords=t,this.operators=r,this.dateTimeLiterals=!!(n!=null&&n.dateTimeLiterals),this.symbolRegex=(n==null?void 0:n.symbolRegex)??/[$\w%]/}tokenize(){for(;this.pos.index<this.str.length;){let e=this.consumeToken();e&&this.result.push(e)}return this.result}prevToken(){return this.result.slice(-1)[0]}peekToken(){this.mark();let e=this.consumeToken();return this.reset(),e}consumeToken(){this.consumeWhitespace();let e=this.curr();if(!e)return;this.mark();let t=this.peek();return e==="/"&&t==="*"?this.consumeMultiLineComment():e==="/"&&t==="/"?this.consumeSingleLineComment():e==="'"||e==='"'?this.consumeString(e):e==="`"?this.consumeBacktickSymbol():e==="@"?this.consumeDateTime():/\d/.exec(e)?this.consumeNumber():/\w/.exec(e)?this.consumeSymbol():(e==="$"||e==="%")&&/\w/.exec(t)?this.consumeSymbol():this.consumeOperator()}consumeWhitespace(){this.consumeWhile(()=>/\s/.exec(this.curr()))}consumeMultiLineComment(){let e=this.pos.index;return this.consumeWhile(()=>this.curr()!=="*"||this.peek()!=="/"),this.advance(),this.advance(),this.buildToken("Comment",this.str.substring(e,this.pos.index))}consumeSingleLineComment(){return this.buildToken("Comment",this.consumeWhile(()=>this.curr()!==`
|
|
88
|
+
`))}consumeString(e){this.advance();let t=this.buildToken("String",this.consumeWhile(()=>this.prev()==="\\"||this.curr()!==e));return this.advance(),t}consumeBacktickSymbol(){this.advance();let e=this.buildToken("Symbol",this.consumeWhile(()=>this.curr()!=="`"));return this.advance(),e}consumeDateTime(){this.advance();let e=this.pos.index;return this.consumeWhile(()=>/[\d-]/.exec(this.curr())),this.curr()==="T"&&(this.advance(),this.consumeWhile(()=>/[\d:]/.exec(this.curr())),this.curr()==="."&&/\d/.exec(this.peek())&&(this.advance(),this.consumeWhile(()=>/\d/.exec(this.curr()))),this.curr()==="Z"?this.advance():(this.curr()==="+"||this.curr()==="-")&&(this.advance(),this.consumeWhile(()=>/[\d:]/.exec(this.curr())))),this.buildToken("DateTime",this.str.substring(e,this.pos.index))}consumeNumber(){let e=this.pos.index,t="Number";return this.consumeWhile(()=>/\d/.exec(this.curr())),this.curr()==="."&&/\d/.exec(this.peek())&&(this.advance(),this.consumeWhile(()=>/\d/.exec(this.curr()))),this.curr()==="-"&&this.dateTimeLiterals?(this.pos.index=e-1,this.consumeDateTime()):(this.curr()===" "&&Noe(this.peekToken())&&(t="Quantity",this.consumeToken()),this.buildToken(t,this.str.substring(e,this.pos.index)))}consumeSymbol(){var t;let e=this.consumeWhile(()=>this.symbolRegex.exec(this.curr()));return((t=this.prevToken())==null?void 0:t.value)!=="."&&this.keywords.includes(e)?this.buildToken(e,e):this.buildToken("Symbol",e)}consumeOperator(){let e=this.curr(),t=this.peek(),r=e+t;return this.operators.includes(r)?(this.advance(),this.advance(),this.buildToken(r,r)):(this.advance(),this.buildToken(e,e))}consumeWhile(e){let t=this.pos.index;for(;this.pos.index<this.str.length&&e();)this.advance();return this.str.substring(t,this.pos.index)}curr(){return this.str[this.pos.index]}prev(){return this.str[this.pos.index-1]??""}peek(){return this.str[this.pos.index+1]??""}mark(){this.markStack.push({...this.pos})}reset(){let e=this.markStack.pop();if(!e)throw new Error("No mark to reset to");this.pos.index=e.index,this.pos.line=e.line,this.pos.column=e.column}advance(){this.pos.index++,this.curr()===`
|
|
89
|
+
`?(this.pos.line++,this.pos.column=0):this.pos.column++}buildToken(e,t){let r=this.markStack.pop();if(!r)throw new Error("No mark for token");return{id:e,value:t,...r}}};function Noe(e){return!!(e&&(e.id==="String"||e.id==="Symbol"&&Ioe.includes(e.value)))}var Aoe=["true","false"],r1=["!=","!~","<=",">=","{}","->"];function Moe(e){return new Doe(e,Aoe,r1).tokenize()}var Fe={FunctionCall:0,Dot:1,Indexer:2,UnaryAdd:3,UnarySubtract:3,Multiply:4,Divide:4,IntegerDivide:4,Modulo:4,Add:5,Subtract:5,Ampersand:5,Is:6,As:6,Union:7,GreaterThan:8,GreaterThanOrEquals:8,LessThan:8,LessThanOrEquals:8,Equals:9,Equivalent:9,NotEquals:9,NotEquivalent:9,In:10,Contains:10,And:11,Xor:12,Or:12,Implies:13,Arrow:100,Semicolon:200},Loe={parse(e){var r;let t=e.consumeAndParse();if(!e.match(")"))throw new Error("Parse error: expected `)` got `"+((r=e.peek())==null?void 0:r.value)+"`");return t}},zoe={parse(e,t){let r=e.consumeAndParse();if(!e.match("]"))throw new Error("Parse error: expected `]`");return new t1(t,r)},precedence:Fe.Indexer},Foe={parse(e,t){if(!(t instanceof Y0))throw new Error("Unexpected parentheses");let r=[];for(;!e.match(")");)r.push(e.consumeAndParse()),e.match(",");return new e1(t.name,r)},precedence:Fe.FunctionCall};function Voe(e){let t=e.split(" "),r=parseFloat(t[0]),n=t[1];return n!=null&&n.startsWith("'")&&n.endsWith("'")?n=n.substring(1,n.length-1):n="{"+n+"}",{value:r,unit:n}}function n1(){return new wne().registerPrefix("String",{parse:(e,t)=>new Oi({type:B.string,value:t.value})}).registerPrefix("DateTime",{parse:(e,t)=>new Oi({type:B.dateTime,value:rd(t.value)})}).registerPrefix("Quantity",{parse:(e,t)=>new Oi({type:B.Quantity,value:Voe(t.value)})}).registerPrefix("Number",{parse:(e,t)=>new Oi({type:B.decimal,value:parseFloat(t.value)})}).registerPrefix("true",{parse:()=>new Oi({type:B.boolean,value:!0})}).registerPrefix("false",{parse:()=>new Oi({type:B.boolean,value:!1})}).registerPrefix("Symbol",{parse:(e,t)=>new Y0(t.value)}).registerPrefix("{}",{parse:()=>new boe}).registerPrefix("(",Loe).registerInfix("[",zoe).registerInfix("(",Foe).prefix("+",Fe.UnaryAdd,(e,t)=>new _oe("+",t,r=>r)).prefix("-",Fe.UnarySubtract,(e,t)=>new vn("-",t,t,(r,n)=>-n)).infixLeft(".",Fe.Dot,(e,t,r)=>new J0(e,r)).infixLeft("/",Fe.Divide,(e,t,r)=>new vn("/",e,r,(n,o)=>n/o)).infixLeft("*",Fe.Multiply,(e,t,r)=>new vn("*",e,r,(n,o)=>n*o)).infixLeft("+",Fe.Add,(e,t,r)=>new vn("+",e,r,(n,o)=>n+o)).infixLeft("-",Fe.Subtract,(e,t,r)=>new vn("-",e,r,(n,o)=>n-o)).infixLeft("|",Fe.Union,(e,t,r)=>new J4(e,r)).infixLeft("=",Fe.Equals,(e,t,r)=>new Poe(e,r)).infixLeft("!=",Fe.NotEquals,(e,t,r)=>new $oe(e,r)).infixLeft("~",Fe.Equivalent,(e,t,r)=>new Ooe(e,r)).infixLeft("!~",Fe.NotEquivalent,(e,t,r)=>new Coe(e,r)).infixLeft("<",Fe.LessThan,(e,t,r)=>new vn("<",e,r,(n,o)=>n<o)).infixLeft("<=",Fe.LessThanOrEquals,(e,t,r)=>new vn("<=",e,r,(n,o)=>n<=o)).infixLeft(">",Fe.GreaterThan,(e,t,r)=>new vn(">",e,r,(n,o)=>n>o)).infixLeft(">=",Fe.GreaterThanOrEquals,(e,t,r)=>new vn(">=",e,r,(n,o)=>n>=o)).infixLeft("&",Fe.Ampersand,(e,t,r)=>new xoe(e,r)).infixLeft("and",Fe.And,(e,t,r)=>new koe(e,r)).infixLeft("as",Fe.As,(e,t,r)=>new X0(e,r)).infixLeft("contains",Fe.Contains,(e,t,r)=>new Eoe(e,r)).infixLeft("div",Fe.Divide,(e,t,r)=>new vn("div",e,r,(n,o)=>n/o|0)).infixLeft("in",Fe.In,(e,t,r)=>new Soe(e,r)).infixLeft("is",Fe.Is,(e,t,r)=>new Z0(e,r)).infixLeft("mod",Fe.Modulo,(e,t,r)=>new vn("mod",e,r,(n,o)=>n%o)).infixLeft("or",Fe.Or,(e,t,r)=>new joe(e,r)).infixLeft("xor",Fe.Xor,(e,t,r)=>new Roe(e,r)).infixLeft("implies",Fe.Implies,(e,t,r)=>new Toe(e,r))}var Boe=n1();function Z4(e){return new woe(e,Boe.construct(Moe(e)).consumeAndParse())}function Uoe(e,t){let r=Array.isArray(t)?t:[t];for(let n=0;n<r.length;n++){let o=r[n];typeof o=="object"&&"type"in o&&"value"in o||(r[n]=Jn(r[n]))}return o1(e,r).map(n=>n.value)}function o1(e,t,r){let n=r??{};return Z4(e).eval({variables:n},t).map(o=>{var a;return{type:o.type,value:(a=o.value)==null?void 0:a.valueOf()}})}var Uo=(e=>(e.BOOLEAN="BOOLEAN",e.NUMBER="NUMBER",e.QUANTITY="QUANTITY",e.TEXT="TEXT",e.REFERENCE="REFERENCE",e.CANONICAL="CANONICAL",e.DATE="DATE",e.DATETIME="DATETIME",e.PERIOD="PERIOD",e.UUID="UUID",e))(Uo||{});function a1(e,t){var n,o;let r=(o=(n=ua.types[e])==null?void 0:n.searchParamsDetails)==null?void 0:o[t.code];return r||(r=Hoe(e,t)),r}function Woe(e,t,r){let n=ua.types[e];n.searchParamsDetails||(n.searchParamsDetails={}),n.searchParamsDetails[t]=r}function Hoe(e,t){let r=t.code,n=Qoe(r),o=Yoe(e,t.expression),a={elementDefinitions:[],propertyTypes:new Set,array:!1};for(let l of o){let c=Cs(l);c.length===1&&c[0]instanceof Rr?a.propertyTypes.add("boolean"):eD(a,Cs(l),e,1)}let i={columnName:n,type:Koe(t,a.propertyTypes),elementDefinitions:a.elementDefinitions,array:a.array};return Woe(e,r,i),i}function eD(e,t,r,n){let o=t[n];if(o instanceof X0){e.propertyTypes.add(o.right.toString());return}if(o instanceof e1){qoe(e,o);return}let a=o.toString(),i=fi(r,a);if(!i)throw new Error(`Element definition not found for ${r} ${a}`);let l=!1,c=n+1;if(c<t.length&&t[c]instanceof t1&&(l=!0,c++),i.max>1&&!l&&(e.array=!0),c>=t.length){e.elementDefinitions.push(i);for(let u of i.type)e.propertyTypes.add(u.code);return}for(let u of i.type){let d=u.code;Goe(d)&&(d=i.type[0].code),eD(e,t,d,c)}}function qoe(e,t){if(t.name==="as"){e.propertyTypes.add(t.args[0].toString());return}if(t.name==="resolve"){e.propertyTypes.add("string");return}if(t.name==="where"&&t.args[0]instanceof Z0){e.propertyTypes.add(t.args[0].right.toString());return}throw new Error(`Unhandled FHIRPath function: ${t.name}`)}function Goe(e){return e==="Element"||e==="BackboneElement"}function Qoe(e){return e.split("-").reduce((t,r,n)=>t+(n?fr(r):r),"")}function Koe(e,t){switch(e.type){case"date":return t.size===1&&t.has(B.date)?"DATE":"DATETIME";case"number":return"NUMBER";case"quantity":return"QUANTITY";case"reference":return t.has(B.canonical)?"CANONICAL":"REFERENCE";case"token":return t.size===1&&t.has(B.boolean)?"BOOLEAN":"TEXT";default:return"TEXT"}}function Yoe(e,t){let r=[],n=Z4(t);return Mv(e,n.child,r),r}function Mv(e,t,r){t instanceof J4?(Mv(e,t.left,r),Mv(e,t.right,r)):t.toString().startsWith(e+".")&&r.push(t)}function Cs(e){return e instanceof X0||e instanceof t1?[Cs(e.left),e].flat():e instanceof Rr?[e]:e instanceof J0?[Cs(e.left),Cs(e.right)].flat():e instanceof e1&&e.name==="where"&&!(e.args[0]instanceof Z0)?[]:[e]}var Sc=20,te=(e=>(e.EQUALS="eq",e.NOT_EQUALS="ne",e.GREATER_THAN="gt",e.LESS_THAN="lt",e.GREATER_THAN_OR_EQUALS="ge",e.LESS_THAN_OR_EQUALS="le",e.STARTS_AFTER="sa",e.ENDS_BEFORE="eb",e.APPROXIMATELY="ap",e.CONTAINS="contains",e.EXACT="exact",e.TEXT="text",e.NOT="not",e.ABOVE="above",e.BELOW="below",e.IN="in",e.NOT_IN="not-in",e.OF_TYPE="of-type",e.MISSING="missing",e.IDENTIFIER="identifier",e.ITERATE="iterate",e))(te||{}),tD={contains:"contains",exact:"exact",above:"above",below:"below",text:"text",not:"not",in:"in","not-in":"not-in","of-type":"of-type",missing:"missing",identifier:"identifier",iterate:"iterate"},i1={eq:"eq",ne:"ne",lt:"lt",le:"le",gt:"gt",ge:"ge",sa:"sa",eb:"eb",ap:"ap"};function Xoe(e){let t;for(let r of e.pathname.split("/"))r&&(t=r);return Zoe(t,e.searchParams.entries())}function Joe(e){return Xoe(new URL(e,"https://example.com/"))}function Zoe(e,t){let r={resourceType:e};for(let[n,o]of t)eae(r,n,o);return r}function eae(e,t,r){var i,l;let n,o,a=t.indexOf(":");switch(a>=0?(n=t.substring(0,a),o=t.substring(a+1)):(n=t,o=""),n){case"_sort":tae(e,r);break;case"_count":e.count=parseInt(r,10);break;case"_offset":e.offset=parseInt(r,10);break;case"_total":e.total=r;break;case"_summary":r==="count"?(e.total="accurate",e.count=0):(r==="true"||r==="data"||r==="text")&&(e.summary=r);break;case"_include":{let c=KP(r);o==="iterate"&&(c.modifier="iterate"),e.include?e.include.push(c):e.include=[c];break}case"_revinclude":{let c=KP(r);o==="iterate"&&(c.modifier="iterate"),e.revInclude?e.revInclude.push(c):e.revInclude=[c];break}case"_fields":case"_elements":e.fields=r.split(",");break;default:{let c=(l=(i=ua.types[e.resourceType])==null?void 0:i.searchParams)==null?void 0:l[n];c?rae(e,c,o,r):aae(e,n,o,r)}}}function tae(e,t){for(let r of t.split(",")){let n,o=!1;r.startsWith("-")?(n=r.substring(1),o=!0):n=r,e.sortRules||(e.sortRules=[]),e.sortRules.push({code:n,descending:o})}}function rae(e,t,r,n){if(r==="missing"){Km(e,{code:t.code,operator:"missing",value:n});return}switch(t.type){case"number":case"date":case"quantity":nae(e,t,n);break;case"reference":case"string":case"token":case"uri":oae(e,t,r,n);break}}function nae(e,t,r){let{operator:n,value:o}=iae(r);Km(e,{code:t.code,operator:n,value:o})}function oae(e,t,r,n){Km(e,{code:t.code,operator:lae(r),value:n})}function aae(e,t,r,n){var a;let o="eq";if(r)o=r;else if(n.length>=2){let i=n.substring(0,2);i in i1&&(n.length===2||(a=n.at(2))!=null&&a.match(/\d/))&&(o=i,n=n.substring(i.length))}Km(e,{code:t,operator:o,value:n})}function iae(e){let t=e.substring(0,2),r=i1[t];return r?{operator:r,value:e.substring(2)}:{operator:"eq",value:e}}function lae(e){return tD[e]??"eq"}function KP(e){let t=e.split(":");if(t.includes("*"))throw new Be(Ba("'*' is not supported as a value for search inclusion parameters"));if(t.length===1)throw new Be(Ba(`Invalid include value '${e}': must be of the form ResourceType:search-parameter`));if(t.length===2)return{resourceType:t[0],searchParam:t[1]};if(t.length===3)return{resourceType:t[0],searchParam:t[1],targetType:t[2]};throw new Be(Ba(`Invalid include value '${e}'`))}function Km(e,t){e.filters?e.filters.push(t):e.filters=[t]}function Hi(e){let t=[];return e.fields&&t.push("_fields="+e.fields.join(",")),e.filters&&e.filters.forEach(r=>t.push(sae(r))),e.sortRules&&e.sortRules.length>0&&t.push(cae(e.sortRules)),e.offset!==void 0&&t.push("_offset="+e.offset),e.count!==void 0&&t.push("_count="+e.count),e.total!==void 0&&t.push("_total="+e.total),e.include&&e.include.forEach(r=>t.push(YP("_include",r))),e.revInclude&&e.revInclude.forEach(r=>t.push(YP("_revinclude",r))),t.length===0?"":(t.sort((r,n)=>r.localeCompare(n)),"?"+t.join("&"))}function sae(e){let t=e.operator in tD?":"+e.operator:"",r=e.operator!=="eq"&&e.operator in i1?e.operator:"";return`${e.code}${t}=${r}${encodeURIComponent(e.value)}`}function cae(e){return"_sort="+e.map(t=>t.descending?"-"+t.code:t.code).join(",")}function YP(e,t){return e+"="+t.resourceType+":"+t.searchParam+(t.targetType?":"+t.targetType:"")}var uae=(e=>(e.READ="read",e.VREAD="vread",e.UPDATE="update",e.PATCH="patch",e.DELETE="delete",e.HISTORY="history",e.HISTORY_INSTANCE="history-instance",e.HISTORY_TYPE="history-type",e.HISTORY_SYSTEM="history-system",e.CREATE="create",e.SEARCH="search",e.SEARCH_TYPE="search-type",e.SEARCH_SYSTEM="search-system",e.SEARCH_COMPARTMENT="search-compartment",e.CAPABILITIES="capabilities",e.TRANSACTION="transaction",e.BATCH="batch",e.OPERATION="operation",e))(uae||{});function dae(e){if(typeof window<"u")return window.atob(e);if(typeof Buffer<"u")return Buffer.from(e,"base64").toString("binary");throw new Error("Unable to decode base64")}function fae(e){if(typeof window<"u")return window.btoa(e);if(typeof Buffer<"u")return Buffer.from(e,"binary").toString("base64");throw new Error("Unable to encode base64")}function XP(){let e=new Uint32Array(28);return crypto.getRandomValues(e),jne(e.buffer)}async function pae(e){return crypto.subtle.digest("SHA-256",new TextEncoder().encode(e))}function rD(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function nD(e){var o,a,i;let t={};e=di(e);for(let l of e.entry||[]){(o=l.resource)==null||delete o.meta;let c=(a=l.resource)==null?void 0:a.id;c&&(t[c]=rD(),l.fullUrl="urn:uuid:"+t[c],(i=l.resource)==null||delete i.id)}let r=e.entry,n=JSON.stringify({resourceType:"Bundle",type:"transaction",entry:r==null?void 0:r.map(l=>({fullUrl:l.fullUrl,request:{method:"POST",url:l.resource.resourceType},resource:l.resource}))},(l,c)=>mae(l,c,t),2);return hae(JSON.parse(n))}function mae(e,t,r){if(e==="reference"&&typeof t=="string"){let n;if(t.includes("/")?n=t.split("/")[1]:t.startsWith("urn:uuid:")?n=t.slice(9):t.startsWith("#")&&(n=t.slice(1)),n){let o=r[n];if(o)return"urn:uuid:"+o}}return t}function hae(e){let t=vae(e),{sorted:r,cycles:n}=gae(t),o={};for(let i of e.entry||[])i.fullUrl&&(o[i.fullUrl]=i);let a=r.map(i=>o[i]);for(let i of n)for(let l of i){let c=o[l],u={...c,request:{...c.request,method:"PUT"}};a.push(u)}return{...e,entry:a}}function gae(e){let t=[],r={},n=[];for(let a of Object.keys(e))r[a]=0;function o(a,i){if(r[a]===2)return!0;if(r[a]===1){let c=i.lastIndexOf(a);return c!==-1&&n.push(i.slice(c)),!0}r[a]=1,i.push(a);let l=!1;for(let c of e[a])o(c,i)||(l=!0);return r[a]=2,i.pop(),t.unshift(a),!l}for(let a in e)r[a]===0&&o(a,[]);return{sorted:t,cycles:n}}function oD(e,t){for(let r in e)if(e[r]&&typeof e[r]=="object"){let n=e[r];if(pi(n)){let o=n.reference;o.startsWith("urn:uuid:")&&t(o)}else oD(n,t)}}function vae(e){let t={};for(let r of e.entry||[])r.fullUrl&&(t[r.fullUrl]=[]);for(let r of e.entry||[]){let n=r.fullUrl;r.resource&&oD(r.resource,o=>{t[o]&&t[o].push(n)})}return t}var yae=class{constructor(t=10){this.max=t,this.cache=new Map}clear(){this.cache.clear()}get(t){let r=this.cache.get(t);return r&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){this.cache.has(t)?this.cache.delete(t):this.cache.size>=this.max&&this.cache.delete(this.first()),this.cache.set(t,r)}delete(t){this.cache.delete(t)}keys(){return this.cache.keys()}first(){return this.cache.keys().next().value}},Jt={CSS:"text/css",FAVICON:"image/vnd.microsoft.icon",FHIR_JSON:"application/fhir+json",FORM_URL_ENCODED:"application/x-www-form-urlencoded",HL7_V2:"x-application/hl7-v2+er7",HTML:"text/html",JAVASCRIPT:"text/javascript",JSON:"application/json",JSON_PATCH:"application/json-patch+json",PNG:"image/png",SVG:"image/svg+xml",TEXT:"text/plain",TYPESCRIPT:"text/typescript"},aD=class{constructor(){this.listeners={}}addEventListener(t,r){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(r)}removeEventListener(t,r){let n=this.listeners[t];if(n){for(let o=0;o<n.length;o++)if(n[o]===r){n.splice(o,1);return}}}dispatchEvent(t){let r=this.listeners[t.type];if(r)for(let n of r)n.call(this,t);return!t.defaultPrevented}},wae=class{constructor(){this.emitter=new aD}dispatchEvent(e){this.emitter.dispatchEvent(e)}addEventListener(e,t){this.emitter.addEventListener(e,t)}removeEventListener(e,t){this.emitter.removeEventListener(e,t)}},Lv={"patient-open":"patient-open","patient-close":"patient-close","imagingstudy-open":"imagingstudy-open","imagingstudy-close":"imagingstudy-close"},bae=["Patient","Encounter","ImagingStudy"],_ae={"patient-open":["Patient"],"patient-close":["Patient"],"imagingstudy-open":["Patient","ImagingStudy"],"imagingstudy-close":["Patient","ImagingStudy"]},xae={"patient-open":["Encounter"],"patient-close":["Encounter"],"imagingstudy-open":[],"imagingstudy-close":[]};function Eae(e){return bae.includes(e)}var Sae={ImagingStudy:"study",Patient:"patient",Encounter:"encounter"};function iD(e){return!!e.endpoint}function JP(e){if(!l1(e))throw new Be(Lt("subscriptionRequest must be an object conforming to SubscriptionRequest type."));let{channelType:t,mode:r,topic:n,events:o}=e,a={"hub.channel.type":t,"hub.mode":r,"hub.topic":n,"hub.events":o.join(",")};return iD(e)&&(a.endpoint=e.endpoint),new URLSearchParams(a).toString()}function l1(e){if(typeof e!="object")return!1;let{channelType:t,mode:r,topic:n,events:o}=e;if(!(t&&r&&n&&o)||typeof n!="string"||typeof o!="object"||!Array.isArray(o)||o.length<1||t!=="websocket"||r!=="subscribe"&&r!=="unsubscribe")return!1;for(let a of o)if(!Lv[a])return!1;return!(iD(e)&&!(typeof e.endpoint=="string"&&e.endpoint.startsWith("ws")))}function Pae(e,t,r,n){if(!(t.key&&typeof t.key=="string"))throw new Be(Lt(`context[${r}] is invalid. Context must contain a key.`));if(n.has(t.key))throw new Be(Lt(`context[${r}] is invalid. Key ${t.key} has already been used in a previous context.`));if(n.add(t.key),typeof t.resource!="object")throw new Be(Lt(`context[${r}] is invalid. Context must contain a single valid FHIR resource! Resource is not an object.`));if(!(t.resource.id&&typeof t.resource.id=="string"))throw new Be(Lt(`context[${r}] is invalid. Resource must contain a valid string ID.`));if(!t.resource.resourceType)throw new Be(Lt(`context[${r}] is invalid. Resource must contain a resource type. No resource type found.`));let o=t.resource.resourceType;if(!Eae(o))throw new Be(Lt(`context[${r}] is invalid. Resource must contain a valid FHIRcast resource type. Resource type is not a known resource type.`));let a=_ae[e],i=xae[e],l;if(r<a.length?l=a[r]:r-a.length<i.length&&(l=i[r-a.length]),l&&o!==l)throw new Be(Lt(`context[${r}] is invalid. context[${r}] for the '${e}' event should contain resource of type ${l}.`));let c=Sae[o];if(c!==t.key)throw new Be(Lt(`context[${r}] is invalid. Context key for type ${o} must be ${c}.`))}function $ae(e,t){let r=new Set;for(let n=0;n<t.length;n++)Pae(e,t[n],n,r)}function Oae(e,t,r){if(!(e&&typeof e=="string"))throw new Be(Lt("Must provide a topic."));if(!Lv[t])throw new Be(Lt(`Must provide a valid FHIRcast event name. Supported events: ${Object.keys(Lv).join(", ")}`));if(typeof r!="object")throw new Be(Lt("context must be a context object or array of context objects."));let n=Array.isArray(r)?r:[r];return $ae(t,n),{timestamp:new Date().toISOString(),id:rD(),event:{"hub.topic":e,"hub.event":t,context:n}}}var Cae=class extends wae{constructor(e){if(super(),this.subRequest=e,!e.endpoint)throw new Be(Lt("Subscription request should contain an endpoint."));if(!l1(e))throw new Be(Lt("Subscription request failed validation."));let t=new WebSocket(e.endpoint);t.addEventListener("open",()=>{this.dispatchEvent({type:"connect"}),t.addEventListener("message",r=>{let n=JSON.parse(r.data);if(n["hub.topic"])return;let o=n;this.dispatchEvent({type:"message",payload:o}),t.send(JSON.stringify({id:n==null?void 0:n.id,timestamp:new Date().toISOString()}))}),t.addEventListener("close",()=>{this.dispatchEvent({type:"disconnect"})})}),this.websocket=t}disconnect(){this.websocket.close()}};function kae(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=dae(t),n=Array.from(r).reduce((a,i)=>{let l=("00"+i.charCodeAt(0).toString(16)).slice(-2);return`${a}%${l}`},""),o=decodeURIComponent(n);return JSON.parse(o)}function jae(e){return e.split(".").length===3}function lD(e){let[t,r,n]=e.split(".");return kae(r)}function Rae(e){try{return typeof lD(e).login_id=="string"}catch{return!1}}var sD,oo=class{constructor(e){this[sD]="ReadablePromise",this.status="pending",this.suspender=e.then(t=>(this.status="success",this.response=t,t),t=>{throw this.status="error",this.error=t,t})}isPending(){return this.status==="pending"}isOk(){return this.status==="success"}read(){switch(this.status){case"pending":throw this.suspender;case"error":throw this.error;default:return this.response}}then(e,t){return this.suspender.then(e,t)}catch(e){return this.suspender.catch(e)}finally(e){return this.suspender.finally(e)}};sD=Symbol.toStringTag;var Tae=class{constructor(){this.storage=typeof localStorage<"u"?localStorage:new Iae}clear(){this.storage.clear()}getString(e){return this.storage.getItem(e)??void 0}setString(e,t){t?this.storage.setItem(e,t):this.storage.removeItem(e)}getObject(e){let t=this.getString(e);return t?JSON.parse(t):void 0}setObject(e,t){this.setString(e,t?dr(t):void 0)}},Iae=class{constructor(){this.data=new Map}get length(){return this.data.size}clear(){this.data.clear()}getItem(t){return this.data.get(t)??null}setItem(t,r){r?this.data.set(t,r):this.data.delete(t)}removeItem(t){this.data.delete(t)}key(t){return Array.from(this.data.keys())[t]}},Dae="2.1.10-7f173b06",Nae=Jt.FHIR_JSON+", */*; q=0.1",Aae="https://api.medplum.com/",Mae=1e3,Lae=6e4,ZP="Binary/",e$={resourceType:"Device",id:"system",deviceName:[{name:"System"}]},zae=(e=>(e.ClientCredentials="client_credentials",e.AuthorizationCode="authorization_code",e.RefreshToken="refresh_token",e.JwtBearer="urn:ietf:params:oauth:grant-type:jwt-bearer",e.TokenExchange="urn:ietf:params:oauth:grant-type:token-exchange",e))(zae||{}),Fae=(e=>(e.AccessToken="urn:ietf:params:oauth:token-type:access_token",e.RefreshToken="urn:ietf:params:oauth:token-type:refresh_token",e.IdToken="urn:ietf:params:oauth:token-type:id_token",e.Saml1Token="urn:ietf:params:oauth:token-type:saml1",e.Saml2Token="urn:ietf:params:oauth:token-type:saml2",e))(Fae||{}),Vae=(e=>(e.JwtBearer="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",e))(Vae||{}),Bae=class extends aD{constructor(t){if(super(),t!=null&&t.baseUrl&&!t.baseUrl.startsWith("http"))throw new Error("Base URL must start with http or https");if(this.options=t??{},this.fetch=(t==null?void 0:t.fetch)??Uae(),this.storage=(t==null?void 0:t.storage)??new Tae,this.createPdfImpl=t==null?void 0:t.createPdf,this.baseUrl=r$((t==null?void 0:t.baseUrl)??Aae),this.fhirBaseUrl=r$(ju(this.baseUrl,(t==null?void 0:t.fhirUrlPath)??"fhir/R4/")),this.authorizeUrl=ju(this.baseUrl,(t==null?void 0:t.authorizeUrl)??"oauth2/authorize"),this.tokenUrl=ju(this.baseUrl,(t==null?void 0:t.tokenUrl)??"oauth2/token"),this.logoutUrl=ju(this.baseUrl,(t==null?void 0:t.logoutUrl)??"oauth2/logout"),this.clientId=(t==null?void 0:t.clientId)??"",this.clientSecret=(t==null?void 0:t.clientSecret)??"",this.onUnauthenticated=t==null?void 0:t.onUnauthenticated,this.cacheTime=(t==null?void 0:t.cacheTime)??Lae,this.cacheTime>0?this.requestCache=new yae((t==null?void 0:t.resourceCacheSize)??Mae):this.requestCache=void 0,t!=null&&t.autoBatchTime?(this.autoBatchTime=t.autoBatchTime,this.autoBatchQueue=[]):(this.autoBatchTime=0,this.autoBatchQueue=void 0),t==null?void 0:t.accessToken)this.setAccessToken(t.accessToken);else{let r=this.getActiveLogin();r&&(this.setAccessToken(r.accessToken,r.refreshToken),this.refreshProfile().catch(console.log))}this.setupStorageListener()}getBaseUrl(){return this.baseUrl}getAuthorizeUrl(){return this.authorizeUrl}getTokenUrl(){return this.tokenUrl}getLogoutUrl(){return this.logoutUrl}clear(){this.storage.clear(),this.clearActiveLogin()}clearActiveLogin(){var t;this.storage.setString("activeLogin",void 0),(t=this.requestCache)==null||t.clear(),this.accessToken=void 0,this.refreshToken=void 0,this.sessionDetails=void 0,this.medplumServer=void 0,this.dispatchEvent({type:"change"})}invalidateUrl(t){var r;t=t.toString(),(r=this.requestCache)==null||r.delete(t)}invalidateAll(){var t;(t=this.requestCache)==null||t.clear()}invalidateSearches(t){let r=this.fhirBaseUrl+t;if(this.requestCache)for(let n of this.requestCache.keys())(n.endsWith(r)||n.includes(r+"?"))&&this.requestCache.delete(n)}get(t,r={}){t=t.toString();let n=this.getCacheEntry(t,r);if(n)return n.value;let o;t.startsWith(this.fhirBaseUrl)&&this.autoBatchQueue?o=new Promise((i,l)=>{this.autoBatchQueue.push({method:"GET",url:t.replace(this.fhirBaseUrl,""),options:r,resolve:i,reject:l}),this.autoBatchTimerId||(this.autoBatchTimerId=setTimeout(()=>this.executeAutoBatch(),this.autoBatchTime))}):o=this.request("GET",t,r);let a=new oo(o);return this.setCacheEntry(t,a),a}post(t,r,n,o={}){return t=t.toString(),this.setRequestBody(o,r),n&&this.setRequestContentType(o,n),this.invalidateUrl(t),this.request("POST",t,o)}put(t,r,n,o={}){return t=t.toString(),this.setRequestBody(o,r),n&&this.setRequestContentType(o,n),this.invalidateUrl(t),this.request("PUT",t,o)}patch(t,r,n={}){return t=t.toString(),this.setRequestBody(n,r),this.setRequestContentType(n,Jt.JSON_PATCH),this.invalidateUrl(t),this.request("PATCH",t,n)}delete(t,r){return t=t.toString(),this.invalidateUrl(t),this.request("DELETE",t,r)}async startNewUser(t,r){let{codeChallengeMethod:n,codeChallenge:o}=await this.startPkce();return this.post("auth/newuser",{...t,clientId:t.clientId??this.clientId,codeChallengeMethod:n,codeChallenge:o},void 0,r)}async startNewProject(t,r){return this.post("auth/newproject",t,void 0,r)}async startNewPatient(t,r){return this.post("auth/newpatient",t,void 0,r)}async startLogin(t,r){return this.post("auth/login",{...await this.ensureCodeChallenge(t),clientId:t.clientId??this.clientId,scope:t.scope},void 0,r)}async startGoogleLogin(t,r){return this.post("auth/google",{...await this.ensureCodeChallenge(t),clientId:t.clientId??this.clientId,scope:t.scope},void 0,r)}async ensureCodeChallenge(t){return t.codeChallenge?t:{...t,...await this.startPkce()}}async signOut(){await this.post(this.logoutUrl,{}),this.clear()}async signInWithRedirect(t){let r=new URLSearchParams(window.location.search).get("code");if(r)return this.processCode(r);await this.requestAuthorization(t)}signOutWithRedirect(){window.location.assign(this.logoutUrl)}async signInWithExternalAuth(t,r,n,o){let a=await this.ensureCodeChallenge(o);window.location.assign(this.getExternalAuthRedirectUri(t,r,n,a))}async exchangeExternalAccessToken(t,r){if(r=r??this.clientId,!r)throw new Error("MedplumClient is missing clientId");let n=new URLSearchParams;return n.set("grant_type","urn:ietf:params:oauth:grant-type:token-exchange"),n.set("subject_token_type","urn:ietf:params:oauth:token-type:access_token"),n.set("client_id",r),n.set("subject_token",t),this.fetchTokens(n)}getExternalAuthRedirectUri(t,r,n,o){let{codeChallenge:a,codeChallengeMethod:i}=o;if(!i)throw new Error("`LoginRequest` for external auth must include a `codeChallengeMethod`.");if(!a)throw new Error("`LoginRequest` for external auth must include a `codeChallenge`.");let l=new URL(t);return l.searchParams.set("response_type","code"),l.searchParams.set("client_id",r),l.searchParams.set("redirect_uri",n),l.searchParams.set("scope","openid profile email"),l.searchParams.set("state",JSON.stringify(o)),l.searchParams.set("code_challenge_method",i),l.searchParams.set("code_challenge",a),l.toString()}fhirUrl(...t){return new URL(t.join("/"),this.fhirBaseUrl)}fhirSearchUrl(t,r){let n=this.fhirUrl(t);return r&&(n.search=new URLSearchParams(r).toString()),n}search(t,r,n){let o=this.fhirSearchUrl(t,r),a=o.toString()+"-search",i=this.getCacheEntry(a,n);if(i)return i.value;let l=new oo((async()=>{let c=await this.get(o,n);if(c.entry)for(let u of c.entry)this.cacheResource(u.resource);return c})());return this.setCacheEntry(a,l),l}searchOne(t,r,n){let o=this.fhirSearchUrl(t,r);o.searchParams.set("_count","1"),o.searchParams.sort();let a=o.toString()+"-searchOne",i=this.getCacheEntry(a,n);if(i)return i.value;let l=new oo(this.search(t,o.searchParams,n).then(c=>{var u,d;return(d=(u=c.entry)==null?void 0:u[0])==null?void 0:d.resource}));return this.setCacheEntry(a,l),l}searchResources(t,r,n){let o=this.fhirSearchUrl(t,r).toString()+"-searchResources",a=this.getCacheEntry(o,n);if(a)return a.value;let i=new oo(this.search(t,r,n).then(o$));return this.setCacheEntry(o,i),i}async*searchResourcePages(t,r,n){var a,i;let o=this.fhirSearchUrl(t,r);for(;o;){let l=new URL(o).searchParams,c=await this.search(t,l,n),u=(a=c.link)==null?void 0:a.find(d=>d.relation==="next");if(!((i=c.entry)!=null&&i.length)&&!u)break;yield o$(c),o=u!=null&&u.url?new URL(u.url):void 0}}searchValueSet(t,r,n){let o=this.fhirUrl("ValueSet","$expand");return o.searchParams.set("url",t),o.searchParams.set("filter",r),this.get(o.toString(),n)}getCached(t,r){var o,a;let n=(a=(o=this.requestCache)==null?void 0:o.get(this.fhirUrl(t,r).toString()))==null?void 0:a.value;return n!=null&&n.isOk()?n.read():void 0}getCachedReference(t){let r=t.reference;if(!r)return;if(r==="system")return e$;let[n,o]=r.split("/");if(!(!n||!o))return this.getCached(n,o)}readResource(t,r,n){return this.get(this.fhirUrl(t,r),n)}readReference(t,r){let n=t.reference;if(!n)return new oo(Promise.reject(new Error("Missing reference")));if(n==="system")return new oo(Promise.resolve(e$));let[o,a]=n.split("/");return!o||!a?new oo(Promise.reject(new Error("Invalid reference"))):this.readResource(o,a,r)}requestSchema(t){if(uoe(t))return Promise.resolve();let r=t+"-requestSchema",n=this.getCacheEntry(r,void 0);if(n)return n.value;let o=new oo((async()=>{let a=`{
|
|
90
|
+
StructureDefinitionList(name: "${t}") {
|
|
91
|
+
resourceType,
|
|
92
|
+
name,
|
|
93
|
+
kind,
|
|
94
|
+
description,
|
|
95
|
+
snapshot {
|
|
96
|
+
element {
|
|
97
|
+
id,
|
|
98
|
+
path,
|
|
99
|
+
definition,
|
|
100
|
+
min,
|
|
101
|
+
max,
|
|
102
|
+
base {
|
|
103
|
+
path,
|
|
104
|
+
min,
|
|
105
|
+
max
|
|
106
|
+
},
|
|
107
|
+
contentReference,
|
|
108
|
+
type {
|
|
109
|
+
code,
|
|
110
|
+
targetProfile
|
|
111
|
+
},
|
|
112
|
+
binding {
|
|
113
|
+
strength,
|
|
114
|
+
valueSet
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
SearchParameterList(base: "${t}", _count: 100) {
|
|
120
|
+
base,
|
|
121
|
+
code,
|
|
122
|
+
type,
|
|
123
|
+
expression,
|
|
124
|
+
target
|
|
125
|
+
}
|
|
126
|
+
}`.replace(/\s+/g," "),i=await this.graphql(a);soe(i.data.StructureDefinitionList);for(let l of i.data.SearchParameterList)moe(l)})());return this.setCacheEntry(r,o),o}readHistory(t,r,n){return this.get(this.fhirUrl(t,r,"_history"),n)}readVersion(t,r,n,o){return this.get(this.fhirUrl(t,r,"_history",n),o)}readPatientEverything(t,r){return this.get(this.fhirUrl("Patient",t,"$everything"),r)}createResource(t,r){if(!t.resourceType)throw new Error("Missing resourceType");return this.invalidateSearches(t.resourceType),this.post(this.fhirUrl(t.resourceType),t,void 0,r)}async createResourceIfNoneExist(t,r,n){return await this.searchOne(t.resourceType,r,n)??this.createResource(t,n)}async createAttachment(t,r,n,o){let a=await this.createBinary(t,r,n,o);return{contentType:n,url:a.url,title:r}}createBinary(t,r,n,o){let a=this.fhirUrl("Binary");return r&&a.searchParams.set("_filename",r),o?this.uploadwithProgress(a,t,n,o):this.post(a,t,n)}uploadwithProgress(t,r,n,o){return new Promise((a,i)=>{let l=new XMLHttpRequest;l.responseType="json",l.onabort=()=>i(new Error("Request aborted")),l.onerror=()=>i(new Error("Request error")),o&&(l.upload.onprogress=c=>o(c),l.upload.onload=c=>o(c)),l.onload=()=>{l.status>=200&&l.status<300?a(l.response):i(new Be(st(l.response||l.statusText)))},l.open("POST",t),l.withCredentials=!0,l.setRequestHeader("Authorization","Bearer "+this.accessToken),l.setRequestHeader("Cache-Control","no-cache, no-store, max-age=0"),l.setRequestHeader("Content-Type",n),l.setRequestHeader("X-Medplum","extended"),l.send(r)})}async createPdf(t,r,n,o){if(!this.createPdfImpl)throw new Error("PDF creation not enabled");let a=await this.createPdfImpl(t,n,o);return this.createBinary(a,r,"application/pdf")}createComment(t,r,n){let o=this.getProfile(),a,i;return t.resourceType==="Encounter"&&(a=ut(t),i=t.subject),t.resourceType==="ServiceRequest"&&(a=t.encounter,i=t.subject),t.resourceType==="Patient"&&(i=ut(t)),this.createResource({resourceType:"Communication",basedOn:[ut(t)],encounter:a,subject:i,sender:o?ut(o):void 0,sent:new Date().toISOString(),payload:[{contentString:r}]},n)}async updateResource(t,r){if(!t.resourceType)throw new Error("Missing resourceType");if(!t.id)throw new Error("Missing id");this.invalidateSearches(t.resourceType);let n=await this.put(this.fhirUrl(t.resourceType,t.id),t,void 0,r);return n||(n=t),this.cacheResource(n),n}patchResource(t,r,n,o){return this.invalidateSearches(t),this.patch(this.fhirUrl(t,r),n,o)}deleteResource(t,r,n){return this.deleteCacheEntry(this.fhirUrl(t,r).toString()),this.invalidateSearches(t),this.delete(this.fhirUrl(t,r),n)}validateResource(t,r){return this.post(this.fhirUrl(t.resourceType,"$validate"),t,void 0,r)}executeBot(t,r,n,o){let a;if(typeof t=="string"){let i=t;a=this.fhirUrl("Bot",i,"$execute")}else{let i=t;a=this.fhirUrl("Bot","$execute")+`?identifier=${i.system}|${i.value}`}return this.post(a,r,n,o)}executeBatch(t,r){return this.post(this.fhirBaseUrl.slice(0,-1),t,void 0,r)}sendEmail(t,r){return this.post("email/v1/send",t,Jt.JSON,r)}graphql(t,r,n,o){return this.post(this.fhirUrl("$graphql"),{query:t,operationName:r,variables:n},Jt.JSON,o)}readResourceGraph(t,r,n,o){return this.get(`${this.fhirUrl(t,r)}/$graph?graph=${n}`,o)}pushToAgent(t,r,n,o,a){return this.post(this.fhirUrl("Agent",W0(t),"$push"),{destination:Je(r),body:n,contentType:o},Jt.FHIR_JSON,a)}getActiveLogin(){return this.storage.getObject("activeLogin")}async setActiveLogin(t){var r,n;(!((r=this.sessionDetails)!=null&&r.profile)||Je(this.sessionDetails.profile)!==((n=t.profile)==null?void 0:n.reference))&&this.clearActiveLogin(),this.setAccessToken(t.accessToken,t.refreshToken),this.storage.setObject("activeLogin",t),this.addLogin(t),this.refreshPromise=void 0,await this.refreshProfile()}getAccessToken(){return this.accessToken}setAccessToken(t,r){this.accessToken=t,this.refreshToken=r,this.sessionDetails=void 0,this.medplumServer=Rae(t)}getLogins(){return this.storage.getObject("logins")??[]}addLogin(t){let r=this.getLogins().filter(n=>{var o,a;return((o=n.profile)==null?void 0:o.reference)!==((a=t.profile)==null?void 0:a.reference)});r.push(t),this.storage.setObject("logins",r)}async refreshProfile(){return this.medplumServer?(this.profilePromise=new Promise((t,r)=>{this.get("auth/me").then(n=>{var a,i;this.profilePromise=void 0;let o=((i=(a=this.sessionDetails)==null?void 0:a.profile)==null?void 0:i.id)!==n.profile.id;this.sessionDetails=n,o&&this.dispatchEvent({type:"change"}),t(n.profile)}).catch(r)}),this.profilePromise):Promise.resolve(void 0)}isLoading(){return!!this.profilePromise}isSuperAdmin(){var t;return!!((t=this.sessionDetails)!=null&&t.project.superAdmin)}isProjectAdmin(){var t;return!!((t=this.sessionDetails)!=null&&t.membership.admin)}getProject(){var t;return(t=this.sessionDetails)==null?void 0:t.project}getProjectMembership(){var t;return(t=this.sessionDetails)==null?void 0:t.membership}getProfile(){var t;return(t=this.sessionDetails)==null?void 0:t.profile}async getProfileAsync(){return this.profilePromise?this.profilePromise:this.sessionDetails?this.sessionDetails.profile:this.refreshProfile()}getUserConfiguration(){var t;return(t=this.sessionDetails)==null?void 0:t.config}getAccessPolicy(){var t;return(t=this.sessionDetails)==null?void 0:t.accessPolicy}async download(t,r={}){this.refreshPromise&&await this.refreshPromise;let n=t.toString();return n.startsWith(ZP)&&(t=this.fhirUrl(n)),this.addFetchOptionsDefaults(r),(await this.fetchWithRetry(t.toString(),r)).blob()}async uploadMedia(t,r,n,o,a){let i=await this.createBinary(t,n,r);return this.createResource({resourceType:"Media",status:"completed",content:{contentType:r,url:ZP+i.id,title:n},...o},a)}async bulkExport(t="",r,n,o){let a=t&&`${t}/`,i=this.fhirUrl(`${a}$export`);return r&&i.searchParams.set("_type",r),n&&i.searchParams.set("_since",n),this.startAsyncRequest(i.toString(),o)}async startAsyncRequest(t,r={}){this.addFetchOptionsDefaults(r);let n=r.headers;n.Prefer="respond-async";let o=await this.fetchWithRetry(t,r);if(o.status===202){let a=await n$(o);if(a)return this.pollStatus(a)}return this.parseResponse(o,"POST",t)}getCacheEntry(t,r){if(!this.requestCache||(r==null?void 0:r.cache)==="no-cache"||(r==null?void 0:r.cache)==="reload")return;let n=this.requestCache.get(t);if(!(!n||n.requestTime+this.cacheTime<Date.now()))return n}setCacheEntry(t,r){this.requestCache&&this.requestCache.set(t,{requestTime:Date.now(),value:r})}cacheResource(t){var r,n;t!=null&&t.id&&!((n=(r=t.meta)==null?void 0:r.tag)!=null&&n.some(o=>o.code==="SUBSETTED"))&&this.setCacheEntry(this.fhirUrl(t.resourceType,t.id).toString(),new oo(Promise.resolve(t)))}deleteCacheEntry(t){this.requestCache&&this.requestCache.delete(t)}async request(t,r,n={}){this.refreshPromise&&await this.refreshPromise,n.method=t,this.addFetchOptionsDefaults(n);let o=await this.fetchWithRetry(r,n);return this.parseResponse(o,t,r,n)}async parseResponse(t,r,n,o={}){var u;if(t.status===401)return this.handleUnauthenticated(r,n,o);if(t.status===204||t.status===304)return;let a=(u=t.headers.get("content-type"))==null?void 0:u.includes("json");if(t.status===404&&!a)throw new Be(noe);let i=t.headers.get("content-location"),l=o.redirect??this.options.redirect;if(t.status===201&&i&&l==="follow")return this.request("GET",i,{...o,body:void 0});let c;if(a)try{c=await t.json()}catch(d){throw console.error("Error parsing response",t.status,d),d}else c=await t.text();if(t.status>=400)throw new Be(st(c));return c}async fetchWithRetry(t,r){t.startsWith("http")||(t=new URL(t,this.baseUrl).href);let n=3,o=200,a;for(let i=0;i<n;i++){try{if(this.options.verbose&&this.logRequest(t,r),a=await this.fetch(t,r),this.options.verbose&&this.logResponse(a),a.status<500)return a}catch(l){this.retryCatch(i,n,l)}await VP(o)}return a}logRequest(t,r){if(console.log(`> ${r.method} ${t}`),r.headers){let n=r.headers,o=Object.entries(n).sort((a,i)=>a[0].localeCompare(i[0]));for(let[a,i]of o)console.log(`> ${a}: ${i}`)}}logResponse(t){console.log(`< ${t.status} ${t.statusText}`),t.headers&&t.headers.forEach((r,n)=>console.log(`< ${n}: ${r}`))}async pollStatus(t){let r=!0,n,o=2e3;for(;r;){let a={};this.addFetchOptionsDefaults(a);let i=await this.fetchWithRetry(t,a);if(i.status!==202&&(r=!1,n=i,i.status===201)){let l=await n$(i);l&&(n=await this.fetchWithRetry(l,a))}await VP(o)}return this.parseResponse(n,"POST",t)}async executeAutoBatch(){var o,a;let t=[...this.autoBatchQueue];if(this.autoBatchQueue.length=0,this.autoBatchTimerId=void 0,t.length===1){let i=t[0];try{i.resolve(await this.request(i.method,this.fhirBaseUrl+i.url,i.options))}catch(l){i.reject(new Be(st(l)))}return}let r={resourceType:"Bundle",type:"batch",entry:t.map(i=>({request:{method:i.method,url:i.url},resource:i.options.body?JSON.parse(i.options.body):void 0}))},n=await this.post(this.fhirBaseUrl.slice(0,-1),r);for(let i=0;i<t.length;i++){let l=t[i],c=(o=n.entry)==null?void 0:o[i];(a=c==null?void 0:c.response)!=null&&a.outcome&&!Q4(c.response.outcome)?l.reject(new Be(c.response.outcome)):l.resolve(c==null?void 0:c.resource)}}addFetchOptionsDefaults(t){let r=t.headers;r||(r={},t.headers=r),r.Accept||(r.Accept=Nae),r["X-Medplum"]="extended",t.body&&!r["Content-Type"]&&(r["Content-Type"]=Jt.FHIR_JSON),this.accessToken?r.Authorization="Bearer "+this.accessToken:this.basicAuth&&(r.Authorization="Basic "+this.basicAuth),t.cache||(t.cache="no-cache"),t.credentials||(t.credentials="include")}setRequestContentType(t,r){t.headers||(t.headers={});let n=t.headers;n["Content-Type"]=r}setRequestBody(t,r){typeof r=="string"||typeof Blob<"u"&&r instanceof Blob||typeof File<"u"&&r instanceof File||typeof Uint8Array<"u"&&r instanceof Uint8Array?t.body=r:r&&(t.body=JSON.stringify(r))}handleUnauthenticated(t,r,n){return this.refresh()?this.request(t,r,n):(this.clearActiveLogin(),this.onUnauthenticated&&this.onUnauthenticated(),Promise.reject(new Error("Unauthenticated")))}async startPkce(){let t=XP();sessionStorage.setItem("pkceState",t);let r=XP();sessionStorage.setItem("codeVerifier",r);let n=await pae(r),o=Rne(n).replaceAll("+","-").replaceAll("/","_").replaceAll("=","");return sessionStorage.setItem("codeChallenge",o),{codeChallengeMethod:"S256",codeChallenge:o}}async requestAuthorization(t){let r=await this.ensureCodeChallenge(t??{}),n=new URL(this.authorizeUrl);n.searchParams.set("response_type","code"),n.searchParams.set("state",sessionStorage.getItem("pkceState")),n.searchParams.set("client_id",r.clientId??this.clientId),n.searchParams.set("redirect_uri",r.redirectUri??t$()),n.searchParams.set("code_challenge_method",r.codeChallengeMethod),n.searchParams.set("code_challenge",r.codeChallenge),n.searchParams.set("scope",r.scope??"openid profile"),window.location.assign(n.toString())}processCode(t,r){let n=new URLSearchParams;if(n.set("grant_type","authorization_code"),n.set("code",t),n.set("client_id",(r==null?void 0:r.clientId)??this.clientId),n.set("redirect_uri",(r==null?void 0:r.redirectUri)??t$()),typeof sessionStorage<"u"){let o=sessionStorage.getItem("codeVerifier");o&&n.set("code_verifier",o)}return this.fetchTokens(n)}refresh(){if(this.refreshPromise)return this.refreshPromise;if(this.refreshToken){let t=new URLSearchParams;return t.set("grant_type","refresh_token"),t.set("client_id",this.clientId),t.set("refresh_token",this.refreshToken),this.refreshPromise=this.fetchTokens(t),this.refreshPromise}if(this.clientId&&this.clientSecret)return this.refreshPromise=this.startClientLogin(this.clientId,this.clientSecret),this.refreshPromise}async startClientLogin(t,r){this.clientId=t,this.clientSecret=r;let n=new URLSearchParams;return n.set("grant_type","client_credentials"),n.set("client_id",t),n.set("client_secret",r),this.fetchTokens(n)}async startJwtBearerLogin(t,r,n){this.clientId=t;let o=new URLSearchParams;return o.set("grant_type","urn:ietf:params:oauth:grant-type:jwt-bearer"),o.set("client_id",t),o.set("assertion",r),o.set("scope",n),this.fetchTokens(o)}async startJwtAssertionLogin(t){let r=new URLSearchParams;return r.append("grant_type","client_credentials"),r.append("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),r.append("client_assertion",t),this.fetchTokens(r)}setBasicAuth(t,r){this.clientId=t,this.clientSecret=r,this.basicAuth=fae(t+":"+r)}async fhircastSubscribe(t,r){if(!(typeof t=="string"&&t!==""))throw new Be(Lt("Invalid topic provided. Topic must be a valid string."));if(!(typeof r=="object"&&Array.isArray(r)&&r.length>0))throw new Be(Lt("Invalid events provided. Events must be an array of event names containing at least one event."));let n={channelType:"websocket",mode:"subscribe",topic:t,events:r},o=(await this.post("/fhircast/STU2",JP(n),Jt.FORM_URL_ENCODED))["hub.channel.endpoint"];if(!o)throw new Error("Invalid response!");return n.endpoint=o,n}async fhircastUnsubscribe(t){if(!l1(t))throw new Be(Lt("Invalid topic or subscriptionRequest. SubscriptionRequest must be an object."));if(!(t.endpoint&&typeof t.endpoint=="string"&&t.endpoint.startsWith("ws")))throw new Be(Lt("Provided subscription request must have an endpoint in order to unsubscribe."));t.mode="unsubscribe",await this.post("/fhircast/STU2",JP(t),Jt.FORM_URL_ENCODED)}fhircastConnect(t){return new Cae(t)}async fhircastPublish(t,r,n){return this.post(`/fhircast/STU2/${t}`,Oae(t,r,n),Jt.JSON)}async invite(t,r){return this.post("admin/projects/"+t+"/invite",r)}async fetchTokens(t){let r={method:"POST",headers:{"Content-Type":Jt.FORM_URL_ENCODED},body:t.toString(),credentials:"include"},n=r.headers;this.basicAuth&&(n.Authorization=`Basic ${this.basicAuth}`);let o=await this.fetchWithRetry(this.tokenUrl,r);if(!o.ok){this.clearActiveLogin();try{let i=await o.json();throw new Be(Ba(i.error_description))}catch(i){throw new Be(Ba("Failed to fetch tokens"),i)}}let a=await o.json();return await this.verifyTokens(a),this.getProfile()}async verifyTokens(t){let r=t.access_token;if(jae(r)){let n=lD(r);if(Date.now()>=n.exp*1e3)throw this.clearActiveLogin(),new Error("Token expired");if(n.cid){if(n.cid!==this.clientId)throw this.clearActiveLogin(),new Error("Token was not issued for this audience")}else if(this.clientId&&n.client_id!==this.clientId)throw this.clearActiveLogin(),new Error("Token was not issued for this audience")}return this.setActiveLogin({accessToken:r,refreshToken:t.refresh_token,project:t.project,profile:t.profile})}setupStorageListener(){try{window.addEventListener("storage",t=>{(t.key===null||t.key==="activeLogin")&&window.location.reload()})}catch{}}retryCatch(t,r,n){if(n.message==="Failed to fetch"&&t===1&&this.dispatchEvent({type:"offline"}),t>=r-1)throw n}};function Uae(){if(!globalThis.fetch)throw new Error("Fetch not available in this environment");return globalThis.fetch.bind(globalThis)}function t$(){return typeof window>"u"?"":window.location.protocol+"//"+window.location.host+"/"}function r$(e){return e.endsWith("/")?e:e+"/"}function ju(e,t){return new URL(t,e).toString()}async function n$(e){var o,a;let t=e.headers.get("content-location");if(t)return t;let r=e.headers.get("location");if(r)return r;let n=await e.json();if(Qm(n)&&((a=(o=n.issue)==null?void 0:o[0])!=null&&a.diagnostics))return n.issue[0].diagnostics}function o$(e){var r;let t=((r=e.entry)==null?void 0:r.map(n=>n.resource))??[];return Object.assign(t,{bundle:e})}[...r1];n1().registerInfix("->",{precedence:Fe.Arrow}).registerInfix(";",{precedence:Fe.Semicolon});[...r1];n1();var cD=f.createContext(void 0);function Ym(){return f.useContext(cD)}function ne(){return Ym().medplum}function Xm(){return Ym().navigate}function uD(){return Ym().profile}function Wae(e){let t=e.medplum,r=e.navigate??Hae,[n,o]=f.useState({profile:t.getProfile(),loading:!1});f.useEffect(()=>{function i(){o({...n,profile:t.getProfile()})}return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[t,n]);let a=f.useMemo(()=>({...n,medplum:t,navigate:r}),[n,t,r]);return s.createElement(cD.Provider,{value:a},e.children)}function Hae(e){window.location.assign(e)}function tt(e,t){let r=ne(),[n,o]=f.useState(a$(r,e)),a=f.useCallback(i=>{qm(i,n)||o(i)},[n,o]);return f.useEffect(()=>{a(a$(r,e))},[r,e,a]),f.useEffect(()=>{let i=!0;return pi(e)&&r.readReference(e).then(l=>{i&&a(l)}).catch(l=>{i&&(a(void 0),t&&t(st(l)))}),()=>i=!1},[r,n,e,a,t]),n}function a$(e,t){if(t){if(Ro(t))return t;if(pi(t))return e.getCachedReference(t)}}function vl(e,t){return qae("searchResources",e,t)}function qae(e,t,r){let n=ne(),[o,a]=f.useState(),[i,l]=f.useState(!1),[c,u]=f.useState(),[d,p]=f.useState();return f.useEffect(()=>{let h=n.fhirSearchUrl(t,r).toString();h!==o&&(a(h),n[e](t,r).then(g=>{l(!1),u(g),p(roe)}).catch(g=>{l(!1),u(void 0),p(st(g))}))},[n,e,t,r,o,u]),[c,i,d]}function Gae(e){let t=e.value;return t?s.createElement(s.Fragment,null,Ine(t)):null}function i$(e,t){return e.line&&e.line.length>t?e.line[t]:""}function l$(e,t,r){let n=e.line||[];for(;n.length<=t;)n.push("");return n[t]=r,{...e,line:n}}function Qae(e){let[t,r]=f.useState(e.defaultValue||{}),n=f.useRef();n.current=t;function o(h){r(h),e.onChange&&e.onChange(h)}function a(h){o({...n.current,use:h})}function i(h){o({...n.current,type:h})}function l(h){o(l$(n.current||{},0,h))}function c(h){o(l$(n.current||{},1,h))}function u(h){o({...n.current,city:h})}function d(h){o({...n.current,state:h})}function p(h){o({...n.current,postalCode:h})}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(dt,{"data-testid":"address-use",defaultValue:t.use,onChange:h=>a(h.currentTarget.value),data:["","home","work","temp","old","billing"]}),s.createElement(dt,{"data-testid":"address-type",defaultValue:t.type,onChange:h=>i(h.currentTarget.value),data:["","postal","physical","both"]}),s.createElement(ae,{placeholder:"Line 1",defaultValue:i$(t,0),onChange:h=>l(h.currentTarget.value)}),s.createElement(ae,{placeholder:"Line 2",defaultValue:i$(t,1),onChange:h=>c(h.currentTarget.value)}),s.createElement(ae,{placeholder:"City",defaultValue:t.city,onChange:h=>u(h.currentTarget.value)}),s.createElement(ae,{placeholder:"State",defaultValue:t.state,onChange:h=>d(h.currentTarget.value)}),s.createElement(ae,{placeholder:"Postal Code",defaultValue:t.postalCode,onChange:h=>p(h.currentTarget.value)}))}function Kae(e){let t=uD(),[r,n]=f.useState(e.defaultValue||{}),o=f.useRef();o.current=r;function a(i){let l=i?{text:i,authorReference:t&&ut(t),time:new Date().toISOString()}:{};n(l),e.onChange&&e.onChange(l)}return s.createElement(ae,{name:e.name,placeholder:"Annotation text",defaultValue:r.text,onChange:i=>a(i.currentTarget.value)})}var Yae={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"},Xae=Object.defineProperty,Jae=Object.defineProperties,Zae=Object.getOwnPropertyDescriptors,Bp=Object.getOwnPropertySymbols,dD=Object.prototype.hasOwnProperty,fD=Object.prototype.propertyIsEnumerable,s$=(e,t,r)=>t in e?Xae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c$=(e,t)=>{for(var r in t||(t={}))dD.call(t,r)&&s$(e,r,t[r]);if(Bp)for(var r of Bp(t))fD.call(t,r)&&s$(e,r,t[r]);return e},eie=(e,t)=>Jae(e,Zae(t)),tie=(e,t)=>{var r={};for(var n in e)dD.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Bp)for(var n of Bp(e))t.indexOf(n)<0&&fD.call(e,n)&&(r[n]=e[n]);return r},_e=(e,t,r)=>{let n=f.forwardRef((o,a)=>{var i=o,{color:l="currentColor",size:c=24,stroke:u=2,children:d}=i,p=tie(i,["color","size","stroke","children"]);return f.createElement("svg",c$(eie(c$({ref:a},Yae),{width:c,height:c,stroke:l,strokeWidth:u,className:`tabler-icon tabler-icon-${e}`}),p),[...r.map(([h,g])=>f.createElement(h,g)),...d||[]])});return n.propTypes={color:$e.string,size:$e.oneOfType([$e.string,$e.number]),stroke:$e.oneOfType([$e.string,$e.number])},n.displayName=`${t}`,n},rie=_e("adjustments-horizontal","IconAdjustmentsHorizontal",[["path",{d:"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M4 6l8 0",key:"svg-1"}],["path",{d:"M16 6l4 0",key:"svg-2"}],["path",{d:"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M4 12l2 0",key:"svg-4"}],["path",{d:"M10 12l10 0",key:"svg-5"}],["path",{d:"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-6"}],["path",{d:"M4 18l11 0",key:"svg-7"}],["path",{d:"M19 18l1 0",key:"svg-8"}]]),s1=_e("alert-circle","IconAlertCircle",[["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"}]]),nie=_e("arrow-down","IconArrowDown",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 13l-6 6",key:"svg-1"}],["path",{d:"M6 13l6 6",key:"svg-2"}]]),oie=_e("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]),aie=_e("bleach-off","IconBleachOff",[["path",{d:"M5 19h14m1.986 -1.977a2 2 0 0 0 -.146 -.773l-7.1 -12.25a2 2 0 0 0 -3.5 0l-.815 1.405m-1.488 2.568l-4.797 8.277a2 2 0 0 0 1.75 2.75",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),iie=_e("bleach","IconBleach",[["path",{d:"M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75",key:"svg-0"}]]),lie=_e("box-multiple","IconBoxMultiple",[["path",{d:"M7 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2",key:"svg-1"}]]),sie=_e("brackets-contain","IconBracketsContain",[["path",{d:"M7 4h-4v16h4",key:"svg-0"}],["path",{d:"M17 4h4v16h-4",key:"svg-1"}],["path",{d:"M8 16h.01",key:"svg-2"}],["path",{d:"M12 16h.01",key:"svg-3"}],["path",{d:"M16 16h.01",key:"svg-4"}]]),cie=_e("bucket-off","IconBucketOff",[["path",{d:"M5.029 5.036c-.655 .58 -1.029 1.25 -1.029 1.964c0 2.033 3.033 3.712 6.96 3.967m3.788 -.21c3.064 -.559 5.252 -2.029 5.252 -3.757c0 -2.21 -3.582 -4 -8 -4c-1.605 0 -3.1 .236 -4.352 .643",key:"svg-0"}],["path",{d:"M4 7c0 .664 .088 1.324 .263 1.965l2.737 10.035c.5 1.5 2.239 2 5 2s4.5 -.5 5 -2c.1 -.3 .252 -.812 .457 -1.535m.862 -3.146c.262 -.975 .735 -2.76 1.418 -5.354a7.45 7.45 0 0 0 .263 -1.965",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),uie=_e("bucket","IconBucket",[["path",{d:"M12 7m-8 0a8 4 0 1 0 16 0a8 4 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 7c0 .664 .088 1.324 .263 1.965l2.737 10.035c.5 1.5 2.239 2 5 2s4.5 -.5 5 -2c.333 -1 1.246 -4.345 2.737 -10.035a7.45 7.45 0 0 0 .263 -1.965",key:"svg-1"}]]),Oa=_e("calendar","IconCalendar",[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]]),pD=_e("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),die=_e("checkbox","IconCheckbox",[["path",{d:"M9 11l3 3l8 -8",key:"svg-0"}],["path",{d:"M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9",key:"svg-1"}]]),fie=_e("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),Up=_e("circle-minus","IconCircleMinus",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l6 0",key:"svg-1"}]]),c1=_e("circle-plus","IconCirclePlus",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M12 9v6",key:"svg-2"}]]),mD=_e("cloud-upload","IconCloudUpload",[["path",{d:"M7 18a4.6 4.4 0 0 1 0 -9a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-1",key:"svg-0"}],["path",{d:"M9 15l3 -3l3 3",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}]]),pie=_e("columns","IconColumns",[["path",{d:"M4 6l5.5 0",key:"svg-0"}],["path",{d:"M4 10l5.5 0",key:"svg-1"}],["path",{d:"M4 14l5.5 0",key:"svg-2"}],["path",{d:"M4 18l5.5 0",key:"svg-3"}],["path",{d:"M14.5 6l5.5 0",key:"svg-4"}],["path",{d:"M14.5 10l5.5 0",key:"svg-5"}],["path",{d:"M14.5 14l5.5 0",key:"svg-6"}],["path",{d:"M14.5 18l5.5 0",key:"svg-7"}]]),mie=_e("copy","IconCopy",[["path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2",key:"svg-1"}]]),hie=_e("currency-dollar","IconCurrencyDollar",[["path",{d:"M16.7 8a3 3 0 0 0 -2.7 -2h-4a3 3 0 0 0 0 6h4a3 3 0 0 1 0 6h-4a3 3 0 0 1 -2.7 -2",key:"svg-0"}],["path",{d:"M12 3v3m0 12v3",key:"svg-1"}]]),gie=_e("dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),vie=_e("edit","IconEdit",[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]),Jm=_e("equal-not","IconEqualNot",[["path",{d:"M5 10h14",key:"svg-0"}],["path",{d:"M5 14h14",key:"svg-1"}],["path",{d:"M5 19l14 -14",key:"svg-2"}]]),Zm=_e("equal","IconEqual",[["path",{d:"M5 10h14",key:"svg-0"}],["path",{d:"M5 14h14",key:"svg-1"}]]),u$=_e("file-alert","IconFileAlert",[["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 2z",key:"svg-1"}],["path",{d:"M12 17l.01 0",key:"svg-2"}],["path",{d:"M12 11l0 3",key:"svg-3"}]]),yie=_e("file-plus","IconFilePlus",[["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 2z",key:"svg-1"}],["path",{d:"M12 11l0 6",key:"svg-2"}],["path",{d:"M9 14l6 0",key:"svg-3"}]]),wie=_e("filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]),bie=_e("list-details","IconListDetails",[["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 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-4"}],["path",{d:"M3 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-5"}]]),_ie=_e("logout","IconLogout",[["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"}]]),hD=_e("math-greater","IconMathGreater",[["path",{d:"M5 18l14 -6l-14 -6",key:"svg-0"}]]),gD=_e("math-lower","IconMathLower",[["path",{d:"M19 18l-14 -6l14 -6",key:"svg-0"}]]),xie=_e("message","IconMessage",[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z",key:"svg-2"}]]),Eie=_e("pin","IconPin",[["path",{d:"M15 4.5l-4 4l-4 1.5l-1.5 1.5l7 7l1.5 -1.5l1.5 -4l4 -4",key:"svg-0"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-1"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-2"}]]),Sie=_e("pinned-off","IconPinnedOff",[["path",{d:"M3 3l18 18",key:"svg-0"}],["path",{d:"M15 4.5l-3.249 3.249m-2.57 1.433l-2.181 .818l-1.5 1.5l7 7l1.5 -1.5l.82 -2.186m1.43 -2.563l3.25 -3.251",key:"svg-1"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-2"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-3"}]]),Pie=_e("plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]),$ie=_e("refresh","IconRefresh",[["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"}]]),Oie=_e("search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]),zv=_e("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),u1=_e("sort-ascending","IconSortAscending",[["path",{d:"M4 6l7 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l9 0",key:"svg-2"}],["path",{d:"M15 9l3 -3l3 3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),d1=_e("sort-descending","IconSortDescending",[["path",{d:"M4 6l9 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l7 0",key:"svg-2"}],["path",{d:"M15 15l3 3l3 -3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),Cie=_e("square","IconSquare",[["path",{d:"M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}]]),kie=_e("switch-horizontal","IconSwitchHorizontal",[["path",{d:"M16 3l4 4l-4 4",key:"svg-0"}],["path",{d:"M10 7l10 0",key:"svg-1"}],["path",{d:"M8 13l-4 4l4 4",key:"svg-2"}],["path",{d:"M4 17l9 0",key:"svg-3"}]]),jie=_e("table-export","IconTableExport",[["path",{d:"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}],["path",{d:"M16 19h6",key:"svg-3"}],["path",{d:"M19 16l3 3l-3 3",key:"svg-4"}]]),vD=_e("trash","IconTrash",[["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"}]]),Rie=_e("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]),yD=class extends s.Component{constructor(e){super(e),this.state={}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){return this.state.error?s.createElement(pc,{icon:s.createElement(s1,{size:16}),title:"Something went wrong",color:"red"},Oe(this.state.error)):this.props.children}};function jn(){return s.createElement(tr,{style:{width:"100%",height:"100vh"}},s.createElement(un,null))}function f1(e){let t=e.value;return t?s.createElement(s.Fragment,null,Ec(t,e.options)):null}function it(e){e.preventDefault(),e.stopPropagation()}function wD(e){if(d$(e))return!0;if(e instanceof HTMLTableCellElement){let t=e.children;if(t.length===1&&d$(t[0]))return!0}return!1}function d$(e){return e instanceof HTMLInputElement&&e.type==="checkbox"}function Re(e){let t=Xm(),{to:r,suffix:n,label:o,onClick:a,children:i,...l}=e,c=Tie(r);return n&&(c+="/"+n),s.createElement(Ae,{href:c,"aria-label":o,onClick:u=>{it(u),a?a(u):r&&t(c)},...l},i)}function Tie(e){if(e){if(typeof e=="string")return Iie(e);if(Ro(e))return Die(e);if(pi(e))return Nie(e)}return"#"}function Iie(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:"/"+e}function Die(e){return`/${e.resourceType}/${e.id}`}function Nie(e){return`/${e.reference}`}function da(e){let t=tt(e.value),r=t?xo(t):e.alt??"",n=(t&&Sne(t))??e.src,o=e.radius??"xl",a={...e};return delete a.value,delete a.link,e.link?s.createElement(Re,{to:t},s.createElement(yf,{src:n,alt:r,radius:o,...a})):s.createElement(yf,{src:n,alt:r,radius:o,...a})}function p1(e){let{defaultValue:t,toKey:r,toOption:n,loadOptions:o,onChange:a,onCreate:i,creatable:l,...c}=e,u=Aie(t),d=f.useRef(null),[p,h]=f.useState(),[g,y]=f.useState(),[v,E]=f.useState(),[w,b]=f.useState(),[_,x]=f.useState(u.map(n)),[S,$]=f.useState([]),O=f.useRef();O.current=p;let C=f.useRef();C.current=g;let T=f.useRef();T.current=v;let k=f.useRef();k.current=w;let I=f.useRef();I.current=S;let j=f.useCallback(()=>{var V;y(void 0);let R=((V=d.current)==null?void 0:V.value.trim())||"";if(R===O.current)return;h(R);let A=new AbortController;E(A),o(R,A.signal).then(Q=>{A.signal.aborted||($(Q.map(n)),E(void 0),k.current&&(Q.length>0&&a(Q.slice(0,1)),b(!1)))}).catch(Q=>{A.signal.aborted||Q.message.includes("aborted")||de({color:"red",message:Oe(Q)})})},[o,a,n]),N=f.useCallback(()=>{T.current&&(T.current.abort(),E(void 0)),C.current!==void 0&&window.clearTimeout(C.current);let R=window.setTimeout(()=>j(),100);y(R)},[j]),D=f.useCallback(R=>{var Q;let A=[],V=[];for(let ie of R){let Ce=(Q=I.current)==null?void 0:Q.find(Me=>Me.value===ie),ue=Ce==null?void 0:Ce.resource;!ue&&l!==!1&&i&&(ue=i(ie),Ce=n(ue)),ue&&A.push(ue),Ce&&V.push(Ce)}a(A),x(V)},[l,a,i,n]),z=f.useCallback(R=>{R.key==="Enter"&&(!C.current&&!T.current?(it(R),I.current&&I.current.length>0&&($(I.current.slice(0,1)),D([I.current[0].value]))):b(!0))},[D]),W=f.useCallback(R=>{let A=n(i(R));return $([...I.current,A]),A},[i,$,n]),K=f.useCallback((R,A)=>!A,[]);return f.useEffect(()=>()=>{T.current&&T.current.abort()},[]),s.createElement(M0,{...c,ref:d,defaultValue:u.map(r),searchable:!0,onKeyDown:z,onSearchChange:N,data:[..._,...S],onFocus:j,onChange:D,onCreate:W,rightSectionWidth:40,rightSection:v?s.createElement(un,{size:16}):null,filter:K,creatable:!0})}function Aie(e){return e?Array.isArray(e)?e:[e]:[]}var Mie=H(()=>({searchInput:{input:{width:220,transition:"width 0.2s"},"input:focus":{width:400},"@media (max-width: 800px)":{input:{width:150},"input:focus":{width:150}}}}));function Lie(e){return e.id}function zie(e){return{value:e.id,label:xo(e),resource:e}}function Fie(e){let{classes:t}=Mie(),r=Xm(),n=ne(),o=f.useCallback(async(i,l)=>{let c=Bie(i),u={signal:l},d=await n.graphql(c,void 0,void 0,u);return Uie(d,i)},[n]),a=f.useCallback(i=>{i.length>0&&r(`/${Je(i[0])}`)},[r]);return s.createElement(p1,{key:`${e.pathname}?${e.searchParams}`,size:"sm",radius:"md",className:t.searchInput,icon:s.createElement(Oie,{size:16}),placeholder:"Search",itemComponent:Vie,toKey:Lie,toOption:zie,onChange:a,loadOptions:o,maxSelectedValues:0,clearSearchOnChange:!0,clearable:!1})}var Vie=f.forwardRef(({resource:e,...t},r)=>{var o;let n;return e.resourceType==="Patient"?n=e.birthDate:e.resourceType==="ServiceRequest"&&(n=(o=e.subject)==null?void 0:o.display),s.createElement("div",{ref:r,...t},s.createElement(J,{noWrap:!0},s.createElement(da,{value:e}),s.createElement("div",null,s.createElement(oe,null,xo(e)),s.createElement(oe,{size:"xs",color:"dimmed"},n))))});function Bie(e){let t=JSON.stringify(e);return N4(e)?`{
|
|
127
|
+
Patients1: PatientList(_id: ${t}, _count: 1) {
|
|
128
|
+
resourceType
|
|
129
|
+
id
|
|
130
|
+
identifier {
|
|
131
|
+
system
|
|
132
|
+
value
|
|
133
|
+
}
|
|
134
|
+
name {
|
|
135
|
+
given
|
|
136
|
+
family
|
|
137
|
+
}
|
|
138
|
+
birthDate
|
|
139
|
+
}
|
|
140
|
+
ServiceRequestList(_id: ${t}, _count: 1) {
|
|
141
|
+
resourceType
|
|
142
|
+
id
|
|
143
|
+
identifier {
|
|
144
|
+
system
|
|
145
|
+
value
|
|
146
|
+
}
|
|
147
|
+
subject {
|
|
148
|
+
display
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}`.replace(/\s+/g," "):`{
|
|
152
|
+
Patients1: PatientList(name: ${t}, _count: 5) {
|
|
153
|
+
resourceType
|
|
154
|
+
id
|
|
155
|
+
identifier {
|
|
156
|
+
system
|
|
157
|
+
value
|
|
158
|
+
}
|
|
159
|
+
name {
|
|
160
|
+
given
|
|
161
|
+
family
|
|
162
|
+
}
|
|
163
|
+
birthDate
|
|
164
|
+
}
|
|
165
|
+
Patients2: PatientList(identifier: ${t}, _count: 5) {
|
|
166
|
+
resourceType
|
|
167
|
+
id
|
|
168
|
+
identifier {
|
|
169
|
+
system
|
|
170
|
+
value
|
|
171
|
+
}
|
|
172
|
+
name {
|
|
173
|
+
given
|
|
174
|
+
family
|
|
175
|
+
}
|
|
176
|
+
birthDate
|
|
177
|
+
}
|
|
178
|
+
ServiceRequestList(identifier: ${t}, _count: 5) {
|
|
179
|
+
resourceType
|
|
180
|
+
id
|
|
181
|
+
identifier {
|
|
182
|
+
system
|
|
183
|
+
value
|
|
184
|
+
}
|
|
185
|
+
subject {
|
|
186
|
+
display
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}`.replace(/\s+/g," ")}function Uie(e,t){let r=[];return e.data.Patients1&&r.push(...e.data.Patients1),e.data.Patients2&&r.push(...e.data.Patients2),e.data.ServiceRequestList&&r.push(...e.data.ServiceRequestList),Hie(Wie(r),t).slice(0,5)}function Wie(e){let t=new Set,r=[];for(let n of e)t.has(n.id)||(t.add(n.id),r.push(n));return r}function Hie(e,t){return e.sort((r,n)=>f$(n,t)-f$(r,t))}function f$(e,t){let r=0;if(e.identifier)for(let n of e.identifier)r=Math.max(r,p$(n.value,t));if(e.resourceType==="Patient"&&e.name)for(let n of e.name)r=Math.max(r,p$(Ec(n),t));return r}function p$(e,t){if(!e)return 0;let r=e.toLowerCase().indexOf(t.toLowerCase());return r<0?0:100-r}var qie=H(e=>({logoButton:{padding:`${e.spacing.xs} ${e.spacing.sm}`,borderRadius:e.radius.sm,transition:"background-color 100ms ease","&:hover":{backgroundColor:e.fn.lighten(e.fn.variant({variant:"filled",color:e.primaryColor}).background,.8)}},user:{padding:`${e.spacing.xs} ${e.spacing.sm}`,borderRadius:e.radius.sm,transition:"background-color 100ms ease","&:hover":{backgroundColor:e.fn.lighten(e.fn.variant({variant:"filled",color:e.primaryColor}).background,.8)}},userName:{fontWeight:500,lineHeight:1,marginRight:3,[e.fn.smallerThan("xs")]:{display:"none"}},userActive:{backgroundColor:e.fn.lighten(e.fn.variant({variant:"filled",color:e.primaryColor}).background,.8)}}));function Gie(e){var d,p,h,g;let t=Ym(),{medplum:r,profile:n,navigate:o}=t,a=r.getLogins(),{classes:i,cx:l}=qie(),[c,u]=f.useState(!1);return s.createElement(uj,{height:60,p:8,style:{zIndex:101}},s.createElement(J,{position:"apart"},s.createElement(J,{spacing:"xs"},s.createElement(ho,{className:i.logoButton,onClick:e.navbarToggle},e.logo),!e.headerSearchDisabled&&s.createElement(Fie,{pathname:e.pathname,searchParams:e.searchParams})),s.createElement(X,{width:260,shadow:"xl",position:"bottom-end",transitionProps:{transition:"pop-top-right"},opened:c,onClose:()=>u(!1)},s.createElement(X.Target,null,s.createElement(ho,{className:l(i.user,{[i.userActive]:c}),onClick:()=>u(y=>!y)},s.createElement(J,{spacing:7},s.createElement(da,{value:n,radius:"xl",size:24}),s.createElement(oe,{size:"sm",className:i.userName},Ec((d=n==null?void 0:n.name)==null?void 0:d[0])),s.createElement(fie,{size:12,stroke:1.5})))),s.createElement(X.Dropdown,null,s.createElement(je,{align:"center",p:"xl"},s.createElement(da,{size:"xl",radius:100,value:t.profile}),s.createElement(f1,{value:(h=(p=t.profile)==null?void 0:p.name)==null?void 0:h[0]}),s.createElement(oe,{color:"dimmed",size:"xs"},(g=r.getActiveLogin())==null?void 0:g.project.display)),a.length>1&&s.createElement(X.Divider,null),a.map(y=>y.profile.reference!==Je(t.profile)&&s.createElement(X.Item,{key:y.profile.reference,onClick:()=>{r.setActiveLogin(y).then(()=>window.location.reload()).catch(console.log)}},s.createElement(J,null,s.createElement(yf,{radius:"xl"}),s.createElement("div",{style:{flex:1}},s.createElement(oe,{size:"sm",weight:500},y.profile.display),s.createElement(oe,{color:"dimmed",size:"xs"},y.project.display))))),s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(kie,{size:14,stroke:1.5}),onClick:()=>o("/signin")},"Add another account"),s.createElement(X.Item,{icon:s.createElement(zv,{size:14,stroke:1.5}),onClick:()=>o(`/${Je(n)}`)},"Account settings"),s.createElement(X.Item,{icon:s.createElement(_ie,{size:14,stroke:1.5}),onClick:async()=>{await r.signOut(),o("/signin")}},"Sign out"),s.createElement(oe,{size:"xs",color:"dimmed",align:"center"},e.version)))))}function Qie(e){let t={};for(let r of Array.from(e.elements))r instanceof HTMLInputElement?Kie(t,r):r instanceof HTMLTextAreaElement?t[r.name]=r.value:r instanceof HTMLSelectElement&&Yie(t,r);return t}function Kie(e,t){t.disabled||(t.type==="checkbox"||t.type==="radio")&&!t.checked||(e[t.name]=t.value)}function Yie(e,t){e[t.name]=t.value}function De(e){return s.createElement("form",{style:e.style,"data-testid":e.testid,onSubmit:t=>{t.preventDefault();let r=Qie(t.target);e.onSubmit&&e.onSubmit(r)}},e.children)}function Xie(e){let t=ne(),r=t.getUserConfiguration();function n(o){var u,d,p;let{menuname:a,bookmarkname:i}=o,l=`${e.pathname}?${e.searchParams.toString()}`,c=di(r);(p=(d=(u=c.menu)==null?void 0:u.find(({title:h})=>h===a))==null?void 0:d.link)==null||p.push({name:i,target:l}),t.updateResource(c).then(h=>{r.menu=h.menu,t.dispatchEvent({type:"change"}),de({color:"green",message:"Success"}),e.onOk()}).catch(h=>{de({color:"red",message:Oe(h)})})}return s.createElement(jr,{title:"Add Bookmark",closeButtonProps:{"aria-label":"Close"},opened:e.visible,onClose:e.onCancel},s.createElement(De,{onSubmit:n},s.createElement(je,null,s.createElement(Jie,{config:r}),s.createElement(ae,{label:"Bookmark Name",type:"text",name:"bookmarkname",placeholder:"Bookmark Name",withAsterisk:!0}),s.createElement(J,{position:"right"},s.createElement(ee,{mt:"sm",type:"submit"},"OK")))))}function Jie(e){function t(n){var o;return(o=n==null?void 0:n.menu)==null?void 0:o.map(a=>a.title)}let r=t(e.config);return s.createElement(dt,{name:"menuname",defaultValue:r[0],label:"Select Menu Option",placeholder:"Menu",data:r,withAsterisk:!0})}function m1(e){return typeof e.code=="string"?e.code:JSON.stringify(e)}function Zie(e){return typeof e.display=="string"?e.display:m1(e)}function ele(e){return{value:m1(e),label:Zie(e),resource:e}}function tle(e){return{code:e,display:e}}function h1(e){let t=ne(),{binding:r,creatable:n,clearable:o,...a}=e,i=f.useCallback(async(l,c)=>{var p;if(!r)return[];let u=(p=(await t.searchValueSet(r,l,{signal:c})).expansion)==null?void 0:p.contains,d=[];for(let h of u)h.code&&!d.some(g=>g.code===h.code)&&d.push(h);return d},[t,r]);return s.createElement(p1,{...a,creatable:n??!0,clearable:o??!0,toKey:m1,toOption:ele,loadOptions:i,onCreate:tle,getCreateLabel:n===!1?void 0:l=>`+ Create ${l}`})}function bD(e){let[t,r]=f.useState(e.defaultValue);function n(o){let a=o[0],i=nle(a);r(i),e.onChange&&e.onChange(i)}return s.createElement(h1,{binding:e.binding,name:e.name,placeholder:e.placeholder,defaultValue:rle(t),onChange:n,creatable:e.creatable,maxSelectedValues:e.maxSelectedValues??1,clearSearchOnChange:e.clearSearchOnChange,clearable:e.clearable})}function rle(e){return e?{code:e}:void 0}function nle(e){return e==null?void 0:e.code}function g1(e){let[t,r]=f.useState(e.defaultValue),n=e.onChange,o=f.useCallback(a=>{r(a),n&&n(a)},[n]);return s.createElement(bD,{"data-autofocus":e.autoFocus,"data-testid":e.testId,defaultValue:t,onChange:o,name:e.name,placeholder:e.placeholder,binding:"https://medplum.com/fhir/ValueSet/resource-types",creatable:!1,maxSelectedValues:0,clearSearchOnChange:!0,clearable:!1})}var _D=H(e=>({menuTitle:{margin:"20px 0 4px 6px",fontSize:"9px",fontWeight:"normal",textTransform:"uppercase",letterSpacing:"2px"},link:{...e.fn.focusStyles(),display:"flex",alignItems:"center",textDecoration:"none",fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7],padding:"8px 12px",borderRadius:e.radius.sm,fontWeight:500,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],color:e.colorScheme==="dark"?e.white:e.black,textDecoration:"none","& svg":{color:e.colorScheme==="dark"?e.white:e.black}},"& svg":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],marginRight:e.spacing.sm,strokeWidth:1.5,width:18,height:18}},linkActive:{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:e.primaryColor}).background,color:e.fn.variant({variant:"light",color:e.primaryColor}).color,"& svg":{color:e.fn.variant({variant:"light",color:e.primaryColor}).color}}}}));function ole(e){var c;let{classes:t}=_D(),r=Xm(),n=lle(e.pathname,e.searchParams,e.menus),[o,a]=f.useState(!1);function i(u,d){u.stopPropagation(),u.preventDefault(),r(d),window.innerWidth<768&&e.closeNavbar()}function l(u){u&&r(`/${u}`)}return s.createElement(s.Fragment,null,s.createElement($s,{width:{sm:250},p:"xs"},s.createElement(ai,null,!e.resourceTypeSearchDisabled&&s.createElement($s.Section,{mb:"sm"},s.createElement(g1,{key:window.location.pathname,name:"resourceType",placeholder:"Resource Type",onChange:u=>l(u)})),s.createElement($s.Section,{grow:!0},(c=e.menus)==null?void 0:c.map(u=>{var d;return s.createElement(s.Fragment,{key:`menu-${u.title}`},s.createElement(oe,{className:t.menuTitle},u.title),(d=u.links)==null?void 0:d.map(p=>s.createElement(ale,{key:p.href,to:p.href,active:p.href===(n==null?void 0:n.href),onClick:h=>i(h,p.href)},s.createElement(ile,{to:p.href,icon:p.icon}),s.createElement("span",null,p.label))))}),e.displayAddBookmark&&s.createElement(ee,{variant:"subtle",size:"xs",mt:"xl",leftIcon:s.createElement(Pie,{size:"0.75rem"}),onClick:()=>a(!0)},"Add Bookmark")))),e.pathname&&e.searchParams&&s.createElement(Xie,{pathname:e.pathname,searchParams:e.searchParams,visible:o,onOk:()=>a(!1),onCancel:()=>a(!1)}))}function ale(e){let{classes:t,cx:r}=_D();return s.createElement(Re,{onClick:e.onClick,to:e.to,className:r(t.link,{[t.linkActive]:e.active})},e.children)}function ile(e){return e.icon?e.icon:s.createElement(Hm,{w:30})}function lle(e,t,r){if(!e||!t||!r)return;let n,o=0;for(let a of r)if(a.links)for(let i of a.links){let l=sle(e,t,i.href);l>o&&(o=l,n=i)}return n}function sle(e,t,r){let n=new URL(r,"https://example.com");if(e!==n.pathname)return 0;let o=["_count","_offset"];for(let[i,l]of n.searchParams.entries())if(!o.includes(i)&&t.get(i)!==l)return 0;let a=1;for(let[i,l]of t.entries())o.includes(i)||n.searchParams.get(i)===l&&a++;return a}function cle(e){var u;let t=or(),[r,n]=f.useState(localStorage.navbarOpen==="true"),o=ne(),a=uD();f.useEffect(()=>{function d(){de({color:"red",message:"No connection to server",autoClose:!1})}return o.addEventListener("offline",d),()=>o.removeEventListener("offline",d)},[o]);function i(d){localStorage.navbarOpen=d.toString(),n(d)}function l(){i(!1)}function c(){i(!r)}return o.isLoading()?s.createElement(jn,null):s.createElement(mj,{styles:{main:{background:t.colorScheme==="dark"?t.colors.dark[8]:t.colors.gray[0]}},padding:0,fixed:!0,header:a&&s.createElement(Gie,{pathname:e.pathname,searchParams:e.searchParams,headerSearchDisabled:e.headerSearchDisabled,logo:e.logo,version:e.version,navbarToggle:c}),navbar:a&&r?s.createElement(ole,{pathname:e.pathname,searchParams:e.searchParams,menus:e.menus,closeNavbar:l,displayAddBookmark:e.displayAddBookmark,resourceTypeSearchDisabled:e.resourceTypeSearchDisabled}):void 0},s.createElement(yD,{key:`${e.pathname}?${(u=e.searchParams)==null?void 0:u.toString()}`},s.createElement(f.Suspense,{fallback:s.createElement(jn,null)},e.children)))}function Pc(e){let{contentType:t,url:r,title:n}=e.value??{};return r?s.createElement("div",{"data-testid":"attachment-display"},(t==null?void 0:t.startsWith("image/"))&&s.createElement("img",{"data-testid":"attachment-image",style:{maxWidth:e.maxWidth},src:r,alt:n}),(t==null?void 0:t.startsWith("video/"))&&s.createElement("video",{"data-testid":"attachment-video",style:{maxWidth:e.maxWidth},controls:!0},s.createElement("source",{type:t,src:r})),t==="application/pdf"&&s.createElement("div",{"data-testid":"attachment-pdf",style:{maxWidth:e.maxWidth,minHeight:400}},s.createElement("iframe",{width:"100%",height:"400",src:r+"#navpanes=0",allowFullScreen:!0,frameBorder:0,seamless:!0})),s.createElement("div",{"data-testid":"download-link",style:{padding:"2px 16px 16px 16px"}},s.createElement(Ae,{href:r,"data-testid":"attachment-details",target:"_blank",rel:"noopener noreferrer",download:ule(n)},n||"Download"))):null}function ule(e){return e!=null&&e.includes(".")?e:void 0}function dle(e){var t;return s.createElement("div",null,(t=e.values)==null?void 0:t.map((r,n)=>s.createElement("div",{key:"attatchment-"+n},s.createElement(Pc,{value:r,maxWidth:e.maxWidth}))))}function v1(e){let t=ne(),r=f.useRef(null);function n(i){var l;it(i),(l=r.current)==null||l.click()}function o(i){it(i);let l=i.target.files;l&&Array.from(l).forEach(a)}function a(i){if(!i||!i.name)return;e.onUploadStart&&e.onUploadStart();let l=i.name,c=i.type||"application/octet-stream";t.createBinary(i,l,c,e.onUploadProgress).then(u=>{e.onUpload({contentType:u.contentType,url:u.url,title:l})}).catch(u=>{e.onUploadError&&e.onUploadError(st(u))})}return s.createElement(s.Fragment,null,s.createElement("input",{type:"file","data-testid":"upload-file-input",style:{display:"none"},ref:r,onChange:i=>o(i)}),e.children({onClick:n}))}function fle(e){let[t,r]=f.useState(e.defaultValue??[]),n=f.useRef();n.current=t;function o(a){r(a),e.onChange&&e.onChange(a)}return s.createElement("table",{style:{width:"100%"}},s.createElement("colgroup",null,s.createElement("col",{width:"97%"}),s.createElement("col",{width:"3%"})),s.createElement("tbody",null,t.map((a,i)=>s.createElement("tr",{key:`${i}-${t.length}`},s.createElement("td",null,s.createElement(Pc,{value:a,maxWidth:200})),s.createElement("td",null,s.createElement(ur,{title:"Remove",size:"sm",onClick:l=>{it(l);let c=t.slice();c.splice(i,1),o(c)}},s.createElement(Up,null))))),s.createElement("tr",null,s.createElement("td",null),s.createElement("td",null,s.createElement(v1,{onUpload:a=>{o([...n.current,a])}},a=>s.createElement(ur,{...a,title:"Add",size:"sm",color:"green"},s.createElement(mD,{size:16})))))))}function xD(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return t?s.createElement(s.Fragment,null,s.createElement(Pc,{value:t,maxWidth:200}),s.createElement(ee,{onClick:o=>{it(o),n(void 0)}},"Remove")):s.createElement(v1,{onUpload:n},o=>s.createElement(ee,{...o},"Upload..."))}var ple=H(()=>({root:{"@media (max-width: 800px)":{paddingLeft:4,paddingRight:4}}}));function $c(e){let{children:t,...r}=e,{classes:n}=ple();return s.createElement(CT,{className:n.root,...r},t)}var mle=H((e,{width:t,fill:r})=>({paper:{maxWidth:t,margin:`${e.spacing.xl} auto`,padding:r?0:e.spacing.md,"@media (max-width: 800px)":{padding:r?0:8},"& img":{width:"100%",maxWidth:"100%"},"& video":{width:"100%",maxWidth:"100%"}}})),hle={shadow:"xs",radius:"md",withBorder:!0};function y1(e){let{className:t,children:r,width:n,fill:o,unstyled:a,...i}=G("Panel",hle,e),{classes:l,cx:c}=mle({width:n,fill:o},{name:"Panel",unstyled:a});return s.createElement(Pn,{className:c(l.paper,t),...i},r)}function be(e){let{children:t,...r}=e;return s.createElement($c,null,s.createElement(y1,{...r},t))}function Tn(e){return s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 491 491",style:{width:e.size,height:e.size}},s.createElement("title",null,"Medplum Logo"),s.createElement("path",{fill:e.fill??"#ad7136",d:"M282 67c6-16 16-29 29-40L289 0c-22 17-37 41-43 68l17 23 19-24z"}),s.createElement("path",{fill:e.fill??"#946af9",d:"M311 63c-17 0-33 4-48 11-16-7-32-11-49-11-87 0-158 96-158 214s71 214 158 214c17 0 33-4 49-11 15 7 31 11 48 11 87 0 158-96 158-214S398 63 311 63z"}),s.createElement("path",{fill:e.fill??"#7857c5",d:"M231 489l-17 2c-87 0-158-96-158-214S127 63 214 63l17 1c-39 12-70 102-70 213s31 201 70 212z"}),s.createElement("path",{fill:e.fill??"#40bc26",d:"M207 220a176 176 0 01-177 43A176 176 0 01251 43l1 5c17 59 2 125-45 172z"}),s.createElement("path",{fill:e.fill??"#33961e",d:"M252 48A421 421 0 0057 270l-27-7A176 176 0 01251 43l1 5z"}))}function lt(e,t){var r,n,o;return(o=(n=(r=e==null?void 0:e.issue)==null?void 0:r.filter(a=>{var i;return ED((i=a.expression)==null?void 0:i[0],t)}))==null?void 0:n.map(a=>{var i;return(i=a.details)==null?void 0:i.text}))==null?void 0:o.join(`
|
|
190
|
+
`)}function w1(e,t){var r;return(r=e==null?void 0:e.issue)==null?void 0:r.filter(n=>{var o;return ED((o=n.expression)==null?void 0:o[0],t)})}function ED(e,t){if(e===t)return!0;if(!e||!t)return!1;let r=e.indexOf(".");if(r>=0&&e.substring(r+1)===t)return!0;let n=t.indexOf(".");return n>=0&&t.substring(n+1)===e}function SD(e){let t=ne(),[r,n]=f.useState();return s.createElement(De,{style:{maxWidth:400},onSubmit:async o=>{try{e.handleAuthResponse(await t.startNewProject({login:e.login,projectName:o.projectName}))}catch(a){n(st(a))}}},s.createElement(tr,{sx:{flexDirection:"column"}},s.createElement(Tn,{size:32}),s.createElement(fe,null,"Create project")),s.createElement(je,{spacing:"xl"},s.createElement(ae,{name:"projectName",label:"Project Name",placeholder:"My Project",required:!0,autoFocus:!0,error:lt(r,"firstName")}),s.createElement(oe,{color:"dimmed",size:"xs"},"By clicking submit you agree to the Medplum"," ",s.createElement(Ae,{href:"https://www.medplum.com/privacy"},"Privacy Policy")," and ",s.createElement(Ae,{href:"https://www.medplum.com/terms"},"Terms of Service"),".")),s.createElement(J,{position:"right",mt:"xl",noWrap:!0},s.createElement(ee,{type:"submit"},"Create project")))}function PD(e,t){let r=document.getElementsByTagName("head")[0],n=document.createElement("script");n.async=!0,n.src=e,n.onload=t??null,r.appendChild(n)}function $D(e){let t=ne(),{googleClientId:r,handleGoogleCredential:n}=e,o=f.useRef(null),[a,i]=f.useState(typeof google<"u"),[l,c]=f.useState(!1),[u,d]=f.useState(!1);return f.useEffect(()=>{if(typeof google>"u"){PD("https://accounts.google.com/gsi/client",()=>i(!0));return}l||(google.accounts.id.initialize({client_id:r,callback:n}),c(!0)),o.current&&!u&&(google.accounts.id.renderButton(o.current,{}),d(!0))},[t,r,l,a,o,u,n]),r?s.createElement("div",{ref:o}):null}function OD(e){if(e)return e;if(typeof window<"u"){let t=window.location.protocol+"//"+window.location.host;if(("undefined".split(",")??[]).includes(t))return"__GOOGLE_CLIENT_ID__"}}function ha(e){var r;let t=((r=e.outcome)==null?void 0:r.issue)||e.issues;return!t||t.length===0?null:s.createElement(pc,{icon:s.createElement(s1,{size:16}),color:"red"},t.map(n=>{var o;return s.createElement("div",{"data-testid":"text-field-error",key:(o=n.details)==null?void 0:o.text},Y4(n))}))}function CD(e){typeof grecaptcha>"u"&&PD("https://www.google.com/recaptcha/api.js?render="+e)}function kD(e){return new Promise((t,r)=>{grecaptcha.ready(async()=>{try{t(await grecaptcha.execute(e,{action:"submit"}))}catch(n){r(n)}})})}function gle(e){let t=OD(e.googleClientId),r=e.recaptchaSiteKey,n=ne(),[o,a]=f.useState(),i=w1(o,void 0);return f.useEffect(()=>{r&&CD(r)},[r]),s.createElement(De,{style:{maxWidth:400},onSubmit:async l=>{try{let c="";r&&(c=await kD(r)),e.handleAuthResponse(await n.startNewUser({projectId:e.projectId,clientId:e.clientId,firstName:l.firstName,lastName:l.lastName,email:l.email,password:l.password,remember:l.remember==="true",recaptchaSiteKey:r,recaptchaToken:c}))}catch(c){a(st(c))}}},s.createElement(tr,{sx:{flexDirection:"column"}},e.children),s.createElement(ha,{issues:i}),t&&s.createElement(s.Fragment,null,s.createElement(J,{position:"center",p:"xl",style:{height:70}},s.createElement($D,{googleClientId:t,handleGoogleCredential:async l=>{try{e.handleAuthResponse(await n.startGoogleLogin({googleClientId:l.clientId,googleCredential:l.credential,createUser:!0}))}catch(c){a(st(c))}}})),s.createElement(wr,{label:"or",labelPosition:"center",my:"lg"})),s.createElement(je,{spacing:"xl"},s.createElement(ae,{name:"firstName",type:"text",label:"First name",placeholder:"First name",required:!0,autoFocus:!0,error:lt(o,"firstName")}),s.createElement(ae,{name:"lastName",type:"text",label:"Last name",placeholder:"Last name",required:!0,error:lt(o,"lastName")}),s.createElement(ae,{name:"email",type:"email",label:"Email",placeholder:"name@domain.com",required:!0,error:lt(o,"email")}),s.createElement(po,{name:"password",label:"Password",autoComplete:"off",required:!0,error:lt(o,"password")}),s.createElement(oe,{color:"dimmed",size:"xs"},"By clicking submit you agree to the Medplum"," ",s.createElement(Ae,{href:"https://www.medplum.com/privacy"},"Privacy Policy")," and ",s.createElement(Ae,{href:"https://www.medplum.com/terms"},"Terms of Service"),"."),s.createElement(oe,{color:"dimmed",size:"xs"},"This site is protected by reCAPTCHA and the Google"," ",s.createElement(Ae,{href:"https://policies.google.com/privacy"},"Privacy Policy")," and ",s.createElement(Ae,{href:"https://policies.google.com/terms"},"Terms of Service")," apply.")),s.createElement(J,{position:"apart",mt:"xl",noWrap:!0},s.createElement(kn,{name:"remember",label:"Remember me",size:"xs"}),s.createElement(ee,{type:"submit"},"Create account")))}function vle(e){let{type:t,projectId:r,clientId:n,googleClientId:o,recaptchaSiteKey:a,onSuccess:i}=e,l=ne(),[c,u]=f.useState(),[d,p]=f.useState();f.useEffect(()=>{t==="patient"&&c&&l.startNewPatient({login:c,projectId:r}).then(g=>l.processCode(g.code)).then(()=>i()).catch(g=>p(st(g)))},[l,t,r,c,i]);function h(g){g.code?l.processCode(g.code).then(()=>i()).catch(console.log):g.login&&u(g.login)}return s.createElement(be,{width:450},d&&s.createElement("pre",null,JSON.stringify(d,null,2)),!c&&s.createElement(gle,{projectId:r,clientId:n,googleClientId:o,recaptchaSiteKey:a,handleAuthResponse:h},e.children),c&&t==="project"&&s.createElement(SD,{login:c,handleAuthResponse:h}))}function yle(e){let[t,r]=f.useState();return t?s.createElement(ble,{email:t,...e}):s.createElement(wle,{setEmail:r,...e})}function wle(e){let{setEmail:t,onRegister:r,handleAuthResponse:n,children:o,disableEmailAuth:a,...i}=e,l=ne(),c=!e.disableGoogleAuth&&OD(e.googleClientId),u=f.useCallback(async h=>{if(!h.authorizeUrl)return!1;let g=JSON.stringify({...await l.ensureCodeChallenge(i),domain:h.domain}),y=new URL(h.authorizeUrl);return y.searchParams.set("state",g),window.location.assign(y.toString()),!0},[l,i]),d=f.useCallback(async h=>{let g=await l.post("auth/method",{email:h.email});await u(g)||t(h.email)},[l,u,t]),p=f.useCallback(async h=>{let g=await l.startGoogleLogin({...i,googleCredential:h.credential});await u(g)||n(g)},[l,i,u,n]);return s.createElement(De,{style:{maxWidth:400},onSubmit:d},s.createElement(tr,{sx:{flexDirection:"column"}},o),c&&s.createElement(s.Fragment,null,s.createElement(J,{position:"center",p:"xl",style:{height:70}},s.createElement($D,{googleClientId:c,handleGoogleCredential:p})),!a&&s.createElement(wr,{label:"or",labelPosition:"center",my:"lg"})),!a&&s.createElement(ae,{name:"email",type:"email",label:"Email",placeholder:"name@domain.com",required:!0,autoFocus:!0}),s.createElement(J,{position:"apart",mt:"xl",spacing:0,noWrap:!0},s.createElement("div",null,r&&s.createElement(Ae,{component:"button",type:"button",color:"dimmed",onClick:r,size:"xs"},"Register")),!a&&s.createElement(ee,{type:"submit"},"Next")))}function ble(e){let{onForgotPassword:t,handleAuthResponse:r,children:n,...o}=e,a=ne(),[i,l]=f.useState(),c=w1(i,void 0),u=f.useCallback(d=>{a.startLogin({...o,password:d.password,remember:d.remember==="on"}).then(r).catch(p=>l(st(p)))},[a,o,r]);return s.createElement(De,{style:{maxWidth:400},onSubmit:u},s.createElement(tr,{sx:{flexDirection:"column"}},n),s.createElement(ha,{issues:c}),s.createElement(je,{spacing:"xl"},s.createElement(po,{name:"password",label:"Password",autoComplete:"off",required:!0,autoFocus:!0,error:lt(i,"password")})),s.createElement(J,{position:"apart",mt:"xl",spacing:0,noWrap:!0},t&&s.createElement(Ae,{component:"button",type:"button",color:"dimmed",onClick:t,size:"xs"},"Forgot password"),s.createElement(kn,{id:"remember",name:"remember",label:"Remember me",size:"xs",sx:{lineHeight:1}}),s.createElement(ee,{type:"submit"},"Sign in")))}function _le(e){let t=ne(),[r,n]=f.useState();return s.createElement(je,null,s.createElement(tr,{sx:{flexDirection:"column"}},s.createElement(Tn,{size:32}),s.createElement(fe,{order:3},"Choose profile")),s.createElement(ha,{outcome:r}),e.memberships.map(o=>{var a,i;return s.createElement(ho,{key:o.id,onClick:()=>{t.post("auth/profile",{login:e.login,profile:o.id}).then(e.handleAuthResponse).catch(l=>n(st(l)))}},s.createElement(J,null,s.createElement(yf,{radius:"xl"}),s.createElement("div",{style:{flex:1}},s.createElement(oe,{size:"sm",weight:500},(a=o.profile)==null?void 0:a.display),s.createElement(oe,{color:"dimmed",size:"xs"},(i=o.project)==null?void 0:i.display))))}))}function xle(e){let t=ne();return s.createElement(De,{style:{maxWidth:400},onSubmit:r=>{t.post("auth/scope",{login:e.login,scope:Object.keys(r).join(" ")}).then(e.handleAuthResponse).catch(console.log)}},s.createElement(je,null,s.createElement(tr,{sx:{flexDirection:"column"}},s.createElement(Tn,{size:32}),s.createElement(fe,null,"Choose scope")),s.createElement(je,null,(e.scope??"openid").split(" ").map(r=>s.createElement(kn,{key:r,id:r,name:r,label:r,defaultChecked:!0}))),s.createElement(J,{position:"right",mt:"xl"},s.createElement(ee,{type:"submit"},"Set scope"))))}function Ele(e){let t=ne(),[r,n]=f.useState();return s.createElement(De,{style:{maxWidth:400},onSubmit:o=>{n(void 0),t.post("auth/mfa/verify",{login:e.login,token:o.token}).then(e.handleAuthResponse).catch(a=>n(Oe(a)))}},s.createElement(je,null,s.createElement(tr,{sx:{flexDirection:"column"}},s.createElement(Tn,{size:32}),s.createElement(fe,null,"Enter MFA code")),r&&s.createElement(pc,{icon:s.createElement(s1,{size:16}),title:"Error",color:"red"},r),s.createElement(je,null,s.createElement(ae,{name:"token",label:"MFA code",required:!0})),s.createElement(J,{position:"right",mt:"xl"},s.createElement(ee,{type:"submit"},"Submit code"))))}function jD(e){let{login:t,chooseScopes:r,onSuccess:n,onForgotPassword:o,onRegister:a,onCode:i,...l}=e,c=ne(),[u,d]=f.useState(),[p,h]=f.useState(!1),[g,y]=f.useState(),v=f.useCallback(b=>{i?i(b):c.processCode(b).then(()=>{n&&n()}).catch(_=>de({color:"red",message:Oe(_)}))},[c,i,n]),E=f.useCallback(b=>{h(!!b.mfaRequired),b.login&&d(b.login),b.memberships&&y(b.memberships),b.code&&(r?y(void 0):v(b.code))},[r,v]),w=f.useCallback(b=>{v(b.code)},[v]);return f.useEffect(()=>{t&&!u&&c.get("auth/login/"+t).then(E).catch(b=>de({color:"red",message:Oe(b)}))},[c,t,u,E]),s.createElement(be,{width:450},(()=>u?p?s.createElement(Ele,{login:u,handleAuthResponse:E}):g?s.createElement(_le,{login:u,memberships:g,handleAuthResponse:E}):e.projectId==="new"?s.createElement(SD,{login:u,handleAuthResponse:E}):e.chooseScopes?s.createElement(xle,{login:u,scope:e.scope,handleAuthResponse:w}):s.createElement("div",null,"Success"):s.createElement(yle,{onForgotPassword:o,onRegister:a,handleAuthResponse:E,disableGoogleAuth:e.disableGoogleAuth,disableEmailAuth:e.disableEmailAuth,...l},e.children))())}var RD=["meta","implicitRules","language","text","contained","extension","modifierExtension"],Sle=H(e=>({root:{display:"grid",gridTemplateColumns:"30% 70%",margin:0,"& > dt, & > dd":{padding:`${e.spacing.sm} ${e.spacing.sm}`,borderTop:`0.1px solid ${e.colors.gray[3]}`,margin:0}},compact:{gridTemplateColumns:"20% 80%","& > dt, & > dd":{padding:`0 ${e.spacing.xs} ${e.spacing.xs} 0`,border:0}}}));function b1(e){let{children:t,compact:r}=e,{classes:n,cx:o}=Sle();return s.createElement("dl",{className:o(n.root,{[n.compact]:r})},t)}function rl(e){return s.createElement(s.Fragment,null,s.createElement("dt",null,e.term),s.createElement("dd",null,e.children))}function Kn(e){return s.createElement(s.Fragment,null,q0(e.value))}function Ple(e){return s.createElement(s.Fragment,null,Tl(e.value))}function TD(e){let t=e.value;if(!t)return null;let r=[];return t.value&&r.push(t.value),(t.use||t.system)&&(r.push(" ["),t.use&&r.push(t.use),t.use&&t.system&&r.push(" "),t.system&&r.push(t.system),r.push("]")),s.createElement(s.Fragment,null,r.join("").trim())}function $le(e){var r;let t=e.value;return t?s.createElement(s.Fragment,null,t.name,t.name&&": ",(r=t.telecom)==null?void 0:r.map(n=>s.createElement(TD,{key:`telecom-${t.name}-${n.value}`,value:n}))):null}function Ole(e){var t,r;return s.createElement("div",null,(t=e.value)==null?void 0:t.system,": ",(r=e.value)==null?void 0:r.value)}function Cle(e){return s.createElement(s.Fragment,null,Fne(e.value))}function Fv(e){return s.createElement(s.Fragment,null,Bo(e.value))}function _1(e){return s.createElement(s.Fragment,null,Zs(e.value))}function kle(e){let t=e.value;return t?s.createElement(s.Fragment,null,s.createElement(Fv,{value:t.numerator})," / ",s.createElement(Fv,{value:t.denominator})):null}function Wp(e){if(!e.value)return null;let t=e.value.display||e.value.reference||dr(e.value);return e.link!==!1&&e.value.reference?s.createElement(Re,{to:e.value},t):s.createElement(s.Fragment,null,t)}function jle(e){let{property:t,values:r}=e,n=t.type[0].code;return e.values?s.createElement(s.Fragment,null,r.map((o,a)=>s.createElement("div",{key:`${a}-${r.length}`},s.createElement(So,{arrayElement:!0,property:t,propertyType:n,value:o,ignoreMissingValues:e.ignoreMissingValues,link:e.link})))):s.createElement(s.Fragment,null)}function So(e){var o;let{property:t,propertyType:r,value:n}=e;if((o=t==null?void 0:t.path)!=null&&o.endsWith(".id"))return s.createElement(le,{component:"div",sx:{display:"flex",gap:3,alignItems:"center"}},n,s.createElement(RT,{value:n,timeout:2e3},({copied:a,copy:i})=>s.createElement(DZ,{label:a?"Copied":"Copy",withArrow:!0,position:"right"},s.createElement(ur,{color:a?"teal":"gray",onClick:i},a?s.createElement(pD,{size:"1rem"}):s.createElement(mie,{size:"1rem"})))));if(t!=null&&t.max&&t.max>1&&!e.arrayElement)return r===B.Attachment?s.createElement(dle,{values:n,maxWidth:e.maxWidth}):s.createElement(jle,{property:t,values:n,ignoreMissingValues:e.ignoreMissingValues,link:e.link});switch(r){case B.boolean:return s.createElement(s.Fragment,null,n===void 0?"":(!!n).toString());case B.SystemString:case B.string:return s.createElement("div",{style:{whiteSpace:"pre-wrap"}},n);case B.code:case B.date:case B.decimal:case B.integer:case B.positiveInt:case B.unsignedInt:case B.uri:case B.url:return s.createElement(s.Fragment,null,n);case B.canonical:return s.createElement(Wp,{value:{reference:n},link:e.link});case B.dateTime:case B.instant:return s.createElement(s.Fragment,null,Cr(n));case B.markdown:return s.createElement("pre",null,n);case B.Address:return s.createElement(Gae,{value:n});case B.Annotation:return s.createElement(s.Fragment,null,n==null?void 0:n.text);case B.Attachment:return s.createElement(Pc,{value:n,maxWidth:e.maxWidth});case B.CodeableConcept:return s.createElement(Kn,{value:n});case B.Coding:return s.createElement(Ple,{value:n});case B.ContactDetail:return s.createElement($le,{value:n});case B.ContactPoint:return s.createElement(TD,{value:n});case B.HumanName:return s.createElement(f1,{value:n});case B.Identifier:return s.createElement(Ole,{value:n});case B.Money:return s.createElement(Cle,{value:n});case B.Period:return s.createElement(s.Fragment,null,Nne(n));case B.Quantity:case B.Duration:return s.createElement(Fv,{value:n});case B.Range:return s.createElement(_1,{value:n});case B.Ratio:return s.createElement(kle,{value:n});case B.Reference:return s.createElement(Wp,{value:n,link:e.link});case B.Timing:return s.createElement(s.Fragment,null,M4(n));case B.Dosage:case B.UsageContext:return s.createElement(Vv,{value:{type:r,value:n},compact:!0,ignoreMissingValues:e.ignoreMissingValues});default:if(!t)throw Error(`Displaying property of type ${e.propertyType} requires element schema`);return s.createElement(Vv,{value:{type:t.type[0].code,value:n},compact:!0,ignoreMissingValues:e.ignoreMissingValues})}}function Ya(e,t){let r=rr(e,t);return r?Array.isArray(r)?[r.map(n=>n.value),r[0].type]:[r.value,r.type]:[void 0,"undefined"]}function Vv(e){let t=e.value,r=t.value;if(!r)return null;let n=t.type,o=Q0(n);return o?typeof r=="object"&&"name"in r&&Object.keys(r).length===1&&typeof r.name=="string"?s.createElement("div",null,r.name):s.createElement(b1,{compact:e.compact},Object.entries(o.elements).map(a=>{let[i,l]=a;if(RD.includes(i))return null;let[c,u]=Ya(t,i);return e.ignoreMissingValues&&(!c||Array.isArray(c)&&c.length===0)?null:s.createElement(rl,{key:i,term:Vp(i)},s.createElement(So,{property:l,propertyType:u,value:c,ignoreMissingValues:e.ignoreMissingValues,link:e.link}))})):s.createElement("div",null,n," not implemented")}function ID(e){return s.createElement(J,{noWrap:!0},s.createElement("div",null,e.children),s.createElement("div",null,s.createElement(Vt.Wrapper,{id:e.htmlFor,label:e.title,description:e.description,withAsterisk:e.withAsterisk},(()=>null)())))}function Ze(e){return s.createElement(Vt.Wrapper,{id:e.htmlFor,label:e.title,description:e.description,withAsterisk:e.withAsterisk,error:lt(e.outcome,e.htmlFor)},e.children)}function Bv(e,t,r,n,o){let a=n.type;if(a.length>1)for(let i of a){let l=t.replace("[x]",fr(i.code));l in e&&delete e[l]}return e[r]=o,e}function Rle(e){let[t,r]=f.useState(e.defaultValue);function n(o){let a=Ile(o);r(a),e.onChange&&e.onChange(a)}return s.createElement(h1,{binding:e.binding,name:e.name,placeholder:e.placeholder,defaultValue:t&&Tle(t),maxSelectedValues:1,onChange:n})}function Tle(e){var t;return(t=e.coding)==null?void 0:t.map(r=>({system:r.system,code:r.code,display:r.display}))}function Ile(e){if(e.length!==0)return{coding:e.map(t=>({system:t.system,code:t.code,display:t.display}))}}function DD(e){let[t,r]=f.useState(e.defaultValue);function n(o){let a=o[0],i=a&&Nle(a);r(i),e.onChange&&e.onChange(i)}return s.createElement(h1,{binding:e.binding,name:e.name,placeholder:e.placeholder,defaultValue:t&&Dle(t),maxSelectedValues:1,onChange:n})}function Dle(e){return{system:e.system,code:e.code,display:e.display}}function Nle(e){return{system:e.system,code:e.code,display:e.display}}function ND(e){let[t,r]=f.useState(e.defaultValue),n=f.useRef();n.current=t;function o(c){c&&Object.keys(c).length===0&&(c=void 0),r(c),e.onChange&&e.onChange(c)}function a(c){let u={...n.current,system:c};c||delete u.system,o(u)}function i(c){let u={...n.current,use:c};c||delete u.use,o(u)}function l(c){let u={...n.current,value:c};c||delete u.value,o(u)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(dt,{"data-testid":"system",defaultValue:t==null?void 0:t.system,onChange:c=>a(c.currentTarget.value),data:["","email","phone","fax","pager","sms","other"]}),s.createElement(dt,{"data-testid":"use",defaultValue:t==null?void 0:t.use,onChange:c=>i(c.currentTarget.value),data:["","home","work","temp","old","mobile"]}),s.createElement(ae,{placeholder:"Value",defaultValue:t==null?void 0:t.value,onChange:c=>l(c.currentTarget.value)}))}function Ale(e){var l;let[t,r]=f.useState(e.defaultValue),n=f.useRef();n.current=t;function o(c){r(c),e.onChange&&e.onChange(c)}function a(c){let u={...n.current,name:c};c||delete u.name,o(u)}function i(c){let u={...n.current,telecom:c&&[c]};c||delete u.telecom,o(u)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(ae,{"data-testid":e.name+"-name",name:e.name+"-name",placeholder:"Name",style:{width:180},defaultValue:t==null?void 0:t.name,onChange:c=>a(c.currentTarget.value)}),s.createElement(ND,{name:e.name+"-telecom",defaultValue:(l=t==null?void 0:t.telecom)==null?void 0:l[0],onChange:i}))}function Mle(e){if(!e)return"";let t=new Date(e);return Gm(t)?t.toLocaleDateString("sv")+"T"+t.toLocaleTimeString("sv"):""}function AD(e){if(!e)return"";let t=new Date(e);return Gm(t)?t.toISOString():""}function Xa(e){return s.createElement(ae,{id:e.name,name:e.name,"data-autofocus":e.autoFocus,"data-testid":e.name,placeholder:e.placeholder,required:e.required,type:Lle(),defaultValue:Mle(e.defaultValue),autoFocus:e.autoFocus,error:lt(e.outcome,e.name),onChange:t=>{if(e.onChange){let r=t.currentTarget.value;e.onChange(AD(r))}}})}function Lle(){return"datetime-local"}function zle(e){return s.createElement(Rl,{id:e.name,name:e.name,"data-testid":"extension-input",defaultValue:dr(e.defaultValue),deserialize:JSON.parse,onChange:t=>{e.onChange&&e.onChange(JSON.parse(t))}})}function Fle(e){var d,p,h;let[t,r]=f.useState(e.defaultValue),n=f.useRef();n.current=t;function o(g){r(g),e.onChange&&e.onChange(g)}function a(g){o({...n.current,use:g||void 0})}function i(g){o({...n.current,prefix:g?g.split(" "):void 0})}function l(g){o({...n.current,given:g?g.split(" "):void 0})}function c(g){o({...n.current,family:g||void 0})}function u(g){o({...n.current,suffix:g?g.split(" "):void 0})}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(dt,{defaultValue:t==null?void 0:t.use,name:e.name+"-use","data-testid":"use",onChange:g=>a(g.currentTarget.value),data:["","temp","old","usual","official","nickname","anonymous","maiden"]}),s.createElement(ae,{placeholder:"Prefix",name:e.name+"-prefix",defaultValue:(d=t==null?void 0:t.prefix)==null?void 0:d.join(" "),onChange:g=>i(g.currentTarget.value)}),s.createElement(ae,{placeholder:"Given",name:e.name+"-given",defaultValue:(p=t==null?void 0:t.given)==null?void 0:p.join(" "),onChange:g=>l(g.currentTarget.value)}),s.createElement(ae,{name:e.name+"-family",placeholder:"Family",defaultValue:t==null?void 0:t.family,onChange:g=>c(g.currentTarget.value)}),s.createElement(ae,{placeholder:"Suffix",name:e.name+"-suffix",defaultValue:(h=t==null?void 0:t.suffix)==null?void 0:h.join(" "),onChange:g=>u(g.currentTarget.value)}))}function Vle(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(ae,{placeholder:"System",defaultValue:t==null?void 0:t.system,onChange:o=>n({...t,system:o.currentTarget.value})}),s.createElement(ae,{placeholder:"Value",defaultValue:t==null?void 0:t.value,onChange:o=>n({...t,value:o.currentTarget.value})}))}var Ble=["USD","EUR","CAD","GBP","AUD"];function Ule(e){var c;let{onChange:t}=e,[r,n]=f.useState(e.defaultValue),o=f.useCallback(u=>{n(u),t&&t(u)},[t]),a=f.useCallback(u=>{o({...r,currency:u.currentTarget.value})},[r,o]),i=f.useCallback(u=>{o({...r,value:u.currentTarget.valueAsNumber})},[r,o]),l=s.createElement(dt,{defaultValue:r==null?void 0:r.currency,data:Ble,styles:{input:{fontWeight:500,borderTopLeftRadius:0,borderBottomLeftRadius:0,width:92}},onChange:a});return s.createElement(ae,{type:"number",label:e.label,placeholder:e.placeholder??"Value",defaultValue:((c=r==null?void 0:r.value)==null?void 0:c.toString())??"USD",icon:s.createElement(hie,{size:14}),rightSection:l,rightSectionWidth:92,onChange:i})}function Wle(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(Xa,{name:e.name+".start",placeholder:"Start",defaultValue:t==null?void 0:t.start,onChange:o=>n({...t,start:o})}),s.createElement(Xa,{name:e.name+".end",placeholder:"End",defaultValue:t==null?void 0:t.end,onChange:o=>n({...t,end:o})}))}function Ja(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(dt,{style:{width:80},"data-testid":e.name+"-comparator",defaultValue:t==null?void 0:t.comparator,data:["","<","<=",">=",">"],onChange:o=>n({...t,comparator:o.currentTarget.value})}),s.createElement(ae,{id:e.name,name:e.name,required:e.required,"data-autofocus":e.autoFocus,"data-testid":e.name+"-value",type:"number",placeholder:"Value",defaultValue:t==null?void 0:t.value,autoFocus:e.autoFocus,step:"any",onWheel:o=>{e.disableWheel&&o.currentTarget.blur()},onChange:o=>{n({...t,value:Hle(o.currentTarget.value)})}}),s.createElement(ae,{placeholder:"Unit","data-testid":e.name+"-unit",defaultValue:t==null?void 0:t.unit,onChange:o=>n({...t,unit:o.currentTarget.value})}))}function Hle(e){if(e)return parseFloat(e)}function x1(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(Ja,{name:e.name+"-low",defaultValue:t==null?void 0:t.low,onChange:o=>n({...t,low:o})}),s.createElement(Ja,{name:e.name+"-high",defaultValue:t==null?void 0:t.high,onChange:o=>n({...t,high:o})}))}function qle(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(Ja,{name:e.name+"-numerator",defaultValue:t==null?void 0:t.numerator,onChange:o=>n({...t,numerator:o})}),s.createElement(Ja,{name:e.name+"-denominator",defaultValue:t==null?void 0:t.denominator,onChange:o=>n({...t,denominator:o})}))}var Gle={Observation:"code",User:"email:contains"},Qle=["AccessPolicy","Account","ActivityDefinition","Bot","CapabilityStatement","ClientApplication","CodeSystem","CompartmentDefinition","ConceptMap","EffectEvidenceSynthesis","Endpoint","EventDefinition","Evidence","EvidenceVariable","ExampleScenario","GraphDefinition","HealthcareService","ImplementationGuide","InsurancePlan","Library","Location","Measure","MedicinalProduct","MessageDefinition","NamingSystem","OperationDefinition","Organization","Patient","Person","PlanDefinition","Practitioner","Project","Questionnaire","RelatedPerson","ResearchDefinition","ResearchElementDefinition","RiskEvidenceSynthesis","SearchParameter","StructureDefinition","StructureMap","TerminologyCapabilities","TestScript","UserConfiguration","ValueSet"];function Kle(e){return{value:Je(e),label:xo(e),resource:e}}function Il(e){let t=ne(),r=e.resourceType,[n,o]=f.useState(),a=tt(e.defaultValue,o),i=e.onChange,l=f.useCallback(async(u,d)=>{let p=Xle(r),h=new URLSearchParams({[p]:u,_count:"10"});return await t.searchResources(r,h,{signal:d})},[t,r]),c=f.useCallback(u=>{i&&i(u[0])},[i]);return e.defaultValue&&!n&&!a?null:s.createElement(p1,{name:e.name,required:e.required,itemComponent:Yle,defaultValue:a,placeholder:e.placeholder,maxSelectedValues:1,toKey:Je,toOption:Kle,loadOptions:l,onChange:c,clearable:!0})}var Yle=f.forwardRef(({label:e,resource:t,...r},n)=>s.createElement("div",{ref:n,...r},s.createElement(J,{noWrap:!0},s.createElement(da,{value:t}),s.createElement("div",null,s.createElement(oe,null,e),s.createElement(oe,{size:"xs",color:"dimmed"},t.birthDate)))));function Xle(e){return Gle[e]??(Qle.includes(e)?"name":"_id")}function eh(e){let t=Jle(e.targetTypes),r=Zle(e.defaultValue,t),[n,o]=f.useState(e.defaultValue),[a,i]=f.useState(r);function l(c){o(c),e.onChange&&e.onChange(c)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},t&&t.length>1&&s.createElement(dt,{"data-autofocus":e.autoFocus,"data-testid":"reference-input-resource-type-select",defaultValue:a,autoFocus:e.autoFocus,onChange:c=>i(c.currentTarget.value),data:t}),!t&&s.createElement(g1,{autoFocus:e.autoFocus,testId:"reference-input-resource-type-input",defaultValue:a,onChange:i,name:e.name+"-resourceType",placeholder:"Resource Type"}),s.createElement(Il,{resourceType:a,name:e.name+"-id",required:e.required,placeholder:e.placeholder,defaultValue:n,onChange:c=>{l(c?ut(c):void 0)}}))}function Jle(e){if(!(!e||e.length===0||e.length===1&&e[0]==="Resource"))return e}function Zle(e,t){var n;let r=(n=e==null?void 0:e.reference)==null?void 0:n.split("/")[0];if(r)return r;if(t&&t.length>0)return t[0]}function ese(e){let[t,r]=f.useState(e.defaultValue&&Array.isArray(e.defaultValue)?e.defaultValue:[]),n=f.useRef();n.current=t;function o(a){r(a),e.onChange&&e.onChange(a)}return s.createElement("table",{style:{width:"100%",borderCollapse:"collapse"}},s.createElement("colgroup",null,s.createElement("col",{width:"97%"}),s.createElement("col",{width:"3%"})),s.createElement("tbody",null,t.map((a,i)=>s.createElement("tr",{key:`${i}-${t.length}`},s.createElement("td",null,s.createElement(Za,{arrayElement:!0,property:e.property,name:e.name+"."+i,defaultValue:a,onChange:l=>{let c=[...n.current];c[i]=l,o(c)}})),s.createElement("td",{style:{textAlign:"right"}},s.createElement(ur,{title:"Remove",size:"sm",onClick:l=>{it(l);let c=[...n.current];c.splice(i,1),o(c)}},s.createElement(Up,null))))),s.createElement("tr",null,s.createElement("td",null),s.createElement("td",{style:{textAlign:"right"}},s.createElement(ur,{title:"Add",size:"sm",color:"green",onClick:a=>{it(a);let i=[...n.current];i.push(void 0),o(i)}},s.createElement(c1,null))))))}var tse=["sun","mon","tue","wed","thu","fri","sat"];function rse(e){let[t,r]=f.useState(e.defaultValue),[n,o]=f.useState(!1),a=f.useRef();return a.current=t,s.createElement(s.Fragment,null,s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement("span",null,M4(a.current)||"No repeat"),s.createElement(ee,{onClick:()=>o(!0)},"Edit")),s.createElement(nse,{visible:n,defaultValue:a.current,onOk:i=>{e.onChange&&e.onChange(i),r(i),o(!1)},onCancel:()=>o(!1)}))}var m$={repeat:{period:1,periodUnit:"d"}};function nse(e){let[t,r]=f.useState(e.defaultValue||m$),n=f.useRef();n.current=t;function o(u){r({...n.current,event:[u]})}function a(u){r({...n.current,repeat:u})}function i(u){var d;a({...(d=n.current)==null?void 0:d.repeat,period:u})}function l(u){var d;a({...(d=n.current)==null?void 0:d.repeat,periodUnit:u})}function c(u){var d;a({...(d=n.current)==null?void 0:d.repeat,dayOfWeek:u})}return s.createElement(jr,{title:"Timing",closeButtonProps:{"aria-label":"Close"},opened:e.visible,onClose:()=>e.onCancel()},s.createElement(je,null,s.createElement(Ze,{title:"Starts on",htmlFor:"timing-dialog-start"},s.createElement(Xa,{name:"timing-dialog-start",onChange:u=>o(u)})),s.createElement(F0,{label:"Repeat",checked:!!t.repeat,onChange:u=>a(u.currentTarget.checked?m$.repeat:void 0)}),t.repeat&&s.createElement(s.Fragment,null,s.createElement(Ze,{title:"Repeat every",htmlFor:"timing-dialog-period"},s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(ae,{type:"number",step:1,id:"timing-dialog-period",name:"timing-dialog-period",defaultValue:t.repeat.period||1,onChange:u=>i(parseInt(u.currentTarget.value,10)||1)}),s.createElement(dt,{id:"timing-dialog-periodUnit",name:"timing-dialog-periodUnit",defaultValue:t.repeat.periodUnit,onChange:u=>l(u.currentTarget.value),data:[{label:"second",value:"s"},{label:"minute",value:"min"},{label:"hour",value:"h"},{label:"day",value:"d"},{label:"week",value:"wk"},{label:"month",value:"mo"},{label:"year",value:"a"}]}))),t.repeat.periodUnit==="wk"&&s.createElement(Ze,{title:"Repeat on"},s.createElement(Tf.Group,{multiple:!0,onChange:c},s.createElement(J,{position:"apart",mt:"md",spacing:"xs"},tse.map(u=>s.createElement(Tf,{key:u,value:u,size:"xs",radius:"xl"},u.charAt(0).toUpperCase())))))),s.createElement(J,{position:"right"},s.createElement(ee,{onClick:()=>e.onOk(t)},"OK"))))}function Za(e){let t=e.property,r=e.defaultPropertyType??t.type[0].code,n=e.name,o=e.defaultValue;if(t.max>1&&!e.arrayElement)return r===B.Attachment?s.createElement(fle,{name:n,defaultValue:o,onChange:e.onChange}):s.createElement(ese,{property:t,name:n,defaultValue:o,onChange:e.onChange});let a=t.type;return a.length>1?s.createElement(ose,{elementDefinitionTypes:a,...e}):s.createElement(MD,{elementDefinitionType:a[0],...e})}function ose(e){let t=e.elementDefinitionTypes,r;e.defaultPropertyType&&(r=t.find(a=>a.code===e.defaultPropertyType)),r||(r=t[0]);let[n,o]=f.useState(r);return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(dt,{style:{width:"200px"},defaultValue:n.code,onChange:a=>{o(t.find(i=>i.code===a.currentTarget.value))},data:t.map(a=>({value:a.code,label:a.code}))}),s.createElement(MD,{...e,elementDefinitionType:n,onChange:a=>{e.onChange&&e.onChange(a,e.name.replace("[x]",fr(n.code)))}}))}function MD(e){var i,l,c;let t=e.property,r=e.elementDefinitionType.code,n=e.name,o=e.defaultValue,a=t.min!==void 0&&t.min>0;switch(r){case B.SystemString:case B.canonical:case B.string:case B.time:case B.uri:case B.url:return s.createElement(ae,{id:n,name:n,"data-testid":n,defaultValue:o,required:a,onChange:u=>{e.onChange&&e.onChange(u.currentTarget.value)},error:lt(e.outcome,n)});case B.date:return s.createElement(ae,{type:"date",id:n,name:n,"data-testid":n,defaultValue:o,required:a,onChange:u=>{e.onChange&&e.onChange(u.currentTarget.value)},error:lt(e.outcome,n)});case B.dateTime:case B.instant:return s.createElement(Xa,{name:n,defaultValue:o,onChange:e.onChange,outcome:e.outcome});case B.decimal:case B.integer:case B.positiveInt:case B.unsignedInt:return s.createElement(ae,{type:"number",step:r===B.decimal?"any":"1",id:n,name:n,"data-testid":n,defaultValue:o,required:a,onChange:u=>{e.onChange&&e.onChange(u.currentTarget.valueAsNumber)}});case B.code:return s.createElement(bD,{binding:(i=t.binding)==null?void 0:i.valueSet,name:n,defaultValue:o,onChange:e.onChange});case B.boolean:return s.createElement(kn,{id:n,name:n,"data-testid":n,defaultChecked:!!o,onChange:u=>{e.onChange&&e.onChange(u.currentTarget.checked)}});case B.markdown:return s.createElement(vc,{id:n,name:n,"data-testid":n,defaultValue:o,required:a,onChange:u=>{e.onChange&&e.onChange(u.currentTarget.value)}});case B.Address:return s.createElement(Qae,{name:n,defaultValue:o,onChange:e.onChange});case B.Annotation:return s.createElement(Kae,{name:n,defaultValue:o,onChange:e.onChange});case B.Attachment:return s.createElement(xD,{name:n,defaultValue:o,onChange:e.onChange});case B.CodeableConcept:return s.createElement(Rle,{binding:(l=t.binding)==null?void 0:l.valueSet,name:n,defaultValue:o,onChange:e.onChange});case B.Coding:return s.createElement(DD,{binding:(c=t.binding)==null?void 0:c.valueSet,name:n,defaultValue:o,onChange:e.onChange});case B.ContactDetail:return s.createElement(Ale,{name:n,defaultValue:o,onChange:e.onChange});case B.ContactPoint:return s.createElement(ND,{name:n,defaultValue:o,onChange:e.onChange});case B.Extension:return s.createElement(zle,{name:n,defaultValue:o,onChange:e.onChange});case B.HumanName:return s.createElement(Fle,{name:n,defaultValue:o,onChange:e.onChange});case B.Identifier:return s.createElement(Vle,{name:n,defaultValue:o,onChange:e.onChange});case B.Money:return s.createElement(Ule,{name:n,defaultValue:o,onChange:e.onChange});case B.Period:return s.createElement(Wle,{name:n,defaultValue:o,onChange:e.onChange});case B.Duration:case B.Quantity:return s.createElement(Ja,{name:n,defaultValue:o,onChange:e.onChange});case B.Range:return s.createElement(x1,{name:n,defaultValue:o,onChange:e.onChange});case B.Ratio:return s.createElement(qle,{name:n,defaultValue:o,onChange:e.onChange});case B.Reference:return s.createElement(eh,{name:n,defaultValue:o,targetTypes:ase(t),onChange:e.onChange});case B.Timing:return s.createElement(rse,{name:n,defaultValue:o,onChange:e.onChange});case B.Dosage:case B.UsageContext:return s.createElement(Uv,{typeName:r,defaultValue:o,onChange:e.onChange,outcome:e.outcome});default:return s.createElement(Uv,{typeName:t.type[0].code,defaultValue:o,onChange:e.onChange,outcome:e.outcome})}}function ase(e){var t,r,n;return(n=(r=(t=e==null?void 0:e.type)==null?void 0:t[0])==null?void 0:r.targetProfile)==null?void 0:n.map(o=>o.split("/").pop())}function Uv(e){let[t,r]=f.useState(e.defaultValue??{});function n(l){r(l),e.onChange&&e.onChange(l)}let o=e.typeName,a=Q0(o);if(!a)return s.createElement("div",null,o," not implemented");let i={type:o,value:t};return s.createElement(je,null,Object.entries(a.elements).map(([l,c])=>{if(l==="id"||RD.includes(l)||!c.type)return null;let[u,d]=Ya(i,l),p=c.min!==void 0&&c.min>0;return c.type.length===1&&c.type[0].code==="boolean"?s.createElement(ID,{key:l,title:Vp(l),description:c.description,htmlFor:l},s.createElement(Za,{property:c,name:l,defaultValue:u,defaultPropertyType:d,outcome:e.outcome,onChange:(h,g)=>{n(Bv(t,l,g??l,c,h))}})):s.createElement(Ze,{key:l,title:Vp(l),description:c.description,withAsterisk:p,htmlFor:l,outcome:e.outcome},s.createElement(Za,{property:c,name:l,defaultValue:u,defaultPropertyType:d,onChange:(h,g)=>{n(Bv(t,l,g??l,c,h))}}))}))}var ise=H(e=>({noteBody:{fontSize:e.fontSizes.sm},noteCite:{fontSize:e.fontSizes.xs,marginBlockStart:3},noteRoot:{padding:5}}));function LD({value:e}){let{classes:t}=ise();return e?s.createElement(je,{justify:"flex-start",spacing:"xs"},e.map(r=>{var n;return r.text&&s.createElement(XR,{key:`note-${r.text}`,classNames:{cite:t.noteCite,body:t.noteBody,root:t.noteRoot},cite:((n=r.authorReference)==null?void 0:n.display)||r.authorString,icon:null},r.text)})):null}function Oc(e){let{value:t,link:r,...n}=e,[o,a]=f.useState(),i=tt(t,a),l;if(o&&!Q4(o))l=`[${Oe(o)}]`;else if(i)l=xo(i);else return null;return r?s.createElement(Re,{to:t,...n},l):s.createElement(oe,{component:"span",...n},l)}function nl(e){return s.createElement(J,{spacing:"xs"},s.createElement(da,{size:24,radius:12,value:e.value,link:e.link}),s.createElement(Oc,{value:e.value,link:e.link}))}var lse={draft:"blue",active:"blue","on-hold":"yellow",revoked:"red",completed:"green","entered-in-error":"red",unknown:"gray",retired:"gray",registered:"blue",preliminary:"blue",final:"green",amended:"yellow",corrected:"yellow",cancelled:"red",requested:"blue",received:"blue",accepted:"blue",rejected:"red",ready:"blue","in-progress":"blue",failed:"red",proposed:"blue",pending:"blue",booked:"blue",arrived:"blue",fulfilled:"green",noshow:"red","checked-in":"blue",waitlist:"gray",routine:"gray",urgent:"red",asap:"red",stat:"red"};function zD(e){return s.createElement(oH,{color:lse[e.status]},e.status)}var FD=H(e=>({table:{border:`0.1px solid ${e.colors.gray[5]}`,borderCollapse:"collapse","& td, & th":{border:`0.1px solid ${e.colors.gray[5]}`,padding:4}},criticalRow:{background:e.colorScheme==="dark"?e.colors.red[7]:e.colors.red[1],border:`0.1px solid ${e.colors.red[5]}`,color:e.colors.red[5],fontWeight:500,"& td":{border:`0.1px solid ${e.colors.red[5]}`}},noteBody:{fontSize:e.fontSizes.sm},noteCite:{fontSize:e.fontSizes.xs,marginBlockStart:3},noteRoot:{padding:5}}));E1.defaultProps={hideObservationNotes:!1,hideSpecimenInfo:!1};function E1(e){var i;let t=ne(),r=tt(e.value),[n,o]=f.useState();if(f.useEffect(()=>{r!=null&&r.specimen&&Promise.allSettled(r.specimen.map(l=>t.readReference(l))).then(l=>l.filter(c=>c.status==="fulfilled").map(c=>c.value)).then(o).catch(console.error)},[t,r]),!r)return null;let a=(n==null?void 0:n.flatMap(l=>l.note||[]))||[];if(r.presentedForm&&r.presentedForm.length>0){let l=r.presentedForm[0];(i=l.contentType)!=null&&i.startsWith("text/plain")&&l.data&&a.push({text:window.atob(l.data)})}return s.createElement(je,null,s.createElement(fe,null,"Diagnostic Report"),s.createElement(sse,{value:r}),n&&!e.hideSpecimenInfo&&cse(n),r.result&&s.createElement(use,{hideObservationNotes:e.hideObservationNotes,value:r.result}),a.length>0&&s.createElement(LD,{value:a}))}function sse({value:e}){var t,r;return s.createElement(J,{mt:"md",spacing:30},e.subject&&s.createElement("div",null,s.createElement(oe,{size:"xs",transform:"uppercase",color:"dimmed"},"Subject"),s.createElement(oe,null,s.createElement(nl,{value:e.subject,link:!0}))),(t=e.resultsInterpreter)==null?void 0:t.map(n=>s.createElement("div",{key:n.reference},s.createElement(oe,{size:"xs",transform:"uppercase",color:"dimmed"},"Interpreter"),s.createElement(oe,null,s.createElement(nl,{value:n,link:!0})))),(r=e.performer)==null?void 0:r.map(n=>s.createElement("div",{key:n.reference},s.createElement(oe,{size:"xs",transform:"uppercase",color:"dimmed"},"Performer"),s.createElement(oe,null,s.createElement(nl,{value:n,link:!0})))),e.issued&&s.createElement("div",null,s.createElement(oe,{size:"xs",transform:"uppercase",color:"dimmed"},"Issued"),s.createElement(oe,null,Cr(e.issued))),e.status&&s.createElement("div",null,s.createElement(oe,{size:"xs",transform:"uppercase",color:"dimmed"},"Status"),s.createElement(oe,null,fr(e.status))))}function cse(e){return s.createElement(je,{spacing:"xs"},s.createElement(fe,{order:2,size:"h6"},"Specimens"),s.createElement(xr,{type:"ordered"},e==null?void 0:e.map(t=>{var r;return s.createElement(xr.Item,{ml:"sm",key:`specimen-${t.id}`},s.createElement(J,{spacing:20},s.createElement(J,{spacing:5},s.createElement(oe,{fw:500},"Collected:")," ",Cr((r=t.collection)==null?void 0:r.collectedDateTime)),s.createElement(J,{spacing:5},s.createElement(oe,{fw:500},"Received:")," ",Cr(t.receivedTime))))})))}function use(e){let{classes:t}=FD();return s.createElement("table",{className:t.table},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,"Test"),s.createElement("th",null,"Value"),s.createElement("th",null,"Reference Range"),s.createElement("th",null,"Interpretation"),s.createElement("th",null,"Category"),s.createElement("th",null,"Performer"),s.createElement("th",null,"Status"))),s.createElement("tbody",null,s.createElement(VD,{value:e.value,ancestorIds:e.ancestorIds,hideObservationNotes:e.hideObservationNotes})))}function VD(e){var t;return s.createElement(s.Fragment,null,(t=e.value)==null?void 0:t.map(r=>s.createElement(dse,{key:`obs-${pi(r)?r.reference:r.id}`,value:r,ancestorIds:e.ancestorIds,hideObservationNotes:e.hideObservationNotes})))}function dse(e){var i,l;let{classes:t,cx:r}=FD(),n=tt(e.value);if(!n||(i=e.ancestorIds)!=null&&i.includes(n.id))return null;let o=!e.hideObservationNotes&&n.note,a=mse(n);return s.createElement(s.Fragment,null,s.createElement("tr",{className:r({[t.criticalRow]:a})},s.createElement("td",{rowSpan:o?2:1},s.createElement(Re,{to:n},s.createElement(Kn,{value:n.code}))),s.createElement("td",null,s.createElement(fse,{value:n})),s.createElement("td",null,s.createElement(pse,{value:n.referenceRange})),s.createElement("td",null,n.interpretation&&n.interpretation.length>0&&s.createElement(Kn,{value:n.interpretation[0]})),s.createElement("td",null,n.category&&n.category.length>0&&s.createElement(s.Fragment,null,n.category.map(c=>s.createElement("div",{key:`category-${q0(c)}`},s.createElement(Kn,{value:c}))))),s.createElement("td",null,(l=n.performer)==null?void 0:l.map(c=>s.createElement(Wp,{key:c.reference,value:c}))),s.createElement("td",null,n.status&&s.createElement(zD,{status:n.status}))),n.hasMember&&s.createElement(VD,{value:n.hasMember,ancestorIds:e.ancestorIds?[...e.ancestorIds,n.id]:[n.id],hideObservationNotes:e.hideObservationNotes}),o&&s.createElement("tr",null,s.createElement("td",{colSpan:6},s.createElement(LD,{value:n.note}))))}function fse(e){let t=e.value;return s.createElement(s.Fragment,null,L4(t))}function pse(e){let t=e.value&&e.value.length>0&&e.value[0];return t?t.text?s.createElement(s.Fragment,null,t.text):s.createElement(_1,{value:t}):null}function mse(e){var r,n,o,a;let t=(a=(o=(n=(r=e.interpretation)==null?void 0:r[0])==null?void 0:n.coding)==null?void 0:o[0])==null?void 0:a.code;return t==="AA"||t==="LL"||t==="HH"||t==="A"}var hse=H(e=>({root:{borderCollapse:"collapse",width:"100%","& tr":{borderTop:`0.1px solid ${e.colors.gray[3]}`},"& th, & td":{padding:`${e.spacing.sm} ${e.spacing.sm}`,verticalAlign:"top"}},removed:{color:e.colors.red[7],textDecoration:"line-through"},added:{color:e.colors.green[7]}}));function gse(e){let{classes:t}=hse(),r=ne(),[n,o]=f.useState(!1);if(f.useEffect(()=>{r.requestSchema(e.original.resourceType).then(()=>o(!0)).catch(console.log)},[r,e.original.resourceType]),!n)return null;let a=X4(e.original.resourceType);return s.createElement("table",{className:t.root},s.createElement("colgroup",null,s.createElement("col",{style:{width:"30%"}}),s.createElement("col",{style:{width:"35%"}}),s.createElement("col",{style:{width:"35%"}})),s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,"Property"),s.createElement("th",null,"Before"),s.createElement("th",null,"After"))),s.createElement("tbody",null,Object.entries(a.elements).map(([i,l])=>{if(i==="id"||i==="meta")return null;let[c,u]=Ya(Jn(e.original),i),[d,p]=Ya(Jn(e.revised),i);return h$(c)&&h$(d)||dr(c)===dr(d)?null:s.createElement("tr",{key:i},s.createElement("td",null,Vp(i)),s.createElement("td",{className:t.removed},s.createElement(So,{property:l,propertyType:u,value:c,ignoreMissingValues:!0})),s.createElement("td",{className:t.added},s.createElement(So,{property:l,propertyType:p,value:d,ignoreMissingValues:!0})))})))}function h$(e){return!e||Array.isArray(e)&&e.length===0||typeof e=="object"&&Object.keys(e).length===0}function S1(e){let t=ne(),r=tt(e.value),[n,o]=f.useState(!1);return f.useEffect(()=>{r&&t.requestSchema(r.resourceType).then(()=>o(!0)).catch(console.log)},[t,r]),!n||!r?null:s.createElement(Vv,{value:{type:r.resourceType,value:e.forceUseInput?e.value:r},ignoreMissingValues:e.ignoreMissingValues})}function vse(e){return s.createElement($c,null,e.children)}function ei(e){var c,u;let{resource:t,profile:r,padding:n,popupMenuItems:o,...a}=e,i=r??((c=t.meta)==null?void 0:c.author),l=e.dateTime??((u=t.meta)==null?void 0:u.lastUpdated);return s.createElement(y1,{"data-testid":"timeline-item",fill:!0,...a},s.createElement(J,{position:"apart",spacing:8,mx:"xs",my:"sm"},s.createElement(da,{value:i,link:!0,size:"md"}),s.createElement("div",{style:{flex:1}},s.createElement(oe,{size:"sm"},s.createElement(Oc,{color:"dark",weight:500,value:i,link:!0})),s.createElement(oe,{size:"xs"},s.createElement(Re,{color:"dimmed",to:e.resource},Cr(l)),s.createElement(oe,{component:"span",color:"dimmed",mx:8},"·"),s.createElement(Re,{color:"dimmed",to:e.resource},e.resource.resourceType))),o&&s.createElement(X,{position:"bottom-end",shadow:"md",width:200},s.createElement(X.Target,null,s.createElement(ur,{radius:"xl","aria-label":`Actions for ${Je(e.resource)}`},s.createElement(gie,null))),o)),s.createElement(yD,null,n&&s.createElement("div",{style:{padding:"0 16px 16px 16px"}},e.children),!n&&s.createElement(s.Fragment,null,e.children)))}function BD(e,t){e.sort((r,n)=>{let o=g$(r,t),a=g$(n,t);return o>a?1:o<a?-1:v$(r,t)-v$(n,t)})}function g$(e,t){if(!UD(e,t)){let r=e.priority;if(typeof r=="string")return{stat:4,asap:3,urgent:2}[r]??0}return 0}function v$(e,t){var n;if(!UD(e,t)){if(e.resourceType==="Communication"&&e.sent)return new Date(e.sent).getTime();if((e.resourceType==="DiagnosticReport"||e.resourceType==="Media"||e.resourceType==="Observation")&&e.issued)return new Date(e.issued).getTime();if(e.resourceType==="DocumentReference"&&e.date)return new Date(e.date).getTime()}let r=(n=e.meta)==null?void 0:n.lastUpdated;return r?new Date(r).getTime():0}function UD(e,t){return!!t&&e.resourceType===t.resourceType&&e.id===t.id}var yse=H(e=>({pinnedComment:{backgroundColor:e.colors.blue[0]}}));function th(e){let t=ne(),r=Xm(),n=t.getProfile(),o=f.useRef(null),a=tt(e.value),[i,l]=f.useState(),[c,u]=f.useState([]),d=e.loadTimelineResources,p=f.useRef(c);p.current=c;let h=f.useCallback(j=>{BD(j,a),j.reverse(),u(j)},[a]),g=f.useCallback(j=>{let N=[];for(let D of j){if(D.status!=="fulfilled")continue;let z=D.value;if(z.type==="history"&&l(z),z.entry)for(let W of z.entry)N.push(W.resource)}h(N)},[h]),y=f.useCallback(j=>h([...p.current,j]),[h]),v=f.useCallback(()=>{var D;let j,N;"resourceType"in e.value?(j=e.value.resourceType,N=e.value.id):[j,N]=(D=e.value.reference)==null?void 0:D.split("/"),d(t,j,N).then(g).catch(console.log)},[t,e.value,d,g]);f.useEffect(()=>v(),[v]);function E(j){!a||!e.createCommunication||t.createResource(e.createCommunication(a,n,j)).then(N=>y(N)).catch(console.log)}function w(j){!a||!e.createMedia||t.createResource(e.createMedia(a,n,j)).then(N=>y(N)).then(()=>hs({id:"upload-notification",color:"teal",title:"Upload complete",message:"",icon:s.createElement(pD,{size:16}),autoClose:2e3})).catch(N=>hs({id:"upload-notification",color:"red",title:"Upload error",message:Oe(N),icon:s.createElement(u$,{size:16}),autoClose:2e3}))}function b(j,N){return t.updateResource({...j,priority:N})}function _(j){b(j,"stat").then(v).catch(console.log)}function x(j){b(j,"routine").then(v).catch(console.log)}function S(j){r(`/${j.resourceType}/${j.id}`)}function $(j){r(`/${j.resourceType}/${j.id}/edit`)}function O(j){r(`/${j.resourceType}/${j.id}/delete`)}function C(j){var N;r(`/${j.resourceType}/${j.id}/_history/${(N=j.meta)==null?void 0:N.versionId}`)}function T(){de({id:"upload-notification",loading:!0,title:"Initializing upload...",message:"Please wait...",autoClose:!1,withCloseButton:!1})}function k(j){hs({id:"upload-notification",loading:!0,title:"Uploading...",message:Pse(j),autoClose:!1,withCloseButton:!1})}function I(j){hs({id:"upload-notification",color:"red",title:"Upload error",message:Oe(j),icon:s.createElement(u$,{size:16}),autoClose:2e3})}return a?s.createElement(vse,null,e.createCommunication&&s.createElement(y1,null,s.createElement(De,{testid:"timeline-form",onSubmit:j=>{E(j.text);let N=o.current;N&&(N.value="",N.focus())}},s.createElement(J,{spacing:"xs",noWrap:!0,style:{width:"100%"}},s.createElement(da,{value:n}),s.createElement(ae,{name:"text",ref:o,placeholder:"Add comment",style:{width:"100%",maxWidth:300}}),s.createElement(ur,{type:"submit",radius:"xl",color:"blue",variant:"filled"},s.createElement(xie,{size:16})),s.createElement(v1,{onUpload:w,onUploadStart:T,onUploadProgress:k,onUploadError:I},j=>s.createElement(ur,{...j,radius:"xl",color:"blue",variant:"filled"},s.createElement(mD,{size:16})))))),c.map(j=>{var D;if(!j)return null;let N=`${j.resourceType}/${j.id}/${(D=j.meta)==null?void 0:D.versionId}`;if(j.resourceType===a.resourceType&&j.id===a.id)return s.createElement(wse,{key:N,history:i,resource:j,onDetails:C});switch(j.resourceType){case"AuditEvent":return s.createElement(Ese,{key:N,resource:j,onDetails:S});case"Communication":return s.createElement(_se,{key:N,resource:j,onPin:j.priority!=="stat"?_:void 0,onUnpin:j.priority==="stat"?x:void 0,onDetails:S,onEdit:$,onDelete:O});case"DiagnosticReport":return s.createElement(Sse,{key:N,resource:j,onDetails:S,onEdit:$,onDelete:O});case"Media":return s.createElement(xse,{key:N,resource:j,onDetails:S,onEdit:$,onDelete:O});default:return s.createElement(ei,{key:N,resource:j,padding:!0},s.createElement(S1,{value:j,ignoreMissingValues:!0}))}})):s.createElement(tr,{style:{width:"100%",height:"100%"}},s.createElement(un,null))}function yl(e){return s.createElement(X.Dropdown,null,s.createElement(X.Label,null,"Resource"),e.onPin&&s.createElement(X.Item,{icon:s.createElement(Eie,{size:14}),onClick:()=>e.onPin(e.resource),"aria-label":`Pin ${Je(e.resource)}`},"Pin"),e.onUnpin&&s.createElement(X.Item,{icon:s.createElement(Sie,{size:14}),onClick:()=>e.onUnpin(e.resource),"aria-label":`Unpin ${Je(e.resource)}`},"Unpin"),e.onDetails&&s.createElement(X.Item,{icon:s.createElement(bie,{size:14}),onClick:()=>e.onDetails(e.resource),"aria-label":`Details ${Je(e.resource)}`},"Details"),e.onEdit&&s.createElement(X.Item,{icon:s.createElement(vie,{size:14}),onClick:()=>e.onEdit(e.resource),"aria-label":`Edit ${Je(e.resource)}`},"Edit"),e.onDelete&&s.createElement(s.Fragment,null,s.createElement(X.Divider,null),s.createElement(X.Label,null,"Danger zone"),s.createElement(X.Item,{color:"red",icon:s.createElement(vD,{size:14}),onClick:()=>e.onDelete(e.resource),"aria-label":`Delete ${Je(e.resource)}`},"Delete")))}function wse(e){let t=bse(e.history,e.resource);return t?s.createElement(ei,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(yl,{...e})},s.createElement(gse,{original:t,revised:e.resource})):s.createElement(ei,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(yl,{...e})},s.createElement("h3",null,"Created"),s.createElement(S1,{value:e.resource,ignoreMissingValues:!0,forceUseInput:!0}))}function bse(e,t){let r=e.entry,n=r.findIndex(o=>{var a,i,l;return((i=(a=o.resource)==null?void 0:a.meta)==null?void 0:i.versionId)===((l=t.meta)==null?void 0:l.versionId)});if(!(n>=r.length-1))return r[n+1].resource}function _se(e){var n,o;let{classes:t}=yse(),r=!e.resource.priority||e.resource.priority==="routine"?void 0:t.pinnedComment;return s.createElement(ei,{resource:e.resource,profile:e.resource.sender,dateTime:e.resource.sent,padding:!0,className:r,popupMenuItems:s.createElement(yl,{...e})},s.createElement("p",null,(o=(n=e.resource.payload)==null?void 0:n[0])==null?void 0:o.contentString))}function xse(e){var n;let t=(n=e.resource.content)==null?void 0:n.contentType,r=t&&!t.startsWith("image/")&&!t.startsWith("video/")&&t!=="application/pdf";return s.createElement(ei,{resource:e.resource,padding:!!r,popupMenuItems:s.createElement(yl,{...e})},s.createElement(Pc,{value:e.resource.content}))}function Ese(e){return s.createElement(ei,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(yl,{...e})},s.createElement(ai,null,s.createElement("pre",null,e.resource.outcomeDesc)))}function Sse(e){return s.createElement(ei,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(yl,{...e})},s.createElement(E1,{value:e.resource}))}function Pse(e){if(e.lengthComputable){let t=100*e.loaded/e.total;return`Uploaded: ${fg(e.loaded)} / ${fg(e.total)} ${t.toFixed(2)}%`}return`Uploaded: ${fg(e.loaded)}`}function fg(e){if(e===0)return"0.00 B";let t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(2)+" "+" KMGTP".charAt(t)+"B"}function $se(e){return s.createElement(th,{value:e.resource,loadTimelineResources:async(t,r,n)=>{let o=`${r}/${n}`,a=100;return Promise.allSettled([t.readHistory(r,n),t.search("Task",{_filter:`based-on eq ${o} or focus eq ${o} or subject eq ${o}`,_count:a})])}})}function Ose(e){return s.createElement(th,{value:e.encounter,loadTimelineResources:async(t,r,n)=>Promise.allSettled([t.readHistory("Encounter",n),t.search("Communication","encounter=Encounter/"+n),t.search("Media","encounter=Encounter/"+n)]),createCommunication:(t,r,n)=>({resourceType:"Communication",status:"completed",encounter:ut(t),subject:t.subject,sender:ut(r),sent:new Date().toISOString(),payload:[{contentString:n}]}),createMedia:(t,r,n)=>({resourceType:"Media",status:"completed",encounter:ut(t),subject:t.subject,operator:ut(r),issued:new Date().toISOString(),content:n})})}function Cse(e){let t;try{t=Uoe(e.path,e.resource)}catch(r){return console.warn("FhirPathDisplay:",r),null}if(t.length>1)throw new Error(`Component "path" for "FhirPathDisplay" must resolve to a single element. Received ${t.length} elements [${JSON.stringify(t,null,2)}]`);return s.createElement(So,{value:t[0]||"",propertyType:e.propertyType})}function kse(e){return s.createElement(jr,{title:"Export",closeButtonProps:{"aria-label":"Close"},opened:e.visible,onClose:e.onCancel},s.createElement(le,{display:"flex",sx:{justifyContent:"space-between"}},e.exportCsv&&s.createElement(y$,{text:"CSV",exportLogic:e.exportCsv,onCancel:e.onCancel}),e.exportTransactionBundle&&s.createElement(y$,{text:"Transaction Bundle",exportLogic:e.exportTransactionBundle,onCancel:e.onCancel})),s.createElement(oe,{sx:{marginTop:"10px",marginLeft:"2px"}},"Limited to 1000 records"))}function y$(e){return s.createElement(ee,{onClick:()=>{e.exportLogic(),e.onCancel()}},`Export as ${e.text}`)}var jse={string:[te.EQUALS,te.NOT,te.CONTAINS,te.EXACT],fulltext:[te.EQUALS,te.NOT,te.CONTAINS,te.EXACT],token:[te.EQUALS,te.NOT],reference:[te.EQUALS,te.NOT],numeric:[te.EQUALS,te.NOT_EQUALS,te.GREATER_THAN,te.LESS_THAN,te.GREATER_THAN_OR_EQUALS,te.LESS_THAN_OR_EQUALS],quantity:[te.EQUALS,te.NOT_EQUALS,te.GREATER_THAN,te.LESS_THAN,te.GREATER_THAN_OR_EQUALS,te.LESS_THAN_OR_EQUALS],date:[te.EQUALS,te.NOT_EQUALS,te.GREATER_THAN,te.LESS_THAN,te.GREATER_THAN_OR_EQUALS,te.LESS_THAN_OR_EQUALS,te.STARTS_AFTER,te.ENDS_BEFORE,te.APPROXIMATELY],datetime:[te.EQUALS,te.NOT_EQUALS,te.GREATER_THAN,te.LESS_THAN,te.GREATER_THAN_OR_EQUALS,te.LESS_THAN_OR_EQUALS,te.STARTS_AFTER,te.ENDS_BEFORE,te.APPROXIMATELY]},Rse={eq:"equals",ne:"not equals",gt:"greater than",lt:"less than",ge:"greater than or equals",le:"less than or equals",sa:"starts after",eb:"ends before",ap:"approximately",contains:"contains",exact:"exact",text:"text",not:"not",above:"above",below:"below",in:"in","not-in":"not in","of-type":"of type",missing:"missing",identifier:"identifier",iterate:"iterate"};function P1(e,t){return{...e,filters:t,offset:0,name:void 0}}function $1(e,t){return P1(e,(e.filters??[]).filter(r=>r.code!==t))}function rh(e,t,r,n,o){o&&(e=$1(e,t));let a=[];return e.filters&&a.push(...e.filters),a.push({code:t,operator:r,value:n??""}),P1(e,a)}function Tse(e,t){if(!e.filters)return e;let r=[...e.filters];return r.splice(t,1),{...e,filters:r,name:void 0}}function Ise(e,t){return O1(e,t,-1)}function Dse(e,t){return O1(e,t,0)}function Nse(e,t){return O1(e,t,1)}function O1(e,t,r){let n=new Date;n.setDate(n.getDate()+r),n.setHours(0,0,0,0);let o=new Date(n.getTime());return o.setDate(o.getDate()+1),o.setTime(o.getTime()-1),k1(e,t,n,o)}function Ase(e,t){return C1(e,t,-1)}function Mse(e,t){return C1(e,t,0)}function Lse(e,t){return C1(e,t,1)}function C1(e,t,r){let n=new Date;n.setMonth(n.getMonth()+r),n.setDate(1),n.setHours(0,0,0,0);let o=new Date(n.getTime());return o.setMonth(o.getMonth()+1),o.setDate(1),o.setHours(0,0,0,0),o.setTime(o.getTime()-1),k1(e,t,n,o)}function zse(e,t){let r=new Date;return r.setMonth(0),r.setDate(1),r.setHours(0,0,0,0),k1(e,t,r,new Date)}function k1(e,t,r,n){return e=$1(e,t),e=w$(e,t,te.GREATER_THAN_OR_EQUALS,r),e=w$(e,t,te.LESS_THAN_OR_EQUALS,n),e}function w$(e,t,r,n){return rh(e,t,r,n.toISOString())}function b$(e,t,r=!0){return rh(e,t,te.MISSING,r.toString())}function Fse(e,t){return e.offset===t?e:{...e,offset:t,name:void 0}}function Vse(e,t){let r=e.count??Sc,n=(t-1)*r;return Fse(e,n)}function Bse(e,t,r){return t===Use(e)&&r!==void 0&&r===Wse(e)?e:{...e,sortRules:[{code:t,descending:!!r}],name:void 0}}function Use(e){let t=e.sortRules;if(!t||t.length===0)return;let r=t[0].code;return r.startsWith("-")?r.substr(1):r}function Wse(e){let t=e.sortRules;return!t||t.length===0?!1:!!t[0].descending}function Hse(e){return jse[e.type]}function j1(e){return Rse[e]??""}function Yn(e){let t=e;return t.includes(".")&&(t=t.split(".").pop()),t==="id"||t==="Id"?"ID":t==="versionId"?"Version ID":(t=t.replace("[x]",""),t=t.replace(/([A-Z])/g," $1"),t=t.replace(/[-_]/g," "),t=t.replace(/\s+/g," "),t=t.trim(),t.split(/\s/).map(fr).join(" "))}function qse(e,t){var n,o;let r=t.name;return r==="id"?e.id:r==="meta.versionId"?(n=e.meta)==null?void 0:n.versionId:r==="_lastUpdated"?Cr((o=e.meta)==null?void 0:o.lastUpdated):t.elementDefinition&&`${e.resourceType}.${t.name}`===t.elementDefinition.path?Gse(e,t.elementDefinition):t.searchParams&&t.searchParams.length===1&&t.name===t.searchParams[0].code?Qse(e,t.searchParams[0]):null}function Gse(e,t){var a,i,l;let r=((l=(i=(a=t.path)==null?void 0:a.split("."))==null?void 0:i.pop())==null?void 0:l.replaceAll("[x]",""))??"",[n,o]=Ya({type:e.resourceType,value:e},r);return n?s.createElement(So,{property:t,propertyType:o,value:n,maxWidth:200,ignoreMissingValues:!0,link:!1}):null}function Qse(e,t){let r=o1(t.expression,[{type:e.resourceType,value:e}]);return!r||r.length===0?null:s.createElement(s.Fragment,null,r.map((n,o)=>s.createElement(So,{key:`${o}-${r.length}`,propertyType:n.type,value:n.value,maxWidth:200,ignoreMissingValues:!0,link:!1})))}function Kse(e){let[t,r]=f.useState({search:JSON.parse(dr(e.search))}),n=f.useRef(null),o=f.useRef(null);f.useEffect(()=>{r({search:e.search})},[e.search]);function a(_){_.key==="Enter"&&u()}function i(){u()}function l(_){_.key==="Enter"&&d()}function c(){d()}function u(){var S;let _=t.search.fields??[],x=(S=n.current)==null?void 0:S.value;if(x){let $=[..._,x];r({search:{...t.search,fields:$}})}}function d(){var S;let _=t.search.fields??[],x=(S=o.current)==null?void 0:S.value;if(x){let $=[..._];$.splice($.indexOf(x),1),r({search:{...t.search,fields:$}})}}function p(){var O;let _=t.search.fields??[],x=(O=o.current)==null?void 0:O.value;if(!x)return;let S=[..._],$=S.indexOf(x);$<=0||(g(S,$,$-1),r({search:{...t.search,fields:S}}))}function h(){var O;let _=t.search.fields??[],x=(O=o.current)==null?void 0:O.value;if(!x)return;let S=[..._],$=S.indexOf(x);$>=S.length-1||(g(S,$,$+1),r({search:{...t.search,fields:S}}))}function g(_,x,S){let $=_[x];_[x]=_[S],_[S]=$}if(!e.visible)return null;let y=e.search.resourceType,v=X4(y),E=K0(y),w=t.search.fields??[],b=Yse(v,E).filter(_=>!w.includes(_)).sort((_,x)=>_.localeCompare(x));return s.createElement(jr,{title:"Fields",closeButtonProps:{"aria-label":"Close"},opened:e.visible,onClose:e.onCancel},s.createElement("div",null,s.createElement("table",{style:{margin:"auto"}},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",{colSpan:2,align:"center"},"Available"),s.createElement("th",{colSpan:2,align:"center"},"Selected"))),s.createElement("tbody",null,s.createElement("tr",null,s.createElement("td",{colSpan:2,align:"center"},s.createElement("select",{ref:n,size:15,tabIndex:1,style:{width:"200px"},onKeyDown:_=>a(_),onDoubleClick:()=>i(),"data-testid":"available"},b.map(_=>s.createElement("option",{key:_,value:_},Yn(_))))),s.createElement("td",{colSpan:2,align:"center"},s.createElement("select",{ref:o,size:15,tabIndex:4,style:{width:"200px"},onKeyDown:_=>l(_),onDoubleClick:()=>c(),"data-testid":"selected"},w.map(_=>s.createElement("option",{key:_,value:_},Yn(_))))))),s.createElement("tfoot",null,s.createElement("tr",null,s.createElement("td",{align:"center"},s.createElement(ee,{compact:!0,variant:"outline",onClick:u},"Add")),s.createElement("td",{align:"center"},s.createElement(ee,{compact:!0,variant:"outline",onClick:d},"Remove")),s.createElement("td",{align:"center"},s.createElement(ee,{compact:!0,variant:"outline",onClick:p},"Up")),s.createElement("td",{align:"center"},s.createElement(ee,{compact:!0,variant:"outline",onClick:h},"Down")))))),s.createElement(ee,{onClick:()=>e.onOk(t.search)},"OK"))}function Yse(e,t){let r=[],n=new Set,o=new Set;for(let a of Object.keys(e.elements))r.push(a),n.add(a.toLowerCase()),o.add(Yn(a));if(t)for(let a of Object.keys(t)){let i=Yn(a);!n.has(a)&&!o.has(i)&&(r.push(a),n.add(a),o.add(Yn(a)))}return r}function WD(e){var o;let{resourceType:t,filter:r}=e,n=(o=ua.types[t].searchParams)==null?void 0:o[r.code];if(n){if(n.type==="reference"&&(r.operator===te.EQUALS||r.operator===te.NOT_EQUALS))return s.createElement(Oc,{value:{reference:r.value}});let a=a1(t,n);if(r.code==="_lastUpdated"||a.type===Uo.DATETIME)return s.createElement(s.Fragment,null,Cr(r.value))}return s.createElement(s.Fragment,null,r.value)}function HD(e){let t=a1(e.resourceType,e.searchParam),r="filter-value";switch(t.type){case Uo.REFERENCE:return s.createElement(eh,{name:r,defaultValue:e.defaultValue?{reference:e.defaultValue}:void 0,targetTypes:e.searchParam.target,autoFocus:e.autoFocus,onChange:n=>{n?e.onChange(n.reference):e.onChange("")}});case Uo.BOOLEAN:return s.createElement(kn,{name:r,"data-autofocus":e.autoFocus,"data-testid":r,defaultChecked:e.defaultValue==="true",autoFocus:e.autoFocus,onChange:n=>e.onChange(n.currentTarget.checked.toString())});case Uo.DATE:return s.createElement(ae,{type:"date",name:r,"data-autofocus":e.autoFocus,"data-testid":r,defaultValue:e.defaultValue,autoFocus:e.autoFocus,onChange:n=>e.onChange(n.currentTarget.value)});case Uo.DATETIME:return s.createElement(Xa,{name:r,defaultValue:e.defaultValue,autoFocus:e.autoFocus,onChange:e.onChange});case Uo.NUMBER:return s.createElement(ae,{type:"number",name:r,"data-autofocus":e.autoFocus,"data-testid":r,defaultValue:e.defaultValue,autoFocus:e.autoFocus,onChange:n=>e.onChange(n.currentTarget.value)});case Uo.QUANTITY:return s.createElement(Ja,{name:r,defaultValue:Xse(e.defaultValue),autoFocus:e.autoFocus,onChange:n=>{n?e.onChange(`${n.value}`):e.onChange("")}});default:return s.createElement(ae,{name:r,"data-autofocus":e.autoFocus,"data-testid":r,defaultValue:e.defaultValue,autoFocus:e.autoFocus,onChange:n=>e.onChange(n.currentTarget.value),placeholder:"Search value"})}}function Xse(e){if(e){let[t,r,n]=e.split("|");if(t)return{value:parseFloat(t),system:r,unit:n}}}function Jse(e){let[t,r]=f.useState(JSON.parse(dr(e.search))),[n,o]=f.useState(-1),a=f.useRef(t);a.current=t,f.useEffect(()=>{r(JSON.parse(dr(e.search)))},[e.search]);function i(d){r(rh(a.current,d.code,d.operator,d.value))}if(!e.visible)return null;let l=e.search.resourceType,c=K0(l)??{},u=t.filters||[];return s.createElement(jr,{title:"Filters",closeButtonProps:{"aria-label":"Close"},size:900,opened:e.visible,onClose:e.onCancel},s.createElement("div",null,s.createElement("table",null,s.createElement("colgroup",null,s.createElement("col",{style:{width:200}}),s.createElement("col",{style:{width:200}}),s.createElement("col",{style:{width:380}}),s.createElement("col",{style:{width:120}})),s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,"Field"),s.createElement("th",null,"Operation"),s.createElement("th",null,"Value"),s.createElement("th",null,"Actions"))),s.createElement("tbody",null,u.map((d,p)=>p===n?s.createElement(_$,{key:`filter-${d.code}-${d.operator}-${d.value}-input`,resourceType:l,searchParams:c,defaultValue:d,okText:"Save",onOk:h=>{let g=[...u];g[p]=h,r(P1(a.current,g)),o(-1)},onCancel:()=>o(-1)}):s.createElement(Zse,{key:`filter-${d.code}-${d.operator}-${d.value}-display`,resourceType:l,searchParams:c,filter:d,onEdit:()=>o(p),onDelete:()=>r(Tse(a.current,p))})),s.createElement(_$,{resourceType:l,searchParams:c,okText:"Add",onOk:i})))),s.createElement(J,{position:"right",mt:"xl"},s.createElement(ee,{onClick:()=>e.onOk(a.current)},"OK")))}function Zse(e){let{filter:t}=e;return s.createElement("tr",null,s.createElement("td",null,Yn(t.code)),s.createElement("td",null,j1(t.operator)),s.createElement("td",null,s.createElement(WD,{resourceType:e.resourceType,filter:t})),s.createElement("td",null,s.createElement(ee,{compact:!0,variant:"outline",onClick:e.onEdit},"Edit"),s.createElement(ee,{compact:!0,variant:"outline",onClick:e.onDelete},"Delete")))}function _$(e){let[t,r]=f.useState(e.defaultValue??{}),n=f.useRef(t);n.current=t;function o(u){r({...n.current,code:u})}function a(u){r({...n.current,operator:u})}function i(u){r({...n.current,value:u})}let l=e.searchParams[t.code],c=l&&Hse(l);return s.createElement("tr",null,s.createElement("td",null,s.createElement(dt,{"data-testid":"filter-field",defaultValue:n.current.code,onChange:u=>o(u.currentTarget.value),data:["",...Object.keys(e.searchParams).map(u=>({value:u,label:Yn(u)}))]})),s.createElement("td",null,c&&s.createElement(dt,{"data-testid":"filter-operation",defaultValue:t.operator,onChange:u=>a(u.currentTarget.value),data:["",...c.map(u=>({value:u,label:j1(u)}))]})),s.createElement("td",null,l&&t.operator&&s.createElement(HD,{resourceType:e.resourceType,searchParam:l,defaultValue:t.value,onChange:i})),s.createElement("td",null,t.code&&t.operator&&s.createElement(ee,{compact:!0,variant:"outline",onClick:()=>{e.onOk(n.current),r({})}},e.okText),e.onCancel&&s.createElement(ee,{compact:!0,variant:"outline",onClick:e.onCancel},"Cancel")))}function ece(e){let[t,r]=f.useState(e.defaultValue??"");if(!e.visible||!e.searchParam||!e.filter)return null;function n(){e.onOk({...e.filter,value:t})}return s.createElement(jr,{title:e.title,size:"xl",opened:e.visible,onClose:e.onCancel},s.createElement(De,{onSubmit:n},s.createElement(rn,null,s.createElement(rn.Col,{span:10},s.createElement(HD,{resourceType:e.resourceType,searchParam:e.searchParam,defaultValue:t,autoFocus:!0,onChange:r})),s.createElement(rn.Col,{span:2},s.createElement(ee,{onClick:n,fullWidth:!0},"OK")))))}function tce(e){if(!e.searchParams)return null;function t(a,i){o(Bse(e.search,a.code,i))}function r(a){o($1(e.search,a.code))}function n(a,i){e.onPrompt(a,{code:a.code,operator:i,value:""})}function o(a){e.onChange(a)}return e.searchParams.length===1?s.createElement(rce,{search:e.search,searchParam:e.searchParams[0],onSort:t,onPrompt:n,onChange:o,onClear:r}):s.createElement(X.Dropdown,null,e.searchParams.map(a=>s.createElement(X.Item,{key:a.code},Yn(a.code))))}function rce(e){switch(e.searchParam.type){case"date":return s.createElement(nce,{...e});case"number":case"quantity":return s.createElement(oce,{...e});case"reference":return s.createElement(ace,{...e});case"string":case"token":case"uri":return s.createElement(ice,{...e});default:return s.createElement(s.Fragment,null,"Unknown search param type: ",e.searchParam.type)}}function nce(e){let{searchParam:t}=e,r=t.code;return s.createElement(X.Dropdown,null,s.createElement(X.Item,{icon:s.createElement(u1,{size:14}),onClick:()=>e.onSort(t,!1)},"Sort Oldest to Newest"),s.createElement(X.Item,{icon:s.createElement(d1,{size:14}),onClick:()=>e.onSort(t,!0)},"Sort Newest to Oldest"),s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(Zm,{size:14}),onClick:()=>e.onPrompt(t,te.EQUALS)},"Equals..."),s.createElement(X.Item,{icon:s.createElement(Jm,{size:14}),onClick:()=>e.onPrompt(t,te.NOT_EQUALS)},"Does not equal..."),s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(gD,{size:14}),onClick:()=>e.onPrompt(t,te.ENDS_BEFORE)},"Before..."),s.createElement(X.Item,{icon:s.createElement(hD,{size:14}),onClick:()=>e.onPrompt(t,te.STARTS_AFTER)},"After..."),s.createElement(X.Item,{icon:s.createElement(sie,{size:14}),onClick:()=>e.onPrompt(t,te.EQUALS)},"Between..."),s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(Oa,{size:14}),onClick:()=>e.onChange(Nse(e.search,r))},"Tomorrow"),s.createElement(X.Item,{icon:s.createElement(Oa,{size:14}),onClick:()=>e.onChange(Dse(e.search,r))},"Today"),s.createElement(X.Item,{icon:s.createElement(Oa,{size:14}),onClick:()=>e.onChange(Ise(e.search,r))},"Yesterday"),s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(Oa,{size:14}),onClick:()=>e.onChange(Lse(e.search,r))},"Next Month"),s.createElement(X.Item,{icon:s.createElement(Oa,{size:14}),onClick:()=>e.onChange(Mse(e.search,r))},"This Month"),s.createElement(X.Item,{icon:s.createElement(Oa,{size:14}),onClick:()=>e.onChange(Ase(e.search,r))},"Last Month"),s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(Oa,{size:14}),onClick:()=>e.onChange(zse(e.search,r))},"Year to date"),s.createElement(nh,{...e}))}function oce(e){let{searchParam:t}=e;return s.createElement(X.Dropdown,null,s.createElement(X.Item,{icon:s.createElement(u1,{size:14}),onClick:()=>e.onSort(t,!1)},"Sort Smallest to Largest"),s.createElement(X.Item,{icon:s.createElement(d1,{size:14}),onClick:()=>e.onSort(t,!0)},"Sort Largest to Smallest"),s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(Zm,{size:14}),onClick:()=>e.onPrompt(t,te.EQUALS)},"Equals..."),s.createElement(X.Item,{icon:s.createElement(Jm,{size:14}),onClick:()=>e.onPrompt(t,te.NOT_EQUALS)},"Does not equal..."),s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(hD,{size:14}),onClick:()=>e.onPrompt(t,te.GREATER_THAN)},"Greater than..."),s.createElement(X.Item,{icon:s.createElement(zv,{size:14}),onClick:()=>e.onPrompt(t,te.GREATER_THAN_OR_EQUALS)},"Greater than or equal to..."),s.createElement(X.Item,{icon:s.createElement(gD,{size:14}),onClick:()=>e.onPrompt(t,te.LESS_THAN)},"Less than..."),s.createElement(X.Item,{icon:s.createElement(zv,{size:14}),onClick:()=>e.onPrompt(t,te.LESS_THAN_OR_EQUALS)},"Less than or equal to..."),s.createElement(nh,{...e}))}function ace(e){let{searchParam:t}=e;return s.createElement(X.Dropdown,null,s.createElement(X.Item,{icon:s.createElement(Zm,{size:14}),onClick:()=>e.onPrompt(t,te.EQUALS)},"Equals..."),s.createElement(X.Item,{icon:s.createElement(Jm,{size:14}),onClick:()=>e.onPrompt(t,te.NOT)},"Does not equal..."),s.createElement(nh,{...e}))}function ice(e){let{searchParam:t}=e;return s.createElement(X.Dropdown,null,s.createElement(X.Item,{icon:s.createElement(u1,{size:14}),onClick:()=>e.onSort(t,!1)},"Sort A to Z"),s.createElement(X.Item,{icon:s.createElement(d1,{size:14}),onClick:()=>e.onSort(t,!0)},"Sort Z to A"),s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(Zm,{size:14}),onClick:()=>e.onPrompt(t,te.EQUALS)},"Equals..."),s.createElement(X.Item,{icon:s.createElement(Jm,{size:14}),onClick:()=>e.onPrompt(t,te.NOT)},"Does not equal..."),s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(uie,{size:14}),onClick:()=>e.onPrompt(t,te.CONTAINS)},"Contains..."),s.createElement(X.Item,{icon:s.createElement(cie,{size:14}),onClick:()=>e.onPrompt(t,te.EQUALS)},"Does not contain..."),s.createElement(nh,{...e}))}function nh(e){let{searchParam:t}=e,r=t.code;return s.createElement(s.Fragment,null,s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(iie,{size:14}),onClick:()=>e.onChange(b$(e.search,r))},"Missing"),s.createElement(X.Item,{icon:s.createElement(aie,{size:14}),onClick:()=>e.onChange(b$(e.search,r,!1))},"Not missing"),s.createElement(X.Divider,null),s.createElement(X.Item,{icon:s.createElement(Rie,{size:14}),onClick:()=>e.onClear(t)},"Clear filters"))}function lce(e){let t=e.resourceType,r=[];for(let n of e.fields||["id","_lastUpdated"])r.push(sce(t,n));return r}function sce(e,t){var o;if(t==="_lastUpdated")return{name:"_lastUpdated",searchParams:[{resourceType:"SearchParameter",base:["Resource"],code:"_lastUpdated",name:"_lastUpdated",type:"date",expression:"Resource.meta.lastUpdated"}]};if(t==="meta.versionId")return{name:"meta.versionId",searchParams:[{resourceType:"SearchParameter",base:["Resource"],code:"_versionId",name:"_versionId",type:"token",expression:"Resource.meta.versionId"}]};let r=fi(e,t),n=goe(e,t.toLowerCase());if(r&&n)return{name:t,elementDefinition:r,searchParams:[n]};if(r){let a=K0(e),i;if(a){let l=`${e}.${t.replaceAll("[x]","")}`;i=Object.values(a).filter(c=>{var u;return(u=c.expression)==null?void 0:u.includes(l)}),i.length===0&&(i=void 0)}return{name:t,elementDefinition:r,searchParams:i}}if(n){let a=a1(e,n);return{name:t,elementDefinition:(o=a.elementDefinitions)==null?void 0:o[0],searchParams:[n]}}return{name:t}}var cce=class extends Event{constructor(e){super("change"),this.definition=e}},uce=class extends Event{constructor(e){super("load"),this.response=e}},Hp=class extends Event{constructor(e,t){super("click"),this.resource=e,this.browserEvent=t}},dce=H(e=>({root:{maxWidth:"100%",overflow:"auto",textAlign:"left",marginBottom:"20px"},table:{cursor:"pointer"},tr:{"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0]}},th:{padding:"0 !important"},control:{width:"100%",padding:`${e.spacing.xs} ${e.spacing.md}`,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}},icon:{width:21,height:21,borderRadius:21}}));function fce(e){var D,z,W,K;let{classes:t}=dce(),r=ne(),[n,o]=f.useState(!1),[a,i]=f.useState(),{search:l,onLoad:c}=e,[u,d]=f.useState({selected:{},fieldEditorVisible:!1,filterEditorVisible:!1,exportDialogVisible:!1,filterDialogVisible:!1}),p=f.useRef(u);p.current=u;let h=l.total??"accurate",g=f.useCallback(R=>{i(void 0),r.search(l.resourceType,Hi({...l,total:h,fields:void 0}),R).then(A=>{d({...p.current,searchResponse:A}),c&&c(new uce(A))}).catch(A=>{d({...p.current,searchResponse:void 0}),i(A)})},[r,l,h,c]),y=f.useCallback(()=>{d({...p.current,searchResponse:void 0}),g({cache:"reload"})},[g]);f.useEffect(()=>{g()},[g]);function v(R,A){R.stopPropagation();let V=R.target.checked,Q={...p.current.selected};V?Q[A]=!0:delete Q[A],d({...p.current,selected:Q})}function E(R){R.stopPropagation();let A=R.target.checked,V={},Q=p.current.searchResponse;A&&(Q!=null&&Q.entry)&&Q.entry.forEach(ie=>{var Ce;(Ce=ie.resource)!=null&&Ce.id&&(V[ie.resource.id]=!0)}),d({...p.current,selected:V})}function w(){var A,V;let R=p.current;if(!((A=R.searchResponse)!=null&&A.entry)||R.searchResponse.entry.length===0)return!1;for(let Q of R.searchResponse.entry)if((V=Q.resource)!=null&&V.id&&!R.selected[Q.resource.id])return!1;return!0}function b(R){e.onChange&&e.onChange(new cce(R))}function _(R,A){if(wD(R.target)||R.button===2)return;it(R);let V=R.button===1||R.ctrlKey||R.metaKey;!V&&e.onClick&&e.onClick(new Hp(A,R)),V&&e.onAuxClick&&e.onAuxClick(new Hp(A,R))}function x(){return!!(e.onExport??e.onExportCsv??e.onExportTransactionBundle)}if(f.useEffect(()=>{o(!1),r.requestSchema(e.search.resourceType).then(()=>o(!0)).catch(console.log)},[r,e.search.resourceType]),!n)return s.createElement(tr,{style:{width:"100%",height:"100%"}},s.createElement(un,null));let S=e.checkboxesEnabled,$=lce(l),O=l.resourceType,C=u.searchResponse,T=(D=C==null?void 0:C.entry)==null?void 0:D.map(R=>R.resource),k="subtle",I="gray",j=16,N=window.innerWidth<768;return s.createElement("div",{className:t.root,"data-testid":"search-control"},!e.hideToolbar&&s.createElement(J,{position:"apart",mb:"xl"},s.createElement(J,{spacing:2},s.createElement(ee,{compact:!0,variant:k,color:I,leftIcon:s.createElement(pie,{size:j}),onClick:()=>d({...p.current,fieldEditorVisible:!0})},"Fields"),s.createElement(ee,{compact:!0,variant:k,color:I,leftIcon:s.createElement(wie,{size:j}),onClick:()=>d({...p.current,filterEditorVisible:!0})},"Filters"),e.onNew&&s.createElement(ee,{compact:!0,variant:k,color:I,leftIcon:s.createElement(yie,{size:j}),onClick:e.onNew},"New..."),!N&&x()&&s.createElement(ee,{compact:!0,variant:k,color:I,leftIcon:s.createElement(jie,{size:j}),onClick:e.onExport?e.onExport:()=>d({...p.current,exportDialogVisible:!0})},"Export..."),!N&&e.onDelete&&s.createElement(ee,{compact:!0,variant:k,color:I,leftIcon:s.createElement(vD,{size:j}),onClick:()=>e.onDelete(Object.keys(u.selected))},"Delete..."),!N&&e.onBulk&&s.createElement(ee,{compact:!0,variant:k,color:I,leftIcon:s.createElement(lie,{size:j}),onClick:()=>e.onBulk(Object.keys(u.selected))},"Bulk...")),s.createElement(J,{spacing:2},C&&s.createElement(oe,{size:"xs",color:"dimmed"},gce(l,C.total),"-",vce(l,C.total)," of"," ",`${h==="estimate"?"~":""}${(z=C.total)==null?void 0:z.toLocaleString()}`),s.createElement(ur,{title:"Refresh",onClick:y},s.createElement($ie,{size:"1.125rem"})))),s.createElement(ci,{className:t.table},s.createElement("thead",null,s.createElement("tr",null,S&&s.createElement("th",null,s.createElement("input",{type:"checkbox",value:"checked","aria-label":"all-checkbox","data-testid":"all-checkbox",checked:w(),onChange:R=>E(R)})),$.map(R=>s.createElement("th",{key:R.name},s.createElement(X,{shadow:"md",width:240,position:"bottom-end"},s.createElement(X.Target,null,s.createElement(ho,{className:t.control},s.createElement(J,{position:"apart",noWrap:!0},s.createElement(oe,{weight:500,size:"sm"},Yn(R.name)),s.createElement(tr,{className:t.icon},s.createElement(rie,{size:14,stroke:1.5}))))),s.createElement(tce,{search:e.search,searchParams:R.searchParams,onPrompt:(A,V)=>{d({...p.current,filterDialogVisible:!0,filterDialogSearchParam:A,filterDialogFilter:V})},onChange:A=>{b(A)}}))))),!e.hideFilters&&s.createElement("tr",null,S&&s.createElement("th",null),$.map(R=>s.createElement("th",{key:R.name},R.searchParams&&s.createElement(pce,{resourceType:O,searchParams:R.searchParams,filters:e.search.filters}))))),s.createElement("tbody",null,T==null?void 0:T.map(R=>R&&s.createElement("tr",{key:R.id,className:t.tr,"data-testid":"search-control-row",onClick:A=>_(A,R),onAuxClick:A=>_(A,R)},S&&s.createElement("td",null,s.createElement("input",{type:"checkbox",value:"checked","data-testid":"row-checkbox","aria-label":`Checkbox for ${R.id}`,checked:!!u.selected[R.id],onChange:A=>v(A,R.id)})),$.map(A=>s.createElement("td",{key:A.name},qse(R,A))))))),(T==null?void 0:T.length)===0&&s.createElement($c,null,s.createElement(tr,{style:{height:150}},s.createElement(oe,{size:"xl",color:"dimmed"},"No results"))),(C==null?void 0:C.total)!==void 0&&C.total>0&&s.createElement(tr,{m:"md",p:"md"},s.createElement(eo,{value:mce(l),total:hce(l,C.total),onChange:R=>b(Vse(l,R)),getControlProps:R=>{switch(R){case"previous":return{"aria-label":"Previous page"};case"next":return{"aria-label":"Next page"};default:return{}}}})),a&&s.createElement("div",{"data-testid":"search-error"},s.createElement("pre",{style:{textAlign:"left"}},JSON.stringify(a,void 0,2))),s.createElement(Kse,{search:e.search,visible:p.current.fieldEditorVisible,onOk:R=>{b(R),d({...p.current,fieldEditorVisible:!1})},onCancel:()=>{d({...p.current,fieldEditorVisible:!1})}}),s.createElement(Jse,{search:e.search,visible:p.current.filterEditorVisible,onOk:R=>{b(R),d({...p.current,filterEditorVisible:!1})},onCancel:()=>{d({...p.current,filterEditorVisible:!1})}}),s.createElement(kse,{visible:p.current.exportDialogVisible,exportCsv:e.onExportCsv,exportTransactionBundle:e.onExportTransactionBundle,onCancel:()=>{d({...p.current,exportDialogVisible:!1})}}),s.createElement(ece,{key:(W=u.filterDialogSearchParam)==null?void 0:W.code,visible:p.current.filterDialogVisible,title:(K=u.filterDialogSearchParam)!=null&&K.code?Yn(u.filterDialogSearchParam.code):"",resourceType:O,searchParam:u.filterDialogSearchParam,filter:u.filterDialogFilter,defaultValue:"",onOk:R=>{b(rh(e.search,R.code,R.operator,R.value)),d({...p.current,filterDialogVisible:!1})},onCancel:()=>{d({...p.current,filterDialogVisible:!1})}}))}var Cc=s.memo(fce);function pce(e){let t=(e.filters??[]).filter(r=>e.searchParams.find(n=>n.code===r.code));return t.length===0?s.createElement("span",null,"no filters"):s.createElement(s.Fragment,null,t.map(r=>s.createElement("div",{key:`filter-${r.code}-${r.operator}-${r.value}`},j1(r.operator)," ",s.createElement(WD,{resourceType:e.resourceType,filter:r}))))}function mce(e){return Math.floor((e.offset??0)/(e.count??Sc))+1}function hce(e,t){let r=e.count??Sc;return Math.ceil(t/r)}function gce(e,t){return Math.min(t,(e.offset??0)+1)}function vce(e,t){return Math.min(t,((e.offset??0)+1)*(e.count??Sc))}function yce(e){let t=ne(),[r,n]=f.useState(!1),[o,a]=f.useState(),{query:i,fields:l}=e,[c,u]=f.useState(),[d,p]=f.useState({}),h=f.useRef();h.current=c;let g=f.useRef({});g.current=d,f.useEffect(()=>{a(void 0),t.graphql(i).then(u).catch(_=>a(st(_)))},[t,i]);function y(_,x){_.stopPropagation();let S=_.target.checked,$={...g.current};S?$[x]=!0:delete $[x],p($)}function v(_){var O;_.stopPropagation();let x=_.target.checked,S={},$=(O=h.current)==null?void 0:O.data.ResourceList;x&&$&&$.forEach(C=>{C.id&&(S[C.id]=!0)}),p(S)}function E(){var x;let _=(x=h.current)==null?void 0:x.data.ResourceList;if(!_||_.length===0)return!1;for(let S of _)if(S.id&&!g.current[S.id])return!1;return!0}function w(_,x){wD(_.target)||(it(_),_.button!==1&&e.onClick&&e.onClick(new Hp(x,_)),_.button===1&&e.onAuxClick&&e.onAuxClick(new Hp(x,_)))}if(f.useEffect(()=>{t.requestSchema(e.resourceType).then(()=>n(!0)).catch(console.log)},[t,e.resourceType]),!r)return s.createElement(un,null);let b=e.checkboxesEnabled;return s.createElement("div",{onContextMenu:_=>it(_),"data-testid":"search-control"},s.createElement(ci,null,s.createElement("thead",null,s.createElement("tr",null,b&&s.createElement("th",null,s.createElement("input",{type:"checkbox",value:"checked","aria-label":"all-checkbox","data-testid":"all-checkbox",checked:E(),onChange:_=>v(_)})),l.map(_=>s.createElement("th",{key:_.name},_.name)))),s.createElement("tbody",null,c==null?void 0:c.data.ResourceList.map(_=>_&&s.createElement("tr",{key:_.id,"data-testid":"search-control-row",onClick:x=>w(x,_),onAuxClick:x=>w(x,_)},b&&s.createElement("td",null,s.createElement("input",{type:"checkbox",value:"checked","data-testid":"row-checkbox","aria-label":`Checkbox for ${_.id}`,checked:!!d[_.id],onChange:x=>y(x,_.id)})),l.map(x=>s.createElement("td",{key:x.name},s.createElement(Cse,{propertyType:x.propertyType,path:x.fhirPath,resource:_}))))))),(c==null?void 0:c.data.ResourceList.length)===0&&s.createElement("div",{"data-testid":"empty-search"},"No results"),o&&s.createElement("div",{"data-testid":"search-error"},s.createElement("pre",{style:{textAlign:"left"}},JSON.stringify(o,void 0,2))),e.onBulk&&s.createElement(ee,{onClick:()=>e.onBulk(Object.keys(g.current))},"Bulk..."))}var wce=s.memo(yce);function bce(e){let t=f.useCallback((r,n,o)=>{let a=`${n}/${o}`,i=100;return Promise.allSettled([r.readHistory("Patient",o),r.search("Communication",{subject:a,_count:i}),r.search("Device",{patient:a,_count:i}),r.search("DeviceRequest",{patient:a,_count:i}),r.search("DiagnosticReport",{subject:a,_count:i}),r.search("Media",{subject:a,_count:i}),r.search("ServiceRequest",{subject:a,_count:i}),r.search("Task",{subject:a,_count:i})])},[]);return s.createElement(th,{value:e.patient,loadTimelineResources:t,createCommunication:(r,n,o)=>({resourceType:"Communication",status:"completed",subject:ut(r),sender:ut(n),sent:new Date().toISOString(),payload:[{contentString:o}]}),createMedia:(r,n,o)=>({resourceType:"Media",status:"completed",subject:ut(r),operator:ut(n),issued:new Date().toISOString(),content:o})})}var qD=H(e=>({section:{position:"relative",margin:"4px 4px 8px 0",padding:"6px 12px 16px 6px",border:`1.5px solid ${e.colors.gray[1]}`,borderRadius:e.radius.sm,transition:"all 0.1s"},hovering:{border:`1.5px solid ${e.colors.blue[5]}`},editing:{border:`1.5px solid ${e.colors.gray[1]}`,borderLeft:`4px solid ${e.colors.blue[5]}`},bottomActions:{position:"absolute",right:4,bottom:0,fontSize:e.fontSizes.xs,"& a":{marginLeft:8}}}));function _ce(e){let t=ne(),r=tt(e.value),[n,o]=f.useState(!1),[a,i]=f.useState(),[l,c]=f.useState(),[u,d]=f.useState();function p(){c(void 0)}function h(){i(void 0)}let g=f.useRef();if(g.current=u,f.useEffect(()=>{t.requestSchema("PlanDefinition").then(()=>o(!0)).catch(console.log)},[t]),f.useEffect(()=>(d(Oce(r??{resourceType:"PlanDefinition"})),document.addEventListener("mouseover",p),document.addEventListener("click",h),()=>{document.removeEventListener("mouseover",p),document.removeEventListener("click",h)}),[r]),!n||!u)return null;function y(v,E){d({...g.current,[v]:E})}return s.createElement("div",null,s.createElement(De,{testid:"questionnaire-form",onSubmit:()=>e.onSubmit(u)},s.createElement(ae,{label:"Plan Title",defaultValue:u.title,onChange:v=>y("title",v.currentTarget.value)}),s.createElement(GD,{actions:u.action||[],selectedKey:a,setSelectedKey:i,hoverKey:l,setHoverKey:c,onChange:v=>y("action",v)}),s.createElement(ee,{type:"submit"},"Save")))}function GD(e){let{classes:t}=qD(),r=f.useRef();r.current=e.actions;function n(i){e.onChange(r.current.map(l=>l.id===i.id?i:l))}function o(i){e.onChange([...r.current,i]),e.setSelectedKey(i.id)}function a(i){e.onChange(r.current.filter(l=>l!==i))}return s.createElement("div",{className:t.section},e.actions.map(i=>s.createElement("div",{key:i.id},s.createElement(xce,{action:i,selectedKey:e.selectedKey,setSelectedKey:e.setSelectedKey,hoverKey:e.hoverKey,setHoverKey:e.setHoverKey,onChange:n,onRemove:()=>a(i)}))),s.createElement("div",{className:t.bottomActions},s.createElement(Ae,{href:"#",onClick:i=>{it(i),o({id:KD()})}},"Add action")))}function xce(e){let{classes:t,cx:r}=qD(),{action:n}=e,o=$ce(n),a=e.selectedKey===e.action.id,i=e.hoverKey===e.action.id;function l(d){d.stopPropagation(),e.setSelectedKey(e.action.id)}function c(d){it(d),e.setHoverKey(e.action.id)}let u=r(t.section,{[t.editing]:a,[t.hovering]:i&&!a});return s.createElement("div",{"data-testid":n.id,className:u,onClick:l,onMouseOver:c},a?s.createElement(Sce,{action:n,actionType:o,onChange:e.onChange,selectedKey:e.selectedKey,setSelectedKey:e.setSelectedKey,hoverKey:e.hoverKey,setHoverKey:e.setHoverKey,onRemove:e.onRemove}):s.createElement(Ece,{action:n,actionType:o}),s.createElement("div",{className:t.bottomActions},s.createElement(Ae,{href:"#",onClick:d=>{d.preventDefault(),e.onRemove()}},"Remove")))}var Wv={path:"PlanDefinition.action.timing[x]",min:0,max:1,description:"",isArray:!1,constraints:[],type:["dateTime","Period","Range","Timing"].map(e=>({code:e}))};function Ece(e){let{action:t,actionType:r}=e,[n,o]=QD(t);return s.createElement("div",null,s.createElement("div",null,t.title||"Untitled"," ",r&&`(${r})`),t.definitionCanonical&&s.createElement("div",null,s.createElement(Wp,{value:{reference:t.definitionCanonical}})),n&&s.createElement("div",null,s.createElement(So,{property:Wv,propertyType:o,value:n})))}function Sce(e){let{action:t}=e,[r,n]=f.useState(e.actionType);function o(a,i){e.onChange({...t,[a]:i})}return s.createElement(je,{spacing:"xl"},s.createElement(ae,{name:`actionTitle-${t.id}`,label:"Title",defaultValue:t.title,onChange:a=>o("title",a.currentTarget.value)}),s.createElement(ae,{name:`actionDescription-${t.id}`,label:"Description",defaultValue:t.description,onChange:a=>o("description",a.currentTarget.value)}),s.createElement(dt,{label:"Type of Action",description:"The type of the action to be performed.",name:`actionType-${t.id}`,defaultValue:r,onChange:a=>n(a.currentTarget.value),data:["","appointment","lab","questionnaire","task"]}),t.action&&t.action.length>0&&s.createElement(GD,{actions:t.action,selectedKey:e.selectedKey,setSelectedKey:e.setSelectedKey,hoverKey:e.hoverKey,setHoverKey:e.setHoverKey,onChange:a=>o("action",a)}),(()=>{switch(r){case"appointment":return s.createElement(Ru,{title:"Appointment",description:"The subject must schedule an appointment from the schedule.",resourceType:"Schedule",action:t,onChange:e.onChange});case"lab":return s.createElement(Ru,{title:"Lab",description:"The subject must complete the following lab panel.",resourceType:"ActivityDefinition",action:t,onChange:e.onChange});case"questionnaire":return s.createElement(Ru,{title:"Questionnaire",description:"The subject must complete the selected questionnaire.",resourceType:"Questionnaire",action:t,onChange:e.onChange});case"task":return s.createElement(Ru,{title:"Task",description:"The subject must complete the following task.",resourceType:"ActivityDefinition",action:t,onChange:e.onChange});default:return null}})(),s.createElement(Ze,{title:"Timing",description:"When the action should take place."},s.createElement(Pce,{name:"timing-"+t.id,action:t,onChange:e.onChange})))}function Ru(e){let{id:t,definitionCanonical:r}=e.action,n=r!=null&&r.startsWith(e.resourceType+"/")?{reference:r}:void 0;return s.createElement(Il,{name:t,resourceType:e.resourceType,defaultValue:n,loadOnFocus:!0,onChange:o=>{o?e.onChange({...e.action,definitionCanonical:Je(o)}):e.onChange({...e.action,definitionCanonical:void 0})}})}function Pce(e){let t=e.action,r="timing",[n,o]=QD(t);return s.createElement(Za,{property:Wv,name:"timing[x]",defaultValue:n,defaultPropertyType:o,onChange:(a,i)=>{e.onChange(Bv(t,r,i??r,Wv,a))}})}function $ce(e){var t,r,n;if((t=e.definitionCanonical)!=null&&t.startsWith("Schedule"))return"appointment";if((r=e.definitionCanonical)!=null&&r.startsWith("Questionnaire/"))return"questionnaire";if((n=e.definitionCanonical)!=null&&n.startsWith("ActivityDefinition/"))return"task"}function QD(e){return Ya({type:"PlanDefinitionAction",value:e},"timing")}var pg=1;function KD(e){if(e){if(e.startsWith("id-")){let t=parseInt(e.substring(3),10);isNaN(t)||(pg=Math.max(pg,t+1))}return e}return"id-"+pg++}function Oce(e){return{...e,action:YD(e.action)}}function YD(e){if(e)return e.map(t=>({...t,id:KD(t.id),action:YD(t.action)}))}var Cce=(e=>(e.group="group",e.display="display",e.question="question",e.boolean="boolean",e.decimal="decimal",e.integer="integer",e.date="date",e.dateTime="dateTime",e.time="time",e.string="string",e.text="text",e.url="url",e.choice="choice",e.openChoice="open-choice",e.attachment="attachment",e.reference="reference",e.quantity="quantity",e))(Cce||{});function kce(e){return e.type==="choice"||e.type==="open-choice"}function jce(e,t){if(!e.enableWhen)return!0;let r=e.enableBehavior??"any";for(let n of e.enableWhen){let o=XD(t,n.question);if(n.operator==="exists"&&!n.answerBoolean&&!(o!=null&&o.length)){if(r==="any")return!0;continue}let{anyMatch:a,allMatch:i}=Ice(n,o,r);if(r==="any"&&a)return!0;if(r==="all"&&!i)return!1}return r!=="any"}function Rce(e,t,r){return e.map(n=>{var i;let o=(i=r.answerOption)==null?void 0:i.find(l=>Tl(l.valueCoding)===n||l[t]===n),a=rr({type:"QuestionnaireItemAnswerOption",value:o},"value");return{[t]:a==null?void 0:a.value}})}function XD(e,t){if(e)for(let r of e){if(r.linkId===t)return r.answer;if(r.item){let n=XD(r.item,t);if(n)return n}}}function Tce(e,t,r){if(r==="exists")return!!e===t.value;if(e){let n=r==="="||r==="!="?r==null?void 0:r.replace("=","~"):r,[{value:o}]=o1(`%actualAnswer ${n} %expectedAnswer`,[e],{actualAnswer:e,expectedAnswer:t});return o}else return!1}function Ice(e,t,r){let n=t||[],o=rr({type:"QuestionnaireItemEnableWhen",value:e},"answer[x]"),a=!1,i=!0;for(let l of n){let c=rr({type:"QuestionnaireResponseItemAnswer",value:l},"value[x]"),{operator:u}=e;if(Tce(c,o,u)?a=!0:i=!1,r==="any"&&a)break}return{anyMatch:a,allMatch:i}}function JD(e){var r,n;let t=H0(e,"http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource");if(t){if(t.valueCode!==void 0)return[t.valueCode];if(t.valueCodeableConcept)return(n=(r=t.valueCodeableConcept)==null?void 0:r.coding)==null?void 0:n.map(o=>o.code)}}function mg(e,t){var o;let r=di(e),n=H0(r,"http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource");return!t||t.length===0?(n&&(r.extension=(o=r.extension)==null?void 0:o.filter(a=>a!==n)),r):(n||(r.extension||(r.extension=[]),n={url:"http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource"},r.extension.push(n)),t.length===1?(n.valueCode=t[0],delete n.valueCodeableConcept):(n.valueCodeableConcept={coding:t.map(a=>({code:a}))},delete n.valueCode),r)}function ZD(e){let t=e.item,r=e.index;function n(c,u){var g,y;let d=u??0,p=((g=e.currentResponseItems)==null?void 0:g.filter(v=>v.linkId===t.linkId))??[],h;Array.isArray(c)?h=c:h=Mce(((y=p[0])==null?void 0:y.answer)??[],d,c),e.onChange({id:p[0].id,linkId:t.linkId,text:t.text,answer:h})}let o=t.type;if(!o)return null;let a=t.linkId;if(!a)return null;let i=t.initial&&t.initial.length>0?t.initial[0]:void 0,l=T1(e.allResponses,t,e.index,e.groupSequence)??rr({type:"QuestionnaireItemInitial",value:i},"value");switch(o){case"boolean":return s.createElement(ID,{key:e.item.linkId,title:e.item.text,htmlFor:e.item.linkId},s.createElement(kn,{id:e.item.linkId,name:e.item.linkId,defaultChecked:l==null?void 0:l.value,onChange:c=>n({valueBoolean:c.currentTarget.checked},r)}));case"decimal":return s.createElement(ae,{type:"number",step:"any",id:a,name:a,required:t.required,defaultValue:l==null?void 0:l.value,onChange:c=>n({valueDecimal:c.currentTarget.valueAsNumber},r)});case"integer":return s.createElement(ae,{type:"number",step:1,id:a,name:a,required:t.required,defaultValue:l==null?void 0:l.value,onChange:c=>n({valueInteger:c.currentTarget.valueAsNumber},r)});case"date":return s.createElement(ae,{type:"date",id:a,name:a,required:t.required,defaultValue:l==null?void 0:l.value,onChange:c=>n({valueDate:c.currentTarget.value},r)});case"dateTime":return s.createElement(Xa,{name:a,required:t.required,defaultValue:l==null?void 0:l.value,onChange:c=>n({valueDateTime:c},r)});case"time":return s.createElement(ae,{type:"time",id:a,name:a,required:t.required,defaultValue:l==null?void 0:l.value,onChange:c=>n({valueTime:c.currentTarget.value},r)});case"string":case"url":return s.createElement(ae,{id:a,name:a,required:t.required,defaultValue:l==null?void 0:l.value,onChange:c=>n({valueString:c.currentTarget.value},r)});case"text":return s.createElement(vc,{id:a,name:a,required:t.required,defaultValue:l==null?void 0:l.value,onChange:c=>n({valueString:c.currentTarget.value},r)});case"attachment":return s.createElement(J,{py:4},s.createElement(xD,{name:a,defaultValue:l==null?void 0:l.value,onChange:c=>n({valueAttachment:c},r)}));case"reference":return s.createElement(eh,{name:a,required:t.required,targetTypes:JD(t),defaultValue:l==null?void 0:l.value,onChange:c=>n({valueReference:c},r)});case"quantity":return s.createElement(Ja,{name:a,required:t.required,defaultValue:l==null?void 0:l.value,onChange:c=>n({valueQuantity:c},r),disableWheel:!0});case"choice":case"open-choice":return Lce(t)?s.createElement(Dce,{name:a,item:t,initial:i,allResponses:e.allResponses,index:r,groupSequence:e.groupSequence,onChangeAnswer:c=>n(c,r)}):s.createElement(Nce,{name:a,item:t,initial:i,allResponses:e.allResponses,onChangeAnswer:c=>n(c,r)});default:return null}}function Dce(e){let{name:t,item:r,initial:n}=e,o=rr({type:"QuestionnaireItemInitial",value:n},"value"),a=[""];if(r.answerOption)for(let l of r.answerOption){let c=rr({type:"QuestionnaireItemAnswerOption",value:l},"value");a.push(hg(c))}let i=T1(e.allResponses,r,e.index,e.groupSequence)??rr({type:"QuestionnaireItemInitial",value:n},"value");if(r.repeats){let{propertyName:l,data:c}=zce(e.item),u=Fce(e.allResponses,r,e.groupSequence);return s.createElement(M0,{data:c,placeholder:"Select items",searchable:!0,defaultValue:u||[hg(o)],onChange:d=>{let p=Rce(d,l,r);e.onChangeAnswer(p)}})}return s.createElement(dt,{id:t,name:t,onChange:l=>{let c=l.currentTarget.selectedIndex;if(c===0){e.onChangeAnswer({});return}let u=r.answerOption[c-1],d=rr({type:"QuestionnaireItemAnswerOption",value:u},"value"),p="value"+fr(d.type);e.onChangeAnswer({[p]:d.value})},defaultValue:(Tl(i==null?void 0:i.value)||(i==null?void 0:i.value))??hg(o),data:a})}function Nce(e){let{name:t,item:r,initial:n,onChangeAnswer:o,allResponses:a}=e;return r.answerValueSet?s.createElement(DD,{name:t,binding:r.answerValueSet,onChange:i=>o({valueCoding:i})}):s.createElement(Ace,{name:t,item:r,initial:n,allResponses:a,onChangeAnswer:o})}function Ace(e){let{name:t,item:r,initial:n,onChangeAnswer:o}=e,a=fi("QuestionnaireItemAnswerOption","value[x]"),i=rr({type:"QuestionnaireItemInitial",value:n},"value"),l=[],c;if(r.answerOption)for(let p=0;p<r.answerOption.length;p++){let h=r.answerOption[p],g=`${t}-option-${p}`,y=rr({type:"QuestionnaireItemAnswerOption",value:h},"value");i&&dr(y)===dr(i)&&(c=g),l.push([g,y])}let u=T1(e.allResponses,r,e.index,e.groupSequence),d=Vce(l,u);return s.createElement(Sp.Group,{name:t,value:d??c,onChange:p=>{let h=l.find(g=>g[0]===p);if(h){let g=h[1],y="value"+fr(g.type);o({[y]:g.value})}}},l.map(([p,h])=>s.createElement(Sp,{key:p,id:p,value:p,py:4,label:s.createElement(So,{property:a,propertyType:h.type,value:h.value})})))}function Mce(e,t,r){if(t<e.length)return e[t]=r,e;for(let n=e.length;n<t;n++)e.push({});return e.push(r),e}function Lce(e){var t;return!!((t=e.extension)!=null&&t.some(r=>{var n,o,a;return r.url==="http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl"&&((a=(o=(n=r.valueCodeableConcept)==null?void 0:n.coding)==null?void 0:o[0])==null?void 0:a.code)==="drop-down"}))}function zce(e){var a;if(((a=e.answerOption)==null?void 0:a.length)===0)return{propertyName:"",data:[]};let t=e.answerOption[0],r=rr({type:"QuestionnaireItemAnswerOption",value:t},"value"),n="value"+fr(r.type),o=(e.answerOption??[]).map(i=>({value:x$(i,n),label:x$(i,n)}));return{propertyName:n,data:o}}function x$(e,t){var r;return Tl(e.valueCoding)||((r=e[t])==null?void 0:r.toString())}function hg(e){if(e)return e.type==="CodeableConcept"?e.value.coding[0].display:e.type==="Coding"?e.value.display:e.value.toString()}function R1(e,t){let r=[];for(let n of e)n.linkId===t&&r.push(n),n.item&&(r=r.concat(R1(n.item,t)));return r}function eN(e){return rr({type:"QuestionnaireItemAnswer",value:e},"value")}function T1(e,t,r=0,n=0){var a;let o=(a=R1(e,t.linkId??"")[n])==null?void 0:a.answer;return eN((o==null?void 0:o[r])??{})}function Fce(e,t,r=0){var o;let n=(o=R1(e,t.linkId??"")[r])==null?void 0:o.answer;return n?n.map(a=>eN(a)).map(a=>Tl(a==null?void 0:a.value)||(a==null?void 0:a.value)):[]}function Vce(e,t){var r;return(r=e.find(n=>qm(n[1].value,t==null?void 0:t.value)))==null?void 0:r[0]}var Bce=H(e=>({section:{position:"relative",margin:"4px 4px 8px 0",padding:"6px 12px 16px 6px",border:`1.5px solid ${e.colors.gray[1]}`,borderRadius:e.radius.sm,transition:"all 0.1s"},hovering:{border:`1.5px solid ${e.colors.blue[5]}`},editing:{border:`1.5px solid ${e.colors.gray[1]}`,borderLeft:`4px solid ${e.colors.blue[5]}`},questionBody:{maxWidth:600},topActions:{position:"absolute",right:32,top:1,padding:4,color:e.colors.gray[5],fontSize:e.fontSizes.xs},bottomActions:{position:"absolute",right:4,bottom:0,fontSize:e.fontSizes.xs,"& a":{marginLeft:8}},movementActions:{position:"absolute",right:8,top:0,paddingTop:8,fontSize:e.fontSizes.xs,"& a":{marginLeft:8}},movementIcons:{color:e.colors.gray[5]},columnAlignment:{display:"flex",flexDirection:"column"},linkIdInput:{width:100,marginBottom:4},typeSelect:{width:100}}));function Uce(e){let t=ne(),r=tt(e.questionnaire),[n,o]=f.useState(!1),[a,i]=f.useState(),[l,c]=f.useState(),[u,d]=f.useState();function p(){d(void 0)}function h(){c(void 0)}return f.useEffect(()=>{t.requestSchema("Questionnaire").then(()=>o(!0)).catch(console.log)},[t]),f.useEffect(()=>(i(Gce(r??{resourceType:"Questionnaire"})),document.addEventListener("mouseover",p),document.addEventListener("click",h),()=>{document.removeEventListener("mouseover",p),document.removeEventListener("click",h)}),[r]),!n||!a?null:s.createElement("div",null,s.createElement(De,{testid:"questionnaire-form",onSubmit:()=>e.onSubmit(a)},s.createElement(tN,{item:a,selectedKey:l,setSelectedKey:c,hoverKey:u,setHoverKey:d,onChange:i}),s.createElement(ee,{type:"submit"},"Save")))}function tN(e){var S;let{classes:t,cx:r}=Bce(),n=e.item,o=e.item,a=Ro(e.item),i=a||o.type==="group",l=o.linkId??"[untitled]",c=e.selectedKey===e.item.id,u=e.hoverKey===e.item.id,d=f.useRef();d.current=e.item;function p($){it($),e.setSelectedKey(e.item.id)}function h($){it($),e.setHoverKey(e.item.id)}function g($){var C;let O=d.current;e.onChange({...O,item:(C=O.item)==null?void 0:C.map(T=>T.id===$.id?$:T)})}function y($){e.onChange({...e.item,item:[...e.item.item??[],$]})}function v($){var O;e.onChange({...e.item,item:(O=e.item.item)==null?void 0:O.filter(C=>C!==$)})}function E($,O){e.onChange({...d.current,[$]:O})}function w($){e.onChange({...e.item,...$})}function b($){var O;e.onChange({...e.item,item:(O=e.item.item)==null?void 0:O.map(C=>C===$?{...C,repeats:!C.repeats}:C)})}function _($,O){let C=Yce(e.item.item,$,O);e.onChange({...e.item,item:C})}let x=r(t.section,{[t.editing]:c,[t.hovering]:u&&!c});return s.createElement("div",{"data-testid":o.linkId,className:x,onClick:p,onMouseOver:h},s.createElement("div",{className:t.questionBody},c?s.createElement(s.Fragment,null,a&&s.createElement(ae,{size:"xl",defaultValue:n.title,onChange:$=>E("title",$.currentTarget.value)}),!a&&s.createElement(vc,{autosize:!0,minRows:2,defaultValue:o.text,onChange:$=>E("text",$.currentTarget.value)}),o.type==="reference"&&s.createElement(qce,{item:o,onChange:w}),kce(o)&&s.createElement(Wce,{item:o,onChange:$=>w($)})):s.createElement(s.Fragment,null,n.title&&s.createElement(fe,null,n.title),o.text&&s.createElement("div",null,o.text),!i&&s.createElement(ZD,{item:o,index:0,allResponses:[],onChange:()=>{}}))),(S=o.item)==null?void 0:S.map(($,O)=>s.createElement("div",{key:$.id},s.createElement(tN,{item:$,selectedKey:e.selectedKey,setSelectedKey:e.setSelectedKey,hoverKey:e.hoverKey,isFirst:O===0,isLast:O===(e.item.item??[]).length-1,setHoverKey:e.setHoverKey,onChange:g,onRemove:()=>v($),onRepeatable:b,onMoveUp:()=>_(O,-1),onMoveDown:()=>_(O,1)}))),!i&&s.createElement("div",{className:t.topActions},c?s.createElement(s.Fragment,null,s.createElement(ae,{size:"xs",className:t.linkIdInput,defaultValue:o.linkId,onChange:$=>E("linkId",$.currentTarget.value)}),!i&&s.createElement(dt,{size:"xs",className:t.typeSelect,defaultValue:o.type,onChange:$=>E("type",$.currentTarget.value),data:[{value:"display",label:"Display"},{value:"boolean",label:"Boolean"},{value:"decimal",label:"Decimal"},{value:"integer",label:"Integer"},{value:"date",label:"Date"},{value:"dateTime",label:"Date/Time"},{value:"time",label:"Time"},{value:"string",label:"String"},{value:"text",label:"Text"},{value:"url",label:"URL"},{value:"choice",label:"Choice"},{value:"open-choice",label:"Open Choice"},{value:"attachment",label:"Attachment"},{value:"reference",label:"Reference"},{value:"quantity",label:"Quantity"}]})):s.createElement("div",null,l)),!a&&s.createElement(le,{className:t.movementActions},s.createElement(le,{className:t.columnAlignment},!e.isFirst&&s.createElement(Ae,{href:"#",onClick:$=>{$.preventDefault(),e.onMoveUp&&e.onMoveUp()}},s.createElement(oie,{"data-testid":"up-button",size:15,className:t.movementIcons})),!e.isLast&&s.createElement(Ae,{href:"#",onClick:$=>{$.preventDefault(),e.onMoveDown&&e.onMoveDown()}},s.createElement(nie,{"data-testid":"down-button",size:15,className:t.movementIcons})))),s.createElement("div",{className:t.bottomActions},i&&s.createElement(s.Fragment,null,s.createElement(Ae,{href:"#",onClick:$=>{$.preventDefault(),y({id:ti(),linkId:Gv("q"),type:"string",text:"Question"})}},"Add item"),s.createElement(Ae,{href:"#",onClick:$=>{$.preventDefault(),y({id:ti(),linkId:Gv("g"),type:"group",text:"Group"})}},"Add group")),a&&s.createElement(Ae,{href:"#",onClick:$=>{$.preventDefault(),y(Kce())}},"Add Page"),c&&!a&&s.createElement(s.Fragment,null,s.createElement(Ae,{href:"#",onClick:$=>{$.preventDefault(),e.onRepeatable&&e.onRepeatable(o)}},o.repeats?"Remove Repeatable":"Make Repeatable"),s.createElement(Ae,{href:"#",onClick:$=>{$.preventDefault(),e.onRemove&&e.onRemove()}},"Remove"))))}function Wce(e){let t=fi("QuestionnaireItemAnswerOption","value[x]"),r=e.item.answerOption??[];return s.createElement("div",null,e.item.answerValueSet!==void 0?s.createElement(ae,{placeholder:"Enter Value Set",defaultValue:e.item.answerValueSet,onChange:n=>e.onChange({...e.item,answerValueSet:n.target.value})}):s.createElement(Hce,{options:r,property:t,item:e.item,onChange:e.onChange}),s.createElement(le,{display:"flex"},s.createElement(Ae,{href:"#",onClick:n=>{it(n),e.onChange({...e.item,answerValueSet:void 0,answerOption:[...r,{id:ti()}]})}},"Add choice"),s.createElement(Hm,{w:"lg"}),s.createElement(Ae,{href:"#",onClick:n=>{it(n),e.onChange({...e.item,answerOption:[],answerValueSet:""})}},"Add value set")))}function Hce(e){return s.createElement("div",null,e.options.map(t=>{let[r,n]=Ya({type:"QuestionnaireItemAnswerOption",value:t},"value");return s.createElement("div",{key:t.id,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"80%"}},s.createElement("div",null,s.createElement(Za,{key:t.id,name:"value[x]",property:e.property,defaultPropertyType:n,defaultValue:r,onChange:(o,a)=>{let i=[...e.options],l=i.findIndex(c=>c.id===t.id);i[l]={id:t.id,[a]:o},e.onChange({...e.item,answerOption:i})}})),s.createElement("div",null,s.createElement(Ae,{href:"#",onClick:o=>{it(o),e.onChange({...e.item,answerOption:e.options.filter(a=>a.id!==t.id)})}},"Remove")))}))}function qce(e){let t=JD(e.item)??[];return s.createElement(s.Fragment,null,t.map((r,n)=>s.createElement(J,{key:`${r}-${n}`},s.createElement(g1,{name:"resourceType",placeholder:"Resource Type",defaultValue:r,onChange:o=>{e.onChange(mg(e.item,t.map(a=>a===r?o:a)))}}),s.createElement(Ae,{href:"#",onClick:o=>{it(o),e.onChange(mg(e.item,t.filter(a=>a!==r)))}},"Remove"))),s.createElement(Ae,{href:"#",onClick:r=>{it(r),e.onChange(mg(e.item,[...t,""]))}},"Add Resource Type"))}var Hv=1,qv=1;function Gv(e){return e+Hv++}function ti(){return"id-"+qv++}function Gce(e){return{...e,id:e.id||ti(),item:rN(e.item)}}function rN(e){if(e)return e.forEach(t=>{var r,n;(r=t.id)!=null&&r.match(/^id-\d+$/)&&(qv=Math.max(qv,parseInt(t.id.substring(3),10)+1)),(n=t.linkId)!=null&&n.match(/^q\d+$/)&&(Hv=Math.max(Hv,parseInt(t.linkId.substring(1),10)+1))}),e.map(t=>({...t,id:t.id||ti(),item:rN(t.item),answerOption:Qce(t.answerOption)}))}function Qce(e){if(e)return e.map(t=>({...t,id:t.id||ti()}))}function Kce(){return{id:ti(),linkId:Gv("s"),type:"group",text:"New Page",extension:[{url:"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",valueCodeableConcept:{coding:[{system:"http://hl7.org/fhir/questionnaire-item-control",code:"page"}]}}]}}function Yce(e,t,r){let n=e??[],o=t+r;if(o<0||o>=n.length)return n;let a=[...n];return[a[t],a[o]]=[a[o],a[t]],a}function nN(e){let t=ne(),r=t.getProfile(),[n,o]=f.useState(!1),a=tt(e.questionnaire),[i,l]=f.useState(),[c,u]=f.useState(0);f.useEffect(()=>{t.requestSchema("Questionnaire").then(()=>t.requestSchema("QuestionnaireResponse")).then(()=>o(!0)).catch(console.log)},[t]),f.useEffect(()=>{l(a?Jce(a):void 0)},[a]);function d(y){let v=(i==null?void 0:i.item)??[],E={resourceType:"QuestionnaireResponse",item:iN(v,y)};l(E)}if(!n||!a)return null;let p=rue(a),h=()=>u(y=>y+1),g=()=>u(y=>y-1);return s.createElement(De,{testid:"questionnaire-form",onSubmit:()=>{e.onSubmit&&i&&e.onSubmit({...i,questionnaire:Je(a),subject:e.subject,source:ut(r),authored:new Date().toISOString(),status:"completed"})}},a.title&&s.createElement(fe,null,a.title),a.item&&s.createElement(oN,{items:a.item??[],allResponses:(i==null?void 0:i.item)??[],onChange:d,renderPages:p>1,activePage:c}),s.createElement(Xce,{activePage:c,numberOfPages:p,nextStep:h,prevStep:g,submitButtonText:e.submitButtonText}))}function oN(e){let[t,r]=f.useState(I1(e.items));function n(a,i){let l=t.some(u=>u.id===a),c;l?c=t.map(u=>u.id===a?i:u):c=[...t,i],r(c),e.onChange(c)}let o=e.items.map((a,i)=>e.renderPages?s.createElement(Js.Step,{label:a.text,key:a.linkId},s.createElement(E$,{key:`${a.linkId}-${i}`,item:a,index:i,allResponses:e.allResponses,currentResponseItems:t,groupSequence:e.groupSequence,setResponseItem:n})):s.createElement(E$,{key:`${a.linkId}-${i}`,item:a,index:i,groupSequence:e.groupSequence,allResponses:e.allResponses,currentResponseItems:t,setResponseItem:n}));return e.renderPages?s.createElement(Js,{active:e.activePage??0,allowNextStepsSelect:!1,p:6},o):s.createElement(je,null,o)}function E$(e){return jce(e.item,e.allResponses)?e.item.type==="display"?s.createElement("p",{key:e.item.linkId},e.item.text):e.item.type==="group"?s.createElement(gg,{key:e.item.linkId,item:e.item,allResponses:e.allResponses,currentResponseItems:e.currentResponseItems,groupSequence:e.groupSequence,onChange:t=>e.setResponseItem(t.id,t)}):e.item.type==="boolean"?s.createElement(gg,{item:e.item,allResponses:e.allResponses,currentResponseItems:e.currentResponseItems,groupSequence:e.groupSequence,onChange:t=>e.setResponseItem(t.id,t)}):s.createElement(Ze,{key:e.item.linkId,htmlFor:e.item.linkId,title:e.item.text,withAsterisk:e.item.required},s.createElement(gg,{item:e.item,allResponses:e.allResponses,currentResponseItems:e.currentResponseItems,groupSequence:e.groupSequence,onChange:t=>e.setResponseItem(t.id,t)})):null}function gg(e){let t=e.item;function r(n,o){let a=o??0,i=e.currentResponseItems.filter(l=>l.linkId===t.linkId);e.onChange({id:aue(i,a),linkId:t.linkId,text:t.text,item:n})}return t.type==="group"?s.createElement(nue,{key:e.item.linkId,text:t.text??"",item:t??[],allResponses:e.allResponses,onChange:r}):s.createElement(oue,{item:e.item,key:e.item.linkId},({index:n})=>s.createElement(ZD,{...e,index:n}))}function Xce(e){let t=e.activePage>0,r=e.activePage<e.numberOfPages-1,n=e.activePage===e.numberOfPages-1;return s.createElement(J,{position:"right",mt:"xl",spacing:"xs"},t&&s.createElement(ee,{onClick:e.prevStep},"Back"),r&&s.createElement(ee,{onClick:o=>{o.currentTarget.closest("form").reportValidity()&&e.nextStep()}},"Next"),n&&s.createElement(ee,{type:"submit"},e.submitButtonText??"Submit"))}function Jce(e){return{resourceType:"QuestionnaireResponse",questionnaire:Je(e),item:I1(e.item)}}function I1(e){return(e==null?void 0:e.map(Zce))??[]}function Zce(e){var t;return{id:aN(),linkId:e.linkId,text:e.text,item:I1(e.item),answer:((t=e.initial)==null?void 0:t.map(tue))??[]}}var eue=1;function aN(){return"id-"+eue++}function tue(e){return{...e}}function rue(e){var r,n,o,a,i;let t=(r=e==null?void 0:e.item)==null?void 0:r[0];return t&&((i=(a=(o=(n=H0(t,"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl"))==null?void 0:n.valueCodeableConcept)==null?void 0:o.coding)==null?void 0:a[0])==null?void 0:i.code)==="page"?e.item.length:1}function nue(e){let[t,r]=f.useState(iue(e.item,e.allResponses)),n=e.item;return s.createElement(s.Fragment,null,[...Array(t)].map((o,a)=>s.createElement("div",{key:a},e.text&&s.createElement(fe,{order:3,mb:"md"},e.text),s.createElement(oN,{items:n.item??[],allResponses:e.allResponses,groupSequence:a,onChange:i=>e.onChange(i,a)}))),e.item.repeats&&s.createElement(Ae,{onClick:()=>r(o=>o+1)},"Add Group"))}function oue(e){var o;let[t,r]=f.useState(1),n=((o=e.item)==null?void 0:o.repeats)&&e.item.type!=="choice"&&e.item.type!=="open-choice";return s.createElement(s.Fragment,null,[...Array(t)].map((a,i)=>s.createElement(s.Fragment,{key:`${e.item.linkId}-${i}`},e.children({index:i}))),n&&s.createElement(Ae,{onClick:()=>r(a=>a+1)},"Add Item"))}function aue(e,t){return e.length===0||e.length<t+1?aN():e[t].id}function iue(e,t){let r=t.filter(n=>n.linkId===e.linkId).length;return r>0?r:1}function lue(e,t){let r=iN(e.item??[],t.item??[]);return{...t,item:r,answer:t.answer&&t.answer.length>0?t.answer:e.answer}}function sue(e,t){let r=[],n=Math.max(e.length,t.length);for(let o=0;o<n;o++)e[o]&&t[o]?r.push(lue(e[o],t[o])):t[o]&&r.push(t[o]);return r}function iN(e,t){let r=[];for(let n of new Set(t.map(o=>o.linkId))){let o=e.filter(i=>i.linkId===n),a=t.filter(i=>i.linkId===n);r=r.concat(sue(o,a))}return r}var cue=H(e=>({section:{position:"relative",margin:"4px 4px 8px 0",padding:"6px 12px 16px 6px",border:`1.5px solid ${e.colors.gray[3]}`,borderRadius:e.radius.sm,transition:"all 0.1s"}})),uue=["gender","age","gestationalAge","context","appliesTo","category"],due={definition:{resourceType:"ObservationDefinition"},onSubmit:()=>{}};function fue(e){e=Object.assign(due,e);let t=e.definition,[r,n]=f.useState([]),[o,a]=f.useState(1),[i,l]=f.useState(1);return f.useEffect(()=>{let y=hue(t,l);n(gue(y.qualifiedInterval||[],a))},[t]),s.createElement(De,{testid:"reference-range-editor",onSubmit:c},s.createElement(je,null,r.map(y=>{var v;return s.createElement(pue,{unit:yue((v=t.quantitativeDetails)==null?void 0:v.unit),onChange:p,onAdd:h,onRemove:g,onRemoveGroup:d,key:`group-${y.id}`,intervalGroup:y})})),s.createElement(ur,{title:"Add Group",size:"sm",onClick:y=>{it(y),u({id:`group-id-${o}`,filters:{},intervals:[]}),a(v=>v+1)}},s.createElement(c1,null)),s.createElement(J,{position:"right"},s.createElement(ee,{type:"submit"},"Save")));function c(){let y=r.flatMap(v=>v.intervals).filter(v=>!wue(v));e.onSubmit({...t,qualifiedInterval:y})}function u(y){n(v=>[...v,y])}function d(y){n(v=>v.filter(E=>E.id!==y.id))}function p(y,v){n(E=>{E=[...E];let w=E.find(_=>_.id===y),b=w==null?void 0:w.intervals.findIndex(_=>_.id===v.id);return b!==void 0&&(w!=null&&w.intervals[b])&&(w.intervals[b]=v),E})}function h(y,v){v.id===void 0&&(v.id=`id-${i}`,l(E=>E+1)),n(E=>{E=[...E];let w=E.findIndex(b=>b.id===y);if(w!==-1){let b={...E[w]};v={...v,...b.filters},b.intervals=[...b.intervals,v],E[w]=b}return E})}function g(y,v){n(E=>{E=[...E];let w=E.find(b=>b.id===y);return w&&(w.intervals=w.intervals.filter(b=>b.id!==v.id)),E})}}function pue(e){let{intervalGroup:t,unit:r}=e,{classes:n}=cue();return s.createElement($c,{"data-testid":t.id,className:n.section},s.createElement(je,{spacing:"lg"},s.createElement(J,{position:"right"},s.createElement(ur,{title:"Remove Group","data-testid":`remove-group-button-${t.id}`,key:`remove-group-button-${t.id}`,size:"sm",onClick:o=>{it(o),e.onRemoveGroup(t)}},s.createElement(Up,null))),s.createElement(mue,{intervalGroup:t,onChange:e.onChange}),s.createElement(wr,null),t.intervals.map(o=>s.createElement(je,{key:`interval-${o.id}`,spacing:"xs"},s.createElement(J,null,s.createElement(ae,{key:`condition-${o.id}`,"data-testid":`condition-${o.id}`,defaultValue:o.condition,label:"Condition: ",size:"sm",onChange:a=>{it(a),e.onChange(t.id,{...o,condition:a.currentTarget.value.trim()})}}),s.createElement(ur,{title:"Remove Interval",size:"sm",key:`remove-interval-${o.id}`,"data-testid":`remove-interval-${o.id}`,onClick:a=>{it(a),e.onRemove(t.id,o)}},s.createElement(Up,null))),s.createElement(x1,{onChange:a=>{e.onChange(t.id,{...o,range:a})},key:`range-${o.id}`,name:`range-${o.id}`,defaultValue:o.range}))),s.createElement(ur,{title:"Add Interval",size:"sm",onClick:o=>{it(o),e.onAdd(t.id,{range:{low:{unit:r},high:{unit:r}}})}},s.createElement(c1,null))))}function mue(e){var n,o;let{intervalGroup:t,onChange:r}=e;t.filters.age||(t.filters.age={});for(let a of["low","high"])(n=t.filters.age[a])!=null&&n.unit||(t.filters.age[a]={...t.filters.age[a],unit:"years",system:"http://unitsofmeasure.org"});return s.createElement(je,{style:{maxWidth:"50%"}},s.createElement(J,null,s.createElement(dt,{data:["","male","female"],label:"Gender:",defaultValue:t.filters.gender||"",onChange:a=>{for(let i of t.intervals){let l=a.currentTarget.value;l===""&&(l=void 0),r(t.id,{...i,gender:l})}}})),s.createElement(J,{spacing:"xs"},s.createElement(oe,{component:"label",htmlFor:`div-age-${t.id}`},"Age:"),s.createElement("div",{id:`div-age-${t.id}`},s.createElement(x1,{key:`age-${t.id}`,name:`age-${t.id}`,defaultValue:t.filters.age,onChange:a=>{for(let i of t.intervals)r(t.id,{...i,age:a})}}))),s.createElement(dt,{data:["","pre-puberty","follicular","midcycle","luteal","postmenopausal"],label:"Endocrine:",defaultValue:((o=t.filters.context)==null?void 0:o.text)||"",onChange:a=>{for(let i of t.intervals){let l=a.currentTarget.value;l===""?(l=void 0,r(t.id,{...i,context:void 0})):r(t.id,{...i,context:{text:l,coding:[{code:l,system:"http://terminology.hl7.org/CodeSystem/referencerange-meaning"}]}})}}}),s.createElement(dt,{data:["","reference","critical","absolute"],label:"Category: ",defaultValue:t.filters.category,onChange:a=>{for(let i of t.intervals){let l=a.currentTarget.value;l===""?r(t.id,{...i,category:void 0}):r(t.id,{...i,category:l})}}}))}function hue(e,t){let r=e.qualifiedInterval||[],n=Math.max(...r.map(o=>{var i;let a=parseInt(((i=o.id)==null?void 0:i.substring(3))||"",10);return isNaN(a)?Number.NEGATIVE_INFINITY:a}))+1;return Number.isFinite(n)||(n=1),e={...e,qualifiedInterval:r.map(o=>({...o,id:o.id||`id-${n++}`}))},t(n),e}function gue(e,t){let r=1,n={};for(let o of e){let a=vue(o);a in n||(n[a]={id:`group-id-${r++}`,filters:Object.fromEntries(uue.map(i=>[i,o[i]])),intervals:[]}),n[a].intervals.push(o)}return t(r),Object.values(n)}function vue(e){var t,r;return[`gender=${e.gender}`,`age=${Zs(e.age)}`,`gestationalAge=${Zs(e.gestationalAge)}`,`context=${(t=e.context)==null?void 0:t.text}`,`appliesTo=${(r=e.appliesTo)==null?void 0:r.map(n=>n.text).join("+")}`,`category=${e.category}`].join(":")}function yue(e){return e&&(Tne(e,"http://unitsofmeasure.org")||e.text)}function wue(e){var t,r,n,o;return((r=(t=e.range)==null?void 0:t.low)==null?void 0:r.value)===void 0&&((o=(n=e.range)==null?void 0:n.high)==null?void 0:o.value)===void 0}function bue(e){var u;let t=ne(),r=tt(e.value),[n,o]=f.useState(!1),[a,i]=f.useState();if(f.useEffect(()=>{r&&!n&&(t.executeBatch(l(r)).then(i).catch(console.log),o(!0))},[t,r,n]),!r||!a)return null;return s.createElement(rn,null,(u=r.action)==null?void 0:u.map((d,p)=>{var v,E,w,b,_,x;let h=d.resource&&c(d.resource),g=(E=(v=h==null?void 0:h.input)==null?void 0:v[0])==null?void 0:E.valueReference,y=(b=(w=h==null?void 0:h.output)==null?void 0:w[0])==null?void 0:b.valueReference;return s.createElement(s.Fragment,{key:`action-${p}`},s.createElement(rn.Col,{span:1,p:"md"},(h==null?void 0:h.status)==="completed"?s.createElement(die,null):s.createElement(Cie,{color:"gray"})),s.createElement(rn.Col,{span:9,p:"xs"},s.createElement(oe,{weight:500},d.title),d.description&&s.createElement("div",null,d.description),s.createElement("div",null,"Last edited by ",s.createElement(Oc,{value:(_=h==null?void 0:h.meta)==null?void 0:_.author})," on ",Cr((x=h==null?void 0:h.meta)==null?void 0:x.lastUpdated)),s.createElement("div",null,"Status: ",s.createElement(zD,{status:(h==null?void 0:h.status)||"unknown"}))),s.createElement(rn.Col,{span:2,p:"md"},g&&!y&&s.createElement(ee,{onClick:()=>e.onStart(h,g)},"Start"),g&&y&&s.createElement(ee,{onClick:()=>e.onEdit(h,g,y)},"Edit")))}));function l(d){var h;let p=[];if(d.action)for(let g of d.action)(h=g.resource)!=null&&h.reference&&p.push({request:{method:"GET",url:g.resource.reference}});return{resourceType:"Bundle",type:"batch",entry:p}}function c(d){for(let p of a==null?void 0:a.entry)if(p.resource&&d.reference===Je(p.resource))return p.resource}}function lN(e,t){let r=_ue(e,t);return xue(r,e,t)}function _ue(e,t){let r=e.length,n=t.length,o=r+n+1,a=1+2*o,i=a/2|0,l=new Array(a);l[i+1]={i:0,j:-1,prev:void 0,snake:!0};for(let c=0;c<o;c++){for(let u=-c;u<=c;u+=2){let d=i+u,p=d+1,h=d-1,g=l[p],y=l[h],v,E=0;u===-c||u!==c&&y.i<g.i?(E=g.i,v=g):(E=y.i+1,v=y),l[h]=void 0;let w=E-u,b={i:E,j:w,prev:Eue(v),snake:!1};for(;E<r&&w<n&&e[E]===t[w];)E++,w++;if(E>b.i&&(b={i:E,j:w,prev:b,snake:!0}),l[d]=b,E>=r&&w>=n)return l[d]}l[i+c-1]=void 0}}function xue(e,t,r){let n=[],o=e;for(o.snake&&(o=o.prev);o!=null&&o.prev&&o.prev.j>=0;){let a=o.i,i=o.j;o=o.prev;let l=o.i,c=o.j,u={position:l,lines:t.slice(l,a)},d={position:c,lines:r.slice(c,i)},p;u.lines.length===0&&d.lines.length>0?p="insert":u.lines.length>0&&d.lines.length===0?p="delete":p="change",n.push({original:u,revised:d,type:p}),o.snake&&(o=o.prev)}return n}function Eue(e){return e&&!e.snake&&e.prev?e.prev:e}function Sue(e){let t=e.entry.filter(n=>!!n.resource).map(n=>{var o;return{meta:(o=n.resource)==null?void 0:o.meta,lines:dr(n.resource,!0).match(/[^\r\n]+/g)}}).sort((n,o)=>n.meta.lastUpdated.localeCompare(o.meta.lastUpdated)),r=t[0].lines.map(n=>({id:t[0].meta.versionId,meta:t[0].meta,value:n,span:1}));return Pue(r,t),$ue(r),r}function Pue(e,t){for(let r=1;r<t.length;r++){let n=lN(t[r-1].lines,t[r].lines);for(let o of n){let a=o.original.position,i=o.original.lines,l=o.revised.lines;if((o.type==="delete"||o.type==="change")&&e.splice(a,i.length),o.type==="insert"||o.type==="change")for(let c=0;c<o.revised.lines.length;c++)e.splice(a+c,0,{id:t[r].meta.versionId,meta:t[r].meta,value:l[c],span:1})}}}function $ue(e){let t=0;for(;t<e.length;){let r=t;for(;r<e.length&&e[r].id===e[t].id;)e[r].span=-1,r++;e[t].span=r-t,t=r}}function Oue(e,t){return`/${e.resourceType}/${e.id}/_history/${t}`}function Cue(e){let t=Math.floor((Date.now()-Date.parse(e))/1e3),r=Math.floor(t/31536e3);if(r>0)return Ci(r,"year");let n=Math.floor(t/2592e3);if(n>0)return Ci(n,"month");let o=Math.floor(t/86400);if(o>0)return Ci(o,"day");let a=Math.floor(t/3600);if(a>0)return Ci(a,"hour");let i=Math.floor(t/60);return i>0?Ci(i,"minute"):Ci(t,"second")}function Ci(e,t){return`${e} ${e===1?t:t+"s"} ago`}var kue=H(e=>({container:{overflowX:"auto"},root:{border:`0.1px solid ${e.colors.gray[3]}`,borderCollapse:"collapse",borderRadius:e.radius.sm,borderSpacing:0,fontSize:e.fontSizes.xs,width:"100%","& td":{padding:"2px 4px 0 4px",verticalAlign:"top",whiteSpace:"nowrap"}},startRow:{borderTop:`0.1px solid ${e.colors.gray[3]}`},normalRow:{borderTop:0},author:{lineHeight:"10px"},dateTime:{borderRight:`0.1px solid ${e.colors.gray[3]}`,lineHeight:"20px"},lineNumber:{backgroundColor:e.colors.gray[1],border:0,color:e.colors.gray[5],fontFamily:e.fontFamilyMonospace,padding:`${e.spacing.xs} ${e.spacing.sm}`,textAlign:"right"},line:{fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.sm,padding:`${e.spacing.xs} ${e.spacing.sm}`},pre:{margin:0}}));function jue(e){var l,c;let{classes:t}=kue(),r=ne(),[n,o]=f.useState(e.history);if(f.useEffect(()=>{!e.history&&e.resourceType&&e.id&&r.readHistory(e.resourceType,e.id).then(o).catch(console.log)},[r,e.history,e.resourceType,e.id]),!n)return s.createElement("div",null,"Loading...");let a=(c=(l=n.entry)==null?void 0:l[0])==null?void 0:c.resource;if(!a)return null;let i=Sue(n);return s.createElement("div",{className:t.container},s.createElement("table",{className:t.root},s.createElement("tbody",null,i.map((u,d)=>s.createElement("tr",{key:"row-"+d,className:u.span>0?t.startRow:t.normalRow},u.span>0&&s.createElement(s.Fragment,null,s.createElement("td",{className:t.author,rowSpan:u.span},s.createElement(nl,{value:u.meta.author,link:!0})),s.createElement("td",{className:t.dateTime,rowSpan:u.span},s.createElement(Re,{to:Oue(a,u.meta.versionId)},Cue(u.meta.lastUpdated)))),s.createElement("td",{className:t.lineNumber},d+1),s.createElement("td",{className:t.line},s.createElement("pre",{className:t.pre},u.value)))))))}var Rue=H(e=>({removed:{color:e.colors.red[7],textDecoration:"line-through"},added:{color:e.colors.green[7]}}));function Tue(e){let t=e.original,r=e.revised;e.ignoreMeta&&(t={...t,meta:void 0},r={...r,meta:void 0});let n=dr(t,!0).match(/[^\r\n]+/g),o=dr(r,!0).match(/[^\r\n]+/g),a=lN(n,o);return s.createElement("pre",{style:{color:"gray"}},a.map((i,l)=>s.createElement(Iue,{key:"delta"+l,delta:i})))}function Iue(e){let{classes:t}=Rue();return s.createElement(s.Fragment,null,"...",s.createElement("br",null),e.delta.original.lines.length>0&&s.createElement("div",{className:t.removed},e.delta.original.lines.join(`
|
|
191
|
+
`)),e.delta.revised.lines.length>0&&s.createElement("div",{className:t.added},e.delta.revised.lines.join(`
|
|
192
|
+
`)),"...",s.createElement("br",null))}function sN(e){let t=ne(),r=tt(e.defaultValue),[n,o]=f.useState(!1),[a,i]=f.useState();return f.useEffect(()=>{r&&(i(di(r)),t.requestSchema(r.resourceType).then(()=>o(!0)).catch(console.log))},[t,r]),!n||!a?s.createElement("div",null,"Loading..."):s.createElement("form",{noValidate:!0,autoComplete:"off",onSubmit:l=>{l.preventDefault(),e.onSubmit&&e.onSubmit(a)}},s.createElement(je,{mb:"xl"},s.createElement(Ze,{title:"Resource Type",htmlFor:"resourceType",outcome:e.outcome},s.createElement(ae,{name:"resourceType",defaultValue:a.resourceType,disabled:!0})),s.createElement(Ze,{title:"ID",htmlFor:"id",outcome:e.outcome},s.createElement(ae,{name:"id",defaultValue:a.id,disabled:!0}))),s.createElement(Uv,{typeName:a.resourceType,defaultValue:a,outcome:e.outcome,onChange:i}),s.createElement(J,{position:"right",mt:"xl"},s.createElement(ee,{type:"submit"},"OK"),e.onDelete&&s.createElement(ee,{variant:"outline",color:"red",type:"button",onClick:()=>{e.onDelete(a)}},"Delete")))}function Due(e){var o;let t=ne(),[r,n]=f.useState(e.history);return f.useEffect(()=>{!e.history&&e.resourceType&&e.id&&t.readHistory(e.resourceType,e.id).then(n).catch(console.log)},[t,e.history,e.resourceType,e.id]),r?s.createElement(ci,{withBorder:!0,withColumnBorders:!0},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,"Author"),s.createElement("th",null,"Date"),s.createElement("th",null,"Version"))),s.createElement("tbody",null,(o=r.entry)==null?void 0:o.map((a,i)=>s.createElement(Nue,{key:"entry-"+i,entry:a})))):s.createElement("div",null,"Loading...")}function Nue(e){var n,o,a;let{response:t,resource:r}=e.entry;return r?s.createElement("tr",null,s.createElement("td",null,s.createElement(nl,{value:(n=r.meta)==null?void 0:n.author,link:!0})),s.createElement("td",null,Cr((o=r.meta)==null?void 0:o.lastUpdated)),s.createElement("td",null,s.createElement(Re,{to:Aue(r)},(a=r.meta)==null?void 0:a.versionId))):s.createElement("tr",null,s.createElement("td",{colSpan:3},Oe(t==null?void 0:t.outcome)))}function Aue(e){var t;return`/${e.resourceType}/${e.id}/_history/${(t=e.meta)==null?void 0:t.versionId}`}function Mue(e){return s.createElement(th,{value:e.serviceRequest,loadTimelineResources:async(t,r,n)=>{let o=`${r}/${n}`,a=100;return Promise.allSettled([t.readHistory("ServiceRequest",n),t.search("Communication",{"based-on":o,_count:a}),t.search("DiagnosticReport",{"based-on":o,_count:a}),t.search("Media",{"based-on":o,_count:a}),t.search("DocumentReference",{related:o,_count:a}),t.search("Task",{_filter:`based-on eq ${o} or focus eq ${o} or subject eq ${o}`,_count:a})])},createCommunication:(t,r,n)=>({resourceType:"Communication",status:"completed",basedOn:[ut(t)],subject:t.subject,sender:ut(r),sent:new Date().toISOString(),payload:[{contentString:n}]}),createMedia:(t,r,n)=>({resourceType:"Media",status:"completed",basedOn:[ut(t)],subject:t.subject,operator:ut(r),issued:new Date().toISOString(),content:n})})}var cN,S$=dc;cN=S$.createRoot,S$.hydrateRoot;/**
|
|
193
|
+
* @remix-run/router v1.9.0
|
|
194
|
+
*
|
|
195
|
+
* Copyright (c) Remix Software Inc.
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the MIT license found in the
|
|
198
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
199
|
+
*
|
|
200
|
+
* @license MIT
|
|
201
|
+
*/function yt(){return yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yt.apply(this,arguments)}var kt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(kt||(kt={}));const P$="popstate";function Lue(e){e===void 0&&(e={});function t(n,o){let{pathname:a,search:i,hash:l}=n.location;return tc("",{pathname:a,search:i,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(n,o){return typeof o=="string"?o:kc(o)}return Fue(t,r,null,e)}function ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zue(){return Math.random().toString(36).substr(2,8)}function $$(e,t){return{usr:e.state,key:e.key,idx:t}}function tc(e,t,r,n){return r===void 0&&(r=null),yt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?To(t):t,{state:r,key:t&&t.key||n||zue()})}function kc(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function To(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Fue(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:a=!1}=n,i=o.history,l=kt.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(yt({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function p(){l=kt.Pop;let E=d(),w=E==null?null:E-u;u=E,c&&c({action:l,location:v.location,delta:w})}function h(E,w){l=kt.Push;let b=tc(v.location,E,w);r&&r(b,E),u=d()+1;let _=$$(b,u),x=v.createHref(b);try{i.pushState(_,"",x)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;o.location.assign(x)}a&&c&&c({action:l,location:v.location,delta:1})}function g(E,w){l=kt.Replace;let b=tc(v.location,E,w);r&&r(b,E),u=d();let _=$$(b,u),x=v.createHref(b);i.replaceState(_,"",x),a&&c&&c({action:l,location:v.location,delta:0})}function y(E){let w=o.location.origin!=="null"?o.location.origin:o.location.href,b=typeof E=="string"?E:kc(E);return ke(w,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,w)}let v={get action(){return l},get location(){return e(o,i)},listen(E){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(P$,p),c=E,()=>{o.removeEventListener(P$,p),c=null}},createHref(E){return t(o,E)},createURL:y,encodeLocation(E){let w=y(E);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:g,go(E){return i.go(E)}};return v}var Pt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Pt||(Pt={}));const Vue=new Set(["lazy","caseSensitive","path","id","index","children"]);function Bue(e){return e.index===!0}function Qv(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((o,a)=>{let i=[...r,a],l=typeof o.id=="string"?o.id:i.join("-");if(ke(o.index!==!0||!o.children,"Cannot specify children on an index route"),ke(!n[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),Bue(o)){let c=yt({},o,t(o),{id:l});return n[l]=c,c}else{let c=yt({},o,t(o),{id:l,children:void 0});return n[l]=c,o.children&&(c.children=Qv(o.children,t,i,n)),c}})}function qi(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?To(t):t,o=jc(n.pathname||"/",r);if(o==null)return null;let a=uN(e);Wue(a);let i=null;for(let l=0;i==null&&l<a.length;++l)i=Zue(a[l],rde(o));return i}function Uue(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],handle:r.handle}}function uN(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let o=(a,i,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};c.relativePath.startsWith("/")&&(ke(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=aa([n,c.relativePath]),d=r.concat(c);a.children&&a.children.length>0&&(ke(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),uN(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:Xue(u,a.index),routesMeta:d})};return e.forEach((a,i)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))o(a,i);else for(let c of dN(a.path))o(a,i,c)}),t}function dN(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return o?[a,""]:[a];let i=dN(n.join("/")),l=[];return l.push(...i.map(c=>c===""?a:[a,c].join("/"))),o&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function Wue(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Jue(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Hue=/^:\w+$/,que=3,Gue=2,Que=1,Kue=10,Yue=-2,O$=e=>e==="*";function Xue(e,t){let r=e.split("/"),n=r.length;return r.some(O$)&&(n+=Yue),t&&(n+=Gue),r.filter(o=>!O$(o)).reduce((o,a)=>o+(Hue.test(a)?que:a===""?Que:Kue),n)}function Jue(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function Zue(e,t){let{routesMeta:r}=e,n={},o="/",a=[];for(let i=0;i<r.length;++i){let l=r[i],c=i===r.length-1,u=o==="/"?t:t.slice(o.length)||"/",d=ede({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u);if(!d)return null;Object.assign(n,d.params);let p=l.route;a.push({params:n,pathname:aa([o,d.pathname]),pathnameBase:ide(aa([o,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(o=aa([o,d.pathnameBase]))}return a}function ede(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=tde(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce((u,d,p)=>{if(d==="*"){let h=l[p]||"";i=a.slice(0,a.length-h.length).replace(/(.)\/+$/,"$1")}return u[d]=nde(l[p]||"",d),u},{}),pathname:a,pathnameBase:i,pattern:e}}function tde(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),wl(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 n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(i,l)=>(n.push(l),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function rde(e){try{return decodeURI(e)}catch(t){return wl(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function nde(e,t){try{return decodeURIComponent(e)}catch(r){return wl(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function jc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function ode(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?To(e):e;return{pathname:r?r.startsWith("/")?r:ade(r,t):t,search:lde(n),hash:sde(o)}}function ade(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function vg(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function D1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function fN(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=To(e):(o=yt({},e),ke(!o.pathname||!o.pathname.includes("?"),vg("?","pathname","search",o)),ke(!o.pathname||!o.pathname.includes("#"),vg("#","pathname","hash",o)),ke(!o.search||!o.search.includes("#"),vg("#","search","hash",o)));let a=e===""||o.pathname==="",i=a?"/":o.pathname,l;if(n||i==null)l=r;else{let p=t.length-1;if(i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),p-=1;o.pathname=h.join("/")}l=p>=0?t[p]:"/"}let c=ode(o,l),u=i&&i!=="/"&&i.endsWith("/"),d=(a||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const aa=e=>e.join("/").replace(/\/\/+/g,"/"),ide=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),lde=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,sde=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class N1{constructor(t,r,n,o){o===void 0&&(o=!1),this.status=t,this.statusText=r||"",this.internal=o,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function pN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const mN=["post","put","patch","delete"],cde=new Set(mN),ude=["get",...mN],dde=new Set(ude),fde=new Set([301,302,303,307,308]),pde=new Set([307,308]),yg={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},mde={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ns={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},hN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hde=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function gde(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;ke(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let M=e.detectErrorBoundary;o=F=>({hasErrorBoundary:M(F)})}else o=hde;let a={},i=Qv(e.routes,o,void 0,a),l,c=e.basename||"/",u=yt({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),d=null,p=new Set,h=null,g=null,y=null,v=e.hydrationData!=null,E=qi(i,e.history.location,c),w=null;if(E==null){let M=Jr(404,{pathname:e.history.location.pathname}),{matches:F,route:U}=N$(i);E=F,w={[U.id]:M}}let b=!E.some(M=>M.route.lazy)&&(!E.some(M=>M.route.loader)||e.hydrationData!=null),_,x={historyAction:e.history.action,location:e.history.location,matches:E,initialized:b,navigation:yg,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||w,fetchers:new Map,blockers:new Map},S=kt.Pop,$=!1,O,C=!1,T=!1,k=[],I=[],j=new Map,N=0,D=-1,z=new Map,W=new Set,K=new Map,R=new Map,A=new Map,V=!1;function Q(){return d=e.history.listen(M=>{let{action:F,location:U,delta:Y}=M;if(V){V=!1;return}wl(A.size===0||Y!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let me=pt({currentLocation:x.location,nextLocation:U,historyAction:F});if(me&&Y!=null){V=!0,e.history.go(Y*-1),Qe(me,{state:"blocked",location:U,proceed(){Qe(me,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),e.history.go(Y)},reset(){let ve=new Map(x.blockers);ve.set(me,ns),ue({blockers:ve})}});return}return rt(F,U)}),x.initialized||rt(kt.Pop,x.location),_}function ie(){d&&d(),p.clear(),O&&O.abort(),x.fetchers.forEach((M,F)=>Qr(F)),x.blockers.forEach((M,F)=>pe(F))}function Ce(M){return p.add(M),()=>p.delete(M)}function ue(M){x=yt({},x,M),p.forEach(F=>F(x))}function Me(M,F){var U,Y;let me=x.actionData!=null&&x.navigation.formMethod!=null&&bn(x.navigation.formMethod)&&x.navigation.state==="loading"&&((U=M.state)==null?void 0:U._isRedirect)!==!0,ve;F.actionData?Object.keys(F.actionData).length>0?ve=F.actionData:ve=null:me?ve=x.actionData:ve=null;let xe=F.loaderData?D$(x.loaderData,F.loaderData,F.matches||[],F.errors):x.loaderData,he=x.blockers;he.size>0&&(he=new Map(he),he.forEach((Ke,ht)=>he.set(ht,ns)));let ce=$===!0||x.navigation.formMethod!=null&&bn(x.navigation.formMethod)&&((Y=M.state)==null?void 0:Y._isRedirect)!==!0;l&&(i=l,l=void 0),C||S===kt.Pop||(S===kt.Push?e.history.push(M,M.state):S===kt.Replace&&e.history.replace(M,M.state)),ue(yt({},F,{actionData:ve,loaderData:xe,historyAction:S,location:M,initialized:!0,navigation:yg,revalidation:"idle",restoreScrollPosition:Io(M,F.matches||x.matches),preventScrollReset:ce,blockers:he})),S=kt.Pop,$=!1,C=!1,T=!1,k=[],I=[]}async function Ie(M,F){if(typeof M=="number"){e.history.go(M);return}let U=Kv(x.location,x.matches,c,u.v7_prependBasename,M,F==null?void 0:F.fromRouteId,F==null?void 0:F.relative),{path:Y,submission:me,error:ve}=C$(u.v7_normalizeFormMethod,!1,U,F),xe=x.location,he=tc(x.location,Y,F&&F.state);he=yt({},he,e.history.encodeLocation(he));let ce=F&&F.replace!=null?F.replace:void 0,Ke=kt.Push;ce===!0?Ke=kt.Replace:ce===!1||me!=null&&bn(me.formMethod)&&me.formAction===x.location.pathname+x.location.search&&(Ke=kt.Replace);let ht=F&&"preventScrollReset"in F?F.preventScrollReset===!0:void 0,ye=pt({currentLocation:xe,nextLocation:he,historyAction:Ke});if(ye){Qe(ye,{state:"blocked",location:he,proceed(){Qe(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:he}),Ie(M,F)},reset(){let Ee=new Map(x.blockers);Ee.set(ye,ns),ue({blockers:Ee})}});return}return await rt(Ke,he,{submission:me,pendingError:ve,preventScrollReset:ht,replace:F&&F.replace})}function ft(){if(qe(),ue({revalidation:"loading"}),x.navigation.state!=="submitting"){if(x.navigation.state==="idle"){rt(x.historyAction,x.location,{startUninterruptedRevalidation:!0});return}rt(S||x.historyAction,x.navigation.location,{overrideNavigation:x.navigation})}}async function rt(M,F,U){O&&O.abort(),O=null,S=M,C=(U&&U.startUninterruptedRevalidation)===!0,Nr(x.location,x.matches),$=(U&&U.preventScrollReset)===!0;let Y=l||i,me=U&&U.overrideNavigation,ve=qi(Y,F,c);if(!ve){let Ee=Jr(404,{pathname:F.pathname}),{matches:gt,route:Qt}=N$(Y);mt(),Me(F,{matches:gt,loaderData:{},errors:{[Qt.id]:Ee}});return}if(x.initialized&&!T&&_de(x.location,F)&&!(U&&U.submission&&bn(U.submission.formMethod))){Me(F,{matches:ve});return}O=new AbortController;let xe=as(e.history,F,O.signal,U&&U.submission),he,ce;if(U&&U.pendingError)ce={[Gi(ve).route.id]:U.pendingError};else if(U&&U.submission&&bn(U.submission.formMethod)){let Ee=await nt(xe,F,U.submission,ve,{replace:U.replace});if(Ee.shortCircuited)return;he=Ee.pendingActionData,ce=Ee.pendingActionError,me=wg(F,U.submission),xe=new Request(xe.url,{signal:xe.signal})}let{shortCircuited:Ke,loaderData:ht,errors:ye}=await Tr(xe,F,ve,me,U&&U.submission,U&&U.fetcherSubmission,U&&U.replace,he,ce);Ke||(O=null,Me(F,yt({matches:ve},he?{actionData:he}:{},{loaderData:ht,errors:ye})))}async function nt(M,F,U,Y,me){me===void 0&&(me={}),qe();let ve=Pde(F,U);ue({navigation:ve});let xe,he=Xv(Y,F);if(!he.route.action&&!he.route.lazy)xe={type:Pt.error,error:Jr(405,{method:M.method,pathname:F.pathname,routeId:he.route.id})};else if(xe=await os("action",M,he,Y,a,o,c),M.signal.aborted)return{shortCircuited:!0};if(ol(xe)){let ce;return me&&me.replace!=null?ce=me.replace:ce=xe.location===x.location.pathname+x.location.search,await Dr(x,xe,{submission:U,replace:ce}),{shortCircuited:!0}}if(ks(xe)){let ce=Gi(Y,he.route.id);return(me&&me.replace)!==!0&&(S=kt.Push),{pendingActionData:{},pendingActionError:{[ce.route.id]:xe.error}}}if(La(xe))throw Jr(400,{type:"defer-action"});return{pendingActionData:{[he.route.id]:xe.data}}}async function Tr(M,F,U,Y,me,ve,xe,he,ce){let Ke=Y||wg(F,me),ht=me||ve||L$(Ke),ye=l||i,[Ee,gt]=k$(e.history,x,U,ht,F,T,k,I,K,W,ye,c,he,ce);if(mt(Le=>!(U&&U.some(ir=>ir.route.id===Le))||Ee&&Ee.some(ir=>ir.route.id===Le)),D=++N,Ee.length===0&>.length===0){let Le=hi();return Me(F,yt({matches:U,loaderData:{},errors:ce||null},he?{actionData:he}:{},Le?{fetchers:new Map(x.fetchers)}:{})),{shortCircuited:!0}}if(!C){gt.forEach(ir=>{let Dn=x.fetchers.get(ir.key),xa=is(void 0,Dn?Dn.data:void 0);x.fetchers.set(ir.key,xa)});let Le=he||x.actionData;ue(yt({navigation:Ke},Le?Object.keys(Le).length===0?{actionData:null}:{actionData:Le}:{},gt.length>0?{fetchers:new Map(x.fetchers)}:{}))}gt.forEach(Le=>{j.has(Le.key)&&St(Le.key),Le.controller&&j.set(Le.key,Le.controller)});let Qt=()=>gt.forEach(Le=>St(Le.key));O&&O.signal.addEventListener("abort",Qt);let{results:In,loaderResults:ba,fetcherResults:hr}=await to(x.matches,U,Ee,gt,M);if(M.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",Qt),gt.forEach(Le=>j.delete(Le.key));let gr=A$(In);if(gr){if(gr.idx>=Ee.length){let Le=gt[gr.idx-Ee.length].key;W.add(Le)}return await Dr(x,gr.result,{replace:xe}),{shortCircuited:!0}}let{loaderData:hn,errors:_a}=I$(x,U,Ee,ba,ce,gt,hr,R);R.forEach((Le,ir)=>{Le.subscribe(Dn=>{(Dn||Le.done)&&R.delete(ir)})});let Do=hi(),vi=gi(D),Nl=Do||vi||gt.length>0;return yt({loaderData:hn,errors:_a},Nl?{fetchers:new Map(x.fetchers)}:{})}function Ir(M){return x.fetchers.get(M)||mde}function ar(M,F,U,Y){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");j.has(M)&&St(M);let me=l||i,ve=Kv(x.location,x.matches,c,u.v7_prependBasename,U,F,Y==null?void 0:Y.relative),xe=qi(me,ve,c);if(!xe){Gr(M,F,Jr(404,{pathname:ve}));return}let{path:he,submission:ce,error:Ke}=C$(u.v7_normalizeFormMethod,!0,ve,Y);if(Ke){Gr(M,F,Ke);return}let ht=Xv(xe,he);if($=(Y&&Y.preventScrollReset)===!0,ce&&bn(ce.formMethod)){pn(M,F,he,ht,xe,ce);return}K.set(M,{routeId:F,path:he}),Tt(M,F,he,ht,xe,ce)}async function pn(M,F,U,Y,me,ve){if(qe(),K.delete(M),!Y.route.action&&!Y.route.lazy){let Pe=Jr(405,{method:ve.formMethod,pathname:U,routeId:F});Gr(M,F,Pe);return}let xe=x.fetchers.get(M),he=$de(ve,xe);x.fetchers.set(M,he),ue({fetchers:new Map(x.fetchers)});let ce=new AbortController,Ke=as(e.history,U,ce.signal,ve);j.set(M,ce);let ht=N,ye=await os("action",Ke,Y,me,a,o,c);if(Ke.signal.aborted){j.get(M)===ce&&j.delete(M);return}if(ol(ye))if(j.delete(M),D>ht){let Pe=Ri(void 0);x.fetchers.set(M,Pe),ue({fetchers:new Map(x.fetchers)});return}else{W.add(M);let Pe=is(ve);return x.fetchers.set(M,Pe),ue({fetchers:new Map(x.fetchers)}),Dr(x,ye,{fetcherSubmission:ve})}if(ks(ye)){Gr(M,F,ye.error);return}if(La(ye))throw Jr(400,{type:"defer-action"});let Ee=x.navigation.location||x.location,gt=as(e.history,Ee,ce.signal),Qt=l||i,In=x.navigation.state!=="idle"?qi(Qt,x.navigation.location,c):x.matches;ke(In,"Didn't find any matches after fetcher action");let ba=++N;z.set(M,ba);let hr=is(ve,ye.data);x.fetchers.set(M,hr);let[gr,hn]=k$(e.history,x,In,ve,Ee,T,k,I,K,W,Qt,c,{[Y.route.id]:ye.data},void 0);hn.filter(Pe=>Pe.key!==M).forEach(Pe=>{let Kr=Pe.key,vr=x.fetchers.get(Kr),Dc=is(void 0,vr?vr.data:void 0);x.fetchers.set(Kr,Dc),j.has(Kr)&&St(Kr),Pe.controller&&j.set(Kr,Pe.controller)}),ue({fetchers:new Map(x.fetchers)});let _a=()=>hn.forEach(Pe=>St(Pe.key));ce.signal.addEventListener("abort",_a);let{results:Do,loaderResults:vi,fetcherResults:Nl}=await to(x.matches,In,gr,hn,gt);if(ce.signal.aborted)return;ce.signal.removeEventListener("abort",_a),z.delete(M),j.delete(M),hn.forEach(Pe=>j.delete(Pe.key));let Le=A$(Do);if(Le){if(Le.idx>=gr.length){let Pe=hn[Le.idx-gr.length].key;W.add(Pe)}return Dr(x,Le.result)}let{loaderData:ir,errors:Dn}=I$(x,x.matches,gr,vi,void 0,hn,Nl,R);if(x.fetchers.has(M)){let Pe=Ri(ye.data);x.fetchers.set(M,Pe)}let xa=gi(ba);x.navigation.state==="loading"&&ba>D?(ke(S,"Expected pending action"),O&&O.abort(),Me(x.navigation.location,{matches:In,loaderData:ir,errors:Dn,fetchers:new Map(x.fetchers)})):(ue(yt({errors:Dn,loaderData:D$(x.loaderData,ir,In,Dn)},xa||hn.length>0?{fetchers:new Map(x.fetchers)}:{})),T=!1)}async function Tt(M,F,U,Y,me,ve){let xe=x.fetchers.get(M),he=is(ve,xe?xe.data:void 0);x.fetchers.set(M,he),ue({fetchers:new Map(x.fetchers)});let ce=new AbortController,Ke=as(e.history,U,ce.signal);j.set(M,ce);let ht=N,ye=await os("loader",Ke,Y,me,a,o,c);if(La(ye)&&(ye=await yN(ye,Ke.signal,!0)||ye),j.get(M)===ce&&j.delete(M),Ke.signal.aborted)return;if(ol(ye))if(D>ht){let gt=Ri(void 0);x.fetchers.set(M,gt),ue({fetchers:new Map(x.fetchers)});return}else{W.add(M),await Dr(x,ye);return}if(ks(ye)){let gt=Gi(x.matches,F);x.fetchers.delete(M),ue({fetchers:new Map(x.fetchers),errors:{[gt.route.id]:ye.error}});return}ke(!La(ye),"Unhandled fetcher deferred data");let Ee=Ri(ye.data);x.fetchers.set(M,Ee),ue({fetchers:new Map(x.fetchers)})}async function Dr(M,F,U){let{submission:Y,fetcherSubmission:me,replace:ve}=U===void 0?{}:U;F.revalidate&&(T=!0);let xe=tc(M.location,F.location,{_isRedirect:!0});if(ke(xe,"Expected a location on the redirect navigation"),r){let Ee=!1;if(F.reloadDocument)Ee=!0;else if(hN.test(F.location)){const gt=e.history.createURL(F.location);Ee=gt.origin!==t.location.origin||jc(gt.pathname,c)==null}if(Ee){ve?t.location.replace(F.location):t.location.assign(F.location);return}}O=null;let he=ve===!0?kt.Replace:kt.Push,{formMethod:ce,formAction:Ke,formEncType:ht}=M.navigation;!Y&&!me&&ce&&Ke&&ht&&(Y=L$(M.navigation));let ye=Y||me;if(pde.has(F.status)&&ye&&bn(ye.formMethod))await rt(he,xe,{submission:yt({},ye,{formAction:F.location}),preventScrollReset:$});else{let Ee=wg(xe,Y);await rt(he,xe,{overrideNavigation:Ee,fetcherSubmission:me,preventScrollReset:$})}}async function to(M,F,U,Y,me){let ve=await Promise.all([...U.map(ce=>os("loader",me,ce,F,a,o,c)),...Y.map(ce=>ce.matches&&ce.match&&ce.controller?os("loader",as(e.history,ce.path,ce.controller.signal),ce.match,ce.matches,a,o,c):{type:Pt.error,error:Jr(404,{pathname:ce.path})})]),xe=ve.slice(0,U.length),he=ve.slice(U.length);return await Promise.all([M$(M,U,xe,xe.map(()=>me.signal),!1,x.loaderData),M$(M,Y.map(ce=>ce.match),he,Y.map(ce=>ce.controller?ce.controller.signal:null),!0)]),{results:ve,loaderResults:xe,fetcherResults:he}}function qe(){T=!0,k.push(...mt()),K.forEach((M,F)=>{j.has(F)&&(I.push(F),St(F))})}function Gr(M,F,U){let Y=Gi(x.matches,F);Qr(M),ue({errors:{[Y.route.id]:U},fetchers:new Map(x.fetchers)})}function Qr(M){let F=x.fetchers.get(M);j.has(M)&&!(F&&F.state==="loading"&&z.has(M))&&St(M),K.delete(M),z.delete(M),W.delete(M),x.fetchers.delete(M)}function St(M){let F=j.get(M);ke(F,"Expected fetch controller: "+M),F.abort(),j.delete(M)}function mi(M){for(let F of M){let U=Ir(F),Y=Ri(U.data);x.fetchers.set(F,Y)}}function hi(){let M=[],F=!1;for(let U of W){let Y=x.fetchers.get(U);ke(Y,"Expected fetcher: "+U),Y.state==="loading"&&(W.delete(U),M.push(U),F=!0)}return mi(M),F}function gi(M){let F=[];for(let[U,Y]of z)if(Y<M){let me=x.fetchers.get(U);ke(me,"Expected fetcher: "+U),me.state==="loading"&&(St(U),z.delete(U),F.push(U))}return mi(F),F.length>0}function Z(M,F){let U=x.blockers.get(M)||ns;return A.get(M)!==F&&A.set(M,F),U}function pe(M){x.blockers.delete(M),A.delete(M)}function Qe(M,F){let U=x.blockers.get(M)||ns;ke(U.state==="unblocked"&&F.state==="blocked"||U.state==="blocked"&&F.state==="blocked"||U.state==="blocked"&&F.state==="proceeding"||U.state==="blocked"&&F.state==="unblocked"||U.state==="proceeding"&&F.state==="unblocked","Invalid blocker state transition: "+U.state+" -> "+F.state);let Y=new Map(x.blockers);Y.set(M,F),ue({blockers:Y})}function pt(M){let{currentLocation:F,nextLocation:U,historyAction:Y}=M;if(A.size===0)return;A.size>1&&wl(!1,"A router only supports one blocker at a time");let me=Array.from(A.entries()),[ve,xe]=me[me.length-1],he=x.blockers.get(ve);if(!(he&&he.state==="proceeding")&&xe({currentLocation:F,nextLocation:U,historyAction:Y}))return ve}function mt(M){let F=[];return R.forEach((U,Y)=>{(!M||M(Y))&&(U.cancel(),F.push(Y),R.delete(Y))}),F}function ro(M,F,U){if(h=M,y=F,g=U||null,!v&&x.navigation===yg){v=!0;let Y=Io(x.location,x.matches);Y!=null&&ue({restoreScrollPosition:Y})}return()=>{h=null,y=null,g=null}}function mn(M,F){return g&&g(M,F.map(Y=>Uue(Y,x.loaderData)))||M.key}function Nr(M,F){if(h&&y){let U=mn(M,F);h[U]=y()}}function Io(M,F){if(h){let U=mn(M,F),Y=h[U];if(typeof Y=="number")return Y}return null}function wa(M){a={},l=Qv(M,o,void 0,a)}return _={get basename(){return c},get state(){return x},get routes(){return i},initialize:Q,subscribe:Ce,enableScrollRestoration:ro,navigate:Ie,fetch:ar,revalidate:ft,createHref:M=>e.history.createHref(M),encodeLocation:M=>e.history.encodeLocation(M),getFetcher:Ir,deleteFetcher:Qr,dispose:ie,getBlocker:Z,deleteBlocker:pe,_internalFetchControllers:j,_internalActiveDeferreds:R,_internalSetRoutes:wa},_}function vde(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Kv(e,t,r,n,o,a,i){let l,c;if(a!=null&&i!=="path"){l=[];for(let d of t)if(l.push(d),d.route.id===a){c=d;break}}else l=t,c=t[t.length-1];let u=fN(o||".",D1(l).map(d=>d.pathnameBase),jc(e.pathname,r)||e.pathname,i==="path");return o==null&&(u.search=e.search,u.hash=e.hash),(o==null||o===""||o===".")&&c&&c.route.index&&!A1(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:aa([r,u.pathname])),kc(u)}function C$(e,t,r,n){if(!n||!vde(n))return{path:r};if(n.formMethod&&!Sde(n.formMethod))return{path:r,error:Jr(405,{method:n.formMethod})};let o=()=>({path:r,error:Jr(400,{type:"invalid-body"})}),a=n.formMethod||"get",i=e?a.toUpperCase():a.toLowerCase(),l=vN(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!bn(i))return o();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((g,y)=>{let[v,E]=y;return""+g+v+"="+E+`
|
|
202
|
+
`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!bn(i))return o();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}ke(typeof FormData=="function","FormData is not available in this environment");let c,u;if(n.formData)c=Yv(n.formData),u=n.formData;else if(n.body instanceof FormData)c=Yv(n.body),u=n.body;else if(n.body instanceof URLSearchParams)c=n.body,u=T$(c);else if(n.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(n.body),u=T$(c)}catch{return o()}let d={formMethod:i,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(bn(d.formMethod))return{path:r,submission:d};let p=To(r);return t&&p.search&&A1(p.search)&&c.append("index",""),p.search="?"+c,{path:kc(p),submission:d}}function yde(e,t){let r=e;if(t){let n=e.findIndex(o=>o.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function k$(e,t,r,n,o,a,i,l,c,u,d,p,h,g){let y=g?Object.values(g)[0]:h?Object.values(h)[0]:void 0,v=e.createURL(t.location),E=e.createURL(o),w=g?Object.keys(g)[0]:void 0,_=yde(r,w).filter((S,$)=>{if(S.route.lazy)return!0;if(S.route.loader==null)return!1;if(wde(t.loaderData,t.matches[$],S)||i.some(T=>T===S.route.id))return!0;let O=t.matches[$],C=S;return j$(S,yt({currentUrl:v,currentParams:O.params,nextUrl:E,nextParams:C.params},n,{actionResult:y,defaultShouldRevalidate:a||v.pathname+v.search===E.pathname+E.search||v.search!==E.search||gN(O,C)}))}),x=[];return c.forEach((S,$)=>{if(!r.some(I=>I.route.id===S.routeId))return;let O=qi(d,S.path,p);if(!O){x.push({key:$,routeId:S.routeId,path:S.path,matches:null,match:null,controller:null});return}let C=t.fetchers.get($),T=Xv(O,S.path),k=!1;u.has($)?k=!1:l.includes($)?k=!0:C&&C.state!=="idle"&&C.data===void 0?k=a:k=j$(T,yt({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:E,nextParams:r[r.length-1].params},n,{actionResult:y,defaultShouldRevalidate:a})),k&&x.push({key:$,routeId:S.routeId,path:S.path,matches:O,match:T,controller:new AbortController})}),[_,x]}function wde(e,t,r){let n=!t||r.route.id!==t.route.id,o=e[r.route.id]===void 0;return n||o}function gN(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function j$(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function R$(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let o=r[e.id];ke(o,"No route found in manifest");let a={};for(let i in n){let c=o[i]!==void 0&&i!=="hasErrorBoundary";wl(!c,'Route "'+o.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!Vue.has(i)&&(a[i]=n[i])}Object.assign(o,a),Object.assign(o,yt({},t(o),{lazy:void 0}))}async function os(e,t,r,n,o,a,i,l){l===void 0&&(l={});let c,u,d,p=y=>{let v,E=new Promise((w,b)=>v=b);return d=()=>v(),t.signal.addEventListener("abort",d),Promise.race([y({request:t,params:r.params,context:l.requestContext}),E])};try{let y=r.route[e];if(r.route.lazy)if(y){let v,E=await Promise.all([p(y).catch(w=>{v=w}),R$(r.route,a,o)]);if(v)throw v;u=E[0]}else if(await R$(r.route,a,o),y=r.route[e],y)u=await p(y);else if(e==="action"){let v=new URL(t.url),E=v.pathname+v.search;throw Jr(405,{method:t.method,pathname:E,routeId:r.route.id})}else return{type:Pt.data,data:void 0};else if(y)u=await p(y);else{let v=new URL(t.url),E=v.pathname+v.search;throw Jr(404,{pathname:E})}ke(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(y){c=Pt.error,u=y}finally{d&&t.signal.removeEventListener("abort",d)}if(Ede(u)){let y=u.status;if(fde.has(y)){let w=u.headers.get("Location");if(ke(w,"Redirects returned/thrown from loaders/actions must have a Location header"),!hN.test(w))w=Kv(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,w);else if(!l.isStaticRequest){let b=new URL(t.url),_=w.startsWith("//")?new URL(b.protocol+w):new URL(w),x=jc(_.pathname,i)!=null;_.origin===b.origin&&x&&(w=_.pathname+_.search+_.hash)}if(l.isStaticRequest)throw u.headers.set("Location",w),u;return{type:Pt.redirect,status:y,location:w,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(l.isRouteRequest)throw{type:c===Pt.error?Pt.error:Pt.data,response:u};let v,E=u.headers.get("Content-Type");return E&&/\bapplication\/json\b/.test(E)?v=await u.json():v=await u.text(),c===Pt.error?{type:c,error:new N1(y,u.statusText,v),headers:u.headers}:{type:Pt.data,data:v,statusCode:u.status,headers:u.headers}}if(c===Pt.error)return{type:c,error:u};if(xde(u)){var h,g;return{type:Pt.deferred,deferredData:u,statusCode:(h=u.init)==null?void 0:h.status,headers:((g=u.init)==null?void 0:g.headers)&&new Headers(u.init.headers)}}return{type:Pt.data,data:u}}function as(e,t,r,n){let o=e.createURL(vN(t)).toString(),a={signal:r};if(n&&bn(n.formMethod)){let{formMethod:i,formEncType:l}=n;a.method=i.toUpperCase(),l==="application/json"?(a.headers=new Headers({"Content-Type":l}),a.body=JSON.stringify(n.json)):l==="text/plain"?a.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?a.body=Yv(n.formData):a.body=n.formData}return new Request(o,a)}function Yv(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function T$(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function bde(e,t,r,n,o){let a={},i=null,l,c=!1,u={};return r.forEach((d,p)=>{let h=t[p].route.id;if(ke(!ol(d),"Cannot handle redirect results in processLoaderData"),ks(d)){let g=Gi(e,h),y=d.error;n&&(y=Object.values(n)[0],n=void 0),i=i||{},i[g.route.id]==null&&(i[g.route.id]=y),a[h]=void 0,c||(c=!0,l=pN(d.error)?d.error.status:500),d.headers&&(u[h]=d.headers)}else La(d)?(o.set(h,d.deferredData),a[h]=d.deferredData.data):a[h]=d.data,d.statusCode!=null&&d.statusCode!==200&&!c&&(l=d.statusCode),d.headers&&(u[h]=d.headers)}),n&&(i=n,a[Object.keys(n)[0]]=void 0),{loaderData:a,errors:i,statusCode:l||200,loaderHeaders:u}}function I$(e,t,r,n,o,a,i,l){let{loaderData:c,errors:u}=bde(t,r,n,o,l);for(let d=0;d<a.length;d++){let{key:p,match:h,controller:g}=a[d];ke(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let y=i[d];if(!(g&&g.signal.aborted))if(ks(y)){let v=Gi(e.matches,h==null?void 0:h.route.id);u&&u[v.route.id]||(u=yt({},u,{[v.route.id]:y.error})),e.fetchers.delete(p)}else if(ol(y))ke(!1,"Unhandled fetcher revalidation redirect");else if(La(y))ke(!1,"Unhandled fetcher deferred data");else{let v=Ri(y.data);e.fetchers.set(p,v)}}return{loaderData:c,errors:u}}function D$(e,t,r,n){let o=yt({},t);for(let a of r){let i=a.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(o[i]=t[i]):e[i]!==void 0&&a.route.loader&&(o[i]=e[i]),n&&n.hasOwnProperty(i))break}return o}function Gi(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function N$(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Jr(e,t){let{pathname:r,routeId:n,method:o,type:a}=t===void 0?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",o&&r&&n?l="You made a "+o+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":a==="defer-action"?l="defer() is not supported in actions":a==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(i="Not Found",l='No route matches URL "'+r+'"'):e===405&&(i="Method Not Allowed",o&&r&&n?l="You made a "+o.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new N1(e||500,i,new Error(l),!0)}function A$(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ol(r))return{result:r,idx:t}}}function vN(e){let t=typeof e=="string"?To(e):e;return kc(yt({},t,{hash:""}))}function _de(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function La(e){return e.type===Pt.deferred}function ks(e){return e.type===Pt.error}function ol(e){return(e&&e.type)===Pt.redirect}function xde(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Ede(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Sde(e){return dde.has(e.toLowerCase())}function bn(e){return cde.has(e.toLowerCase())}async function M$(e,t,r,n,o,a){for(let i=0;i<r.length;i++){let l=r[i],c=t[i];if(!c)continue;let u=e.find(p=>p.route.id===c.route.id),d=u!=null&&!gN(u,c)&&(a&&a[c.route.id])!==void 0;if(La(l)&&(o||d)){let p=n[i];ke(p,"Expected an AbortSignal for revalidating fetcher deferred result"),await yN(l,p,o).then(h=>{h&&(r[i]=h||r[i])})}}}async function yN(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:Pt.data,data:e.deferredData.unwrappedData}}catch(o){return{type:Pt.error,error:o}}return{type:Pt.data,data:e.deferredData.data}}}function A1(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Xv(e,t){let r=typeof t=="string"?To(t).search:t.search;if(e[e.length-1].route.index&&A1(r||""))return e[e.length-1];let n=D1(e);return n[n.length-1]}function L$(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:a,json:i}=e;if(!(!t||!r||!n)){if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:a,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function wg(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Pde(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function is(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function $de(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ri(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}/**
|
|
203
|
+
* React Router v6.16.0
|
|
204
|
+
*
|
|
205
|
+
* Copyright (c) Remix Software Inc.
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the MIT license found in the
|
|
208
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
209
|
+
*
|
|
210
|
+
* @license MIT
|
|
211
|
+
*/function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qp.apply(this,arguments)}const oh=f.createContext(null),wN=f.createContext(null),ah=f.createContext(null),ih=f.createContext(null),ga=f.createContext({outlet:null,matches:[],isDataRoute:!1}),bN=f.createContext(null);function lh(){return f.useContext(ih)!=null}function va(){return lh()||ke(!1),f.useContext(ih).location}function _N(e){f.useContext(ah).static||f.useLayoutEffect(e)}function Et(){let{isDataRoute:e}=f.useContext(ga);return e?Fde():Ode()}function Ode(){lh()||ke(!1);let e=f.useContext(oh),{basename:t,navigator:r}=f.useContext(ah),{matches:n}=f.useContext(ga),{pathname:o}=va(),a=JSON.stringify(D1(n).map(c=>c.pathnameBase)),i=f.useRef(!1);return _N(()=>{i.current=!0}),f.useCallback(function(c,u){if(u===void 0&&(u={}),!i.current)return;if(typeof c=="number"){r.go(c);return}let d=fN(c,JSON.parse(a),o,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:aa([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,a,o,e])}const Cde=f.createContext(null);function kde(e){let t=f.useContext(ga).outlet;return t&&f.createElement(Cde.Provider,{value:e},t)}function Ge(){let{matches:e}=f.useContext(ga),t=e[e.length-1];return t?t.params:{}}function jde(e,t){return xN(e,t)}function xN(e,t,r){lh()||ke(!1);let{navigator:n}=f.useContext(ah),{matches:o}=f.useContext(ga),a=o[o.length-1],i=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=va(),u;if(t){var d;let v=typeof t=="string"?To(t):t;l==="/"||(d=v.pathname)!=null&&d.startsWith(l)||ke(!1),u=v}else u=c;let p=u.pathname||"/",h=l==="/"?p:p.slice(l.length)||"/",g=qi(e,{pathname:h}),y=Nde(g&&g.map(v=>Object.assign({},v,{params:Object.assign({},i,v.params),pathname:aa([l,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:aa([l,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,r);return t&&y?f.createElement(ih.Provider,{value:{location:qp({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:kt.Pop}},y):y}function Rde(){let e=zde(),t=pN(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),r?f.createElement("pre",{style:o},r):null,a)}const Tde=f.createElement(Rde,null);class Ide extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?f.createElement(ga.Provider,{value:this.props.routeContext},f.createElement(bN.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Dde(e){let{routeContext:t,match:r,children:n}=e,o=f.useContext(oh);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),f.createElement(ga.Provider,{value:t},n)}function Nde(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let a=e,i=(n=r)==null?void 0:n.errors;if(i!=null){let l=a.findIndex(c=>c.route.id&&(i==null?void 0:i[c.route.id]));l>=0||ke(!1),a=a.slice(0,Math.min(a.length,l+1))}return a.reduceRight((l,c,u)=>{let d=c.route.id?i==null?void 0:i[c.route.id]:null,p=null;r&&(p=c.route.errorElement||Tde);let h=t.concat(a.slice(0,u+1)),g=()=>{let y;return d?y=p:c.route.Component?y=f.createElement(c.route.Component,null):c.route.element?y=c.route.element:y=l,f.createElement(Dde,{match:c,routeContext:{outlet:l,matches:h,isDataRoute:r!=null},children:y})};return r&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?f.createElement(Ide,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):g()},null)}var EN=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(EN||{}),Gp=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Gp||{});function Ade(e){let t=f.useContext(oh);return t||ke(!1),t}function Mde(e){let t=f.useContext(wN);return t||ke(!1),t}function Lde(e){let t=f.useContext(ga);return t||ke(!1),t}function SN(e){let t=Lde(),r=t.matches[t.matches.length-1];return r.route.id||ke(!1),r.route.id}function zde(){var e;let t=f.useContext(bN),r=Mde(Gp.UseRouteError),n=SN(Gp.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function Fde(){let{router:e}=Ade(EN.UseNavigateStable),t=SN(Gp.UseNavigateStable),r=f.useRef(!1);return _N(()=>{r.current=!0}),f.useCallback(function(o,a){a===void 0&&(a={}),r.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,qp({fromRouteId:t},a)))},[e,t])}const Vde="startTransition",z$=js[Vde];function Bde(e){let{fallbackElement:t,router:r,future:n}=e,[o,a]=f.useState(r.state),{v7_startTransition:i}=n||{},l=f.useCallback(p=>{i&&z$?z$(()=>a(p)):a(p)},[a,i]);f.useLayoutEffect(()=>r.subscribe(l),[r,l]);let c=f.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:p=>r.navigate(p),push:(p,h,g)=>r.navigate(p,{state:h,preventScrollReset:g==null?void 0:g.preventScrollReset}),replace:(p,h,g)=>r.navigate(p,{replace:!0,state:h,preventScrollReset:g==null?void 0:g.preventScrollReset})}),[r]),u=r.basename||"/",d=f.useMemo(()=>({router:r,navigator:c,static:!1,basename:u}),[r,c,u]);return f.createElement(f.Fragment,null,f.createElement(oh.Provider,{value:d},f.createElement(wN.Provider,{value:o},f.createElement(Wde,{basename:u,location:o.location,navigationType:o.historyAction,navigator:c},o.initialized?f.createElement(Ude,{routes:r.routes,state:o}):t))),null)}function Ude(e){let{routes:t,state:r}=e;return xN(t,void 0,r)}function M1(e){return kde(e.context)}function se(e){ke(!1)}function Wde(e){let{basename:t="/",children:r=null,location:n,navigationType:o=kt.Pop,navigator:a,static:i=!1}=e;lh()&&ke(!1);let l=t.replace(/^\/*/,"/"),c=f.useMemo(()=>({basename:l,navigator:a,static:i}),[l,a,i]);typeof n=="string"&&(n=To(n));let{pathname:u="/",search:d="",hash:p="",state:h=null,key:g="default"}=n,y=f.useMemo(()=>{let v=jc(u,l);return v==null?null:{location:{pathname:v,search:d,hash:p,state:h,key:g},navigationType:o}},[l,u,d,p,h,g,o]);return y==null?null:f.createElement(ah.Provider,{value:c},f.createElement(ih.Provider,{children:r,value:y}))}function Hde(e){let{children:t,location:r}=e;return jde(Jv(t),r)}new Promise(()=>{});function Jv(e,t){t===void 0&&(t=[]);let r=[];return f.Children.forEach(e,(n,o)=>{if(!f.isValidElement(n))return;let a=[...t,o];if(n.type===f.Fragment){r.push.apply(r,Jv(n.props.children,a));return}n.type!==se&&ke(!1),!n.props.index||!n.props.children||ke(!1);let i={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=Jv(n.props.children,a)),r.push(i)}),r}function qde(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:f.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:f.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
|
|
212
|
+
* React Router DOM v6.16.0
|
|
213
|
+
*
|
|
214
|
+
* Copyright (c) Remix Software Inc.
|
|
215
|
+
*
|
|
216
|
+
* This source code is licensed under the MIT license found in the
|
|
217
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
218
|
+
*
|
|
219
|
+
* @license MIT
|
|
220
|
+
*/function Qp(){return Qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qp.apply(this,arguments)}function Zv(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(o=>[r,o]):[[r,n]])},[]))}function Gde(e,t){let r=Zv(e);return t&&t.forEach((n,o)=>{r.has(o)||t.getAll(o).forEach(a=>{r.append(o,a)})}),r}function Qde(e,t){return gde({basename:t==null?void 0:t.basename,future:Qp({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:Lue({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Kde(),routes:e,mapRouteProperties:qde}).initialize()}function Kde(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Qp({},t,{errors:Yde(t.errors)})),t}function Yde(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,o]of t)if(o&&o.__type==="RouteErrorResponse")r[n]=new N1(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let a=window[o.__subType];if(typeof a=="function")try{let i=new a(o.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let a=new Error(o.message);a.stack="",r[n]=a}}else r[n]=o;return r}var F$;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(F$||(F$={}));var V$;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(V$||(V$={}));function L1(e){let t=f.useRef(Zv(e)),r=f.useRef(!1),n=va(),o=f.useMemo(()=>Gde(n.search,r.current?null:t.current),[n.search]),a=Et(),i=f.useCallback((l,c)=>{const u=Zv(typeof l=="function"?l(o):l);r.current=!0,a("?"+u,c)},[a,o]);return[o,i]}var Xde={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"},Jde=Object.defineProperty,Zde=Object.defineProperties,efe=Object.getOwnPropertyDescriptors,Kp=Object.getOwnPropertySymbols,PN=Object.prototype.hasOwnProperty,$N=Object.prototype.propertyIsEnumerable,B$=(e,t,r)=>t in e?Jde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,U$=(e,t)=>{for(var r in t||(t={}))PN.call(t,r)&&B$(e,r,t[r]);if(Kp)for(var r of Kp(t))$N.call(t,r)&&B$(e,r,t[r]);return e},tfe=(e,t)=>Zde(e,efe(t)),rfe=(e,t)=>{var r={};for(var n in e)PN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Kp)for(var n of Kp(e))t.indexOf(n)<0&&$N.call(e,n)&&(r[n]=e[n]);return r},At=(e,t,r)=>{const n=f.forwardRef((o,a)=>{var i=o,{color:l="currentColor",size:c=24,stroke:u=2,children:d}=i,p=rfe(i,["color","size","stroke","children"]);return f.createElement("svg",U$(tfe(U$({ref:a},Xde),{width:c,height:c,stroke:l,strokeWidth:u,className:`tabler-icon tabler-icon-${e}`}),p),[...r.map(([h,g])=>f.createElement(h,g)),...d||[]])});return n.propTypes={color:$e.string,size:$e.oneOfType([$e.string,$e.number]),stroke:$e.oneOfType([$e.string,$e.number])},n.displayName=`${t}`,n},nfe=At("alert-circle","IconAlertCircle",[["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"}]]),ofe=At("brand-asana","IconBrandAsana",[["path",{d:"M12 7m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-0"}],["path",{d:"M17 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M7 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-2"}]]),afe=At("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),ON=At("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),ife=At("cloud-upload","IconCloudUpload",[["path",{d:"M7 18a4.6 4.4 0 0 1 0 -9a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-1",key:"svg-0"}],["path",{d:"M9 15l3 -3l3 3",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}]]),lfe=At("device-floppy","IconDeviceFloppy",[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]]),sfe=At("forms","IconForms",[["path",{d:"M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3",key:"svg-0"}],["path",{d:"M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3",key:"svg-1"}],["path",{d:"M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7",key:"svg-2"}],["path",{d:"M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1",key:"svg-3"}],["path",{d:"M17 12h.01",key:"svg-4"}],["path",{d:"M13 12h.01",key:"svg-5"}]]),cfe=At("id","IconId",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M9 10m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M15 8l2 0",key:"svg-2"}],["path",{d:"M15 12l2 0",key:"svg-3"}],["path",{d:"M7 16l10 0",key:"svg-4"}]]),ufe=At("lock-access","IconLockAccess",[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}],["path",{d:"M8 11m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z",key:"svg-4"}],["path",{d:"M10 11v-2a2 2 0 1 1 4 0v2",key:"svg-5"}]]),dfe=At("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),ffe=At("microscope","IconMicroscope",[["path",{d:"M5 21h14",key:"svg-0"}],["path",{d:"M6 18h2",key:"svg-1"}],["path",{d:"M7 18v3",key:"svg-2"}],["path",{d:"M9 11l3 3l6 -6l-3 -3z",key:"svg-3"}],["path",{d:"M10.5 12.5l-1.5 1.5",key:"svg-4"}],["path",{d:"M17 3l3 3",key:"svg-5"}],["path",{d:"M12 21a6 6 0 0 0 3.715 -10.712",key:"svg-6"}]]),pfe=At("packages","IconPackages",[["path",{d:"M7 16.5l-5 -3l5 -3l5 3v5.5l-5 3z",key:"svg-0"}],["path",{d:"M2 13.5v5.5l5 3",key:"svg-1"}],["path",{d:"M7 16.545l5 -3.03",key:"svg-2"}],["path",{d:"M17 16.5l-5 -3l5 -3l5 3v5.5l-5 3z",key:"svg-3"}],["path",{d:"M12 19l5 3",key:"svg-4"}],["path",{d:"M17 16.5l5 -3",key:"svg-5"}],["path",{d:"M12 13.5v-5.5l-5 -3l5 -3l5 3v5.5",key:"svg-6"}],["path",{d:"M7 5.03v5.455",key:"svg-7"}],["path",{d:"M12 8l5 -3",key:"svg-8"}]]),mfe=At("player-play","IconPlayerPlay",[["path",{d:"M7 4v16l13 -8z",key:"svg-0"}]]),hfe=At("receipt","IconReceipt",[["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16l-3 -2l-2 2l-2 -2l-2 2l-2 -2l-3 2m4 -14h6m-6 4h6m-2 4h2",key:"svg-0"}]]),gfe=At("report-medical","IconReportMedical",[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}],["path",{d:"M10 14l4 0",key:"svg-2"}],["path",{d:"M12 12l0 4",key:"svg-3"}]]),vfe=At("star","IconStar",[["path",{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z",key:"svg-0"}]]),W$=At("upload","IconUpload",[["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"}]]),yfe=At("webhook","IconWebhook",[["path",{d:"M4.876 13.61a4 4 0 1 0 6.124 3.39h6",key:"svg-0"}],["path",{d:"M15.066 20.502a4 4 0 1 0 1.934 -7.502c-.706 0 -1.424 .179 -2 .5l-3 -5.5",key:"svg-1"}],["path",{d:"M16 8a4 4 0 1 0 -8 0c0 1.506 .77 2.818 2 3.5l-3 5.5",key:"svg-2"}]]),ey=At("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]),wfe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Rc(e,t){var r=bfe(e);if(typeof r.path!="string"){var n=e.webkitRelativePath;Object.defineProperty(r,"path",{value:typeof t=="string"?t:typeof n=="string"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function bfe(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),o=wfe.get(n);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var _fe=[".DS_Store","Thumbs.db"];function xfe(e){return _l(this,void 0,void 0,function(){return xl(this,function(t){return Yp(e)&&Efe(e.dataTransfer)?[2,Ofe(e.dataTransfer,e.type)]:Sfe(e)?[2,Pfe(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,$fe(e)]:[2,[]]})})}function Efe(e){return Yp(e)}function Sfe(e){return Yp(e)&&Yp(e.target)}function Yp(e){return typeof e=="object"&&e!==null}function Pfe(e){return ty(e.target.files).map(function(t){return Rc(t)})}function $fe(e){return _l(this,void 0,void 0,function(){var t;return xl(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return Rc(n)})]}})})}function Ofe(e,t){return _l(this,void 0,void 0,function(){var r,n;return xl(this,function(o){switch(o.label){case 0:return e.items?(r=ty(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(Cfe))]):[3,2];case 1:return n=o.sent(),[2,H$(CN(n))];case 2:return[2,H$(ty(e.files).map(function(a){return Rc(a)}))]}})})}function H$(e){return e.filter(function(t){return _fe.indexOf(t.name)===-1})}function ty(e){if(e===null)return[];for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(n)}return t}function Cfe(e){if(typeof e.webkitGetAsEntry!="function")return q$(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?kN(t):q$(e)}function CN(e){return e.reduce(function(t,r){return Pg(Pg([],G1(t),!1),G1(Array.isArray(r)?CN(r):[r]),!1)},[])}function q$(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var r=Rc(t);return Promise.resolve(r)}function kfe(e){return _l(this,void 0,void 0,function(){return xl(this,function(t){return[2,e.isDirectory?kN(e):jfe(e)]})})}function kN(e){var t=e.createReader();return new Promise(function(r,n){var o=[];function a(){var i=this;t.readEntries(function(l){return _l(i,void 0,void 0,function(){var c,u,d;return xl(this,function(p){switch(p.label){case 0:if(l.length)return[3,5];p.label=1;case 1:return p.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return c=p.sent(),r(c),[3,4];case 3:return u=p.sent(),n(u),[3,4];case 4:return[3,6];case 5:d=Promise.all(l.map(kfe)),o.push(d),a(),p.label=6;case 6:return[2]}})})},function(l){n(l)})}a()})}function jfe(e){return _l(this,void 0,void 0,function(){return xl(this,function(t){return[2,new Promise(function(r,n){e.file(function(o){var a=Rc(o,e.fullPath);r(a)},function(o){n(o)})})]})})}var Rfe=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),n=e.name||"",o=(e.type||"").toLowerCase(),a=o.replace(/\/.*$/,"");return r.some(function(i){var l=i.trim().toLowerCase();return l.charAt(0)==="."?n.toLowerCase().endsWith(l):l.endsWith("/*")?a===l.replace(/\/.*$/,""):o===l})}return!0};function G$(e){return Dfe(e)||Ife(e)||RN(e)||Tfe()}function Tfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
221
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ife(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dfe(e){if(Array.isArray(e))return ry(e)}function Q$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function K$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Q$(Object(r),!0).forEach(function(n){jN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rc(e,t){return Mfe(e)||Afe(e,t)||RN(e,t)||Nfe()}function Nfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
222
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RN(e,t){if(e){if(typeof e=="string")return ry(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ry(e,t)}}function ry(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Afe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,i,l;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(c){a=!0,l=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw l}}return n}}function Mfe(e){if(Array.isArray(e))return e}var Lfe="file-invalid-type",zfe="file-too-large",Ffe="file-too-small",Vfe="too-many-files",Bfe=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var r=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:Lfe,message:"File type must be ".concat(r)}},Y$=function(t){return{code:zfe,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},X$=function(t){return{code:Ffe,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Ufe={code:Vfe,message:"Too many files"};function TN(e,t){var r=e.type==="application/x-moz-file"||Rfe(e,t);return[r,r?null:Bfe(t)]}function IN(e,t,r){if(Ia(e.size))if(Ia(t)&&Ia(r)){if(e.size>r)return[!1,Y$(r)];if(e.size<t)return[!1,X$(t)]}else{if(Ia(t)&&e.size<t)return[!1,X$(t)];if(Ia(r)&&e.size>r)return[!1,Y$(r)]}return[!0,null]}function Ia(e){return e!=null}function Wfe(e){var t=e.files,r=e.accept,n=e.minSize,o=e.maxSize,a=e.multiple,i=e.maxFiles,l=e.validator;return!a&&t.length>1||a&&i>=1&&t.length>i?!1:t.every(function(c){var u=TN(c,r),d=rc(u,1),p=d[0],h=IN(c,n,o),g=rc(h,1),y=g[0],v=l?l(c):null;return p&&y&&!v})}function Xp(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Tu(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function J$(e){e.preventDefault()}function Hfe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function qfe(e){return e.indexOf("Edge/")!==-1}function Gfe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Hfe(e)||qfe(e)}function Ln(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return t.some(function(l){return!Xp(n)&&l&&l.apply(void 0,[n].concat(a)),Xp(n)})}}function Qfe(){return"showOpenFilePicker"in window}function Kfe(e){if(Ia(e)){var t=Object.entries(e).filter(function(r){var n=rc(r,2),o=n[0],a=n[1],i=!0;return DN(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(a)||!a.every(NN))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(r,n){var o=rc(n,2),a=o[0],i=o[1];return K$(K$({},r),{},jN({},a,i))},{});return[{description:"Files",accept:t}]}return e}function Yfe(e){if(Ia(e))return Object.entries(e).reduce(function(t,r){var n=rc(r,2),o=n[0],a=n[1];return[].concat(G$(t),[o],G$(a))},[]).filter(function(t){return DN(t)||NN(t)}).join(",")}function Xfe(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Jfe(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function DN(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function NN(e){return/^.*\.[\w]+$/.test(e)}var Zfe=["children"],epe=["open"],tpe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],rpe=["refKey","onChange","onClick"];function npe(e){return ipe(e)||ape(e)||AN(e)||ope()}function ope(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
223
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ape(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ipe(e){if(Array.isArray(e))return ny(e)}function bg(e,t){return cpe(e)||spe(e,t)||AN(e,t)||lpe()}function lpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
224
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AN(e,t){if(e){if(typeof e=="string")return ny(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ny(e,t)}}function ny(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function spe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,i,l;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(c){a=!0,l=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw l}}return n}}function cpe(e){if(Array.isArray(e))return e}function Z$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function vt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Z$(Object(r),!0).forEach(function(n){oy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jp(e,t){if(e==null)return{};var r=upe(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function upe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var z1=f.forwardRef(function(e,t){var r=e.children,n=Jp(e,Zfe),o=LN(n),a=o.open,i=Jp(o,epe);return f.useImperativeHandle(t,function(){return{open:a}},[a]),s.createElement(f.Fragment,null,r(vt(vt({},i),{},{open:a})))});z1.displayName="Dropzone";var MN={disabled:!1,getFilesFromEvent:xfe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};z1.defaultProps=MN;z1.propTypes={children:$e.func,accept:$e.objectOf($e.arrayOf($e.string)),multiple:$e.bool,preventDropOnDocument:$e.bool,noClick:$e.bool,noKeyboard:$e.bool,noDrag:$e.bool,noDragEventsBubbling:$e.bool,minSize:$e.number,maxSize:$e.number,maxFiles:$e.number,disabled:$e.bool,getFilesFromEvent:$e.func,onFileDialogCancel:$e.func,onFileDialogOpen:$e.func,useFsAccessApi:$e.bool,autoFocus:$e.bool,onDragEnter:$e.func,onDragLeave:$e.func,onDragOver:$e.func,onDrop:$e.func,onDropAccepted:$e.func,onDropRejected:$e.func,onError:$e.func,validator:$e.func};var ay={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function LN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},MN),e),r=t.accept,n=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,i=t.minSize,l=t.multiple,c=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,p=t.onDragOver,h=t.onDrop,g=t.onDropAccepted,y=t.onDropRejected,v=t.onFileDialogCancel,E=t.onFileDialogOpen,w=t.useFsAccessApi,b=t.autoFocus,_=t.preventDropOnDocument,x=t.noClick,S=t.noKeyboard,$=t.noDrag,O=t.noDragEventsBubbling,C=t.onError,T=t.validator,k=f.useMemo(function(){return Yfe(r)},[r]),I=f.useMemo(function(){return Kfe(r)},[r]),j=f.useMemo(function(){return typeof E=="function"?E:eO},[E]),N=f.useMemo(function(){return typeof v=="function"?v:eO},[v]),D=f.useRef(null),z=f.useRef(null),W=f.useReducer(dpe,ay),K=bg(W,2),R=K[0],A=K[1],V=R.isFocused,Q=R.isFileDialogActive,ie=f.useRef(typeof window<"u"&&window.isSecureContext&&w&&Qfe()),Ce=function(){!ie.current&&Q&&setTimeout(function(){if(z.current){var pe=z.current.files;pe.length||(A({type:"closeDialog"}),N())}},300)};f.useEffect(function(){return window.addEventListener("focus",Ce,!1),function(){window.removeEventListener("focus",Ce,!1)}},[z,Q,N,ie]);var ue=f.useRef([]),Me=function(pe){D.current&&D.current.contains(pe.target)||(pe.preventDefault(),ue.current=[])};f.useEffect(function(){return _&&(document.addEventListener("dragover",J$,!1),document.addEventListener("drop",Me,!1)),function(){_&&(document.removeEventListener("dragover",J$),document.removeEventListener("drop",Me))}},[D,_]),f.useEffect(function(){return!n&&b&&D.current&&D.current.focus(),function(){}},[D,b,n]);var Ie=f.useCallback(function(Z){C?C(Z):console.error(Z)},[C]),ft=f.useCallback(function(Z){Z.preventDefault(),Z.persist(),St(Z),ue.current=[].concat(npe(ue.current),[Z.target]),Tu(Z)&&Promise.resolve(o(Z)).then(function(pe){if(!(Xp(Z)&&!O)){var Qe=pe.length,pt=Qe>0&&Wfe({files:pe,accept:k,minSize:i,maxSize:a,multiple:l,maxFiles:c,validator:T}),mt=Qe>0&&!pt;A({isDragAccept:pt,isDragReject:mt,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Z)}}).catch(function(pe){return Ie(pe)})},[o,u,Ie,O,k,i,a,l,c,T]),rt=f.useCallback(function(Z){Z.preventDefault(),Z.persist(),St(Z);var pe=Tu(Z);if(pe&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return pe&&p&&p(Z),!1},[p,O]),nt=f.useCallback(function(Z){Z.preventDefault(),Z.persist(),St(Z);var pe=ue.current.filter(function(pt){return D.current&&D.current.contains(pt)}),Qe=pe.indexOf(Z.target);Qe!==-1&&pe.splice(Qe,1),ue.current=pe,!(pe.length>0)&&(A({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Tu(Z)&&d&&d(Z))},[D,d,O]),Tr=f.useCallback(function(Z,pe){var Qe=[],pt=[];Z.forEach(function(mt){var ro=TN(mt,k),mn=bg(ro,2),Nr=mn[0],Io=mn[1],wa=IN(mt,i,a),M=bg(wa,2),F=M[0],U=M[1],Y=T?T(mt):null;if(Nr&&F&&!Y)Qe.push(mt);else{var me=[Io,U];Y&&(me=me.concat(Y)),pt.push({file:mt,errors:me.filter(function(ve){return ve})})}}),(!l&&Qe.length>1||l&&c>=1&&Qe.length>c)&&(Qe.forEach(function(mt){pt.push({file:mt,errors:[Ufe]})}),Qe.splice(0)),A({acceptedFiles:Qe,fileRejections:pt,type:"setFiles"}),h&&h(Qe,pt,pe),pt.length>0&&y&&y(pt,pe),Qe.length>0&&g&&g(Qe,pe)},[A,l,k,i,a,c,h,g,y,T]),Ir=f.useCallback(function(Z){Z.preventDefault(),Z.persist(),St(Z),ue.current=[],Tu(Z)&&Promise.resolve(o(Z)).then(function(pe){Xp(Z)&&!O||Tr(pe,Z)}).catch(function(pe){return Ie(pe)}),A({type:"reset"})},[o,Tr,Ie,O]),ar=f.useCallback(function(){if(ie.current){A({type:"openDialog"}),j();var Z={multiple:l,types:I};window.showOpenFilePicker(Z).then(function(pe){return o(pe)}).then(function(pe){Tr(pe,null),A({type:"closeDialog"})}).catch(function(pe){Xfe(pe)?(N(pe),A({type:"closeDialog"})):Jfe(pe)?(ie.current=!1,z.current?(z.current.value=null,z.current.click()):Ie(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Ie(pe)});return}z.current&&(A({type:"openDialog"}),j(),z.current.value=null,z.current.click())},[A,j,N,w,Tr,Ie,I,l]),pn=f.useCallback(function(Z){!D.current||!D.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),ar())},[D,ar]),Tt=f.useCallback(function(){A({type:"focus"})},[]),Dr=f.useCallback(function(){A({type:"blur"})},[]),to=f.useCallback(function(){x||(Gfe()?setTimeout(ar,0):ar())},[x,ar]),qe=function(pe){return n?null:pe},Gr=function(pe){return S?null:qe(pe)},Qr=function(pe){return $?null:qe(pe)},St=function(pe){O&&pe.stopPropagation()},mi=f.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},pe=Z.refKey,Qe=pe===void 0?"ref":pe,pt=Z.role,mt=Z.onKeyDown,ro=Z.onFocus,mn=Z.onBlur,Nr=Z.onClick,Io=Z.onDragEnter,wa=Z.onDragOver,M=Z.onDragLeave,F=Z.onDrop,U=Jp(Z,tpe);return vt(vt(oy({onKeyDown:Gr(Ln(mt,pn)),onFocus:Gr(Ln(ro,Tt)),onBlur:Gr(Ln(mn,Dr)),onClick:qe(Ln(Nr,to)),onDragEnter:Qr(Ln(Io,ft)),onDragOver:Qr(Ln(wa,rt)),onDragLeave:Qr(Ln(M,nt)),onDrop:Qr(Ln(F,Ir)),role:typeof pt=="string"&&pt!==""?pt:"presentation"},Qe,D),!n&&!S?{tabIndex:0}:{}),U)}},[D,pn,Tt,Dr,to,ft,rt,nt,Ir,S,$,n]),hi=f.useCallback(function(Z){Z.stopPropagation()},[]),gi=f.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},pe=Z.refKey,Qe=pe===void 0?"ref":pe,pt=Z.onChange,mt=Z.onClick,ro=Jp(Z,rpe),mn=oy({accept:k,multiple:l,type:"file",style:{display:"none"},onChange:qe(Ln(pt,Ir)),onClick:qe(Ln(mt,hi)),tabIndex:-1},Qe,z);return vt(vt({},mn),ro)}},[z,r,l,Ir,n]);return vt(vt({},R),{},{isFocused:V&&!n,getRootProps:mi,getInputProps:gi,rootRef:D,inputRef:z,open:qe(ar)})}function dpe(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},ay),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return vt({},ay);default:return e}}function eO(){}const[fpe,ppe]=Po("Dropzone component was not found in tree");var tO=Object.getOwnPropertySymbols,mpe=Object.prototype.hasOwnProperty,hpe=Object.prototype.propertyIsEnumerable,gpe=(e,t)=>{var r={};for(var n in e)mpe.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tO)for(var n of tO(e))t.indexOf(n)<0&&hpe.call(e,n)&&(r[n]=e[n]);return r};function F1(e){const t=r=>{const n=G(`Dropzone${$w(e)}`,{},r),{children:o}=n,a=gpe(n,["children"]),i=ppe(),l=El(o)?o:s.createElement("span",null,o);return i[e]?f.cloneElement(l,a):null};return t.displayName=`@mantine/dropzone/${$w(e)}`,t}const vpe=F1("accept"),ype=F1("reject"),wpe=F1("idle");var bpe=Object.defineProperty,_pe=Object.defineProperties,xpe=Object.getOwnPropertyDescriptors,rO=Object.getOwnPropertySymbols,Epe=Object.prototype.hasOwnProperty,Spe=Object.prototype.propertyIsEnumerable,nO=(e,t,r)=>t in e?bpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oO=(e,t)=>{for(var r in t||(t={}))Epe.call(t,r)&&nO(e,r,t[r]);if(rO)for(var r of rO(t))Spe.call(t,r)&&nO(e,r,t[r]);return e},Ppe=(e,t)=>_pe(e,xpe(t)),$pe=H((e,{padding:t,radius:r})=>{const n=e.fn.variant({color:"red",variant:"light"}),o=e.fn.variant({color:e.primaryColor,variant:"light"});return{root:Ppe(oO(oO({},e.fn.fontStyles()),e.fn.focusStyles()),{boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${P(2)} dashed ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,padding:L({size:t,sizes:e.spacing}),borderRadius:e.fn.radius(r),cursor:"pointer",userSelect:"none",transition:"background-color 150ms ease",position:"relative","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&[data-loading]":{cursor:"default","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white}},"&[data-accept]":{backgroundColor:e.colorScheme==="dark"?o.background:e.colors[e.primaryColor][0],borderColor:e.colorScheme==="dark"?o.border:e.colors[e.primaryColor][4],"&:hover":{backgroundColor:e.colorScheme==="dark"?o.background:e.colors[e.primaryColor][0]}},"&[data-reject]":{backgroundColor:e.colorScheme==="dark"?n.background:e.colors.red[0],borderColor:e.colorScheme==="dark"?n.border:e.colors.red[4],"&:hover":{backgroundColor:e.colorScheme==="dark"?n.background:e.colors.red[0]}}}),inner:{pointerEvents:"none",userSelect:"none"}}});const Ope=$pe;var Cpe=Object.defineProperty,kpe=Object.defineProperties,jpe=Object.getOwnPropertyDescriptors,Zp=Object.getOwnPropertySymbols,zN=Object.prototype.hasOwnProperty,FN=Object.prototype.propertyIsEnumerable,aO=(e,t,r)=>t in e?Cpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ls=(e,t)=>{for(var r in t||(t={}))zN.call(t,r)&&aO(e,r,t[r]);if(Zp)for(var r of Zp(t))FN.call(t,r)&&aO(e,r,t[r]);return e},_g=(e,t)=>kpe(e,jpe(t)),Rpe=(e,t)=>{var r={};for(var n in e)zN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Zp)for(var n of Zp(e))t.indexOf(n)<0&&FN.call(e,n)&&(r[n]=e[n]);return r};const Tpe={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!0};function Dl(e){const t=G("Dropzone",Tpe,e),{className:r,padding:n,radius:o,disabled:a,classNames:i,styles:l,loading:c,multiple:u,maxSize:d,accept:p,children:h,onDropAny:g,onDrop:y,onReject:v,openRef:E,name:w,unstyled:b,maxFiles:_,autoFocus:x,activateOnClick:S,activateOnDrag:$,dragEventsBubbling:O,activateOnKeyboard:C,onDragEnter:T,onDragLeave:k,onDragOver:I,onFileDialogCancel:j,onFileDialogOpen:N,preventDropOnDocument:D,useFsAccessApi:z,getFilesFromEvent:W,validator:K,variant:R}=t,A=Rpe(t,["className","padding","radius","disabled","classNames","styles","loading","multiple","maxSize","accept","children","onDropAny","onDrop","onReject","openRef","name","unstyled","maxFiles","autoFocus","activateOnClick","activateOnDrag","dragEventsBubbling","activateOnKeyboard","onDragEnter","onDragLeave","onDragOver","onFileDialogCancel","onFileDialogOpen","preventDropOnDocument","useFsAccessApi","getFilesFromEvent","validator","variant"]),{classes:V,cx:Q}=Ope({radius:o,padding:n},{name:"Dropzone",classNames:i,styles:l,unstyled:b,variant:R}),{getRootProps:ie,getInputProps:Ce,isDragAccept:ue,isDragReject:Me,open:Ie}=LN(ls({onDrop:g,onDropAccepted:y,onDropRejected:v,disabled:a||c,accept:Array.isArray(p)?p.reduce((rt,nt)=>_g(ls({},rt),{[nt]:[]}),{}):p,multiple:u,maxSize:d,maxFiles:_,autoFocus:x,noClick:!S,noDrag:!$,noDragEventsBubbling:!O,noKeyboard:!C,onDragEnter:T,onDragLeave:k,onDragOver:I,onFileDialogCancel:j,onFileDialogOpen:N,preventDropOnDocument:D,useFsAccessApi:z,validator:K},W?{getFilesFromEvent:W}:null));mC(E,Ie);const ft=!ue&&!Me;return s.createElement(fpe,{value:{accept:ue,reject:Me,idle:ft}},s.createElement(le,_g(ls(ls({},A),ie()),{"data-accept":ue||void 0,"data-reject":Me||void 0,"data-idle":ft||void 0,"data-loading":c||void 0,className:Q(V.root,r)}),s.createElement(wI,{visible:c,radius:o,unstyled:b}),s.createElement("input",_g(ls({},Ce()),{name:w})),s.createElement("div",{className:V.inner},h)))}Dl.displayName="@mantine/dropzone/Dropzone";Dl.Accept=vpe;Dl.Reject=ype;Dl.Idle=wpe;const VN=Dl;var Ipe=Object.defineProperty,Dpe=Object.defineProperties,Npe=Object.getOwnPropertyDescriptors,iO=Object.getOwnPropertySymbols,Ape=Object.prototype.hasOwnProperty,Mpe=Object.prototype.propertyIsEnumerable,lO=(e,t,r)=>t in e?Ipe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lpe=(e,t)=>{for(var r in t||(t={}))Ape.call(t,r)&&lO(e,r,t[r]);if(iO)for(var r of iO(t))Mpe.call(t,r)&&lO(e,r,t[r]);return e},zpe=(e,t)=>Dpe(e,Npe(t)),Fpe=H(e=>({wrapper:zpe(Lpe({},e.fn.cover(0)),{position:"fixed",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,display:"flex",padding:e.spacing.xs,transition:"opacity 100ms ease"}),dropzone:{flex:1}}));const Vpe=Fpe;var Bpe=Object.defineProperty,Upe=Object.defineProperties,Wpe=Object.getOwnPropertyDescriptors,em=Object.getOwnPropertySymbols,BN=Object.prototype.hasOwnProperty,UN=Object.prototype.propertyIsEnumerable,sO=(e,t,r)=>t in e?Bpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xg=(e,t)=>{for(var r in t||(t={}))BN.call(t,r)&&sO(e,r,t[r]);if(em)for(var r of em(t))UN.call(t,r)&&sO(e,r,t[r]);return e},Eg=(e,t)=>Upe(e,Wpe(t)),Hpe=(e,t)=>{var r={};for(var n in e)BN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&em)for(var n of em(e))t.indexOf(n)<0&&UN.call(e,n)&&(r[n]=e[n]);return r};const qpe={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:Rn("max"),withinPortal:!0};function WN(e){const t=G("DropzoneFullScreen",qpe,e),{classNames:r,styles:n,sx:o,className:a,style:i,unstyled:l,active:c,onDrop:u,onReject:d,zIndex:p,withinPortal:h,portalProps:g}=t,y=Hpe(t,["classNames","styles","sx","className","style","unstyled","active","onDrop","onReject","zIndex","withinPortal","portalProps"]),[v,E]=s.useState(0),[w,{open:b,close:_}]=a7(!1),{classes:x,cx:S}=Vpe(null,{name:"DropzoneFullScreen",classNames:r,styles:n,unstyled:l}),$=C=>{C.dataTransfer.types.includes("Files")&&(E(T=>T+1),b())},O=()=>{E(C=>C-1)};return f.useEffect(()=>{v===0&&_()},[v]),f.useEffect(()=>{if(c)return document.addEventListener("dragenter",$,!1),document.addEventListener("dragleave",O,!1),()=>{document.removeEventListener("dragenter",$,!1),document.removeEventListener("dragleave",O,!1)}},[c]),s.createElement(Cl,Eg(xg({},g),{withinPortal:h}),s.createElement(le,{className:S(x.wrapper,a),sx:o,style:Eg(xg({},i),{opacity:w?1:0,pointerEvents:w?"all":"none",zIndex:p})},s.createElement(Dl,Eg(xg({},y),{classNames:r,styles:n,unstyled:l,className:x.dropzone,onDrop:C=>{u==null||u(C),_()},onReject:C=>{d==null||d(C),_()}}))))}WN.displayName="@mantine/dropzone/DropzoneFullScreen";VN.FullScreen=WN;const Iu=VN,Gpe='{"resourceType": "Bundle"}';function Sg({id:e,title:t,message:r,color:n,icon:o,withCloseButton:a=!1,method:i="show"}){mo[i]({id:e,loading:!0,title:t,message:r,color:n,icon:o,withCloseButton:a,autoClose:!1})}function Qpe(){const e=or(),t=ne(),[r,n]=f.useState({}),o=f.useCallback(async(l,c)=>{const u="batch-upload";Sg({id:u,title:"Batch Upload in Progress",message:"Your batch data is being uploaded. This may take a moment...",method:"show"});try{n({});let d=JSON.parse(l);d.type!=="batch"&&d.type!=="transaction"&&(d=nD(d));const p=await t.executeBatch(d);n(h=>({...h,[c]:p})),Sg({id:u,title:"Batch Upload Successful",message:"Your batch data was successfully uploaded.",color:"green",method:"update",icon:m.jsx(ON,{size:"1rem"}),withCloseButton:!0})}catch(d){Sg({id:u,title:"Batch Upload Failed",color:"red",message:Oe(d),method:"update",icon:m.jsx(ey,{size:"1rem"}),withCloseButton:!0})}},[t]),a=f.useCallback(async l=>{for(const c of l){const u=new FileReader;u.onload=d=>{var p;return o((p=d.target)==null?void 0:p.result,c.name)},u.readAsText(c)}},[o]),i=f.useCallback(async l=>{await o(l.input,"JSON Data")},[o]);return m.jsxs(be,{children:[m.jsx(fe,{children:"Batch Create"}),m.jsxs("p",{children:["Use this page to create, read, or update multiple resources. For more details, see ",m.jsx("a",{href:"https://www.hl7.org/fhir/http.html#transaction",children:"FHIR Batch and Transaction"}),"."]}),Object.keys(r).length===0&&m.jsxs(m.Fragment,{children:[m.jsx("h3",{children:"Input"}),m.jsxs(Ue,{defaultValue:"upload",children:[m.jsxs(Ue.List,{children:[m.jsx(Ue.Tab,{value:"upload",children:"File Upload"}),m.jsx(Ue.Tab,{value:"json",children:"JSON"})]}),m.jsx(Ue.Panel,{value:"upload",pt:"xs",children:m.jsx(Iu,{onDrop:a,accept:["application/json"],children:m.jsxs(J,{position:"center",spacing:"xl",style:{minHeight:220,pointerEvents:"none"},children:[m.jsx(Iu.Accept,{children:m.jsx(W$,{size:50,stroke:1.5,color:e.colors[e.primaryColor][5]})}),m.jsx(Iu.Reject,{children:m.jsx(ey,{size:50,stroke:1.5,color:e.colors.red[5]})}),m.jsx(Iu.Idle,{children:m.jsx(W$,{size:50,stroke:1.5})}),m.jsxs("div",{children:[m.jsx(oe,{size:"xl",inline:!0,children:"Drag files here or click to select files"}),m.jsx(oe,{size:"sm",color:"dimmed",inline:!0,mt:7,children:"Attach as many files as you like"})]})]})})}),m.jsx(Ue.Panel,{value:"json",pt:"xs",children:m.jsxs(De,{onSubmit:i,children:[m.jsx(Rl,{"data-testid":"batch-input",name:"input",minRows:20,defaultValue:Gpe,deserialize:JSON.parse}),m.jsx(J,{position:"right",mt:"xl",noWrap:!0,children:m.jsx(ee,{type:"submit",children:"Submit"})})]})})]})]}),Object.keys(r).length>0&&m.jsxs(m.Fragment,{children:[m.jsx("h3",{children:"Output"}),m.jsxs(Ue,{defaultValue:Object.keys(r)[0],children:[m.jsx(Ue.List,{children:Object.keys(r).map(l=>m.jsx(Ue.Tab,{value:l,children:l},l))}),Object.keys(r).map(l=>m.jsx(Ue.Panel,{value:l,children:m.jsx("pre",{style:{border:"1px solid #888"},children:JSON.stringify(r[l],void 0,2)})},l))]}),m.jsx(J,{position:"right",mt:"xl",noWrap:!0,children:m.jsx(ee,{onClick:()=>n({}),children:"Start over"})})]})]})}function Kpe(){const{resourceType:e}=Ge(),r=(Object.fromEntries(new URLSearchParams(location.search).entries()).ids||"").split(",").filter(o=>!!o),[n]=vl("Questionnaire",`subject-type=${e}`);return n?n.length===0?m.jsxs(be,{children:[m.jsxs(fe,{children:["No apps for ",e]}),m.jsx(Re,{to:`/${e}`,children:"Return to search page"})]}):m.jsx(be,{children:m.jsx("div",{children:n.map(o=>m.jsxs("div",{children:[m.jsx("h3",{children:m.jsx(Re,{to:`/forms/${o.id}?subject=`+r.map(a=>`${e}/${a}`).join(","),children:o.name})}),m.jsx("p",{children:o.description})]},o.id))})}):m.jsx(jn,{})}function Ype(){const e=ne(),[t,r]=f.useState(),[n,o]=f.useState(!1);return m.jsx(be,{width:450,children:m.jsxs(De,{style:{maxWidth:400},onSubmit:a=>{r(void 0),e.post("auth/changepassword",a).then(()=>o(!0)).catch(i=>r(st(i)))},children:[m.jsxs(tr,{sx:{flexDirection:"column"},children:[m.jsx(Tn,{size:32}),m.jsx(fe,{children:"Change password"})]}),!n&&m.jsxs(je,{spacing:"xl",mt:"xl",children:[m.jsx(po,{name:"oldPassword",label:"Old password",required:!0,autoFocus:!0,error:lt(t,"oldPassword")}),m.jsx(po,{name:"newPassword",label:"New password",required:!0,error:lt(t,"newPassword")}),m.jsx(po,{name:"confirmPassword",label:"Confirm new password",required:!0,error:lt(t,"confirmPassword")}),m.jsx(J,{position:"right",mt:"xl",noWrap:!0,children:m.jsx(ee,{type:"submit",children:"Change password"})})]}),n&&m.jsx("div",{"data-testid":"success",children:"Password changed successfully"})]})})}const HN=["Form","JSON"],Xpe=HN[0].toLowerCase();function Jpe(){const e=Et(),{resourceType:t}=Ge(),r=window.location.pathname.split("/").pop(),[n,o]=f.useState(r??Xpe);function a(i){o(i),e(`/${t}/new/${i}`)}return m.jsxs(m.Fragment,{children:[m.jsxs(Pn,{children:[m.jsxs(oe,{p:"md",weight:500,children:["New ",t]}),m.jsx(ai,{children:m.jsx(Ue,{defaultValue:"form",value:n,onTabChange:a,children:m.jsx(Ue.List,{style:{whiteSpace:"nowrap",flexWrap:"nowrap"},children:HN.map(i=>m.jsx(Ue.Tab,{value:i.toLowerCase(),px:"md",children:i},i))})})})]}),m.jsx(M1,{})]})}function Zpe(){return m.jsx(be,{children:m.jsxs(je,{children:[m.jsx(fe,{order:1,children:"Unexpected Error"}),m.jsx(oe,{children:"We're sorry, something went wrong."}),m.jsxs(oe,{children:["Please contact ",m.jsx(Ae,{href:"mailto:support@medplum.com",children:"support"})," for assistance."]})]})})}const sh=H(e=>({root:{display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 10px"},entry:{display:"inline-block",margin:"5px 20px 5px 5px"},key:{color:e.colors.gray[6],textTransform:"uppercase",fontSize:e.fontSizes.xs,whiteSpace:"nowrap"},value:{fontSize:e.fontSizes.md,fontWeight:600,marginLeft:0,whiteSpace:"nowrap"}}));function Se(e){const{classes:t}=sh();return m.jsx(ai,{children:m.jsx("div",{className:t.root,children:e.children})})}Se.Entry=function(t){const{classes:r}=sh();return m.jsx("div",{className:r.entry,children:t.children})};Se.Key=function(t){const{classes:r}=sh();return m.jsx("div",{className:r.key,children:t.children})};Se.Value=function(t){const{classes:r}=sh();return m.jsx("div",{className:r.value,children:t.children})};function eme(e){if(e.gender==="male")return"blue";if(e.gender==="female")return"pink"}function qN(e){var r,n;const t=tt(e.patient);return t?m.jsxs(Se,{children:[m.jsx(da,{value:t,size:"lg",color:eme(t)}),m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:"Name"}),m.jsx(Se.Value,{children:m.jsx(Re,{to:t,children:t.name?m.jsx(f1,{value:t.name[0],options:{use:!1}}):"[blank]"})})]}),t.birthDate&&m.jsxs(m.Fragment,{children:[m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:"DoB"}),m.jsx(Se.Value,{children:t.birthDate})]}),m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:"Age"}),m.jsx(Se.Value,{children:Pne(t.birthDate)})]})]}),t.gender&&m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:"Gender"}),m.jsx(Se.Value,{children:t.gender})]}),t.address&&m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:"State"}),m.jsx(Se.Value,{children:(r=t.address[0])==null?void 0:r.state})]}),(n=t.identifier)==null?void 0:n.map(o=>m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:o==null?void 0:o.system}),m.jsx(Se.Value,{children:o==null?void 0:o.value})]},`${o==null?void 0:o.system}-${o==null?void 0:o.value}`))]}):null}function GN(e){const t=tt(e.resource);if(!t)return null;const r=[{key:"Type",value:m.jsx(Re,{to:`/${t.resourceType}`,children:t.resourceType})}];function n(l,c){l&&c&&r.push({key:l,value:c})}function o(l){l&&n(l.system,l.value)}function a(l,c){Array.isArray(c)?c.forEach(u=>a(l,u)):typeof c=="string"?n(l,c):c&&(Array.isArray(c.coding)?n(l,c.coding.map(u=>u.display||u.code).join(", ")):n(l,c.text))}const i=xo(t);return i!==Je(t)&&n("Name",i),"category"in t&&a("Category",t.category),t.resourceType!=="Bot"&&"code"in t&&a("Code",t.code),"identifier"in t&&(Array.isArray(t.identifier)?t.identifier.forEach(o):o(t.identifier)),r.length===1&&r.push({key:"ID",value:t.id}),m.jsx(Se,{children:r.map(l=>m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:l.key}),m.jsx(Se.Value,{children:l.value})]},`${l.key}-${l.value}`))})}function V1(e){if(e.resourceType==="Patient")return e;if(e.resourceType==="DiagnosticReport"||e.resourceType==="Encounter"||e.resourceType==="Observation"||e.resourceType==="ServiceRequest")return e.subject}function tme(e){var t;if(e.resourceType==="Specimen")return e;if(e.resourceType==="Observation")return e.specimen;if(e.resourceType==="DiagnosticReport"||e.resourceType==="ServiceRequest")return(t=e.specimen)==null?void 0:t[0]}function nd(e,t){return new Promise((r,n)=>{var a;const o=new MessageChannel;o.port1.onmessage=({data:i})=>{o.port1.close(),i.error?n(i.error):r(i.result)},(a=e.contentWindow)==null||a.postMessage(t,"https://codeeditor.medplum.com",[o.port2])})}function ya(e){var t;return W0((t=e.getActiveLogin())==null?void 0:t.project)}function rme(e,t){const r=new Blob([e],{type:Jt.JSON}),n=URL.createObjectURL(r),o=document.createElement("a");o.href=n;const a=t??new Date().toISOString().replace(/\D/g,"");o.download=`${a}.json`,document.body.appendChild(o),o.click(),URL.revokeObjectURL(n)}function nme(){const{id:e}=Ge(),t=va(),n=Object.fromEntries(new URLSearchParams(t.search).entries()).subject,o=ne(),[a,i]=f.useState(!0),[l,c]=f.useState(),[u,d]=f.useState(),[p,h]=f.useState(),[g,y]=f.useState(),[v,E]=f.useState();if(f.useEffect(()=>{const _={resourceType:"Bundle",type:"batch",entry:[{request:{method:"GET",url:`Questionnaire/${e}`}}]};if(n){const x=n.split(",").filter(S=>!!S);x.length===1&&_.entry.push({request:{method:"GET",url:x[0]}}),d(x)}o.executeBatch(_).then(x=>{var S,$,O,C,T,k,I;((O=($=(S=x.entry)==null?void 0:S[0])==null?void 0:$.response)==null?void 0:O.status)!=="200"?y((T=(C=x.entry)==null?void 0:C[0])==null?void 0:T.response):(c((k=x.entry[0])==null?void 0:k.resource),h((I=x.entry[1])==null?void 0:I.resource)),i(!1)}).catch(x=>{y(x),i(!1)})},[o,e,n]),g)return m.jsx(be,{children:m.jsx("pre",{"data-testid":"error",children:JSON.stringify(g,void 0,2)})});if(v)return m.jsxs(be,{children:[m.jsx(fe,{children:l==null?void 0:l.title}),m.jsx("p",{children:"Your response has been recorded."}),m.jsxs("ul",{children:[v.length===1&&m.jsx("li",{children:m.jsx(Re,{to:v[0],children:"Review your answers"})}),v.length>1&&m.jsxs("li",{children:["Review your answers:",m.jsx("ul",{children:v.map(_=>m.jsx("li",{children:m.jsx(Re,{to:_,children:Je(_)})},_.id))})]}),p&&m.jsx("li",{children:m.jsxs(Re,{to:p,children:["Back to ",xo(p)]})}),m.jsx("li",{children:m.jsx(Re,{to:"/",children:"Go back home"})})]})]});if(a||!l)return m.jsx(jn,{});const w=p&&V1(p);return m.jsxs(m.Fragment,{children:[w&&m.jsx(qN,{patient:w}),p&&p.resourceType!=="Patient"&&m.jsx(GN,{resource:p}),m.jsx(Pn,{p:"xl",shadow:"xs",radius:0,children:m.jsxs(oe,{children:[xo(l),u&&u.length>1&&m.jsxs(m.Fragment,{children:[" (for ",u.length," resources)"]})]})}),m.jsx(be,{children:m.jsx(nN,{questionnaire:l,subject:p&&ut(p),onSubmit:b})})]});async function b(_){const x=[];if(!u||u.length===0)x.push(await o.createResource(_));else for(const S of u)x.push(await o.createResource({..._,subject:{reference:S}}));E(x)}}function QN(e,t){const r=e.resourceType||ome(t),n=e.fields??ame(r),o=e.filters??(e.resourceType?void 0:ime(r)),a=e.sortRules??lme(r),i=e.offset??0,l=e.count??Sc;return{...e,resourceType:r,fields:n,filters:o,sortRules:a,offset:i,count:l}}function ome(e){var t,r;return localStorage.getItem("defaultResourceType")??((r=(t=e==null?void 0:e.option)==null?void 0:t.find(n=>n.id==="defaultResourceType"))==null?void 0:r.valueString)??"Patient"}function ame(e){const t=B1(e);if(t!=null&&t.fields)return t.fields;const r=["id","_lastUpdated"];switch(e){case"Patient":r.push("name","birthDate","gender");break;case"AccessPolicy":case"Bot":case"ClientApplication":case"Practitioner":case"Project":case"Organization":case"Questionnaire":case"UserConfiguration":r.push("name");break;case"CodeSystem":case"ValueSet":r.push("name","title","status");break;case"Condition":r.push("subject","code","clinicalStatus");break;case"Device":r.push("manufacturer","deviceName","patient");break;case"DeviceDefinition":r.push("manufacturer[x]","deviceName");break;case"DeviceRequest":r.push("code[x]","subject");break;case"DiagnosticReport":case"Observation":r.push("subject","code","status");break;case"Encounter":r.push("subject");break;case"ServiceRequest":r.push("subject","code","status","orderDetail");break;case"Subscription":r.push("criteria");break;case"User":r.push("email");break}return r}function ime(e){var t;return(t=B1(e))==null?void 0:t.filters}function lme(e){const t=B1(e);return t!=null&&t.sortRules?t.sortRules:[{code:"_lastUpdated",descending:!0}]}function B1(e){const t=localStorage.getItem(e+"-defaultSearch");return t?JSON.parse(t):void 0}function sme(e){localStorage.setItem("defaultResourceType",e.resourceType),localStorage.setItem(e.resourceType+"-defaultSearch",JSON.stringify(e))}function cme(e){return e!=="Bot"&&e!=="ClientApplication"}async function ume(e,t){const r={resourceType:e.resourceType,count:1e3,offset:0,filters:e.filters},n=QN(r,t.getUserConfiguration()),o=await t.search(n.resourceType,Hi({...n,total:"accurate",fields:void 0}));return nD(o)}const dme=H(e=>({paper:{[`@media (max-width: ${e.breakpoints.sm})`]:{margin:2,padding:4}}}));function cO(){const{classes:e}=dme(),t=ne(),r=Et(),n=va(),[o,a]=f.useState();return f.useEffect(()=>{const i=Joe(n.pathname+n.search),l=QN(i,t.getUserConfiguration());n.pathname===`/${l.resourceType}`&&n.search===Hi(l)?(sme(l),a(l)):r(`/${l.resourceType}${Hi(l)}`)},[t,r,n]),!(o!=null&&o.resourceType)||!o.fields||o.fields.length===0?m.jsx(jn,{}):m.jsx(Pn,{shadow:"xs",m:"md",p:"xs",className:e.paper,children:m.jsx(Cc,{checkboxesEnabled:!0,search:o,userConfig:t.getUserConfiguration(),onClick:i=>r(`/${i.resource.resourceType}/${i.resource.id}`),onAuxClick:i=>window.open(`/${i.resource.resourceType}/${i.resource.id}`,"_blank"),onChange:i=>{r(`/${o.resourceType}${Hi(i.definition)}`)},onNew:cme(o.resourceType)?()=>{r(`/${o.resourceType}/new`)}:void 0,onExportCsv:()=>{const i=t.fhirUrl(o.resourceType,"$csv")+Hi(o);t.download(i).then(l=>{window.open(window.URL.createObjectURL(l),"_blank")}).catch(l=>de({color:"red",message:Oe(l)}))},onExportTransactionBundle:async()=>{ume(o,t).then(i=>rme(JSON.stringify(i,void 0,2))).catch(i=>de({color:"red",message:Oe(i)}))},onDelete:i=>{window.confirm("Are you sure you want to delete these resources?")&&(t.invalidateSearches(o.resourceType),t.executeBatch({resourceType:"Bundle",type:"batch",entry:i.map(l=>({request:{method:"DELETE",url:`${o.resourceType}/${l}`}}))}).then(()=>a({...o})).catch(l=>de({color:"red",message:Oe(l)})))},onBulk:i=>{r(`/bulk/${o.resourceType}?ids=${i.join(",")}`)}})})}function fme(){const e=ne(),[t,r]=f.useState(),[n,o]=f.useState(void 0);f.useEffect(()=>{e.get("auth/mfa/status").then(l=>{const c=new URL("https://chart.googleapis.com/chart");c.searchParams.set("chs","300x300"),c.searchParams.set("cht","qr"),c.searchParams.set("chl",l.enrollUri),c.searchParams.set("choe","UTF-8"),r(c.toString()),o(l.enrolled)}).catch(l=>de({color:"red",message:Oe(l)}))},[e]);const a=f.useCallback(l=>{e.post("auth/mfa/enroll",l).then(()=>{o(!0),de({color:"green",message:"Success"})}).catch(c=>de({color:"red",message:Oe(c)}))},[e]),i=f.useCallback(()=>{e.post("auth/mfa/disable",{}).catch(console.log)},[e]);return n===void 0?null:n?m.jsx(be,{children:m.jsxs(J,{children:[m.jsx(fe,{children:"MFA is enabled"}),m.jsx(ee,{onClick:i,children:"Disable MFA"})]})}):m.jsx(be,{width:400,children:m.jsxs(De,{onSubmit:a,children:[m.jsx(fe,{children:"Multi Factor Auth Setup"}),m.jsx(tr,{children:m.jsx("img",{src:t})}),m.jsx(ae,{name:"token",label:"Code"}),m.jsx(J,{position:"right",mt:"xl",children:m.jsx(ee,{type:"submit",children:"Enroll"})})]})})}const pme={baseUrl:"__MEDPLUM_BASE_URL__",clientId:"__MEDPLUM_CLIENT_ID__",googleClientId:"__GOOGLE_CLIENT_ID__",recaptchaSiteKey:"__RECAPTCHA_SITE_KEY__",registerEnabled:"__MEDPLUM_REGISTER_ENABLED__"};function Tc(){return pme}function mme(){const e=Et(),[t]=L1(),r=t.get("client_id");if(!r)return null;const n=t.get("scope")||"openid";function o(a){const i=new URL(t.get("redirect_uri"));for(const l of["scope","state","nonce"])t.has(l)&&i.searchParams.set(l,t.get(l));i.searchParams.set("code",a),window.location.assign(i.toString())}return m.jsxs(jD,{onCode:o,onForgotPassword:()=>e("/resetpassword"),onRegister:()=>e("/register"),googleClientId:Tc().googleClientId,clientId:r||void 0,scope:n,nonce:t.get("nonce")||void 0,launch:t.get("launch")||void 0,codeChallenge:t.get("code_challenge")||void 0,codeChallengeMethod:t.get("code_challenge_method")||void 0,chooseScopes:n!=="openid",children:[m.jsx(Tn,{size:32}),m.jsx(fe,{children:"Sign in to Medplum"})]})}function hme(){const e=ne(),t=Et(),r=Tc();return f.useEffect(()=>{e.getProfile()&&t("/signin?project=new")},[e,t]),m.jsxs(vle,{type:"project",onSuccess:()=>t("/"),googleClientId:r.googleClientId,recaptchaSiteKey:r.recaptchaSiteKey,children:[m.jsx(Tn,{size:32}),m.jsx(fe,{children:"Create a new account"})]})}function gme(){const e=Et(),t=ne(),[r,n]=f.useState(),[o,a]=f.useState(!1),i=Tc().recaptchaSiteKey;return f.useEffect(()=>{CD(i)},[i]),m.jsx(be,{width:450,children:m.jsxs(De,{style:{maxWidth:400},onSubmit:async l=>{let c="";c=await kD(i),t.post("auth/resetpassword",{...l,recaptchaToken:c}).then(()=>a(!0)).catch(u=>n(st(u)))},children:[m.jsxs(je,{spacing:"lg",mb:"xl",align:"center",children:[m.jsx(Tn,{size:32}),m.jsx(fe,{children:"Medplum Password Reset"})]}),m.jsxs(je,{spacing:"xl",children:[m.jsx(ha,{issues:w1(r,void 0)}),!o&&m.jsxs(m.Fragment,{children:[m.jsx(ae,{name:"email",type:"email",label:"Email",required:!0,autoFocus:!0,error:lt(r,"email")}),m.jsxs(J,{position:"apart",mt:"xl",noWrap:!0,children:[m.jsx(Ae,{component:"button",type:"button",color:"dimmed",onClick:()=>e("/register"),size:"xs",children:"Register"}),m.jsx(ee,{type:"submit",children:"Reset password"})]})]}),o&&m.jsx("div",{children:"If the account exists on our system, a password reset email will be sent."})]})]})})}function vme(){var a;const e=Et(),t=ne(),[r,n]=f.useState();f.useEffect(()=>{t.get("auth/me").then(n).catch(i=>de({color:"red",message:Oe(i)}))},[t]);function o(i){t.post("auth/revoke",{loginId:i}).then(()=>t.get("auth/me",{cache:"no-cache"})).then(n).then(()=>de({color:"green",message:"Login revoked"})).catch(l=>de({color:"red",message:Oe(l)}))}return r?m.jsxs(m.Fragment,{children:[m.jsxs(be,{children:[m.jsx(fe,{children:"Security"}),m.jsxs(b1,{children:[m.jsx(rl,{term:"ID",children:m.jsx(Ae,{href:`/${Je(r.profile)}`,children:r.profile.id})}),m.jsx(rl,{term:"Resource Type",children:r.profile.resourceType}),m.jsx(rl,{term:"Name",children:Ec((a=r.profile.name)==null?void 0:a[0])})]})]}),m.jsxs(be,{children:[m.jsx(fe,{children:"Sessions"}),m.jsxs(ci,{children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"OS"}),m.jsx("th",{children:"Browser"}),m.jsx("th",{children:"IP Address"}),m.jsx("th",{children:"Auth Method"}),m.jsx("th",{children:"Last Updated"}),m.jsx("th",{})]})}),m.jsx("tbody",{children:r.security.sessions.map(i=>m.jsxs("tr",{children:[m.jsx("td",{children:i.os}),m.jsx("td",{children:i.browser}),m.jsx("td",{children:i.remoteAddress}),m.jsx("td",{children:i.authMethod}),m.jsx("td",{children:Cr(i.lastUpdated)}),m.jsx("td",{children:m.jsx(Ae,{href:"#",onClick:()=>o(i.id),children:"Revoke"})})]},i.id))})]})]}),m.jsxs(be,{children:[m.jsx(fe,{children:"Password"}),m.jsx(ee,{onClick:()=>e("/changepassword"),children:"Change password"})]}),m.jsxs(be,{children:[m.jsx(fe,{children:"Multi Factor Auth"}),m.jsxs("p",{children:["Enrolled: ",r.security.mfaEnrolled.toString()]}),!r.security.mfaEnrolled&&m.jsx(ee,{onClick:()=>e("/mfa"),children:"Enroll"})]})]}):null}function yme(){const{id:e,secret:t}=Ge(),r=ne(),[n,o]=f.useState(),[a,i]=f.useState(!1);return m.jsx(be,{width:450,children:m.jsxs(De,{style:{maxWidth:400},onSubmit:l=>{if(l.password!==l.confirmPassword){o(Ba("Passwords do not match","confirmPassword"));return}o(void 0);const c={id:e,secret:t,password:l.password};r.post("auth/setpassword",c).then(()=>i(!0)).catch(u=>o(st(u)))},children:[m.jsxs(tr,{sx:{flexDirection:"column"},children:[m.jsx(Tn,{size:32}),m.jsx(fe,{children:"Set password"})]}),!a&&m.jsxs(je,{children:[m.jsx(po,{name:"password",label:"New password",required:!0,error:lt(n,"password")}),m.jsx(po,{name:"confirmPassword",label:"Confirm new password",required:!0,error:lt(n,"confirmPassword")}),m.jsx(J,{position:"right",mt:"xl",children:m.jsx(ee,{type:"submit",children:"Set password"})})]}),a&&m.jsxs("div",{"data-testid":"success",children:["Password set. You can now ",m.jsx(Re,{to:"/signin",children:"sign in"}),"."]})]})})}function wme(){const e=Et(),[t]=L1(),r=Tc();return m.jsxs(jD,{onSuccess:()=>e(t.get("next")||"/"),onForgotPassword:()=>e("/resetpassword"),onRegister:()=>e("/register"),googleClientId:r.googleClientId,login:t.get("login")||void 0,projectId:t.get("project")||void 0,children:[m.jsx(Tn,{size:32}),m.jsx(fe,{children:"Sign in to Medplum"}),t.get("project")==="new"&&m.jsx("div",{children:"Sign in again to create a new project"})]})}function bme(){const e=Et(),t=va(),[r,n]=f.useState(),[o,a]=f.useState(),[i,l]=f.useState();return f.useEffect(()=>{const c=Object.fromEntries(new URLSearchParams(t.search).entries());n(c.resourceType),a(c.query),l(JSON.parse(c.fields))},[t]),!r||!o||!i?null:m.jsx(wce,{resourceType:r,checkboxesEnabled:!0,query:o,fields:i,onClick:c=>e(`/${r}/${c.resource.id}`),onAuxClick:c=>window.open(`/${r}/${c.resource.id}`,"_blank"),onBulk:c=>{e(`/bulk/${r}?ids=${c.join(",")}`)}})}function ch(e){const t=ne(),r=ya(t),n=Et(),[o,a]=f.useState({resourceType:"ProjectMembership",filters:[{code:"project",operator:te.EQUALS,value:"Project/"+r},{code:"profile-type",operator:te.EQUALS,value:e.resourceType}],fields:e.fields,count:100});return m.jsx(Cc,{search:o,onClick:i=>n(`/admin/members/${i.resource.id}`),onChange:i=>a(i.definition),hideFilters:!0,hideToolbar:!0})}function _me(){return m.jsxs(m.Fragment,{children:[m.jsx(fe,{children:"Bots"}),m.jsx(ch,{resourceType:"Bot",fields:["user","profile","admin","_lastUpdated"]}),m.jsx(J,{position:"right",children:m.jsx(Re,{to:"/admin/bots/new",children:"Create new bot"})})]})}function xme(){return m.jsxs(m.Fragment,{children:[m.jsx(fe,{children:"Clients"}),m.jsx(ch,{resourceType:"ClientApplication",fields:["user","profile","admin","_lastUpdated"]}),m.jsx(J,{position:"right",children:m.jsx(Re,{to:"/admin/clients/new",children:"Create new client"})})]})}function uh(e){return m.jsx(Il,{resourceType:"AccessPolicy",name:"accessPolicy",defaultValue:e.defaultValue,placeholder:"Access Policy",onChange:t=>{Ro(t)?e.onChange(ut(t)):e.onChange(void 0)}})}function Eme(){const e=ne(),t=ya(e),[r,n]=f.useState(""),[o,a]=f.useState(""),[i,l]=f.useState(),[c,u]=f.useState(),[d,p]=f.useState(void 0);return m.jsxs(m.Fragment,{children:[m.jsx(fe,{children:"Create new Bot"}),m.jsxs(De,{onSubmit:()=>{const h={name:r,description:o,accessPolicy:i};e.post("admin/projects/"+t+"/bot",h).then(g=>{e.invalidateSearches("Bot"),e.invalidateSearches("ProjectMembership"),p(g),de({color:"green",message:"Bot created"})}).catch(g=>{de({color:"red",message:Oe(g)}),u(st(g))})},children:[!d&&m.jsxs(je,{children:[m.jsx(Ze,{title:"Name",htmlFor:"name",outcome:c,children:m.jsx(ae,{id:"name",name:"name",required:!0,autoFocus:!0,onChange:h=>n(h.currentTarget.value),error:lt(c,"name")})}),m.jsx(Ze,{title:"Description",htmlFor:"description",outcome:c,children:m.jsx(ae,{id:"description",name:"description",onChange:h=>a(h.currentTarget.value),error:lt(c,"description")})}),m.jsx(Ze,{title:"Access Policy",htmlFor:"accessPolicy",outcome:c,children:m.jsx(uh,{name:"accessPolicy",onChange:l})}),m.jsx(J,{position:"right",children:m.jsx(ee,{type:"submit",children:"Create Bot"})})]}),d&&m.jsxs("div",{"data-testid":"success",children:[m.jsx(oe,{children:"Bot created"}),m.jsxs(xr,{children:[m.jsx(xr.Item,{children:m.jsx(Re,{to:d,children:"Go to new bot"})}),m.jsx(xr.Item,{children:m.jsx(Re,{to:"/admin/bots",children:"Back to bots list"})})]})]})]})]})}function Sme(){const e=ne(),t=ya(e),[r,n]=f.useState(""),[o,a]=f.useState(""),[i,l]=f.useState(""),[c,u]=f.useState(),[d,p]=f.useState(),[h,g]=f.useState(void 0);return m.jsxs(m.Fragment,{children:[m.jsx(fe,{children:"Create new Client"}),m.jsxs(De,{onSubmit:()=>{const y={name:r,description:o,redirectUri:i,accessPolicy:c};e.post("admin/projects/"+t+"/client",y).then(v=>{e.invalidateSearches("ClientApplication"),e.invalidateSearches("ProjectMembership"),g(v),de({color:"green",message:"Client created"})}).catch(v=>{de({color:"red",message:Oe(v)}),p(st(v))})},children:[!h&&m.jsxs(je,{children:[m.jsx(Ze,{title:"Name",htmlFor:"name",outcome:d,children:m.jsx(ae,{id:"name",name:"name",required:!0,autoFocus:!0,onChange:y=>n(y.currentTarget.value),error:lt(d,"name")})}),m.jsx(Ze,{title:"Description",htmlFor:"description",outcome:d,children:m.jsx(ae,{id:"description",name:"description",onChange:y=>a(y.currentTarget.value),error:lt(d,"description")})}),m.jsx(Ze,{title:"Redirect URI",htmlFor:"redirectUri",outcome:d,children:m.jsx(ae,{id:"redirectUri",name:"redirectUri",onChange:y=>l(y.currentTarget.value),error:lt(d,"redirectUri")})}),m.jsx(Ze,{title:"Access Policy",htmlFor:"accessPolicy",outcome:d,children:m.jsx(uh,{name:"accessPolicy",onChange:u})}),m.jsx(J,{position:"right",children:m.jsx(ee,{type:"submit",children:"Create Client"})})]}),h&&m.jsxs("div",{"data-testid":"success",children:[m.jsx(oe,{children:"Client created"}),m.jsxs(xr,{children:[m.jsx(xr.Item,{children:m.jsx(Re,{to:h,children:"Go to new client"})}),m.jsx(xr.Item,{children:m.jsx(Re,{to:"/admin/clients",children:"Back to clients list"})})]})]})]})]})}function Pme(e){return m.jsx(Il,{resourceType:"UserConfiguration",name:"userConfiguration",defaultValue:e.defaultValue,placeholder:"User Configuration",onChange:t=>{Ro(t)?e.onChange(ut(t)):e.onChange(void 0)}})}function $me(){const{membershipId:e}=Ge(),t=ne(),r=ya(t),n=Et(),o=t.get(`admin/projects/${r}/members/${e}`).read(),[a,i]=f.useState(o.accessPolicy),[l,c]=f.useState(o.userConfiguration),[u,d]=f.useState(o.admin),[p,h]=f.useState(),[g,y]=f.useState(!1);function v(){window.confirm("Are you sure?")&&t.delete(`admin/projects/${r}/members/${e}`).then(()=>t.get(`admin/projects/${r}`,{cache:"no-cache"})).then(()=>n("/admin/project")).catch(E=>h(st(E)))}return m.jsxs(m.Fragment,{children:[m.jsx(fe,{children:"Edit membership"}),m.jsx("h3",{children:m.jsx(nl,{value:o.profile,link:!0})}),m.jsxs(De,{onSubmit:()=>{const E={...o,accessPolicy:a,userConfiguration:l,admin:u};t.post(`admin/projects/${r}/members/${e}`,E).then(()=>y(!0)).catch(w=>h(st(w)))},children:[!g&&m.jsxs(je,{children:[m.jsx(Ze,{title:"Access Policy",htmlFor:"accessPolicy",outcome:p,children:m.jsx(uh,{name:"accessPolicy",defaultValue:a,onChange:i})}),m.jsx(Ze,{title:"User Configuration",htmlFor:"userConfiguration",outcome:p,children:m.jsx(Pme,{name:"userConfiguration",defaultValue:l,onChange:c})}),m.jsx(Ze,{title:"Admin",htmlFor:"admin",outcome:p,children:m.jsx(kn,{id:"admin",name:"admin",defaultChecked:u,onChange:E=>d(E.currentTarget.checked)})}),m.jsxs(J,{position:"right",mt:"xl",children:[m.jsx(ee,{type:"submit",children:"Save"}),m.jsx(ee,{type:"button",color:"red",variant:"outline",onClick:v,children:"Remove user"})]})]}),g&&m.jsxs("div",{"data-testid":"success",children:[m.jsx("p",{children:"User updated"}),m.jsx("pre",{children:JSON.stringify(p,void 0,2)}),m.jsxs("p",{children:["Click ",m.jsx(Re,{to:"/admin/project",children:"here"})," to return to the project admin page."]})]})]})]})}function Ome(){const e=ne(),[t,r]=f.useState(e.getProject()),[n,o]=f.useState(),[a,i]=f.useState(),[l,c]=f.useState(!1),[u,d]=f.useState(void 0),p=f.useCallback(h=>{const g={resourceType:h.resourceType,firstName:h.firstName,lastName:h.lastName,email:h.email,sendEmail:h.sendEmail==="on",accessPolicy:n,admin:h.isAdmin==="on"};e.invite(t==null?void 0:t.id,g).then(y=>{e.invalidateSearches("Patient"),e.invalidateSearches("Practitioner"),e.invalidateSearches("ProjectMembership"),Qm(y)?i(y):d(y),c(g.sendEmail??!1),de({color:"green",message:"Invite success"})}).catch(y=>{de({color:"red",message:Oe(y)}),i(st(y))})},[e,t,n]);return m.jsxs(De,{onSubmit:p,children:[!u&&!a&&m.jsxs(je,{children:[m.jsx(fe,{children:"Invite new member"}),e.isSuperAdmin()&&m.jsx(Ze,{title:"Project",htmlFor:"project",outcome:a,children:m.jsx(Il,{resourceType:"Project",name:"project",defaultValue:t,onChange:r})}),m.jsx(dt,{name:"resourceType",label:"Role",defaultValue:"Practitioner",data:["Practitioner","Patient","RelatedPerson"],error:lt(a,"resourceType")}),m.jsx(ae,{name:"firstName",label:"First Name",required:!0,autoFocus:!0,error:lt(a,"firstName")}),m.jsx(ae,{name:"lastName",label:"Last Name",required:!0,error:lt(a,"lastName")}),m.jsx(ae,{name:"email",type:"email",label:"Email",required:!0,error:lt(a,"email")}),m.jsx(Ze,{title:"Access Policy",htmlFor:"accessPolicy",outcome:a,children:m.jsx(uh,{name:"accessPolicy",onChange:o})}),m.jsx(kn,{name:"sendEmail",label:"Send email",defaultChecked:!0}),m.jsx(kn,{name:"isAdmin",label:"Admin"}),m.jsx(J,{position:"right",children:m.jsx(ee,{type:"submit",children:"Invite"})})]}),a&&m.jsxs("div",{"data-testid":"success",children:[m.jsx("p",{children:"User created, email couldn't be sent"}),m.jsx("p",{children:"Could not send email. Make sure you have AWS SES set up."}),m.jsxs("p",{children:["Click ",m.jsx(Re,{to:"/admin/project",children:"here"})," to return to the project admin page."]})]}),u&&m.jsxs("div",{"data-testid":"success",children:[m.jsx(oe,{children:"User created"}),l&&m.jsx(oe,{children:"Email sent"}),m.jsxs(xr,{children:[m.jsx(xr.Item,{children:m.jsx(Re,{to:u,children:"Go to new membership"})}),m.jsx(xr.Item,{children:m.jsx(Re,{to:u.profile,children:"Go to new profile"})}),m.jsx(xr.Item,{children:m.jsx(Re,{to:"/admin/users",children:"Back to users list"})})]})]})]})}function Cme(){return m.jsxs(m.Fragment,{children:[m.jsx(fe,{children:"Patients"}),m.jsx(ch,{resourceType:"Patient",fields:["user","profile","_lastUpdated"]}),m.jsx(J,{position:"right",children:m.jsx(Re,{to:"/admin/invite",children:"Invite new patient"})})]})}function uO(){const e=ne(),t=ya(e),r=e.get(`admin/projects/${t}`).read();return m.jsxs(m.Fragment,{children:[m.jsx(fe,{children:"Details"}),m.jsxs(b1,{children:[m.jsx(rl,{term:"ID",children:r.project.id}),m.jsx(rl,{term:"Name",children:r.project.name})]})]})}const dO=["Details","Users","Patients","Clients","Bots","Secrets","Sites"];function kme(){const e=Et(),r=va().pathname.replace("/admin/","")||dO[0],n=ne(),o=ya(n),a=f.useMemo(()=>n.get("admin/projects/"+o).read(),[n,o]);function i(l){e(`/admin/${l}`)}return m.jsxs(m.Fragment,{children:[m.jsxs(Pn,{children:[m.jsx(Se,{children:m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:"Project"}),m.jsx(Se.Value,{children:a.project.name})]})}),m.jsx(ai,{children:m.jsx(Ue,{value:r.toLowerCase(),onTabChange:i,children:m.jsx(Ue.List,{style:{whiteSpace:"nowrap",flexWrap:"nowrap"},children:dO.map(l=>m.jsx(Ue.Tab,{value:l.toLowerCase(),children:l},l))})})})]}),m.jsx(be,{children:m.jsx(M1,{})})]})}function jme(){const e=ne(),t=ya(e),r=e.get(`admin/projects/${t}`).read(),[n,o]=f.useState(!1),[a,i]=f.useState();return f.useEffect(()=>{e.requestSchema("Project").then(()=>o(!0)).catch(console.log)},[e]),f.useEffect(()=>{r&&i(di(r.project.secret||[]))},[e,r]),!n||!a?m.jsx("div",{children:"Loading..."}):m.jsxs("form",{noValidate:!0,autoComplete:"off",onSubmit:l=>{l.preventDefault(),e.post(`admin/projects/${t}/secrets`,a).then(()=>e.get(`admin/projects/${t}`,{cache:"reload"})).then(()=>de({color:"green",message:"Saved"})).catch(console.log)},children:[m.jsx(fe,{children:"Project Secrets"}),m.jsx("p",{children:"Use project secrets to store sensitive information such as API keys or other access credentials."}),m.jsx(Za,{property:fi("Project","secret"),name:"secret",defaultValue:a,onChange:i}),m.jsx(ee,{type:"submit",children:"Save"})]})}function Rme(){const e=ne(),t=ya(e),r=e.get(`admin/projects/${t}`).read(),[n,o]=f.useState(!1),[a,i]=f.useState();return f.useEffect(()=>{e.requestSchema("Project").then(()=>o(!0)).catch(console.log)},[e]),f.useEffect(()=>{r&&i(di(r.project.site||[]))},[e,r]),!n||!a?m.jsx("div",{children:"Loading..."}):m.jsxs("form",{noValidate:!0,autoComplete:"off",onSubmit:l=>{l.preventDefault(),e.post(`admin/projects/${t}/sites`,a).then(()=>e.get(`admin/projects/${t}`,{cache:"reload"})).then(()=>de({color:"green",message:"Saved"})).catch(c=>{var d,p,h,g;const u=st(c);de({color:"red",message:`Error ${(p=(d=u.issue)==null?void 0:d[0].details)==null?void 0:p.text} ${(g=(h=u.issue)==null?void 0:h[0].expression)==null?void 0:g[0]}`})})},children:[m.jsx(fe,{children:"Project Sites"}),m.jsx("p",{children:"Use project sites configure your project on a separate domain."}),m.jsx(Za,{property:fi("Project","site"),name:"site",defaultValue:a,onChange:i}),m.jsx(ee,{type:"submit",children:"Save"})]})}function Tme(){const e=ne();if(!e.isLoading()&&!e.isSuperAdmin())return m.jsx(ha,{outcome:ooe});function t(){ss(e,"Rebuilding Structure Definitions","admin/super/structuredefinitions")}function r(){ss(e,"Rebuilding Search Parameters","admin/super/searchparameters")}function n(){ss(e,"Rebuilding Value Sets","admin/super/valuesets")}function o(u){ss(e,"Reindexing Resources","admin/super/reindex",u)}function a(u){ss(e,"Rebuilding Compartments","admin/super/compartments",u)}function i(u){e.post("admin/super/removebotidjobsfromqueue",u).then(()=>de({color:"green",message:"Done"})).catch(d=>de({color:"red",message:Oe(d)}))}function l(u){e.post("admin/super/purge",{...u,before:AD(u.before)}).then(()=>de({color:"green",message:"Done"})).catch(d=>de({color:"red",message:Oe(d)}))}function c(u){e.post("admin/super/setpassword",u).then(()=>de({color:"green",message:"Done"})).catch(d=>de({color:"red",message:Oe(d)}))}return m.jsxs(be,{width:600,children:[m.jsx(fe,{order:1,children:"Super Admin"}),m.jsx(wr,{my:"lg"}),m.jsx(fe,{order:2,children:"Structure Definitions"}),m.jsx("p",{children:"StructureDefinition resources contain the metadata about resource types. They are provided with the FHIR specification. Medplum also includes some custom StructureDefinition resources for internal data types. Press this button to update the database StructureDefinitions from the FHIR specification."}),m.jsx(De,{children:m.jsx(ee,{onClick:t,children:"Rebuild StructureDefinitions"})}),m.jsx(wr,{my:"lg"}),m.jsx(fe,{order:2,children:"Search Parameters"}),m.jsx("p",{children:"SearchParameter resources contain the metadata about filters and sorting. They are provided with the FHIR specification. Medplum also includes some custom SearchParameter resources for internal data types. Press this button to update the database SearchParameters from the FHIR specification."}),m.jsx(De,{children:m.jsx(ee,{onClick:r,children:"Rebuild SearchParameters"})}),m.jsx(wr,{my:"lg"}),m.jsx(fe,{order:2,children:"Value Sets"}),m.jsx("p",{children:"ValueSet resources enum values for a wide variety of use cases. Press this button to update the database ValueSets from the FHIR specification."}),m.jsx(De,{children:m.jsx(ee,{onClick:n,children:"Rebuild ValueSets"})}),m.jsx(wr,{my:"lg"}),m.jsx(fe,{order:2,children:"Reindex Resources"}),m.jsx("p",{children:"When Medplum changes how resources are indexed, the system may require a reindex for old resources to be indexed properly."}),m.jsx(De,{onSubmit:o,children:m.jsxs(je,{children:[m.jsx(Ze,{title:"Resource Type",children:m.jsx(ae,{name:"resourceType",placeholder:"Reindex Resource Type"})}),m.jsx(ee,{type:"submit",children:"Reindex"})]})}),m.jsx(wr,{my:"lg"}),m.jsx(fe,{order:2,children:"Rebuild Compartments"}),m.jsx("p",{children:"When Medplum changes how resource compartments are derived, the system may require a rebuild for old resources to take effect."}),m.jsx(De,{onSubmit:a,children:m.jsxs(je,{children:[m.jsx(Ze,{title:"Resource Type",children:m.jsx(ae,{name:"resourceType",placeholder:"Compartments Resource Type"})}),m.jsx(ee,{type:"submit",children:"Rebuild Compartments"})]})}),m.jsx(wr,{my:"lg"}),m.jsx(fe,{order:2,children:"Purge Resources"}),m.jsx("p",{children:"As system generated resources accumulate, the system may require a purge to remove old resources."}),m.jsx(De,{onSubmit:l,children:m.jsxs(je,{children:[m.jsx(Ze,{title:"Purge Resource Type",htmlFor:"purgeResourceType",children:m.jsx(dt,{id:"purgeResourceType",name:"resourceType",data:["","AuditEvent","Login"]})}),m.jsx(Ze,{title:"Purge Before",htmlFor:"before",children:m.jsx(Xa,{name:"before",placeholder:"Before Date"})}),m.jsx(ee,{type:"submit",children:"Purge"})]})}),m.jsx(wr,{my:"lg"}),m.jsx(fe,{order:2,children:"Remove Bot ID Jobs from Queue"}),m.jsx("p",{children:"Remove all queued jobs for a Bot ID"}),m.jsx(De,{onSubmit:i,children:m.jsxs(je,{children:[m.jsx(Ze,{title:"Bot ID",children:m.jsx(ae,{name:"botId",placeholder:"Bot Id"})}),m.jsx(ee,{type:"submit",children:"Remove Jobs by Bot ID"})]})}),m.jsx(wr,{my:"lg"}),m.jsx(fe,{order:2,children:"Force Set Password"}),m.jsx("p",{children:'Note that this applies to all projects for the user. Therefore, this should only be used in extreme circumstances. Always prefer to use the "Forgot Password" flow first.'}),m.jsx(De,{onSubmit:c,children:m.jsxs(je,{children:[m.jsx(ae,{name:"email",label:"Email",required:!0}),m.jsx(po,{name:"password",label:"Password",required:!0}),m.jsx(ae,{name:"projectId",label:"Project ID"}),m.jsx(ee,{type:"submit",children:"Force Set Password"})]})})]})}function ss(e,t,r,n){mo.show({id:r,loading:!0,title:t,message:"Running...",autoClose:!1,withCloseButton:!1});const o={method:"POST"};n&&(o.body=JSON.stringify(n)),e.startAsyncRequest(r,o).then(()=>{mo.update({id:r,color:"green",title:t,message:"Done",icon:m.jsx(ON,{size:"1rem"}),autoClose:!1,withCloseButton:!0})}).catch(a=>{mo.update({id:r,color:"red",title:t,message:Oe(a),icon:m.jsx(ey,{size:"1rem"}),autoClose:!1,withCloseButton:!0})})}function Ime(){return m.jsxs(m.Fragment,{children:[m.jsx(fe,{children:"Users"}),m.jsx(ch,{resourceType:"Practitioner",fields:["user","profile","admin","_lastUpdated"]}),m.jsx(J,{position:"right",children:m.jsx(Re,{to:"/admin/invite",children:"Invite new user"})})]})}function Dme(){const[e]=vl("ObservationDefinition","_count=100");return e?m.jsxs(ci,{withBorder:!0,withColumnBorders:!0,children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"Category"}),m.jsx("th",{children:"Code"}),m.jsx("th",{children:"Method"}),m.jsx("th",{children:"Unit"}),m.jsx("th",{children:"Precision"}),m.jsx("th",{children:"Ranges"})]})}),m.jsx("tbody",{children:e.map(t=>{var r,n,o,a;return m.jsxs("tr",{children:[m.jsx("td",{children:m.jsx(Kn,{value:(r=t.category)==null?void 0:r[0]})}),m.jsx("td",{children:m.jsx(Kn,{value:t.code})}),m.jsx("td",{children:m.jsx(Kn,{value:t.method})}),m.jsx("td",{children:(o=(n=t.quantitativeDetails)==null?void 0:n.unit)==null?void 0:o.text}),m.jsx("td",{children:(a=t.quantitativeDetails)==null?void 0:a.decimalPrecision}),m.jsx("td",{children:m.jsx(iy,{ranges:t.qualifiedInterval})})]},t.id)})})]}):m.jsx(jn,{})}function iy(e){const{ranges:t}=e;if(!t)return null;const r=fO(t.map(o=>o.gender));if(r.length>1)return r.sort((o,a)=>o.localeCompare(a)),m.jsx(m.Fragment,{children:r.map(o=>{var a;return m.jsxs(f.Fragment,{children:[m.jsx("div",{children:m.jsx("strong",{children:fr(o)})}),m.jsx(iy,{ranges:(a=e.ranges)==null?void 0:a.filter(i=>i.gender===o)})]},o)})});const n=fO(t.map(o=>o.age&&Zs(o.age)));return n.length>1?(n.sort((o,a)=>o.localeCompare(a)),m.jsx(m.Fragment,{children:n.map(o=>{var a;return m.jsxs(f.Fragment,{children:[m.jsx("div",{children:m.jsx("strong",{children:fr(o)})}),m.jsx(iy,{ranges:(a=e.ranges)==null?void 0:a.filter(i=>Zs(i.age)===o)})]},o)})})):m.jsx(m.Fragment,{children:t.map(o=>m.jsx("table",{children:m.jsx("tbody",{children:m.jsxs("tr",{children:[m.jsx("td",{children:o.condition}),m.jsx("td",{children:m.jsx(_1,{value:o.range})})]})})},`range-${o.condition}`))})}function fO(e){return[...new Set(e.filter(t=>!!t))]}function Nme(){const[e]=vl("ActivityDefinition","_count=100"),[t]=vl("ObservationDefinition","_count=100");return!e||!t?m.jsx(jn,{}):m.jsxs(ci,{withBorder:!0,withColumnBorders:!0,children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"Category"}),m.jsx("th",{children:"Assay"}),e.map(r=>m.jsx("th",{children:r.name},r.id))]})}),m.jsx("tbody",{children:t.map(r=>{var n;return m.jsxs("tr",{children:[m.jsx("td",{children:m.jsx(Kn,{value:(n=r.category)==null?void 0:n[0]})}),m.jsx("td",{children:m.jsx(Kn,{value:r.code})}),e.map(o=>{var a;return m.jsx("td",{children:(a=o.observationResultRequirement)!=null&&a.find(i=>{var l;return(l=i.reference)==null?void 0:l.includes(r.id)})?"✅":""},o.id)})]},r.id)})})]})}function Ame(e){var i;const t=ne(),[r,n]=f.useState(),[o,a]=f.useState();return o?m.jsxs(m.Fragment,{children:[m.jsx("p",{children:"Request group created successfully."}),m.jsxs("ul",{children:[m.jsxs("li",{children:["Go to the"," ",m.jsx(Re,{to:o,suffix:"checklist",children:"Request Group"})]}),m.jsxs("li",{children:["Back to the ",m.jsx(Re,{to:e.planDefinition,children:"Plan Definition"})]})]})]}):m.jsx(De,{onSubmit:()=>{t.post(t.fhirUrl("PlanDefinition",e.planDefinition.id,"$apply"),{resourceType:"Parameters",parameter:[{name:"subject",valueReference:r}]}).then(a).catch(console.log)},children:m.jsxs(je,{children:[m.jsxs(fe,{children:['Start "',e.planDefinition.title,'"']}),m.jsxs(oe,{children:["Use the ",m.jsx("strong",{children:"Apply"})," operation to create a group of tasks for a workflow."]}),m.jsx(oe,{children:"The following tasks will be created:"}),m.jsx("ul",{children:(i=e.planDefinition.action)==null?void 0:i.map((l,c)=>{var u;return m.jsxs("li",{children:[((u=l.definitionCanonical)==null?void 0:u.startsWith("Questionnaire/"))&&"Questionnaire request: ",l.title&&m.jsx(m.Fragment,{children:l.title}),l.code&&m.jsx(Kn,{value:l.code[0]})]},`action-${c}`)})}),m.jsx(Ze,{title:"Subject",children:m.jsx(eh,{name:"subject",targetTypes:["Patient","Practitioner"],defaultValue:r,onChange:n})}),m.jsx(J,{position:"right",mt:"xl",children:m.jsx(ee,{type:"submit",children:"Go"})})]})})}function Mme(){const{resourceType:e,id:t}=Ge(),r=tt({reference:e+"/"+t});return r?m.jsx(be,{children:m.jsx(Ame,{planDefinition:r})}):null}function Lme(){const e=ne(),{resourceType:t,id:r}=Ge(),n=tt({reference:t+"/"+r}),[o,a]=vl("Questionnaire","subject-type="+t),[i,l]=vl("ClientApplication",{_count:1e3});if(!n||a||l)return m.jsx(jn,{});const c=i==null?void 0:i.filter(d=>zme(t)&&!!d.launchUri);if((!o||o.length===0)&&(!c||c.length===0))return m.jsxs(be,{children:[m.jsx(fe,{children:"Apps"}),m.jsxs("p",{children:["No apps found. Contact your administrator or ",m.jsx("a",{href:"mailto:support@medplum.com",children:"Medplum Support"})," to add automation here."]})]});function u(d){if(!n)return;const p={resourceType:"SmartAppLaunch"};switch(n.resourceType){case"Patient":p.patient=ut(n);break;case"Encounter":p.patient=n.subject,p.encounter=ut(n);break}e.createResource(p).then(h=>{const g=new URL(d.launchUri);g.searchParams.set("iss",e.getBaseUrl()+"fhir/R4"),g.searchParams.set("launch",h.id),window.location.assign(g.toString())}).catch(h=>de({color:"red",message:Oe(h)}))}return m.jsxs(be,{children:[o==null?void 0:o.map(d=>m.jsxs("div",{children:[m.jsx(fe,{order:3,children:m.jsx(Re,{to:`/forms/${d.id}?subject=${Je(n)}`,children:d.title||d.name})}),m.jsx(oe,{children:d.description})]},d.id)),c==null?void 0:c.map(d=>m.jsxs("div",{children:[m.jsx(fe,{order:3,children:m.jsx(Ae,{onClick:()=>u(d),children:d.name})}),m.jsx(oe,{children:d.description})]},d.id))]})}function zme(e){return e==="Patient"||e==="Encounter"}function Fme(){const{resourceType:e,id:t}=Ge(),r=Et(),[n,o]=f.useState({resourceType:"AuditEvent",filters:[{code:"entity",operator:te.EQUALS,value:`${e}/${t}`}],fields:["id","outcome","outcomeDesc","_lastUpdated"],sortRules:[{code:"-_lastUpdated"}],count:20});return m.jsx(be,{children:m.jsx(Cc,{search:n,onClick:a=>r(`/${a.resource.resourceType}/${a.resource.id}`),onChange:a=>o(a.definition),hideFilters:!0})})}function Vme(){const e=ne(),{resourceType:t,id:r}=Ge(),n=e.readHistory(t,r).read();return m.jsx(be,{children:m.jsx(jue,{history:n})})}function Bme(e){const t="https://codeeditor.medplum.com/bot-runner.html";return m.jsx("iframe",{frameBorder:"0",src:t,className:e.className,ref:e.iframeRef,"data-testid":e.testId,style:{width:"100%",height:"100%",minHeight:e.minHeight}})}function Ume(e){const t=e.defaultValue,r=new URL(`https://codeeditor.medplum.com/${e.language}-editor.html`);return e.module&&r.searchParams.set("module",e.module),m.jsx("iframe",{frameBorder:"0",src:r.toString(),style:{width:"100%",height:"100%",minHeight:e.minHeight},ref:e.iframeRef,"data-testid":e.testId,onLoad:n=>{nd(n.currentTarget,{command:"setValue",value:t}).catch(console.error)}})}const Wme=`{
|
|
225
|
+
"resourceType": "Patient",
|
|
226
|
+
"name": [
|
|
227
|
+
{
|
|
228
|
+
"given": [
|
|
229
|
+
"Alice"
|
|
230
|
+
],
|
|
231
|
+
"family": "Smith"
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
}`,Hme="MSH|^~\\&|ADT1|MCM|LABADT|MCM|198808181126|SECURITY|ADT|MSG00001|P|2.1\rPID|||PATID1234^5^M11||JONES^WILLIAM^A^III||19610615|M-||C|1200 N ELM STREET^^GREENSBORO^NC^27401-1020|GL|(919)379-1212|(919)271-3434||S||PATID12345001^2^M10|123456789|987654^NC\rNK1|1|JONES^BARBARA^K|SPO|||||20011105\rPV1|1|I|2000^2012^01||||004777^LEBAUER^SIDNEY^J.|||SUR||-||1|A0-",qme=H(()=>({hl7Input:{fontFamily:"monospace",fontSize:"12px",lineHeight:1.55,padding:"10px 12px",whiteSpace:"nowrap",width:"100%"}}));function Gme(){const e=ne(),{id:t}=Ge(),[r,n]=f.useState(),[o,a]=f.useState(),[i,l]=f.useState(Wme),[c,u]=f.useState(Hme),[d,p]=f.useState(Jt.FHIR_JSON),{classes:h}=qme(),g=f.useRef(null),y=f.useRef(null),[v,E]=f.useState(!1);f.useEffect(()=>{e.readResource("Bot",t).then(async O=>{n(O),a(await Qme(e,O))}).catch(O=>de({color:"red",message:Oe(O)}))},[e,t]);const w=f.useCallback(()=>nd(g.current,{command:"getValue"}),[g]),b=f.useCallback(()=>nd(g.current,{command:"getOutput"}),[g]),_=f.useCallback(async()=>d===Jt.FHIR_JSON?JSON.parse(i):c,[d,i,c]),x=f.useCallback(async O=>{O.preventDefault(),O.stopPropagation(),E(!0);try{const C=await w(),T=await e.createAttachment(C,"index.ts","text/typescript"),k=[];r!=null&&r.sourceCode?k.push({op:"replace",path:"/sourceCode",value:T}):k.push({op:"add",path:"/sourceCode",value:T}),await e.patchResource("Bot",t,k),de({color:"green",message:"Saved"})}catch(C){de({color:"red",message:Oe(C)})}finally{E(!1)}},[e,t,r,w]),S=f.useCallback(async O=>{O.preventDefault(),O.stopPropagation(),E(!0);try{const C=await b();await e.post(e.fhirUrl("Bot",t,"$deploy"),{code:C}),de({color:"green",message:"Deployed"})}catch(C){de({color:"red",message:Oe(C)})}finally{E(!1)}},[e,t,b]),$=f.useCallback(async O=>{O.preventDefault(),O.stopPropagation(),E(!0);try{const C=await _(),T=await e.post(e.fhirUrl("Bot",t,"$execute"),C,d);await nd(y.current,{command:"setValue",value:T}),de({color:"green",message:"Success"})}catch(C){de({color:"red",message:Oe(C)})}finally{E(!1)}},[e,t,_,d]);return!r||o===void 0?null:m.jsxs(rn,{m:0,gutter:0,style:{overflow:"hidden"},children:[m.jsx(rn.Col,{span:8,children:m.jsxs(Pn,{m:2,pb:"xs",pr:"xs",pt:"xs",shadow:"md",mih:400,children:[m.jsx(Ume,{iframeRef:g,language:"typescript",module:"commonjs",testId:"code-frame",defaultValue:o,minHeight:"528px"}),m.jsxs(J,{position:"right",spacing:"xs",children:[m.jsx(ee,{type:"button",onClick:x,loading:v,leftIcon:m.jsx(lfe,{size:"1rem"}),children:"Save"}),m.jsx(ee,{type:"button",onClick:S,loading:v,leftIcon:m.jsx(ife,{size:"1rem"}),children:"Deploy"}),m.jsx(ee,{type:"button",onClick:$,loading:v,leftIcon:m.jsx(mfe,{size:"1rem"}),children:"Execute"})]})]})}),m.jsxs(rn.Col,{span:4,children:[m.jsxs(Pn,{m:2,pb:"xs",pr:"xs",pt:"xs",shadow:"md",children:[m.jsx(dt,{data:[{label:"FHIR",value:Jt.FHIR_JSON},{label:"HL7",value:Jt.HL7_V2}],onChange:O=>p(O.currentTarget.value)}),d===Jt.FHIR_JSON?m.jsx(Rl,{value:i,onChange:O=>l(O),minRows:15}):m.jsx("textarea",{className:h.hl7Input,value:c,onChange:O=>u(O.currentTarget.value),rows:15})]}),m.jsx(Pn,{m:2,p:"xs",shadow:"md",children:m.jsx(Bme,{iframeRef:y,className:"medplum-bot-output-frame",testId:"output-frame",minHeight:"200px"})})]})]})}async function Qme(e,t){var r,n,o;if((r=t.sourceCode)!=null&&r.url){const a=(o=(n=t.sourceCode.url)==null?void 0:n.split("/"))==null?void 0:o.find(N4);return(await e.download(e.fhirUrl("Binary",a))).text()}return t.code??""}function Ic(e){let t=e.meta;return t&&(t={...t,lastUpdated:void 0,versionId:void 0,author:void 0}),{...e,meta:t}}function Kme(){const e=ne(),{resourceType:t,id:r}=Ge(),n={reference:t+"/"+r},o=f.useCallback(a=>{e.updateResource(Ic(a)).then(()=>{de({color:"green",message:"Success"})}).catch(i=>{de({color:"red",message:Oe(i)})})},[e]);switch(t){case"PlanDefinition":return m.jsx(be,{children:m.jsx(_ce,{value:n,onSubmit:o})});case"Questionnaire":return m.jsx(be,{children:m.jsx(Uce,{questionnaire:n,onSubmit:o})});default:return null}}function Yme(){const{resourceType:e,id:t}=Ge(),r=tt({reference:e+"/"+t}),n=Et();return r?m.jsx(be,{children:m.jsx(bue,{value:r,onStart:(o,a)=>n(`/forms/${W0(a)}`),onEdit:(o,a,i)=>n(`/${i.reference}}`)})}):null}function Xme(){const e=ne(),{resourceType:t,id:r}=Ge(),n=Et();return m.jsxs(be,{children:[m.jsxs("p",{children:["Are you sure you want to delete this ",t,"?"]}),m.jsx(ee,{color:"red",onClick:()=>{e.deleteResource(t,r).then(()=>n(`/${t}`)).catch(o=>de({color:"red",message:Oe(o)}))},children:"Delete"})]})}function Jme(){const{resourceType:e,id:t}=Ge(),r=tt({reference:e+"/"+t});return r?m.jsx(be,{children:m.jsx(S1,{value:r})}):null}function Zme(){const e=ne(),{resourceType:t,id:r}=Ge(),[n,o]=f.useState(),a=Et(),[i,l]=f.useState();f.useEffect(()=>{e.readResource(t,r).then(d=>o(di(d))).catch(d=>{l(st(d)),de({color:"red",message:Oe(d)})})},[e,t,r]);const c=f.useCallback(d=>{l(void 0),e.updateResource(Ic(d)).then(()=>{a(`/${t}/${r}/details`),de({color:"green",message:"Success"})}).catch(p=>{l(st(p)),de({color:"red",message:Oe(p)})})},[e,t,r,a]),u=f.useCallback(()=>a(`/${t}/${r}/delete`),[a,t,r]);return n?m.jsx(be,{children:m.jsx(sN,{defaultValue:n,onSubmit:c,onDelete:u,outcome:i})}):null}function ehe(){const e=ne(),{resourceType:t,id:r}=Ge(),n=e.readHistory(t,r).read();return m.jsx(be,{children:m.jsx(Due,{history:n})})}function the(){const e=ne(),{resourceType:t,id:r}=Ge(),n=tt({reference:t+"/"+r}),o=Et(),[a,i]=f.useState(),l=f.useCallback(c=>{e.updateResource(Ic(JSON.parse(c.resource))).then(()=>{i(void 0),o(`/${t}/${r}/details`),de({color:"green",message:"Success"})}).catch(u=>{de({color:"red",message:Oe(u)})})},[e,t,r,o]);return n?m.jsxs(be,{children:[a&&m.jsx(ha,{outcome:a}),m.jsxs(De,{onSubmit:l,children:[m.jsx(Rl,{name:"resource","data-testid":"resource-json",minRows:24,defaultValue:dr(n,!0),formatOnBlur:!0,deserialize:JSON.parse}),m.jsx(J,{position:"right",mt:"xl",noWrap:!0,children:m.jsx(ee,{type:"submit",children:"OK"})})]})]}):null}function rhe(){const{resourceType:e,id:t}=Ge();return tt({reference:e+"/"+t})?m.jsxs(be,{children:[m.jsxs(pc,{icon:m.jsx(nfe,{size:16}),mb:"xl",children:["This is just a preview! Access your form here:",m.jsx("br",{}),m.jsx(Ae,{href:`/forms/${t}`,children:`/forms/${t}`})]}),m.jsx(nN,{questionnaire:{reference:e+"/"+t},onSubmit:()=>alert("You submitted the preview")})]}):null}function nhe(){const e=ne(),{id:t}=Ge(),[r,n]=f.useState(),[o,a]=f.useState(0),i=e.searchResources("Subscription","status=active&_count=100").read().filter(c=>ohe(c,t));function l(){r&&e.createResource({resourceType:"Subscription",status:"active",reason:r.name,criteria:"QuestionnaireResponse?questionnaire=Questionnaire/"+t,channel:{type:"rest-hook",endpoint:Je(r)}}).then(()=>{n(void 0),a(Date.now()),e.invalidateSearches("Subscription"),de({color:"green",message:"Success"})}).catch(c=>de({color:"red",message:Oe(c)}))}return m.jsxs(be,{children:[m.jsx(fe,{children:"Bots"}),i.length===0&&m.jsx("p",{children:"No bots found."}),i.map(c=>{var u;return m.jsxs("div",{children:[m.jsx("h3",{children:m.jsx(Oc,{value:{reference:(u=c.channel)==null?void 0:u.endpoint},link:!0})}),m.jsxs("p",{children:["Criteria: ",c.criteria]})]},c.id)}),m.jsx("hr",{}),m.jsx(fe,{children:"Connect to bot"}),m.jsxs(J,{children:[m.jsx(Il,{name:"bot",resourceType:"Bot",onChange:n}),m.jsx(ee,{onClick:l,children:"Connect"})]}),m.jsx("div",{style:{display:"none"},children:o})]})}function ohe(e,t){var o;const r=e.criteria||"",n=((o=e.channel)==null?void 0:o.endpoint)||"";return r.startsWith("QuestionnaireResponse?")&&r.includes(t)&&n.startsWith("Bot/")}function ahe(){const{id:e}=Ge(),t=Et(),[r,n]=f.useState({resourceType:"QuestionnaireResponse",filters:[{code:"questionnaire",operator:te.EQUALS,value:"Questionnaire/"+e}],fields:["id","_lastUpdated"]});return m.jsx(be,{children:m.jsx(Cc,{search:r,onClick:o=>t(`/${o.resource.resourceType}/${o.resource.id}`),onChange:o=>n(o.definition),hideFilters:!0,hideToolbar:!0})})}function ihe(){const e=ne(),{resourceType:t,id:r}=Ge(),n=tt({reference:t+"/"+r}),o=f.useCallback(a=>{e.updateResource(Ic(a)).then(()=>{de({color:"green",message:"Success"})}).catch(i=>{de({color:"red",message:Oe(i)})})},[e]);return n?m.jsx(be,{children:m.jsx(fue,{onSubmit:o,definition:n})}):null}function lhe(){const{resourceType:e,id:t}=Ge(),r=tt({reference:e+"/"+t});return r?m.jsx(be,{children:m.jsx(E1,{value:r})}):null}const she=H(e=>({container:{position:"fixed",top:300,left:0,width:160,zIndex:5,fontSize:e.fontSizes.xs,"@media (max-width: 700px)":{display:"none"}},entry:{textAlign:"center",width:150,backgroundColor:e.colors.gray[0],border:`1px solid ${e.colors.gray[3]}`},active:{width:160,backgroundColor:e.colors.yellow[0],border:`1px solid ${e.colors.yellow[5]}`}}));function che(e){const{classes:t,cx:r}=she(),n=ne(),o=tt(e.value),[a,i]=f.useState();return f.useEffect(()=>{if(!o)return;const l=V1(o);if(!l)return;const c="reference"in l?l.reference:Je(l);n.search("ServiceRequest","subject="+c).then(u=>{const p=u.entry.map(h=>h.resource);BD(p),p.reverse(),i(p)}).catch(u=>de({color:"red",message:Oe(u)}))},[n,o]),a?m.jsx("div",{"data-testid":"quick-service-requests",className:t.container,children:a.map(l=>{var c,u,d,p,h,g,y;return m.jsxs("div",{className:r(t.entry,{[t.active]:l.id===(o==null?void 0:o.id)}),children:[m.jsx("p",{children:m.jsx(Re,{to:l,children:uhe(l)})}),((u=(c=l.category)==null?void 0:c[0])==null?void 0:u.text)&&m.jsx("p",{children:(d=l.category[0])==null?void 0:d.text}),((g=(h=(p=l.code)==null?void 0:p.coding)==null?void 0:h[0])==null?void 0:g.code)&&m.jsx("p",{children:(y=l.code.coding[0])==null?void 0:y.code}),m.jsx("p",{children:dhe(l)})]},l.id)})}):null}function uhe(e){if(e.identifier){for(const t of e.identifier)if(t.value)return t.value}return e.id||""}function dhe(e){var t;return e.authoredOn?e.authoredOn.substring(0,10):(t=e.meta)!=null&&t.lastUpdated?e.meta.lastUpdated.substring(0,10):""}const fhe=H(()=>({container:{position:"absolute",top:65,right:5,width:200,height:50,zIndex:15}}));function phe(e){var a,i,l,c;const{classes:t}=fhe(),r=tt(e.valueSet);if(!r)return null;const n=[""],o=(c=(l=(i=(a=r.compose)==null?void 0:a.include)==null?void 0:i[0])==null?void 0:l.concept)==null?void 0:c.map(u=>u.code);return o&&n.push(...o),e.defaultValue&&!n.includes(e.defaultValue)&&n.push(e.defaultValue),m.jsx("div",{className:t.container,children:m.jsx(dt,{defaultValue:e.defaultValue,onChange:u=>e.onChange(u.currentTarget.value),data:n})})}function mhe(e){var r,n;const t=tt(e.specimen);return t?m.jsxs(Se,{children:[m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:"Type"}),m.jsx(Se.Value,{children:"Specimen"})]}),m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:"Collected"}),m.jsx(Se.Value,{children:Cr((r=t.collection)==null?void 0:r.collectedDateTime)})]}),m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:"Specimen Age"}),m.jsx(Se.Value,{children:hhe(t)})]}),(n=t.collection)!=null&&n.collectedDateTime&&t.receivedTime?m.jsxs(Se.Entry,{children:[m.jsx(Se.Key,{children:"Specimen Stability"}),m.jsx(Se.Value,{children:ghe(t)})]}):m.jsx(m.Fragment,{})]}):null}function hhe(e){var o;const t=(o=e.collection)==null?void 0:o.collectedDateTime;if(!t)return;const r=new Date(t);return KN(YN(r,new Date))}function ghe(e){var n;if(!((n=e.collection)!=null&&n.collectedDateTime)||!e.receivedTime)return;const t=new Date(e.collection.collectedDateTime),r=new Date(e.receivedTime);return KN(YN(t,r))}function KN(e){return e.toString().padStart(3,"0")+"D"}function YN(e,t){const r=t.getTime()-e.getTime();return Math.floor(r/(1e3*3600*24))}function vhe(e){const t=["Timeline"];return e==="Bot"&&t.push("Editor","Subscriptions"),e==="PlanDefinition"&&t.push("Apply","Builder"),e==="Questionnaire"&&t.push("Preview","Builder","Bots","Responses"),e==="DiagnosticReport"&&t.push("Report"),e==="RequestGroup"&&t.push("Checklist"),e==="ObservationDefinition"&&t.push("Ranges"),t.push("Details","Edit","Event","History","Blame","JSON","Apps"),t}function yhe(){var x,S,$,O,C,T,k;const e=ne(),{resourceType:t,id:r}=Ge(),n={reference:t+"/"+r},o=Et(),[a,i]=f.useState(),l=tt(n,i),c=vhe(t),u=c[0].toLowerCase(),d=window.location.pathname.split("/").pop(),[p,h]=f.useState(d??u);async function g(){var N,D;const j=(D=(N=(await e.readHistory(t,r)).entry)==null?void 0:N.find(z=>!!z.resource))==null?void 0:D.resource;j?y(j):de({color:"red",message:"No history to restore"})}function y(I){e.updateResource(Ic(I)).then(()=>{i(void 0),de({color:"green",message:"Success"})}).catch(j=>{de({color:"red",message:Oe(j)})})}if(a)return ioe(a)?m.jsxs(be,{children:[m.jsx(fe,{children:"Deleted"}),m.jsx("p",{children:"The resource was deleted."}),m.jsx(ee,{color:"red",onClick:g,children:"Restore"})]}):m.jsx(ha,{outcome:a});function v(I){h(I),o(`/${t}/${r}/${I}`)}function E(I){const j=l,N=j.orderDetail||[];N.length===0&&N.push({}),N[0].text!==I&&(N[0].text=I,y({...j,orderDetail:N}))}const w=l&&V1(l),b=l&&tme(l),_=($=(S=(x=e.getUserConfiguration())==null?void 0:x.option)==null?void 0:S.find(I=>I.id==="statusValueSet"))==null?void 0:$.valueString;return m.jsxs(m.Fragment,{children:[(l==null?void 0:l.resourceType)==="ServiceRequest"&&_&&m.jsx(phe,{valueSet:{reference:_},defaultValue:(C=(O=l.orderDetail)==null?void 0:O[0])==null?void 0:C.text,onChange:E},Je(l)+"-"+((k=(T=l.orderDetail)==null?void 0:T[0])==null?void 0:k.text)),l&&m.jsx(che,{value:l}),l&&m.jsxs(Pn,{children:[w&&m.jsx(qN,{patient:w}),b&&m.jsx(mhe,{specimen:b}),t!=="Patient"&&m.jsx(GN,{resource:n}),m.jsx(ai,{children:m.jsx(Ue,{value:p.toLowerCase(),onTabChange:v,children:m.jsx(Ue.List,{style:{whiteSpace:"nowrap",flexWrap:"nowrap"},children:c.map(I=>m.jsx(Ue.Tab,{value:I.toLowerCase(),children:I},I))})})})]}),m.jsx(M1,{})]})}function pO(){var w,b,_,x;const e=Et(),{resourceType:t,id:r,versionId:n,tab:o}=Ge(),a=ne(),[i,l]=f.useState(!0),[c,u]=f.useState(),[d,p]=f.useState();if(f.useEffect(()=>{p(void 0),l(!0),a.readHistory(t,r).then(S=>u(S)).then(()=>l(!1)).catch(S=>{p(S),l(!1)})},[a,t,r]),i)return m.jsx(jn,{});if(!c)return m.jsxs(be,{children:[m.jsx(fe,{children:"Resource not found"}),m.jsx(Re,{to:`/${t}`,children:"Return to search page"})]});const h=c.entry,g=h.findIndex(S=>{var $,O;return((O=($=S.resource)==null?void 0:$.meta)==null?void 0:O.versionId)===n});if(g===-1)return m.jsxs(be,{children:[m.jsx(fe,{children:"Version not found"}),m.jsx(Re,{to:`/${t}/${r}`,children:"Return to resource"})]});const y=h[g].resource,v=g<h.length-1?h[g+1].resource:void 0,E="diff";return m.jsx(m.Fragment,{children:m.jsxs(Ue,{value:o||E,onTabChange:S=>e(`/${t}/${r}/_history/${n}/${S}`),children:[m.jsxs(Pn,{children:[m.jsx($c,{fluid:!0,p:"md",children:m.jsx(oe,{children:`${t} ${r}`})}),m.jsxs(Ue.List,{children:[m.jsx(Ue.Tab,{value:"diff",children:"Diff"}),m.jsx(Ue.Tab,{value:"raw",children:"Raw"})]})]}),m.jsxs(be,{children:[d&&m.jsx("pre",{"data-testid":"error",children:JSON.stringify(d,void 0,2)}),m.jsx(Ue.Panel,{value:"diff",children:v?m.jsxs(m.Fragment,{children:[m.jsxs("ul",{children:[m.jsxs("li",{children:["Current: ",(w=y.meta)==null?void 0:w.versionId]}),m.jsxs("li",{children:["Previous:"," ",m.jsx(Re,{to:`/${t}/${r}/_history/${(b=v.meta)==null?void 0:b.versionId}`,children:(_=v.meta)==null?void 0:_.versionId})]})]}),m.jsx(Tue,{original:v,revised:y})]}):m.jsxs(m.Fragment,{children:[m.jsxs("ul",{children:[m.jsxs("li",{children:["Current: ",(x=y.meta)==null?void 0:x.versionId]}),m.jsx("li",{children:"Previous: (none)"})]}),m.jsx("pre",{children:JSON.stringify(y,void 0,2)})]})}),m.jsx(Ue.Panel,{value:"raw",children:m.jsx("pre",{children:JSON.stringify(y,void 0,2)})})]})]})})}function whe(){const{resourceType:e,id:t}=Ge(),r=Et(),[n,o]=f.useState({resourceType:"Subscription",filters:[{code:"url",operator:te.EQUALS,value:`${e}/${t}`}],fields:["id","criteria","status","_lastUpdated"]});return m.jsx(be,{children:m.jsx(Cc,{search:n,onClick:a=>r(`/${a.resource.resourceType}/${a.resource.id}`),onChange:a=>o(a.definition),hideFilters:!0})})}function mO(){const{resourceType:e,id:t}=Ge(),r={reference:e+"/"+t};switch(e){case"Encounter":return m.jsx(Ose,{encounter:r});case"Patient":return m.jsx(bce,{patient:r});case"ServiceRequest":return m.jsx(Mue,{serviceRequest:r});default:return m.jsx($se,{resource:r})}}function XN(e,t){const r=ne(),n=Et();return{defaultValue:{resourceType:e},handleSubmit:i=>{t&&t(void 0),r.createResource(i).then(l=>n("/"+l.resourceType+"/"+l.id)).catch(l=>{t&&t(st(l))})}}}function hO(){const{resourceType:e}=Ge(),[t,r]=f.useState(),{defaultValue:n,handleSubmit:o}=XN(e,r);return m.jsx(be,{children:m.jsx(sN,{defaultValue:n,onSubmit:o,outcome:t})})}function bhe(){const{resourceType:e}=Ge(),[t,r]=f.useState(),{defaultValue:n,handleSubmit:o}=XN(e,r),a=f.useCallback(i=>{o(JSON.parse(i["new-resource"]))},[o]);return m.jsxs(be,{children:[t&&m.jsx(ha,{outcome:t}),m.jsxs(De,{onSubmit:a,children:[m.jsx(Rl,{name:"new-resource","data-testid":"create-resource-json",minRows:24,defaultValue:dr(n,!0),formatOnBlur:!0,deserialize:JSON.parse}),m.jsx(J,{position:"right",mt:"xl",noWrap:!0,children:m.jsx(ee,{type:"submit",children:"OK"})})]})]})}function _he(){return m.jsx(Hde,{children:m.jsxs(se,{errorElement:m.jsx(Zpe,{}),children:[m.jsx(se,{path:"/signin",element:m.jsx(wme,{})}),m.jsx(se,{path:"/oauth",element:m.jsx(mme,{})}),m.jsx(se,{path:"/resetpassword",element:m.jsx(gme,{})}),m.jsx(se,{path:"/setpassword/:id/:secret",element:m.jsx(yme,{})}),m.jsx(se,{path:"/register",element:m.jsx(hme,{})}),m.jsx(se,{path:"/changepassword",element:m.jsx(Ype,{})}),m.jsx(se,{path:"/security",element:m.jsx(vme,{})}),m.jsx(se,{path:"/mfa",element:m.jsx(fme,{})}),m.jsx(se,{path:"/batch",element:m.jsx(Qpe,{})}),m.jsx(se,{path:"/bulk/:resourceType",element:m.jsx(Kpe,{})}),m.jsx(se,{path:"/smart",element:m.jsx(bme,{})}),m.jsx(se,{path:"/forms/:id",element:m.jsx(nme,{})}),m.jsx(se,{path:"/admin/super",element:m.jsx(Tme,{})}),m.jsxs(se,{path:"/admin",element:m.jsx(kme,{}),children:[m.jsx(se,{path:"patients",element:m.jsx(Cme,{})}),m.jsx(se,{path:"bots/new",element:m.jsx(Eme,{})}),m.jsx(se,{path:"bots",element:m.jsx(_me,{})}),m.jsx(se,{path:"clients/new",element:m.jsx(Sme,{})}),m.jsx(se,{path:"clients",element:m.jsx(xme,{})}),m.jsx(se,{path:"details",element:m.jsx(uO,{})}),m.jsx(se,{path:"invite",element:m.jsx(Ome,{})}),m.jsx(se,{path:"users",element:m.jsx(Ime,{})}),m.jsx(se,{path:"project",element:m.jsx(uO,{})}),m.jsx(se,{path:"secrets",element:m.jsx(jme,{})}),m.jsx(se,{path:"sites",element:m.jsx(Rme,{})}),m.jsx(se,{path:"members/:membershipId",element:m.jsx($me,{})})]}),m.jsx(se,{path:"/lab/assays",element:m.jsx(Dme,{})}),m.jsx(se,{path:"/lab/panels",element:m.jsx(Nme,{})}),m.jsx(se,{path:"/:resourceType/:id/_history/:versionId/:tab",element:m.jsx(pO,{})}),m.jsx(se,{path:"/:resourceType/:id/_history/:versionId",element:m.jsx(pO,{})}),m.jsxs(se,{path:"/:resourceType/new",element:m.jsx(Jpe,{}),children:[m.jsx(se,{index:!0,element:m.jsx(hO,{})}),m.jsx(se,{path:"form",element:m.jsx(hO,{})}),m.jsx(se,{path:"json",element:m.jsx(bhe,{})})]}),m.jsxs(se,{path:"/:resourceType/:id",element:m.jsx(yhe,{}),children:[m.jsx(se,{index:!0,element:m.jsx(mO,{})}),m.jsx(se,{path:"apply",element:m.jsx(Mme,{})}),m.jsx(se,{path:"apps",element:m.jsx(Lme,{})}),m.jsx(se,{path:"event",element:m.jsx(Fme,{})}),m.jsx(se,{path:"blame",element:m.jsx(Vme,{})}),m.jsx(se,{path:"bots",element:m.jsx(nhe,{})}),m.jsx(se,{path:"builder",element:m.jsx(Kme,{})}),m.jsx(se,{path:"checklist",element:m.jsx(Yme,{})}),m.jsx(se,{path:"delete",element:m.jsx(Xme,{})}),m.jsx(se,{path:"details",element:m.jsx(Jme,{})}),m.jsx(se,{path:"edit",element:m.jsx(Zme,{})}),m.jsx(se,{path:"editor",element:m.jsx(Gme,{})}),m.jsx(se,{path:"history",element:m.jsx(ehe,{})}),m.jsx(se,{path:"json",element:m.jsx(the,{})}),m.jsx(se,{path:"preview",element:m.jsx(rhe,{})}),m.jsx(se,{path:"responses",element:m.jsx(ahe,{})}),m.jsx(se,{path:"report",element:m.jsx(lhe,{})}),m.jsx(se,{path:"ranges",element:m.jsx(ihe,{})}),m.jsx(se,{path:"subscriptions",element:m.jsx(whe,{})}),m.jsx(se,{path:"timeline",element:m.jsx(mO,{})})]}),m.jsx(se,{path:"/:resourceType",element:m.jsx(cO,{})}),m.jsx(se,{path:"/",element:m.jsx(cO,{})})]})})}function xhe(){const e=ne(),t=e.getUserConfiguration(),r=va(),[n]=L1();return e.isLoading()?m.jsx(jn,{}):m.jsx(cle,{logo:m.jsx(Tn,{size:24}),pathname:r.pathname,searchParams:n,version:Dae,menus:Ehe(t),displayAddBookmark:!!(t!=null&&t.id),children:m.jsx(f.Suspense,{fallback:m.jsx(jn,{}),children:m.jsx(_he,{})})})}function Ehe(e){var r;const t=((r=e==null?void 0:e.menu)==null?void 0:r.map(n=>{var o;return{title:n.title,links:((o=n.link)==null?void 0:o.map(a=>({label:a.name,href:a.target,icon:She(a.target)})))||[]}}))||[];return t.push({title:"Settings",links:[{label:"Security",href:"/security",icon:m.jsx(dfe,{})}]}),t}const gO={Patient:vfe,Practitioner:cfe,Organization:afe,ServiceRequest:hfe,DiagnosticReport:gfe,Questionnaire:sfe,admin:ofe,AccessPolicy:ufe,Subscription:yfe,batch:pfe,Observation:ffe};function She(e){try{const t=new URL(e,"https://app.medplum.com").pathname.split("/")[1];if(t in gO){const r=gO[t];return m.jsx(r,{})}}catch{}return m.jsx(Hm,{w:30})}"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.getRegistrations().then(e=>Promise.all(e.map(t=>t.unregister()))).catch(e=>console.error("SW registration failed: ",e))});async function Phe(){const e=Tc(),t=new Bae({baseUrl:e.baseUrl,clientId:e.clientId,cacheTime:6e4,autoBatchTime:100,onUnauthenticated:()=>{window.location.pathname!=="/signin"&&window.location.pathname!=="/oauth"&&(window.location.href="/signin?next="+encodeURIComponent(window.location.pathname+window.location.search))}}),r={headings:{sizes:{h1:{fontSize:"1.125rem",fontWeight:500,lineHeight:2}}},fontSizes:{xs:"0.6875rem",sm:"0.875rem",md:"0.875rem",lg:"1.0rem",xl:"1.125rem"}},n=Qde([{path:"*",element:m.jsx(xhe,{})}]),o=i=>n.navigate(i);cN(document.getElementById("root")).render(m.jsx(s.StrictMode,{children:m.jsx(Wae,{medplum:t,navigate:o,children:m.jsxs(iC,{theme:r,withGlobalStyles:!0,withNormalizeCSS:!0,children:[m.jsx(ui,{position:"bottom-right"}),m.jsx(Bde,{router:n})]})})}))}Phe().catch(console.error);
|
|
235
|
+
//# sourceMappingURL=index-b0ab8ed2.js.map
|